[Python-modules-commits] [pygtkspellcheck] 02/19: avoid-locales-conflict.diff

Raphaël Hertzog hertzog at moszumanska.debian.org
Mon Nov 21 21:02:36 UTC 2016


This is an automated email from the git hooks/post-receive script.

hertzog pushed a commit to branch master
in repository pygtkspellcheck.

commit e7298bf7d2e8107067bdeb2f12b8ccc306a20cc3
Author: Raphaël Hertzog <hertzog at debian.org>
Date:   Mon Nov 21 20:49:15 2016 +0100

    avoid-locales-conflict.diff
---
 l10n/compile_mo.py              | 2 +-
 src/gtkspellcheck/oxt_import.py | 3 ++-
 src/gtkspellcheck/spellcheck.py | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/l10n/compile_mo.py b/l10n/compile_mo.py
index 8bf0984..d8353af 100755
--- a/l10n/compile_mo.py
+++ b/l10n/compile_mo.py
@@ -31,7 +31,7 @@ def build_mo_files():
         po_file = os.path.join(po_dir, lang + '.po')
         lang_dir = os.path.join(locale_dir, lang)
         mo_dir = os.path.join(lang_dir, 'LC_MESSAGES')
-        mo_file = os.path.join(mo_dir, APP + '.mo')
+        mo_file = os.path.join(mo_dir, APP + str(sys.version_info.major) + '.mo')
         
         if not os.path.exists(mo_dir):
             os.makedirs(mo_dir)
diff --git a/src/gtkspellcheck/oxt_import.py b/src/gtkspellcheck/oxt_import.py
index 6dc9982..0ebc549 100644
--- a/src/gtkspellcheck/oxt_import.py
+++ b/src/gtkspellcheck/oxt_import.py
@@ -27,6 +27,7 @@ Extensions like the ones found here:
 """
 
 import os
+import sys
 import xml.dom.minidom
 import shutil
 import logging
@@ -37,7 +38,7 @@ from zipfile import ZipFile, BadZipfile
 __all__ = ['deflate_oxt']
 
 logger = logging.getLogger(__name__)
-_ = gettext.translation('pygtkspellcheck', fallback=True).gettext
+_ = gettext.translation('pygtkspellcheck' + str(sys.version_info.major), fallback=True).gettext
 
 def deflate_oxt(oxt_path, extract_path, override=False, move_path=None):
     """
diff --git a/src/gtkspellcheck/spellcheck.py b/src/gtkspellcheck/spellcheck.py
index f1288cf..0749c5f 100644
--- a/src/gtkspellcheck/spellcheck.py
+++ b/src/gtkspellcheck/spellcheck.py
@@ -70,7 +70,7 @@ if gettext.find('gedit'):
     _gedit = gettext.translation('gedit', fallback=True).gettext
     _ = lambda message: _gedit(_GEDIT_MAP[message]).replace('_', '')
 else:
-    _ = gettext.translation('pygtkspellcheck', fallback=True).gettext
+    _ = gettext.translation('pygtkspellcheck' + str(sys.version_info.major), fallback=True).gettext
 
 class SpellChecker(object):
     """

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pygtkspellcheck.git



More information about the Python-modules-commits mailing list