Solver Calculix (new framework)

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
david69
Veteran
Posts: 1773
Joined: Wed Jan 01, 2014 7:48 pm

Solver Calculix (new framework)

Post by david69 »

the commande is not translated on the GUI and I suspect we have the same reason as what Yorik has found here with the command FEM_SolverCxxtools:

https://forum.freecadweb.org/viewtopic. ... 79#p557579

in short, the conclusion of his finding:
In our case here, "Solver Calculix Standard" is there in the sources, on crowdin, and in the translated .ts files. So we are in case 2b. In the source file, I see that the context is set as "FEM_SolverCxxtools". However, trying Gui.runCommand("FEM_SolverCxxtools") in FreeCAD gives a "No such command" error. Which is probably our problem, the context is wrong. Below in the file, we find:

Code : Tout sélectionner

FreeCADGui.addCommand(
"FEM_SolverCalculixCxxtools",
_SolverCxxtools()
)

which is exactly where our problem lies: the context is not the command name. It should be "FEM_SolverCalculixCxxtools" instead of "FEM_SolverCxxtools". Fix submitted in git commit e8f723b99c
can somebody give a glance to the code, pls?
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Solver Calculix (new framework)

Post by bernd »

fix for the other solver was ... git commit e8f723b99c
david69
Veteran
Posts: 1773
Joined: Wed Jan 01, 2014 7:48 pm

Re: Solver Calculix (new framework)

Post by david69 »

I didn't well express myself.
it seems that the command for Solver Calculix (new framework)

Code: Select all

FEM_SolverCalculiX
has the same issue as FEM_SolverCxxtools because we can not translate it.
david69
Veteran
Posts: 1773
Joined: Wed Jan 01, 2014 7:48 pm

Re: Solver Calculix (new framework)

Post by david69 »

in the code, we read:
def __init__(self):
super(_SolverCalculix, self).__init__()
self.pixmap = "FEM_SolverStandard"
self.menutext = Qt.QT_TRANSLATE_NOOP(
"FEM_SolverCalculix",
"Solver CalculiX (new framework)"
)
self.accel = "S, C"
self.tooltip = Qt.QT_TRANSLATE_NOOP(
"FEM_SolverCalculix",
"Creates a FEM solver CalculiX new framework (less result error handling)"
)
note SolverCalculix with small x

instead of SolverCalculiX with cap X when we launch the command

can it be the reason of the non translation?

edit: I'm not coding at all.
Post Reply