You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/07/08 20:33:59 UTC

[2/5] git commit: updated refs/heads/4.2 to 39d68b4

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/33c144a4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/33c144a4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/33c144a4

Branch: refs/heads/4.2
Commit: 33c144a463090f0ab053023c61cc036ae62cca1d
Parents: f239136
Author: Brian Federle <br...@citrix.com>
Authored: Tue Jul 2 11:58:57 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Jul 8 11:33:28 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/33c144a4/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/33c144a4/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/33c144a4/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/33c144a4/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: {