-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
101 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,7 +126,6 @@ | |
"zoomImage": "Zoom Image", | ||
"zoomIn": "Zoom In", | ||
"zoomOut": "Zoom Out" | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
// Set the directory where your JSON files are located | ||
const jsonDir = '.'; | ||
|
||
// Read all files in the directory | ||
fs.readdir(jsonDir, (err, files) => { | ||
if (err) { | ||
console.error(`Error reading directory: ${err}`); | ||
return; | ||
} | ||
|
||
// Filter out JSON files | ||
files.filter(file => path.extname(file) === '.json').forEach(file => { | ||
// Get the filename without the extension | ||
const filename = path.basename(file, '.json').replace(/-/g, '_'); | ||
|
||
// Print the import statement | ||
console.log(`import locale_${filename} from 'primelocale/${file}';`); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters