Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating new segmentation volumes with Portuguese names #75

Open
spujol opened this issue Jun 10, 2024 · 3 comments
Open

Creating new segmentation volumes with Portuguese names #75

spujol opened this issue Jun 10, 2024 · 3 comments
Assignees

Comments

@spujol
Copy link
Collaborator

spujol commented Jun 10, 2024

Segmentation is 'Segmentación' in Spanish and 'Segmentação' in Portuguese.

When I try to create a new segmentation volume named 'Segmentación' and 'Segmentação' using the Spanish and Portuguese versions of Slicer, respectively, the UI allows entering 'ó', 'ç' or 'ã' letters in the 'Create Segmentation' field.

However, when saving the scene, the accents in the volume names are not saved on the disk: the segmentation files are saved as 'Segmentacin.seg.nrrd' (ES) and Segmentao.seg.nrrd (PT).

(Tested with Slicer 2024-06-08 Preview Release on Mac OSX Sonoma 14.3)

Screenshot 2024-06-10 at 12 44 37 PM

Additionally, the 'Create Segmentation' and 'Create New Segmentation As' are still in English in the Portuguese version of Slicer

@mhdiop
Copy link
Collaborator

mhdiop commented Jun 12, 2024

When saving a scene, suggested filenames are sanitized by removing characters that are likely to cause problems in a filename. That's why only few characters are authorized in the filename, as you may see it in this code. However, if this behavior is not desired, it's always possible to update it.

Additionally, in the Save Scene Dialog, you have the option to directly edit the suggested filenames and rename them as you wish before saving the files. Thus, that updated filename, if correct, will be used when saving files.

I'm working on the identified untranslated strings to quickly propose a fix.

@spujol
Copy link
Collaborator Author

spujol commented Jun 18, 2024

Removing characters that are likely to cause a problem makes sense. However, the inconsistency between the name that an end-user enters on the Slicer user interface and the name of the file written on the disk could be confusing.

@lassoan
Copy link
Collaborator

lassoan commented Jun 19, 2024

Using special characters in filenames may lead to errors (file cannot be opened, cannot be copied to certain file systems, not transferred correctly, etc.). Users can see the automatically generated filenames in the save dialog and they can modify them if they want to, so I don't think the current situation is bad. But we can certainly try to improve things.

One option is to change the default node names so that they don't contain special characters (e.g., Segmentacion). This should be a simple change and keeps the words easy to understand and safe. Another option is to change the filename sanitization rules and let all characters to be used (except path separator, colon, etc.), which is riskier, but we can try and revert if we find that it commonly leads to issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants