Repository navigation
Recognise en-US and other English variants as the source in check - #116
Merged
Merged
Conversation
- Without a localhero.json, only a plain en counted as English; en-US.json projects got the language with the most keys as source - US English wins among several English variants; a plain en still comes first - The info line now says "English is present"
…urce # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes localheroai/localhero-ai#827.
Without a
localhero.json,checktreated only a plainenas English. A project whose English file isen-US.json(the most common JavaScript naming) fell through to "the language with the most keys", so every locale was compared with, say, Arabic. In a 40-repo run over popular open-source apps this hit 9 repos, e.g. formbricks →ar-EG, umami →az-AZ, mealie →af-ZA, lobe-chat →zh-CN.Now: a plain
enfirst as before, elseen-US/en_US(any case), else the first otheren-*/en_*variant. The gettext and.potrules keep their precedence. The info line reads "English is present" instead of "en is present".Verified
en-USand files pair correctly (real key counts, no "Not checked"); open-webui, cal.com, saleor-dashboard and lago-front picken.en-USsource pairsen-US.jsonwithde.jsonandlocales/en-US/withlocales/de/.