Py file has no effect after translation

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.
This is the dataprobe translation display of slicer5.7.0
This is the dataprobe translation display of slicer source code build version
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!

I saw that the community has discussed the development of the Qt6 version of Slicer. Is there any result now? Where can I download the Qt6 version of Slicer?

We are still working on preparing all libraries that Slicer relies on to becompatible with Qt6. Qt6 is not needed for translation and any translation related problems are unrelated to Qt5/6.

If you find any text that cannot be translated in the very latest Slicer Preview Release then you can file a bug report at issues.slicer.org.

Thank you for your reply. Since the translation problem are unrelated to Qt5/6, I will check my code changes carefully.

1 Like