Bug 395338 - Missing translations for a few common buttons like OK and Cancel (Krita official builds only)
Summary: Missing translations for a few common buttons like OK and Cancel (Krita offic...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Translation (show other bugs)
Version: 4.1.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL: https://invent.kde.org/graphics/krita...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-14 02:05 UTC by Tyson Tan
Modified: 2021-06-17 09:36 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
001 Create new document dialogue (29.52 KB, image/png)
2018-06-14 02:07 UTC, Tyson Tan
Details
002 Menu Filter Slope Offset Power (131.98 KB, image/png)
2018-06-14 02:09 UTC, Tyson Tan
Details
003 Menu Tools Scrpting (122.26 KB, image/png)
2018-06-14 02:10 UTC, Tyson Tan
Details
004 Menu Window Workspace (128.19 KB, image/png)
2018-06-14 02:10 UTC, Tyson Tan
Details
005 Document Information dialogue (13.87 KB, image/png)
2018-06-14 02:12 UTC, Tyson Tan
Details
006 Menu Image Image Background and Transparency (79.89 KB, image/png)
2018-06-14 02:14 UTC, Tyson Tan
Details
007A Menu Layer Edit metadata Dublin Core (9.92 KB, image/png)
2018-06-14 02:15 UTC, Tyson Tan
Details
007B Menu Layer Edit metadata Exif (13.96 KB, image/png)
2018-06-14 02:16 UTC, Tyson Tan
Details
007C Menu Layer Edit metadata Exif (11.20 KB, image/png)
2018-06-14 02:17 UTC, Tyson Tan
Details
008A Configure Krita General Cursor (22.02 KB, image/png)
2018-06-14 02:18 UTC, Tyson Tan
Details
008A Configure Krita General Others (28.27 KB, image/png)
2018-06-14 02:19 UTC, Tyson Tan
Details
008C Configure Krita Keyboard Shortcut (26.55 KB, image/png)
2018-06-14 02:20 UTC, Tyson Tan
Details
008D Canvas Input Settings (25.92 KB, image/png)
2018-06-14 02:21 UTC, Tyson Tan
Details
008E Configure Krita Color Management (27.27 KB, image/png)
2018-06-14 02:22 UTC, Tyson Tan
Details
008F Configure Krita Python Plugins (36.69 KB, image/png)
2018-06-14 02:23 UTC, Tyson Tan
Details
009 Menu Settings Dockers (21.72 KB, image/png)
2018-06-14 02:25 UTC, Tyson Tan
Details
010A Tool options Shape Selecting Tool (19.72 KB, image/png)
2018-06-14 02:27 UTC, Tyson Tan
Details
010B Tool options Shape Editing Tool (14.58 KB, image/png)
2018-06-14 02:28 UTC, Tyson Tan
Details
010C Tool options SVG Text Tool (44.74 KB, image/png)
2018-06-14 02:29 UTC, Tyson Tan
Details
010D Tool options Transformation Tool (22.01 KB, image/png)
2018-06-14 02:30 UTC, Tyson Tan
Details
010E Tool options Color Picker (14.61 KB, image/png)
2018-06-14 02:33 UTC, Tyson Tan
Details
010F Tool options Colorize Mask Editing Tool (15.57 KB, image/png)
2018-06-14 02:34 UTC, Tyson Tan
Details
010G Tool options Assistant (12.29 KB, image/png)
2018-06-14 02:35 UTC, Tyson Tan
Details
011A Dockers Comics Manager (6.32 KB, image/png)
2018-06-14 02:37 UTC, Tyson Tan
Details
011B Dockers Last documents (2.44 KB, image/png)
2018-06-14 02:38 UTC, Tyson Tan
Details
011C Dockers Quick Settings (4.89 KB, image/png)
2018-06-14 02:38 UTC, Tyson Tan
Details
011D Dockers Vector Library (8.49 KB, image/png)
2018-06-14 02:39 UTC, Tyson Tan
Details
012A Dockers Layer Property dialogue (12.86 KB, image/png)
2018-06-14 02:40 UTC, Tyson Tan
Details
013 Brush Engine (17.69 KB, image/png)
2018-06-14 12:48 UTC, Tyson Tan
Details
001B_Create New Document dialogue 4.1.0 beta2 (90.87 KB, image/png)
2018-06-21 14:42 UTC, Tyson Tan
Details
001C_Create New Document dialogue (90.43 KB, image/png)
2018-06-29 02:34 UTC, Tyson Tan
Details
014_Configure Krita dialogue (65.24 KB, image/png)
2018-06-29 02:35 UTC, Tyson Tan
Details
004A Menu Window Workspace (139.17 KB, image/png)
2018-06-29 03:12 UTC, Tyson Tan
Details
006A Menu-Image-Image Background and Transparency (91.67 KB, image/png)
2018-06-29 03:53 UTC, Tyson Tan
Details
008C1 Configure Krita-Keyboard Shortcut (102.82 KB, image/png)
2018-06-29 03:59 UTC, Tyson Tan
Details
010C1 Tool options SVG Text Tool (23.61 KB, image/png)
2018-06-29 04:03 UTC, Tyson Tan
Details
010D1 Tool options Transformation Tool (27.16 KB, image/png)
2018-06-29 04:12 UTC, Tyson Tan
Details
011D1 Dockers-Vector Library (26.82 KB, image/png)
2018-06-29 04:16 UTC, Tyson Tan
Details
Missing/wrong translation in file dialogues (241.25 KB, image/png)
2021-06-17 07:30 UTC, Tyson Tan
Details
Updated qtbase_zh_CN.ts for Qt 5.12 (306.29 KB, video/mpeg)
2021-06-17 08:16 UTC, Tyson Tan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2018-06-14 02:05:40 UTC
In many Krita dialogues, some basic buttons are not translatable. 
In particular:
[Create] [OK] [Cancel] [Restore Default]

Especially that "&Create" in Create new document dialogue sticks like a sore thumb because it's literally the FIRST button people would ever press in Krita.

There are some translated strings that I did not being reflected Krita 4.0.4. I'm not sure if it is because of 1) KDE not pulling KDE China's built in time; 2) It will work in 4.1.0, but obsolete in 4.0.4.

