Bug 444364 - Can you switch a language within Krita without having to log out and restart Krita
Summary: Can you switch a language within Krita without having to log out and restart ...
Status: RESOLVED INTENTIONAL
Alias: None
Product: krita
Classification: Applications
Component: Translation (show other bugs)
Version: 5.0.0-beta1
Platform: macOS (DMG) macOS
: NOR wishlist
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-25 10:07 UTC by Hoang Duy Tran
Modified: 2021-10-25 16:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The file showing the current method of static language switching method (154.89 KB, image/png)
2021-10-25 10:07 UTC, Hoang Duy Tran
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hoang Duy Tran 2021-10-25 10:07:59 UTC
Created attachment 142852 [details]
The file showing the current method of static language switching method

SUMMARY


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
I am a translator at the Vietnamese branch of the language, and with large amount of text (more than 7,000 (thousand) lines of text to translate, checking the correctness of each line (whether it is displayed and that it is correctly shown, with all articulations, accents) and if the 'msgctx' is needed to be removed or not in order to show the message in the UI or not (someone seemed to not understood the real role of msgctx in the po files, or the context has not yet been implemented correctly, I do not know), so having to turnoff the app, restart again, having to wait for app up/down like a yoyo is not the proper method for changing a language. Blender app doesn't require this, you can change the language within the app and changes can be shown straightaway. So in order to load change of the language, I only need to compile the MO file (using msgfmt -o $MO_FILE $PO_FILE) at a shell command line, then back to the UI, switch the language from Vietnamese to English then back to Vietnamese again to load the changes dynamically and all new changes will be shown. Can you please making this behaviour the same in all KDE apps please? This will enormously increase product rate and making life of translators much easier. Thank you for listening. Best regards.
Comment 1 Alvin Wong 2021-10-25 12:53:34 UTC
Hi Hoang, thanks for helping with the translations of Krita. Unfortunately, it is practically impossible to have Krita reload translations without restarting the application, due to technical limitations of how it is implemented in Krita and the Ki18n library we use.

Since you mentioned modifying `msgctxt` items, I can assure you that there is no need to modify those. Please note that the translation files (PO catalogs and the POT templates) on the KDE SVN repository are automatically updated daily to be in sync with the latest source code, so any `msgid` along with their `msgctxt` are guaranteed to be correct. If you find that you need to modify/remove `msgctxt` for a string to have it show up in the Krita UI, chances are you are modifying the wrong message and there is another message with the correct `msgctxt`.

I strongly recommend using a tool like KDE Lokalize, or Poedit if you do not have a way to run Lokalize on your OS, to edit the translations.

Please also note that, since the translation files on SVN targets the latest code, you would probably want to test against our *nightly builds* (which can be found on https://krita.org/en/download/krita-desktop/ ) instead of releases. The SVN `trunk` translations are for "Krita Next" (git `master` branch), while `stable` translations are for "Krita Plus" (git `krita/5.0` branch). Also, once the updated translations are committed to SVN, the following nightly builds will also include them.

Good luck!

P.S. In general, translation-related questions are better suited for the kde-i18n-doc mailing list, since other translation teams and admins can also chime in.

(Closing as this is practically unimplementable for now.)
Comment 2 Hoang Duy Tran 2021-10-25 16:45:28 UTC
Thank you for your comment and especially how prompting it came. I wasn't expected it to arrive so soon. Thank you also for the link to the 'Next' version of daily build. I will certainly use it in the coming days. 

With regards to the 'msgctxt', I have just raised another bug report 

https://bugs.kde.org/show_bug.cgi?id=444376

I could only find this single instance of the 'Predefined' msgid entry in the PO file. I do aware of the multiple entries of msgid with msgctxt different, as I have been doing this for Blender for a few years already, so thank you for reminding me.

May God bless you
Hoang Tran