Tools: Detect and use pyside2-lupdate in ts tools
This commit is contained in:
@@ -65,9 +65,9 @@ DirFilter = ["^Attic$",
|
||||
|
||||
# python folders that need a special pylupdate command
|
||||
PyCommands = [["src/Mod/Draft",
|
||||
"pylupdate *.py Resources/ui/*.ui -ts Resources/translations/Draft.ts"],
|
||||
'pylupdate `find ./ -name "*.py"` Resources/ui/*.ui -ts Resources/translations/Draft.ts'],
|
||||
["src/Mod/Arch",
|
||||
"pylupdate *.py Resources/ui/*.ui -ts Resources/translations/Arch.ts"],
|
||||
'pylupdate `find ./ -name "*.py"` Resources/ui/*.ui -ts Resources/translations/Arch.ts'],
|
||||
["src/Mod/OpenSCAD",
|
||||
"pylupdate *.py Resources/ui/*.ui -ts Resources/translations/OpenSCAD.ts"],
|
||||
["src/Mod/Start",
|
||||
@@ -146,7 +146,9 @@ def find_tools(noobsolete=True):
|
||||
LUPDATE += " -noobsolete"
|
||||
else:
|
||||
raise Exception("Cannot find lupdate")
|
||||
if (os.system("pylupdate -version") == 0):
|
||||
if (os.system("pyside2-lupdate -version") == 0):
|
||||
PYLUPDATE = "pyside2-lupdate"
|
||||
elif (os.system("pylupdate -version") == 0):
|
||||
PYLUPDATE = "pylupdate"
|
||||
elif (os.system("pylupdate5 -version") == 0):
|
||||
PYLUPDATE = "pylupdate5"
|
||||
|
||||
Reference in New Issue
Block a user