I will attach all screenshots I can find about the missing translations below.
Comment 1 Tyson Tan 2018-06-14 02:07:42 UTC
Created attachment 113265 [details]
001 Create new document dialogue

001: Create new document dialogue
&Create button
Comment 2 Tyson Tan 2018-06-14 02:09:25 UTC
Created attachment 113266 [details]
002 Menu Filter Slope Offset Power
Comment 3 Tyson Tan 2018-06-14 02:10:07 UTC
Created attachment 113267 [details]
003 Menu Tools Scrpting
Comment 4 Tyson Tan 2018-06-14 02:10:41 UTC
Created attachment 113268 [details]
004 Menu Window Workspace
Comment 5 Tyson Tan 2018-06-14 02:12:22 UTC
Created attachment 113269 [details]
005 Document Information dialogue

Subject:
Keywords:
Language:
Total editing time:
[OK] [Cancel]
Comment 6 Tyson Tan 2018-06-14 02:14:28 UTC
Created attachment 113270 [details]
006 Menu Image Image Background and Transparency

[&Pick Screen Color]
Alpha Channel (This one is Chinese but not in a way that I would translate)
Comment 7 Tyson Tan 2018-06-14 02:15:28 UTC
Created attachment 113271 [details]
007A Menu Layer Edit metadata Dublin Core

Dublin Core
[OK] [Cancel]
Comment 8 Tyson Tan 2018-06-14 02:16:43 UTC
Created attachment 113272 [details]
007B Menu Layer Edit metadata Exif

Exposure >>
Brightness value:
Comment 9 Tyson Tan 2018-06-14 02:17:30 UTC
Created attachment 113273 [details]
007C Menu Layer Edit metadata Exif

Autofocus >>
Subject distance:
Comment 10 Tyson Tan 2018-06-14 02:18:30 UTC
Created attachment 113274 [details]
008A Configure Krita General Cursor

Show brush outline while painting
Comment 11 Tyson Tan 2018-06-14 02:19:08 UTC
Created attachment 113275 [details]
008A Configure Krita General Others

Recalculate animation cache in background
Comment 12 Tyson Tan 2018-06-14 02:20:37 UTC
Created attachment 113276 [details]
008C Configure Krita Keyboard Shortcut

The name of the categories are not translatable. The items inside them were translated.
Comment 13 Tyson Tan 2018-06-14 02:21:22 UTC
Created attachment 113277 [details]
008D Canvas Input Settings

The Switch Time action changes the current time of the image.
Comment 14 Tyson Tan 2018-06-14 02:22:15 UTC
Created attachment 113278 [details]
008E Configure Krita Color Management

