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

List:       freeciv-i18n
Subject:    Re: [Freeciv-i18n] Some success with gd
From:       Hubert Kowalewski <almunafikun () gmail ! com>
Date:       2011-07-21 8:50:47
Message-ID: CAJ-N6J3DJg8VKzdWHeeDBOTqYKQ90syou9V0+iMHv9ox0HNbCg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On 21 July 2011 04:23, Michael Bauer <fios@akerbeltz.org> wrote:

> Thanks Jacob and Hubert!
> 
> Good suggestion, trying a txt editor (I tried Geany) - it didn't exactly
> show me anything different but I stumbled across a pattern by why the number
> given in the error message turns out to be just a few less than the actual
> string. Bizarre, but hooray.
> 
> I've now fixed all the plurals and all but 3 of the error messages. I get
> the following:
> 
> newgd.po:8841: 'msgstr[0]' is not a valid C format string, unlike 'msgid'.
> Reason: In the directive number 1, the character '$' is not a valid
> conversion specifier.
> Your attacking %s succeeded against the %s %s (and %d other unit)!
> Shoirbhich an %$1s agad leis an ionnsaigh air aonad %3$s %2$s (agus %d
> aonad eile)!
> 
> 
This one's easy to overlook, but you have "%$1s" instead of "%1$s", that's
why it complains about the syntax.


> newgd.po:8867: 'msgstr[0]' is not a valid C format string, unlike 'msgid'.
> Reason: The string refers to arguments both through absolute argument
> numbers and through unnumbered argument specifications.
> %s and %d other unit lost to an attack from the %s %s.
> Chaidh %1$s agus %d aonad eile a chall an cois ionnsaigh %3$s %2$s.
> 
> 
In the original string %d is the second variable, so  it should carry the 2$
marker in the translation, otherwise msgfmt gets confused because the
variable that you marked with 2$ is NOT an %d variable that msgfmt expects.
I gather you need to swap the last two %s variables only, so try

"Chaidh %1$s agus %2$d aonad eile a chall an cois ionnsaigh %4$s %3$s."


> newgd.po:8879: 'msgstr[0]' is not a valid C format string, unlike 'msgid'.
> Reason: The string refers to arguments both through absolute argument
> numbers and through unnumbered argument specifications.
> %d unit lost when the %s %s attacked the %s %s.
> Chaidh %d aonad a chall nuair a thug %3$s %2$s ionnsaigh air %5$s %4$s.
> 

Putting "1$" in "%d" should work here. I experimentally placed both of the
problematic entries in my Polish PO (with the fixes i described) and msgfmt
is cool with this.


> 
> Now the only thing I can imagine it's complaining about is that %d is
> without a number but I tried starting it with %1$d but that didn't make any
> difference. Any ideas?
> 
> ... Feeling a little better now though :)
> 

Glad to hear this :) I remember sending lots of buggy po files myself before
I got the hang of gettext, the syntax and stuff. So I guess the problems
like this are normal in the beginning, especially for us non-programmers :)


> 
> Michael
> 
> 
> --
> *Akerbeltz*
> Goireasan Gà idhlig air an lìon
> Fòn: +44-141-946 4437
> Facs: +44-141-945 2701
> 
> *Tha Gà idhlig aig an lìon - feuch e:*
> Am Faclair Beag <http://www.faclair.com/> â—¦ \
> Akerbeltz<http://www.akerbeltz.org>â—¦ Firefox <http://www.mozilla.com/gd/> â—¦ \
> Thunderbird<http://www.mozillamessaging.com/gd/thunderbird/>â—¦ Opera 11 \
>                 <http://www.opera.com/> â—¦ Opera Mini \
>                 <http://www.opera.com/mobile/>
> *Innealan do luchd-cleachdaidh Firefox/Thunderbird:*
> Accentuate - strà can leotha \
> fhèin<https://addons.mozilla.org/en-US/firefox/addon/accentuateus/>◦ An \
> Dearbhair-litreachaidh \
> Beag<https://addons.mozilla.org/en-US/firefox/addon/scottish-gaelic-spell-checker/>â—¦ \
> Mìosachan Lightning <http://www.mozilla.org/projects/calendar/lightning/> ◦ QLS \
> - leum eadar 2 chà \
> nan<https://addons.mozilla.org/en-US/firefox/addon/quick-locale-switcher/> 
> _______________________________________________
> Freeciv-i18n mailing list
> Freeciv-i18n@gna.org
> https://mail.gna.org/listinfo/freeciv-i18n
> 
> 


-- 
Hubert


