diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-05-26 20:55:26 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2016-05-26 20:55:26 +0900 |
commit | 2578f47664361b1b4c48fa1c7c3d01ade53eb32f (patch) | |
tree | e08c18e47ac5a82e5604d3053cfb056f4b37a8e9 /setup.py | |
parent | 08cfcbc363d684510dff3b2ed628a88a0e4d729a (diff) | |
parent | 2c351a1261a5eb414f0e03a4aa811ee798f79819 (diff) | |
download | sphinx-git-2578f47664361b1b4c48fa1c7c3d01ade53eb32f.tar.gz |
Merge branch 'stable'
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -98,6 +98,13 @@ else: def run(self): compile_catalog.run(self) + if isinstance(self.domain, list): + for domain in self.domain: + self._run_domain_js(domain) + else: + self._run_domain_js(self.domain) + + def _run_domain_js(self, domain): po_files = [] js_files = [] @@ -106,20 +113,20 @@ else: po_files.append((self.locale, os.path.join(self.directory, self.locale, 'LC_MESSAGES', - self.domain + '.po'))) + domain + '.po'))) js_files.append(os.path.join(self.directory, self.locale, 'LC_MESSAGES', - self.domain + '.js')) + domain + '.js')) else: for locale in os.listdir(self.directory): po_file = os.path.join(self.directory, locale, 'LC_MESSAGES', - self.domain + '.po') + domain + '.po') if os.path.exists(po_file): po_files.append((locale, po_file)) js_files.append(os.path.join(self.directory, locale, 'LC_MESSAGES', - self.domain + '.js')) + domain + '.js')) else: po_files.append((self.locale, self.input_file)) if self.output_file: @@ -127,7 +134,7 @@ else: else: js_files.append(os.path.join(self.directory, self.locale, 'LC_MESSAGES', - self.domain + '.js')) + domain + '.js')) for js_file, (locale, po_file) in zip(js_files, po_files): infile = open(po_file, 'r') |