Hi Mark,
I'm setting up a XWiki 7.4 site with a pt_BR localization and am updating empty translations as I go along according to our use cases. In the process I've run into a couple of problems.
Firstly, on the Blog Archive panel, the months are being displayed in English. If I log into l10.xwiki.org and do a search for existing translation keys like the following: Original text: January Language: pt_BR Status: Not dead Other fields all blank the result returned has two keys, both of which are translated. How can I do the translation for the months in the blog panel? Note that if I switch the localization to another language such as fr, I see that the months are translated properly.
I can reproduce this. The month printed in the Blog.Archive page seems not to take the current locale into account. If one creates a test page with only the content: {{velocity}} #set($monthFormatter = $xwiki.jodatime.getDateTimeFormatterForPattern('MMMM')) #set($tempDate = $xwiki.jodatime.mutableDateTime) $monthFormatter.print($tempDate) {{/velocity}} and then viewing this page and appending "language=pt_BR" to the URL shows the month in English; however appending "language=pt" shows it in Portuguese. Extend the check: {{velocity}} #set($monthFormatter = $xwiki.jodatime.getDateTimeFormatterForPattern('MMMM')) #set($tempDate = $xwiki.jodatime.mutableDateTime) $monthFormatter.print($tempDate) Language: $xcontext.getContext().get('locale').getLanguage() / $xcontext.getContext().get('locale').getDisplayLanguage() Country: $xcontext.getContext().get('locale').getCountry() {{/velocity}} and one can see that for "language=pt" it correctly reports language as "pt / Portuguese" (and Country as empty) but for language=pt_BR one wrongly gets a language as "pt_br" (and no country). That is not looking good :( I can reproduce the issue with 6.4.7, so it is not a very recent thing. Interestingly only the "locale" object in the "context as map" is wrong, with the "$xcontext.getContext().getLocale()" everything works fine. So either the jodatime plugin uses a deprecated API with the context.get('locale') or the calculation in that context.get('locale') should be fixed. I guess I should know what is the case, but I have to admit I dont :(
Secondly, on the live tables on my soon to be production instance, the range phrase at the top of the live tables (such as the User Index) is showing up half English/half Portuguese as 'Results 1-10 out of 40 por página de 10'. If I switch the language to fr, the problem remains with the phrase showing up as 'Results 1-10 out of 40 par page de 10'. But if I set up a clean instance of XWiki, I see that the phrases are translated properly for both pt_BR and fr. Clearly, I've been futzing with something(s) that I should not have touched. Can anyone give me some pointers on how to diagnose the problem and restore the system to its proper behaviour?
That is a tough one; the actual translations are in the ApplicationResources_pt_BR.properties which is a file packages in one of the *.jar- files in the WEB-INF/lib directory (I think it is xwiki-platform-legacy-oldcore-7.4.jar) The translation keys are either platform.livetable.paginationResults=Resultados or: platform.livetable.paginationResultsMany=Resultados <span class\="currentResultsNo">{0} - {1}</span> de <span class\="totalResultsNo">{2}</span> it is possible that you have installed any extension that overwrites these keys? (You can try to search for "platform.livetable.paginationResults*" in the normal wiki search; do not forget to set "Display hidden documents" to try in you user preferences page) hope this helps a little Clemens