Assume &monitor profile (like...
Comment 15 Tyson Tan 2018-06-14 02:23:24 UTC
Created attachment 113279 [details]
008F Configure Krita Python Plugins

The names and descriptions of the plugins are actually translated, but for some reason not reflected.
Comment 16 Tyson Tan 2018-06-14 02:25:51 UTC
Created attachment 113280 [details]
009 Menu Settings Dockers

&Comic Manager
Last &Documents Docker
&Quick Settings Docker

Also, for some reason these menu strings are being used as the titles of these dockers.
Comment 17 Tyson Tan 2018-06-14 02:27:08 UTC
Created attachment 113281 [details]
010A Tool options Shape Selecting Tool

Uniform Scaling
Comment 18 Tyson Tan 2018-06-14 02:28:19 UTC
Created attachment 113282 [details]
010B Tool options Shape Editing Tool

Convert to Path
Comment 19 Tyson Tan 2018-06-14 02:29:48 UTC
Created attachment 113283 [details]
010C Tool options SVG Text Tool

Main dialogue >>
[Save] [Close]

Menu >> Find/Replace >>
[OK] [Cancel]
Comment 20 Tyson Tan 2018-06-14 02:30:45 UTC
Created attachment 113284 [details]
010D Tool options Transformation Tool

[R&eset] [&Apply]
Comment 21 Tyson Tan 2018-06-14 02:33:15 UTC
Created attachment 113285 [details]
010E Tool options Color Picker

Update current color
Sample radius

And the Channel / Value here is translated as Value in brightness. I've already reported this in the past, I wonder if this is a missed one, or just 4.0.4 being obsolete in some places.
Comment 22 Tyson Tan 2018-06-14 02:34:52 UTC
Created attachment 113286 [details]
010F Tool options Colorize Mask Editing Tool

Edge detection:
Gap close hint:
Clean up:

I'm pretty sure I've translated something like these. Maybe KDE wasn't pulling the new zh_CN build here.
Comment 23 Tyson Tan 2018-06-14 02:35:53 UTC
Created attachment 113287 [details]
010G Tool options Assistant

[&Open] [&Save] [&Delete all]
Comment 24 Tyson Tan 2018-06-14 02:37:52 UTC
Created attachment 113288 [details]
011A Dockers Comics Manager

Nothing was translated, and I can't recall seeing these strings but I could be wrong. Also notice how the title of the docker is using its Menu strings.
Comment 25 Tyson Tan 2018-06-14 02:38:30 UTC
Created attachment 113289 [details]
011B Dockers Last documents

Same as 011A
Comment 26 Tyson Tan 2018-06-14 02:38:59 UTC
Created attachment 113290 [details]
011C Dockers Quick Settings

Same as 011A
Comment 27 Tyson Tan 2018-06-14 02:39:33 UTC
Created attachment 113291 [details]
011D Dockers Vector Library

Same as 011A
Comment 28 Tyson Tan 2018-06-14 02:40:49 UTC
Created attachment 113292 [details]
012A Dockers Layer Property dialogue

Composite mode:
Pretty sure I've reported this and re-translated it. Probably also because of 4.0.4 being obsolete or KDE not pulling in time.
Comment 29 Tyson Tan 2018-06-14 04:47:31 UTC
I've re-check the strings again, and found a lot of the missing items have something similar in the pot file, but without "&" in their places.
Comment 30 Pino Toscano 2018-06-14 06:56:16 UTC
Git commit cc25aeddb2ea2054d5e435cfeb1b5ad65dd98710 by Pino Toscano.
Committed on 14/06/2018 at 06:52.
Pushed by pino into branch 'master'.

pykrita: use KDesktopFile to read desktop files of plugins

This way translations are automatically used.
(the case 008F is fixed)

M  +9    -8    plugins/extensions/pykrita/plugin/PythonPluginManager.cpp

https://commits.kde.org/krita/cc25aeddb2ea2054d5e435cfeb1b5ad65dd98710
Comment 31 Pino Toscano 2018-06-14 06:58:26 UTC
Hi Tyson Tan,

what is the code of the language you are using?

How did you install the KDE Frameworks libraries? Did you build them on your own, or are you using them as available in a Linux distribution (which one)?
Comment 32 Pino Toscano 2018-06-14 07:02:04 UTC
Also, regarding the screenshot 003: basically all of the strings in Python plugins are not translatable. Most probably that will require binding i18n() to the Python API, or using the Python binding of KI18n (which are not used much, though).
Comment 33 Tyson Tan 2018-06-14 07:47:21 UTC
(In reply to Pino Toscano from comment #31)
> Hi Tyson Tan,
> 
> what is the code of the language you are using?
> 
> How did you install the KDE Frameworks libraries? Did you build them on your
> own, or are you using them as available in a Linux distribution (which one)?

Hi, Pino.
In the screenshots, Krita was running under Windows 10 for testing. The language code is zh_CN (Simplified Chinese/ Chinese (China)).

I personally use either Manjaro provided packages or Appimage from Krita.org. They all behave the same in case of these missing strings.

KDE Frameworks on Manjaro 17.1.10 right now is 5.46.
Comment 34 Tyson Tan 2018-06-14 12:48:51 UTC
Created attachment 113313 [details]
013 Brush Engine

The "Engine" text following each brush engine.
Comment 35 Pino Toscano 2018-06-14 22:30:15 UTC
Regarding the "OK", "Cancel", "Apply", "Restore Defaults", etc labels of standard buttons in dialogs: the majority of them (if not all) should come from Qt5 itself, so I'd check the status of the qtbase translations for zh_CN.
Same reason for the "Pick Screen Color" string of screenshot 006.

Regarding translations from Frameworks: I see that until few days ago they were not 100% complete, so maybe some of the strings were missing -- let's wait for 5.48.0 (3 away from tagging, 4 from release).

Regarding the Python plugins: most probably there is already the way to use i18n(), and the Comic plugin had translatable strings already. OTOH, no strings from .py files were extracted, so I committed this:
https://commits.kde.org/krita/5d4c275a1dd3e5f45e109e976774019ba981d2c4
Now the task is checking whether the translations actually work, and in case mark for translations also the strings of the other Python plugins.

Also, I did not find some of the strings mentioned in the current git master (future 4.1.0), e.g. 008D.
Comment 36 Tyson Tan 2018-06-15 01:25:13 UTC
(In reply to Pino Toscano from comment #35)
> Regarding the "OK", "Cancel", "Apply", "Restore Defaults", etc labels of
> standard buttons in dialogs: the majority of them (if not all) should come
> from Qt5 itself, so I'd check the status of the qtbase translations for
> zh_CN.
> Same reason for the "Pick Screen Color" string of screenshot 006.
> 
> Regarding translations from Frameworks: I see that until few days ago they
> were not 100% complete, so maybe some of the strings were missing -- let's
> wait for 5.48.0 (3 away from tagging, 4 from release).
> 
> Regarding the Python plugins: most probably there is already the way to use
> i18n(), and the Comic plugin had translatable strings already. OTOH, no
> strings from .py files were extracted, so I committed this:
> https://commits.kde.org/krita/5d4c275a1dd3e5f45e109e976774019ba981d2c4
> Now the task is checking whether the translations actually work, and in case
> mark for translations also the strings of the other Python plugins.
> 
> Also, I did not find some of the strings mentioned in the current git master
> (future 4.1.0), e.g. 008D.

Hi Pino, Thanks for the commit for the Python plugins!
I understand that I need to look into qtbase and KDE frameworks for a more complete translation. The problem is, I don't really know where to look at, so I have 2 questions:

1) Do you know where I can contribute translations for qtbase?
2) Do you know which KDE Frameworks components are holding those non-krita strings?

Thank you!
Comment 37 Pino Toscano 2018-06-15 05:36:13 UTC
(In reply to Tyson Tan from comment #36)
> 1) Do you know where I can contribute translations for qtbase?

https://wiki.qt.io/Qt_Localization is a good starting point.

> 2) Do you know which KDE Frameworks components are holding those non-krita
> strings?

