mirror of
https://github.com/grafana/grafana.git
synced 2025-01-09 07:33:42 -06:00
5361efc225
* Switch from lingui from i18next * Change lingui messages to i18next messages * Change lingui messages to i18next messages (grafana-ui) * Init i18n for tests
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);
|
|
});
|