Skip to content

implement dynamic choice detection for convert.py#2371

Open
abhijit9040 wants to merge 9 commits intoOWASP:masterfrom
abhijit9040:master
Open

implement dynamic choice detection for convert.py#2371
abhijit9040 wants to merge 9 commits intoOWASP:masterfrom
abhijit9040:master

Conversation

@abhijit9040
Copy link
Contributor

This PR refactors scripts/convert.py to remove hardcoded configuration lists and move toward a fully data-driven architecture.

The script now dynamically detects available editions, versions, languages, layouts, and templates by indexing the meta blocks of YAML mapping files in the source/ directory.

Key Changes
Dynamic Content Discovery

  • Added _detect_choices() to the ConvertVars class.
  • Scans the source/ folder at runtime.
  • Treats YAML meta blocks as the single source of truth.

Dynamic CLI Help

  • Updated parse_arguments() to use dynamically generated choices.
  • convert.py --help now automatically reflects newly added versions or translations.

Runtime Map Generation

  • EDITION_VERSION_MAP and LATEST_VERSION_CHOICES are now computed at runtime.

Data Integrity Fixes

  • Fixed YAML indentation issue in source/companion-mappings-1.0.yaml.
  • Updated source/webapp-mappings-3.0.yaml metadata to include Hindi (hi).

Why This Matters

  • Zero Maintenance: Adding a new version or language no longer requires Python code changes.
  • Always in Sync: CLI help and validation automatically reflect repository content.
  • Improved Robustness: Eliminates risk of files being ignored due to outdated hardcoded lists.

Files Modified

  • scripts/convert.py – Implemented dynamic detection and CLI updates
  • source/companion-mappings-1.0.yaml – Fixed YAML indentation
  • source/webapp-mappings-3.0.yaml – Added hi to meta.languages

@github-actions
Copy link
Contributor

Build artifacts:

Name Link
Output files cornucopia-build-files.6491ea6141a33d4708815795b4a67ae537cbb117.zip

Translation Check Report

The following sentences/tags have issues in the translations:

Spanish

File: eop-cards-5.0-es.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00105, T00140

Russian

File: eop-cards-5.0-ru.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00001, T00003, T00004, T00090, T00100, T00105, T00210, T00220, T00230, T00240, T00250, T00260, T00270, T00280, T00290, T00300, T00310, T00320, T00330, T00340, T00350, T00360, T00370, T00380, T00390, T00400, T00410, T00420, T00430, T00440, T00450, T00460, T00470, T00480

Russian

File: mobileapp-cards-1.0-ru.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00020, T00120, T00130, T00220, T00240, T00310, T00311, T00320, T00330, T00340, T00350, T00360, T00370, T00380, T00390, T00400, T00510, T00520, T00530, T00610, T01010, T01070, T01160, T01170, T01180, T01200, T01210, T01220, T01301, T01411, T02680, T02690, T02700, T02710, T02720, T02730, T02780, T03010

Russian

File: mobileapp-cards-1.1-ru.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00020, T00120, T00130, T00220, T00240, T00310, T00311, T00320, T00330, T00340, T00350, T00360, T00370, T00380, T00390, T00400, T00510, T00520, T00530, T00610, T01010, T01070, T01160, T01170, T01180, T01200, T01210, T01220, T01301, T01411, T02680, T02690, T02700, T02710, T02720, T02730, T02780, T03010

Spanish

File: webapp-cards-2.2-es.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00020, T00380, T02330, T02530, T02940, T03140, T03160, T03180, T03200, T03210, T03220, T03230, T03240, T03250, T03260, T03270, T03280, T03290, T03300, T03310, T03320, T03330, T03340, T03350, T03360, T03370, T03380, T03390, T03400, T03410, T03420, T03430, T03440, T03450, T03460, T03470, T03480, T03490, T03500, T03510, T03530, T03540, T03550, T03560, T03570, T03580, T03590, T03600, T03610, T03620, T03630, T03640, T03650, T03660, T03670, T03680, T03690, T03700, T03710, T03720, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775, T03800, T03810, T03820, T03830, T03840, T03850, T03860, T03870, T03900, T03950

