Translation in FEM

About the development of the FEM module/workbench.

Moderator: bernd

UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: Translation in FEM

Post by UR_ »

bernd wrote: Thu Sep 23, 2021 1:47 pm For the strings in ui files, I do not know either ATM.
E. g.
- open ...Mod\Fem\Resources\ui\ConstraintTie.ui with QT Designer
- select a label

Screenshot 004.png
Screenshot 004.png (8.95 KiB) Viewed 3650 times

and you get offered:

Screenshot 002.png
Screenshot 002.png (5.42 KiB) Viewed 3657 times
User avatar
Evgeniy
Posts: 477
Joined: Thu Jul 15, 2021 6:10 pm

Re: Documentation for FEM_MaterialMechanicalNonlinear

Post by Evgeniy »

bernd wrote: Thu Sep 23, 2021 1:47 pm We need to start somewhere ... Which FEM strings would you like to see translated. Would you post a screen shot?
I record a short film about the state of the interface in FEM
FEM.gif
FEM.gif (872.3 KiB) Viewed 3597 times
Last edited by Evgeniy on Wed Sep 29, 2021 8:51 pm, edited 1 time in total.
User avatar
Evgeniy
Posts: 477
Joined: Thu Jul 15, 2021 6:10 pm

Re: Translation in FEM

Post by Evgeniy »

After Yorik build project in Crowdin at 23 September, translation got a little better, but there are still a lot of untranslated strings and commands.
User avatar
Evgeniy
Posts: 477
Joined: Thu Jul 15, 2021 6:10 pm

Re: Translation in FEM

Post by Evgeniy »

Update of src/Tools/updatets.py doesn't solved the problem with translations yet.

https://github.com/FreeCAD/FreeCAD/pull/5037
User avatar
chennes
Veteran
Posts: 3904
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Translation in FEM

Post by chennes »

First, can we find one that's actually missing from the *.ts files? I'd like to pick just two commands to look at in detail: one that's being translated, and one that's not. The few I spot-checked were all in the TS files, even if there was not a translation available for that string yet.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Evgeniy
Posts: 477
Joined: Thu Jul 15, 2021 6:10 pm

Re: Translation in FEM

Post by Evgeniy »

chennes wrote: Wed Sep 29, 2021 9:10 pm First, can we find one that's actually missing from the *.ts files? I'd like to pick just two commands to look at in detail: one that's being translated, and one that's not. The few I spot-checked were all in the TS files, even if there was not a translation available for that string yet.
This is fresh Fem.ts
Fem.ts.txt
(112.4 KiB) Downloaded 77 times
It contains: Create FEM fixed constraint

Code: Select all

  <context>
    <name>CmdFemConstraintFixed</name>
    ...
    <message>
      <location filename="../../Command.cpp" line="315"/>
      <source>Create FEM fixed constraint</source>
      <translation>Создать фиксированное граничное условие для МКЭ</translation>
    </message>
    <message>
      <location filename="../../Command.cpp" line="316"/>
      <source>Create FEM constraint for a fixed geometric entity</source>
      <translation>Создать граничное условие фиксированной геометрии для МКЭ</translation>
    </message>
  </context>
but not contains: Constraint contact

For example.
User avatar
chennes
Veteran
Posts: 3904
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Translation in FEM

Post by chennes »

Perfect, thanks -- I will investigate, it looks like the new code is not combining the C++ and the Python strings correctly. Back to the drawing board!
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
chennes
Veteran
Posts: 3904
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Translation in FEM

Post by chennes »

I'm betting that this is the problem:

Code: Select all

File src/Mod/Fem/Gui/Resources/translations/Fem.ts won't be updated: it contains translation but the target language is not recognized
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
chennes
Veteran
Posts: 3904
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Translation in FEM

Post by chennes »

Indeed, if I manually edit the main *.ts file to specify English, it works. But I don't know why I have to do this, looking at Draft for example, it does not.

I changed

Code: Select all

<TS version="2.1">
to

Code: Select all

<TS version="2.1" language="en">
in Fem.ts, and that shut the error up and got the TS file updating. But I have no idea why that should be needed only in Fem.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Evgeniy
Posts: 477
Joined: Thu Jul 15, 2021 6:10 pm

Re: Translation in FEM

Post by Evgeniy »

chennes wrote: Thu Sep 30, 2021 2:24 pm Indeed, if I manually edit the main *.ts file to specify English, it works. But I don't know why I have to do this, looking at Draft for example, it does not.

I changed

Code: Select all

<TS version="2.1">
to

Code: Select all

<TS version="2.1" language="en">
in Fem.ts, and that shut the error up and got the TS file updating. But I have no idea why that should be needed only in Fem.
Maybe draft workbench not have mixed cpp + py code?
I do not know how the bash code looks like. But maybe we can specify the language via the command line? Or this is impossible?
Last edited by Evgeniy on Thu Sep 30, 2021 4:46 pm, edited 1 time in total.
Post Reply