Skip to content

Externalize translation coverage data into new YAML file

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

What does this MR do and why?

Externalize the previously hardcoded translation coverage data into a new YAML file, with an expandable structure. This change aims to simplify maintenance of the data and allow new fields to be added to the structure if needed in the future.

Original structure:

TRANSLATION_LEVELS = {
  'bg' => 0,
  'cs_CZ' => 0,
  'da_DK' => 22,
  'de' => 93,
  'en' => 100,
  'eo' => 0,
  'es' => 22,
  'fil_PH' => 0,
  'fr' => 93,
  'gl_ES' => 0,
  'id_ID' => 0,
  'it' => 71,
  'ja' => 93,
  'ko' => 19,
  'nb_NO' => 16,
  'nl_NL' => 0,
  'pl_PL' => 2,
  'pt_BR' => 84,
  'ro_RO' => 61,
  'ru' => 16,
  'si_LK' => 10,
  'tr_TR' => 6,
  'uk' => 41,
  'zh_CN' => 93,
  'zh_HK' => 1,
  'zh_TW' => 93
}

New structure:

bg:
  translation_level: 0
cs_CZ:
  translation_level: 0
da_DK:
  translation_level: 22
de:
  translation_level: 93
en:
  translation_level: 100
eo:
  translation_level: 0
es:
  translation_level: 22
fil_PH:
  translation_level: 0
fr:
  translation_level: 93
gl_ES:
  translation_level: 0
id_ID:
  translation_level: 0
it:
  translation_level: 71
ja:
  translation_level: 93
ko:
  translation_level: 19
nb_NO:
  translation_level: 16
nl_NL:
  translation_level: 0
pl_PL:
  translation_level: 2
pt_BR:
  translation_level: 84
ro_RO:
  translation_level: 61
ru:
  translation_level: 16
si_LK:
  translation_level: 10
tr_TR:
  translation_level: 6
uk:
  translation_level: 41
zh_CN:
  translation_level: 93
zh_HK:
  translation_level: 1
zh_TW:
  translation_level: 93

I also considered the previous feedback from !80208 (closed) when implementing this change

Fixes #329326

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
before change image after change image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

No changes to feature flags were made.

  1. Start up GitLab via GDK.
  2. From the main dashboard, click on the user avatar.
  3. Select the Preferences option.
  4. In the Preferences page, select the Preferences tab.
  5. Scroll to the Localization settings.
  6. In the Language dropdown values for percentage localized in each language will appear the same way as before.
Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading