Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ config.h
doc/Doxyfile
doc/html/
doc/docbuild/
doc/locale/pot

MYMETA.*
pm_to_blib
Expand Down
19 changes: 19 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,25 @@
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
locale_dirs = ['locale/']
gettext_compact = False

## HACK for Read-the-Docs
## Generate .mo files just in time
if os.environ.get('READTHEDOCS') == 'True':
import polib
print "Generating .mo files",
for locale_dir in locale_dirs:
for path, dummy, filenames in os.walk(locale_dir):
for filename in filenames:
po_file = os.path.join(path, filename)
base, ext = os.path.splitext(po_file)
if ext == ".po":
mo_file = base + ".mo"
po = polib.pofile(po_file)
po.save_as_mofile(fpath=mo_file)
print "done"
## End of HACK

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down
2 changes: 2 additions & 0 deletions doc/pip_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
polib>=1.0.3