Skip to content

Commit 8b04e35

Browse files
committed
chore(l10n): GitLocalize was using 2-space indentation, now 4 with Weblate which will likely be used more now [skip ci]
1 parent a06acf7 commit 8b04e35

29 files changed

+14923
-14923
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@
7171
"cli:help": "electron . --help",
7272
"cli": "cross-env DEBUG=r2:*,readium-desktop:* NODE_ENV=development electron .",
7373
"i18n-sort": "node ./scripts/locales-sort.js",
74-
"i18n-scan": "node ./scripts/translate-scan.js \"src/resources/locales/temp.json\" && sync-i18n --files 'src/resources/locales/*.json' --primary temp --languages en sl bg ca da de el es eu fi fr gl hr it ja ka ko lt nl pt-br pt-pt ru sv zh-cn zh-tw --space \" \" --finalnewline --newkeysempty && rimraf \"src/resources/locales/temp.json\"",
75-
"i18n-check": "sync-i18n --files 'src/resources/locales/*.json' --primary en --languages sl bg ca da de el es eu fi fr gl hr it ja ka ko lt nl pt-br pt-pt ru sv zh-cn zh-tw --space \" \" --finalnewline --newkeysempty",
74+
"i18n-scan": "node ./scripts/translate-scan.js \"src/resources/locales/temp.json\" && sync-i18n --files 'src/resources/locales/*.json' --primary temp --languages en sl bg ca da de el es eu fi fr gl hr it ja ka ko lt nl pt-br pt-pt ru sv zh-cn zh-tw --space \" \" --finalnewline --newkeysempty && rimraf \"src/resources/locales/temp.json\"",
75+
"i18n-check": "sync-i18n --files 'src/resources/locales/*.json' --primary en --languages sl bg ca da de el es eu fi fr gl hr it ja ka ko lt nl pt-br pt-pt ru sv zh-cn zh-tw --space \" \" --finalnewline --newkeysempty",
7676
"i18n-typed": "node ./scripts/locale-wrap.js \"src/resources/locales/en.json\" \"en.json\" && typed_i18n -i \"en.json\" -o src/typings -l typescript && node ./scripts/translator-key-type.js \"src/typings/en.translation.d.ts\" \"src/typings/en.translation-keys.d.ts\" && rimraf \"en.json\"",
7777
"style-typed": "tcm \"src/renderer/assets/styles\" && typed-scss-modules \"src/renderer/assets/styles\" --nameFormat none || echo \"!!failed!!\"",
7878
"ts-unused-exports_": "tcm --namedExports \"src/renderer/assets/styles\" && ts-unused-exports ./tsconfig.json $(find ./src/renderer/assets/styles -name '*.d.ts') || npm run style-typed",

scripts/locale-wrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ const jsonDstPath = args[1];
88
const jsonSrcTxt = fs.readFileSync(path.join(process.cwd(), jsonSrcPath), { encoding: "utf8" });
99
const jsonDstObj = { "en": { "translation": JSON.parse(jsonSrcTxt) } };
1010
console.log(util.inspect(jsonDstObj, { colors: true, depth: null, compact: false }));
11-
const jsonDstTxt = JSON.stringify(jsonDstObj, null, " ") + "\n";
11+
const jsonDstTxt = JSON.stringify(jsonDstObj, null, " ") + "\n";
1212
fs.writeFileSync(path.join(process.cwd(), jsonDstPath), jsonDstTxt, { encoding: "utf8" });

scripts/locales-sort.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ const files = glob.globSync("src/resources/locales/*.json");
2222
fileJson = jsonUtils.sortObject(fileJson);
2323
console.log(util.inspect(fileJson, { colors: true, depth: null, compact: false }));
2424
console.log("#######################");
25-
const jsonStr = JSON.stringify(fileJson, null, " ") + "\n";
25+
const jsonStr = JSON.stringify(fileJson, null, " ") + "\n";
2626
fs.writeFileSync(p, jsonStr, { encoding: "utf8" });
2727
}

scripts/translate-scan.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,5 @@ const files = glob.globSync("src/**/*{.ts,.tsx}");
8888

8989
console.log(util.inspect(jsonObj, { colors: true, depth: null, compact: false }));
9090

91-
const jsonStr = JSON.stringify(jsonObj, null, " ") + "\n";
91+
const jsonStr = JSON.stringify(jsonObj, null, " ") + "\n";
9292
fs.writeFileSync(path.join(process.cwd(), jsonFilePath), jsonStr, { encoding: "utf8" });

src/resources/locales/ar.json

Lines changed: 596 additions & 596 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)