Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-25919

Persist translations list and implement custom locale resolver

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: QualifiedToSchedule
    • Component/s: Web UI

      Description

      Implement the solution propose in TL-285:

      1. persisting the list of supported locales on Web UI’s contribution to the configuration service, as well as the default locale
      2. load this data on index.jsp into Web UI’s global config object (TL-287, NXP-25512), let’s say into Nuxeo.UI.config.locales = ['en', 'fr', 'pt-PT', 'pt-BR', ...] and Nuxeo.UI.config.defaultLocale = 'en'
      3. introducing a new locale resolver that would read the locale list from global config

      The resolver will receive the target locale and the locale list, and know what language to load. The loading strategy consists of:
      1. Check if the selected locale exists as is in the locale list
      2. If not, split by - the target locale, with format <language-code>-<country-code>, as a means to separate the language from the country code
      3. use the language-code to find a list of locales for the given country-code
      4. if none is found, select the first for that language-code, by order
      5. if no entry was found to the language-code, select the default locale or, it not defined, en.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                gbarata Gabriel Barata
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: