Py file has no effect after translation

MikhayEeer
Mon, 05 Aug 2024 16:04:47 +0000
Development

Hello, I built the source code of slicer according to the instructions in the document, and used update_translation.py to generate .ts files. However, when I opened the software and used the languagetools extension, I found that some translation items did not take effect.
Specifically, for example, the py files like dataprobe.py and under Modules\Loadable\Segmentations\EditorEffects\Python\SegmentEditorEffects paths, the modules corresponding to these python files have not been successfully translated.
I am pretty sure I translated the strings of these files in QTLinguist. Also, to confirm that the translation is OK, I let Slicer5.7.0 direct installation use the .ts files I generated, and successfully saw the translation of DataProbe.py and SegmentEditorEffects in Slicer5.7.0.

In order to find out the reason, I pulled the latest code of Slicer (GitHub - Slicer/Slicer: Multi-platform, free open source software for visualization and image computing.), and used the vscode plug-in CompareFolders to compare my code with the official code. Almost all relevant changes were synchronized, but in the end these modules were still not translated.
When I was building the slicer source code, I used QT5.15.2. I vaguely remember that the developer said that the translation of the python file needs to use Qt6. So I want to know if this is the reason why I can’t translate it. Can I change all QT-related configuration items to QT6 in the CMake stage of source code building?
Or, if I update the Qt used to build the source code to QT6, can it solve my problem?
Looking forward to your answer, thank you very much!

4 posts - 2 participants