Hard to say; OTOH,
https://l10n.kde.org/stats/gui/trunk-kf5/team/zh_CN/frameworks/
shows 100% completion for Frameworks now, that is why I suggested to also wait for the next version (5.48.0).
Comment 38 Pino Toscano 2018-06-15 07:43:56 UTC
(In reply to Pino Toscano from comment #32)
> Most probably that will require binding i18n()
> to the Python API, or using the Python binding of KI18n (which are not used
> much, though).

This seems to exists already, as there is a binding for i18n() here:
plugins/extensions/pykrita/plugin/krita/__init__.py
OTOH ...

(In reply to Pino Toscano from comment #35)
> Now the task is checking whether the translations actually work, and in case
> mark for translations also the strings of the other Python plugins.

... that binding is not useful, since:
a) it uses QCoreApplication::translate(), instead of i18n() from KI18n
b) the context ("PyKrita") is wrong, as all the strings are matched against the "krita" domain (see -DTRANSLATION_DOMAIN=\"krita\" in the top-level CMakeLists.txt)

@krita developers: pykrita needs a proper binding for i18n(), calling the actual i18n() from KI18n, so translations are properly searched in the same krita MO catalog as the strings in C++ files. If you have already familiarity with SIP, a faster patch that what I could do is welcome :-)
(Also, while doing this, adding a binding for i18nc() would be nice too.)
Comment 39 Tyson Tan 2018-06-15 13:24:02 UTC
Hi Pino, I saw the updated strings of those Python plugins. OMG There are like a million new strings of them XD

Thank you for the help and I will translate them ASAP!
Comment 40 Halla Rempt 2018-06-15 15:45:32 UTC
I will try to look into that. I think this part of the code came from scribus, not kate...
Comment 41 Pino Toscano 2018-06-15 21:43:57 UTC
OK, I marked more strings in Python plugins for translations, fixing their style while doing so.
I backported the fixes in the krita/4.1 branch -- it is not a problem for the string freeze, since those strings were never extracted, so it does not change anything for translators.
Comment 42 Tyson Tan 2018-06-19 03:15:52 UTC
Thank you Boud and Pino. And today all new strings have been translated. 

A peculiar thing: on Crowdin / KDE China, Krita has 4 POT files:

kf5-trunk/messages/extragear-graphics/desktop_extragear-graphics_krita.pot
kf5-trunk/messages/extragear-graphics/krita.pot
kf5-trunk/messages/extragear-graphics/org.kde.krita.appdata.pot
kf5-stable/messages/extragear-graphics/krita.pot

99% of the translations happenes in:
kf5-trunk/messages/extragear-graphics/krita.pot
The newly added "&Create" showed up there as well.

However, a "Create" without "&" also showed up yesterday in:
kf5-stable/messages/extragear-graphics/krita.pot

Plus, I don't know how to deal with [OK] [Cancel] buttons yet. For some reason, some of them are translated in some dialogues, but not all of them.
Comment 43 Pino Toscano 2018-06-19 04:04:19 UTC
Git commit 77a5df289ff30f2d4a740521b571e978c13e58d3 by Pino Toscano.
Committed on 19/06/2018 at 03:54.
Pushed by pino into branch 'krita/4.1'.

pykrita: use KDesktopFile to read desktop files of plugins

This way translations are automatically used.
(the case 008F is fixed)

(cherry picked from commit cc25aeddb2ea2054d5e435cfeb1b5ad65dd98710)

M  +9    -8    plugins/extensions/pykrita/plugin/PythonPluginManager.cpp

