diff options
author | metamuffin <metamuffin@disroot.org> | 2024-04-03 18:08:52 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-04-03 18:08:52 +0200 |
commit | edbe7ad1be0a52dd4220f65d1ac98163a0a1b774 (patch) | |
tree | 01dce2d09562b0c52c6c8b370ef889fe0e057fbf /client-web/scripts/autogen_locale.ts | |
parent | 93d09d0aaef7586389daa360c1a361e915c4a228 (diff) | |
download | keks-meet-edbe7ad1be0a52dd4220f65d1ac98163a0a1b774.tar keks-meet-edbe7ad1be0a52dd4220f65d1ac98163a0a1b774.tar.bz2 keks-meet-edbe7ad1be0a52dd4220f65d1ac98163a0a1b774.tar.zst |
autogenerate japanese translation
Diffstat (limited to 'client-web/scripts/autogen_locale.ts')
-rw-r--r-- | client-web/scripts/autogen_locale.ts | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/client-web/scripts/autogen_locale.ts b/client-web/scripts/autogen_locale.ts deleted file mode 100644 index c2f3d5b..0000000 --- a/client-web/scripts/autogen_locale.ts +++ /dev/null @@ -1,28 +0,0 @@ -// deno-lint-ignore-file no-explicit-any -import { LOCALES } from "../source/locale/mod.ts"; - -const global_lc = "en-US" - -function traverse_object(target: any, current: any): any { - if (typeof target == "string") return target - const out = {} as any - for (const key in target) { - if (!current) { - out[key] = target[key] - } else { - if (key in current) continue - out[key] = traverse_object(target[key], current) - } - } - return out -} - -const master = LOCALES[global_lc] -for (const lc in LOCALES) { - if (lc == global_lc) continue - const k = JSON.stringify(traverse_object(master, LOCALES[lc])); - if (k.length <= 2) continue - console.log( - `New strings required in ${lc}:\n\t${k}` - ); -} |