Slicer / SlicerLanguagePacks

3D Slicer extension for creating, editing, and storing translations for Slicer core and extensions
MIT License
7 stars 11 forks source link

Problem in Dicom Database #40

Closed avilchisg closed 9 months ago

avilchisg commented 9 months ago

There is a bug when loading DICOM images from DICOM Database to be displayed in the Slice Viewers. The corresponding images are not displayed on the visualization areas when the 3D Slicer user interface is in Spanish. However, when the interface is in English, French or Portuguese, the aforementioned images are displayed. The versions that we tested were 5.3.0, 5.4.0, and 5.5.0. In all these versions, this problem remains. It seems that the bug is originated when using the DICOM Database (Add DICOM Data + Load) since when we use the option Load Data Sample the images are displayed.

pieper commented 9 months ago

Interesting - are there any log messages? Does it happen for all dicom data, or only data with Spanish language metadata? Maybe you can share an anonymized dataset that demonstrates the problem?

avilchisg commented 9 months ago

We are not using DICOM images in Spanish We are using the images from the database used in the African workshopThe problem does not come from the images,  it originates from 3D Slicer Sw, specifically in the DICOM database module. It seems to me that the problem comes when the Load bottom is clicked because there are not images that are displayed in the slicer view window We tested the same DICOM images database changing the language of the slicer GUI,  the images are displayed using English, French and Portugues but not when using Spanish Envoyé de mon iPhoneLe 14 sept. 2023 à 11:58 AM, Steve Pieper @.***> a écrit : Interesting - are there any log messages? Does it happen for all dicom data, or only data with Spanish language metadata? Maybe you can share an anonymized dataset that demonstrates the problem?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

pieper commented 9 months ago

@lassoan has a developer version that can be tested in Spanish for comparison with other languages.

lassoan commented 9 months ago

The problem is that Python string translation placeholders (text in curly braces {}) were translated.

Weblate detected the issue and displayed a big red error:

image

Weblate is quite amazing that it can list all these issues so they can be all fixed up easily:

https://hosted.weblate.org/translate/3d-slicer/3d-slicer/es_419/?q=check:python_brace_format

We should keep the translations error-free to make validation errors stand out.

We could also make string translation more robust: check if there are placeholders in the string. If there are then check if all placeholders in the source text are also found in the translated text and if there is any mismatch then log a warning and not use the translated string. This task is tracked in https://github.com/Slicer/Slicer/issues/7235

lassoan commented 9 months ago

I've fixed placeholder errors in all translations above 10% (except in the new automated Arabic translation - I wrote to the author to take care of that: https://discourse.slicer.org/t/translation-of-3d-slicer/31665