TD: Pos Vert Chain Dim vs. Position Vertical Chain Dimensions

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
chennes
Veteran
Posts: 3881
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

TD: Pos Vert Chain Dim vs. Position Vertical Chain Dimensions

Post by chennes »

In CommandExtensionDims.cpp there are some commands whose text is marked for translation like "Pos Vert Chain Dim" and "TechDraw PosVertChainDimension". Later in the same file we have "Position Vertical Chain Dimensions". I think there are a few examples like this. Translators don't really know what to do with the first two, with abbreviated words. Should those actually remain untranslated? Should translators be directed to come up with abbreviations in their languages? Some guidance would be appreciated.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: TD: Pos Vert Chain Dim vs. Position Vertical Chain Dimensions

Post by wandererfan »

chennes wrote: Thu Jun 02, 2022 5:59 pm In CommandExtensionDims.cpp there are some commands whose text is marked for translation like "Pos Vert Chain Dim" and "TechDraw PosVertChainDimension".
The "Pos Vert Chain Dim" literal is a transaction identifier and as far as I know this identifier is only visible in the "Undo/Redo dialog" as a reminder of recent steps. So the actual wording here is not critical - something short like "Create Pad" is typical. I might go with "Vertical Chain" in this case.

"TechDraw PosVertChainDimension" appears to be an alternative to the command name "CmdTechDrawExtensionPosVertChainDimension" which is itself troublesome.

I would say the right thing to do would be to rename all these commands to something along the lines of "CmdTechDrawPositionVerticalChain" and adjust the literals accordingly. I think this impacts the wiki/help files and the icons should probably be renamed to match.

Doing the whole job looks like a significant piece of work.

@edi - any comments?
User avatar
chennes
Veteran
Posts: 3881
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: TD: Pos Vert Chain Dim vs. Position Vertical Chain Dimensions

Post by chennes »

Thanks -- it is used in at least one GUI element, as the title of an error window, on line 615 of CommandExtensionDims.cpp (also a related one on line 557, and as you suggest probably many others...)
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: TD: Pos Vert Chain Dim vs. Position Vertical Chain Dimensions

Post by Roy_043 »

If I may make a suggestion: There are three very similar commands now that could be combined into one I think. The first selected dimension would then be used as a filter and determine the action: Horizontal, Vertical or Oblique.

Some other extension commands can perhaps also be combined.
Last edited by Roy_043 on Fri Jun 03, 2022 9:56 am, edited 2 times in total.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: TD: Pos Vert Chain Dim vs. Position Vertical Chain Dimensions

Post by Roy_043 »

Just something I noticed while looking at the file:

Does this work?:

Code: Select all

QObject::tr(message.c_str())
https://github.com/FreeCAD/FreeCAD/blob ... .cpp#L2250
User avatar
chennes
Veteran
Posts: 3881
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: TD: Pos Vert Chain Dim vs. Position Vertical Chain Dimensions

Post by chennes »

That call to tr() will only work if the contents of message have previously been added to the translation database by a call to one of the NOOP translation functions.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: TD: Pos Vert Chain Dim vs. Position Vertical Chain Dimensions

Post by Roy_043 »

From what I understand that is not the case. So that would require further attention.
edi
Posts: 481
Joined: Fri Jan 17, 2020 1:32 pm

Re: TD: Pos Vert Chain Dim vs. Position Vertical Chain Dimensions

Post by edi »

Roy_043 wrote: Fri Jun 03, 2022 9:48 am If I may make a suggestion: There are three very similar commands now that could be combined into one I think. The first selected dimension would then be used as a filter and determine the action: Horizontal, Vertical or Oblique.

Some other extension commands can perhaps also be combined.
Yes, you are right.
In TechDraw (and Sketcher) there are three types of linear dimensions: horizontal, vertical and oblique. In the extension tools this system is continued.

In general it would be more comfortable to have only one linear dimension tool, using the following workflow:
- Select a line or two points
- Click once to define the type of the dimension:
If clicked:
- north or south ... horizontal
- west or east ... vertical
- near the line center or between the points ... oblique

Very comfortable would be (I am dreaming) if the dimension under progress would be shown as "rubber band" hangig at the curser during definition of the type.

This interface is used by other CAD-Systems.
User avatar
kaktus
Veteran
Posts: 1174
Joined: Sun Aug 11, 2019 11:59 am
Location: opolskie
Contact:

Re: TD: Pos Vert Chain Dim vs. Position Vertical Chain Dimensions

Post by kaktus »

It would be good to collectively come up with new names for the occurrences of which strings should be modified.
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
Post Reply