Re: [Warzone-dev] [Warzone-commits] r4121 - /trunk/src/keybind.c

2008-03-17 Thread Giel van Schijndel
Per Inge Mathisen schreef:
> On Mon, Mar 17, 2008 at 8:12 PM, Roman <[EMAIL PROTECTED]> wrote:
>>  What do you mean with 'automatically', does gettext get launched
>>  during compilations or something? I was wondering how to generate
>>  the .po templates.
> 
> Oh, I was thinking about the autoconf build system, where it happens
> automatically. You actually need to run the xgettext program to
> extract strings from the source files into .po template files.

Either way, wrapping strings with _() (or P_("context", "string") for
context sensitive strings) marks them for translation by gettext. This
is the most important step (as it's not automated, nor can be automated).

From that point on the strings can be _automatically_ extracted by
xgettext, and combined with msgmerge, be merged with the .po files. This
is currently only handled by the autotools build system or the raw
Makefiles. It is (as I said), _not_ the most important step though,
marking the strings for translation is. (I.e. the developer is more
important than the computer).

PS You'll have to forgive me for my nearly poetic approach here. I like
turning mails into novels ;-)

-- 
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] r4121 - /trunk/src/keybind.c

2008-03-17 Thread Per Inge Mathisen
On Mon, Mar 17, 2008 at 8:12 PM, Roman <[EMAIL PROTECTED]> wrote:
>  What do you mean with 'automatically', does gettext get launched
>  during compilations or something? I was wondering how to generate
>  the .po templates.

Oh, I was thinking about the autoconf build system, where it happens
automatically. You actually need to run the xgettext program to
extract strings from the source files into .po template files.

  - Per

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


Re: [Warzone-dev] [Warzone-commits] r4121 - /trunk/src/keybind.c

2008-03-17 Thread Dennis Schridde
Am Montag, 17. März 2008 20:12:50 schrieb Roman:
> On Monday, March 17, 2008, 8:04:26 PM, Per Inge Mathisen wrote:
> > On Mon, Mar 17, 2008 at 7:48 PM, Roman <[EMAIL PROTECTED]> wrote:
> >>  NOTE: someone more familiar with gettext might want to add those and
> >> the ones from kf_ToggleRadarTerrain() to the .po files.
> >
> > Done.
> >
> > All you need to do is to add _() around a string, like this:
> >
> >   printf( "Untranslated string");
> >   printf(_("Translated string"));
> >
> > Gettext will then parse the files to extract the strings to translate
> > automatically.
>
> What do you mean with 'automatically', does gettext get launched
> during compilations or something? I was wondering how to generate
> the .po templates.
The .pot is generated by xgettext.
The .po files are initialy generated from it using msginit.
They are later updated from the .pot file using msgmerge.
The .mo files used on runtime are compiled by msgfmt.

All those tools are to be found in gettext. If you cannot compile it with 
MSVC, I can do it for you.

Important files controlling this process are all in the po/ directory of the 
sources:
Makevars
Makefile.in.in
POTFILES.in
LINGUAS

Makefile.raw is a simplified version of Makefile.in.in (thus may be more 
usefull to get basic gettext support to MSVC).

--Dennis


signature.asc
Description: This is a digitally signed message part.
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] [Warzone-commits] r4121 - /trunk/src/keybind.c

2008-03-17 Thread Roman
On Monday, March 17, 2008, 8:04:26 PM, Per Inge Mathisen wrote:

> On Mon, Mar 17, 2008 at 7:48 PM, Roman <[EMAIL PROTECTED]> wrote:
>>  NOTE: someone more familiar with gettext might want to add those and the 
>> ones from kf_ToggleRadarTerrain() to the .po files.

> Done.

> All you need to do is to add _() around a string, like this:

>   printf( "Untranslated string");
>   printf(_("Translated string"));

> Gettext will then parse the files to extract the strings to translate
> automatically.

What do you mean with 'automatically', does gettext get launched
during compilations or something? I was wondering how to generate
the .po templates.

>   - Per

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



-- 
Best regards,
 Romanmailto:[EMAIL PROTECTED]


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


Re: [Warzone-dev] [Warzone-commits] r4121 - /trunk/src/keybind.c

2008-03-17 Thread Per Inge Mathisen
On Mon, Mar 17, 2008 at 7:48 PM, Roman <[EMAIL PROTECTED]> wrote:
>  NOTE: someone more familiar with gettext might want to add those and the 
> ones from kf_ToggleRadarTerrain() to the .po files.

Done.

All you need to do is to add _() around a string, like this:

  printf( "Untranslated string");
  printf(_("Translated string"));

Gettext will then parse the files to extract the strings to translate
automatically.

  - Per

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