diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java index b768807fd..2400e0ce4 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java @@ -83,7 +83,7 @@ public class DefaultCommonServices } - private String fromProperties( Properties properties ) + private String fromProperties( final Properties properties ) { StringBuilder output = new StringBuilder(); @@ -96,17 +96,22 @@ public class DefaultCommonServices return output.toString(); } - private void loadResource( Properties properties, String resourceName ) + private void loadResource( final Properties finalProperties, String resourceName ) throws IOException { InputStream is = null; - + Properties properties = new Properties(); try { is = Thread.currentThread().getContextClassLoader().getResourceAsStream( resourceName.toString() ); if ( is != null ) { properties.load( is ); + finalProperties.putAll( properties ); + } + else + { + log.info( "cannot load resource {}", resourceName ); } } finally diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/i18nload.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/i18nload.js index b32097f07..ae9daaf13 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/i18nload.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/i18nload.js @@ -28,8 +28,8 @@ $(function() { $.log("use browserLang:"+browserLang); // -- archiva // load default - loadAndParseFile("restServices/archivaServices/commonServices/getAllI18nResources", {cache:false, mode: 'map',encoding:'utf-8'}); - if (browserLang!='en'){ - loadAndParseFile("restServices/archivaServices/commonServices/getAllI18nResources?locale="+browserLang, {cache:false, mode: 'map',encoding:'utf-8'}); - } + //loadAndParseFile("restServices/archivaServices/commonServices/getAllI18nResources", {cache:false, mode: 'map',encoding:'utf-8'}); + //if (browserLang!='en'){ + loadAndParseFile("restServices/archivaServices/commonServices/getAllI18nResources?locale="+browserLang, {cache:false, mode: 'map',encoding:'utf-8'}); + //} }); \ No newline at end of file