🌐(app-desk) order translations asc
When we pull the translations from crowdin we get lot of git diff noise with the json file. We order the keys in the json file to make the diffs more readable.
This commit is contained in:
@@ -35,9 +35,12 @@ fs.readdirSync(folderPath).map((language) => {
|
||||
|
||||
// Transform the json file to the format expected by i18next
|
||||
const jsonKeyMessage = {};
|
||||
Object.keys(json).forEach((key) => {
|
||||
jsonKeyMessage[key] = json[key].message;
|
||||
});
|
||||
Object.keys(json)
|
||||
.sort()
|
||||
.forEach((key) => {
|
||||
jsonKeyMessage[key] = json[key].message;
|
||||
});
|
||||
|
||||
jsonI18n[language] = {
|
||||
translation: jsonKeyMessage,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user