mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
merge with stable
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user