Adding galician, turkish, hungarian, and ukrainian languages.
This commit is contained in:
parent
c1421c9c44
commit
a13e9fe395
6 changed files with 28 additions and 0 deletions
8
ui/src/i18next.ts
vendored
8
ui/src/i18next.ts
vendored
|
@ -20,6 +20,10 @@ import { pl } from './translations/pl';
|
||||||
import { pt_BR } from './translations/pt_BR';
|
import { pt_BR } from './translations/pt_BR';
|
||||||
import { ja } from './translations/ja';
|
import { ja } from './translations/ja';
|
||||||
import { ka } from './translations/ka';
|
import { ka } from './translations/ka';
|
||||||
|
import { gl } from './translations/gl';
|
||||||
|
import { tr } from './translations/tr';
|
||||||
|
import { hu } from './translations/hu';
|
||||||
|
import { uk } from './translations/uk';
|
||||||
|
|
||||||
// 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 = {
|
||||||
|
@ -43,6 +47,10 @@ const resources = {
|
||||||
pl,
|
pl,
|
||||||
pt_BR,
|
pt_BR,
|
||||||
ja,
|
ja,
|
||||||
|
gl,
|
||||||
|
tr,
|
||||||
|
hu,
|
||||||
|
uk,
|
||||||
};
|
};
|
||||||
|
|
||||||
function format(value: any, format: any, lng: any): any {
|
function format(value: any, format: any, lng: any): any {
|
||||||
|
|
16
ui/src/utils.ts
vendored
16
ui/src/utils.ts
vendored
|
@ -17,6 +17,10 @@ import 'moment/locale/pt-br';
|
||||||
import 'moment/locale/ja';
|
import 'moment/locale/ja';
|
||||||
import 'moment/locale/ka';
|
import 'moment/locale/ka';
|
||||||
import 'moment/locale/hi';
|
import 'moment/locale/hi';
|
||||||
|
import 'moment/locale/gl';
|
||||||
|
import 'moment/locale/tr';
|
||||||
|
import 'moment/locale/hu';
|
||||||
|
import 'moment/locale/uk';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
UserOperation,
|
UserOperation,
|
||||||
|
@ -67,6 +71,8 @@ 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: 'gl', name: 'Galego' },
|
||||||
|
{ code: 'hu', name: 'Magyar Nyelv' },
|
||||||
{ code: 'ka', name: 'ქართული ენა' },
|
{ code: 'ka', name: 'ქართული ენა' },
|
||||||
{ code: 'hi', name: 'मानक हिन्दी' },
|
{ code: 'hi', name: 'मानक हिन्दी' },
|
||||||
{ code: 'fa', name: 'فارسی' },
|
{ code: 'fa', name: 'فارسی' },
|
||||||
|
@ -77,6 +83,8 @@ export const languages = [
|
||||||
{ code: 'fi', name: 'Suomi' },
|
{ code: 'fi', name: 'Suomi' },
|
||||||
{ code: 'fr', name: 'Français' },
|
{ code: 'fr', name: 'Français' },
|
||||||
{ code: 'sv', name: 'Svenska' },
|
{ code: 'sv', name: 'Svenska' },
|
||||||
|
{ code: 'tr', name: 'Türkçe' },
|
||||||
|
{ code: 'uk', name: 'українська мова' },
|
||||||
{ code: 'ru', name: 'Русский' },
|
{ code: 'ru', name: 'Русский' },
|
||||||
{ code: 'nl', name: 'Nederlands' },
|
{ code: 'nl', name: 'Nederlands' },
|
||||||
{ code: 'it', name: 'Italiano' },
|
{ code: 'it', name: 'Italiano' },
|
||||||
|
@ -382,6 +390,14 @@ export function getMomentLanguage(): string {
|
||||||
lang = 'el';
|
lang = 'el';
|
||||||
} else if (lang.startsWith('eu')) {
|
} else if (lang.startsWith('eu')) {
|
||||||
lang = 'eu';
|
lang = 'eu';
|
||||||
|
} else if (lang.startsWith('gl')) {
|
||||||
|
lang = 'gl';
|
||||||
|
} else if (lang.startsWith('tr')) {
|
||||||
|
lang = 'tr';
|
||||||
|
} else if (lang.startsWith('hu')) {
|
||||||
|
lang = 'hu';
|
||||||
|
} else if (lang.startsWith('uk')) {
|
||||||
|
lang = 'uk';
|
||||||
} else {
|
} else {
|
||||||
lang = 'en';
|
lang = 'en';
|
||||||
}
|
}
|
||||||
|
|
1
ui/translations/gl.json
vendored
Normal file
1
ui/translations/gl.json
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{}
|
1
ui/translations/hu.json
vendored
Normal file
1
ui/translations/hu.json
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{}
|
1
ui/translations/tr.json
vendored
Normal file
1
ui/translations/tr.json
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{}
|
1
ui/translations/uk.json
vendored
Normal file
1
ui/translations/uk.json
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{}
|
Loading…
Reference in a new issue