Re: [Warzone-dev] [Warzone-commits] r1057 - in /trunk: po/da.po po/de.po po/nb.po po/nl.po src/droid.c

2007-04-10 Thread Dennis Schridde
Am Dienstag, 10. April 2007 schrieb Per Inge Mathisen:
> > > Version 0.15 - July 2006
> > >
> > > * GUI program support:
> > >   [...]
> > >   - The (non-public) include file gettext.h defines macros pgettext,
> > > dpgettext etc. that take a context argument.
>
> So the most forward-looking solution might be to use a Q_ macro with
> two arguments, and that (for now) just contatenates the two arguments
> into the current macro. Forward-looking for the code, that is. I have
> no idea how the po file will look with pgettext() results.
Like this:
#: src/droid.c:5028
#, fuzzy
msgctxt "rank"
msgid "Green"
msgstr "GrĂ¼n"

Feel free to revert the changes if they don't fit for you...

--Dennis


pgpaLJ3pIroVv.pgp
Description: PGP signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] [Warzone-commits] r1057 - in /trunk: po/da.po po/de.po po/nb.po po/nl.po src/droid.c

2007-04-10 Thread Per Inge Mathisen
> > Version 0.15 - July 2006
> >
> > * GUI program support:
> >   [...]
> >   - The (non-public) include file gettext.h defines macros pgettext, 
> > dpgettext
> > etc. that take a context argument.

So the most forward-looking solution might be to use a Q_ macro with
two arguments, and that (for now) just contatenates the two arguments
into the current macro. Forward-looking for the code, that is. I have
no idea how the po file will look with pgettext() results.

  - Per

___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] [Warzone-commits] r1057 - in /trunk: po/da.po po/de.po po/nb.po po/nl.po src/droid.c

2007-04-10 Thread Giel van Schijndel
Dennis Schridde schreef:
> Well, at least they write it in their NEWS file:
>
> Version 0.15 - July 2006
>
> * GUI program support:
>   [...]
>   - The (non-public) include file gettext.h defines macros pgettext, dpgettext
> etc. that take a context argument.
>   
Well, that explains why my gettext implementation (for M$W) doesn't work
right with that macro. The gnuwin32 project only delivers version 0.14.

-- 
Giel



signature.asc
Description: OpenPGP digital signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] [Warzone-commits] r1057 - in /trunk: po/da.po po/de.po po/nb.po po/nl.po src/droid.c

2007-04-10 Thread Dennis Schridde
Am Dienstag, 10. April 2007 schrieb Per Inge Mathisen:
> On 4/10/07, Dennis Schridde <[EMAIL PROTECTED]> wrote:
> > > I don't understand why gettext does not have something similar. (Or
> > > perhaps it has, and I just cannot parse the gettext manual?)
> >
> > It has. They call it contexts:
> > http://www.gnu.org/software/gettext/manual/gettext.html#Contexts
>
> Interesting. Some googling suggests that this must have been added the
> last one or two years. See (especially last link):
>
> http://lists.xcf.berkeley.edu/lists/gimp-developer/2000-December/013755.htm
>l http://bugzilla.gnome.org/show_bug.cgi?id=97556
> http://bugzilla.gnome.org/show_bug.cgi?id=164373
> http://mail.gnome.org/archives/gtk-devel-list/2005-December/msg00255.html
>
> I have never seen the pgettext() stuff before, so I have no idea how
> it works, or how recent a version of gettext we need to require to use
> it. It is really annoying that GNU documentation never seems to have a
> "available since version NN" explanation on its new features.
Well, at least they write it in their NEWS file:

Version 0.15 - July 2006

* GUI program support:
  [...]
  - The (non-public) include file gettext.h defines macros pgettext, dpgettext
etc. that take a context argument.


pgpaaWLm4g73j.pgp
Description: PGP signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] [Warzone-commits] r1057 - in /trunk: po/da.po po/de.po po/nb.po po/nl.po src/droid.c

2007-04-10 Thread Per Inge Mathisen
On 4/10/07, Dennis Schridde <[EMAIL PROTECTED]> wrote:
> > I don't understand why gettext does not have something similar. (Or
> > perhaps it has, and I just cannot parse the gettext manual?)
> It has. They call it contexts:
> http://www.gnu.org/software/gettext/manual/gettext.html#Contexts

Interesting. Some googling suggests that this must have been added the
last one or two years. See (especially last link):

http://lists.xcf.berkeley.edu/lists/gimp-developer/2000-December/013755.html
http://bugzilla.gnome.org/show_bug.cgi?id=97556
http://bugzilla.gnome.org/show_bug.cgi?id=164373
http://mail.gnome.org/archives/gtk-devel-list/2005-December/msg00255.html

I have never seen the pgettext() stuff before, so I have no idea how
it works, or how recent a version of gettext we need to require to use
it. It is really annoying that GNU documentation never seems to have a
"available since version NN" explanation on its new features.

Glib uses Q_() since 2.0, at least, with a '|' as a separator sign.
See http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html
http://live.gnome.org/GnomeI18nDeveloperTips

  - Per

___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] [Warzone-commits] r1057 - in /trunk: po/da.po po/de.po po/nb.po po/nl.po src/droid.c

2007-04-10 Thread Dennis Schridde
Am Dienstag, 10. April 2007 schrieb Per Inge Mathisen:
> On 4/10/07, Giel van Schijndel <[EMAIL PROTECTED]> wrote:
> >  * insert a hack into droid.c to circumvent ambiguity of the word "Green"
> > (which is being used as a rank name as well as the color)
>
> ...
>
> > PS The most feasible solution other than the above mentioned hack seems
> > to me to use different gettext domains, I'm not sure how that should be
> > implemented though
>
> I think the way we solved this in Freeciv was quite good. See the Q_()
> macro in
>
> http://svn.gna.org/viewcvs/freeciv/trunk/utility/fcintl.c?rev=7638&view=aut
>o
> http://svn.gna.org/viewcvs/freeciv/trunk/utility/fcintl.h?rev=11746&view=au
>to
>
> I don't understand why gettext does not have something similar. (Or
> perhaps it has, and I just cannot parse the gettext manual?)
It has. They call it contexts:
http://www.gnu.org/software/gettext/manual/gettext.html#Contexts


pgpYDMf9unkrC.pgp
Description: PGP signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] [Warzone-commits] r1057 - in /trunk: po/da.po po/de.po po/nb.po po/nl.po src/droid.c

2007-04-10 Thread Per Inge Mathisen
On 4/10/07, Giel van Schijndel <[EMAIL PROTECTED]> wrote:
>  * insert a hack into droid.c to circumvent ambiguity of the word "Green" 
> (which is being used as a rank name as well as the color)
...
> PS The most feasible solution other than the above mentioned hack seems to me 
> to use different gettext domains, I'm not sure how that should be implemented 
> though

I think the way we solved this in Freeciv was quite good. See the Q_() macro in

http://svn.gna.org/viewcvs/freeciv/trunk/utility/fcintl.c?rev=7638&view=auto
http://svn.gna.org/viewcvs/freeciv/trunk/utility/fcintl.h?rev=11746&view=auto

I don't understand why gettext does not have something similar. (Or
perhaps it has, and I just cannot parse the gettext manual?)

  - Per

___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev