Bug 403090 - info:tooltip shown not neat
Summary: info:tooltip shown not neat
Status: RESOLVED FIXED
Alias: None
Product: ksysguard
Classification: Applications
Component: ksysguard (show other bugs)
Version: 5.14.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-11 07:11 UTC by Wantoyo
Modified: 2020-06-30 10:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot_20190111_122738.png (128.80 KB, image/png)
2019-04-11 23:37 UTC, Wantoyo
Details
Screenshot_20190111_124408.png (125.19 KB, image/png)
2019-04-11 23:37 UTC, Wantoyo
Details
tooltips not tidy (67.63 KB, image/png)
2020-06-28 01:14 UTC, Wantoyo
Details
bug.png (67.63 KB, image/png)
2020-06-28 15:13 UTC, Wantoyo
Details
tolltips are perfect. (56.58 KB, image/png)
2020-06-29 17:20 UTC, Wantoyo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wantoyo 2019-01-11 07:11:30 UTC
SUMMARY

In the Process Table when the mouse pointer hovers in the application name, shows a tooltips. In this case, when the interface language is switched to Indonesian, Albanian, Hindi and several other languages but not all of them, then the tooltip displays with non-neat text like the original.

STEPS TO REPRODUCE
1. I searched for the source of the translation text and I found it was in processui.po
2.This is the line that I exemplify. I just tried to give a space in front of the word but it didn't work well.

 #. +> trunk5 stable5 plasma5lts
#: ProcessModel.cpp:1437
#, kde-kuit-format
msgctxt "@info:tooltip"
msgid ""
"<title>%1</title>"
"<para><emphasis strong='true'>Process ID:</emphasis> %2</para>"
"<para><emphasis strong='true'>Parent:</emphasis> %3</para>"
"<para><emphasis strong='true'>Parent's ID:</emphasis> %4</para>"
msgstr ""
"<title>%1</title>"
"<para><emphasis strong='true'>  ID Proses:</emphasis> %2.</para>"
"<para><emphasis strong='true'>  Induk:</emphasis> %3.</para>"
"<para><emphasis strong='true'>  ID Induk:</emphasis> %4.</para>"

EXPECTED RESULT
What I expect is that the tooltip appears neatly as it is.

Sistem Operasi: openSUSE Tumbleweed 20190108
Versi KDE Plasma: 5.14.4
Versi Qt: 5.12.0
Versi KDE Frameworks: 5.53.0
Versi Kernel: 4.19.12-1-default
Tipe OS: 64-bit
Prosesor: 2 × AMD Phenom(tm) II X2 570 Processor
Memori: RAM 7,8 GiB
Comment 1 Richard Llom 2019-03-12 19:03:07 UTC
Can you upload a screenshot which displays the problem?
Comment 2 Bug Janitor Service 2019-03-27 04:33:18 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Bug Janitor Service 2019-04-11 04:33:19 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 4 Wantoyo 2019-04-11 23:37:56 UTC
Created attachment 119364 [details]
Screenshot_20190111_122738.png

In English, the tooltip looks good. But in Indonesian there are letters
that blend together without return.

Pada tanggal Kam, 11 Apr 2019 pukul 11.33 Bug Janitor Service <
bugzilla_noreply@kde.org> menulis:

> https://bugs.kde.org/show_bug.cgi?id=403090
>
> Bug Janitor Service <bug-janitor@kde.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>          Resolution|WAITINGFORINFO              |WORKSFORME
>              Status|NEEDSINFO                   |RESOLVED
>
> --- Comment #3 from Bug Janitor Service <bug-janitor@kde.org> ---
> This bug has been in NEEDSINFO status with no change for at least
> 30 days. The bug is now closed as RESOLVED > WORKSFORME
> due to lack of needed information.
>
> For more information about our bug triaging procedures please read the
> wiki located here:
> https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging
>
> Thank you for helping us make KDE software even better for everyone!
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 5 Wantoyo 2019-04-11 23:37:56 UTC
Created attachment 119365 [details]
Screenshot_20190111_124408.png
Comment 6 groot 2020-06-27 21:16:04 UTC
Wantoyo, I see the problem still exists in the current release. I have looked at the translation files of KSysGuard, and they are correct.

**But** in the running application, I added some debugging output so I could see the strings before they are set in the tooltips. I see this in English:

```
"<html><h2>QtWebEngineProcess</h2>\n\n<p><b>Process ID:</b> 71,268</p>\n\n<p><b>Parent:</b> falkon</p>\n\n<p><b>Parent&apos;s ID:</b> 70,451</p></html>"
```

and this in Indonesian:

```
"<html><h2>QtWebEngineProcess</h2>\n\n<b><b>ID Proses:</b> 71.268</b>\n\n<b><b>Induk:</b> falkon</b>\n\n<b><b>ID Induk:</b> 70.451</b></html>"
```

These are the strings returned from the `xi18nc()` calls in the code. Systematically, the `<p>` element tags have been replaced by `<b>` element tags, which messes up the layout and the font-display. So I went looking in the ki18n translations, and found this:

```
#. i18n: KUIT pattern, see the comment to the first of these entries above.
#: kuitmarkup.cpp:764
#, kde-format
msgctxt "tag-format-pattern <para> rich"
msgid "<p>%1</p>"
msgstr "<b>%1</b>"
```

