aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/setup.py b/setup.py
index cf826cd..799d8d2 100755
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ for strRoot, lstDirnames, lstFilenames in os.walk('po'):
for strFilename in lstFilenames:
- if strFilename.endswith('po'):
+ if strFilename.endswith('.po'):
strLocale = os.path.splitext(strFilename)[0]
@@ -43,17 +43,19 @@ for strRoot, lstDirnames, lstFilenames in os.walk('po'):
for strFilename in lstFilenames:
- strLocale = os.path.splitext(strFilename)[0]
+ if strFilename.endswith('.po'):
- if strLocale != APPNAME:
+ strLocale = os.path.splitext(strFilename)[0]
+
+ if strLocale != APPNAME:
- strLocaleDir = 'data/locale/' + strLocale + '/LC_MESSAGES/'
+ strLocaleDir = 'data/locale/' + strLocale + '/LC_MESSAGES/'
- if not os.path.isdir(strLocaleDir):
+ if not os.path.isdir(strLocaleDir):
- os.makedirs(strLocaleDir)
+ os.makedirs(strLocaleDir)
- polib.pofile('po/' + strFilename).save_as_mofile(strLocaleDir + APPNAME + '.mo')
+ polib.pofile('po/' + strFilename).save_as_mofile(strLocaleDir + APPNAME + '.mo')
for strRoot, lstDirnames, lstFilenames in os.walk('data'):