[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: Re: Problem with contexts in TS<->PO
From: Burkhard =?ISO-8859-1?Q?L=FCck?= <lueck () hube-lueck ! de>
Date: 2014-10-14 9:46:31
Message-ID: 1974323.xOmf5ZuXEl () parodia
[Download RAW message or body]
Am Dienstag, 14. Oktober 2014, 09:03:16 schrieb Burkhard Lück:
> Am Montag, 15. September 2014, 20:10:58 schrieb Albert Astals Cid:
> > El Dilluns, 15 de setembre de 2014, a les 19:52:08, Lukáš Tinkl va
>
> escriure:
> > > Dne 15.9.2014 v 19:26 Albert Astals Cid napsal(a):
> > > > El Dilluns, 15 de setembre de 2014, a les 13:06:31, Chusslove Illich
> > > > va
> > > >
> > > > escriure:
> > > >>> -> lupdate mangles/breaks the context.
> > > >>>
> > > >>> WONTFIX on Qt side (fixing lupdate)
> > > >>>
> > > >>> Solution: directly extract po from Qt frameworks, so the context are
> > > >>> correct; requires few changes on the infrastructure
> > > >>
> > > >> This sounds strange. Is it related to
> > > >> https://bugreports.qt-project.org/browse/QTBUG-40444?
> > > >
> > > > Don't know, tbh i never understood; the problems of such things being
> > > > explained with words instead of with examples on the command line :D
> > > >
> > > > Lukas can you give us the expamples of what is really wrong?
> > > >
> > > > Cheers,
> > > >
> > > > Albert
> > > >>
> > > >> If so, I see Oswald's
> > > >> comments as correct, including the need-more-info resolution.
> > > >>
> > > >> For cases where PO is just an intermediate format, Gettext call
> > > >> conventions
> > > >> do not apply (e.g. that context in PO must match the context in
> > > >> code).
> > > >> Any
> > > >> conventions are instead established by the conversion tool. So the
> > > >> only
> > > >> relevant thing is whether installing the final TS file (after
> > > >> TS->PO->TS
> > > >> process) results in seeing all translations in the program. If it
> > > >> doesn't,
> > > >> then something is broken in the PO->TS part of lconvert, and not in
> > > >> lupdate
> > > >> or the TS->PO part of lconvert.
> > >
> > > I explained the problem and its symptoms (directly with examples) in the
> > > above bug report.
> >
> > Ok, i didn't know if that was the bug or not, so reading the bug i see two
> > things you mention.
> >
> > * The msgctxt has to match the source code context exactly and the comment
> > has to be put before the entry as a plain comment.
> >
> > I do not agree with this, anywya seems more a stylistic thing than a real
> >
> > problem.
> >
> >
> > * When converting such PO file back to TS with lconvert, the context is
> > lost. That doesn't happen here, i'm attaching my kcompletion5_qt.po and
> > the
> > ts genereated with lconvert. The ca.ts is fine, no?
>
> But if I convert l10n-kf5/ca/messages/frameworks/kcompletion5_qt.po to the
> a ts file I get an entry like:
> <message>
> <location filename="klineedit.cpp" line="1125"/>
> <source>Text Completion</source>
> <comment>KLineEdit|@title:menu</comment>
> <translation>Compleció del text</translation>
> </message>
>
> Whereas the your ca.ts has:
> <message>
> <location filename="klineedit.cpp" line="1125"/>
> <source>Text Completion</source>
> <comment>@title:menu</comment>
> <translation type="unfinished"></translation>
> </message>
>
> There are different strings in <comment></comment>:
> "KLineEdit|@title:menu" != "@title:menu"
>
> Attached two translation catalogs for kitemviews5_qt.
>
> 1) kitemviews5_qt.ts
> extracted with lupdate from sources, filled up with the german translations
> and installed with lconvert to a qm file
> -> "Search:" in kdebugdialog5 is translated
>
> 2. kitemviews5_qt.po-de2ts.ts
> that is the translated german po file converted with lconvert to a ts file
> and then installed with lconvert to a qm file
> -> "Search:" in kdebugdialog5 is *NOT* translated
>
> Both ts files have obviously different translation entries.
Locale x-test really rocks :-)
I installed x-test in the folder kf5/share/locale/zu/ and found the simple fix
for this issue, a missing line in our po file headers:
$ svn diff l10n-kf5/de/messages/frameworks/sonnet5_qt.po
Index: l10n-kf5/de/messages/frameworks/sonnet5_qt.po
===================================================================
--- l10n-kf5/de/messages/frameworks/sonnet5_qt.po (Revision 1402967)
+++ l10n-kf5/de/messages/frameworks/sonnet5_qt.po (Arbeitskopie)
@@ -22,6 +22,7 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Lokalize 1.5\n"
+"X-Qt-Contexts: true\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
#: core/loader.cpp:149
--
Burkhard Lück
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic