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
Draft: Fix several translation issues #5445
Draft: Fix several translation issues #5445
Conversation
'MenuText': QT_TRANSLATE_NOOP("Draft_BezCurve", "Bezier curve"), | ||
'ToolTip': QT_TRANSLATE_NOOP("Draft_BezCurve", "Creates an N-degree Bezier curve. The more points you pick, the higher the degree.\nCTRL to snap, SHIFT to constrain.")} | ||
'Accel': 'B, Z', | ||
'MenuText': QT_TRANSLATE_NOOP('Draft_BezCurve', 'Bézier curve'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are the "
changed to '
? Standard should be " as in the rest of the file and PEP8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Roy-043 this appears to have happened at a few places in this changeset -- can you revise to use double quotes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you look carefully you will see that in the original file a mix on single and double quotes are used even while defining the same dictionary. So there is no 'standard' in the file. Also: the original file was recently refactored.
But I'll fix this anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, actually there was no need to fix this:
https://forum.freecadweb.org/viewtopic.php?f=8&t=65753
@benj5378 Can you confirm please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Roy-043 I don't see any specific conclusion in the forum thread? They mention some personal exceptions for when they wouldn't use PEP8.
Regarding Zolko's comment, I agree with him, but it's for a whole other case: naming of variables and functions. Not code formatting regarding the use of symbols, spaces, line breaks etc.
I noticed that the file is mixed, but when changes occur on, I'd personally prefer it was always changed towards PEP8.
Conclusion, do whatever you want and I'll make a seperate PR afterwards doing PEP8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP8 allows both single and double quotes.
Link provided in the 1st forum topic answer:
https://www.python.org/dev/peps/pep-0008/#string-quotes
So your initial comment here does not make sense.
Standard should be " as in the rest of the file
I noticed that the file is mixed
And with that you initial comment makes even less sense.
Conclusion:
Effectively there is no standard governing this
Striving for consistent use of double or single quotes in the Python code of FreeCAD is a lost cause if ever I saw one. But, enough said, let's merge!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you say 😎
Oops copy-paste error... Fixed.
PR to fix several translation issues. See forum topic.
Forum topic:
https://forum.freecadweb.org/viewtopic.php?f=23&t=65346
Additionally:
_tr
and_qtr
functions fromtranslate.py
. They are no longer used by the Draft or Arch WB.view_base.py
: Fixed wrong use of variables inQT_TRANSLATE_NOOP
calls and changed the tooltips from 'hatch' pattern to 'SVG' pattern.App
,Base
,Gui
or one of theMod
subfolders. If you need to make changes in several locations, make several pull requests and wait for the first one to be merged before submitting the next onesgit pull --rebase upstream master
./bin/FreeCAD --run-test 0
Fixes typo in Draft Move command text
Draft: Fixed typos
issue #<id>
orfixes #<id>
where<id>
is the FreeCAD bug tracker issue number in case a particular commit solves or is related to an existing issue on the tracker. Ex:Draft: fix typos - fixes #0004805