https://commits.kde.org/krita/77a5df289ff30f2d4a740521b571e978c13e58d3
Comment 44 Pino Toscano 2018-06-19 04:32:20 UTC
(In reply to Tyson Tan from comment #42)
> Thank you Boud and Pino. And today all new strings have been translated. 

Remember to make sure the updated translations are pushed in the KDE SVN; right now I see in stable/l10n-kf5 for zh_CN:

$ LANG=C msgfmt --statistics -c -o /dev/null extragear-graphics/krita.po 
5433 translated messages, 394 fuzzy translations, 180 untranslated messages.

stable/l10n-kf5 follows the krita/4.1 branch of krita, and it is what will be used when releasing krita 4.1.x.

trunk/l10n-kf5 currently follows the master branch of krita, and will be used for future 4.2.x.

> kf5-trunk/messages/extragear-graphics/desktop_extragear-graphics_krita.pot

This is for strings in .desktop files, and they are written back to the .desktop files themselves; most of the strings here are used in krita.

> kf5-trunk/messages/extragear-graphics/org.kde.krita.appdata.pot

This is for strings in the .appdata.xml files, and they are written back to the .appdata.xml files themselves; the .appdata.xml files are not used by the applications themselves, but by consumers of the AppStream format (e.g. Plasma Discover, GNOME Software, etc).

Note both the file above are available also in stable/l10n-kf5.

> Plus, I don't know how to deal with [OK] [Cancel] buttons yet. For some
> reason, some of them are translated in some dialogues, but not all of them.

At this point I'd say:
- @Tyson: make sure that krita.po in stable/l10n-kf5 for zh_CN is 100% translated
- if Boud does not beat me to it, I will try to fix the i18n() SIP binding in pykrita once an alpha/beta of 4.1.0 with translations is available
- let's re-check the status again once the final 4.1.0 is released
Comment 45 Tyson Tan 2018-06-19 09:13:26 UTC
(In reply to Pino Toscano from comment #44)
I think KDE Chinese translations are managed this way:

1) Crowdin: Translators translates
2) Crowdin: KDE China project admin build the whole KDE Chinese translation there
3) Crowdin stuff is being hosted on gitlab: https://gitlab.com/kde-china/crowdin/
4) After building the translation project on Crowdin, there should be some process that I don't involve/know which pushes the built version of translation to KDE SVN. At least that's what I suspect. This process appear to be working, because my previous translations are now effective in Krita 4.0.4.

I have already contacted KDE China's admin Guoyunhe, he said he will build the project this afternoon.

Thank you for the explanation about which POT file is which. I have been keeping all those 4 POT files 100% translated. I translate everything that I can touch, and then report translation issues like this should I find anything wrong.
Comment 46 Tyson Tan 2018-06-21 14:42:51 UTC
Created attachment 113489 [details]
001B_Create New Document dialogue 4.1.0 beta2

I've tested the translations in 4.1.0 beta. Everything else is translated except for this, the Create New Document dialogue's [Create] and [Cancel] buttons. Somehow it got worse: before the Cancel button was translated, now it is not anymore. What change do you think triggered the regression? Maybe we can start to have a clue by investigating that.
Comment 47 Andrey 2018-06-26 15:10:49 UTC
Git commit 49e5964bd6d05e5fc82120c6c3ed02c3df0f7401 by Andrey Kamakin, on behalf of Pino Toscano.
Committed on 26/06/2018 at 14:18.
Pushed by akamakin into branch 'akamakin/T8628-multithreading-optimization'.

pykrita: use KDesktopFile to read desktop files of plugins

This way translations are automatically used.
(the case 008F is fixed)

M  +9    -8    plugins/extensions/pykrita/plugin/PythonPluginManager.cpp

https://commits.kde.org/krita/49e5964bd6d05e5fc82120c6c3ed02c3df0f7401
Comment 48 Pino Toscano 2018-06-27 18:29:09 UTC
@Tyson Tan:
now that Krita 4.1.0 is released, can you please check again the status of all the issues you reported as images?
If so, please mark the images of all the fixed cases as "obsolete" attachments in this bug, so it is easier to see what you still notice as untranslated.
Comment 49 Tyson Tan 2018-06-29 02:34:11 UTC
Created attachment 113635 [details]
001C_Create New Document dialogue

Krita 4.1.0 stable, still untranslated:
1) Document size auto-calculation and hint text
2) [Create]
3) [Cancel]
Comment 50 Tyson Tan 2018-06-29 02:35:52 UTC
Created attachment 113636 [details]
014_Configure Krita dialogue

Krita 4.1.0, still untranslated:
1) [Restore Default]
2) [OK]
3) [Cancel]
Comment 51 Tyson Tan 2018-06-29 03:12:42 UTC
Created attachment 113638 [details]
004A Menu Window Workspace

The names of these items might be related to the upcoming new resource management system Boud told me. I just put them here in case we forgot to re-check them.
Comment 52 Tyson Tan 2018-06-29 03:53:44 UTC
Created attachment 113639 [details]
006A Menu-Image-Image Background and Transparency

When system default language is set to English, and Krita language set to Chinese, there are many strings shown untranslated.

However, when both system default and Krita languages are set to Chinese, there are only a few strings shown untranslated.

