]> git.ipfire.org Git - thirdparty/babel.git/log
thirdparty/babel.git
7 years agoBecome 2.5.3 551/head v2.5.3
Aarni Koskela [Mon, 15 Jan 2018 16:55:40 +0000 (18:55 +0200)] 
Become 2.5.3

7 years agoBecome 2.5.2
Aarni Koskela [Mon, 15 Jan 2018 10:43:52 +0000 (12:43 +0200)] 
Become 2.5.2

7 years agoRevert "Merge pull request #505 from wodo/pi_support"
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.

7 years agoRevert "Also check for `sys._MEIPASS` before assuming PyInstallerness (#526)"
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.

7 years agoBecome 2.5.1 (#527) v2.5.1
Aarni Koskela [Thu, 14 Sep 2017 10:04:32 +0000 (13:04 +0300)] 
Become 2.5.1 (#527)

7 years agoAlso check for `sys._MEIPASS` before assuming PyInstallerness (#526)
Aarni Koskela [Thu, 14 Sep 2017 09:47:05 +0000 (12:47 +0300)] 
Also check for `sys._MEIPASS` before assuming PyInstallerness (#526)

Fixes #525

7 years agoAllow normalize_locale and exists to handle various unexpected input (#523)
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

7 years agoFixed docstring of validate_currency function (#522)
Simeon Visser [Mon, 28 Aug 2017 19:35:32 +0000 (20:35 +0100)] 
Fixed docstring of validate_currency function (#522)

7 years agoParse multi-line __future__ imports better (#519)
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

7 years agoUse a fixed datetime to avoid test failures (#520)
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

7 years agoBecome 2.5.0 (#518) v2.5.0
Aarni Koskela [Fri, 18 Aug 2017 08:58:20 +0000 (11:58 +0300)] 
Become 2.5.0 (#518)

7 years agoDate format: Use * parametrized format patterns instead of %%0%... (#517)
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.

7 years agoMerge pull request #505 from wodo/pi_support
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

7 years agoUse Py.test's monkeypatch for PyInstaller tests 505/head
Aarni Koskela [Fri, 18 Aug 2017 08:05:45 +0000 (11:05 +0300)] 
Use Py.test's monkeypatch for PyInstaller tests

8 years agoAdd __str__ to DateTimePattern (#515)
Stefane Fermigier [Thu, 3 Aug 2017 18:22:46 +0000 (20:22 +0200)] 
Add __str__ to DateTimePattern (#515)

Fixes #514

8 years agoFix "Good Commits" link in CONTRIBUTING.md (#511)
Narayan Acharya [Thu, 3 Aug 2017 08:22:57 +0000 (13:52 +0530)] 
Fix "Good Commits" link in CONTRIBUTING.md (#511)

Closes https://github.com/python-babel/babel/issues/345

8 years agoDoc: always redirect to the python gettext module
François Magimel [Sun, 16 Jul 2017 16:20:31 +0000 (18:20 +0200)] 
Doc: always redirect to the python gettext module

The link to the python gettext module was dead. So, redirect the user
to the official doc.

8 years agoIntroduce PyInstaller support. Fixes #500
Wolfgang Doll [Fri, 23 Jun 2017 10:03:23 +0000 (12:03 +0200)] 
Introduce PyInstaller support. Fixes #500

Add a get_base_dir function that works in the context of
PyInstaller, where the __file__ system variable is
not available.

8 years agoMerge pull request #498 from rowillia/fix_bytes_warning_in_python3
Aarni Koskela [Sun, 4 Jun 2017 10:06:44 +0000 (13:06 +0300)] 
Merge pull request #498 from rowillia/fix_bytes_warning_in_python3

Fix an invalid string to bytes comparison in Python 3

8 years agoFix an invalid string to bytes comparison in Python 3 498/head
Roy Williams [Sat, 27 May 2017 00:04:27 +0000 (17:04 -0700)] 
Fix an invalid string to bytes comparison in Python 3

In Python 3 this branch would never evaluate to `True` due to comparing a string to bytes.

This was flagged by running some unit tests with the `-bb` flag, so I've added
`-bb` to run with the babel unit tests in Python3.5

Here's some docs on the `-bb` flag:
https://docs.python.org/3.5/library/warnings.html#default-warning-filters
https://docs.python.org/3/howto/pyporting.html#use-continuous-integration-to-stay-compatible

8 years agoMerge pull request #491 from kdeldycke/currency-utils
Aarni Koskela [Wed, 17 May 2017 17:45:50 +0000 (20:45 +0300)] 
Merge pull request #491 from kdeldycke/currency-utils

Add currency utilities and helpers.

8 years agoAdd currency utilities and helpers. 491/head
Kevin Deldycke [Fri, 7 Apr 2017 14:09:14 +0000 (16:09 +0200)] 
Add currency utilities and helpers.

8 years agoMerge pull request #492 from akx/in-place
Aarni Koskela [Mon, 10 Apr 2017 20:12:15 +0000 (23:12 +0300)] 
Merge pull request #492 from akx/in-place

Fixed in-place editing of dir list while iterating

8 years agoFixed in-place editing of dir list while iterating 492/head
Marc-André Dufresne [Wed, 8 Mar 2017 22:21:28 +0000 (17:21 -0500)] 
Fixed in-place editing of dir list while iterating

8 years agoMerge pull request #490 from python-babel/lenient-po-locale-parse 476/head
Aarni Koskela [Thu, 6 Apr 2017 12:01:51 +0000 (15:01 +0300)] 
Merge pull request #490 from python-babel/lenient-po-locale-parse

Allow both dash and underscore separated locale identifiers in pofiles

8 years agoAllow both dash and underscore separated locale identifiers in pofiles 490/head
Aarni Koskela [Thu, 6 Apr 2017 09:45:52 +0000 (12:45 +0300)] 
Allow both dash and underscore separated locale identifiers in pofiles

Fixes #489

Augments #420 (08b9c5e76e19ae)

8 years agoMerge pull request #488 from sublee/nested
Aarni Koskela [Fri, 31 Mar 2017 13:21:37 +0000 (16:21 +0300)] 
Merge pull request #488 from sublee/nested

Extract Python messages in nested gettext calls

8 years agoFix extraction bug on nested messages 488/head
Heungsub Lee [Fri, 31 Mar 2017 11:15:33 +0000 (20:15 +0900)] 
Fix extraction bug on nested messages

It fixes !487.

8 years agoRename test case
Heungsub Lee [Fri, 31 Mar 2017 11:15:28 +0000 (20:15 +0900)] 
Rename test case

8 years agoMore complex test cases for nested gettext
Heungsub Lee [Fri, 31 Mar 2017 11:14:26 +0000 (20:14 +0900)] 
More complex test cases for nested gettext

8 years agoAdd test case for nested gettext
Heungsub Lee [Fri, 31 Mar 2017 10:19:00 +0000 (19:19 +0900)] 
Add test case for nested gettext

8 years agoMerge pull request #482 from xavfernandez/order_by_context
Aarni Koskela [Fri, 24 Mar 2017 15:24:22 +0000 (17:24 +0200)] 
Merge pull request #482 from xavfernandez/order_by_context

Sort translations according to msgid and msgctxt

8 years agoMerge pull request #433 from akx/no-inheritance-marker
Aarni Koskela [Fri, 24 Mar 2017 15:13:39 +0000 (17:13 +0200)] 
Merge pull request #433 from akx/no-inheritance-marker

Properly fall back to `long` metazone names when short forms are no-inherit

8 years agoMerge pull request #480 from python-babel/release/2.4 v2.4.0
Aarni Koskela [Fri, 24 Mar 2017 14:42:44 +0000 (16:42 +0200)] 
Merge pull request #480 from python-babel/release/2.4

Release/2.4

8 years agoWhen msgid are equal, sort according to msgctxt 482/head
Xavier Fernandez [Tue, 21 Mar 2017 15:36:56 +0000 (16:36 +0100)] 
When msgid are equal, sort according to msgctxt

Fix #481

8 years agoSimplify Message.__cmp__
Xavier Fernandez [Tue, 21 Mar 2017 15:23:09 +0000 (16:23 +0100)] 
Simplify Message.__cmp__

8 years agoBecome version 2.4.0 480/head
Aarni Koskela [Tue, 14 Mar 2017 10:07:36 +0000 (12:07 +0200)] 
Become version 2.4.0

8 years agoDistill changes from git log into CHANGES
Aarni Koskela [Tue, 14 Mar 2017 09:53:04 +0000 (11:53 +0200)] 
Distill changes from git log into CHANGES

8 years agoMerge 2.3.x release branch
Aarni Koskela [Tue, 14 Mar 2017 08:32:00 +0000 (10:32 +0200)] 
Merge 2.3.x release branch

8 years agoMerge pull request #462 from singingwolfboy/regex-flags
Aarni Koskela [Fri, 10 Mar 2017 12:23:03 +0000 (14:23 +0200)] 
Merge pull request #462 from singingwolfboy/regex-flags

Pull flags out of regular expressions

8 years agoMerge pull request #466 from abhishekcs10/winmap
Aarni Koskela [Fri, 10 Mar 2017 08:57:04 +0000 (10:57 +0200)] 
Merge pull request #466 from abhishekcs10/winmap

Issue #463.

8 years agoMerge pull request #459 from alxpy/master
Lasse Schuirmann [Wed, 25 Jan 2017 12:11:32 +0000 (13:11 +0100)] 
Merge pull request #459 from alxpy/master

Fix setup.py option 'add_location'

8 years agoIssue #463. Changed win_mapping to windows_zone_mapping in core.py line 48 466/head
Abhishek Tiwari [Tue, 10 Jan 2017 17:22:06 +0000 (22:52 +0530)] 
Issue #463. Changed win_mapping to windows_zone_mapping in core.py line 48

8 years agoPull flags out of regular expressions 462/head
David Baumgold [Thu, 29 Dec 2016 05:00:23 +0000 (00:00 -0500)] 
Pull flags out of regular expressions

8 years agoFix setup.py option 'add_location' 459/head
Alex Kuzmenko [Thu, 15 Dec 2016 13:47:38 +0000 (15:47 +0200)] 
Fix setup.py option 'add_location'

8 years agoMerge pull request #452 from mbirtwell/fix_parsing_pofile_with_obsoletes
Aarni Koskela [Mon, 21 Nov 2016 14:54:07 +0000 (16:54 +0200)] 
Merge pull request #452 from mbirtwell/fix_parsing_pofile_with_obsoletes

Fix parsing pofile with obsoletes

8 years agoFix read_pofile handling of missing plurals 452/head
Michael Birtwell [Wed, 12 Oct 2016 16:46:06 +0000 (17:46 +0100)] 
Fix read_pofile handling of missing plurals

8 years agopofile reader: Fix multi line msgctxt
Michael Birtwell [Wed, 12 Oct 2016 16:15:43 +0000 (17:15 +0100)] 
pofile reader: Fix multi line msgctxt

8 years agopofile parsing. Fix handling of obsolete + refactor
Michael Birtwell [Wed, 12 Oct 2016 15:13:50 +0000 (16:13 +0100)] 
pofile parsing. Fix handling of obsolete + refactor

Fixes the handling of the unit before the obsolete unit.
Previously it would mark the unit before an obsolete unit as obsolete
also.

Some refactoring:
* the transition between finishing one unit and starting the next
is clearer
* separate the processing of keywords and continuation lines
* combine the reset and initialisation code
* Make the handling of strings consistent.
* Add some nascent error handling, removed some errors in test inputs

8 years agoMerge pull request #438 from rrader/add_location_option
Aarni Koskela [Mon, 21 Nov 2016 08:43:23 +0000 (10:43 +0200)] 
Merge pull request #438 from rrader/add_location_option

Add option 'add_location' for location line formatting

8 years agoMerge pull request #425 from georgschoelly/jsx_tests
Aarni Koskela [Sat, 19 Nov 2016 14:27:46 +0000 (16:27 +0200)] 
Merge pull request #425 from georgschoelly/jsx_tests

Increase coverage of JSX extraction tests

8 years agoIncrease coverage of JSX extraction tests 425/head
Georg Schölly [Sat, 25 Jun 2016 10:59:00 +0000 (12:59 +0200)] 
Increase coverage of JSX extraction tests

b5e0ad8 fixed a few bugs with jsx parsing but only added
tests for the lexer. This commit adds a test for the extraction
which did not work before:

    <tag>{ _"Text" }</tag>

This test case is not present yet in the suite, only tags with
attributes (<tag attr="value">) are, but they get extracted correctly
already.

8 years agoMerge pull request #450 from ldwoolley/patch-1
Aarni Koskela [Fri, 18 Nov 2016 15:15:10 +0000 (17:15 +0200)] 
Merge pull request #450 from ldwoolley/patch-1

Improve Date Fields descriptions for issue #419

8 years agoMerge pull request #435 from akx/exop
Aarni Koskela [Fri, 18 Nov 2016 15:14:36 +0000 (17:14 +0200)] 
Merge pull request #435 from akx/exop

Fix float conversion in `extract_operands` (and the relevant test)

8 years agoMerge pull request #396 from karloskar/feature/evolve-jsx-extraction-pt2
Aarni Koskela [Mon, 24 Oct 2016 12:06:52 +0000 (15:06 +0300)] 
Merge pull request #396 from karloskar/feature/evolve-jsx-extraction-pt2

jslexer.py: Change jsx_tag regex again

8 years agojslexer.py: Change jsx_tag regex again 396/head
KO. Mattsson [Mon, 25 Apr 2016 12:46:06 +0000 (14:46 +0200)] 
jslexer.py: Change jsx_tag regex again

We've had some syntactic variations that my previous PR, #392, did not
account for. One case had a component as a prop that tripped up the
regex.

8 years agoImprove Date Fields descriptions for issue #419 450/head
ldwoolley [Fri, 7 Oct 2016 23:39:04 +0000 (16:39 -0700)] 
Improve Date Fields descriptions for issue #419

Described recommendation to use "Y" with "w" for consistent results in ISO year-week and indicated possible surprising results for year rollover and total number of weeks in a year.

8 years agoMerge pull request #449 from roramirez/fix_spelling
Aarni Koskela [Wed, 5 Oct 2016 20:13:11 +0000 (23:13 +0300)] 
Merge pull request #449 from roramirez/fix_spelling

Fix spelling word into Raise TypeError

8 years agoFix spelling word into Raise TypeError 449/head
Rodrigo Ramírez Norambuena [Wed, 5 Oct 2016 18:56:33 +0000 (15:56 -0300)] 
Fix spelling word into Raise TypeError

8 years agoMerge pull request #436 from akx/correct-lies
Aarni Koskela [Wed, 21 Sep 2016 04:58:48 +0000 (07:58 +0300)] 
Merge pull request #436 from akx/correct-lies

Straighten up lying extraction docstrings

8 years agoMerge pull request #440 from jwilk/spelling
Aarni Koskela [Sat, 20 Aug 2016 17:20:23 +0000 (20:20 +0300)] 
Merge pull request #440 from jwilk/spelling

Fix typos

8 years agoFix typos 440/head
Jakub Wilk [Sat, 20 Aug 2016 17:02:14 +0000 (19:02 +0200)] 
Fix typos

8 years agoAdd option 'add_location' for location line formatting 438/head
Roman Rader [Tue, 9 Aug 2016 08:29:12 +0000 (11:29 +0300)] 
Add option 'add_location' for location line formatting

Support of add_location option added, can be either 'full', 'file'
or 'never'. 'full' includes both file and line number; 'file' includes
only the file name without line number; 'never' doesn't include the
location comment at all (same as --no-location).

9 years agoMerge pull request #437 from scop/misc
Aarni Koskela [Wed, 27 Jul 2016 06:09:07 +0000 (09:09 +0300)] 
Merge pull request #437 from scop/misc

Miscellaneous small improvements

9 years agoAbort catalog update earlier if there are no message catalogs 437/head
Ville Skyttä [Tue, 26 Jul 2016 20:33:52 +0000 (23:33 +0300)] 
Abort catalog update earlier if there are no message catalogs

9 years agoHandle file open/close with "with"
Ville Skyttä [Tue, 26 Jul 2016 20:31:43 +0000 (23:31 +0300)] 
Handle file open/close with "with"

9 years agoClose files earlier
Ville Skyttä [Tue, 26 Jul 2016 20:30:06 +0000 (23:30 +0300)] 
Close files earlier

9 years agoAvoid reading files entirely into memory
Ville Skyttä [Tue, 26 Jul 2016 20:28:10 +0000 (23:28 +0300)] 
Avoid reading files entirely into memory

9 years agoLet logging format messages on demand
Ville Skyttä [Tue, 26 Jul 2016 20:24:19 +0000 (23:24 +0300)] 
Let logging format messages on demand

9 years agoUse assertEqual instead of deprecated assertEquals
Ville Skyttä [Tue, 26 Jul 2016 20:23:56 +0000 (23:23 +0300)] 
Use assertEqual instead of deprecated assertEquals

9 years agoFix float conversion in `extract_operands` (and the relevant test) 435/head
Aarni Koskela [Fri, 15 Jul 2016 12:11:06 +0000 (15:11 +0300)] 
Fix float conversion in `extract_operands` (and the relevant test)

Fixes #421

9 years agoStraighten up lying extraction docstrings 436/head
Aarni Koskela [Fri, 15 Jul 2016 12:23:51 +0000 (15:23 +0300)] 
Straighten up lying extraction docstrings

Fixes #403

9 years agoProperly fall back to `long` metazone names when short forms are no-inherit 433/head
Aarni Koskela [Fri, 15 Jul 2016 11:13:09 +0000 (14:13 +0300)] 
Properly fall back to `long` metazone names when short forms are no-inherit

Thanks to @stringtheory for the bug report!

Fixes #428

9 years agoMerge pull request #431 from mshenfield/issue-430-revise-harcoded-plural-mappings
Aarni Koskela [Fri, 15 Jul 2016 09:28:56 +0000 (12:28 +0300)] 
Merge pull request #431 from mshenfield/issue-430-revise-harcoded-plural-mappings

Updated plurals.py to match Mozilla and CLDR references

9 years agoUpdated plurals.py to match Mozilla and CLDR references 431/head
Max Shenfield [Mon, 11 Jul 2016 15:17:15 +0000 (10:17 -0500)] 
Updated plurals.py to match Mozilla and CLDR references

This commit updates the plural rules, and in some cases the plural
number, for languages based on review of
https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals,
and
http://www.unicode.org/cldr/charts/29/supplemental/language_plural_rules.html.

I changed the interface (either the number of plurals, or the meaning
of each index), for the following languages:
• Arabic (ar): numplurals same, semantics differ per Mozilla's "Plural rule #12". 3 has been made more accurate, 4 has been switched with 5, and the meaning of both has been refined to match the rule.
• Belarusian (ar): numplurals updated to 3, using Mozilla's "Plural
rule #7". Previously the default, where anything except one is plural.
• Breton (br): numplurals updated to 6, using Mozilla's "Plural rule
• Bosnian (bs): numplurals updated to 3, using Mozilla's "Plural rule
• Irish Gaelic (ga): numplurals update from 3 to 5, using Mozilla's
"Plural rule #11". Cases have been added for n between 3 and 6, and n
between 7 and 10.
• Icelandic (is): same numplurals (2), semantics updated using
Mozilla's "Plural rule #15". 0 now means that n ends in 1, and is not
11, instead of just the number 1.
• Maltese (mt): same numplurals, same rule. Fixed rule, index 1 now
includes numbers ending in 1 (except the number 1)

I'm ignoring these two rules listed on the Mozilla resource
• Hungarian - listed as `(n != 1)`. It is not required to pluralize a
noun if a qualitative or quantitative amount precedes it
http://www.hungarianreference.com/plurals.aspx.
• Vietnamese - listed as `(n != 1)`. It only seems to have one plural
according to this lesson:
http://yourvietnamese.com/vietnamese-grammar/nouns-in-vietnamese/.

There are some additional languages listed in the Mozilla reference
that are not in the plurals document, and could be added:
• Lower Sorbian (dsb) (4, '(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 ||
n%100==4 ? 2 : 3)')
• Upper Sorbian (hsb) (4, '(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 ||
n%100==4 ? 2 : 3)')
• Scottish Gaelic (gd)  (4, '(n==1 || n==11 ? 0 : n==2 || n==12 ? 1 :
(n>=3 && n<=10) || (n>=13 && n<=19) ? 2 : 3)')
• Faroese (fo) (2, '(n != 1)')
• Frisian (fy) (2, '(n != 1)')
• Macedonian (mk) (3, '(n%10==1 ? 0 : n%10==2 ? 1 : 2)')

Closes https://github.com/python-babel/babel/issues/430

9 years agoMerge pull request #427 from sublee/issue-426
Aarni Koskela [Sat, 9 Jul 2016 09:51:11 +0000 (12:51 +0300)] 
Merge pull request #427 from sublee/issue-426

Python message extractor respects unicode_literals in __future__

9 years agoFix #426 427/head
Heungsub Lee [Fri, 1 Jul 2016 10:50:34 +0000 (19:50 +0900)] 
Fix #426

Parse compiler flags based on __future__ imports in Python codes.
Evaluate a string literal with the parsed compiler flags.

9 years agoMerge pull request #410 from etanol/decimal-control
Aarni Koskela [Fri, 8 Jul 2016 19:24:13 +0000 (22:24 +0300)] 
Merge pull request #410 from etanol/decimal-control

Allow full control on Decimal behaviour

9 years agoMerge pull request #373 from ykshatroff/fix-issue-372-wrong-plurals-for-cs-and-sk
Aarni Koskela [Fri, 8 Jul 2016 18:03:48 +0000 (21:03 +0300)] 
Merge pull request #373 from ykshatroff/fix-issue-372-wrong-plurals-for-cs-and-sk

Сorrect plural forms for cs and sk locales

9 years agoMerge pull request #420 from kruton/read-locale
Aarni Koskela [Fri, 8 Jul 2016 17:59:04 +0000 (20:59 +0300)] 
Merge pull request #420 from kruton/read-locale

Read locale from .po if it has Language header

9 years agoMerge pull request #424 from gardentechno/master
Aarni Koskela [Fri, 8 Jul 2016 17:58:14 +0000 (20:58 +0300)] 
Merge pull request #424 from gardentechno/master

Fix extraction order

9 years agoMerge pull request #429 from mbirtwell/multi_line_obsolete
Aarni Koskela [Fri, 8 Jul 2016 17:39:56 +0000 (20:39 +0300)] 
Merge pull request #429 from mbirtwell/multi_line_obsolete

Support reading multi line obsolete units in po files

9 years agoAccept catalog argument to PoFileParser 429/head
Michael Birtwell [Fri, 8 Jul 2016 17:08:48 +0000 (18:08 +0100)] 
Accept catalog argument to PoFileParser

Also make it not private and document it a bit.

9 years agoRemove osx build from travis.
Michael Birtwell [Fri, 8 Jul 2016 15:24:09 +0000 (16:24 +0100)] 
Remove osx build from travis.

Something in pyenv appears broken

9 years agoread_po: Support multiline obsolete units
Michael Birtwell [Fri, 8 Jul 2016 13:33:12 +0000 (14:33 +0100)] 
read_po: Support multiline obsolete units

9 years agoRefactor read_po to use a class for state
Michael Birtwell [Fri, 8 Jul 2016 13:10:28 +0000 (14:10 +0100)] 
Refactor read_po to use a class for state

This means we don't need to do tricks like have local variables which
are length 1 arrays to hold booleans

9 years agoMerge pull request #405 from akx/cldr-29
Aarni Koskela [Thu, 7 Jul 2016 18:30:06 +0000 (21:30 +0300)] 
Merge pull request #405 from akx/cldr-29

Use CLDR 29

9 years agoFix extraction order 424/head
Nicolas Grilly [Fri, 24 Jun 2016 19:49:06 +0000 (21:49 +0200)] 
Fix extraction order

Before Babel 2.3, the input directories were always extracted
in the order specified by the command line arguments.

For example, `pybabel extract dir_a dir_b dir_c` would process
`dir_a` first, then `dir_b`, and finally `dir_c`.

Since Babel 2.3, the inputs are stored in a Python dictionary,
and we loop over items in the dictionary using items().
This makes the order unspecified, not matching the order
specified on the command line anymore.

9 years agoFix day periods to work with CLDR 29 data 405/head
Aarni Koskela [Tue, 17 May 2016 06:21:46 +0000 (09:21 +0300)] 
Fix day periods to work with CLDR 29 data

9 years agoDownload CLDR 29 instead of 28
Aarni Koskela [Tue, 17 May 2016 05:55:30 +0000 (08:55 +0300)] 
Download CLDR 29 instead of 28

9 years agoRead locale from .po if it has Language header 420/head
Kenny Root [Fri, 17 Jun 2016 06:11:56 +0000 (23:11 -0700)] 
Read locale from .po if it has Language header

When a .po file was written out it would write the "Language"
header, but it wouldn't subsequently read that header back in. This
change makes that symmetric so you can write out a file and get back the
same Catalog by reading it in again.

Additionally other values like charset get overridden when the header is
read, so codify the behavior that the read "Language" header gets set as
the locale of the Catalog object.

9 years agoMerge pull request #414 from jtwang/407_jtwang_NumberPattern_preserves_raw_pattern
Aarni Koskela [Sat, 4 Jun 2016 16:38:08 +0000 (19:38 +0300)] 
Merge pull request #414 from jtwang/407_jtwang_NumberPattern_preserves_raw_pattern

parse_pattern now preserves original pattern #407

9 years agoparse_pattern now passes original pattern string to NumberPattern 414/head
Jennifer Wang [Thu, 2 Jun 2016 19:30:46 +0000 (12:30 -0700)] 
parse_pattern now passes original pattern string to NumberPattern

9 years agoMerge pull request #412 from adamchainz/readthedocs.io
Aarni Koskela [Sun, 29 May 2016 14:01:46 +0000 (17:01 +0300)] 
Merge pull request #412 from adamchainz/readthedocs.io

Convert readthedocs link for their .org -> .io migration for hosted projects

9 years agoConvert readthedocs link for their .org -> .io migration for hosted projects 412/head
Adam Chainz [Sun, 29 May 2016 13:50:32 +0000 (14:50 +0100)] 
Convert readthedocs link for their .org -> .io migration for hosted projects

As per their email ‘Changes to project subdomains’:

> Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard.

Test Plan: Manually visited all the links I’ve modified.

9 years agoMerge pull request #411 from etanol/proper-localtime-test
Aarni Koskela [Sun, 29 May 2016 10:08:26 +0000 (13:08 +0300)] 
Merge pull request #411 from etanol/proper-localtime-test

Fix the way a local time is constructed in tests

9 years agoFix the way local time is constructed in tests 411/head
Isaac Jurado [Sun, 29 May 2016 08:50:42 +0000 (10:50 +0200)] 
Fix the way local time is constructed in tests

In summer time zones, the test for "get_timezone_name" failed because the
construct used to obtain a local time did not deal properly with DST offsets.
As recommended by pytz, it is better to convert to local time from UTC.

9 years agoAdd a documentation section about number rounding 410/head
Isaac Jurado [Sun, 29 May 2016 08:26:07 +0000 (10:26 +0200)] 
Add a documentation section about number rounding

Explain how the user can control the behaviour of number rounding when
formatting numeric values or currencies.

9 years agoSimplify the selection of decimal implementation
Isaac Jurado [Sun, 29 May 2016 07:40:24 +0000 (09:40 +0200)] 
Simplify the selection of decimal implementation

Instead of selecting individual symbols, expose only the chosen decimal module
through babel._compat.  This forces Babel to always use "decimal." prefix.
Howver, it will simplify the code for users that need to manipulate the decimal
context.

9 years agoRemove explicit enforcement from Decimal rounding
Isaac Jurado [Sat, 28 May 2016 21:00:24 +0000 (23:00 +0200)] 
Remove explicit enforcement from Decimal rounding

Allow the rounding mode to be controlled from the currently active decimal
context.  This gives the caller the ability to control rounding mode, precision,
exponent range and all attributes that affect decimal operations.

Fixes #90