diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-11-10 16:30:25 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-11-10 17:00:32 +0100 |
commit | 5e3c0acf54f5bbece7a78f928cfc11cc28f04369 (patch) | |
tree | 4da57c2e5c8ffb0d2e87ec269837716774cadbe0 | |
parent | dca874f0ea1832e01b641e7569f0a42a7e6a8ad4 (diff) | |
download | ayatana-settings-5e3c0acf54f5bbece7a78f928cfc11cc28f04369.tar.gz ayatana-settings-5e3c0acf54f5bbece7a78f928cfc11cc28f04369.tar.bz2 ayatana-settings-5e3c0acf54f5bbece7a78f928cfc11cc28f04369.zip |
setup.py: Only translate .po files in po/ subdir (ignore e.g. the LINGUAS file).
-rwxr-xr-x | setup.py | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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'): + + strLocale = os.path.splitext(strFilename)[0] - if strLocale != APPNAME: + 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'): |