[Attachment #5 (text/html)]

<div class="gmail_quote">On 21 July 2011 04:23, Michael Bauer <span dir="ltr">&lt;<a \
href="mailto:fios@akerbeltz.org">fios@akerbeltz.org</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;">

  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Thanks Jacob and Hubert!<br>
    <br>
    Good suggestion, trying a txt editor (I tried Geany) - it didn&#39;t
    exactly show me anything different but I stumbled across a pattern
    by why the number given in the error message turns out to be just a
    few less than the actual string. Bizarre, but hooray.<br>
    <br>
    I&#39;ve now fixed all the plurals and all but 3 of the error messages.
    I get the following:<br>
    <br>
    newgd.po:8841: &#39;msgstr[0]&#39; is not a valid C format string, unlike
    &#39;msgid&#39;. Reason: In the directive number 1, the character &#39;$&#39; is \
not  a valid conversion specifier.<br>
    Your attacking %s succeeded against the %s %s (and %d other unit)!<br>
    Shoirbhich an %$1s agad leis an ionnsaigh air aonad %3$s %2$s (agus
    %d aonad eile)!<br>
    <br></div></blockquote><div><br>This one&#39;s easy to overlook, but you have \
&quot;%$1s&quot; instead of &quot;%1$s&quot;, that&#39;s why it complains about the \
syntax.<br>  </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; \
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <div \
bgcolor="#FFFFFF" text="#000000">  newgd.po:8867: &#39;msgstr[0]&#39; is not a valid \
C format string, unlike  &#39;msgid&#39;. Reason: The string refers to arguments both \
through  absolute argument numbers and through unnumbered argument
    specifications.<br>
    %s and %d other unit lost to an attack from the %s %s.<br>
    Chaidh %1$s agus %d aonad eile a chall an cois ionnsaigh %3$s %2$s.<br>
    <br></div></blockquote><div><br>In the original string %d is the second variable, \
so   it should carry the 2$ marker in the translation, otherwise msgfmt gets confused \
because the variable that you marked with 2$ is NOT an %d variable that msgfmt \
expects. I gather you need to swap the last two %s variables only, so try<br> \
<br>&quot;Chaidh %1$s agus %2$d aonad eile a chall an cois ionnsaigh %4$s \
%3$s.&quot;<br>  </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt \
0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <div \
bgcolor="#FFFFFF" text="#000000">  newgd.po:8879: &#39;msgstr[0]&#39; is not a valid \
C format string, unlike  &#39;msgid&#39;. Reason: The string refers to arguments both \
through  absolute argument numbers and through unnumbered argument
    specifications.<br>
    %d unit lost when the %s %s attacked the %s %s.<br>
    Chaidh %d aonad a chall nuair a thug %3$s %2$s ionnsaigh air %5$s
    %4$s.<br></div></blockquote><div><br>Putting &quot;1$&quot; in &quot;%d&quot; \
should work here. I experimentally placed both of the problematic entries in my \
Polish PO (with the fixes i described) and msgfmt is cool with this.<br>  \
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: \
1px solid rgb(204, 204, 204); padding-left: 1ex;"><div bgcolor="#FFFFFF" \
text="#000000">  <br>
    Now the only thing I can imagine it&#39;s complaining about is that %d
    is without a number but I tried starting it with %1$d but that
    didn&#39;t make any difference. Any ideas?<br>
    <br>
    ... Feeling a little better now though :)<br></div></blockquote><div><br>Glad to \
hear this :) I remember sending lots of buggy po files myself before I got the hang \
of gettext, the syntax and stuff. So I guess the problems like this are normal in the \
beginning, especially for us non-programmers :)<br>  </div><blockquote \
class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, \
204, 204); padding-left: 1ex;"><div bgcolor="#FFFFFF" text="#000000">  <br>
    Michael<br>
    <br>
    <br>
    <div>-- <br>
      <font color="#800000"><b>Akerbeltz</b><br>
        Goireasan Gà idhlig air an lìon<br>
        Fòn: +44-141-946 4437<br>
        Facs: +44-141-945 2701</font><br>
      <br>
      <b>Tha Gà idhlig aig an lìon - feuch e:</b><br>
      <a href="http://www.faclair.com/" target="_blank">Am Faclair Beag</a> â—¦ <a \
href="http://www.akerbeltz.org" target="_blank">Akerbeltz</a> â—¦ <a \
href="http://www.mozilla.com/gd/" target="_blank">Firefox</a> â—¦ <a \
href="http://www.mozillamessaging.com/gd/thunderbird/" \
                target="_blank">Thunderbird</a>
      â—¦ <a href="http://www.opera.com/" target="_blank">Opera 11</a> â—¦ <a \
href="http://www.opera.com/mobile/" target="_blank">Opera Mini</a><br>  <b>Innealan \
                do luchd-cleachdaidh Firefox/Thunderbird:</b><br>
      <a href="https://addons.mozilla.org/en-US/firefox/addon/accentuateus/" \
                target="_blank">Accentuate
        - strà can leotha fhèin</a> ◦ <a \
href="https://addons.mozilla.org/en-US/firefox/addon/scottish-gaelic-spell-checker/" \
                target="_blank">An
        Dearbhair-litreachaidh Beag</a> â—¦ <a \
                href="http://www.mozilla.org/projects/calendar/lightning/" \
                target="_blank">Mìosachan
        Lightning</a> â—¦ <a \
href="https://addons.mozilla.org/en-US/firefox/addon/quick-locale-switcher/" \
                target="_blank">QLS
        - leum eadar 2 chà nan</a></div>
  </div>

<br>_______________________________________________<br>
Freeciv-i18n mailing list<br>
<a href="mailto:Freeciv-i18n@gna.org">Freeciv-i18n@gna.org</a><br>
<a href="https://mail.gna.org/listinfo/freeciv-i18n" \
target="_blank">https://mail.gna.org/listinfo/freeciv-i18n</a><br> \
<br></blockquote></div><br><br clear="all"><br>-- <br>Hubert<br>



_______________________________________________
Freeciv-i18n mailing list
Freeciv-i18n@gna.org
https://mail.gna.org/listinfo/freeciv-i18n


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

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