French

File: webapp-cards-2.2-fr.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00200, T01100, T02330, T02530, T03110, T03120, T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

Hungarian

File: webapp-cards-2.2-hu.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T00005, T00161, T00162, T01301, T01311, T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00020, T00030, T00140, T00145, T00200, T00210, T00220, T00230, T00240, T00300, T00320, T00340, T00350, T00360, T00370, T00380, T00390, T00400, T00500, T00510, T00520, T00600, T00610, T00700, T00710, T00720, T00730, T00740, T00750, T00760, T00770, T00780, T00790, T00800, T00810, T00830, T00840, T00900, T00910, T00920, T01000, T01020, T01060, T01100, T01110, T01120, T01130, T01140, T01150, T01160, T01170, T01190, T01200, T01240, T01250, T01260, T01270, T01280, T01290, T01300, T01400, T01410, T01420, T01430, T01431, T01440, T01450, T01500, T01510, T01520, T01530, T01540, T01550, T01560, T01570, T01571, T01580, T01590, T01600, T01610, T01700, T01710, T01720, T01730, T01740, T01800, T01810, T01811, T01820, T01900, T01910, T01920, T01930, T01940, T01960, T01970, T01980, T02000, T02010, T02020, T02030, T02040, T02100, T02120, T02140, T02200, T02220, T02240, T02250, T02260, T02280, T02290, T02300, T02310, T02320, T02330, T02340, T02400, T02410, T02420, T02440, T02450, T02460, T02480, T02490, T02500, T02510, T02520, T02530, T02540, T02600, T02610, T02620, T02630, T02650, T02680, T02690, T02700, T02710, T02720, T02730, T02790, T02800, T02810, T02820, T02840, T02850, T02860, T02870, T02880, T02890, T02900, T02910, T02920, T02930, T02940, T02950, T02960, T02970, T02980, T02990, T03000, T03020, T03100, T03110, T03120, T03130, T03140, T03150, T03160, T03170, T03190, T03200, T03210, T03220, T03230, T03240, T03250, T03260, T03270, T03280, T03290, T03300, T03310, T03320, T03330, T03340, T03350, T03360, T03370, T03380, T03390, T03400, T03410, T03420, T03430, T03450, T03460, T03470, T03480, T03490, T03500, T03510, T03520, T03530, T03540, T03550, T03560, T03570, T03580, T03590, T03600, T03610, T03620, T03630, T03640, T03650, T03660, T03670, T03680, T03690, T03700, T03710, T03720, T03730, T03740, T03750, T03760, T03770, T03771, T03772, T03773, T03774, T03775, T03800, T03810, T03820, T03830, T03840, T03900, T03920, T03950

Italian

File: webapp-cards-2.2-it.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00380, T02330, T02530, T02940, T03130, T03150, T03170, T03190, T03240, T03250, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

Dutch

File: webapp-cards-2.2-nl.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00500, T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03540, T03580, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

Russian

File: webapp-cards-2.2-ru.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00380, T01411, T02330, T02530, T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

hi

File: webapp-cards-3.0-hi.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T03390, T03400, T03410, T03560, T03570, T03610, T03620, T03630, T03640, T03650, T03670, T03680, T03690, T03700

Untranslated Tags

The following tags have identical text to English (not translated):

T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03772, T03774

Russian

File: webapp-cards-3.0-ru.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00380, T02330, T02530, T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03772, T03774

@abhijit9040
Copy link
Contributor Author

Hi @sydseter , The Elixir coverage failure is a pre-existing issue in the copi project and is unrelated to this Python/YAML refactor.
The MyPy errors were due to strict type checking on the new helper functions introduced in this PR. I’ve addressed those in the latest commit.

)

self.EDITION_CHOICES = ["all"] + sorted(list(editions))
self.LANGUAGE_CHOICES = ["all"] + sorted(list(languages))
Copy link
Collaborator

@sydseter sydseter Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The languages attribute in meta uses dash and not underline:

