Polish before Release (#2621)

This commit is contained in:
Joe Milazzo 2024-01-18 16:02:21 -06:00 committed by GitHub
parent 295f352ab5
commit 7a6ef173e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 46 additions and 11 deletions

View file

@ -15,13 +15,11 @@ function generateChecksum(str, algorithm, encoding) {
const result = {};
glob.sync(`${jsonFilesDir}**/*.json`).forEach(path => {
console.log('Calculating hash for ', path);
let tokens = path.split('dist\\browser\\assets\\langs\\');
if (tokens.length === 1) {
tokens = path.split('dist/browser/assets/langs/');
}
const lang = tokens[1];
console.log('Language: ', lang);
const content = fs.readFileSync(path, { encoding: 'utf-8' });
result[lang.replace('.json', '')] = generateChecksum(content);
});