mirror of
https://github.com/fleetbase/fleetbase.git
synced 2025-12-19 22:27:22 +00:00
fix: correct locale format from en-us to en-US
- Fixed ember-intl locale format to use proper case (en-US) - Renamed translation file: en-us.yaml → en-US.yaml - Updated fallbackLocale in ember-intl config - Updated default locale in application route - Fixes MISSING_DATA error in Intl.NumberFormat The Intl API requires proper locale format (en-US not en-us)
This commit is contained in:
@@ -124,11 +124,11 @@ export default class ApplicationRoute extends Route {
|
||||
* Initializes the application's locale settings based on the current user's preferences.
|
||||
*
|
||||
* This method retrieves the user's preferred locale using the `getOption` method from the `currentUser` service.
|
||||
* If no locale is set by the user, it defaults to `'en-us'`. It then sets the application's locale by calling
|
||||
* If no locale is set by the user, it defaults to `'en-US'`. It then sets the application's locale by calling
|
||||
* the `setLocale` method of the `intl` service with the retrieved locale.
|
||||
*/
|
||||
initializeLocale() {
|
||||
const locale = this.currentUser.getOption('locale', 'en-us');
|
||||
const locale = this.currentUser.getOption('locale', 'en-US');
|
||||
this.intl.setLocale([locale]);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ module.exports = function (/* environment */) {
|
||||
* @type {String?}
|
||||
* @default "null"
|
||||
*/
|
||||
fallbackLocale: 'en-us',
|
||||
fallbackLocale: 'en-US',
|
||||
|
||||
/**
|
||||
* Path where translations are stored. This is relative to the project root.
|
||||
|
||||
Reference in New Issue
Block a user