meta:
  languages: ["en", "es", "fr", "nl", "no-nb", "pt-br", "pt-pt", "it", "ru", "hu"]

The easiest, for now is to make sure you change "no-nb", "pt-br", "pt-pt" to "no_nb", "pt_br", "pt_pt" before using them in the script. Otherwise, we won't be able to create files for these languages.

@github-actions
Copy link
Contributor

Build artifacts:

Name Link
Output files cornucopia-build-files.d3a6f5a106e0b307832f85e33058566417a2f769.zip

Translation Check Report

The following sentences/tags have issues in the translations:

Spanish

File: eop-cards-5.0-es.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00105, T00140

Russian

File: eop-cards-5.0-ru.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00001, T00003, T00004, T00090, T00100, T00105, T00210, T00220, T00230, T00240, T00250, T00260, T00270, T00280, T00290, T00300, T00310, T00320, T00330, T00340, T00350, T00360, T00370, T00380, T00390, T00400, T00410, T00420, T00430, T00440, T00450, T00460, T00470, T00480

Russian

File: mobileapp-cards-1.0-ru.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00020, T00120, T00130, T00220, T00240, T00310, T00311, T00320, T00330, T00340, T00350, T00360, T00370, T00380, T00390, T00400, T00510, T00520, T00530, T00610, T01010, T01070, T01160, T01170, T01180, T01200, T01210, T01220, T01301, T01411, T02680, T02690, T02700, T02710, T02720, T02730, T02780, T03010

Russian

File: mobileapp-cards-1.1-ru.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00020, T00120, T00130, T00220, T00240, T00310, T00311, T00320, T00330, T00340, T00350, T00360, T00370, T00380, T00390, T00400, T00510, T00520, T00530, T00610, T01010, T01070, T01160, T01170, T01180, T01200, T01210, T01220, T01301, T01411, T02680, T02690, T02700, T02710, T02720, T02730, T02780, T03010

Spanish

File: webapp-cards-2.2-es.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00020, T00380, T02330, T02530, T02940, T03140, T03160, T03180, T03200, T03210, T03220, T03230, T03240, T03250, T03260, T03270, T03280, T03290, T03300, T03310, T03320, T03330, T03340, T03350, T03360, T03370, T03380, T03390, T03400, T03410, T03420, T03430, T03440, T03450, T03460, T03470, T03480, T03490, T03500, T03510, T03530, T03540, T03550, T03560, T03570, T03580, T03590, T03600, T03610, T03620, T03630, T03640, T03650, T03660, T03670, T03680, T03690, T03700, T03710, T03720, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775, T03800, T03810, T03820, T03830, T03840, T03850, T03860, T03870, T03900, T03950

French

File: webapp-cards-2.2-fr.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00200, T01100, T02330, T02530, T03110, T03120, T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

Hungarian

