[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: Re: Some strings resist to translate. -- Definitely a Qt Designer bug
From: Albert Astals Cid <aacid () kde ! org>
Date: 2013-04-24 20:15:21
Message-ID: 1592786.8elgOtTzNH () xps
[Download RAW message or body]
El Dimecres, 24 d'abril de 2013, a les 21:26:46, Orestes Mas va escriure:
> 2013/4/24 Albert Astals Cid <aacid@kde.org>
>
> > > But it seems that KDE app is unable to match the string to translate
> >
> > (stored
> >
> > > somewhere in the code, I presume) with the english string extracted from
> > > the .ui file and ending up in the .mo file. So: How is KDE storing an
> > > english string (containing HTML entities) into the executable code?
> > >
> > > Does anyone know? Albert?
> >
> > I don't know what you're talking about, i tried looking in your codebase
> > and
> > found nothing, then did this
> >
> > diff --git a/src/ui/audio_settings.ui b/src/ui/audio_settings.ui
> > index e31397c..de9b247 100644
> > --- a/src/ui/audio_settings.ui
> > +++ b/src/ui/audio_settings.ui
> > @@ -57,6 +57,9 @@
> >
> > </item>
> > <item row="3" column="0">
> >
> > <widget class="QLabel" name="sourceLabel">
> >
> > + <property name="toolTip">
> > + <string><html><head/><body><p>lala
> > &lt;
> > &gt;</p></body></html></string>
> > + </property>
> >
> > <property name="text">
> >
> > <string>&Audio Source:</string>
> >
> > </property>
> >
> > And after running extract messages i correctly got
> >
> > #. i18n: file: ui/audio_settings.ui:61
> > #. i18n: ectx: property (toolTip), widget (QLabel, sourceLabel)
> > #: rc.cpp:15
> > msgid "<html><head/><body><p>lala < ></p></body></html>"
> > msgstr ""
> >
> > Is this what you're talking about? or?
> >
> > Cheers,
> >
> > Albert
>
> Not exactly. Let me explain: What you see is the same I see, both in the
> .ui and .po files.
>
> The question is: If you translate this string and install the translation,
> can you see the translated string in the running program?
>
> My guess is no, because the "&lt;" and "&gt;" substrings from the
> .ui file are not stored correctly within the executable (by "correctly" I
> mean equal than the "msgid" in the .po file).
The code is
./src/ui_audio_settings.h:111: \
systemLabel->setToolTip(tr2i18n("<html><head/><body><p>lolo < \
></p></body></html>", 0));
That matches exactly
./po/lekture.pot:95:msgid "<html><head/><body><p>lolo < ></p></body></html>"
Cheers,
Albert
>
> Orestes.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic