Repository navigation
check: a locale file nobody listed is not silently ignored - #39
Merged
Merged
Conversation
A repository adds locales/it.json and forgets to put `it` in target_locales: polygo checked nothing in it and said the project was fine — a translator's whole language, unlooked at. The same shape as the unparsable file, and found the same way: a test fixture did exactly this and the reviewer reported a clean pull request. `locale` (warning) names the file and what to do. Only real language tags count, so a README.json or an Android values-night is not mistaken for a locale, and a file that does not parse keeps its syntax error rather than being reported twice for the same cause. Corpus fingerprint unchanged: detection lists every locale it finds, so a project without polygo.toml has nothing to warn about. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The third gap this round of testing has found, and the same shape as the other two.
My own fixture added
locales/it.jsonto the demo repository and forgot to listitintarget_locales. polygo checked nothing in that file and reported the pull request as clean — a translator's entire language, silently unlooked at. A real project does this the first time it adds a language.locale(warning): nothing in this file is checked:itis not in target_locales (polygo locales add it, or delete the file).Details that keep it quiet when it should be:
is_localechecks a language list — solocales/README.jsonand an Androidvalues-nightorvalues-w600dpare not mistaken for locales.syntaxerror instead of also being reported here; being unlisted is a consequence of the detector not being able to read it.polygo.tomlthere is nothing to warn about: detection lists every locale it finds, so the file is simply checked. The corpus fingerprint is byte-identical.Tests: the unlisted file is a warning (not an error), listing the locale makes it go and the real placeholder bug in that file appear, and Android qualifier directories stay unflagged.
🤖 Generated with Claude Code