From 62817a4f7215b37130cd3b29c78581744bb033fd Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 30 Sep 2011 11:49:00 -0500 Subject: I18n clean-up. The hard-coded 'undo' and 'undo all' labels have been moved into internal.py to allow translation. Ticket #1897 --- install/ui/test/data/ipa_init.json | 2 ++ install/ui/widget.js | 4 ++-- ipalib/plugins/internal.py | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json index 96339a849..292e80df2 100644 --- a/install/ui/test/data/ipa_init.json +++ b/install/ui/test/data/ipa_init.json @@ -17054,6 +17054,8 @@ "optional": "Optional field: click to show", "page": "Page", "prev": "Prev", + "undo": "undo", + "undo_all": "undo all", "validation": { "error": "Text does not match field pattern", "integer": "Must be an integer", diff --git a/install/ui/widget.js b/install/ui/widget.js index a26f689d8..b25dc8f7f 100644 --- a/install/ui/widget.js +++ b/install/ui/widget.js @@ -305,7 +305,7 @@ IPA.widget = function(spec) { name: 'undo', style: 'display: none;', 'class': 'ui-state-highlight ui-corner-all undo', - html: 'undo' + html: IPA.messages.widget.undo }).appendTo(container); if(on_undo === undefined) { @@ -600,7 +600,7 @@ IPA.multivalued_text_widget = function(spec) { name: 'undo_all', style: 'display: none;', 'class': 'ui-state-highlight ui-corner-all undo', - html: 'undo all', + html: IPA.messages.widget.undo_all, click: function() { that.reset(); } diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py index b87fa27a3..ce6f25489 100644 --- a/ipalib/plugins/internal.py +++ b/ipalib/plugins/internal.py @@ -453,6 +453,8 @@ class i18n_messages(Command): "optional": _("Optional field: click to show"), "page": _("Page"), "prev": _("Prev"), + "undo": _("undo"), + "undo_all": _("undo all"), "validation": { "error": _("Text does not match field pattern"), "integer": _("Must be an integer"), -- cgit