Skip to content

Commit 80b7cd7

Browse files
committed
making translatons a package
1 parent ba1d185 commit 80b7cd7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

setup.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
# -*- coding: utf-8 -*-
33

44

5-
import glob
65
import os
76
import os.path
87
import platform
98
import re
109
import sys
10+
from fnmatch import fnmatch
1111

1212
from distutils import cmd
1313
from distutils.command.build import build
@@ -63,9 +63,10 @@ def initialize_options(self):
6363
# localization
6464
if using_translations:
6565
for lang in os.listdir(translations_dir):
66-
data_files.append((os.path.join('share', 'locale', lang, 'LC_MESSAGES'),
67-
['%s/%s/LC_MESSAGES/bpython.mo' %
68-
(translations_dir, lang)]))
66+
if fnmatch(lang, '??_??'):
67+
data_files.append((os.path.join('share', 'locale', lang, 'LC_MESSAGES'),
68+
['%s/%s/LC_MESSAGES/bpython.mo' %
69+
(translations_dir, lang)]))
6970

7071
cmdclass = dict(build_py=build_py,
7172
build = build)

0 commit comments

Comments
 (0)