[Kimchi-devel] [PATCH v4 3/3] repository: Remove error message prefix

Crístian Viana vianac at linux.vnet.ibm.com
Thu Aug 7 16:03:44 UTC 2014


If an error occurs when a repository is added or updated, the error
message has a prefix ("Failed.") which does not look good and does not
exist in other error messages.

Remove the message prefix and display only the reason which caused
the error.

Signed-off-by: Crístian Viana <vianac at linux.vnet.ibm.com>
---
 ui/js/src/kimchi.repository_add_main.js  | 3 +--
 ui/js/src/kimchi.repository_edit_main.js | 3 +--
 ui/pages/i18n.json.tmpl                  | 1 -
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/ui/js/src/kimchi.repository_add_main.js b/ui/js/src/kimchi.repository_add_main.js
index 628c99f..d0e1121 100644
--- a/ui/js/src/kimchi.repository_add_main.js
+++ b/ui/js/src/kimchi.repository_add_main.js
@@ -90,8 +90,7 @@ kimchi.repository_add_main = function() {
             var reason = jqXHR &&
                 jqXHR['responseJSON'] &&
                 jqXHR['responseJSON']['reason'];
-            reason = reason ? ': ' + reason : '';
-            kimchi.message.error(i18n['KCHREPO6015M'] + reason);
+            kimchi.message.error(reason);
         });
         return false;
     };
diff --git a/ui/js/src/kimchi.repository_edit_main.js b/ui/js/src/kimchi.repository_edit_main.js
index 17736f6..20340a4 100644
--- a/ui/js/src/kimchi.repository_edit_main.js
+++ b/ui/js/src/kimchi.repository_edit_main.js
@@ -63,8 +63,7 @@ kimchi.repository_edit_main = function() {
             var reason = jqXHR &&
                 jqXHR['responseJSON'] &&
                 jqXHR['responseJSON']['reason'];
-            reason = reason ? ': ' + reason : '';
-            kimchi.message.error(i18n['KCHREPO6015M'] + reason);
+            kimchi.message.error(reason);
         });
 
         return false;
diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl
index 4bc88b8..f1478a7 100644
--- a/ui/pages/i18n.json.tmpl
+++ b/ui/pages/i18n.json.tmpl
@@ -88,7 +88,6 @@
     "KCHREPO6012M": "$_("Add")",
     "KCHREPO6013M": "$_("Edit")",
     "KCHREPO6014M": "$_("Remove")",
-    "KCHREPO6015M": "$_("Failed.")",
     "KCHREPO6016M": "$_("Enable")",
     "KCHREPO6017M": "$_("Disable")",
 
-- 
1.9.3




More information about the Kimchi-devel mailing list