summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-08-31 14:47:03 -0500
committerEndi S. Dewata <edewata@redhat.com>2011-09-01 14:12:57 +0000
commite68fc9069d6053825e1510a938cf2ff57fdca257 (patch)
treee627e34e6c7efe74cd7f33fda67f6631339e08f5
parenta85dfd64bd18635d1bbe3cfb081d5ea1311c8d59 (diff)
downloadfreeipa-e68fc9069d6053825e1510a938cf2ff57fdca257.zip
freeipa-e68fc9069d6053825e1510a938cf2ff57fdca257.tar.gz
freeipa-e68fc9069d6053825e1510a938cf2ff57fdca257.tar.xz
Fixed hard-coded UI message in entity.js.
The hard-coded label in IPA.facet has been moved into internal.py to allow translation. Ticket #1701
-rw-r--r--install/ui/entity.js14
-rw-r--r--install/ui/test/data/ipa_init.json1
-rw-r--r--ipalib/plugins/internal.py1
3 files changed, 8 insertions, 8 deletions
diff --git a/install/ui/entity.js b/install/ui/entity.js
index bba51f7..8b05d47 100644
--- a/install/ui/entity.js
+++ b/install/ui/entity.js
@@ -117,14 +117,12 @@ IPA.facet = function (spec) {
return false;
};
- that.get_content = function() {
- return $('.content', that.container);
- };
-
- that.report_error = function(error_thrown){
- var details = $('.details', that.container).empty();
- details.append('<p>Error: '+error_thrown.name+'</p>');
- details.append('<p>'+error_thrown.message+'</p>');
+ that.report_error = function(error_thrown) {
+ // TODO: The error message should be displayed in the facet footer.
+ // There should be a standard footer section for all facets.
+ that.content.empty();
+ that.content.append('<p>'+IPA.get_message('errors.error', 'Error')+': '+error_thrown.name+'</p>');
+ that.content.append('<p>'+error_thrown.message+'</p>');
};
that.redirect = function() {
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index 3de974e..bd89f5e 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -15994,6 +15994,7 @@
"validation_title": "Validation error"
},
"errors": {
+ "error": "Error",
"http_error": "HTTP Error",
"internal_error": "Internal Error",
"ipa_error": "IPA Error",
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index f5f5773..b87fa27 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -173,6 +173,7 @@ class i18n_messages(Command):
"validation_message": _("Input form contains invalid or missing values."),
},
"errors": {
+ "error": _("Error"),
"http_error": _("HTTP Error"),
"internal_error": _("Internal Error"),
"ipa_error": _("IPA Error"),