i18n: Fix strings for wildcard mentions.

First, "Notify stream" is a lot clearer than "Notify everyone";
second, these strings should be tagged for translation.
This commit is contained in:
Tim Abbott
2018-04-04 11:16:56 -07:00
parent aeef925b93
commit 721b4e8373
2 changed files with 9 additions and 6 deletions

View File

@@ -1,3 +1,4 @@
set_global('i18n', global.stub_i18n);
zrequire('compose_state');
zrequire('ui_util');
zrequire('pm_conversations');
@@ -894,13 +895,13 @@ user_pill.get_user_ids = function () {
var all_items = [
{
special_item_text: 'all (Notify everyone)',
special_item_text: 'translated: all (Notify stream)',
email: 'all',
pm_recipient_count: Infinity,
full_name: 'all',
},
{
special_item_text: 'everyone (Notify everyone)',
special_item_text: 'translated: everyone (Notify stream)',
email: 'everyone',
pm_recipient_count: Infinity,
full_name: 'everyone',
@@ -1092,13 +1093,13 @@ user_pill.get_user_ids = function () {
(function test_typeahead_results() {
var all_items = [
{
special_item_text: 'all (Notify everyone)',
special_item_text: 'all (translated: Notify stream)',
email: 'all',
pm_recipient_count: Infinity,
full_name: 'all',
},
{
special_item_text: 'everyone (Notify everyone)',
special_item_text: 'everyone (translated: Notify stream)',
email: 'everyone',
pm_recipient_count: Infinity,
full_name: 'everyone',

View File

@@ -375,7 +375,8 @@ exports.compose_content_begins_typeahead = function (query) {
this.completing = 'mention';
this.token = current_token;
var all_item = {
special_item_text: "all (Notify everyone)",
special_item_text: i18n.t("__wildcard_mention_token__ (Notify stream)",
{wildcard_mention_token: "all"}),
email: "all",
// Always sort above, under the assumption that names will
// be longer and only contain "all" as a substring.
@@ -383,7 +384,8 @@ exports.compose_content_begins_typeahead = function (query) {
full_name: "all",
};
var everyone_item = {
special_item_text: "everyone (Notify everyone)",
special_item_text: i18n.t("__wildcard_mention_token__ (Notify stream)",
{wildcard_mention_token: "everyone"}),
email: "everyone",
pm_recipient_count: Infinity,
full_name: "everyone",