File: webapp-cards-2.2-hu.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T00005, T00161, T00162, T01301, T01311, T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00020, T00030, T00140, T00145, T00200, T00210, T00220, T00230, T00240, T00300, T00320, T00340, T00350, T00360, T00370, T00380, T00390, T00400, T00500, T00510, T00520, T00600, T00610, T00700, T00710, T00720, T00730, T00740, T00750, T00760, T00770, T00780, T00790, T00800, T00810, T00830, T00840, T00900, T00910, T00920, T01000, T01020, T01060, T01100, T01110, T01120, T01130, T01140, T01150, T01160, T01170, T01190, T01200, T01240, T01250, T01260, T01270, T01280, T01290, T01300, T01400, T01410, T01420, T01430, T01431, T01440, T01450, T01500, T01510, T01520, T01530, T01540, T01550, T01560, T01570, T01571, T01580, T01590, T01600, T01610, T01700, T01710, T01720, T01730, T01740, T01800, T01810, T01811, T01820, T01900, T01910, T01920, T01930, T01940, T01960, T01970, T01980, T02000, T02010, T02020, T02030, T02040, T02100, T02120, T02140, T02200, T02220, T02240, T02250, T02260, T02280, T02290, T02300, T02310, T02320, T02330, T02340, T02400, T02410, T02420, T02440, T02450, T02460, T02480, T02490, T02500, T02510, T02520, T02530, T02540, T02600, T02610, T02620, T02630, T02650, T02680, T02690, T02700, T02710, T02720, T02730, T02790, T02800, T02810, T02820, T02840, T02850, T02860, T02870, T02880, T02890, T02900, T02910, T02920, T02930, T02940, T02950, T02960, T02970, T02980, T02990, T03000, T03020, T03100, T03110, T03120, T03130, T03140, T03150, T03160, T03170, T03190, T03200, T03210, T03220, T03230, T03240, T03250, T03260, T03270, T03280, T03290, T03300, T03310, T03320, T03330, T03340, T03350, T03360, T03370, T03380, T03390, T03400, T03410, T03420, T03430, T03450, T03460, T03470, T03480, T03490, T03500, T03510, T03520, T03530, T03540, T03550, T03560, T03570, T03580, T03590, T03600, T03610, T03620, T03630, T03640, T03650, T03660, T03670, T03680, T03690, T03700, T03710, T03720, T03730, T03740, T03750, T03760, T03770, T03771, T03772, T03773, T03774, T03775, T03800, T03810, T03820, T03830, T03840, T03900, T03920, T03950

Italian

File: webapp-cards-2.2-it.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00380, T02330, T02530, T02940, T03130, T03150, T03170, T03190, T03240, T03250, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

Dutch

File: webapp-cards-2.2-nl.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00500, T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03540, T03580, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

no_nb

File: webapp-cards-2.2-no_nb.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00380, T01700, T02330, T02530, T03130, T03140, T03150, T03160, T03170, T03180, T03190, T03200, T03210, T03220, T03230, T03240, T03250, T03260, T03270, T03280, T03290, T03300, T03310, T03320, T03330, T03340, T03350, T03360, T03370, T03380, T03390, T03400, T03410, T03420, T03430, T03440, T03450, T03460, T03470, T03480, T03490, T03500, T03510, T03520, T03530, T03540, T03550, T03560, T03570, T03580, T03590, T03600, T03610, T03620, T03630, T03640, T03650, T03660, T03670, T03680, T03690, T03700, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

pt_br

File: webapp-cards-2.2-pt_br.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00380, T02250, T02290, T02310, T02330, T02450, T02490, T02510, T02530, T03100, T03110, T03120, T03130, T03140, T03150, T03160, T03170, T03180, T03190, T03200, T03210, T03220, T03230, T03240, T03250, T03260, T03270, T03280, T03290, T03300, T03310, T03320, T03330, T03340, T03350, T03360, T03370, T03380, T03390, T03400, T03410, T03420, T03430, T03440, T03450, T03460, T03470, T03480, T03490, T03500, T03510, T03520, T03530, T03540, T03550, T03560, T03570, T03580, T03590, T03600, T03610, T03620, T03630, T03640, T03650, T03660, T03670, T03680, T03690, T03700, T03710, T03720, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

pt_pt

File: webapp-cards-2.2-pt_pt.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00380, T02330, T02530, T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

Russian

File: webapp-cards-2.2-ru.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00380, T01411, T02330, T02530, T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

hi

File: webapp-cards-3.0-hi.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T03390, T03400, T03410, T03560, T03570, T03610, T03620, T03630, T03640, T03650, T03670, T03680, T03690, T03700

Untranslated Tags

The following tags have identical text to English (not translated):

T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03772, T03774

Russian

File: webapp-cards-3.0-ru.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00380, T02330, T02530, T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03772, T03774

@abhijit9040
Copy link
Contributor Author

Hi @sydseter , have a look on the changes . If any more changes needed.


# Only process card files with language codes
if "cards" in base_name and len(lang) == 2:
if "cards" in base_name and len(lang) in (2, 5):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lang codes can be 5 letters. Eg. pt-pt

@github-actions
Copy link
Contributor

Build artifacts:

