Closed mhdiop closed 6 months ago
Good research @mhdiop - I don't have a better solution off the top of my head. Perhaps @lassoan will have an idea or if not we can discuss when we meet on Wednesday.
Thank you @pieper for your feedback. Ok, I'll wait for Andras' answer, or for the next meeting as suggested.
Best regards.
I've run into the same issue with the Segment Editor effects. I ended up changing the source directory structure to match the installed directory structure. Consistency of the directory structure between source and install tree is generally desirable anyway.
Thank you @lassoan for your feedback. I'll explore that to see if it better matches this case.
Regards.
Concerned strings (in DICOM module)
The "Segment this" option
The "Calculate statistics" option
This text will show up after the "Segment this..." option has been chosen.
Cause of the problem
First, those strings are already marked and translated. After investigation, I realized that the problem comes from a change in the string context (context at extraction time differs from the one at runtime). In fact, the
__init.py__
file added in the runtime folder (see the following pictures) changes the string context fromSegmentEditorSubjectHierarchyPlugin
toSubjectHierarchyPlugins.SegmentEditorSubjectHierarchyPlugin
. What deny Slicer from getting the translated strings.Folder structure at extraction time
Folder structure at runtime
Possible solutions
I unfortunately don't have sufficient information about rules behind folder structure changes at runtime. However, the following solutions might work:
__init.py__
file in the original source foldertranslate
instead of the_
function so that to directly specify the contextTo verify my hypothesis, I implemented a quick fix that resolves the current problem, using the 3rd option. However, I don't know if it takes all possible cases since, as said earlier, I don't have sufficient information about rules behind folder structure changes at runtime.
Obtained result
Thank you in advance, @lassoan and @pieper, for your suggestions.