ENH: Improve logic searching translation files for custom app#5021
ENH: Improve logic searching translation files for custom app#5021Thibault-Pelletier wants to merge 1 commit intoSlicer:masterfrom
Conversation
6dda38c to
8718b06
Compare
lassoan
left a comment
There was a problem hiding this comment.
The content looks good to me. I have a few concerns about coding style - see inline comments.
jcfr
left a comment
There was a problem hiding this comment.
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 <lasso@queensu.ca> Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
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_LANGUAGESfrom aGLOBALproperty to aCACHEvariableallowing 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::loadTranslationsto find generic forms of TSfiles when present.