mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 13:09:22 -06:00
18 lines
495 B
JavaScript
18 lines
495 B
JavaScript
|
const fs = require('fs/promises');
|
||
|
const pseudoizer = require('pseudoizer');
|
||
|
|
||
|
function pseudoizeJsonReplacer(key, value) {
|
||
|
if (typeof value === 'string') {
|
||
|
return pseudoizer.pseudoize(value);
|
||
|
}
|
||
|
|
||
|
return value;
|
||
|
}
|
||
|
|
||
|
fs.readFile('./public/locales/en-US/grafana.json').then((enJson) => {
|
||
|
const enMessages = JSON.parse(enJson);
|
||
|
const pseudoJson = JSON.stringify(enMessages, pseudoizeJsonReplacer, 2);
|
||
|
|
||
|
return fs.writeFile('./public/locales/pseudo-LOCALE/grafana.json', pseudoJson);
|
||
|
});
|