Skip to content

Commit

Permalink
Put back the TRANSLATION_DIRECTORIES variable as deprecated (instead …
Browse files Browse the repository at this point in the history
…of completely removed).
  • Loading branch information
davidlesieur committed Aug 3, 2024
1 parent 7ab7837 commit 33bfbdc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
19 changes: 12 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,16 @@ documentation.

## Unreleased changes

Features:
New features:

- Add the "Resource language" facet. It is disabled by default, but can be
enabled by setting the `kerko.facets.language.enabled` configuration parameter
to `true`. By default, Kerko will try to normalize the language names to make
the facet more usable; see `kerko.facets.language.` in the configuration
parameters documentation for details.

Backwards incompatible changes:
Removed features:

- The Python variable `kerko.TRANSLATION_DIRECTORIES` is renamed to
`kerko.TRANSLATION_DIRECTORY`, and its type is a string instead of a list. If
you have a custom application, you may need to adapt it accordingly (check
KerkoApp's `__init__.py` for an example).
- Custom translation management commands that depended on Setuptools and
`setup.py` have been removed. Equivalent `pybabel` commands can be used
instead (see the updated Localization section of the documentation).
Expand All @@ -36,10 +32,19 @@ Other changes:
- Move project metadata from `setup.cfg` to `pyproject.toml`.
- Build distribution package with Hatch instead of Setuptools.
- Use dynamic package versioning so that installers such as `pip` do not mistake
a development version for a previously published version.
a development version for a previously published version. Version numbers are
now extracted from the tags and revisions of the Git repository.
- Reduce XML sitemaps size.
- Improve documentation.

Deprecated APIs:

- The Python variable `kerko.TRANSLATION_DIRECTORIES` is deprecated and will be
removed in Kerko 2.x. The variable `kerko.TRANSLATION_DIRECTORY` should be
used instead, and its type is a string instead of a list. If you are using a
custom application, please adapt it accordingly (you may check KerkoApp's
`__init__.py` for an example).


## 1.1.0 (2023-12-23)

Expand Down
3 changes: 3 additions & 0 deletions src/kerko/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# the following domain and translation directory to its Babel configuration.
TRANSLATION_DOMAIN = "kerko"
TRANSLATION_DIRECTORY = str(pathlib.Path(__file__).parent / "translations")
TRANSLATION_DIRECTORIES = [ # DEPRECATED: Remove in Kerko 2.x.
str(pathlib.Path(__file__).parent / "translations")
]

try:
DEFAULTS = load_toml(pathlib.Path(__file__).parent / "default_config.toml")
Expand Down

0 comments on commit 33bfbdc

Please sign in to comment.