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:
roncodes
2025-11-28 04:46:00 -05:00
parent 72ce000786
commit 0f9cd52bb4
3 changed files with 3 additions and 3 deletions

View File

@@ -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]);
}

View File

@@ -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.