[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: Strange character in ksysguard translation template
From:       Lasse Liehu <lasse.liehu () gmail ! com>
Date:       2016-12-11 17:28:24
Message-ID: CAJa6Ua5FTsHiNzkocigJ0Gp-j3nzzJM1k7Duf+4fTTys+EaypA () mail ! gmail ! com
[Download RAW message or body]

On 11 December 2016 at 14:49 Karl Ove Hufthammer <karl@huftis.org> wrote:

> In the ksysguard.po(t) translation files, one of the strings contain a
> strange character:
>
> msgid "1 process"
> msgid_plural "%1 processesœ%1"
>
> I'm not sure if it's visible in this e-mail, but between ‘processes' and
> ‘%1' in the msgid_plural string, there is a U+009C (‘string terminator')
> character. In Lokalize, it's displayed as vertical bar inside a rectangle.
>
> Is this string terminator character supposed to be there? The whole
> plural form looks suspect, with *two* ‘%1' placeholders.
>

That is the separator for multi-length string in Qt, which means that the
first string that fits into the UI will be used. Thus multi-length strings
should be separated from longest to shortest. It is explained on
http://doc.qt.io/qt-5/qml-qtquick-text.html#elide-prop but I have seen it
work on QLabels (and in ksysguard) as well even though I could not find
mention of it in QLabel's documentation.

Actually, looking at source code of ksysguard (
https://cgit.kde.org/ksysguard.git/tree/gui/ksysguard.cpp), string "1
process" does not exist. It seems that extraction of that mesage is broken
in such a way that the string is cut off at U+009C.

-- 
Lasse Liehu

[Attachment #3 (text/html)]

<div dir="ltr">On 11 December 2016 at 14:49 Karl Ove Hufthammer &lt;<a \
href="mailto:karl@huftis.org">karl@huftis.org</a>&gt; wrote:<br><div \
class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">In the ksysguard.po(t) translation \
files, one of the strings contain a<br class="gmail_msg"> strange character:<br \
class="gmail_msg"> <br class="gmail_msg">
msgid &quot;1 process&quot;<br class="gmail_msg">
msgid_plural &quot;%1 processesœ%1&quot;<br class="gmail_msg">
<br class="gmail_msg">
I'm not sure if it's visible in this e-mail, but between ‘processes' and<br \
class="gmail_msg"> ‘%1' in the msgid_plural string, there is a U+009C (‘string \
terminator')<br class="gmail_msg"> character. In Lokalize, it's displayed as vertical \
bar inside a rectangle.<br class="gmail_msg"> <br class="gmail_msg">
Is this string terminator character supposed to be there? The whole<br \
class="gmail_msg"> plural form looks suspect, with *two* ‘%1' \
placeholders.<br></blockquote><div><br></div><div>That is the separator for \
multi-length string in Qt, which means that the first string that fits into the UI \
will be used. Thus multi-length strings should be separated from longest to shortest. \
It is explained on <a \
href="http://doc.qt.io/qt-5/qml-qtquick-text.html#elide-prop">http://doc.qt.io/qt-5/qml-qtquick-text.html#elide-prop</a> \
but I have seen it work on QLabels (and in ksysguard) as well even though I could not \
find mention of it in QLabel&#39;s documentation.<br><br></div><div>Actually, looking \
at source code of ksysguard (<a \
href="https://cgit.kde.org/ksysguard.git/tree/gui/ksysguard.cpp">https://cgit.kde.org/ksysguard.git/tree/gui/ksysguard.cpp</a>), \
string &quot;1 process&quot; does not exist. It seems that extraction of that mesage \
is broken in such a way that the string is cut off at U+009C.<br><br>-- \
<br></div><div>Lasse Liehu<br></div></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic