Should strings passed to openCommand() be translated (QObject::tr()) or mark for translation (QT_TR_NOOP)?
if translated they should be in utf8?
Command names should be translated or not?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Command names should be translated or not?
Good question...
I think they can be translated... This is the text that will appear in the undo stack. It will be used only for the current session, it won't be saved in the file (therefore no risk that some other use will meet a text in a language he doesn't understand), so I don't see why not.
It should be translated with tr() I think (the module itself is responsible for the translation. Qt_TR_NOOP is used only for a couple of cases where it is another module that will perform the translation), and I suppose yes, they should be in utf8, as in most of the GUI...
I think they can be translated... This is the text that will appear in the undo stack. It will be used only for the current session, it won't be saved in the file (therefore no risk that some other use will meet a text in a language he doesn't understand), so I don't see why not.
It should be translated with tr() I think (the module itself is responsible for the translation. Qt_TR_NOOP is used only for a couple of cases where it is another module that will perform the translation), and I suppose yes, they should be in utf8, as in most of the GUI...
Re: Command names should be translated or not?
Thanks, for the explanation...
Note that there are some commands already translated (like creation of Part primitives), but I wasn't sure on which level this translation is done...
By the word, yet another translation-related question... How to correctly setup the Label property with appropriate translated value? should it be done manually, or is it handled automagically somehow?
Note that there are some commands already translated (like creation of Part primitives), but I wasn't sure on which level this translation is done...
By the word, yet another translation-related question... How to correctly setup the Label property with appropriate translated value? should it be done manually, or is it handled automagically somehow?
Re: Command names should be translated or not?
It's the same as with openCommand, i.e. it's up to you to pass the translated string to the Label property and the string must be utf-8 encoded.By the word, yet another translation-related question... How to correctly setup the Label property with appropriate translated value? should it be done manually, or is it handled automagically somehow?