Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-2982

I18n does not load translation files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Resolved
    • 2.0.0-M7
    • 2.0.0-M8
    • Core
    • None

    Description

      PoReader does not check ALL translation candidates.

      In PoReader.readPoElseNull(final Locale locale)

      for (final String candidate : candidates) {
          final List<String> lines = readUrl(candidate);
          if(lines != null) {
              return lines;
          }
      } 

      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. 

      Attachments

        Activity

          People

            hobrom Andi Huber
            gyorfimi Miklós Győrfi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: