dotgnu-pnet
[Top][All Lists]
Advanced

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

Re: [Pnet-developers] PO files


From: Bruno Haible
Subject: Re: [Pnet-developers] PO files
Date: Tue, 30 Dec 2003 12:59:16 +0100
User-agent: KMail/1.5

Rhys Weatherley wrote:
> I suggest that you modify msgfmt and msgunfmt
> directly if you want anything more complicated than what resgen can do.

I did this. "msgfmt --csharp-resources --check foo.po -o foo.resources"
not only creates the foo.resources file. It also
  - respects the encoding of the foo.po file, converting to Unicode as
    necessary,
  - checks that no features are used that are not supported by the .resources
    format (such as messages with plural forms, or multiple domains in a
    single file),
  - checks that format strings (such as "file {0} is in {1}") have a
    translation that is again a format string, and does not use more arguments
    than the untranslated string.

> The standard resource formats for .NET are .txt, .resx, and .resources.  We
> support .po only to ease migration of existing string resources to the
> standard formats.  To that end, it is now *possible* to migrate, even if it
> isn't necessarily *trivial*.

Migration from .po files to .txt, .resx, and .resources is not something a
developer should do: Never is a program completely finished and all message
catalogs frozen. Rather, translation is an incremental process that happens
each time a new release is made. Which file format could the translators use?
.resources is definitely out of question, since it's a binary format. .txt
is also out of question, since it doesn't support untranslated strings which
contain a '=' character. And .resx? Could be useful in theory, assuming the
translator tools support it. But four translator tools (KBabel, gtranslator,
emacs, poedit) support the PO file format, whereas no free translator tool
I know of supports the .resx format.

So I think PO files are here to stay, and what is needed is to integrate them
into the regular build process of C# applications. I did my part regarding
msgfmt, but if additional support in 'csant' or similar tools is needed, it
should be done as well.

Bruno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]