I wonder if we can override this in Krita's localization file? And is it possible that this is handled by Qt and we need to go upstream to fix/translate it?
Comment 53 Tyson Tan 2018-06-29 03:59:18 UTC
Created attachment 113640 [details]
008C1 Configure Krita-Keyboard Shortcut

In "Configure Krita" dialogue, "Keyboard Shortcut" page.
The categories and one item are untranslatable.
Comment 54 Tyson Tan 2018-06-29 04:03:15 UTC
Created attachment 113641 [details]
010C1 Tool options SVG Text Tool

Toolbox - SVG Text Tool - Text Editing dialogue - Menu - Edit - Find/Replace
[OK] [Cancel]
Comment 55 Tyson Tan 2018-06-29 04:12:05 UTC
Created attachment 113642 [details]
010D1 Tool options Transformation Tool

Toolbox - Transform a layer or a selection (Ctrl+T) - Look: Tool Options docker
[Reset] [Apply]
Comment 56 Tyson Tan 2018-06-29 04:16:15 UTC
Created attachment 113643 [details]
011D1 Dockers-Vector Library

Menu - Settings - Dockers - Vector Library
I guess these items also have something to do with Boud's new resource management system. I just put this up here in case we forgot to re-check them.
Comment 57 Tyson Tan 2018-06-29 04:18:42 UTC
@Pino Toscano
Thank you Pino, now I have learned how make old files obsolete! XD
I have marked all fixed ones as "obsolete", and added new one with red markings on the untranslated places so you can easily see.
Comment 58 Tyson Tan 2018-06-29 04:21:44 UTC
String suggestion:

#: plugins/python/lastdocumentsdocker/lastdocumentsdocker.py:38
Original: Last Documents Docker
Suggestion: Last Documents

#: plugins/python/quick_settings_docker/quick_settings_docker.py:36
Original: Quick Settings Docker
Suggestion: Quick Settings

Because they are inside Menu - Settings - Docker, including "docker" in the name is redundant and awkward as other items in that folder has no "docker" in their names.
Comment 59 Pino Toscano 2018-06-29 04:48:41 UTC
(In reply to Tyson Tan from comment #50)
> Created attachment 113636 [details]
> 014_Configure Krita dialogue
> 
> Krita 4.1.0, still untranslated:
> 1) [Restore Default]

