Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sketcher: fix typos + capitalize openCommand() text [skip-ci] #3993

Merged
merged 2 commits into from Oct 24, 2020

Conversation

luzpaz
Copy link
Contributor

@luzpaz luzpaz commented Oct 23, 2020

No description provided.

@luzpaz luzpaz changed the title Sketcher: fix typos + capitalize openCommand() text Sketcher: fix typos + capitalize openCommand() text [skip-ci] Oct 23, 2020
@wwmayer wwmayer merged commit f16f974 into FreeCAD:master Oct 24, 2020
@luzpaz
Copy link
Contributor Author

luzpaz commented Oct 24, 2020

@wmayer quick question, is there a technical reason why the text fields in 4499508 aren't translatable ?

@luzpaz luzpaz deleted the typos/sketcher branch October 24, 2020 10:36
@wwmayer
Copy link
Contributor

wwmayer commented Oct 24, 2020

No. There is no reason to not translate them. In order to do that the macro QT_TRANSLATE_NOOP must be used.
So, instead of writing
openCommand("Add horizontal constraint"); it could be openCommand(QT_TRANSLATE_NOOP("Command", "Add horizontal constraint"));

Then in the undo/redo dialog class the string must be translated with qApp->translate("Command", text)

Important is that the context string "Command" is used everywhere because otherwise not all strings will be translated.

@luzpaz
Copy link
Contributor Author

luzpaz commented Oct 25, 2020

Thanks wmayer 😀
For posterity, tracking this issue (translating openCommand()") in https://tracker.freecadweb.org/view.php?id=4473

luzpaz added a commit to luzpaz/FreeCAD that referenced this pull request Oct 27, 2020
…anslation

`Sketcher/Gui/CommandConstraints.cpp` will now be parsed for translation. Based on FreeCAD#3993 (comment)  
( ref. Issue FreeCAD#4473 )
wwmayer pushed a commit that referenced this pull request Nov 3, 2020
`Sketcher/Gui/CommandConstraints.cpp` will now be parsed for translation. Based on #3993 (comment)  
( ref. Issue #4473 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants