Skip to content

check: a locale file nobody listed is not silently ignored - #39

Merged
Na5co merged 1 commit into
mainfrom
claude/check-locale
Sep 23, 2026
Merged

Na5co merged 1 commit into
mainfrom
claude/check-locale

Conversation

@Na5co

@Na5co Na5co commented Sep 23, 2026

Copy link
Copy Markdown
Owner

The third gap this round of testing has found, and the same shape as the other two.

My own fixture added locales/it.json to the demo repository and forgot to list it in target_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: it is not in target_locales (polygo locales add it, or delete the file).

Details that keep it quiet when it should be:

  • Only names that are real language tags count — is_locale checks a language list — so locales/README.json and an Android values-night or values-w600dp are not mistaken for locales.
  • A file that does not parse keeps its syntax error instead of also being reported here; being unlisted is a consequence of the detector not being able to read it.
  • Without polygo.toml there 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

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>
@Na5co
Na5co merged commit 9d4cf0c into main Sep 23, 2026
2 checks passed
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.

1 participant