David Stanek [Thu, 5 Sep 2013 17:15:57 +0000 (13:15 -0400)]
Updates a catalog's header to from the template
A language specific catalog's initial header is based on the template
when it is created. Updates to the template's header were previously
not getting into the catalog during the update_catalog process.
Aarni Koskela [Sun, 20 Dec 2015 19:29:21 +0000 (21:29 +0200)]
Update to CLDR 28 (with test updates)
* Aside from the usual data changes, the provisional aa locale is no longer,
so we can't use it for tests. Instead, ii is used (chosen by virtue of ii.xml
being fairly small, i.e. probably as incomplete as aa).
* ms_Latn_SG is not in use anymore either; use sr_Latn_ME instead.
Lasse Schuirmann [Mon, 21 Dec 2015 09:50:45 +0000 (10:50 +0100)]
catalog: Remove unneeded documentation
Those documentation comments aren't adding any new information compared
to the documentation comment of their respective functions and are thus
redundant.
Those comments where introduced first in 7ab115ce with no notice why
they exist.
Aarni Koskela [Sun, 20 Dec 2015 22:43:39 +0000 (00:43 +0200)]
Test/CI: Add requisite doctest flags; ignore setup.py and venvs
This requires a newer version of py.test, so the requirement is pinned in
the CI configuration.
See https://pytest.org/latest/doctest.html
See https://pytest.org/latest/example/pythoncollection.html#customizing-test-collection-to-find-all-py-files
Michael Birtwell [Wed, 21 Oct 2015 21:01:59 +0000 (22:01 +0100)]
plurals: Fix selection for chinese
Provide only one option in chinese. The 3 previous options where all the
same any how and I've checked with a chinese colleague she thinks that
applies to all variants on the chinese language.
Refactor the get_plural tests a bit so they are split up to test specific
things
Isaac Jurado [Sun, 11 Oct 2015 12:26:04 +0000 (14:26 +0200)]
tests: Use the automatically chosen Decimal class
Now that the babel._compat module can automatically select a faster decimal
implementation if available, be more consistent across the rest of the code when
dealing with Decimal instances.
Isaac Jurado [Sun, 4 Oct 2015 18:49:23 +0000 (20:49 +0200)]
numbers: Use cdecimal by default when available
The drop-in replacement cdecimal is a CPython extension that implements the same
decimal interface with a much better performance. Whenever it is installed, we
favour its use.
Isaac Jurado [Sun, 11 Oct 2015 12:20:01 +0000 (14:20 +0200)]
travis: Add new environments that install cdecimal
For the next change, we will need alternate environments for Python 2.6 and 2.7
where the cdecimal module can be installed and tested. This commit adds new
environments to Tox and Travis to automate the process.
Isaac Jurado [Sun, 4 Oct 2015 18:36:02 +0000 (20:36 +0200)]
numbers: Implement rounding with Decimal
Drop the old bankersround related code and implement rounding using the decimal
module instead. This change will enable some other goodies such as: use the
drop-in replacement cdecimal when available, or allow for more rounding
algorithms by exposing one more parameter.
Todd M. Guerra [Wed, 30 Sep 2015 20:11:06 +0000 (16:11 -0400)]
setup: change to using include_package_data
Instead of manually writing includes to various package data,
we now just set include_package_data to True to make it more efficient.
Reference: http://pythonhosted.org/setuptools/setuptools.html#new-and-changed-setup-keywords
Craig Loftus [Mon, 17 Aug 2015 09:34:59 +0000 (10:34 +0100)]
Retain the behaviour of format in numbers.format_currency
Previous commit introduced an API change by changing the behaviour of
the format param, instead this commit adds a format_type param and the
documentation and tests to accompany it.
Note that currency_formats returns a NumberPattern already, so there is
no need to call parse_pattern on the value returned.
Isaac Jurado [Sun, 16 Aug 2015 09:27:03 +0000 (11:27 +0200)]
numbers: Properly load and expose currency format types
The type of the currency format (e.g. "standard", "accounting") was not
interpreted correctly from the CLDR data. Now there should not be any currency
format identified by "None".
Isaac Jurado [Mon, 17 Nov 2014 17:42:33 +0000 (18:42 +0100)]
numbers: New parameter to override precision
The NumberFormat class uses the amount of decimal digits specified by
the given format. We want to be able to ignore the amount of decimal
digits under some special circumstances.
Care must be taken since the NumberFormat instances seem to be cached.
Lasse Schuirmann [Tue, 22 Sep 2015 21:46:08 +0000 (23:46 +0200)]
localedata: Rename to locale-data
To fix the ImportError because of the name clash with localedata.py.
locale-data is no valid python identifier and thus a nice indicator that
this directory actually contains data.
Lasse Schuirmann [Fri, 25 Sep 2015 17:16:48 +0000 (19:16 +0200)]
setup.cfg: Remove date tagging
This would tag every release with the date which is not what we want for
the production releases. We can use dev0 for local releases and generate
a version number including a date for development releases we will
introduce later.
Lasse Schuirmann [Fri, 25 Sep 2015 17:15:15 +0000 (19:15 +0200)]
babel: Change version to 2.2.0.dev0
We will from now on use the maintenance branches only for bugfix only
releases (i.e. micro versions) to avoid all this backporting. Because of
this, what we develop on master will be the 2.2 version.
This will revalidate a PR at least naively (i.e. only for one platform
and python version) right before doing the actual merge and thus may
prevent breaking master.