diff options
author | Sebastian <sebasjm@gmail.com> | 2022-02-24 12:41:47 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-02-24 12:50:54 -0300 |
commit | 68b887344289902273f0e0591e1038182ca4da77 (patch) | |
tree | 00b2c117d9b77c10cb3b3ce12cacb12e6ebc4571 /packages/taler-util/src | |
parent | 6bd6ace5937adebd38126f7c78a3d05f5a3a13a5 (diff) | |
download | wallet-core-68b887344289902273f0e0591e1038182ca4da77.tar.xz |
added ja lang and implemented transalation switch
Diffstat (limited to 'packages/taler-util/src')
-rw-r--r-- | packages/taler-util/src/i18n.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/taler-util/src/i18n.ts b/packages/taler-util/src/i18n.ts index 227798f48..be7cfe6a0 100644 --- a/packages/taler-util/src/i18n.ts +++ b/packages/taler-util/src/i18n.ts @@ -70,11 +70,14 @@ export function translate( /** * Internationalize a string template without serializing */ -export function Translate({ children, ...rest }: { children: any }): any { +export function Translate({ children, debug, }: { children: any, debug?: boolean }): any { const c = [].concat(children); const s = stringifyArray(c); if (!s) return []; const translation: string = jed.ngettext(s, s, 1); + if (debug) { + console.log("looking for ", s, "got", translation) + } return replacePlaceholderWithValues(translation, c); } |