From 2a6eb7116f7614ecc3cb01998b47b9f95bc6c66a Mon Sep 17 00:00:00 2001 From: Lucas Miranda Date: Mon, 14 Sep 2026 19:05:02 -0300 Subject: [PATCH] Chinese AI tutorial fix --- .../AIBasedSegmentationIn3DSlicer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tutorials/STC-SEG-103_AIBasedSegmentationIn3DSlicer/AIBasedSegmentationIn3DSlicer.py b/Tutorials/STC-SEG-103_AIBasedSegmentationIn3DSlicer/AIBasedSegmentationIn3DSlicer.py index 98e65754..ee5b6380 100644 --- a/Tutorials/STC-SEG-103_AIBasedSegmentationIn3DSlicer/AIBasedSegmentationIn3DSlicer.py +++ b/Tutorials/STC-SEG-103_AIBasedSegmentationIn3DSlicer/AIBasedSegmentationIn3DSlicer.py @@ -230,7 +230,9 @@ def test_Slicer4Minute1(self): modMenu = combo.parent().children()[4] combo.showPopup() for mActions in modMenu.actions(): - if mActions.text == translate("qSlicerAbstractCoreModule","Segmentation") or mActions.text == "Segmentation": + # Only a category opens a submenu. Some languages (e.g. Chinese) give the Segmentations module + # and the Segmentation category the same label, and the module entry comes first in the menu. + if mActions.menu() and (mActions.text == translate("qSlicerAbstractCoreModule","Segmentation") or mActions.text == "Segmentation"): segAction = mActions modMenu.setActiveAction(segAction) mainWindow.moduleSelector().selectModule('MONAIAuto3DSeg')