Sort the keys in order to be more predictable (#164920)

sort the keys in order to be more predictable
This commit is contained in:
Tyler James Leonhardt
2022-10-28 21:16:05 +02:00
committed by GitHub
parent 77381abe36
commit 0a80e31f6f
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -787,7 +787,7 @@ export interface TranslationPath {
function getRecordFromL10nJsonFormat(l10nJsonFormat: l10nJsonFormat): Record<string, string> {
const record: Record<string, string> = {};
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;
}