Adding some languages for weblate.

This commit is contained in:
Dessalines 2020-07-08 17:52:41 -04:00
parent 32d43b85b9
commit 3f34e5dadf
5 changed files with 21 additions and 0 deletions

6
ui/src/i18next.ts vendored
View file

@ -25,6 +25,9 @@ import { tr } from './translations/tr';
import { hu } from './translations/hu'; import { hu } from './translations/hu';
import { uk } from './translations/uk'; import { uk } from './translations/uk';
import { sq } from './translations/sq'; import { sq } from './translations/sq';
import { km } from './translations/km';
import { ga } from './translations/ga';
import { sr_Latn } from './translations/sr_Latn';
// https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66
const resources = { const resources = {
@ -53,6 +56,9 @@ const resources = {
hu, hu,
uk, uk,
sq, sq,
km,
ga,
sr_Latn,
}; };
function format(value: any, format: any, lng: any): any { function format(value: any, format: any, lng: any): any {

12
ui/src/utils.ts vendored
View file

@ -22,6 +22,9 @@ import 'moment/locale/tr';
import 'moment/locale/hu'; import 'moment/locale/hu';
import 'moment/locale/uk'; import 'moment/locale/uk';
import 'moment/locale/sq'; import 'moment/locale/sq';
import 'moment/locale/km';
import 'moment/locale/ga';
import 'moment/locale/sr';
import { import {
UserOperation, UserOperation,
@ -72,9 +75,11 @@ export const languages = [
{ code: 'eo', name: 'Esperanto' }, { code: 'eo', name: 'Esperanto' },
{ code: 'es', name: 'Español' }, { code: 'es', name: 'Español' },
{ code: 'de', name: 'Deutsch' }, { code: 'de', name: 'Deutsch' },
{ code: 'ga', name: 'Gaeilge' },
{ code: 'gl', name: 'Galego' }, { code: 'gl', name: 'Galego' },
{ code: 'hu', name: 'Magyar Nyelv' }, { code: 'hu', name: 'Magyar Nyelv' },
{ code: 'ka', name: 'ქართული ენა' }, { code: 'ka', name: 'ქართული ენა' },
{ code: 'km', name: 'ភាសាខ្មែរ' },
{ code: 'hi', name: 'मानक हिन्दी' }, { code: 'hi', name: 'मानक हिन्दी' },
{ code: 'fa', name: 'فارسی' }, { code: 'fa', name: 'فارسی' },
{ code: 'ja', name: '日本語' }, { code: 'ja', name: '日本語' },
@ -85,6 +90,7 @@ export const languages = [
{ code: 'fr', name: 'Français' }, { code: 'fr', name: 'Français' },
{ code: 'sv', name: 'Svenska' }, { code: 'sv', name: 'Svenska' },
{ code: 'sq', name: 'Shqip' }, { code: 'sq', name: 'Shqip' },
{ code: 'sr_Latn', name: 'srpski' },
{ code: 'tr', name: 'Türkçe' }, { code: 'tr', name: 'Türkçe' },
{ code: 'uk', name: 'Українська Mова' }, { code: 'uk', name: 'Українська Mова' },
{ code: 'ru', name: 'Русский' }, { code: 'ru', name: 'Русский' },
@ -418,6 +424,12 @@ export function getMomentLanguage(): string {
lang = 'uk'; lang = 'uk';
} else if (lang.startsWith('sq')) { } else if (lang.startsWith('sq')) {
lang = 'sq'; lang = 'sq';
} else if (lang.startsWith('km')) {
lang = 'km';
} else if (lang.startsWith('ga')) {
lang = 'ga';
} else if (lang.startsWith('sr')) {
lang = 'sr';
} else { } else {
lang = 'en'; lang = 'en';
} }

1
ui/translations/ga.json vendored Normal file
View file

@ -0,0 +1 @@
{}

1
ui/translations/km.json vendored Normal file
View file

@ -0,0 +1 @@
{}

1
ui/translations/sr_Latn.json vendored Normal file
View file

@ -0,0 +1 @@
{}