cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [12/50] [abbrv] git commit: updated refs/heads/vmsync to 78fa5e1
Date Wed, 03 Jul 2013 22:25:51 GMT
UI: Localize app name and 'about' window


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bd1ddee5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bd1ddee5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bd1ddee5

Branch: refs/heads/vmsync
Commit: bd1ddee557b52925167e26252bec309dea88d549
Parents: d660bc7
Author: Brian Federle <brian.federle@citrix.com>
Authored: Tue Jul 2 11:58:57 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Tue Jul 2 11:59:20 2013 -0700

----------------------------------------------------------------------
 client/WEB-INF/classes/resources/messages.properties | 3 +++
 ui/dictionary.jsp                                    | 3 +++
 ui/scripts/cloudStack.js                             | 4 ++--
 ui/scripts/ui/core.js                                | 8 ++++----
 4 files changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bd1ddee5/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index b1a09b1..fab8dbd 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -14,6 +14,9 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+label.about=About
+label.app.name=CloudStack
+label.about.app=About CloudStack
 label.custom.disk.iops=Custom IOPS
 label.disk.iops.min=Min IOPS
 label.disk.iops.max=Max IOPS

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bd1ddee5/ui/dictionary.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp
index af64228..748cc7d 100644
--- a/ui/dictionary.jsp
+++ b/ui/dictionary.jsp
@@ -25,6 +25,9 @@ under the License.
 <% long now = System.currentTimeMillis(); %>
 <script language="javascript">
 dictionary = {
+'label.about': '<fmt:message key="label.about" />',
+'label.about.app': '<fmt:message key="label.about.app" />',
+'label.app.name': '<fmt:message key="label.app.name" />',
 'label.custom.disk.iops': '<fmt:message key="label.custom.disk.iops" />',
 'label.disk.iops.min': '<fmt:message key="label.disk.iops.min" />',
 'label.disk.iops.max': '<fmt:message key="label.disk.iops.max" />',

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bd1ddee5/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index b06cf5c..739ac7e 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -475,8 +475,6 @@
         };
       }
     };
-		
-    document.title = 'CloudStack';
 
     if ($.urlParam('loginUrl') != 0
 		||(window.name != null && window.name.indexOf("&domain=") != -1)) {
@@ -490,5 +488,7 @@
     cloudStack.localizationFn = function(str) {
       return dictionary[str];
     };
+
+    document.title = _l('label.app.name');
   });
 })(cloudStack, jQuery);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bd1ddee5/ui/scripts/ui/core.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/core.js b/ui/scripts/ui/core.js
index de86e51..18c3363 100644
--- a/ui/scripts/ui/core.js
+++ b/ui/scripts/ui/core.js
@@ -275,7 +275,7 @@
     var $options = $('<div>').attr({ id: 'user-options' })
           .appendTo($('#header'));
     
-    $(['label.logout', 'label.help', 'About']).each(function() {
+    $(['label.logout', 'label.help', 'label.about']).each(function() {
       var $link = $('<a>')
             .attr({ href: '#' })
             .html(_l(this.toString()))
@@ -290,15 +290,15 @@
           return false;
         });
       }
-      if (this == 'About') {
+      if (this == 'label.about') {
         $link.click(function() {
-          var $logo = $('<div>').addClass('logo').html('CloudStack'),
+          var $logo = $('<div>').addClass('logo').html(_l('label.app.name')),
           $version = $('<div>').addClass('version').html(g_cloudstackversion),
           $about = $('<div>').addClass('about').append($logo).append($version);
           $about.dialog({
             modal: true,
             width: 300,
-            title: 'About CloudStack',
+            title: _l('label.about.app'),
             closeOnEscape: false,
             dialogClass: 'dialog-about',
             buttons: {


Mime
View raw message