]> source.dussan.org Git - archiva.git/commitdiff
use i18n for welcome badge
authorOlivier Lamy <olamy@apache.org>
Sat, 29 Dec 2012 21:07:44 +0000 (21:07 +0000)
committerOlivier Lamy <olamy@apache.org>
Sat, 29 Dec 2012 21:07:44 +0000 (21:07 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1426834 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/archiva.js
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/user.js

index 35b0ecdc41719ba2c03b8929696ccfb2bb3d96a1..d6b036c944e035497eda8445db2ac4ef8ff95fa1 100644 (file)
@@ -245,6 +245,7 @@ user.delete.message=The following user {0} will be deleted
 password.reset=Reset Password
 password.reset.success=Password reset.
 rememberme=Remember Me
+user.login.welcome=Welcome {0}
 
 #roles management
 roles.management.header=Roles Management
index 6c3bd992abcd388de62629e46dbc6a71acb28ebd..4bfb95e5c9841c7389f585b1e1563a65692cdd9c 100644 (file)
@@ -42,86 +42,86 @@ $.ajax({
     cache: false,
     success:function(data){
 
-        window.archivaDevMode=data.devMode;
-        window.archivaJavascriptLog=data.javascriptLog;
-        window.archivaRuntimeInfo=data;
+      window.archivaDevMode=data.devMode;
+      window.archivaJavascriptLog=data.javascriptLog;
+      window.archivaRuntimeInfo=data;
 
-            requirejs.config({
-                baseUrl: "js/",
-                urlArgs: ""+appendJsNoCacheUrl(),
-                shim: {
-                      'sammy':['jquery','jquery.tmpl'],
-                      'archiva.main':['jquery','jquery.ui','sammy','jquery.tmpl','utils','i18n'],
-                      'utils':['jquery','jquery.tmpl','i18n'],
-                      'archiva.templates': ['jquery','jquery.tmpl','utils'],
-                      'redback.templates': ['jquery','jquery.tmpl','utils']
-                      },
-                paths: {
-                    "i18n":"jquery.i18n.properties-1.0.9",
-                    "jquery": "jquery-1.8.3.min",
-                    "jquery.tmpl": "jquery.tmpl",
-                    "utils": "archiva/utils",
-                    "startup": "archiva/startup",
-                    "jquery.ui": "jquery-ui-1.9.2.custom.min",
-                    "jquery.ui.widget": "jquery.ui.widget-1.9.2",
-                    "jquery.cookie": "jquery.cookie.1.0.0",
-                    "bootstrap": "bootstrap.2.2.1",
-                    "jquery.validate": "jquery.validate-1.9.0",
-                    "jquery.json": "jquery.json-2.3.min",
-                    "knockout": "knockout-2.2.0.debug",
-                    "knockout.simpleGrid": "knockout.simpleGrid",
-                    "knockout.sortable": "knockout-sortable",
-                    "jquery.iframe.transport": "jquery.iframe-transport-1.4",
-                    "jquery.fileupload": "jquery.fileupload-5.10.0",
-                    "jquery.fileupload.ip":"jquery.fileupload-ip-1.0.6",
-                    "jquery.fileupload.ui":"jquery.fileupload-ui-6.6.3",
-                    "tmpl": "tmpl.min",
-                    "purl": "purl-2.2.1",
-                    "prettify": "prettify",
-                    "sammy": "sammy.0.7.1",
-                    "select2": "select2.min-3.2",
-                    "jqueryFileTree": "jqueryFileTree-1.0.1",
-                    "redback": "redback/redback",
-                    "redback.roles": "redback/roles",
-                    "redback.user": "redback/user",
-                    "redback.users": "redback/users",
-                    "redback.templates": "redback/redback-tmpl",
-                    "archiva.general-admin":"archiva/general-admin",
-                    "archiva.templates": "archiva/main-tmpl",
-                    "archiva.repositories": "archiva/repositories",
-                    "archiva.network-proxies": "archiva/network-proxies",
-                    "archiva.proxy-connectors": "archiva/proxy-connectors",
-                    "archiva.repository-groups": "archiva/repository-groups",
-                    "archiva.artifacts-management": "archiva/artifacts-management",
-                    "archiva.search": "archiva/search",
-                    "archiva.proxy-connectors-rules": "archiva/proxy-connectors-rules",
-                    "archiva.docs": "archiva/docs",
-                    "archiva.main": "archiva/main"
-                }
-            });
+      requirejs.config({
+          baseUrl: "js/",
+          urlArgs: ""+appendJsNoCacheUrl(),
+          shim: {
+                'sammy':['jquery','jquery.tmpl'],
+                'archiva.main':['jquery','jquery.ui','sammy','jquery.tmpl','utils','i18n'],
+                'utils':['jquery','jquery.tmpl','i18n'],
+                'archiva.templates': ['jquery','jquery.tmpl','utils'],
+                'redback.templates': ['jquery','jquery.tmpl','utils']
+                },
+          paths: {
+              "i18n":"jquery.i18n.properties-1.0.9",
+              "jquery": "jquery-1.8.3.min",
+              "jquery.tmpl": "jquery.tmpl",
+              "utils": "archiva/utils",
+              "startup": "archiva/startup",
+              "jquery.ui": "jquery-ui-1.9.2.custom.min",
+              "jquery.ui.widget": "jquery.ui.widget-1.9.2",
+              "jquery.cookie": "jquery.cookie.1.0.0",
+              "bootstrap": "bootstrap.2.2.1",
+              "jquery.validate": "jquery.validate-1.9.0",
+              "jquery.json": "jquery.json-2.3.min",
+              "knockout": "knockout-2.2.0.debug",
+              "knockout.simpleGrid": "knockout.simpleGrid",
+              "knockout.sortable": "knockout-sortable",
+              "jquery.iframe.transport": "jquery.iframe-transport-1.4",
+              "jquery.fileupload": "jquery.fileupload-5.10.0",
+              "jquery.fileupload.ip":"jquery.fileupload-ip-1.0.6",
+              "jquery.fileupload.ui":"jquery.fileupload-ui-6.6.3",
+              "tmpl": "tmpl.min",
+              "purl": "purl-2.2.1",
+              "prettify": "prettify",
+              "sammy": "sammy.0.7.1",
+              "select2": "select2.min-3.2",
+              "jqueryFileTree": "jqueryFileTree-1.0.1",
+              "redback": "redback/redback",
+              "redback.roles": "redback/roles",
+              "redback.user": "redback/user",
+              "redback.users": "redback/users",
+              "redback.templates": "redback/redback-tmpl",
+              "archiva.general-admin":"archiva/general-admin",
+              "archiva.templates": "archiva/main-tmpl",
+              "archiva.repositories": "archiva/repositories",
+              "archiva.network-proxies": "archiva/network-proxies",
+              "archiva.proxy-connectors": "archiva/proxy-connectors",
+              "archiva.repository-groups": "archiva/repository-groups",
+              "archiva.artifacts-management": "archiva/artifacts-management",
+              "archiva.search": "archiva/search",
+              "archiva.proxy-connectors-rules": "archiva/proxy-connectors-rules",
+              "archiva.docs": "archiva/docs",
+              "archiva.main": "archiva/main"
+          }
+      });
 
-                requirejs(['jquery','jquery.tmpl','jquery.ui','i18n','sammy','startup','utils','domReady!','archiva.main','archiva.general-admin'], function () {
-                  loadi18n(function () {
-                    $.ajax({
-                      url: "restServices/archivaUiServices/runtimeInfoService/archivaRuntimeInfo/"+usedLang(),
-                      dataType: 'json',
-                      success:function(data){
-                        window.archivaDevMode=data.devMode;
-                        window.archivaJavascriptLog=data.javascriptLog;
-                        window.archivaRuntimeInfo=data;
+      requirejs(['jquery','jquery.tmpl','jquery.ui','i18n','sammy','startup','utils','domReady!','archiva.main','archiva.general-admin'], function () {
+        loadi18n(function () {
+          $.ajax({
+            url: "restServices/archivaUiServices/runtimeInfoService/archivaRuntimeInfo/"+usedLang(),
+            dataType: 'json',
+            success:function(data){
+              window.archivaDevMode=data.devMode;
+              window.archivaJavascriptLog=data.javascriptLog;
+              window.archivaRuntimeInfo=data;
 
-                        window.redbackRuntimeConfiguration=mapRedbackRuntimeConfiguration(data.redbackRuntimeConfiguration);
+              window.redbackRuntimeConfiguration=mapRedbackRuntimeConfiguration(data.redbackRuntimeConfiguration);
 
-                        $.log("security.rememberme.enabled key value:"+ window.redbackRuntimeConfiguration.findPropertyValue('security.rememberme.enabled'));
+              $.log("security.rememberme.enabled key value:"+ window.redbackRuntimeConfiguration.findPropertyValue('security.rememberme.enabled'));
 
-                        require(['sammy','jquery','i18n','jquery.tmpl','archiva.main','utils','domReady!'],function () {
-                            startArchivaApplication();
-                            $("#loadingDiv").hide();
-                            drawQuickSearchAutocomplete();
-                        })
-                      }
-                    })
-                  });
-                })
+              require(['sammy','jquery','i18n','jquery.tmpl','archiva.main','utils','domReady!'],function () {
+                  startArchivaApplication();
+                  $("#loadingDiv").hide();
+                  drawQuickSearchAutocomplete();
+              })
+            }
+          })
+        });
+      });
     }
 });
index 732a8eb8038a9bad7dba983f90016b303672df63..630d9e9f0991961031caaae85aef793ddbbd7206 100644 (file)
@@ -446,7 +446,7 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,purl) {
       clearForm("#user-login-form");
       decorateMenuWithKarma(user);
       $("#login-welcome" ).show();
-      $("#welcome-label" ).html("Welcome " + user.username());
+      $("#welcome-label" ).html( $.i18n.prop("user.login.welcome",user.username()));
       return;
     }
     var modalLoginErrMsg=$("#modal-login-err-message");