mirror of https://github.com/apache/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
This commit is contained in:
parent
a2123c92c8
commit
8e2309ee39
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue