Dan Haywood created ISIS-1104:
---------------------------------

             Summary: Remove some of the chattiness in the log if there are no 
translations for a given locale
                 Key: ISIS-1104
                 URL: https://issues.apache.org/jira/browse/ISIS-1104
             Project: Isis
          Issue Type: Improvement
          Components: Core
    Affects Versions: core-1.8.0
            Reporter: Dan Haywood
            Assignee: Dan Haywood
            Priority: Minor
             Fix For: 1.9.0


Currently if no translation can be found for a given locale then the system 
generates a lot of WARN messages.

But for some systems i18n may not be important at all.  And for others, we only 
really want a warning for one of the languages we care to support, and not for 
others (they can use the fallback).

This ticket is to remove the WARN logging in these cases.

~~~
Looking at the implementation, I now see/recall that we have an algorithm (cf 
ResourceBundles and others) that goes searching for the translation file for a 
given locale; and if none are found then the fallback is returned.

So, the warning is logged if there IS a fallback and it doesn't have a 
translation for a given msgId.

Therefore the fix I'm going with is:
- if no WEB-INF/translations.po ("fallback") file exists then suppress log WARN 
messages
- otherwise preserve current behaviour.

This means that:
- systems that do care about i18n requirements should include a 
WEB-INF/translations.po with translations in WEB-INF
- those that don't should simply omit it.

There was a WARN message if the fallback (transltions.po) file was missing; 
this is now a simple INFO message instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to