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
This commit is contained in:
Endi S. Dewata 2011-08-31 14:47:03 -05:00
parent 15cada3733
commit 6892d6e594
3 changed files with 8 additions and 8 deletions

View File

@ -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() {

View File

@ -15994,6 +15994,7 @@
"validation_title": "Validation error"
},
"errors": {
"error": "Error",
"http_error": "HTTP Error",
"internal_error": "Internal Error",
"ipa_error": "IPA Error",

View File

@ -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"),