merge with stable

This commit is contained in:
shimizukawa
2015-07-25 18:15:09 +02:00
18 changed files with 104 additions and 36 deletions
+10
View File
@@ -30,3 +30,13 @@ msgstr "SOME OTHER TERM"
msgid "The corresponding definition #2"
msgstr "THE CORRESPONDING DEFINITION #2"
msgid "Some term with"
msgstr "SOME TERM WITH"
msgid "classifier1"
msgstr "CLASSIFIER1"
msgid "classifier2"
msgstr "CLASSIFIER2"
@@ -9,3 +9,6 @@ Some term
Some other term
The corresponding definition #2
Some term with : classifier1 : classifier2
The corresponding definition
+4 -1
View File
@@ -183,7 +183,10 @@ def test_text_builder(app, status, warning):
u"\nSOME TERM"
u"\n THE CORRESPONDING DEFINITION\n"
u"\nSOME OTHER TERM"
u"\n THE CORRESPONDING DEFINITION #2\n")
u"\n THE CORRESPONDING DEFINITION #2\n"
u"\nSOME TERM WITH : CLASSIFIER1 : CLASSIFIER2"
u"\n THE CORRESPONDING DEFINITION\n"
)
yield assert_equal, result, expect
# --- glossary terms: regression test for #1090
+4 -4
View File
@@ -20,7 +20,7 @@ from util import with_tempdir
def test_catalog_info_for_file_and_path():
cat = i18n.CatalogInfo('path', 'domain')
cat = i18n.CatalogInfo('path', 'domain', 'utf-8')
assert cat.po_file == 'domain.po'
assert cat.mo_file == 'domain.mo'
assert cat.po_path == path.join('path', 'domain.po')
@@ -28,7 +28,7 @@ def test_catalog_info_for_file_and_path():
def test_catalog_info_for_sub_domain_file_and_path():
cat = i18n.CatalogInfo('path', 'sub/domain')
cat = i18n.CatalogInfo('path', 'sub/domain', 'utf-8')
assert cat.po_file == 'sub/domain.po'
assert cat.mo_file == 'sub/domain.mo'
assert cat.po_path == path.join('path', 'sub/domain.po')
@@ -38,7 +38,7 @@ def test_catalog_info_for_sub_domain_file_and_path():
@with_tempdir
def test_catalog_outdated(dir):
(dir / 'test.po').write_text('#')
cat = i18n.CatalogInfo(dir, 'test')
cat = i18n.CatalogInfo(dir, 'test', 'utf-8')
assert cat.is_outdated() # if mo is not exist
mo_file = (dir / 'test.mo')
@@ -52,7 +52,7 @@ def test_catalog_outdated(dir):
@with_tempdir
def test_catalog_write_mo(dir):
(dir / 'test.po').write_text('#')
cat = i18n.CatalogInfo(dir, 'test')
cat = i18n.CatalogInfo(dir, 'test', 'utf-8')
cat.write_mo('en')
assert path.exists(cat.mo_path)
assert read_mo(open(cat.mo_path, 'rb')) is not None