mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Check compiled message catalogs are processable with gettext.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
import gettext
|
||||
import os
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
@@ -62,3 +63,6 @@ def test_gettext(app):
|
||||
assert (app.outdir / 'en' / 'LC_MESSAGES' / 'test_root.mo').isfile(), 'msgfmt failed'
|
||||
finally:
|
||||
os.chdir(cwd)
|
||||
|
||||
_ = gettext.translation('test_root', app.outdir, languages=['en']).ugettext
|
||||
assert _("Testing various markup") == u"Testing various markup"
|
||||
|
||||
Reference in New Issue
Block a user