Fix frontend to include languages that do not have iso-639-1 codes #4363
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As discovered by a contributor in this issue, our translations of the Saraiki language were not appearing in production. I realized that the language was being filtered out of our valid translations because it does not have a
langCodeIso_639_1
property in our code. This is because the language is part of the https://en.wikipedia.org/wiki/ISO_639-3 standard, which is essentially v3 of the list of international language codes, and our code was only including languages present in v1.Saraiki appears to be the only language impacted by this change
Testing Instructions
just frontend/run i18n
andjust frontend/run dev
locally and observe that the/skr
path now works. You could also count and confirm that the locale chooser now has 61 languages instead of the 60 in production, with running something like[...document.querySelectorAll('.language option')].length
in your browser's console.Checklist
Update index.md
).main
) or a parent feature branch.just catalog/generate-docs
for catalogPRs) or the media properties generator (
just catalog/generate-docs media-props
for the catalog or
just api/generate-docs
for the API) where applicable.Developer Certificate of Origin
Developer Certificate of Origin