HTML Parts in translation

Yaron Shahrabani sh.yaron at gmail.com
Sun May 19 07:35:52 BST 2024


Hi, sorry for the late reply.

Maybe we can add further instructions, but from what I figured, this is how
it should be.

[image: Screenshot 2024-05-19 at 9.18.44.png]
This is Konsole's settings screen, Memory tab in case you wondered.
Here is a link to the code:
https://invent.kde.org/utilities/konsole/-/blob/master/src/settings/MemorySettings.ui#L24
We can add instructions about avoiding setting the line breaks but it's
unclear at the moment.
I fixed it in the trunk, but it's gonna take a while to apply.

Another issue is the RTL, this is another Konsole settings screen:
[image: Screenshot 2024-05-19 at 9.17.38.png]
This time is from the profile editing section.
This part is completely garbled and incomprehensible although translated
correctly.
Here is the relevant code:
https://invent.kde.org/utilities/konsole/-/blob/master/src/widgets/EditProfileGeneralPage.ui#L346
I modified my translation to include the attribute dir with the rtl value
(<HTML> -> <HTML dir="rtl">) which is fine but cumbersome and requires
special attention from the translators.

There are other RTL glitches that are not related.
Thanks :)
Yaron Shahrabani

<DevOps - Hebrew translator>



On Thu, May 16, 2024 at 10:14 AM Ingo Klöcker <kloecker at kde.org> wrote:

> On Donnerstag, 16. Mai 2024 07:34:26 CEST Yaron Shahrabani wrote:
> > Throughout the translation, there are several HTML-coded strings.
> > These are pure HTML messages that appear inside the different apps.
> > Usually relevant to display forms that are more complicated for Qt
> > components.
>
> Do you have a concrete example (ideally a link to the source code)?
>
> > I'm having 2 different issues with those:
> > 1. They are automatically LTR aligned, I need to add dir="rtl" manually
> for
> > them to align correctly, I can do it but I think it would be better to
> set
> > the default behavior to apply RTL if the locale is RTL.
> > 2. Display area adjustment - Sometimes I'm breaking the lines prematurely
> > and only when I'm using the app I can see that the lines break
> incorrectly,
> > for example:
> > This is some text that should
> > appear
> > in a label area.
> > I added the <br/> or <nl/> in the wrong place so the UI wrapped the text
> to
> > the next line and then there was an HTML line-break which left a single
> > word and a lot of space after it.
>
> Why do you think you need to add explicit line breaks to the translation?
> Does
> the original text have explicit line breaks? Explicit line breaks in HTML
> are
> almost always wrong. The Qt UI elements take care of wrapping text when
> needed. Explicit line breaks are okay'ish if one wants to put for example
> a
> filename occurring in a longer sentence on a line of its own.
>
> My advice would be to not add explicit line breaks to the translation
> unless
> they serve an obvious layout purpose. And if they do serve an obvious
> layout
> purpose then don't worry that the translation may look suboptimal.
>
> Regards,
> Ingo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-i18n-doc/attachments/20240519/01783009/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2024-05-19 at 9.18.44.png
Type: image/png
Size: 282413 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-i18n-doc/attachments/20240519/01783009/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2024-05-19 at 9.17.38.png
Type: image/png
Size: 270328 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-i18n-doc/attachments/20240519/01783009/attachment-0003.png>


More information about the kde-i18n-doc mailing list