Tools: Updated translation scripts to handle only the master (untranslated) ts files
This commit is contained in:
@@ -54,26 +54,26 @@ import sys,os,xml.sax,pycurl,StringIO
|
||||
|
||||
|
||||
files = [ ["Arch.ts", "/Mod/Arch/Resources/translations/Arch.ts"],
|
||||
["Assembly.ts", "/Mod/Assembly/Gui/Resources/translations/Assembly_de.ts"],
|
||||
["Assembly.ts", "/Mod/Assembly/Gui/Resources/translations/Assembly.ts"],
|
||||
["draft.ts", "/Mod/Draft/Resources/translations/Draft.ts"],
|
||||
["Drawing.ts", "/Mod/Drawing/Gui/Resources/translations/Drawing_de.ts"],
|
||||
["Drawing.ts", "/Mod/Drawing/Gui/Resources/translations/Drawing.ts"],
|
||||
["Fem.ts", "/Mod/Fem/Gui/Resources/translations/Fem.ts"],
|
||||
["FreeCAD.ts", "/Gui/Language/FreeCAD.ts"],
|
||||
["Image.ts", "/Mod/Image/Gui/Resources/translations/Image_de.ts"],
|
||||
["Mesh.ts", "/Mod/Mesh/Gui/Resources/translations/Mesh_de.ts"],
|
||||
["MeshPart.ts", "/Mod/MeshPart/Gui/Resources/translations/MeshPart_de.ts"],
|
||||
["Image.ts", "/Mod/Image/Gui/Resources/translations/Image.ts"],
|
||||
["Mesh.ts", "/Mod/Mesh/Gui/Resources/translations/Mesh.ts"],
|
||||
["MeshPart.ts", "/Mod/MeshPart/Gui/Resources/translations/MeshPart.ts"],
|
||||
["OpenSCAD.ts", "/Mod/OpenSCAD/Resources/translations/OpenSCAD.ts"],
|
||||
["Part.ts", "/Mod/Part/Gui/Resources/translations/Part_de.ts"],
|
||||
["PartDesign.ts", "/Mod/PartDesign/Gui/Resources/translations/PartDesign_de.ts"],
|
||||
["Part.ts", "/Mod/Part/Gui/Resources/translations/Part.ts"],
|
||||
["PartDesign.ts", "/Mod/PartDesign/Gui/Resources/translations/PartDesign.ts"],
|
||||
["Plot.ts", "/Mod/Plot/resources/translations/Plot.ts"],
|
||||
["Points.ts", "/Mod/Points/Gui/Resources/translations/Points_de.ts"],
|
||||
["Raytracing.ts", "/Mod/Raytracing/Gui/Resources/translations/Raytracing_de.ts"],
|
||||
["ReverseEngineering.ts","/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_de.ts"],
|
||||
["Robot.ts", "/Mod/Robot/Gui/Resources/translations/Robot_de.ts"],
|
||||
["Points.ts", "/Mod/Points/Gui/Resources/translations/Points.ts"],
|
||||
["Raytracing.ts", "/Mod/Raytracing/Gui/Resources/translations/Raytracing.ts"],
|
||||
["ReverseEngineering.ts","/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering.ts"],
|
||||
["Robot.ts", "/Mod/Robot/Gui/Resources/translations/Robot.ts"],
|
||||
["Ship.ts", "/Mod/Ship/resources/translations/Ship.ts"],
|
||||
["Sketcher.ts", "/Mod/Sketcher/Gui/Resources/translations/Sketcher_de.ts"],
|
||||
["Sketcher.ts", "/Mod/Sketcher/Gui/Resources/translations/Sketcher.ts"],
|
||||
["StartPage.ts", "/Mod/Start/Gui/Resources/translations/StartPage.ts"],
|
||||
["Test.ts", "/Mod/Test/Gui/Resources/translations/Test_de.ts"],
|
||||
["Test.ts", "/Mod/Test/Gui/Resources/translations/Test.ts"],
|
||||
["Web.ts", "/Mod/Web/Gui/Resources/translations/Web.ts"],
|
||||
["Spreadsheet.ts", "/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet.ts"],
|
||||
["Path.ts", "/Mod/Path/Gui/Resources/translations/Path.ts"],
|
||||
|
||||
@@ -88,13 +88,13 @@ PyCommands = [["src/Mod/Draft",
|
||||
["src/Mod/Part",
|
||||
'pylupdate `find ./ -name "*.py"` -ts Gui/Resources/translations/Partpy.ts'],
|
||||
["src/Mod/Part",
|
||||
'lconvert -i Gui/Resources/translations/Partpy.ts Gui/Resources/translations/Part_de.ts -o Gui/Resources/translations/Part_de.ts'],
|
||||
'lconvert -i Gui/Resources/translations/Partpy.ts Gui/Resources/translations/Part.ts -o Gui/Resources/translations/Part.ts'],
|
||||
["src/Mod/Part",
|
||||
'rm Gui/Resources/translations/Partpy.ts'],
|
||||
["src/Mod/Image",
|
||||
'pylupdate `find ./ -name "*.py"` -ts Gui/Resources/translations/Imagepy.ts'],
|
||||
["src/Mod/Image",
|
||||
'lconvert -i Gui/Resources/translations/Imagepy.ts Gui/Resources/translations/Image_de.ts -o Gui/Resources/translations/Image_de.ts'],
|
||||
'lconvert -i Gui/Resources/translations/Imagepy.ts Gui/Resources/translations/Image.ts -o Gui/Resources/translations/Image.ts'],
|
||||
["src/Mod/Image",
|
||||
'rm Gui/Resources/translations/Imagepy.ts'],
|
||||
]
|
||||
@@ -172,7 +172,14 @@ def update_translation(path):
|
||||
os.chdir(path)
|
||||
filename = os.path.basename(path) + ".pro"
|
||||
os.system(QMAKE + " -project")
|
||||
os.system(LUPDATE + " " + filename)
|
||||
#os.system(LUPDATE + " " + filename)
|
||||
#only update the master ts file
|
||||
tsname = ""
|
||||
if "Mod" in path:
|
||||
tsname = " -ts "+os.path.join("Gui","Resources","translations",os.path.basename(path) + ".ts")
|
||||
elif "src/Gui" in path:
|
||||
tsname = " -ts "+os.path.join("Languages", "FreeCAD.ts")
|
||||
os.system(LUPDATE + " " + filename + tsname)
|
||||
os.remove(filename)
|
||||
os.chdir(cur)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user