Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-07-05 13:56:21 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-07-05 13:56:21 +0300
commit1a223209f2d4fcba1db97599bca8826baa6f3b20 (patch)
treedc73e29344ea9aa15ec0e57eccce9ba7bc2aca71 /setup.py
parentec3754bd94eaa3aa3c5410ee6ab100bb27bfb798 (diff)
parentfc7d805b5cdf96fec0f315a8fd06903eac73fbf9 (diff)
Merge branch '3.x'
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 7462e4977..48c546a15 100644
--- a/setup.py
+++ b/setup.py
@@ -139,7 +139,7 @@ else:
domain + '.js'))
for js_file, (locale, po_file) in zip(js_files, po_files):
- with open(po_file) as infile:
+ with open(po_file, encoding='utf8') as infile:
catalog = read_po(infile, locale)
if catalog.fuzzy and not self.use_fuzzy:
@@ -157,13 +157,13 @@ else:
msgid = msgid[0]
jscatalog[msgid] = message.string
- with open(js_file, 'wt') as outfile:
+ with open(js_file, 'wt', encoding='utf8') as outfile:
outfile.write('Documentation.addTranslations(')
dump({
'messages': jscatalog,
'plural_expr': catalog.plural_expr,
'locale': str(catalog.locale)
- }, outfile, sort_keys=True)
+ }, outfile, sort_keys=True, indent=4)
outfile.write(');')
cmdclass['compile_catalog'] = compile_catalog_plusjs