I trying to translate Dodo workbench https://github.com/oddtopus/dodo i have made whole procedure described on this page https://www.freecadweb.org/wiki/Transla ... _workbench without success.
This is what i have done:
-Edit some test code in order to generate one .ts file. I successfully made it through pyside2-lupdate command on windows 10.
-Made a translations folder behind InitGui.py dodo workbench file and es_ES.ts and es_ES.qm files inside.
-addtranslationpath function point to translation folder at the right way and its placed at the begining in InitGui.py .
Freecad load dodo workbench with this changes without errors.
I'm not sure what a missing.
OS: windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16117
Build type: Release
Branch: releases/FreeCAD-18
Hash: dbb4cc6415bac848a294f03b80f65e888d531742
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version 7.3.0
Locale: english/UnitedStates (en_US)
InitGui.py file
Code: Select all
class dodo ( Workbench ):
import DraftSnap
import sys, FreeCAD,os,dummyos
from PySide.QtCore import QT_TRANSLATE_NOOP
FreeCADGui.addLanguagePath(os.path.join(dummyos.relpath,"Resources"+os.sep+"translations"))
FreeCAD.Console.PrintMessage(os.path.join(dummyos.relpath,"Resources"+os.sep+"translations"))
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="es">
<context>
<name>FrameBranchManager</name>
<message>
<location filename="CFrame.py" line="374"/>
<source>FrameBranch Manager</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="CFrame.py" line="377"/>
<source>Open FrameBranch Manager</source>
<translation>Abre gestor de marcos</translation>
</message>
</context>
<context>
<name>adjustFrameAngle</name>
<message>
<location filename="CFrame.py" line="281"/>
<source>adjustFrameAngle</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="CFrame.py" line="284"/>
<source>Adjust the angle of frame by two edges</source>
<translation>Adjuste del angulo del marco por medio de dos aristas</translation>
</message>
</context>
<context>
<name>alignEdge</name>
<message>
<location filename="CFrame.py" line="209"/>
<source>Mate the edges</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="CFrame.py" line="212"/>
<source>Join two edges: select two or pre-select several</source>
<translation>Une dos aristas:selecciona dos o pre selecciona varias</translation>
</message>
</context>
<context>
<name>alignFlange</name>
<message>
<location filename="CFrame.py" line="115"/>
<source>alignFlange</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="CFrame.py" line="118"/>
<source>Rotates the section of the beam to make the faces parallel to another face</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>dodo</name>
<message>
<location filename="InitGui.py" line="155"/>
<source>Frame tools</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="InitGui.py" line="156"/>
<source>Pype tools</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="InitGui.py" line="157"/>
<source>Utils</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="InitGui.py" line="158"/>
<source>QkMenus</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>extend</name>
<message>
<location filename="CFrame.py" line="266"/>
<source>extendTheBeam</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="CFrame.py" line="269"/>
<source>Extend the beam either to a face, a vertex or the c.o.m. of the selected object</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>frameIt</name>
<message>
<location filename="CFrame.py" line="44"/>
<source>Place one-beam over one-edge</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="CFrame.py" line="47"/>
<source>Place one beam after the other over the edges</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>insertPath</name>
<message>
<location filename="CFrame.py" line="318"/>
<source>insert Path</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="CFrame.py" line="363"/>
<source>Creates one path along selected edges</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>insertSection</name>
<message>
<location filename="CFrame.py" line="388"/>
<source>Insert sections</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="CFrame.py" line="394"/>
<source>Creates customized beam profiles 2D</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>levelBeam</name>
<message>
<location filename="CFrame.py" line="176"/>
<source>Flush the surfaces</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="CFrame.py" line="179"/>
<source>Shift the beams to line-up the faces to the first selection (faces must be //)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>pivotBeam</name>
<message>
<location filename="CFrame.py" line="227"/>
<source>pivotTheBeam</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="CFrame.py" line="230"/>
<source>Rotates the beam around an axis (edge or center-of-curvature)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>reverseBeam</name>
<message>
<location filename="CFrame.py" line="83"/>
<source>Reverse orientation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="CFrame.py" line="100"/>
<source>Reverse the orientation of selected objects</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>rotJoin</name>
<message>
<location filename="CFrame.py" line="300"/>
<source>rotJoinEdge</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="CFrame.py" line="303"/>
<source>Rotates and align the beam according another edge</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>shiftBeam</name>
<message>
<location filename="CFrame.py" line="143"/>
<source>shiftTheBeam</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="CFrame.py" line="146"/>
<source>Translate objects by vectors defined on existing geometry</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>spinSect</name>
<message>
<location filename="CFrame.py" line="63"/>
<source>Spin beams by 45 deg.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="CFrame.py" line="66"/>
<source>Rotates the section of the beam by 45 degrees</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>stretchBeam</name>
<message>
<location filename="CFrame.py" line="249"/>
<source>stretchTheBeam</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="CFrame.py" line="252"/>
<source>Changes the length of the beam, either according a preselected edge or a direct input</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
Code: Select all
SOURCES = CFrame.py InitGui.py fCmd.py CPipe.py CUtils.py dodoDialogs.py dodoPM.py fForms.py fObservers.py
TRANSLATIONS = ES_es.ts