Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions babel.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion docs/devel/translate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ string replacement.
If you made changes to any gettext() string, please update the .pot file
using::

pybabel extract -F babel.cfg -o src/moin/translations/MoinMoin.pot \
pybabel extract -F pyproject.toml -o src/moin/translations/MoinMoin.pot \
-k "_ gettext L_ lazy_gettext N_ ngettext" \
--msgid-bugs-address "English <moin-user@python.org>" \
--copyright-holder "Moin Core Team, see http://moinmo.in/MoinCoreTeamGroup" \
Expand Down
16 changes: 15 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ classifiers = [
"Topic :: Text Processing :: Markup",
]
dependencies = [
"Babel >= 2.10.0", # internationalization support
"Babel >= 2.16.0", # internationalization support
"blinker >= 1.6.2", # event signalling (e.g. for change notification trigger)
"docutils >= 0.18.1", # reST markup processing
"Markdown >= 3.4.1", # Markdown markup processing
Expand Down Expand Up @@ -188,3 +188,17 @@ change_dir = ""
commands = [
["ruff", "check", "."]
]

[tool.babel.extractors]
# python works by default
jinja2 = "jinja2.ext:babel_extract"

[[tool.babel.mappings]]
method = "python"
pattern = "**/*.py"
encoding = "utf-8"

[[tool.babel.mappings]]
method = "jinja2"
pattern = ["**/templates/**/*.html", "**/templates/dictionary.js"]
encoding = "utf-8"
Loading