]>
git.ipfire.org Git - thirdparty/babel.git/log
Julien Palard [Tue, 30 Oct 2018 22:50:35 +0000 (23:50 +0100)]
Using ABCs from collections instead of collections.abc is deprecated.
And it will stop working in Python 3.8 according to the warning.
Aarni Koskela [Mon, 20 Aug 2018 14:25:07 +0000 (17:25 +0300)]
Merge pull request #564 from cedk/skip-empty-msgid
Skip empty message when writing mo file
Cédric Krier [Sun, 19 Aug 2018 16:03:02 +0000 (18:03 +0200)]
Test empty translation uses fallback
Aarni Koskela [Sun, 19 Aug 2018 14:03:51 +0000 (17:03 +0300)]
Merge pull request #599 from fuzzmz/fix-repeated-suggestions-for-0
don't repeat suggestions in parse_decimal strict
Aarni Koskela [Sun, 19 Aug 2018 14:03:13 +0000 (17:03 +0300)]
Merge pull request #600 from briancappello/improve_glob_matching
add support to util.pathmatch for matching the start of a string
Brian Cappello [Wed, 15 Aug 2018 01:21:16 +0000 (19:21 -0600)]
add support to util.pathmatch for matching the start of a string
Serban Constantin [Fri, 3 Aug 2018 13:09:09 +0000 (16:09 +0300)]
don't repeat suggestions in parse_decimal strict
Don't repeat suggestions for `0.00` in languages
which use commas as delimiters combined with strict
mode.
Aarni Koskela [Fri, 20 Jul 2018 13:54:39 +0000 (16:54 +0300)]
Merge pull request #597 from BBOXX/error-msg-fix
Small fixes to avoid stack traces due to badly formatted .po file
Aarni Koskela [Fri, 20 Jul 2018 10:36:22 +0000 (13:36 +0300)]
Fix pofile test failure
Bryn Truscott [Thu, 19 Jul 2018 14:50:16 +0000 (15:50 +0100)]
Small fixes to avoid stack traces due to badly formatted .po file
Chris [Mon, 18 Jun 2018 20:43:32 +0000 (14:43 -0600)]
Bumped version requirement on pytz
Here you use the utc attribute on the _pytz object: https://github.com/python-babel/babel/blob/
23ca4bf2b187748e5e8372c6dae541fbcc5fbe5d /babel/util.py#L304
Which was added in this commit https://github.com/stub42/pytz/commit/
ae82fbc71b374a5a5b32bf3bbb38ebb97af6e715
Added the corrected version requirement for it's appearance
Aarni Koskela [Mon, 18 Jun 2018 13:57:50 +0000 (16:57 +0300)]
Merge pull request #590 from Changaco/strict-decimal-parsing
Add a strict mode to `parse_decimal()`
Changaco [Sun, 17 Jun 2018 07:55:02 +0000 (09:55 +0200)]
add a `suggestions` attribute to `NumberFormatError`
Changaco [Sun, 17 Jun 2018 07:17:02 +0000 (09:17 +0200)]
include more information in error message
Charly C [Sat, 16 Jun 2018 09:09:13 +0000 (11:09 +0200)]
add a `strict` mode to `parse_decimal()`
Fixes https://github.com/python-babel/babel/issues/589
Aarni Koskela [Wed, 13 Jun 2018 18:05:48 +0000 (21:05 +0300)]
Merge pull request #588 from jdufresne/https
Use https URLs throughout project where available
Jon Dufresne [Sun, 10 Jun 2018 02:44:44 +0000 (19:44 -0700)]
Use https URLs throughout project where available
Updated docs and code comments.
Aarni Koskela [Wed, 13 Jun 2018 12:54:07 +0000 (15:54 +0300)]
Merge pull request #587 from jdufresne/pypi
Update all pypi.python.org URLs to pypi.org
Aarni Koskela [Wed, 13 Jun 2018 12:53:26 +0000 (15:53 +0300)]
Merge pull request #585 from django-ftl/implement_currency_name_format_type
numbers: implement currency formatting with long display names.
Jon Dufresne [Sun, 10 Jun 2018 02:30:51 +0000 (19:30 -0700)]
Update all pypi.python.org URLs to pypi.org
For details on the new PyPI, see the blog post:
https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html
Luke Plant [Thu, 7 Jun 2018 12:21:19 +0000 (15:21 +0300)]
Simplify format_currency code by pulling out/using helpers.
In detail:
1. Use the already existing get_currency_name function which does
the plural form logic already.
2. Create a similar `get_currency_unit_pattern` function.
This function could be useful if someone wanted to write
something very similar to the _format_currency_long_name
functionality but with some different customizations,
so it is now publicly documented.
3. Simplify the _format_currency_long_name function - it
is now much flatter.
4. Add more tests to ensure certain cases are really covered.
(e.g. different unit patterns depending on the count)
An upshot of the changes is that we have reduced (and made more consistent)
the number of places where we need to peek into `Locale._data` -
get_currency_name and get_currency_unit_pattern are the only places that
babel.numbers does this.
Luke Plant [Thu, 7 Jun 2018 11:37:44 +0000 (14:37 +0300)]
Skip non-latn number formats for currency unit patterns
Luke Plant [Mon, 4 Jun 2018 17:53:28 +0000 (20:53 +0300)]
numbers: implement currency formatting with long display names.
Fixes #578
Aarni Koskela [Mon, 28 May 2018 14:08:31 +0000 (17:08 +0300)]
Become 2.6.0
Aarni Koskela [Mon, 28 May 2018 13:44:07 +0000 (16:44 +0300)]
Merge pull request #581 from python-babel/cldr-33
Use CLDR 33
Aarni Koskela [Mon, 28 May 2018 13:32:54 +0000 (16:32 +0300)]
Ignore .*cache, to ignore .pytest_cache
Aarni Koskela [Mon, 28 May 2018 13:22:03 +0000 (16:22 +0300)]
Download CLDR 33.0; fix test changes
Aarni Koskela [Mon, 28 May 2018 10:28:39 +0000 (13:28 +0300)]
Merge pull request #580 from python-babel/fix-test-warnings
Fix some deprecation warnings in tests
Aarni Koskela [Mon, 28 May 2018 10:12:29 +0000 (13:12 +0300)]
Merge pull request #579 from python-babel/number-sys-import
import_cldr: ignore non-Latin numbering systems
Aarni Koskela [Mon, 28 May 2018 10:01:28 +0000 (13:01 +0300)]
tox: passenv PYTHON_TEST_FLAGS so one can run `env PYTHON_TEST_FLAGS=-bb tox`
Aarni Koskela [Mon, 28 May 2018 09:58:09 +0000 (12:58 +0300)]
catalog: fix bytes-to-strings comparisons when parsing headers on Py3
Aarni Koskela [Mon, 28 May 2018 09:57:45 +0000 (12:57 +0300)]
_compat: add force_text a la Django
Aarni Koskela [Mon, 28 May 2018 09:39:11 +0000 (12:39 +0300)]
frontend: use ConfigParser.read_file() on Python 3
Aarni Koskela [Mon, 28 May 2018 09:37:17 +0000 (12:37 +0300)]
test_support: Don't use deprecated inspect methods
Aarni Koskela [Mon, 28 May 2018 09:34:31 +0000 (12:34 +0300)]
frontend, test_frontend: don't use deprecated U read mode on Py3
Aarni Koskela [Mon, 28 May 2018 09:33:44 +0000 (12:33 +0300)]
test_smoke: use format_decimal instead of format_number
Aarni Koskela [Mon, 28 May 2018 09:12:23 +0000 (12:12 +0300)]
import_cldr: ignore formatting rules for non-Latin numbering systems
Previously the script could have inadvertently merged formatting rules between numbering systems due to the XML selectors used. This makes sure only Latin rules are used for the time being. When support for other numbering systems is properly added (see #470), these checks can be changed.
Aarni Koskela [Mon, 28 May 2018 07:56:37 +0000 (10:56 +0300)]
Merge pull request #559 from python-babel/authors
Authors and license stuff
Aarni Koskela [Mon, 28 May 2018 07:55:40 +0000 (10:55 +0300)]
Merge pull request #557 from python-babel/messages-no-locale
Allow processing message files that are in locales unknown to Babel
Aarni Koskela [Fri, 18 May 2018 10:17:26 +0000 (12:17 +0200)]
Merge pull request #577 from akx/pattern-prec
Restore force_frac to NumberPattern.apply() (as deprecated)
Aarni Koskela [Mon, 7 May 2018 10:08:13 +0000 (13:08 +0300)]
Merge pull request #574 from PTrottier/patch-1
Month and Day must be valid tokens
Aarni Koskela [Mon, 7 May 2018 10:01:25 +0000 (13:01 +0300)]
Restore force_frac to NumberPattern.apply(), as deprecated
This retains backwards compatibility (at least as far as the function's
signature is concerned) with users that are using NumberPattern.apply()
directly.
See: https://github.com/python-babel/babel/issues/550
See: https://github.com/python-babel/babel/issues/569
PTrottier [Fri, 27 Apr 2018 14:42:56 +0000 (10:42 -0400)]
Month and Day must be valid tokens
````>>> dt = datetime(2007, 04, 01, 15, 30, tzinfo=UTC)
File "<stdin>", line 1
dt = datetime(2007, 04, 01, 15, 30, tzinfo=UTC)
^
SyntaxError: invalid token````
See: https://docs.python.org/3.5/library/datetime.html#datetime.datetime.month
Cédric Krier [Wed, 7 Mar 2018 23:16:47 +0000 (00:16 +0100)]
Skip empty message when writing mo file
Instead of using the msgid, this allows to have gettext fallback to
retrieve the translation. Otherwise gettext will anyway return msgid.
Aarni Koskela [Fri, 2 Feb 2018 16:52:10 +0000 (18:52 +0200)]
Rephrase copyright headers to link to the LICENSE file instead of COPYING
Fixes #398
Aarni Koskela [Fri, 2 Feb 2018 16:51:30 +0000 (18:51 +0200)]
Update copyright header years, and include the Babel team
Aarni Koskela [Fri, 2 Feb 2018 16:45:19 +0000 (18:45 +0200)]
Add script to generate the AUTHORS file and regenerate it
Aarni Koskela [Fri, 2 Feb 2018 16:23:36 +0000 (18:23 +0200)]
Merge pull request #558 from python-babel/currency-alt2
Ignore currency symbol alt forms
Aarni Koskela [Fri, 2 Feb 2018 15:52:47 +0000 (17:52 +0200)]
import_cldr: avoid importing alt=narrow currency symbols
Fixes #397
Closes #483, #556
Aarni Koskela [Fri, 2 Feb 2018 15:50:04 +0000 (17:50 +0200)]
import_cldr: choice patterns in currencies are deprecated, so remove todo
Aarni Koskela [Fri, 2 Feb 2018 15:29:52 +0000 (17:29 +0200)]
messages: allow processing files that are in locales unknown to Babel
Fixes #553, #555
Aarni Koskela [Fri, 2 Feb 2018 14:16:25 +0000 (16:16 +0200)]
Merge pull request #552 from python-babel/cldr-32
Use CLDR 32
Aarni Koskela [Tue, 30 Jan 2018 07:48:33 +0000 (09:48 +0200)]
Merge pull request #554 from xmo-odoo/patch-1
Add explicit signatures to some date autofunctions
xmo-odoo [Fri, 26 Jan 2018 10:14:57 +0000 (11:14 +0100)]
Add explicit signatures to some date autofunctions
Because default_locale is eager, it generates misleading documentation when built (including on the site) as the doc will show the LC_TIME for the machine which built the doc.
An explicit autofunction signature fixes that and provides a more correct view of the signature.
An alternative fix would be for the LC_TIME value in the module to be a custom object with a repr of LC_TIME or something along those lines.
Fixes #542
Aarni Koskela [Thu, 25 Jan 2018 16:17:06 +0000 (18:17 +0200)]
Test that CLDR 32 properly formats Russian start-of-year dates.
Fixes #485
Aarni Koskela [Fri, 19 Jan 2018 11:39:07 +0000 (13:39 +0200)]
Lists: add support for various list styles other than the default
This was inspired by the CLDR 32 release notes:
> New “disjunctive” list style (eg “a, b, or c”)
Aarni Koskela [Fri, 19 Jan 2018 11:27:44 +0000 (13:27 +0200)]
CLDR: Use CLDR 32.0.1
Aarni Koskela [Fri, 19 Jan 2018 11:31:17 +0000 (13:31 +0200)]
Update py.test
* Add py.test's .cache to ignore
* setup.cfg: Use [tool:pytest] instead of deprecated [pytest]
Aarni Koskela [Wed, 17 Jan 2018 10:48:10 +0000 (12:48 +0200)]
Merge pull request #456 from python-babel/cldr-30
Upgrade to CLDR 31
Aarni Koskela [Fri, 18 Aug 2017 10:14:46 +0000 (13:14 +0300)]
cldr: use CLDR 31.0.1 (and fix test changes); see below!
CLDR 31.0 separated the GMT and UTC time zones, so formatting of that
time zone has changed. Most notably, "UTC" replaces "+0000" when formatting
the timezone. This could break code that expects +0000.
A subset (the parts supported by Babel) of the migration guide from
http://cldr.unicode.org/index/downloads/cldr-31:
* The locales in the language-territory population tables have been changed to
be the canonical format, dropping the script where it is the default.
So "ku_Latn" changes to "ku".
* Plural rules: The Portuguese plural rules have changed so that all
(and only) integers and decimal fractions < 2 are singular.
* Timezones: The GMT timezone has been split from the UTC timezone.
* Timezones: New timezone bcp47 codes have been added.
* Languages "hr" and "sr" are no longer a short distance apart, for political reasons.
* The primary names for CZ changed from "Czech Republic" to
"Czechia", with the longer name now the alternate.
Aarni Koskela [Mon, 21 Nov 2016 14:39:53 +0000 (16:39 +0200)]
cldr: Parse compact decimal formats that appear in CLDR 30
Aarni Koskela [Mon, 21 Nov 2016 14:38:54 +0000 (16:38 +0200)]
cldr: use CLDR 30.0.2 (and fix test changes)
Aarni Koskela [Mon, 21 Nov 2016 14:38:14 +0000 (16:38 +0200)]
numbers: allow number patterns with no dynamic parts whatsoever
Aarni Koskela [Tue, 16 Jan 2018 15:36:32 +0000 (17:36 +0200)]
Merge pull request #532 from Bedrock02/invalid-po-issue-531
pofile.py: Added new exception called PoFileError and thrown if flagged
StevenJ [Mon, 25 Sep 2017 23:03:14 +0000 (16:03 -0700)]
pofile.py: Added new exception called PoFileError and thrown if flagged
This new exception is thrown when the po parser finds an invalid pofile.
This helps handle invalid po files that are parsed. Invalid po files may cause
other possible errors such as a UnicodeEncodeError.
Closes https://github.com/python-babel/babel/issues/531
Aarni Koskela [Tue, 16 Jan 2018 13:23:11 +0000 (15:23 +0200)]
Merge pull request #546 from hugovk/rm-eol
Drop support for EOL Python 2.6 and 3.3
Aarni Koskela [Mon, 15 Jan 2018 17:23:36 +0000 (19:23 +0200)]
Merge branch 'maint-25' to bring CHANGES and version up to date from 2.5.3
`git merge -X theirs maint-25`
Aarni Koskela [Mon, 15 Jan 2018 16:55:40 +0000 (18:55 +0200)]
Become 2.5.3
Aarni Koskela [Mon, 15 Jan 2018 10:43:52 +0000 (12:43 +0200)]
Become 2.5.2
Jakob Schnitzer [Thu, 28 Sep 2017 17:18:32 +0000 (19:18 +0200)]
Revert "Merge pull request #505 from wodo/pi_support"
This reverts commit
653e6d4f654f0f3cbce57054654e09c519b9e412 , reversing
changes made to
5f3b00854bbc6fa6a03e04ab572a609eebcc1f72 .
Jakob Schnitzer [Thu, 28 Sep 2017 17:17:42 +0000 (19:17 +0200)]
Revert "Also check for `sys._MEIPASS` before assuming PyInstallerness (#526)"
This reverts commit
0b34807ab3d9681bb653ac535e0fbc6f0ac3ffbb .
Aarni Koskela [Mon, 15 Jan 2018 12:18:03 +0000 (14:18 +0200)]
Merge pull request #528 from scop/escseq
Invalid string escape sequence related fixes
Aarni Koskela [Mon, 15 Jan 2018 10:43:52 +0000 (12:43 +0200)]
Become 2.5.2
Aarni Koskela [Mon, 15 Jan 2018 10:40:56 +0000 (12:40 +0200)]
Merge pull request #533 from yagebu/fix-pyinstaller
* Revert "Also check for `sys._MEIPASS` before assuming PyInstallerness (#526)" (
0b34807ab3d9681bb653ac535e0fbc6f0ac3ffbb )
* Revert "Merge pull request #505 from wodo/pi_support" (commit
653e6d4f654f0f3cbce57054654e09c519b9e412 , reversing
changes made to
5f3b00854bbc6fa6a03e04ab572a609eebcc1f72 )
Hugo [Thu, 28 Dec 2017 09:39:20 +0000 (11:39 +0200)]
Drop EOL Python 3.3
Hugo [Thu, 28 Dec 2017 09:13:50 +0000 (11:13 +0200)]
Replace comparison with None with equality operator
Hugo [Thu, 28 Dec 2017 09:12:01 +0000 (11:12 +0200)]
Remove unused imports
Hugo [Thu, 28 Dec 2017 09:06:59 +0000 (11:06 +0200)]
Remove redundant parentheses
Hugo [Wed, 27 Dec 2017 22:25:54 +0000 (00:25 +0200)]
Replace function call with set literal
Hugo [Wed, 27 Dec 2017 22:17:29 +0000 (00:17 +0200)]
Drop EOL Python 2.6 and 3.3
Ville Skyttä [Fri, 15 Sep 2017 21:08:07 +0000 (00:08 +0300)]
Simplify Linux distro specific explicit timezone setting search
Ville Skyttä [Fri, 15 Sep 2017 21:07:04 +0000 (00:07 +0300)]
Python 3.6 invalid escape sequence deprecation fixes
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
Kevin Deldycke [Fri, 7 Apr 2017 14:09:14 +0000 (16:09 +0200)]
Allow bypass of decimal quantization.
Jon Dufresne [Sat, 21 Oct 2017 16:49:07 +0000 (09:49 -0700)]
Test and document all supported Python versions
Add Python 3.6 to Travis CI and tox.
Add PyPy to tox.
Add trove classifiers for all supported versions. Helps package users
know if the library is compatible.
Jon Dufresne [Sat, 21 Oct 2017 16:47:07 +0000 (09:47 -0700)]
Include license file in the generated wheel package
The wheel package format supports including the license file. This is
done using the [metadata] section in the setup.cfg file. For additional
information on this feature, see:
https://wheel.readthedocs.io/en/stable/index.html#including-the-license-in-the-generated-wheel-file
Kevin Deldycke [Fri, 7 Apr 2017 14:09:14 +0000 (16:09 +0200)]
Refactor decimal handling code.
Aarni Koskela [Mon, 16 Oct 2017 09:48:32 +0000 (12:48 +0300)]
Merge pull request #537 from kdeldycke/tox-deps
Keep tox dependencies in sync
Kevin Deldycke [Mon, 16 Oct 2017 08:45:15 +0000 (10:45 +0200)]
Keep tox dependencies in sync with travis config.
Refs
1da04fd0af20162fe4e2b503a5fcae8f25267010 and #520.
Jakob Schnitzer [Thu, 28 Sep 2017 17:18:32 +0000 (19:18 +0200)]
Revert "Merge pull request #505 from wodo/pi_support"
This reverts commit
653e6d4f654f0f3cbce57054654e09c519b9e412 , reversing
changes made to
5f3b00854bbc6fa6a03e04ab572a609eebcc1f72 .
Jakob Schnitzer [Thu, 28 Sep 2017 17:17:42 +0000 (19:17 +0200)]
Revert "Also check for `sys._MEIPASS` before assuming PyInstallerness (#526)"
This reverts commit
0b34807ab3d9681bb653ac535e0fbc6f0ac3ffbb .
Aarni Koskela [Thu, 14 Sep 2017 10:04:32 +0000 (13:04 +0300)]
Become 2.5.1 (#527)
Aarni Koskela [Thu, 14 Sep 2017 09:47:05 +0000 (12:47 +0300)]
Also check for `sys._MEIPASS` before assuming PyInstallerness (#526)
Fixes #525
Jungmo Ku [Tue, 12 Sep 2017 13:25:24 +0000 (08:25 -0500)]
Allow normalize_locale and exists to handle various unexpected input (#523)
Resolves #521
Simeon Visser [Mon, 28 Aug 2017 19:35:32 +0000 (20:35 +0100)]
Fixed docstring of validate_currency function (#522)
Aarni Koskela [Mon, 21 Aug 2017 13:25:51 +0000 (16:25 +0300)]
Parse multi-line __future__ imports better (#519)
Augments #426
Augments #427
Augments #510
Narendra Vardi [Fri, 18 Aug 2017 14:48:26 +0000 (20:18 +0530)]
Use a fixed datetime to avoid test failures (#520)
freezegun library added to travis build and appveyor
Fixes #507
Aarni Koskela [Fri, 18 Aug 2017 08:58:20 +0000 (11:58 +0300)]
Become 2.5.0 (#518)
Aarni Koskela [Fri, 18 Aug 2017 08:34:06 +0000 (11:34 +0300)]
Date format: Use * parametrized format patterns instead of %%0%... (#517)
This is about 60% faster than the old version in a micro-benchmark.
Aarni Koskela [Fri, 18 Aug 2017 08:12:55 +0000 (11:12 +0300)]
Merge pull request #505 from wodo/pi_support
Introduce PyInstaller support. Fixes #500
Aarni Koskela [Fri, 18 Aug 2017 08:05:45 +0000 (11:05 +0300)]
Use Py.test's monkeypatch for PyInstaller tests