[extensions-web] js: Port error messages over to mustache



commit 7ecaf720e6abc71e283d50e7b0219e4d347627b7
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Mar 30 18:30:31 2012 -0400

    js: Port error messages over to mustache

 sweettooth/static/js/extensions.js                 |    9 +++------
 .../templates/messages/cannot_list_errors.mustache |    1 +
 .../templates/messages/cannot_list_local.mustache  |    1 +
 .../js/templates/messages/dummy_proxy.mustache     |    1 +
 sweettooth/static/js/templates/templatedata.js     |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/sweettooth/static/js/extensions.js b/sweettooth/static/js/extensions.js
index a8c853d..c2f702b 100644
--- a/sweettooth/static/js/extensions.js
+++ b/sweettooth/static/js/extensions.js
@@ -36,10 +36,7 @@ function($, messages, dbusProxy, extensionUtils, templates) {
     if (dbusProxy.IsDummy) {
         // We don't have a proper DBus proxy -- it's probably an old
         // version of GNOME3 or the Shell.
-        messages.addError("You do not appear to have an up to date version " +
-                          "of GNOME3. You won't be able to install extensions " +
-                          "from here. See the <a href=\"/about/#old-version\">about page</a> " +
-                          "for more information");
+        messages.addError(templates.messages.dummy_proxy());
 
         $.fn.addExtensionSwitch = function() {
             // Don't show our switches -- CSS styles define a clickable
@@ -48,13 +45,13 @@ function($, messages, dbusProxy, extensionUtils, templates) {
         };
 
         $.fn.addLocalExtensions = function() {
-            return this.append("GNOME Shell Extensions cannot list your installed extensions.");
+            return this.append(templates.messages.cannot_list_local());
         };
 
         $.fn.fillInErrors = function() {
             var $textarea = this.find('textarea[name=error]');
             var $hidden = this.find('input:hidden[name=has_errors]');
-            $textarea.text("GNOME Shell Extensions cannot automatically detect any errors.").
+            $textarea.text(templates.messages.cannot_list_errors()).
                 addClass('no-errors').attr('disabled', 'disabled');
             $hidden.val('');
             return this;
diff --git a/sweettooth/static/js/templates/messages/cannot_list_errors.mustache b/sweettooth/static/js/templates/messages/cannot_list_errors.mustache
new file mode 100644
index 0000000..d511a5f
--- /dev/null
+++ b/sweettooth/static/js/templates/messages/cannot_list_errors.mustache
@@ -0,0 +1 @@
+GNOME Shell Extensions cannot automatically detect any errors.
diff --git a/sweettooth/static/js/templates/messages/cannot_list_local.mustache b/sweettooth/static/js/templates/messages/cannot_list_local.mustache
new file mode 100644
index 0000000..39db889
--- /dev/null
+++ b/sweettooth/static/js/templates/messages/cannot_list_local.mustache
@@ -0,0 +1 @@
+GNOME Shell Extensions cannot list your installed extensions.
diff --git a/sweettooth/static/js/templates/messages/dummy_proxy.mustache b/sweettooth/static/js/templates/messages/dummy_proxy.mustache
new file mode 100644
index 0000000..b6efed4
--- /dev/null
+++ b/sweettooth/static/js/templates/messages/dummy_proxy.mustache
@@ -0,0 +1 @@
+You do not appear to have an up to date version of GNOME3. You won't be able to install extensions from here. See the <a href="about/#old-version">about page</a> for more information.
diff --git a/sweettooth/static/js/templates/templatedata.js b/sweettooth/static/js/templates/templatedata.js
index 792e88d..d86ba0d 100644
--- a/sweettooth/static/js/templates/templatedata.js
+++ b/sweettooth/static/js/templates/templatedata.js
@@ -1,4 +1,4 @@
 
 "use strict";
 
-define({"paginator": {"loading_page": "<div class=\"loading-page\">\n  Loading page... please wait.\n</div>"}, "upgrade": {"need_upgrade": "You have version {{current_version}} of \"{{extension_name}}\". The latest version is version {{latest_version}}. Click here to upgrade.", "latest_version": "You have the latest version of {{extension_name}}."}});
+define({"paginator": {"loading_page": "<div class=\"loading-page\">\n  Loading page... please wait.\n</div>"}, "messages": {"cannot_list_errors": "GNOME Shell Extensions cannot automatically detect any errors.", "cannot_list_local": "GNOME Shell Extensions cannot list your installed extensions.", "dummy_proxy": "You do not appear to have an up to date version of GNOME3. You won't be able to install extensions from here. See the <a href=\"about/#old-version\">about page</a> for more information."}, "upgrade": {"need_upgrade": "You have version {{current_version}} of \"{{extension_name}}\". The latest version is version {{latest_version}}. Click here to upgrade.", "latest_version": "You have the latest version of {{extension_name}}."}, "extensions": {}});



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]