diff --git a/build/lib/i18n.js b/build/lib/i18n.js index 24e622bc7a8..95338e5befe 100644 --- a/build/lib/i18n.js +++ b/build/lib/i18n.js @@ -684,7 +684,7 @@ function createI18nFile(name, messages) { const i18nPackVersion = '1.0.0'; function getRecordFromL10nJsonFormat(l10nJsonFormat) { const record = {}; - for (const key of Object.keys(l10nJsonFormat)) { + for (const key of Object.keys(l10nJsonFormat).sort()) { const value = l10nJsonFormat[key]; record[key] = typeof value === 'string' ? value : value.message; } diff --git a/build/lib/i18n.ts b/build/lib/i18n.ts index 1962ba98926..8f1eaf9fe0e 100644 --- a/build/lib/i18n.ts +++ b/build/lib/i18n.ts @@ -787,7 +787,7 @@ export interface TranslationPath { function getRecordFromL10nJsonFormat(l10nJsonFormat: l10nJsonFormat): Record { const record: Record = {}; - for (const key of Object.keys(l10nJsonFormat)) { + for (const key of Object.keys(l10nJsonFormat).sort()) { const value = l10nJsonFormat[key]; record[key] = typeof value === 'string' ? value : value.message; }