forked from Slicer/Slicer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: Make Segment Editor effect names translatable
Segment Editor effects have now separate "name" (for modules to refer to the effect) and "title" (displayed on the GUI). This partially fixes these issues: - Slicer#6177 - Slicer/SlicerLanguagePacks#12
- Loading branch information
Showing
40 changed files
with
500 additions
and
395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 5 additions & 46 deletions
51
Modules/Loadable/Segmentations/EditorEffects/Python/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,6 @@ | ||
#----------------------------------------------------------------------------- | ||
configure_file( | ||
${CMAKE_CURRENT_SOURCE_DIR}/SegmentEditorEffects.__init__.py.in | ||
${CMAKE_BINARY_DIR}/${Slicer_QTSCRIPTEDMODULES_LIB_DIR}/SegmentEditorEffects/__init__.py | ||
) | ||
# Note: The SegmentEditorEffects subdirectory is needed to have a Python package | ||
# (https://docs.python.org/3/tutorial/modules.html#packages) in the source tree | ||
# the same way as it is in the install tree. The Python package name is used | ||
# for determining the "context" string (packageName.filename) for language translation (i18n). | ||
|
||
#----------------------------------------------------------------------------- | ||
set(SegmentEditorEffects_PYTHON_SCRIPTS | ||
AbstractScriptedSegmentEditorEffect | ||
AbstractScriptedSegmentEditorLabelEffect | ||
AbstractScriptedSegmentEditorPaintEffect | ||
AbstractScriptedSegmentEditorAutoCompleteEffect | ||
SegmentEditorDrawEffect | ||
SegmentEditorFillBetweenSlicesEffect | ||
SegmentEditorGrowFromSeedsEffect | ||
SegmentEditorHollowEffect | ||
SegmentEditorIslandsEffect | ||
SegmentEditorLevelTracingEffect | ||
SegmentEditorLogicalEffect | ||
SegmentEditorMarginEffect | ||
SegmentEditorMaskVolumeEffect | ||
SegmentEditorSmoothingEffect | ||
SegmentEditorThresholdEffect | ||
) | ||
|
||
set(SegmentEditorEffects_PYTHON_RESOURCES | ||
Resources/Icons/Draw.png | ||
Resources/Icons/FillBetweenSlices.png | ||
Resources/Icons/GrowFromSeeds.png | ||
Resources/Icons/Hollow.png | ||
Resources/Icons/Islands.png | ||
Resources/Icons/LevelTracing.png | ||
Resources/Icons/Logical.png | ||
Resources/Icons/Margin.png | ||
Resources/Icons/MaskVolume.png | ||
Resources/Icons/Smoothing.png | ||
Resources/Icons/Threshold.png | ||
) | ||
|
||
ctkMacroCompilePythonScript( | ||
TARGET_NAME SegmentEditorEffects | ||
SCRIPTS "${SegmentEditorEffects_PYTHON_SCRIPTS}" | ||
RESOURCES "${SegmentEditorEffects_PYTHON_RESOURCES}" | ||
DESTINATION_DIR ${Slicer_BINARY_DIR}/${Slicer_QTSCRIPTEDMODULES_LIB_DIR}/SegmentEditorEffects | ||
INSTALL_DIR ${Slicer_INSTALL_QTSCRIPTEDMODULES_LIB_DIR}/SegmentEditorEffects | ||
NO_INSTALL_SUBDIR | ||
) | ||
add_subdirectory(SegmentEditorEffects) |
51 changes: 0 additions & 51 deletions
51
Modules/Loadable/Segmentations/EditorEffects/Python/SegmentEditorEffects.__init__.py.in
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
42 changes: 42 additions & 0 deletions
42
Modules/Loadable/Segmentations/EditorEffects/Python/SegmentEditorEffects/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#----------------------------------------------------------------------------- | ||
set(SegmentEditorEffects_PYTHON_SCRIPTS | ||
__init__ | ||
AbstractScriptedSegmentEditorEffect | ||
AbstractScriptedSegmentEditorLabelEffect | ||
AbstractScriptedSegmentEditorPaintEffect | ||
AbstractScriptedSegmentEditorAutoCompleteEffect | ||
SegmentEditorDrawEffect | ||
SegmentEditorFillBetweenSlicesEffect | ||
SegmentEditorGrowFromSeedsEffect | ||
SegmentEditorHollowEffect | ||
SegmentEditorIslandsEffect | ||
SegmentEditorLevelTracingEffect | ||
SegmentEditorLogicalEffect | ||
SegmentEditorMarginEffect | ||
SegmentEditorMaskVolumeEffect | ||
SegmentEditorSmoothingEffect | ||
SegmentEditorThresholdEffect | ||
) | ||
|
||
set(SegmentEditorEffects_PYTHON_RESOURCES | ||
Resources/Icons/Draw.png | ||
Resources/Icons/FillBetweenSlices.png | ||
Resources/Icons/GrowFromSeeds.png | ||
Resources/Icons/Hollow.png | ||
Resources/Icons/Islands.png | ||
Resources/Icons/LevelTracing.png | ||
Resources/Icons/Logical.png | ||
Resources/Icons/Margin.png | ||
Resources/Icons/MaskVolume.png | ||
Resources/Icons/Smoothing.png | ||
Resources/Icons/Threshold.png | ||
) | ||
|
||
ctkMacroCompilePythonScript( | ||
TARGET_NAME SegmentEditorEffects | ||
SCRIPTS "${SegmentEditorEffects_PYTHON_SCRIPTS}" | ||
RESOURCES "${SegmentEditorEffects_PYTHON_RESOURCES}" | ||
DESTINATION_DIR ${Slicer_BINARY_DIR}/${Slicer_QTSCRIPTEDMODULES_LIB_DIR}/SegmentEditorEffects | ||
INSTALL_DIR ${Slicer_INSTALL_QTSCRIPTEDMODULES_LIB_DIR}/SegmentEditorEffects | ||
NO_INSTALL_SUBDIR | ||
) |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.