Affects Version/s: None
Fix Version/s: None
If fluid.fetchResources is called with a resourceSpec entry which specifies a defaultLocale but not a locale, the defaultLocale is not used when attempting the fetch and fallback process.
On lines 70-74 of FluidRequests.js, the optional override defaultLocale is checked, and if locale is not present, the locale is also overridden. If the optional override is not present, however, there is no further check for setting the locale based on the defaultLocale.
The intention of the code seems to be as follows:
- a defaultLocale can be set on an individual resourceSpec entry and will be used if a locale is not also supplied
- a defaultLocale option can be passed to fluid.fetchResources and will override the defaultLocale of each resourceSpec
The first does not take place; this issue is obscured in the tests (FluidRequestsTests.js) because of lines 176-178:
Because a defaultLocale is set and none of the resourceSpec entries in the tests set a defaultLocale other than en, it hasn't been clear that this is an issue until recent multilingual work.