}
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)