fix: restore gettext plural-form support in lint-po#1725
Merged
Conversation
Pin lint-po to himdel/lint-po@efadbca via [tool.uv.sources] so scaffolded projects regain msgid_plural / msgstr[N] parsing. PyPI 0.1.4 (Nov 2022) predates the upstream plural-support PRs (#3, #4) merged in March 2026, and the previous switch to `uvx lint-po` (#1609) silently lost that feature. Run the linter via `uv run --frozen lint-po` (justfile + pre-commit hook) so resolution happens once at `uv sync` time instead of hitting GitHub on every invocation — addresses the original transient-failure motivation behind #1609 too. Pin can be dropped for a normal version constraint once a new PyPI release lands (tracked at himdel/lint-po#5). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
davidpoblador
pushed a commit
that referenced
this pull request
Apr 28, 2026
🤖 I have created a release *beep* *boop* --- ## [10.8.0](v10.7.0...v10.8.0) (2026-04-28) ### Features * add BrandSettings env-var surface for favicon and email branding ([#1720](#1720)) ([3d22717](3d22717)) * i18n primitives for per-tenant locale flows ([#1718](#1718)) ([177fe5e](177fe5e)) ### Bug Fixes * restore gettext plural-form support in lint-po ([#1725](#1725)) ([fe0dacb](fe0dacb)) * **template:** scope babel.cfg python extraction to src/ ([#1722](#1722)) ([b729964](b729964)) * theme default screens with DaisyUI semantic tokens ([#1714](#1714)) ([4467168](4467168)) ### Performance Improvements * **testing:** share MongoDB across vibetuner_db tests ([#1726](#1726)) ([c9064e4](c9064e4)) ### Miscellaneous Chores * **py:** use PEP 639 SPDX license expression ([#1727](#1727)) ([855f9f4](855f9f4)) ### Documentation Updates * **i18n:** clarify locale_names vs language_picker overlap ([#1723](#1723)) ([87733bd](87733bd)) * **template:** document i18n primitives in scaffolded agent rules ([#1724](#1724)) ([27a3b98](27a3b98)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3 tasks
davidpoblador
added a commit
that referenced
this pull request
May 5, 2026
## Summary - `lint-po 0.1.5` shipped to PyPI on **2026-05-05** with gettext plural-form support, resolving the upstream release request at [himdel/lint-po#5](himdel/lint-po#5). - Drops the temporary `[tool.uv.sources]` git pin introduced in #1725 (which closed #1719) and bumps the dev dep to `lint-po>=0.1.5`. - The justfile recipe and pre-commit hook already use `uv run --frozen lint-po`, so no other changes are needed. ## Test plan - [x] Confirmed `lint-po==0.1.5` accepts a Babel-generated plural `.po` (`msgid_plural` / `msgstr[0..1]`) — exit 0. - [x] Confirmed `lint-po==0.1.5` still flags placeholder mismatches in `msgstr[1]` — exit 1, same diagnostic as the pinned SHA. - [ ] Smoke `just lint-po` and the pre-commit hook on a freshly scaffolded project after merge. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <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.
Summary
lint-porejects Babel-generatedmsgid_plural/msgstr[N]entries, blockingjust linton any locale that uses{% trans count=… %}{% pluralize %}{% endtrans %}.lint-pois still 0.1.4 (Nov 2022), which predates the gettext plural-form support merged upstream ashimdel/lint-po#3and#4(Mar 2026). Switching to PyPI in fix: use PyPI package for lint-po instead of git+https #1609 silently regressed the feature.lint-poto upstream master atefadbcaa50f84135ee4f16efa44d99d2662a74b4via[tool.uv.sources]in the scaffoldedpyproject.toml.uvx lint-potouv run --frozen lint-poso resolution happens once atuv synctime instead of hitting GitHub on every invocation — also addresses the transient-failure motivation behind fix: use PyPI package for lint-po instead of git+https #1609.[tool.uv.sources]pin in favor of a normal version constraint.Test plan
uvx lint-poagainst a Babel-generated plural.po(exit 1, "Unexpected input" warnings).uv lock+uv sync --frozenin a smoke-test project.uv run --frozen lint-po(exit 0).msgstr[1]in a plural entry (exit 1).just lint-poand pre-commitlint-pohook on a real scaffolded project after merge.🤖 Generated with Claude Code