mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
Mark report_success arguments translatable.
This commit is contained in:
@@ -373,34 +373,34 @@ function _setup_page() {
|
||||
data: data,
|
||||
success: function (data) {
|
||||
if (data.name !== undefined) {
|
||||
ui.report_success("Name changed!", name_status);
|
||||
ui.report_success(i18n.t("Name changed!"), name_status);
|
||||
}
|
||||
if (data.restricted_to_domain !== undefined) {
|
||||
if (data.restricted_to_domain) {
|
||||
ui.report_success("New users must have @" + page_params.domain + " e-mails!", restricted_to_domain_status);
|
||||
ui.report_success(i18n.t("New users must have @__domain__ e-mails!", page_params), restricted_to_domain_status);
|
||||
} else {
|
||||
ui.report_success("New users may have arbitrary e-mails!", restricted_to_domain_status);
|
||||
ui.report_success(i18n.t("New users may have arbitrary e-mails!"), restricted_to_domain_status);
|
||||
}
|
||||
}
|
||||
if (data.invite_required !== undefined) {
|
||||
if (data.invite_required) {
|
||||
ui.report_success("New users must be invited by e-mail!", invite_required_status);
|
||||
ui.report_success(i18n.t("New users must be invited by e-mail!"), invite_required_status);
|
||||
} else {
|
||||
ui.report_success("New users may sign up online!", invite_required_status);
|
||||
ui.report_success(i18n.t("New users may sign up online!"), invite_required_status);
|
||||
}
|
||||
}
|
||||
if (data.invite_by_admins_only !== undefined) {
|
||||
if (data.invite_by_admins_only) {
|
||||
ui.report_success("New users must be invited by an admin!", invite_by_admins_only_status);
|
||||
ui.report_success(i18n.t("New users must be invited by an admin!"), invite_by_admins_only_status);
|
||||
} else {
|
||||
ui.report_success("Any user may now invite new users!", invite_by_admins_only_status);
|
||||
ui.report_success(i18n.t("Any user may now invite new users!"), invite_by_admins_only_status);
|
||||
}
|
||||
}
|
||||
if (data.create_stream_by_admins_only !== undefined) {
|
||||
if (data.create_stream_by_admins_only) {
|
||||
ui.report_success("Only Admins may now create new streams!", create_stream_by_admins_only_status);
|
||||
ui.report_success(i18n.t("Only Admins may now create new streams!"), create_stream_by_admins_only_status);
|
||||
} else {
|
||||
ui.report_success("Any user may now create new streams!", create_stream_by_admins_only_status);
|
||||
ui.report_success(i18n.t("Any user may now create new streams!"), create_stream_by_admins_only_status);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -575,7 +575,7 @@ function _setup_page() {
|
||||
data: $(this).serialize(),
|
||||
success: function () {
|
||||
$('#admin-emoji-status, #admin-emoji-name-status, #admin-emoji-url-status').hide();
|
||||
ui.report_success("Custom emoji added!", emoji_status);
|
||||
ui.report_success(i18n.t("Custom emoji added!"), emoji_status);
|
||||
},
|
||||
error: function (xhr, error) {
|
||||
$('#admin-emoji-status, #admin-emoji-name-status, #admin-emoji-url-status').hide();
|
||||
|
||||
@@ -20,7 +20,7 @@ var exports = {};
|
||||
if (!$.isEmptyObject(data.already_subscribed)) {
|
||||
// Display the canonical stream capitalization.
|
||||
var true_stream_name = data.already_subscribed[page_params.email][0];
|
||||
ui.report_success("Already subscribed to " + true_stream_name,
|
||||
ui.report_success(i18n.t("Already subscribed to __stream__", {'stream': true_stream_name}),
|
||||
$status_message);
|
||||
}
|
||||
}, function (xhr) {
|
||||
|
||||
@@ -290,7 +290,7 @@ function _setup_page() {
|
||||
page_params.enable_digest_emails = result.enable_digest_emails;
|
||||
}
|
||||
|
||||
ui.report_success("Updated notification settings!", notify_settings_status);
|
||||
ui.report_success(i18n.t("Updated notification settings!"), notify_settings_status);
|
||||
}
|
||||
|
||||
function update_notification_settings_error(xhr, error_type, xhn) {
|
||||
@@ -378,7 +378,7 @@ function _setup_page() {
|
||||
url: '/json/left_side_userlist',
|
||||
data: data,
|
||||
success: function (resp, statusText, xhr, form) {
|
||||
ui.report_success("Updated display settings! You will need to reload the window for your changes to take effect.",
|
||||
ui.report_success(i18n.t("Updated display settings! You will need to reload the window for your changes to take effect."),
|
||||
$('#display-settings-status').expectOne());
|
||||
},
|
||||
error: function (xhr, error_type, xhn) {
|
||||
@@ -396,7 +396,7 @@ function _setup_page() {
|
||||
url: '/json/time_setting',
|
||||
data: data,
|
||||
success: function (resp, statusText, xhr, form) {
|
||||
ui.report_success("Updated display settings! You will need to reload the window for your changes to take effect",
|
||||
ui.report_success(i18n.t("Updated display settings! You will need to reload the window for your changes to take effect"),
|
||||
$('#display-settings-status').expectOne());
|
||||
},
|
||||
error: function (xhr, error_type, xhn) {
|
||||
@@ -661,7 +661,7 @@ function _setup_page() {
|
||||
url: '/json/ui_settings/change',
|
||||
data: labs_updates,
|
||||
success: function (resp, statusText, xhr, form) {
|
||||
var message = "Updated " + page_params.product_name + " Labs settings!";
|
||||
var message = i18n.t("Updated __product_name__ Labs settings!", page_params);
|
||||
var result = $.parseJSON(xhr.responseText);
|
||||
var ui_settings_status = $('#ui-settings-status').expectOne();
|
||||
|
||||
|
||||
@@ -564,7 +564,7 @@ function ajaxSubscribe(stream) {
|
||||
if (!$.isEmptyObject(res.already_subscribed)) {
|
||||
// Display the canonical stream capitalization.
|
||||
true_stream_name = res.already_subscribed[page_params.email][0];
|
||||
ui.report_success("Already subscribed to " + true_stream_name,
|
||||
ui.report_success(i18n.t("Already subscribed to __stream__", {'stream': true_stream_name}),
|
||||
$("#subscriptions-status"), 'subscriptions-status');
|
||||
}
|
||||
// The rest of the work is done via the subscribe event we will get
|
||||
@@ -970,7 +970,7 @@ $(function () {
|
||||
old_name_box.text(new_name);
|
||||
sub_row.find(".email-address").text(data.email_address);
|
||||
|
||||
ui.report_success("The stream has been renamed!", $("#subscriptions-status "),
|
||||
ui.report_success(i18n.t("The stream has been renamed!"), $("#subscriptions-status "),
|
||||
'subscriptions-status');
|
||||
},
|
||||
error: function (xhr) {
|
||||
@@ -997,7 +997,7 @@ $(function () {
|
||||
},
|
||||
success: function () {
|
||||
// The event from the server will update the rest of the UI
|
||||
ui.report_success("The stream description has been updated!",
|
||||
ui.report_success(i18n.t("The stream description has been updated!"),
|
||||
$("#subscriptions-status"), 'subscriptions-status');
|
||||
},
|
||||
error: function (xhr) {
|
||||
|
||||
Reference in New Issue
Block a user