This translates `<para>` to `<b>` in Indonesian, which is not right. I corrected the translation in my local packaging of ki18n, and then the Indonesian tooltips are displayed with the right layout.

I do not know how to submit corrections to the translations, though, so you will need to fix this for me. Thank you.
Comment 7 Wantoyo 2020-06-28 01:14:09 UTC
Created attachment 129730 [details]
tooltips not tidy

I have tried to change 

<title>%1</title>
<para><emphasis strong='true'>ID Proses:</emphasis> %2</para>
<para><emphasis strong='true'>Induk:</emphasis> %3</para>
<para><emphasis strong='true'>ID Induk:</emphasis> %4</para>

to

<title>%1</title>
<b><emphasis strong='true'>ID Proses:</emphasis> %2</b>\n
<b><emphasis strong='true'>Induk:</emphasis> %3</b>
<b><emphasis strong='true'>ID Induk:</emphasis> %4</b>

produce a display like the screenshot I attached

I see a change in what is shown in the title, but in the bottom row there is 
still no change
Comment 8 Wantoyo 2020-06-28 15:13:19 UTC
Created attachment 129744 [details]
bug.png

> --- Comment #6 from groot@kde.org ---
> Wantoyo, I see the problem still exists in the current release. I have
> looked at the translation files of KSysGuard, and they are correct.
> 
> **But** in the running application, I added some debugging output so I could
> see the strings before they are set in the tooltips. I see this in English:
> 
> ```
> "<html><h2>QtWebEngineProcess</h2>\n\n<p><b>Process ID:</b>
> 71,268</p>\n\n<p><b>Parent:</b> falkon</p>\n\n<p><b>Parent&apos;s ID:</b>
> 70,451</p></html>"
> ```
> 
> and this in Indonesian:
> 
> ```
> "<html><h2>QtWebEngineProcess</h2>\n\n<b><b>ID Proses:</b>
> 71.268</b>\n\n<b><b>Induk:</b> falkon</b>\n\n<b><b>ID Induk:</b>
> 70.451</b></html>"
> ```
> 
> These are the strings returned from the `xi18nc()` calls in the code.
> Systematically, the `<p>` element tags have been replaced by `<b>` element
> tags, which messes up the layout and the font-display. So I went looking in
> the ki18n translations, and found this:
> 
> ```
> #. i18n: KUIT pattern, see the comment to the first of these entries above.
> #: kuitmarkup.cpp:764
> #, kde-format
> msgctxt "tag-format-pattern <para> rich"
> msgid "<p>%1</p>"
> msgstr "<b>%1</b>"
> ```
> 
> This translates `<para>` to `<b>` in Indonesian, which is not right. I
> corrected the translation in my local packaging of ki18n, and then the
> Indonesian tooltips are displayed with the right layout.
> 
> I do not know how to submit corrections to the translations, though, so you
> will need to fix this for me. Thank you.

I have tried to change 

<title>%1</title>
<para><emphasis strong='true'>ID Proses:</emphasis> %2</para>
<para><emphasis strong='true'>Induk:</emphasis> %3</para>
<para><emphasis strong='true'>ID Induk:</emphasis> %4</para>

to

<title>%1</title>
<b><emphasis strong='true'>ID Proses:</emphasis> %2</b>\n
<b><emphasis strong='true'>Induk:</emphasis> %3</b>
<b><emphasis strong='true'>ID Induk:</emphasis> %4</b>

produce a display like the screenshot I attached

I see a change in what is shown in the title, but in the bottom row there is 
still no change
Comment 9 groot 2020-06-28 20:26:05 UTC
I should have been more clear:

- the bug is not in ksysguard
- the bug is not in the translations of ksysguard
- the bug is in the translations inside the k18n framework

svn://anonsvn.kde.org/home/kde/trunk/l10n-kf5/id/messages/ki18n/ki18n5.po has the bad translation. 

This is wrong:
```
#. i18n: KUIT pattern, see the comment to the first of these entries above.
#: kuitmarkup.cpp:764
#, kde-format
msgctxt "tag-format-pattern <para> rich"
msgid "<p>%1</p>"
msgstr "<b>%1</b>"
```

It should be:
```
#. i18n: KUIT pattern, see the comment to the first of these entries above.
#: kuitmarkup.cpp:764
#, kde-format
msgctxt "tag-format-pattern <para> rich"
msgid "<p>%1</p>"
msgstr "<p>%1</p>"
```

That is, do not change <p> to <b> in the translation.
Comment 10 Wantoyo 2020-06-29 17:20:42 UTC
Created attachment 129769 [details]
tolltips are perfect.

Okay, I fixed the typo and now the tolltips are perfect. Thank you all for your help.

https://websvn.kde.org/trunk/l10n-kf5/id/messages/ki18n/ki18n5.po?view=log
Comment 11 groot 2020-06-30 10:22:19 UTC
senang bol'eh Wantoyo tolong

(Sorry, my Bahasa goes no further than page 12 of a colonial guide first published in 1949 -- it's probably not a good guide to modern communication)

I'll close this issue as "fixed by the next translations or frameworks release".