From 8e2309ee394485d276bef07a08761feb43cf46f1 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 9 Jan 2012 09:09:35 +0000 Subject: 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 --- .../apache/archiva/rest/services/DefaultCommonServices.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 -- cgit v1.2.3