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
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.
Isaac Jurado [Wed, 5 Nov 2014 16:15:08 +0000 (17:15 +0100)]
localedata: Check inheritance exceptions first
When deriving the parent locale from the given name, look first in the
inheritance exception list. This will cover cases like "es_MX", which
parent is "es_419" and not "es".
Felix Yan [Wed, 26 Mar 2014 14:43:14 +0000 (14:43 +0000)]
Support 'Language' header field of PO files (#76)
GNU gettext has support for the 'Language' field in header entry since
version 0.18 (May 2010). This commit adds support for the field and
addresses #76.
This allows merging via github comments. The comment `@rultor merge`
will execute the script (which currently doesn't do anything) and if it
succeeds will perform the merge.
I plan to use rultor later for:
* Automatic deployment to PyPI (development releases directly from
master, we do this already in coala, see
https://github.com/coala-analyzer/coala/blob/master/.rultor.yml)
* Automatic releasing with deployment to PyPI.
* Veryfy that all CI services pass before merging (see
https://github.com/yegor256/rultor/issues/869)
With this any manual pushes to master are disallowed, all pushes to
master have to be validated by continuous integration and reviewed by a
non-committer.
.idea stores settings for PyCharm, ~ files are temporary files e.g. used
by gedit. .swp is used by vim. We don't want any of those to be
accidentally committed in the repo.
Philip_Tzou [Sat, 1 Aug 2015 21:03:14 +0000 (14:03 -0700)]
Fixed issue #109: `ImportWarning` warned when `import babel`
`localedata.py` uses the same name with folder `localedata/`, which
Python will try to load `localdata/__init__.py` and warn `ImportWarning`
if the file not found.
If try to filter the `ImportWarning` as an error like this: