]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/core-utils/i18n/i18n.ts
add accept/reject routes for server followers in openapi spec
[github/Chocobozzz/PeerTube.git] / shared / core-utils / i18n / i18n.ts
index a342cb3f81b18d15c0c3b14e0b5027cdb36f9003..f27de20f1c2e33107189f78dcd82321c6264d7bc 100644 (file)
@@ -75,9 +75,9 @@ export function isDefaultLocale (locale: string) {
 }
 
 export function peertubeTranslate (str: string, translations?: { [ id: string ]: string }) {
-  // FIXME: remove disable rule when the client is upgraded to typescript 3.7
-  // eslint-disable-next-line
-  return translations && translations[str] ? translations[str] : str
+  if (!translations || !translations[str]) return str
+
+  return translations[str]
 }
 
 const possiblePaths = POSSIBLE_LOCALES.map(l => '/' + l)