Skip to content

Allow catalog updates without new fuzzy flags - #1418

Open
ada-wh525 wants to merge 1 commit into
python-babel:masterfrom
ada-wh525:ada-wh525/update-without-fuzzy
Open

ada-wh525 wants to merge 1 commit into
python-babel:masterfrom
ada-wh525:ada-wh525/update-without-fuzzy

Conversation

@ada-wh525

Copy link
Copy Markdown

Updating a source message to correct a spelling mistake currently marks its reused translation as fuzzy, even when the translation remains valid. Disabling fuzzy matching also prevents that translation from being reused.

Add pybabel update --no-fuzzy-flags and the corresponding Catalog.update(no_fuzzy_flags=True) option. This allows translations to be reused without adding a fuzzy flag solely because the message ID changed.

Default behavior remains unchanged. Existing fuzzy flags and checks for changes to singular/plural structure are preserved.

Includes CLI documentation and tests covering singular/plural messages, contexts, existing flags, previous IDs, and PO file updates.

Validation:

  • Python 3.14 full suite: 7,962 passed, 7 skipped, 2 xfailed.
  • All pre-commit checks passed.
  • Source distribution and wheel builds succeeded.

Closes #1030

Add an opt-in update option for source spelling corrections whose
translations remain valid. Keep existing fuzzy flags and plural-shape
checks, and cover both the catalog API and PO file updates.

Closes python-babel#1030

This branch has not been deployed

No deployments
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.

Feature request: Update catalogs with fuzzy matching, but don't add fuzzy flags

1 participant