mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +00:00
Mark report_error arguments translatable.
This commit is contained in:
@@ -14,15 +14,15 @@ exports.show_or_hide_menu_item = function () {
|
|||||||
|
|
||||||
function failed_listing_users(xhr, error) {
|
function failed_listing_users(xhr, error) {
|
||||||
loading.destroy_indicator($('#subs_page_loading_indicator'));
|
loading.destroy_indicator($('#subs_page_loading_indicator'));
|
||||||
ui.report_error("Error listing users or bots", xhr, $("#administration-status"));
|
ui.report_error(i18n.t("Error listing users or bots"), xhr, $("#administration-status"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function failed_listing_streams(xhr, error) {
|
function failed_listing_streams(xhr, error) {
|
||||||
ui.report_error("Error listing streams", xhr, $("#administration-status"));
|
ui.report_error(i18n.t("Error listing streams"), xhr, $("#administration-status"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function failed_listing_emoji(xhr, error) {
|
function failed_listing_emoji(xhr, error) {
|
||||||
ui.report_error("Error listing emoji", xhr, $("#administration-status"));
|
ui.report_error(i18n.t("Error listing emoji"), xhr, $("#administration-status"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function populate_users (realm_people_data) {
|
function populate_users (realm_people_data) {
|
||||||
@@ -405,7 +405,7 @@ function _setup_page() {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function (xhr, error) {
|
error: function (xhr, error) {
|
||||||
ui.report_error("Failed!", xhr, name_status);
|
ui.report_error(i18n.t("Failed!"), xhr, name_status);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -438,7 +438,7 @@ function _setup_page() {
|
|||||||
},
|
},
|
||||||
error: function (xhr, error) {
|
error: function (xhr, error) {
|
||||||
var status = row.find(".admin-user-status");
|
var status = row.find(".admin-user-status");
|
||||||
ui.report_error("Failed!", xhr, status);
|
ui.report_error(i18n.t("Failed!"), xhr, status);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -471,7 +471,7 @@ function _setup_page() {
|
|||||||
},
|
},
|
||||||
error: function (xhr, error) {
|
error: function (xhr, error) {
|
||||||
var status = row.find(".admin-user-status");
|
var status = row.find(".admin-user-status");
|
||||||
ui.report_error("Failed!", xhr, status);
|
ui.report_error(i18n.t("Failed!"), xhr, status);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -582,15 +582,15 @@ function _setup_page() {
|
|||||||
var errors = $.parseJSON(xhr.responseText).msg;
|
var errors = $.parseJSON(xhr.responseText).msg;
|
||||||
if (errors.name !== undefined) {
|
if (errors.name !== undefined) {
|
||||||
xhr.responseText = JSON.stringify({msg: errors.name});
|
xhr.responseText = JSON.stringify({msg: errors.name});
|
||||||
ui.report_error("Failed!", xhr, emoji_name_status);
|
ui.report_error(i18n.t("Failed!"), xhr, emoji_name_status);
|
||||||
}
|
}
|
||||||
if (errors.img_url !== undefined) {
|
if (errors.img_url !== undefined) {
|
||||||
xhr.responseText = JSON.stringify({msg: errors.img_url});
|
xhr.responseText = JSON.stringify({msg: errors.img_url});
|
||||||
ui.report_error("Failed!", xhr, emoji_url_status);
|
ui.report_error(i18n.t("Failed!"), xhr, emoji_url_status);
|
||||||
}
|
}
|
||||||
if (errors.__all__ !== undefined) {
|
if (errors.__all__ !== undefined) {
|
||||||
xhr.responseText = JSON.stringify({msg: errors.__all__});
|
xhr.responseText = JSON.stringify({msg: errors.__all__});
|
||||||
ui.report_error("Failed!", xhr, emoji_status);
|
ui.report_error(i18n.t("Failed!"), xhr, emoji_status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ var exports = {};
|
|||||||
$status_message);
|
$status_message);
|
||||||
}
|
}
|
||||||
}, function (xhr) {
|
}, function (xhr) {
|
||||||
ui.report_error("Error adding subscription", xhr, $status_message);
|
ui.report_error(i18n.t("Error adding subscription"), xhr, $status_message);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ var exports = {};
|
|||||||
function (data) {
|
function (data) {
|
||||||
$status_message.hide();
|
$status_message.hide();
|
||||||
}, function (xhr) {
|
}, function (xhr) {
|
||||||
ui.report_error("Error removing subscription", xhr, $status_message);
|
ui.report_error(i18n.t("Error removing subscription"), xhr, $status_message);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ function _setup_page() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function update_notification_settings_error(xhr, error_type, xhn) {
|
function update_notification_settings_error(xhr, error_type, xhn) {
|
||||||
ui.report_error("Error changing settings", xhr, $('#notify-settings-status').expectOne());
|
ui.report_error(i18n.t("Error changing settings"), xhr, $('#notify-settings-status').expectOne());
|
||||||
}
|
}
|
||||||
|
|
||||||
function post_notify_settings_changes(notification_changes, success_func,
|
function post_notify_settings_changes(notification_changes, success_func,
|
||||||
@@ -382,7 +382,7 @@ function _setup_page() {
|
|||||||
$('#display-settings-status').expectOne());
|
$('#display-settings-status').expectOne());
|
||||||
},
|
},
|
||||||
error: function (xhr, error_type, xhn) {
|
error: function (xhr, error_type, xhn) {
|
||||||
ui.report_error("Error updating display settings", xhr, $('#display-settings-status').expectOne());
|
ui.report_error(i18n.t("Error updating display settings"), xhr, $('#display-settings-status').expectOne());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -400,7 +400,7 @@ function _setup_page() {
|
|||||||
$('#display-settings-status').expectOne());
|
$('#display-settings-status').expectOne());
|
||||||
},
|
},
|
||||||
error: function (xhr, error_type, xhn) {
|
error: function (xhr, error_type, xhn) {
|
||||||
ui.report_error("Error updating display settings", xhr, $('#display-settings-status').expectOne());
|
ui.report_error(i18n.t(i18n.t("Error updating display settings")), xhr, $('#display-settings-status').expectOne());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -422,7 +422,7 @@ function _setup_page() {
|
|||||||
settings_status.hide();
|
settings_status.hide();
|
||||||
},
|
},
|
||||||
error: function (xhr, error_type, xhn) {
|
error: function (xhr, error_type, xhn) {
|
||||||
ui.report_error("Error getting API key", xhr, $('#settings-status').expectOne());
|
ui.report_error(i18n.t("Error getting API key"), xhr, $('#settings-status').expectOne());
|
||||||
$("#show_api_key_box").hide();
|
$("#show_api_key_box").hide();
|
||||||
$("#get_api_key_box").show();
|
$("#get_api_key_box").show();
|
||||||
}
|
}
|
||||||
@@ -673,7 +673,7 @@ function _setup_page() {
|
|||||||
ui.report_success(message, ui_settings_status);
|
ui.report_success(message, ui_settings_status);
|
||||||
},
|
},
|
||||||
error: function (xhr, error_type, xhn) {
|
error: function (xhr, error_type, xhn) {
|
||||||
ui.report_error("Error changing settings", xhr, $('#ui-settings-status').expectOne());
|
ui.report_error(i18n.t("Error changing settings"), xhr, $('#ui-settings-status').expectOne());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -494,7 +494,7 @@ exports.setup_page = function () {
|
|||||||
|
|
||||||
function failed_listing(xhr, error) {
|
function failed_listing(xhr, error) {
|
||||||
loading.destroy_indicator($('#subs_page_loading_indicator'));
|
loading.destroy_indicator($('#subs_page_loading_indicator'));
|
||||||
ui.report_error("Error listing streams or subscriptions", xhr,
|
ui.report_error(i18n.t("Error listing streams or subscriptions"), xhr,
|
||||||
$("#subscriptions-status"), 'subscriptions-status');
|
$("#subscriptions-status"), 'subscriptions-status');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -570,7 +570,7 @@ function ajaxSubscribe(stream) {
|
|||||||
// The rest of the work is done via the subscribe event we will get
|
// The rest of the work is done via the subscribe event we will get
|
||||||
},
|
},
|
||||||
error: function (xhr) {
|
error: function (xhr) {
|
||||||
ui.report_error("Error adding subscription", xhr,
|
ui.report_error(i18n.t("Error adding subscription"), xhr,
|
||||||
$("#subscriptions-status"), 'subscriptions-status');
|
$("#subscriptions-status"), 'subscriptions-status');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -586,7 +586,7 @@ function ajaxUnsubscribe(stream) {
|
|||||||
// The rest of the work is done via the unsubscribe event we will get
|
// The rest of the work is done via the unsubscribe event we will get
|
||||||
},
|
},
|
||||||
error: function (xhr) {
|
error: function (xhr) {
|
||||||
ui.report_error("Error removing subscription", xhr,
|
ui.report_error(i18n.t("Error removing subscription"), xhr,
|
||||||
$("#subscriptions-status"), 'subscriptions-status');
|
$("#subscriptions-status"), 'subscriptions-status');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -608,7 +608,7 @@ function ajaxSubscribeForCreation(stream, principals, invite_only, announce) {
|
|||||||
// The rest of the work is done via the subscribe event we will get
|
// The rest of the work is done via the subscribe event we will get
|
||||||
},
|
},
|
||||||
error: function (xhr) {
|
error: function (xhr) {
|
||||||
ui.report_error("Error creating stream", xhr,
|
ui.report_error(i18n.t("Error creating stream"), xhr,
|
||||||
$("#subscriptions-status"), 'subscriptions-status');
|
$("#subscriptions-status"), 'subscriptions-status');
|
||||||
$('#stream-creation').modal("hide");
|
$('#stream-creation').modal("hide");
|
||||||
}
|
}
|
||||||
@@ -974,7 +974,7 @@ $(function () {
|
|||||||
'subscriptions-status');
|
'subscriptions-status');
|
||||||
},
|
},
|
||||||
error: function (xhr) {
|
error: function (xhr) {
|
||||||
ui.report_error("Error renaming stream", xhr,
|
ui.report_error(i18n.t("Error renaming stream"), xhr,
|
||||||
$("#subscriptions-status"), 'subscriptions-status');
|
$("#subscriptions-status"), 'subscriptions-status');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1001,7 +1001,7 @@ $(function () {
|
|||||||
$("#subscriptions-status"), 'subscriptions-status');
|
$("#subscriptions-status"), 'subscriptions-status');
|
||||||
},
|
},
|
||||||
error: function (xhr) {
|
error: function (xhr) {
|
||||||
ui.report_error("Error updating the stream description", xhr,
|
ui.report_error(i18n.t("Error updating the stream description"), xhr,
|
||||||
$("#subscriptions-status"), 'subscriptions-status');
|
$("#subscriptions-status"), 'subscriptions-status');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user