Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-921

When using XWikiDocuments as resource bundles, no default value is used

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0 B4
    • Fix Version/s: 1.3.1, 1.4 M1
    • Component/s: Localization
    • Labels:
      None
    • Tests:
      Unit
    • Similar issues:

      Description

      For filesystem resource bundles, there is a hierarchy defined among the different files, like a string is first searchd in bundle_lang_COUNTRY_ENC.properties, then in bundle_lang_COUNTRY.properties, then in bundle_lang.properties, and finally in bundle.properties. For XWikiDocuments, there is no encoding or country field, but at least we could inherit properties from the default language.

      To be more specific: if a resource is requested in a language, which is not the default language of the document, then first search in the translated document, and if the string is not found in there, look also in the default version of the document.

      This ensures that at least an english (or whatever the default language is) version of the key is retrieved, and not an ugly key string.

        Attachments

          Activity

            People

            • Assignee:
              ludovic Ludovic Dubost
              Reporter:
              sdumitriu Sergiu Dumitriu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: