]> source.dussan.org Git - archiva.git/commitdiff
avoid noise for asked locale en as it is default
authorOlivier Lamy <olamy@apache.org>
Mon, 9 Jan 2012 09:09:35 +0000 (09:09 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 9 Jan 2012 09:09:35 +0000 (09:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1229065 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java

index 2400e0ce49fe20d4a976ef0b6622a09bd949e066..2be8870213c2715f3358db5c8cf0379f733a6532 100644 (file)
@@ -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