Expand the message bundle system to be able to locate the bundle for a requested language

Description

The current system requires a user to pass in the location of the specific message bundles that are to be used by the prefsEditor, panels, and etc. However to support a language adjuster for the First Discovery Tool http://issues.fluidproject.org/browse/FLOE-281 we'll need a system that is more robust.

Instead a user should pass in a reference to the base name of message bundle, from there the system will go through an algorithm trying to locate the correct bundle and falling back to a default one if the desired langauge is not located.

e.g.

fr-ca is requested.

will look in this order for the message bundle fr-ca -> fr -> en (default)

Additionally the prefsEditor will need to take in a default language as an option, so that we'll know what to fall back to. However, the current language setting will first look into a model value (so that this can be part of a store preference) to set the components language.

Environment

None

Activity

Justin ObaraJune 26, 2015 at 1:51 PM

Reopening to change the fix version to 1.9

Antranig BasmanMay 7, 2015 at 2:44 PM

Merged into trunk at revision 76c6189 , incorporating fixes to FluidRequests.js as well as the prefs framework

Cindy LiMay 4, 2015 at 7:17 PM

Merged Antranig's pull request (https://github.com/fluid-project/infusion/pull/596) for implementing the localised resource fetcher into the master branch @ 735a2f084bc72cc71338a5856cfae49268374e56

Issued another pull reqeust (735a2f084bc72cc71338a5856cfae49268374e58) to upgrade the prefs framework to fetch localized message bundles.

Justin ObaraFebruary 25, 2015 at 6:02 PM

The reference to the JAVA naming scheme for resource bundle fallback based on language
http://docs.oracle.com/javase/7/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String,%20java.util.Locale,%20java.lang.ClassLoader)

Implementing this as far as baseName_language_country would be good enough for now

See today's channel conversation with Bosmon7
https://botbot.me/freenode/fluid-work/2015-02-25/?tz=America/Toronto

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created February 25, 2015 at 3:44 PM
Updated March 22, 2016 at 3:03 PM
Resolved June 26, 2015 at 2:18 PM