From cad55bf24418f687c15a22694260c5d1873b3eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Thu, 14 Mar 2013 23:03:13 +0100 Subject: [PATCH] extracted hard coded strings in the admin javascript files --- .../admin/controllers/admin_customize_controller.js | 6 +++--- .../admin/controllers/admin_flags_controller.js | 12 ++++++------ config/locales/client.en.yml | 2 ++ config/locales/client.fr.yml | 2 ++ 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/admin/controllers/admin_customize_controller.js b/app/assets/javascripts/admin/controllers/admin_customize_controller.js index ca5ad7f73..abf96904e 100644 --- a/app/assets/javascripts/admin/controllers/admin_customize_controller.js +++ b/app/assets/javascripts/admin/controllers/admin_customize_controller.js @@ -1,11 +1,11 @@ /** This controller supports interface for creating custom CSS skins in Discourse. - @class AdminCustomizeController + @class AdminCustomizeController @extends Ember.Controller @namespace Discourse @module Discourse -**/ +**/ Discourse.AdminCustomizeController = Ember.Controller.extend({ /** @@ -14,7 +14,7 @@ Discourse.AdminCustomizeController = Ember.Controller.extend({ @method newCustomization **/ newCustomization: function() { - var item = Discourse.SiteCustomization.create({name: 'New Style'}); + var item = Discourse.SiteCustomization.create({name: Em.String.i18n("admin.customize.new_style")}); this.get('content').pushObject(item); this.set('content.selectedItem', item); }, diff --git a/app/assets/javascripts/admin/controllers/admin_flags_controller.js b/app/assets/javascripts/admin/controllers/admin_flags_controller.js index 8663e3473..48d397336 100644 --- a/app/assets/javascripts/admin/controllers/admin_flags_controller.js +++ b/app/assets/javascripts/admin/controllers/admin_flags_controller.js @@ -1,13 +1,13 @@ /** This controller supports the interface for dealing with flags in the admin section. - @class AdminFlagsController + @class AdminFlagsController @extends Ember.Controller @namespace Discourse @module Discourse -**/ +**/ Discourse.AdminFlagsController = Ember.Controller.extend({ - + /** Clear all flags on a post @@ -19,7 +19,7 @@ Discourse.AdminFlagsController = Ember.Controller.extend({ item.clearFlags().then((function() { _this.content.removeObject(item); }), (function() { - bootbox.alert("something went wrong"); + bootbox.alert(Em.String.i18n("admin.flags.error")); })); }, @@ -34,7 +34,7 @@ Discourse.AdminFlagsController = Ember.Controller.extend({ item.deletePost().then((function() { _this.content.removeObject(item); }), (function() { - bootbox.alert("something went wrong"); + bootbox.alert(Em.String.i18n("admin.flags.error")); })); }, @@ -55,5 +55,5 @@ Discourse.AdminFlagsController = Ember.Controller.extend({ adminActiveFlagsView: (function() { return this.query === 'active'; }).property('query') - + }); diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index d599f2f29..0a1edfcac 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -708,6 +708,7 @@ en: delete: "Delete Post" delete_title: "delete post (if its the first post delete topic)" flagged_by: "Flagged by" + error: "Something went wrong" customize: title: "Customize" @@ -719,6 +720,7 @@ en: undo_preview: "undo preview" save: "Save" new: "New" + new_style: "New Style" delete: "Delete" delete_confirm: "Delete this customization?" diff --git a/config/locales/client.fr.yml b/config/locales/client.fr.yml index 8b8a29874..d05d6cdd8 100644 --- a/config/locales/client.fr.yml +++ b/config/locales/client.fr.yml @@ -712,6 +712,7 @@ fr: delete: "Supprimer le message" delete_title: "supprimer le message (va supprimer la discussion si c'est le premier message)" flagged_by: "Signalé par" + error: "Quelque chose s'est mal passé" customize: title: "Personnaliser" @@ -723,6 +724,7 @@ fr: undo_preview: "annuler la prévisualisation" save: "Sauvegarder" new: "Nouveau" + new_style: "Nouveau style" delete: "Supprimer" delete_confirm: "Supprimer cette personnalisation"