aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/core-utils/i18n/i18n.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/core-utils/i18n/i18n.ts')
-rw-r--r--shared/core-utils/i18n/i18n.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/shared/core-utils/i18n/i18n.ts b/shared/core-utils/i18n/i18n.ts
index a342cb3f8..f27de20f1 100644
--- a/shared/core-utils/i18n/i18n.ts
+++ b/shared/core-utils/i18n/i18n.ts
@@ -75,9 +75,9 @@ export function isDefaultLocale (locale: string) {
75} 75}
76 76
77export function peertubeTranslate (str: string, translations?: { [ id: string ]: string }) { 77export function peertubeTranslate (str: string, translations?: { [ id: string ]: string }) {
78 // FIXME: remove disable rule when the client is upgraded to typescript 3.7 78 if (!translations || !translations[str]) return str
79 // eslint-disable-next-line 79
80 return translations && translations[str] ? translations[str] : str 80 return translations[str]
81} 81}
82 82
83const possiblePaths = POSSIBLE_LOCALES.map(l => '/' + l) 83const possiblePaths = POSSIBLE_LOCALES.map(l => '/' + l)