This string is actually translatable -- I enabled its translation few days ago, and indeed it is still not translated in zh_CN.
Comment 60 Pino Toscano 2018-06-29 04:54:44 UTC
(In reply to Tyson Tan from comment #53)
> Created attachment 113640 [details]
> 008C1 Configure Krita-Keyboard Shortcut
> 
> In "Configure Krita" dialogue, "Keyboard Shortcut" page.
> The categories and one item are untranslatable.

It looks like that your "Tools" category includes way more elements than what mine (krita 4.1.0 built as Debian package) includes, and "Artistic Text Tool" is one of these extras.
Do you build krita from sources, and install it somewhere locally? If so, it might be an old plugin still lying around...
Comment 61 Pino Toscano 2018-06-29 06:24:55 UTC
OK, so if I set zh_CN as language in krita (Settings -> Switch Application Language), I can see the following:

- the standard buttons eg [OK], [Cancel], [Apply], [Reset] are properly translated -- in particular, these you showed in screenshots 001C, 014, 006A, 008C1, 010C1, 010D1

- in 006A, only the "Pick Screen Color" string is untranslated

- in 001C, I can confirm the untranslated [Create] button, and the size text

- 004A is still untranslated as before; this involves the system of resources, and also other kind of resources (e.g. the shipped brushes/patterns/etc) are untranslated as well, so a separate discussion about these is needed

- in 008C1 the [Print] button is translated, but the categories not; I have a prototype of fix for this, still needs more work

- in 011D1 the strings come from SVG files themselves

@Boud: just to be sure: I guess translations for 4.1.0 were picked from /branches/stable/l10n-kf5, right? Where are the scripts used to create the release tarballs?
Comment 62 Pino Toscano 2018-06-29 06:28:57 UTC
Forgot to ask:
@Tyson: which version of Qt do you have? Also, are you sure you have the Qt translations installed (they are a different Qt module).
What about the [OK], [Cancel], etc buttons on other Qt/KF5 applications, e.g. kate, kwrite, dolphin, okular, etc?
Comment 63 Tyson Tan 2018-06-29 06:44:39 UTC
(In reply to Pino Toscano from comment #59)
> (In reply to Tyson Tan from comment #50)
> > Created attachment 113636 [details]
> > 014_Configure Krita dialogue
> > 
> > Krita 4.1.0, still untranslated:
> > 1) [Restore Default]
> 
> This string is actually translatable -- I enabled its translation few days
> ago, and indeed it is still not translated in zh_CN.

I have already translated it in Crowdin. It will be pushed to KDE when the KDE zh_CN project is built next time.
Comment 64 Tyson Tan 2018-06-29 06:48:58 UTC
(In reply to Pino Toscano from comment #60)
> (In reply to Tyson Tan from comment #53)
> > Created attachment 113640 [details]
> > 008C1 Configure Krita-Keyboard Shortcut
> > 
> > In "Configure Krita" dialogue, "Keyboard Shortcut" page.
> > The categories and one item are untranslatable.
> 
> It looks like that your "Tools" category includes way more elements than
> what mine (krita 4.1.0 built as Debian package) includes, and "Artistic Text
> Tool" is one of these extras.
> Do you build krita from sources, and install it somewhere locally? If so, it
> might be an old plugin still lying around...

I'm using the official releases from Krita.org/download . The Windows version is an installer and I make sure previous files were deleted. The Linux version is an appimage which has everything packed except g'mic. I think you should ask @boud about what configuration and dependencies were used to build those official releases.
Comment 65 Tyson Tan 2018-06-29 07:09:22 UTC
(In reply to Pino Toscano from comment #62)
> Forgot to ask:
> @Tyson: which version of Qt do you have? Also, are you sure you have the Qt
> translations installed (they are a different Qt module).
> What about the [OK], [Cancel], etc buttons on other Qt/KF5 applications,
> e.g. kate, kwrite, dolphin, okular, etc?

Here is where things gets interesting...
I'm running Manjaro Linux GNOME 17.1.10, here are the related packages automatically installed by the system and their versions:
* qt5-base (5.11.0-1)
* qt5-translations (5.11.0-1)
* kate (18.04.2-1) (reflects KDE version, which is KDE5)
* kde-l10n-zh_cn (17.08.3-2) (but it's the translation for KDE4)
There are no other Qt/KDE related packages.

In this setup, Kate's configuration dialogues also have untranslated [OK] [Cancel] [Apply] buttons.

Keep in mind that the Windows version of Krita, Appimage version of Krita, are not affected by the packages above. They are self-contained packages. Since my system's KDE and KDE translation have mis-matched versions, I wonder if we also used mis-matched versions on KDE's building services for Krita?
Comment 66 Guo Yunhe 2018-12-13 13:57:43 UTC
Last week I built latest git version of Krita and latest Simplified Chinese translation. The "&Create" is translated correctly. I have confirmed with Tyson Tan personally.
Comment 67 Tyson Tan 2018-12-30 13:56:04 UTC
Thank you everybody who helped with this issue. Can't wait to confirm this in stable builds! :D
Comment 68 Tyson Tan 2021-06-06 05:36:28 UTC
So the current state of this bug is:

Buttons like [OK] and [Cancel] are missing translation in Krita's OWN builds (Windows/macOS/Linux). But the DISTRO builds have them. Therefore I suspect this is actually a packaging issue.

I recently worked on Qt upstream's translation, and noticed some quirks that might provide some clues.

Qt's translation is a separated project: "qt -> qttranslations". The package uses the name "qt5-translation" under Archlinux. It's an optional dependency of many things, but none of them actually requires qt5-translation to work.

By removing qt5-translation from the system, some KDE Plasma dialogues becomes English. Like the Printing dialogues which is basically Qt's.

For what Krita is missing, I can find the matching stuff under:

qttranslation -> qtbase -> QGnomeTheme, QPlatformTheme

QGnomeTheme translations have accelerators (the &X underline). QPlatformTheme ones don't have them. Krita's dialogues shows accelerators.

My guess is that our building system is not configured with qttranslation as a hard dependency to build Krita, and therefore our own builds alone don't have the translation from Qt.

Please allow me to reopen this bug since it was never truly resolved, and also for further discussion and possible improvement.
Comment 69 Alvin Wong 2021-06-14 17:28:56 UTC
Git commit 6ddad6502f3742c08ca89c3d1db36f331cf95e55 by Alvin Wong.
Committed on 13/06/2021 at 14:02.
Pushed by alvinwong into branch 'master'.

Load QTranslator-based translations for our override languages
Related: bug 363737

M  +101  -0    krita/main.cc

https://invent.kde.org/graphics/krita/commit/6ddad6502f3742c08ca89c3d1db36f331cf95e55
Comment 70 Tyson Tan 2021-06-16 01:32:28 UTC
Thank you Alvin!

This issue also happens for the official standalone packages of all KDE applications. Is there a way to make the larger community aware of this, or do I have to report this as a bug to every project separately?
Comment 71 Halla Rempt 2021-06-16 08:03:41 UTC
The best thing would be to mail the kde-i18n-doc@kde.org mailing list about this problem, with a CC to kde-core-devel@kde.org.
Comment 72 Tyson Tan 2021-06-16 08:25:46 UTC
Thanks Halla, I will do it!
Comment 73 Tyson Tan 2021-06-17 07:30:11 UTC
Created attachment 139426 [details]
Missing/wrong translation in file dialogues

Hi guys, do anymore know where can I find the strings for Krita's File dialogues? 
Is it a Qt or KDE file dialogue? I've translated everything that seems to be related in Krita/KDE/Qt and yet still can't find where do I translate this dialogue.

This happens only on Simplified Chinese locale. Other languages have proper translations after the recent patch.

A similar bug for digiKam suggest we perhaps haven't packaged something in Krita:
https://bugs.kde.org/show_bug.cgi?id=438701

On i18n/core-dev maillists, Luigi Toscano replied:

I've checked the Kate appdata and the Kate win64 binaries from binary-factory
and they don't include the Qt translations (they ships all the other
translations). So maybe just a configuration issue on the CI?
Comment 74 Halla Rempt 2021-06-17 07:47:44 UTC
It depends on whether native file dialogues are enabled on platforms where that's possible, or not. The appimage doesn't have native file dialogues. The one in the image looks like the Qt one.
Comment 75 Tyson Tan 2021-06-17 07:49:51 UTC
I noticed that "Date Modified" in Comment 73 -- that has a wrong Simplified Chinese translation -- has an entry in qttranslation's QDirModel and QFileSystemModel with a correct translation for a long time, but was not used in Krita (same for all KDE Applications).(In reply to Halla Rempt from comment #74)
> It depends on whether native file dialogues are enabled on platforms where
> that's possible, or not. The appimage doesn't have native file dialogues.
> The one in the image looks like the Qt one.

I noticed that "Date Modified" in Comment 73 -- that has a wrong Simplified Chinese translation -- has an entry in qttranslation's QDirModel and QFileSystemModel with a correct translation for a long time, but was not used in Krita (same for all KDE Applications).

What can be the reason?
Comment 76 Alvin Wong 2021-06-17 07:54:06 UTC
(In reply to Tyson Tan from comment #73)
> Hi guys, do anymore know where can I find the strings for Krita's File
> dialogues? 
> Is it a Qt or KDE file dialogue? I've translated everything that seems to be
> related in Krita/KDE/Qt and yet still can't find where do I translate this
> dialogue.
> 
> This happens only on Simplified Chinese locale. Other languages have proper
> translations after the recent patch.

These are probably Qt's file dialogs if you are running the AppImage. Note that we build with our patched Qt 5.12, so the updated upstream translations won't be available in Krita unless someone goes through the effort to backport them (i.e. include them in the form of patches in our 3rdparty build files).
Comment 77 Alvin Wong 2021-06-17 08:09:07 UTC
(In reply to Tyson Tan from comment #75)
> I noticed that "Date Modified" in Comment 73 -- that has a wrong Simplified
> Chinese translation -- has an entry in qttranslation's QDirModel and
> QFileSystemModel with a correct translation for a long time, but was not
> used in Krita (same for all KDE Applications).
> 
> What can be the reason?

I just check this: Qt 5.12.10 (i.e. the version we are currently building with) comes with the above wrong translations in qt_zh_CN.ts. The newest release Qt 5.12.11 which we might upgrade to does seem to have the correct translations in qtbase_zh_CN.ts, so after Dmitry is back from vacation you might see that fixed.
Comment 78 Tyson Tan 2021-06-17 08:16:48 UTC
Created attachment 139427 [details]
Updated qtbase_zh_CN.ts for Qt 5.12

Thanks Alvin, that actually explained a lot! So the improved translations must have been added after we patched our own version.

So, are all KDE's appimages currently built using the same patched Qt 5.12? If that's the case, I can finally cut the wild good chase and rest in peace/pieces XD

I have attached the current Qt 5.12's qtbase_zh_CN.ts from upstream. I wonder if it is possible to also patch this thing in? (I can understand it may not be that simple, but still worth a shot to ask!)

Am I correct: once we move to a new Qt branch, we'll be able to have the latest Qt translations (of the time)?
Comment 79 Tyson Tan 2021-06-17 08:31:04 UTC
(In reply to Alvin Wong from comment #77)
> (In reply to Tyson Tan from comment #75)
> > I noticed that "Date Modified" in Comment 73 -- that has a wrong Simplified
> > Chinese translation -- has an entry in qttranslation's QDirModel and
> > QFileSystemModel with a correct translation for a long time, but was not
> > used in Krita (same for all KDE Applications).
> > 
> > What can be the reason?
> 
> I just check this: Qt 5.12.10 (i.e. the version we are currently building
> with) comes with the above wrong translations in qt_zh_CN.ts. The newest
> release Qt 5.12.11 which we might upgrade to does seem to have the correct
> translations in qtbase_zh_CN.ts, so after Dmitry is back from vacation you
> might see that fixed.

OK, got it. Thanks Alvin! :D
Comment 80 Alvin Wong 2021-06-17 09:28:15 UTC
(In reply to Tyson Tan from comment #78)
> So, are all KDE's appimages currently built using the same patched Qt 5.12?
> If that's the case, I can finally cut the wild good chase and rest in
> peace/pieces XD

It should be specific to Krita because as far as I know Qt 5.15 has introduced bugs regarding tablet input, though I don't know the details.


> I have attached the current Qt 5.12's qtbase_zh_CN.ts from upstream. I
> wonder if it is possible to also patch this thing in? (I can understand it
> may not be that simple, but still worth a shot to ask!)

You can check the translations included in the Qt 5.12.11 source release [1] and if you see things that are _really_ wrong then we may include a patch for it when doing the upgrade.

> Am I correct: once we move to a new Qt branch, we'll be able to have the
> latest Qt translations (of the time)?

Theoretically, yes, but we will likely stick to 5.12 in the near future.