aboutsummaryrefslogtreecommitdiff
path: root/src/i18n.tsx
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-11-16 22:28:15 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-11-16 22:28:15 +0100
commitdb0d204a3ca3e1fba7d652fe70b2412e3e30d231 (patch)
treefa875aa19edb62ce43b778f10f990a794d22756d /src/i18n.tsx
parent9cb9d2d3b00c671ee7144eda274406141950640c (diff)
fix translation stub
Diffstat (limited to 'src/i18n.tsx')
-rw-r--r--src/i18n.tsx19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/i18n.tsx b/src/i18n.tsx
index ca57a6ad7..bd58ffad7 100644
--- a/src/i18n.tsx
+++ b/src/i18n.tsx
@@ -232,22 +232,11 @@ i18n.TranslateSwitch = class extends React.Component<TranslateSwitchProps,void>{
console.error("translation not found");
return React.createElement("span", {}, ["translation not found"]);
}
- if ("object" !== typeof jed) {
- if (this.props.target == 1) {
- return singular;
- } else {
- return plural;
- }
+ if (this.props.target == 1) {
+ return singular;
} else {
- let tr = jed.ngettext(str, str, n).split(/%(\d+)\$s/);
- let parts: any[] = [];
- if (this.props.target == 1) {
- singular.props = null;
- return singular
- } else {
- let parts: any[] = [];
- return parts;
- }
+ return plural;
+ }
}
}
}