[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Nichtübersetzung von Zeichenketten in Handbuchseiten im xml-Format



Hallo Helge und Mitlesende

Markus Hiereth schrieb am 18. März 2023 um 12:01

> Helge Kreutzmann schrieb am  3. März 2023 um 18:19
> 
> > On Fri, Mar 03, 2023 at 06:05:15PM +0100, Markus Hiereth wrote:
> > > Helge Kreutzmann schrieb am  3. März 2023 um 16:46
> > > 
> > > > sind wir jetzt mit allen Seiten durch?
> > > 
> > > ja, wir sind durch. Allerdings wollte ich vor Einreichen des
> > > Meldungskatalogs vom Paketbetreuer wissen, welches Ergebnis die
> > > Übersetzung der Handbuchseiten (mit po4a-translate) zeitigt.
> > > 
> > > Bei meinem Versuchen war die Quote tatsächlich damitz übersetzter
> > > Strings bei rund einem Zehntel, Also eine negative Überraschung, wobei
> > > das nicht unbedingt von Bedeutung ist, denn womöglich spielen
> > > Konvertierungen von xml- ins groff-Format eine Rolle.
>  
> > Die Hintergründe sind mir nicht klar. Du hast also selber die
> > PO-Dateien erzeugt? Oder gibt es schon po4a/po-Dateien?
> > 
> > Die Quote sollte ja pro Handbuchseite sein, sonst ist das etwas
> > defekt.
> 
> Paketbetreuer Serge hat sich am 13.3. kurz gemeldet und bestätigt,
> dass die hohe Anzahl beim Übersetzungsvorgang nicht verwendeter
> Zeichenketten nicht mit irgendwelchen unbeabsichtigen
> Editierungsvorgängen von mir zu tun hat, Er schrieb
> 
>   "I'll have to see if it was a result of the tools switch that
>   happened not too long ago."

in der hier anhängenden Mail teilt er mit, wie das Problem mit der
schlechten Übersetzungsquote zu lösen ist. Zwar haben nicht wir als
Übersetzer, sondern die Autoren der Original-Handbuchseiten und der
Paketbetreuer damit zu tun, trotzdem leite ich Euch diese Information
zu.

Ignoriert - das heißt, nicht übersetzt - wurden Zeichenketten, in
welchen Teile mittels xml-Element als Kommando (mit <command>) oder
als Dateiname (mit <filename>) gekennzeichnet waren. In einem Schritt
der Übersetzungsprozedur wird mit einem Kommando itstool
gearbeitet. Diesem Programm kann man eine Liste von Elementen
mitgeben, mit denen es bitteschön "klarkommen soll".

Viele Grüße
Markus
--- Begin Message ---
cat > its.rules << EOF
<its:rules version="2.0" xmlns:its="http://www.w3.org/2005/11/its";>
  <its:withinTextRule withinText="yes" selector="//b | //em | //i | //command | //filename"/>
</its:rules>
EOF

and then

itstool -d -i its.rules -l de -m de/messages.mo -o OUTPUT.xml  chage.1.xml

results in the <command>chage</command> string being translated.

So it looks like we have a path forward.

-serge

On Mon, May 08, 2023 at 08:07:24PM -0500, Serge E. Hallyn wrote:
> It looks like we may be able to set ITS rules to support the
> elements we want to allow inside translatable units.
> 
> https://www.w3.org/TR/its20/#elements-within-text
> 
> On Mon, May 08, 2023 at 07:52:00PM -0500, Serge E. Hallyn wrote:
> > Hi,
> > 
> > So this turns out to be a (shortcoming, feature, bug, I don't know)
> > in itstool.  The texts to be translated are apparently quite restricted
> > in what they can container.  For instance, in chage.1.xml, I have to
> > remove the <command> and </command>:
> > 
> > @@ -56,7 +54,7 @@
> >    <refsect1 id='description'>
> >      <title>DESCRIPTION</title>
> >      <para>
> > -      The <command>chage</command> command changes the number of days between
> > +      The chage command changes the number of days between
> >        password changes and the date of the last password change. This
> >        information is used by the system to determine when a user must change
> >        their password.
> > 
> > That results in that paragraph being translated.  In the analogous
> > section for vipw, I find I must remove all < > items, as well as the
> > $ for EDITOR and VISUAL.
> > 
> > Note that we can keep those on the translated texts.  I just have to remove
> > them from man/po/de.po and from man/chage.1.xml.
> > 
> > So lacking a better solution, I may just alter the translation
> > generation bits so that they
> > 
> > 1. create man/chage.1.xml.stripped from man/chage.1.xml, removing
> >    those the offensive items.
> > 2. Process the man/po/*.po likewise.
> > 
> > -serge
> > 
> > On Sat, Feb 11, 2023 at 09:52:21AM +0100, Markus Hiereth wrote:
> > > Hi Serge,
> > > 
> > > I did another small set of tests but the problem with untranslated
> > > strings remain.
> > > 
> > > What are your findings? In case you are busy with other things, please
> > > provide me with information what commands are applied for getting the
> > > localised / the German manual pages from the xml sources and the
> > > po-file. This would allow see whether my finding are relevant at all
> > > and to find a solution in case there is a problem behind.
> > > 
> > > Best regards
> > > Markus

--- End Message ---

Reply to: