FIX: use proper locale for user archive download alerts

This commit is contained in:
Arpit Jalan 2016-11-29 12:47:34 +05:30
parent b8dc58be90
commit 8a18c5be1f
4 changed files with 9 additions and 7 deletions

View File

@ -23,7 +23,7 @@ export default Ember.Controller.extend({
actions: { actions: {
exportUserArchive() { exportUserArchive() {
bootbox.confirm( bootbox.confirm(
I18n.t("user.download_archive_confirm"), I18n.t("user.download_archive.confirm"),
I18n.t("no_value"), I18n.t("no_value"),
I18n.t("yes_value"), I18n.t("yes_value"),
function(confirmed) { function(confirmed) {

View File

@ -8,9 +8,9 @@ function exportEntityByType(type, entity, args) {
export function exportUserArchive() { export function exportUserArchive() {
return exportEntityByType('user', 'user_archive').then(function() { return exportEntityByType('user', 'user_archive').then(function() {
bootbox.alert(I18n.t("admin.export_csv.success")); bootbox.alert(I18n.t("user.download_archive.success"));
}).catch(function() { }).catch(function() {
bootbox.alert(I18n.t("admin.export_csv.rate_limit_error")); bootbox.alert(I18n.t("user.download_archive.rate_limit_error"));
}); });
} }

View File

@ -28,7 +28,7 @@
{{#if viewingSelf}} {{#if viewingSelf}}
<div class='user-archive'> <div class='user-archive'>
{{d-button action="exportUserArchive" label="user.download_archive" icon="download"}} {{d-button action="exportUserArchive" label="user.download_archive.button_text" icon="download"}}
</div> </div>
{{/if}} {{/if}}
{{/d-section}} {{/d-section}}

View File

@ -487,8 +487,11 @@ en:
profile: "Profile" profile: "Profile"
mute: "Mute" mute: "Mute"
edit: "Edit Preferences" edit: "Edit Preferences"
download_archive: "Download My Posts" download_archive:
download_archive_confirm: "Are you sure you want to download your posts?" button_text: "Download My Posts"
confirm: "Are you sure you want to download your posts?"
success: "Download initiated, you will be notified via message when the process is complete."
rate_limit_error: "Posts can be downloaded once per day, please try again tomorrow."
new_private_message: "New Message" new_private_message: "New Message"
private_message: "Message" private_message: "Message"
private_messages: "Messages" private_messages: "Messages"
@ -2636,7 +2639,6 @@ en:
export_csv: export_csv:
success: "Export initiated, you will be notified via message when the process is complete." success: "Export initiated, you will be notified via message when the process is complete."
failed: "Export failed. Please check the logs." failed: "Export failed. Please check the logs."
rate_limit_error: "Posts can be downloaded once per day, please try again tomorrow."
button_text: "Export" button_text: "Export"
button_title: button_title:
user: "Export full user list in CSV format." user: "Export full user list in CSV format."