From e593e516b8dc178eacdf1050f901c8d0f6676002 Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Tue, 22 Nov 2022 12:54:13 -0800 Subject: [PATCH] chore: Enable Latvian (lv) language (#5920) --- app/javascript/dashboard/i18n/index.js | 2 ++ app/javascript/dashboard/i18n/locale/en/generalSettings.json | 2 +- app/javascript/survey/i18n/index.js | 2 ++ app/javascript/widget/i18n/index.js | 2 ++ config/initializers/languages.rb | 3 ++- 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/javascript/dashboard/i18n/index.js b/app/javascript/dashboard/i18n/index.js index 812b69018..417ad7be3 100644 --- a/app/javascript/dashboard/i18n/index.js +++ b/app/javascript/dashboard/i18n/index.js @@ -15,6 +15,7 @@ import id from './locale/id'; import it from './locale/it'; import ja from './locale/ja'; import ko from './locale/ko'; +import lv from './locale/lv'; import ml from './locale/ml'; import nl from './locale/nl'; import no from './locale/no'; @@ -52,6 +53,7 @@ export default { ja, ko, ml, + lv, nl, no, pl, diff --git a/app/javascript/dashboard/i18n/locale/en/generalSettings.json b/app/javascript/dashboard/i18n/locale/en/generalSettings.json index f9e763808..f1d87ee73 100644 --- a/app/javascript/dashboard/i18n/locale/en/generalSettings.json +++ b/app/javascript/dashboard/i18n/locale/en/generalSettings.json @@ -23,7 +23,7 @@ "ERROR": "Please enter a valid account name" }, "LANGUAGE": { - "LABEL": "Site language (Beta)", + "LABEL": "Site language", "PLACEHOLDER": "Your account name", "ERROR": "" }, diff --git a/app/javascript/survey/i18n/index.js b/app/javascript/survey/i18n/index.js index a4ebfdd6b..f707c4478 100644 --- a/app/javascript/survey/i18n/index.js +++ b/app/javascript/survey/i18n/index.js @@ -15,6 +15,7 @@ import id from './locale/id.json'; import it from './locale/it.json'; import ja from './locale/ja.json'; import ko from './locale/ko.json'; +import lv from './locale/lv.json'; import ml from './locale/ml.json'; import nl from './locale/nl.json'; import no from './locale/no.json'; @@ -51,6 +52,7 @@ export default { it, ja, ko, + lv, ml, nl, no, diff --git a/app/javascript/widget/i18n/index.js b/app/javascript/widget/i18n/index.js index 1cf045b87..671e6e049 100644 --- a/app/javascript/widget/i18n/index.js +++ b/app/javascript/widget/i18n/index.js @@ -15,6 +15,7 @@ import id from './locale/id.json'; import it from './locale/it.json'; import ja from './locale/ja.json'; import ko from './locale/ko.json'; +import lv from './locale/lv.json'; import ml from './locale/ml.json'; import nl from './locale/nl.json'; import no from './locale/no.json'; @@ -51,6 +52,7 @@ export default { it, ja, ko, + lv, ml, nl, no, diff --git a/config/initializers/languages.rb b/config/initializers/languages.rb index ead514a2b..d5131be64 100644 --- a/config/initializers/languages.rb +++ b/config/initializers/languages.rb @@ -36,7 +36,8 @@ LANGUAGES_CONFIG = { 31 => { name: 'język polski (pl)', iso_639_3_code: 'pol', iso_639_1_code: 'pl', enabled: true }, 32 => { name: 'slovenčina (sk)', iso_639_3_code: 'slk', iso_639_1_code: 'sk', enabled: true }, 33 => { name: 'украї́нська мо́ва (uk)', iso_639_3_code: 'ukr', iso_639_1_code: 'uk', enabled: true }, - 34 => { name: 'ภาษาไทย (th)', iso_639_3_code: 'tha', iso_639_1_code: 'th', enabled: true } + 34 => { name: 'ภาษาไทย (th)', iso_639_3_code: 'tha', iso_639_1_code: 'th', enabled: true }, + 35 => { name: 'latviešu valoda (lv)', iso_639_3_code: 'lav', iso_639_1_code: 'lv', enabled: true } }.filter { |_key, val| val[:enabled] }.freeze Rails.configuration.i18n.available_locales = LANGUAGES_CONFIG.map { |_index, lang| lang[:iso_639_1_code].to_sym }