aboutsummaryrefslogtreecommitdiff
path: root/src/i18n.tsx
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-29 15:18:48 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-29 15:18:48 +0200
commitd0e0c6baf274aab378233a7ae0d67307c03b3a7c (patch)
treeceec84efb0d396f32a16c96be1c3cf95dcd3725a /src/i18n.tsx
parent2e9ecf952d4028a2d55cd7be5d4afb689bac88b8 (diff)
fix linter errors
Diffstat (limited to 'src/i18n.tsx')
-rw-r--r--src/i18n.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/i18n.tsx b/src/i18n.tsx
index 48631afb2..e5b9c398a 100644
--- a/src/i18n.tsx
+++ b/src/i18n.tsx
@@ -51,7 +51,7 @@ function toI18nString(strings: ReadonlyArray<string>) {
for (let i = 0; i < strings.length; i++) {
str += strings[i];
if (i < strings.length - 1) {
- str += "%"+ (i+1) +"$s";
+ str += `%${i + 1}$s`;
}
}
return str;
@@ -196,8 +196,8 @@ export class TranslatePlural extends React.Component<TranslationPluralProps,void
let tr = jed.ngettext(s, s, 1).split(/%(\d+)\$s/).filter((e: any, i: number) => i % 2 == 0);
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;
+ if ((typeof childArray[i]) == "string" && (typeof childArray[i + 1]) == "string") {
+ childArray[i+i] = childArray[i] as string + childArray[i + 1] as string;
childArray.splice(i,1);
}
}
@@ -228,8 +228,8 @@ export class TranslateSingular extends React.Component<TranslationPluralProps,vo
let tr = jed.ngettext(s, s, 1).split(/%(\d+)\$s/).filter((e: any, i: number) => i % 2 == 0);
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;
+ if ((typeof childArray[i]) == "string" && (typeof childArray[i + 1]) == "string") {
+ childArray[i+i] = childArray[i] as string + childArray[i + 1] as string;
childArray.splice(i,1);
}
}