forked from dmbasso/babel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support 'Language' header field of PO files (python-babel#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 python-babel#76.
- Loading branch information
1 parent
e14faa4
commit 9637d8b
Showing
3 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -380,6 +380,7 @@ def test_catalog_mime_headers_set_locale(): | |
('POT-Creation-Date', '1990-04-01 15:30+0000'), | ||
('PO-Revision-Date', '1990-08-03 12:00+0000'), | ||
('Last-Translator', 'John Doe <[email protected]>'), | ||
('Language', 'de_DE'), | ||
('Language-Team', 'de_DE <[email protected]>'), | ||
('Plural-Forms', 'nplurals=2; plural=(n != 1)'), | ||
('MIME-Version', '1.0'), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -359,6 +359,7 @@ def test_with_output_dir(self): | |
"POT-Creation-Date: 2007-04-01 15:30+0200\n" | ||
"PO-Revision-Date: %(date)s\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language: en_US\n" | ||
"Language-Team: en_US <[email protected]>\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1)\n" | ||
"MIME-Version: 1.0\n" | ||
|
@@ -409,6 +410,7 @@ def test_keeps_catalog_non_fuzzy(self): | |
"POT-Creation-Date: 2007-04-01 15:30+0200\n" | ||
"PO-Revision-Date: %(date)s\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language: en_US\n" | ||
"Language-Team: en_US <[email protected]>\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1)\n" | ||
"MIME-Version: 1.0\n" | ||
|
@@ -459,6 +461,7 @@ def test_correct_init_more_than_2_plurals(self): | |
"POT-Creation-Date: 2007-04-01 15:30+0200\n" | ||
"PO-Revision-Date: %(date)s\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language: lv_LV\n" | ||
"Language-Team: lv_LV <[email protected]>\n" | ||
"Plural-Forms: nplurals=3; plural=(n%%10==1 && n%%100!=11 ? 0 : n != 0 ? 1 :" | ||
" 2)\n" | ||
|
@@ -511,6 +514,7 @@ def test_correct_init_singular_plural_forms(self): | |
"POT-Creation-Date: 2007-04-01 15:30+0200\n" | ||
"PO-Revision-Date: %(date)s\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language: ja_JP\n" | ||
"Language-Team: ja_JP <[email protected]>\n" | ||
"Plural-Forms: nplurals=1; plural=0\n" | ||
"MIME-Version: 1.0\n" | ||
|
@@ -568,6 +572,7 @@ def test_supports_no_wrap(self): | |
"POT-Creation-Date: 2007-04-01 15:30+0200\n" | ||
"PO-Revision-Date: %(date)s\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language: en_US\n" | ||
"Language-Team: en_US <[email protected]>\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1)\n" | ||
"MIME-Version: 1.0\n" | ||
|
@@ -626,6 +631,7 @@ def test_supports_width(self): | |
"POT-Creation-Date: 2007-04-01 15:30+0200\n" | ||
"PO-Revision-Date: %(date)s\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language: en_US\n" | ||
"Language-Team: en_US <[email protected]>\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1)\n" | ||
"MIME-Version: 1.0\n" | ||
|
@@ -884,6 +890,7 @@ def test_init_with_output_dir(self): | |
"POT-Creation-Date: 2007-04-01 15:30+0200\n" | ||
"PO-Revision-Date: %(date)s\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language: en_US\n" | ||
"Language-Team: en_US <[email protected]>\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1)\n" | ||
"MIME-Version: 1.0\n" | ||
|
@@ -934,6 +941,7 @@ def test_init_singular_plural_forms(self): | |
"POT-Creation-Date: 2007-04-01 15:30+0200\n" | ||
"PO-Revision-Date: %(date)s\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language: ja_JP\n" | ||
"Language-Team: ja_JP <[email protected]>\n" | ||
"Plural-Forms: nplurals=1; plural=0\n" | ||
"MIME-Version: 1.0\n" | ||
|
@@ -980,6 +988,7 @@ def test_init_more_than_2_plural_forms(self): | |
"POT-Creation-Date: 2007-04-01 15:30+0200\n" | ||
"PO-Revision-Date: %(date)s\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language: lv_LV\n" | ||
"Language-Team: lv_LV <[email protected]>\n" | ||
"Plural-Forms: nplurals=3; plural=(n%%10==1 && n%%100!=11 ? 0 : n != 0 ? 1 :" | ||
" 2)\n" | ||
|