From: Dessalines Date: Wed, 1 Jul 2020 22:50:38 +0000 (-0400) Subject: Adding Albanian for weblate. X-Git-Url: http://these/git/%22%7Burl%7D/%7B%60%24%7BghostArchiveUrl%7D/static/%7BpictshareAvatarThumbnail%28post.creator_avatar%29%7D?a=commitdiff_plain;h=360e7aec424ca07a0329e18549f8dce692495ed8;p=lemmy.git Adding Albanian for weblate. --- diff --git a/ui/src/i18next.ts b/ui/src/i18next.ts index 5fa8f4e8..7a341cea 100644 --- a/ui/src/i18next.ts +++ b/ui/src/i18next.ts @@ -24,6 +24,7 @@ import { gl } from './translations/gl'; import { tr } from './translations/tr'; import { hu } from './translations/hu'; import { uk } from './translations/uk'; +import { sq } from './translations/sq'; // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 const resources = { @@ -51,6 +52,7 @@ const resources = { tr, hu, uk, + sq, }; function format(value: any, format: any, lng: any): any { diff --git a/ui/src/utils.ts b/ui/src/utils.ts index 7bf6fdd1..48d2095d 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -21,6 +21,7 @@ import 'moment/locale/gl'; import 'moment/locale/tr'; import 'moment/locale/hu'; import 'moment/locale/uk'; +import 'moment/locale/sq'; import { UserOperation, @@ -83,6 +84,7 @@ export const languages = [ { code: 'fi', name: 'Suomi' }, { code: 'fr', name: 'Français' }, { code: 'sv', name: 'Svenska' }, + { code: 'sq', name: 'Shqip' }, { code: 'tr', name: 'Türkçe' }, { code: 'uk', name: 'українська мова' }, { code: 'ru', name: 'Русский' }, @@ -414,6 +416,8 @@ export function getMomentLanguage(): string { lang = 'hu'; } else if (lang.startsWith('uk')) { lang = 'uk'; + } else if (lang.startsWith('sq')) { + lang = 'sq'; } else { lang = 'en'; } diff --git a/ui/translations/sq.json b/ui/translations/sq.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/ui/translations/sq.json @@ -0,0 +1 @@ +{}