From: Olivier Lamy Date: Mon, 9 Jan 2012 09:09:35 +0000 (+0000) Subject: avoid noise for asked locale en as it is default X-Git-Tag: archiva-1.4-M3~1624 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8e2309ee394485d276bef07a08761feb43cf46f1;p=archiva.git avoid noise for asked locale en as it is default git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1229065 13f79535-47bb-0310-9956-ffa450edef68 --- 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 2400e0ce4..2be887021 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 @@ -73,12 +73,13 @@ public class DefaultCommonServices throws IOException { // load default - loadResource( properties, new StringBuilder( resourceName ).append( ".properties" ).toString() ); + loadResource( properties, new StringBuilder( resourceName ).append( ".properties" ).toString(), locale ); // if locale override with locale content if ( StringUtils.isNotEmpty( locale ) ) { loadResource( properties, - new StringBuilder( resourceName ).append( "_" + locale ).append( ".properties" ).toString() ); + new StringBuilder( resourceName ).append( "_" + locale ).append( ".properties" ).toString(), + locale ); } } @@ -96,7 +97,7 @@ public class DefaultCommonServices return output.toString(); } - private void loadResource( final Properties finalProperties, String resourceName ) + private void loadResource( final Properties finalProperties, String resourceName, String locale ) throws IOException { InputStream is = null; @@ -111,7 +112,10 @@ public class DefaultCommonServices } else { - log.info( "cannot load resource {}", resourceName ); + if ( !StringUtils.equalsIgnoreCase( locale, "en" ) ) + { + log.info( "cannot load resource {}", resourceName ); + } } } finally