Skip to content

Commit

Permalink
Ignore all non-.po files in po/ subfolder
Browse files Browse the repository at this point in the history
debian patch taken from [caja-rename_22.6.29-1.debian.tar.xz]
Author: Mike Gabriel <[email protected]>
  • Loading branch information
sc0w committed Sep 2, 2022
1 parent c8dde3c commit 4d0d704
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@

for strFilename in lstFilenames:

strLocale = os.path.splitext(strFilename)[0]
if not strFilename.endswith('.po'): continue

if strLocale != APPNAME:
strLocale = os.path.splitext(strFilename)[0]

strLocaleDir = 'data/usr/share/locale/' + strLocale + '/LC_MESSAGES/'
strLocaleDir = 'data/usr/share/locale/' + strLocale + '/LC_MESSAGES/'

if not os.path.isdir(strLocaleDir):
os.makedirs(strLocaleDir)
if not os.path.isdir(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'):

Expand Down

0 comments on commit 4d0d704

Please sign in to comment.