Skip to content

Commit

Permalink
Updated alphabet check for all files and not only other languages
Browse files Browse the repository at this point in the history
  • Loading branch information
nichwall committed Mar 10, 2024
1 parent 89ee121 commit cc9a569
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion copy_keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function updateJSONFiles(baseFileName, directory) {

fs.readdirSync(directory).forEach(filename => {
const filePath = path.join(directory, filename);
if (filename.endsWith('.json') && filename !== baseFileName) {
if (filename.endsWith('.json')) {
let otherData = loadJSONFile(filePath);

// Check if keys are in alphabetical order
Expand All @@ -40,6 +40,9 @@ function updateJSONFiles(baseFileName, directory) {
break;
}
}
}
if (filename.endsWith('.json') && filename !== baseFileName) {
let otherData = loadJSONFile(filePath);

// Copy missing fields from the base data
for (const key in sortedBaseData) {
Expand Down
5 changes: 4 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26622,7 +26622,7 @@ function updateJSONFiles(baseFileName, directory) {

fs.readdirSync(directory).forEach(filename => {
const filePath = path.join(directory, filename);
if (filename.endsWith('.json') && filename !== baseFileName) {
if (filename.endsWith('.json')) {
let otherData = loadJSONFile(filePath);

// Check if keys are in alphabetical order
Expand All @@ -26633,6 +26633,9 @@ function updateJSONFiles(baseFileName, directory) {
break;
}
}
}
if (filename.endsWith('.json') && filename !== baseFileName) {
let otherData = loadJSONFile(filePath);

// Copy missing fields from the base data
for (const key in sortedBaseData) {
Expand Down

0 comments on commit cc9a569

Please sign in to comment.