Name Link
Output files cornucopia-build-files.5a4a31e5b8d48a73d73e12ca8f5dae412d2fc3d6.zip

Translation Check Report

The following sentences/tags have issues in the translations:

Spanish

File: eop-cards-5.0-es.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00105, T00140

Russian

File: eop-cards-5.0-ru.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00001, T00003, T00004, T00090, T00100, T00105, T00210, T00220, T00230, T00240, T00250, T00260, T00270, T00280, T00290, T00300, T00310, T00320, T00330, T00340, T00350, T00360, T00370, T00380, T00390, T00400, T00410, T00420, T00430, T00440, T00450, T00460, T00470, T00480

Russian

File: mobileapp-cards-1.0-ru.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00020, T00120, T00130, T00220, T00240, T00310, T00311, T00320, T00330, T00340, T00350, T00360, T00370, T00380, T00390, T00400, T00510, T00520, T00530, T00610, T01010, T01070, T01160, T01170, T01180, T01200, T01210, T01220, T01301, T01411, T02680, T02690, T02700, T02710, T02720, T02730, T02780, T03010

Russian

File: mobileapp-cards-1.1-ru.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00020, T00120, T00130, T00220, T00240, T00310, T00311, T00320, T00330, T00340, T00350, T00360, T00370, T00380, T00390, T00400, T00510, T00520, T00530, T00610, T01010, T01070, T01160, T01170, T01180, T01200, T01210, T01220, T01301, T01411, T02680, T02690, T02700, T02710, T02720, T02730, T02780, T03010

Spanish

File: webapp-cards-2.2-es.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00020, T00380, T02330, T02530, T02940, T03140, T03160, T03180, T03200, T03210, T03220, T03230, T03240, T03250, T03260, T03270, T03280, T03290, T03300, T03310, T03320, T03330, T03340, T03350, T03360, T03370, T03380, T03390, T03400, T03410, T03420, T03430, T03440, T03450, T03460, T03470, T03480, T03490, T03500, T03510, T03530, T03540, T03550, T03560, T03570, T03580, T03590, T03600, T03610, T03620, T03630, T03640, T03650, T03660, T03670, T03680, T03690, T03700, T03710, T03720, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775, T03800, T03810, T03820, T03830, T03840, T03850, T03860, T03870, T03900, T03950

French

File: webapp-cards-2.2-fr.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00200, T01100, T02330, T02530, T03110, T03120, T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

Hungarian

File: webapp-cards-2.2-hu.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T00005, T00161, T00162, T01301, T01311, T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00020, T00030, T00140, T00145, T00200, T00210, T00220, T00230, T00240, T00300, T00320, T00340, T00350, T00360, T00370, T00380, T00390, T00400, T00500, T00510, T00520, T00600, T00610, T00700, T00710, T00720, T00730, T00740, T00750, T00760, T00770, T00780, T00790, T00800, T00810, T00830, T00840, T00900, T00910, T00920, T01000, T01020, T01060, T01100, T01110, T01120, T01130, T01140, T01150, T01160, T01170, T01190, T01200, T01240, T01250, T01260, T01270, T01280, T01290, T01300, T01400, T01410, T01420, T01430, T01431, T01440, T01450, T01500, T01510, T01520, T01530, T01540, T01550, T01560, T01570, T01571, T01580, T01590, T01600, T01610, T01700, T01710, T01720, T01730, T01740, T01800, T01810, T01811, T01820, T01900, T01910, T01920, T01930, T01940, T01960, T01970, T01980, T02000, T02010, T02020, T02030, T02040, T02100, T02120, T02140, T02200, T02220, T02240, T02250, T02260, T02280, T02290, T02300, T02310, T02320, T02330, T02340, T02400, T02410, T02420, T02440, T02450, T02460, T02480, T02490, T02500, T02510, T02520, T02530, T02540, T02600, T02610, T02620, T02630, T02650, T02680, T02690, T02700, T02710, T02720, T02730, T02790, T02800, T02810, T02820, T02840, T02850, T02860, T02870, T02880, T02890, T02900, T02910, T02920, T02930, T02940, T02950, T02960, T02970, T02980, T02990, T03000, T03020, T03100, T03110, T03120, T03130, T03140, T03150, T03160, T03170, T03190, T03200, T03210, T03220, T03230, T03240, T03250, T03260, T03270, T03280, T03290, T03300, T03310, T03320, T03330, T03340, T03350, T03360, T03370, T03380, T03390, T03400, T03410, T03420, T03430, T03450, T03460, T03470, T03480, T03490, T03500, T03510, T03520, T03530, T03540, T03550, T03560, T03570, T03580, T03590, T03600, T03610, T03620, T03630, T03640, T03650, T03660, T03670, T03680, T03690, T03700, T03710, T03720, T03730, T03740, T03750, T03760, T03770, T03771, T03772, T03773, T03774, T03775, T03800, T03810, T03820, T03830, T03840, T03900, T03920, T03950

