diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-04-28 23:28:27 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-04-28 23:28:27 +0200 |
commit | d6bf24902a34f2094363121c8d9f4d54db6f7b6c (patch) | |
tree | 0794956ebdf91a2fbea16baa0e8aa559f45c5d06 /src/i18n.tsx | |
parent | ce97b1076b7e4a53b84d3fd34bf2047580ddeb22 (diff) |
implement new reserve creation dialog and auditor management
Diffstat (limited to 'src/i18n.tsx')
-rw-r--r-- | src/i18n.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/i18n.tsx b/src/i18n.tsx index ff32e62a8..aa26407d9 100644 --- a/src/i18n.tsx +++ b/src/i18n.tsx @@ -177,11 +177,13 @@ interface TranslateProps { export class Translate extends React.Component<TranslateProps,void> { render(): JSX.Element { let s = stringifyChildren(this.props.children); + console.log(`string "${s}"`); let tr = jed.ngettext(s, s, 1).split(/%(\d+)\$s/).filter((e: any, i: number) => i % 2 == 0); + console.log(`tr "${JSON.stringify(tr)}"`); let childArray = React.Children.toArray(this.props.children!); for (let i = 0; i < childArray.length - 1; ++i) { if ((typeof childArray[i]) == "string" && (typeof childArray[i+1]) == "string") { - childArray[i+i] = childArray[i] as string + childArray[i+1] as string; + childArray[i+1] = (childArray[i] as string).concat(childArray[i+1] as string); childArray.splice(i,1); } } |