bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: [RFC] automatic apostrophes


From: Paul Eggert
Subject: Re: [RFC] automatic apostrophes
Date: Tue, 29 Aug 2006 07:09:59 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Bruno Haible <address@hidden> writes:

>        "%|%1$/en_prefix/|%1$s et saluda!"
>
> The %|...| is a section that shall disappear on non-glibc systems; inside
> this section, %1$/en_prefix/ looks at its argument and whether it starts
> with a vowel or not. en_prefix is one of the functions from your library.

I don't quite follow the details, but if we look at the example I
gave for English possessives, the en_prefix function needs not
only the string argument to format, but also another argument
(void *, say) that provides extra context for formatting that
argument.  For example, when computing the possessive of "Ajax",
we need to know which "Ajax" we're talking about, as the string
"Ajax" itself doesn't give us enough information.

Hence in general the translator would need to provide an en_prefix
function that is application-dependent; it's wouldn't be part of
the gettext library but part of the application (or perhaps
dynamically loaded from the .po file?).  Another option would be
to provide a default en_prefix function that could be overridden
by the application.

Also, there would need to be a default en_prefix function for the
C locale, since the C locale would need to compute possessives
like English does.  (The rule for English possessives is the same
as American here, by the way.)

I suppose it might help if en_prefix were given an argument
specifying the format string and the location within the format;
this isn't needed for English possessives but might be useful for
other cases.

> and Paul Eggert for American.

Hey, I could do English too!  (I'm multilingual.  :-) But I don't
know any applications that need possessives in C formats, due to
the hassle of getting it right with traditional printf, so the
need for work on my part is limited.  I'm giving the English
example more to indicate the sort of interface that will be useful
in general.




reply via email to

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