Skip to content

Document how to exclude files from message extraction - #1532

Open
n0liu wants to merge 1 commit into
python-babel:masterfrom
n0liu:docs/explain-ignore-mappings
Open

n0liu wants to merge 1 commit into
python-babel:masterfrom
n0liu:docs/explain-ignore-mappings

Conversation

@n0liu

@n0liu n0liu commented Dec 3, 2026

Copy link
Copy Markdown

Fixes #124.

The extraction guide lists the ignore method, but doesn't show what path a rule sees or which rule wins when two match the same file. The INI and TOML examples now exclude vendor/**.py before the usual Python mapping. A CLI example shows why src/vendor/example.py is matched as vendor/example.py when the input directory is src.

I ran both config examples with pybabel extract (Babel 2.18.0) on a small tree: the app message was extracted, and the two vendored messages were not. Reversing the mappings extracted all three messages in both formats. I also rendered the edited section with Sphinx 9.2.0 and warnings treated as errors; I did not run the full documentation build.

🤖 Generated with Claude Code

Show the ignore mapping before the Python extractor and explain how an input directory determines the paths matched by both mapping formats.

Co-Authored-By: Claude Code <noreply@anthropic.com>

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.

Excluding files from message extraction is under-documented (ignore)

1 participant