From d6bf24902a34f2094363121c8d9f4d54db6f7b6c Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 28 Apr 2017 23:28:27 +0200 Subject: implement new reserve creation dialog and auditor management --- src/i18n.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/i18n.tsx') 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 { 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); } } -- cgit v1.2.3