Re: [Translation-i18n] Re: Proposal for declinations in gettext

2003-06-15 Thread Bruno Haible
Yann Dirson wrote:
> it is difficult in some cases to
> find unique english strings that will be possible map one to one in
> all languages.

A common technique is to use a context marker in the msgid string,
like this:

my_gettext ("[menu item]Open")
my_gettext ("[combobox item]Open")

which translators can translate like this:

msgid "[menu item]Open"
msgstr "Ouvrir"

msgid "[combobox item]Open"
msgstr "Ouvert"

The my_gettext function calls gettext and, if it is returns the
untranslated string, strips the "[...]" prefix.

See also the gettext documentation, section "GUI program problems".

The only problem (quite small, IMO) with this approach is that translators
must be made aware where the context marker ends.

Bruno

--
Linux-UTF8:   i18n of Linux on all levels
Archive:  http://mail.nl.linux.org/linux-utf8/



Re: [Translation-i18n] Re: Proposal for declinations in gettext

2003-06-14 Thread Martin v. Löwis
Danilo Segan <[EMAIL PROTECTED]> writes:

> Unfortunately, it's a fix that would work only for future programs
> which we're planning, or planning to update with localization
> support, but it wouldn't work for programs currently in existence
> (it would work, but they would require changes).

Something needs to change, yes. Changing the source code of a program
that does not properly work with a certain language to support this
language (and potentially other languages) seems very reasonable to
me. Without changes to existing software, i18n wouldn't be were it is
today.

Regards,
Martin
--
Linux-UTF8:   i18n of Linux on all levels
Archive:  http://mail.nl.linux.org/linux-utf8/