Translation issues

Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

Post Reply
WildWolfCJ
Full Member
Posts: 84
Joined: Fri Oct 20, 2023 7:21 am

Translation issues

Post by WildWolfCJ » Tue Nov 14, 2023 3:02 am

How can I find the Chinese translation corresponding to QCAD's Chinese and English? For example, ExAddBlock.init = function(basePath) {
var action = new RGuiAction(qsTr("&Create Block"), RMainWindowQt.getMainWindow());
action.setRequiresDocument(true);
action.setScriptFile(basePath + "/ExAddBlock.js");
action.setGroupSortOrder(79100);
action.setSortOrder(100);
action.setWidgetNames(["BlockExamplesMenu"]);
}; qsTr("&Create Block" )How to modify the corresponding translation file?
Attachments
VeryCapture_20231114100125.jpg
VeryCapture_20231114100125.jpg (160.9 KiB) Viewed 4684 times

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Translation issues

Post by CVH » Tue Nov 14, 2023 6:43 am

Hi,

You could have included the code in a code panel with the </> button above the text panel.

Code: Select all

ExAddBlock.init = function(basePath) {
var action = new RGuiAction(qsTr("&Create Block"), RMainWindowQt.getMainWindow());
action.setRequiresDocument(true);
action.setScriptFile(basePath + "/ExAddBlock.js");
action.setGroupSortOrder(79100);
action.setSortOrder(100);
action.setWidgetNames(["BlockExamplesMenu"]);
};
While scripting is native in English qsTr("&Create Block") will translate the string.
The translation files are standard Qt see the QCAD installation folder and then under folder 'ts'.

I would not mess with those.
Contact Andrew with updated translations as you can not include Chinese text on this forum.

Just guessing: menu Misc .. Script Examples ..
And further I can not read Chinese. :wink:
andrew wrote:
Mon Jan 03, 2022 10:33 am
The "Misc" menu is the overflow section of QCAD. It is intended for complemental tools not normally part of a CAD system as well as all incomplete, untranslated, undocumented or experimental tools that might or might not be useful for someone

Regards,
CVH

WildWolfCJ
Full Member
Posts: 84
Joined: Fri Oct 20, 2023 7:21 am

Re: Translation issues

Post by WildWolfCJ » Wed Nov 22, 2023 2:00 am

You could have included the code in a code panel with the </> button above the text panel.
Thanks, I've learned how to do it

I found that QCAD Chinese translation has many inaccuracies. How should I correct it?

User avatar
andrew
Site Admin
Posts: 9063
Joined: Fri Mar 30, 2007 6:07 am

Re: Translation issues

Post by andrew » Wed Nov 22, 2023 8:13 am

This is an automatic translations and is likely to contain many errors.

You can find all translations for the QCAD core at:
https://github.com/qcad/qcad

Translation sources are "*.ts" files in in the "ts" folder. You can either edit the .ts files in a text editor (XML) or in github or with Qt Linguist. Feel free to issue a pull request on github or send the corrected files.

If you cannot find a string, it is most likely part of the QCAD Professional module. In this case, please send us a message with the original and the corrected string.

Many thanks for any corrections you can make.

WildWolfCJ
Full Member
Posts: 84
Joined: Fri Oct 20, 2023 7:21 am

Re: Translation issues

Post by WildWolfCJ » Fri Nov 24, 2023 2:32 am

Okay, I understand. I will summarize the incorrect translations after I finish the work at hand.

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”