]> 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 cc7621da8b0570fc27a37e6d1ac6921c8be321f6..f27de20f1c2e33107189f78dcd82321c6264d7bc 100644 (file)
@@ -26,7 +26,8 @@ export const I18N_LOCALES = {
   'pt-BR': 'Português (Brasil)',
   'pt-PT': 'Português (Portugal)',
   'ru-RU': 'русский',
-  'sv-SE': 'svenska',
+  'sq': 'Shqip',
+  'sv-SE': 'Svenska',
   'th-TH': 'ไทย',
   'vi-VN': 'Tiếng Việt',
   'zh-Hans-CN': '简体中文(中国)',
@@ -74,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)