From 0f9cd52bb40f7873688bcdb0204e22d699cb1db3 Mon Sep 17 00:00:00 2001 From: roncodes <816371+roncodes@users.noreply.github.com> Date: Fri, 28 Nov 2025 04:46:00 -0500 Subject: [PATCH] fix: correct locale format from en-us to en-US MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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) --- console/app/routes/application.js | 4 ++-- console/config/ember-intl.js | 2 +- console/translations/{en-us.yaml => en-US.yaml} | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename console/translations/{en-us.yaml => en-US.yaml} (100%) diff --git a/console/app/routes/application.js b/console/app/routes/application.js index 28aae62e..83f0d25f 100644 --- a/console/app/routes/application.js +++ b/console/app/routes/application.js @@ -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]); } diff --git a/console/config/ember-intl.js b/console/config/ember-intl.js index 14a5a788..79f46489 100644 --- a/console/config/ember-intl.js +++ b/console/config/ember-intl.js @@ -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. diff --git a/console/translations/en-us.yaml b/console/translations/en-US.yaml similarity index 100% rename from console/translations/en-us.yaml rename to console/translations/en-US.yaml