Bug 406973

Summary: Not possible to translate the ‘Reasons’ strings (for saving into non-Krita formats)
Product: [Applications] krita Reporter: Karl Ove Hufthammer <karl>
Component: TranslationAssignee: Karl Ove Hufthammer <karl>
Severity: normal CC: halla, tamtamy.tymona
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Karl Ove Hufthammer 2019-04-27 14:24:41 UTC
It’s not possible to translate the three ‘Reason:/‘Reasons:’ strings, shown in the warning messages you get when trying to save an image into a non-Krita format.

Here’s the relevant strings in the source code (KisImportExportManager.cpp, https://lxr.kde.org/source/extragear/graphics/krita/libs/ui/KisImportExportManager.cpp), AFAICS:

0482     if (!batchMode && !errors.isEmpty()) {
0483         QString error =  "<html><body><p><b>"
0484                 + i18n("Error: cannot save this image as a %1.", mimeUserDescription)
0485                 + "</b> Reasons:</p>"
0486                 + "<p/><ul>";
0487         Q_FOREACH(const QString &w, errors) {
0488             error += "\n<li>" + w + "</li>";
0489         }

0526             QString warning = "<html><body><p><b>"
0527                     + i18n("You will lose information when saving this image as a %1.", mimeUserDescription);
0529             if (warnings.size() == 1) {
0530                 warning += "</b> Reason:</p>";
0531             }
0532             else {
0533                 warning += "</b> Reasons:</p>";
0534             }
0535             warning += "<p/><ul>";
Comment 1 Tiar 2019-04-27 20:51:31 UTC

Basically, error messages in Krita are a one big mess. I'm working on changing them to be more unified.

Please go to https://invent.kde.org/kde/krita/merge_requests/15 to see my sggestion of new error messages (that would replace the old ones, whatever the old ones were; and they were a lot of things...). There is a string freeze before May 1st, so I need to get it merged to master before that.

Please comment on the merge request if you have any suggestions.
Comment 2 Halla Rempt 2019-04-29 13:24:00 UTC
This is completely different from the error messages you get when saving, though: these are the warnings that are shown beforehand, and those warnings aren't a mess, but rather well designed and implemented :P
Comment 3 Halla Rempt 2019-04-29 13:25:04 UTC
No, I have to take that back... This isn't about that part of the code, sorry for being so confused.
Comment 4 Karl Ove Hufthammer 2019-08-14 19:31:03 UTC
Git commit c091fce255d42f45e6add84451a64a5349941bd0 by Karl Ove Hufthammer.
Committed on 14/08/2019 at 19:30.
Pushed by huftis into branch 'master'.

Make string for reasons for image export problems translatable

M  +3    -3    libs/ui/KisImportExportManager.cpp

Comment 5 Halla Rempt 2019-08-15 07:53:50 UTC
Git commit 3dd45fdb1066042c59aa09cf014050a441c8ba47 by Boudewijn Rempt, on behalf of Karl Ove Hufthammer.
Committed on 15/08/2019 at 07:46.
Pushed by rempt into branch 'krita/4.2'.

Make string for reasons for image export problems translatable

M  +3    -3    libs/ui/KisImportExportManager.cpp