python-babel / babel

The official repository for Babel, the Python Internationalization Library
http://babel.pocoo.org/
BSD 3-Clause "New" or "Revised" License
1.34k stars 448 forks source link

doc: Missing documentation on configuration #1063

Open Huy-Ngo opened 10 months ago

Huy-Ngo commented 10 months ago

Overview Description

The page https://babel.pocoo.org/en/latest/messages.html has description of configuration format, however it does not mention the configuration file name anywhere, nor does any other pages.

The current description is also vague on which configuration options and which extractors are supported by default.

Expected Results

The documentation has details of info above.

akx commented 10 months ago

There is no single configuration filename; you'd use

  -F MAPPING_FILE, --mapping-file=MAPPING_FILE, --mapping=MAPPING_FILE
                        path to the mapping configuration file

to specify one when running a Babel CLI command. This is (admittedly vaguely) documented over at https://babel.pocoo.org/en/latest/setup.html#method-mapping (which is linked to from the page you mention).

Improvement PRs are welcome!

tomasr8 commented 3 months ago

Just putting it here, we should also add documentation for the new TOML config: https://github.com/python-babel/babel/pull/1108