grafana/public/locales/psuedo.js
Josh Hunt 5361efc225
I18n: Migrate to I18next (#55845)
* Switch from lingui from i18next

* Change lingui messages to i18next messages

* Change lingui messages to i18next messages (grafana-ui)

* Init i18n for tests
2022-10-06 16:34:04 +01:00

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);
});