diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
commit | 419c53ec62de6e97a517abd5fdd4cbde3a942a34 (patch) | |
tree | 1f43a548b46bca8a5fb8fe0c31cef1883d49c5b6 /lib/gitlab/i18n.rb | |
parent | 1da20d9135b3ad9e75e65b028bffc921aaf8deb7 (diff) |
Add latest changes from gitlab-org/gitlab@16-5-stable-eev16.5.0-rc42
Diffstat (limited to 'lib/gitlab/i18n.rb')
-rw-r--r-- | lib/gitlab/i18n.rb | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/gitlab/i18n.rb b/lib/gitlab/i18n.rb index f8e7e66a8a5..96e3d90c139 100644 --- a/lib/gitlab/i18n.rb +++ b/lib/gitlab/i18n.rb @@ -45,7 +45,7 @@ module Gitlab 'bg' => 0, 'cs_CZ' => 0, 'da_DK' => 29, - 'de' => 96, + 'de' => 97, 'en' => 100, 'eo' => 0, 'es' => 28, @@ -54,20 +54,20 @@ module Gitlab 'gl_ES' => 0, 'id_ID' => 0, 'it' => 1, - 'ja' => 99, + 'ja' => 98, 'ko' => 23, 'nb_NO' => 21, 'nl_NL' => 0, 'pl_PL' => 3, - 'pt_BR' => 55, + 'pt_BR' => 57, 'ro_RO' => 76, - 'ru' => 22, + 'ru' => 21, 'si_LK' => 12, 'tr_TR' => 8, - 'uk' => 51, + 'uk' => 52, 'zh_CN' => 99, 'zh_HK' => 1, - 'zh_TW' => 99 + 'zh_TW' => 100 }.freeze private_constant :TRANSLATION_LEVELS @@ -81,6 +81,13 @@ module Gitlab TRANSLATION_LEVELS.fetch(code, 0) end + def trimmed_language_name(code) + language_name = AVAILABLE_LANGUAGES[code] + return if language_name.blank? + + language_name.sub(/\s-\s.*/, '') + end + def available_locales AVAILABLE_LANGUAGES.keys end |