Hint: use https://github.com/solaluset/i18nice/compare/v<version 1 (older)>...v<version 2 (newer)>
to see full code difference between versions
- Paths with hyphens are now supported
- Fixed outdated docstring
- Locale can now be passed as positional argument
- (pb) A dict will be considered plural only if all keys are plurals
- (pb) Positional arguments will not be passed to functions that don't have anything between brackets
- (B) Changed custom functions again. Now it is
lambda *a, **kw: a[kw["count"] != 1]
.
- Updated README
- (B) Changed custom functions interface. If you've used them, you basically need to change
lambda **kw: kw["count"] != 1
tolambda a, **kw: a[kw["count"] != 1]
.
- Minor README fix
- Fixed PyPI upload
- Updated links due to account renaming
- Moved to trusted publishing
- Removed check for
json
availability - Improved README
- Added
use_locale_dirs
setting - Improved file search
- Config reloading is now more consistent
- Fixed #25
- (pb) Invalid placeholders will always emit an error
- Added
py.typed
- Added
_list
kwarg tot
(only for type checkers) - (B)
fallback
is nowNone
by default - (pb) Setting
locale
andfallback
to the same value will now result infallback
beingNone
- Error thrown on missing translation now mentions the locale
- Missing translation is now reported with requested locale instead of fallback one
- Minor optimizations
- Simplified static refs pattern
- Added support for braceless placeholders and escaped delimiters
- (pb) If a function registered with
i18n.add_function
raisesKeyError
, it will be reraised instead of being treated as a missing placeholder
- Fixed links on PyPI
- (B) Removed
default=
kwarg ofi18n.t()
. You can work around this change with a custom handler like this - Added docstrings to public API
- Added
__all__
to most files - Added support for
None
asfallback
- (pb) Made memoization enabled by default
- Added
lock=
kwarg toload_everything()
- Added flake8 and mypy checks
- Enabled and ensured branch coverage
- Added
__all__
to packages - Added more type hints
- Fixed static references not expanding
- Fixed strict pluralization with translation tuples
- Created
dev-helper.py
for pre-commit and GA - Made
PythonLoader
throw more verbose error
- (pb)
i18n.get("filename_format")
will returnFilenameFormat
instead of string. You can accesstemplate
attribute to get the original string.set
will continue to work as usual. - More flexible filename formats
- Type hints for public APIs
- New functions
load_everything
andunload_everything
- 100% coverage
- Minor optimizations
- Added static references feature
- Added full translation list support
- Added PyPI publishing
- (pb) Switched to
yaml.BaseLoader
- Improved memoization (again)
- Rewrote
PythonLoader
- (B) Removed old
error_on_missing_*
settings - Improved memoization
- Improved file loading and fixed bugs
- Improved exceptions
- Added
reload_everything()
- (B) Removed deprecated
other
plural
- Trying to set inexistent setting will now raise KeyError
- Added custom functions
- Fixed settings not updating properly
- (B) Dropped Python 2
- Added
on_missing_*
hooks