mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-22 18:30:09 +00:00
refactor(i18n): translation var script #33
This commit is contained in:
parent
ca0aad1e42
commit
27e6912aa9
2 changed files with 7 additions and 3 deletions
|
|
@ -3,5 +3,9 @@ const fs = require('fs');
|
|||
const MAIN_TRANSLATION_FILE = __dirname + '/../src/assets/i18n/en.json';
|
||||
|
||||
fs.watchFile(MAIN_TRANSLATION_FILE, () => {
|
||||
extractI18n();
|
||||
try {
|
||||
extractI18n();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
const fs = require('fs');
|
||||
const path = __dirname + '/../src/assets/i18n/en.json';
|
||||
const TRANSLATION_SRC = __dirname + '/../src/assets/i18n/en.json';
|
||||
|
||||
module.exports = () => {
|
||||
const _tr = fs.readFileSync(path);
|
||||
const _tr = fs.readFileSync(TRANSLATION_SRC);
|
||||
const tr = JSON.parse(_tr);
|
||||
|
||||
const parse = (o, pref = '') => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue