-
Notifications
You must be signed in to change notification settings - Fork 567
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
ENH: Improve logic searching translation files for custom app #5021
ENH: Improve logic searching translation files for custom app #5021
Conversation
6dda38c
to
8718b06
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The content looks good to me. I have a few concerns about coding style - see inline comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution 👍
Few nitpicks and this will be good for integration
If you some more bandwidth, another pull request that would need a little more work is this one: Slicer/SlicerGitSVNArchive#1162
@Thibault-Pelletier Thanks again for your contribution. Would you like us to fix this up or you would be available to do it? |
Hi everyone, @jcfr the Slicer/SlicerGitSVNArchive#1162 PR seems interesting. We are currently tackling this type of functionalities and for now we are using PyQt5 lupdate executable to parse the python files for translation methods and the following decorator to make the widgets translatable while capturing the context :
|
e3c995d
to
70acd03
Compare
* Change Slicer_LANGUAGES from a GLOBAL property to a CACHE variable allowing language generation to be modified in the context of custom applications. * Change behavior for missing translation files when disabling translation updates to allow custom applications to translate subparts of the application only. * Fix qSlicerCoreApplication::loadTranslations to find generic forms of TS files when present. Co-authored-by: Andras Lasso <[email protected]> Co-authored-by: Jean-Christophe Fillion-Robin <[email protected]>
70acd03
to
3b791a5
Compare
I will further update the topic considering changes made in Slicer/SlicerGitSVNArchive#1162 |
This is now merged in cd5cdbd. |
Change
Slicer_LANGUAGES
from aGLOBAL
property to aCACHE
variableallowing language generation to be modified in the context of custom
applications.
Change behavior for missing translation files when disabling translation
updates to allow custom applications to translate subparts of the
application only.
Fix
qSlicerCoreApplication::loadTranslations
to find generic forms of TSfiles when present.