Bug fixes:
- Remove old way to run tests with setuptools [gforcada] (#114)
New features:
- Add support for python 3.12. [pbauer] (#113)
New features:
- Let i18n:ignore ignore all translatable strings in its scope. (#109)
Bug fixes:
- Remove Python 2 support code. Use pyupgrade, isort, black, flake8. [maurits] (#23)
Bug fixes:
- Fix pre-commit integration. [gforcada] (#1)
Breaking changes:
- Drop support for Python 2. Require Python 3.8+ (works with PyPy3 as well). [gforcada, maurits] (#50)
New features:
- Add pre-commit hook, for now only to find the strings not marked for translation. [gforcada] (#50)
Bug fixes:
- Fix encoding problem on prepare_cli_documentation command. [gforcada] (#101)
New features:
- Add boolean
--no-line-numbers
option torebuild-pot
. Use this to prevent including line numbers in pot files. The default is to still include them, so no behavior change. The default could change in the future. If you want to be sure to keep your line numbers in the future, use the new--line-numbers
option. [maurits] (#77)
Bug fixes:
- Leading spaces in comments are kept stable. (#91)
- Test on Python 3.10. No code changes needed. [maurits] (#310)
Bug fixes:
- Support the define syntax from Chameleon.
This is for the unpacking syntax, for example
tal:define="(text,url) python:view.linkinfo"
. This avoidsTALError: invalid define syntax
when extracting messages from templates that use this. [maurits] (#36)
New features:
i18ndude rebuild-pot --exclude="name1 name2"
now also accepts directory names for exclusion. Excluding a directory name will exclude all files in and below the given directory, but only if the directory name exactly matches a exclusion name (no globs, no substring match). This change now also results in the hardcoded exclusions for 'tests' and 'docs' to actually work. (#86)
Bug fixes:
- Test with GitHub Actions instead of Travis CI. [maurits] (#83)
- Support Python 3.9. No code changes were needed. [maurits] (#83)
- Do not raise AttributeError when content is None. (#84)
Bug fixes:
- The list command was wrongly showing 100% translated when the translations were at 99%. [vincentfretin] (#81)
Bug fixes:
- Drop 3.4 and 3.5 support, which we were not testing since a year. Test our 3.8 support. [maurits] (#79)
Bug fixes:
- Added hint in
rebuild-pot
help about unwanted domains in Python files. [maurits] (#49) - Fixed filter command on Python 3.7, and possibly earlier. [maurits] (#75)
Bug fixes:
- Disallow non-word characters (but do allow dashes) in
i18n:name
attributes when runningfind-untranslated
code analysis. [gyst] (#71)
New features:
- Replaced buildout with pip for setting up test environment. No longer test on Python 3.4 and 3.5. Do test on 3.7. Current test matrix: 2.7, 3.6, 3.7, pypy, pypy3. [maurits] (#66)
Bug fixes:
- When no arguments are given, show the help. This fixes error on some Python versions when calling 'bin/i18ndude' without arguments. [maurits] (#68)
New features:
- Add check for untranslated aria-label attributes on all elements. [janjaapdriessen]
Bug fixes:
- Fixed
plone.i18n
import. It was a conditional import to change the names of languages in the list, so nothing serious. But it always failed. [maurits] - In the readme, suggest
export PYTHONIOENCODING=utf-8
to fixUnicodeEncodeErrors
. (Note: notUnicodeDecodeErrors
.) Fixes issue 55. [maurits]
New features:
- In the
list
command, show only languages with existing po files, ordered by percentage. A new--tiered
option uses the traditional behavior with languages in a specific order in three tiers. [maurits]
Bug fixes:
- Sort files that we extract messages from. On Linux they were already sorted, but not on Mac, leading to a test failure. [maurits]
- Fixed another possible UnicodeDecodeError in find-untranslated. [maurits]
find-untranslated
no longer complains about attributes with chameleon syntax. An html tag withtitle="${context/Description}"
is no longer marked as having an untranslated title tag. Fixes issue 53. [maurits]
- Fixed some possible UnicodeDecodeErrors in find-untranslated. Fixes issue 52. [maurits]
- Create universal Python wheel. [maurits]
Breaking changes:
- Drop support for python 2.6 and older. Retain python2.7 support. [gyst]
New features:
- Support python 3.6, 3.5, 3.4, pypy and pypy3. [gyst]
Bug fixes:
- Removed
ordereddict
and`argparse
dependencies completely. [maurits] - Fixed many unicode/string/bytes handling problems. There's probably still some unfixed that need finding, given that test coverage is only 63%. [gyst]
Todo:
- i18ndude/pygettext.py:159: DeprecationWarning: the imp module is deprecated in favour of importlib. This does not cause any breakage though.
New:
- Support Chameleon repeat syntax in templates. Fixes issue #36. [maurits]
- Moved
plone.i18n
dependency to aplone
extra. This is only used for getting language names in thelist
command. We now fall back to using the language name that is in thepo
files. Fixes issue #44. [maurits]
New:
- In
find-untranslated
, do not report items that get replaced by Chameleon syntax. So<span>${view/test}</span>
will no longer get flagged as missing a translation. (Note that you still can addi18n:translate
if it makes sense, like Plone does for translating the dynamically calculated review state.) [Netroxen, maurits] - Find untranslated attributes now also checks for 'placeholder' attributes on input tags.
New:
- Allow use of regular expressions for --exclude parameter. For example,
use
*.py
to exclude all python files. This doesn't break existing behavior. Do remember to use quotes around the expression. [laulaz, maurits]
Fixes:
- Fixed some reported line numbers in find-untranslated. Fixes issue #34. [maurits]
New:
- Extract strings from zcml. Issue #28 [maurits]
- No longer print two blank lines at the end of .po and .pot files. [maurits]
- In the find-untranslated command, first try to parse a template as
xml, which is good for non-html files. If that fails, try to parse
it as html with a little help from the lxml HTMLPaser, which handles
html5 code much better. If that fails, use our trusty home grown
common.prepare_xml
function, which treats everything as old html. Note that we still usexml.sax
as the core parser here. Issue #15 [maurits] - Ignore hidden files in the find-untranslated command. Issue #29 [maurits]
- Use lxml instead of xml.etree or elementtree for parsing GenericSetup xml files. [maurits]
New:
- First try the original zope.tal parser. Only when this fails we try our own parser/generator. [maurits]
- Support Chameleon unnamed attributes without crashing. For example:
tal:attributes="python:{'data-something': 'chameleon-only'}"
[maurits] - Support chameleon attributes tal:switch and tal:case. Fixes issue #24. [ale-rt]
Fixes:
- Check
tal:condition
correctly when it is in atal:something
tag. [maurits] - In
find-untranslated
only ignoretal:condition="nothing"
, not other conditions. Fixes issue #16. [maurits] - Improved the
prepare_xml
function. This tries to work around templates that miss the usual boiler plate, likexmlns:i18n="http://xml.zope.org/namespaces/i18n"
. But there were some silly errors in it. This refs issue #16. [maurits]
- Fix
nosummary
option fromfind-untranslated
. It was reporting wrong information. [gforcada]
- Fix encoding errors with wrapAndQuoteString. [thet]
- Pep8. [thet]
- Releasing as Python wheel too. [maurits]
- Fixed wrapping when string contains newline. Issue #13 [maurits]
- Drop Python 2.6 support. It may still work, but the tests only run on Python 2.7. Note that it is fine to use one central i18ndude command for all your projects, no matter what Python version they are using. [janjaapdriessen, maurits]
- For the find-untranslated feature, add the possibility to mark a tag to be ignored by setting the "i18n:ignore" attribute on the tag. Also works for attributes with the "i18n:ignore-attributes" attribute. [janjaapdriessen]
- Avoid AttributeError: 'NoneType' object has no attribute 'comments'
when a
.po
file is missing an empty msgid and msgstr near the top. This is fixed automatically, although it will override some headers. [maurits]
- Wrap first line correctly. Fixes #9. [gforcada]
- Package housekeeping. [hvelarde]
trmerge
: do not override when the mixin translation is fuzzy. [maurits]trmerge
: add--no-override
argument. This means: do not override translations, only add missing translations. [maurits]trmerge
: add--ignore-extra
option. This ignores extra msgids in the second po-file. [maurits]
- Update script.py in some cases "arguments.exclude" is None. [giacomos]
- Fixed optional parameter exclude. [shylux]
- Add command line documentation to long description of package. [maurits]
- Add options
--wrap
,--no-wrap
and--width=NUMBER
to all commands that write files. Use these to determine whether long lines are wrapped and at which width. Default width is 79. By default we do NOT wrap, because we have never wrapped before. This may change in the future, so if you really want to be sure to not wrap when using a future i18ndude version, you can add--no-wrap
now. #3 [maurits] - Fix the
list
command to also work in alocales
structure. [maurits] - Fix an error in the
merge
command where the--merge
option would be used as value for the--merge2
option as well, if that option itself was unused. This led to unneeded warnings. [maurits] - The
--create domain
option ofrebuild-pot
is now optional. If not given, i18ndude reads the domain from the given.pot
file. It was always optional, but the documentation did not show it and it did not work. [maurits] - Update the command line options handling. You can now get the help
for individual commands by calling them with the
--help
option. [maurits] - Return exit code 1 when the called function gives an error. This
currently only has an effect when calling
find-untranslated
. #1 [maurits] - Moved code to https://github.com/collective/i18ndude [maurits]
- Backslash escape added to msgid when it includes double quotes. [taito]
- Add trmerge command to merge po files. Custom tailored for transifex. [do3cc]
- Encode key to utf-8 for the Merge-Warning message to avoid a UnicodeEncodeError. [mikerhodes]
- Fixed making POT file for DOUBLE BYTE strings on default. [terapyon]
- Replaced internal odict implementation by the ordereddict package. (implementation backported from Python 2.7) [vincentfretin]
- Avoid UnicodeDecodeError when printing warning message in add(). [rnix]
- elementtree is only required for Python < 2.5. [vincentfretin]
- Fixed tests (patch provided by John Trammell). [vincentfretin]
- Strip "src" only once in the pathname for the comments. Example: before it generated the following comment "#: archetypes.referencebrowserwidget/" which was not so useful. Now it generates "archetypes.referencebrowserwidget/src/archetypes/referencebrowserwidget/..." [vincentfretin]
- Support for explicit msgids in GSReader. [vincentfretin]
- Better handling of msgid references. Keep all the references in PTReader and PYReader. In POWriter, normalize and sort the references, write only MAX_OCCUR (default is 3) references. You can set MAX_OCCUR=None if you want all references to be written to the generated POT file. Only the first reference is written in case of several references to the same file but with different line number. [vincentfretin]
- Depend now on zope.tal 3.5.2 to print a warning when msgid already exists in catalog with a different default message. Simplified PTReader code. Check for msgid with different default in GSReader, PYReader and in the merged catalog (ptctl, pyctl, gsctl). [vincentfretin]
- Fix behaviour when dealing with broken xml files to be parsed. [afd]
- No changes. [hannosch]
For older changes, see docs/ChangeLog
.