[
https://issues.apache.org/jira/browse/ISIS-2982?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Miklós Győrfi updated ISIS-2982:
--------------------------------
Description:
PoReader does not check ALL translation candidates.
In PoReader.readPoElseNull(final Locale locale)
{code:java}
for (final String candidate : candidates) {
final List<String> lines = readUrl(candidate);
if(lines != null) {
return lines;
}
} {code}
always returns at the first candidate, regardless of existing of the
file/resource, as readUrl never returns null, because readUrl is a stream
collect. I think it should carry on loading resources when lines == null ||
lines.size() == 0.
If I had translation_hu.po, it was the last candidate, it was never loaded.
was:
PoReader does not check ALL translation candidates.
In PoReader.readPoElseNull(final Locale locale)
{code:java}
for (final String candidate : candidates) {
final List<String> lines = readUrl(candidate);
if(lines != null) {
return lines;
}
} {code}
always returns at the first candidate, regardless of existing of the
file/resource, as readUrl never returns null, because readUrl is a stream
collect. I think it should carry on loading resources when lines == null |
lines.size() == 0.
If I had translation_hu.po, it was the last candidate, it was never loaded.
> I18n does not load translation files
> ------------------------------------
>
> Key: ISIS-2982
> URL: https://issues.apache.org/jira/browse/ISIS-2982
> Project: Isis
> Issue Type: Bug
> Affects Versions: 2.0.0-M7
> Reporter: Miklós Győrfi
> Priority: Major
>
> PoReader does not check ALL translation candidates.
> In PoReader.readPoElseNull(final Locale locale)
> {code:java}
> for (final String candidate : candidates) {
> final List<String> lines = readUrl(candidate);
> if(lines != null) {
> return lines;
> }
> } {code}
> always returns at the first candidate, regardless of existing of the
> file/resource, as readUrl never returns null, because readUrl is a stream
> collect. I think it should carry on loading resources when lines == null ||
> lines.size() == 0.
> If I had translation_hu.po, it was the last candidate, it was never loaded.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)