Skip to content
This repository was archived by the owner on Nov 11, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions static_gettext.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,14 @@ def __init__( self, domain, inputbase, localebase, outputbase, languages, extens
@staticmethod
def gettextIsAvailable():
requirements = { 'xgettext': False, 'msguniq': False , 'msgmerge': False }
extensions = os.environ.get("PATHEXT", "").split(os.pathsep)
for path in os.environ["PATH"].split( os.pathsep ):
for name in requirements:
file = os.path.join( path, name )
if not(requirements[name]) and os.path.exists(file) and os.access(file, os.X_OK):
requirements[name] = True;
base = os.path.join( path, name )
options = [base] + [(base + ext) for ext in extensions]
for file in options:
if not(requirements[name]) and os.path.exists(file) and os.access(file, os.X_OK):
requirements[name] = True;

for name in requirements:
if not requirements[name]:
Expand Down