summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-06-07 07:51:36 -0400
committerDessalines <tyhou13@gmx.com>2020-06-07 07:51:36 -0400
commita13e9fe3959e07f901ba0647dfd7f749865a900d (patch)
tree8974911fca4e47af3544dddd8a84369a715b14d3
parentc1421c9c4437064fd2204df8474d8fa40e4a7ba8 (diff)
Adding galician, turkish, hungarian, and ukrainian languages.
-rw-r--r--ui/src/i18next.ts8
-rw-r--r--ui/src/utils.ts16
-rw-r--r--ui/translations/gl.json1
-rw-r--r--ui/translations/hu.json1
-rw-r--r--ui/translations/tr.json1
-rw-r--r--ui/translations/uk.json1
6 files changed, 28 insertions, 0 deletions
diff --git a/ui/src/i18next.ts b/ui/src/i18next.ts
index cba9e3c2..5fa8f4e8 100644
--- a/ui/src/i18next.ts
+++ b/ui/src/i18next.ts
@@ -20,6 +20,10 @@ import { pl } from './translations/pl';
import { pt_BR } from './translations/pt_BR';
import { ja } from './translations/ja';
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
const resources = {
@@ -43,6 +47,10 @@ const resources = {
pl,
pt_BR,
ja,
+ gl,
+ tr,
+ hu,
+ uk,
};
function format(value: any, format: any, lng: any): any {
diff --git a/ui/src/utils.ts b/ui/src/utils.ts
index 66a21319..3bad5040 100644
--- a/ui/src/utils.ts
+++ b/ui/src/utils.ts
@@ -17,6 +17,10 @@ import 'moment/locale/pt-br';
import 'moment/locale/ja';
import 'moment/locale/ka';
import 'moment/locale/hi';
+import 'moment/locale/gl';
+import 'moment/locale/tr';
+import 'moment/locale/hu';
+import 'moment/locale/uk';
import {
UserOperation,
@@ -67,6 +71,8 @@ export const languages = [
{ code: 'eo', name: 'Esperanto' },
{ code: 'es', name: 'Español' },
{ code: 'de', name: 'Deutsch' },
+ { code: 'gl', name: 'Galego' },
+ { code: 'hu', name: 'Magyar Nyelv' },
{ code: 'ka', name: 'ქართული ენა' },
{ code: 'hi', name: 'मानक हिन्दी' },
{ code: 'fa', name: 'فارسی' },
@@ -77,6 +83,8 @@ export const languages = [
{ code: 'fi', name: 'Suomi' },
{ code: 'fr', name: 'Français' },
{ code: 'sv', name: 'Svenska' },
+ { code: 'tr', name: 'Türkçe' },
+ { code: 'uk', name: 'українська мова' },
{ code: 'ru', name: 'Русский' },
{ code: 'nl', name: 'Nederlands' },
{ code: 'it', name: 'Italiano' },
@@ -382,6 +390,14 @@ export function getMomentLanguage(): string {
lang = 'el';
} else if (lang.startsWith('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 {
lang = 'en';
}
diff --git a/ui/translations/gl.json b/ui/translations/gl.json
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/ui/translations/gl.json
@@ -0,0 +1 @@
+{}
diff --git a/ui/translations/hu.json b/ui/translations/hu.json
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/ui/translations/hu.json
@@ -0,0 +1 @@
+{}
diff --git a/ui/translations/tr.json b/ui/translations/tr.json
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/ui/translations/tr.json
@@ -0,0 +1 @@
+{}
diff --git a/ui/translations/uk.json b/ui/translations/uk.json
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/ui/translations/uk.json
@@ -0,0 +1 @@
+{}