The hard-coded 'undo' and 'undo all' labels have been moved into
internal.py to allow translation.

Ticket #1897

--
Endi S. Dewata
From 78b2f9f53aa524a3e95977d66f4d999a3787fa2b Mon Sep 17 00:00:00 2001
From: Endi S. Dewata <edew...@redhat.com>
Date: Fri, 30 Sep 2011 11:49:00 -0500
Subject: [PATCH] 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 96339a8490c96ece4a9ebb7ff50906a98fe453e6..292e80df2f343927da3cac14cfdde4e3bc6e500d 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 be8df4fb9986ff28a6a47187ee9831d431d12595..f46d79e72309ce367a7f0b3f1fb1f974871ca402 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 b87fa27a38785f9a8034dafafd02f3ddda900173..ce6f2548965846eb1f28ccf1814902958b4f5a26 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"),
-- 
1.7.5.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to