Italian

File: webapp-cards-2.2-it.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00380, T02330, T02530, T02940, T03130, T03150, T03170, T03190, T03240, T03250, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

Dutch

File: webapp-cards-2.2-nl.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00500, T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03540, T03580, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

no_nb

File: webapp-cards-2.2-no_nb.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00380, T01700, T02330, T02530, T03130, T03140, T03150, T03160, T03170, T03180, T03190, T03200, T03210, T03220, T03230, T03240, T03250, T03260, T03270, T03280, T03290, T03300, T03310, T03320, T03330, T03340, T03350, T03360, T03370, T03380, T03390, T03400, T03410, T03420, T03430, T03440, T03450, T03460, T03470, T03480, T03490, T03500, T03510, T03520, T03530, T03540, T03550, T03560, T03570, T03580, T03590, T03600, T03610, T03620, T03630, T03640, T03650, T03660, T03670, T03680, T03690, T03700, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

pt_br

File: webapp-cards-2.2-pt_br.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T01411

Untranslated Tags

The following tags have identical text to English (not translated):

T00380, T02250, T02290, T02310, T02330, T02450, T02490, T02510, T02530, T03100, T03110, T03120, T03130, T03140, T03150, T03160, T03170, T03180, T03190, T03200, T03210, T03220, T03230, T03240, T03250, T03260, T03270, T03280, T03290, T03300, T03310, T03320, T03330, T03340, T03350, T03360, T03370, T03380, T03390, T03400, T03410, T03420, T03430, T03440, T03450, T03460, T03470, T03480, T03490, T03500, T03510, T03520, T03530, T03540, T03550, T03560, T03570, T03580, T03590, T03600, T03610, T03620, T03630, T03640, T03650, T03660, T03670, T03680, T03690, T03700, T03710, T03720, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

pt_pt

File: webapp-cards-2.2-pt_pt.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00380, T02330, T02530, T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

Russian

File: webapp-cards-2.2-ru.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00380, T01411, T02330, T02530, T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03771, T03772, T03773, T03774, T03775

hi

File: webapp-cards-3.0-hi.yaml

Missing Tags

The following tags are present in the English version but missing in this translation:

T03390, T03400, T03410, T03560, T03570, T03610, T03620, T03630, T03640, T03650, T03670, T03680, T03690, T03700

Untranslated Tags

The following tags have identical text to English (not translated):

T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03772, T03774

Russian

File: webapp-cards-3.0-ru.yaml

Untranslated Tags

The following tags have identical text to English (not translated):

T00380, T02330, T02530, T03130, T03150, T03170, T03190, T03240, T03260, T03350, T03420, T03470, T03490, T03540, T03580, T03710, T03730, T03750, T03770, T03772, T03774

@abhijit9040
Copy link
Contributor Author

Hi @sydseter, Done! I’ve replaced the hardcoded length check with a more robust regex pattern:
^[a-z]{2}(-[a-z]{2})?$

This now correctly handles:

  • Standard 2-letter codes (e.g., en, es)
  • 5-letter regional codes (e.g., pt-pt, no-nb)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants