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

Make text in MRML library translatable #7210

Merged
merged 2 commits into from Sep 2, 2023
Merged

Conversation

lassoan
Copy link
Contributor

@lassoan lassoan commented Aug 31, 2023

Allows using Qt translation infrastructure in MRML to translate text, without directly depending on Qt.

Fixes #6647

@lassoan lassoan added this to the Slicer 5.5 milestone Aug 31, 2023
@lassoan lassoan requested review from pieper and jcfr August 31, 2023 23:39
@lassoan lassoan self-assigned this Aug 31, 2023
pieper
pieper previously approved these changes Sep 1, 2023
Copy link
Member

@pieper pieper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, very clean!

It seems like a lot of bookkeeping, but I can't think of a better way to do it.

@pieper
Copy link
Member

pieper commented Sep 1, 2023

Feel free to merge this whenever you think it's done.

mhdiop and others added 2 commits September 2, 2023 07:28
vtkMRMLI18N singleton class is responsible for internationalization related features in MRML.
It currently only stores a language translator.

A translator that uses Qt for translation is specified in qSlicerCoreApplication.

Enables fixing of these issues:
Slicer/SlicerLanguagePacks#12
Slicer#6647
Slicer#6177

Co-authored-by: Mouhamed DIOP <mouhamed.diop@esp.sn>
@lassoan lassoan enabled auto-merge (rebase) September 2, 2023 11:40
@lassoan lassoan merged commit 94a2e4e into Slicer:main Sep 2, 2023
5 checks passed
@lassoan lassoan deleted the mrml-translation branch September 2, 2023 23:40
@jcfr
Copy link
Member

jcfr commented Sep 5, 2023

re: Singleton

We have encapsulated the logic into Libs/MRML/DisplayableManager/vtkSingleton.h, I am wondering if we should move it into vtkAddon so that it can be more broadly used,

@jcfr jcfr added the backport:5.x Identify pull request expected to be backported to the current 5.x release branch. label Oct 23, 2023
@jcfr jcfr removed the backport:5.x Identify pull request expected to be backported to the current 5.x release branch. label Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Translate user-visible text coming from logic classes
4 participants