[Fwd: Re: Proposal for declinations in gettext]
- From: Danilo Segan <dsegan gmx net>
- To: GNOME I18N List <gnome-i18n gnome org>
- Cc: translation-i18n lists sourceforge net
- Subject: [Fwd: Re: Proposal for declinations in gettext]
- Date: Sat, 14 Jun 2003 08:34:00 +0200
Here's a description of one solution to the problem sent to linux-utf8
mailing list by <jmaiorana at idirect dot net>.
This approach would also involve many changes in the code (though they
can also be automated, since they're quite general: inclusion of one
variable for keeping contexts after each gettext call).
Cheers,
Danilo
- From: jmaiorana idirect net
- To: linux-utf8 nl linux org, dsegan gmx net
- Subject: Re: Proposal for declinations in gettext
- Date: Fri, 13 Jun 2003 17:08:41 -0400
<div class="moz-text-flowed" style="font-family: -moz-fixed">> msgid "king"
> msgstr<0> "kralj"
> msgstr<3> "kralja"
> msgstr<5> "kraljem"
>
> msgid "move %s"
> msgstr "premesti %<3>s"
>
> msgid "go with %s"
> msgstr "idi sa %<5>s"
Im curious, how you would implement this?
if I call the following in some preexisting application:
printf( gettext("Please move %s."), gettext("king") );
the order of operations is :
gettext("king");
gettext("Please move %s.");
printf( %s , %s );
So how would the first gettext("king") know what to return?
I think you could get this to work if there was some sort of context,
which could be used to tie the whole thing together.
such as:
void *ctx = gettext_context("Please move piece.");
printf( gettext(ctx,"Please move %s."), gettext(ctx,"king") );
The default for context could be NULL, in which case there is no
special behavior, but in cases where exceptional handling is required
you could provide override strings. Context would have to be a mandatory
part of each gettext call...
--
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/
</div>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]