You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/03/21 12:10:38 UTC

[jira] [Commented] (ISIS-1104) Remove some of the chattiness in the log if there are no translations for a given locale

    [ https://issues.apache.org/jira/browse/ISIS-1104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14372678#comment-14372678 ] 

ASF subversion and git services commented on ISIS-1104:
-------------------------------------------------------

Commit c3ed13d2bbf68f305f84f1b227a7865a0e6aa881 in isis's branch refs/heads/master from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=c3ed13d ]

ISIS-1104: change to PoReader so that does not log WARN if there are no translations for specified locale.

in addition:
- don't contribute actions or associations to value types such as java.lang.String (were appearing in translations)
- marked certain methods of FixtureScript and TranslatableString as @Programmatic so that they don't turn up in translations
- updated translations.po for simpleapp
- partial translations for ES, NL for simpleapp


> 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, ie "WEB-INF/translations.po").
> 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 translations are used.
> 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 the fallback is being used then suppress log WARN messages
> - otherwise preserve current behaviour.
> This means that:
> - systems that do care about i18n requirements for a specific locale (language/country) should include a WEB-INF/translations_XX_yy.po (or just WEB-INF/translations_XX.po)
> - those that don't should simply omit it.
> - there is no need to fully translate the translations.po file
> There was a WARN message if the fallback (transltions.po) file was missing; this is now a simple INFO message instead, the new interpretation being that having no translations.po file is basically the same as having one that has no translations in it.



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