[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: translating plural forms (Re: multiple merge notifications)

From: Peter Lundblad <plundblad_at_google.com>
Date: 2007-05-11 08:56:20 CEST

Peter Samuelson writes:
>
> Instead of _(), it would be appropriate to use the plural-sensitive
> form of gettext:
>
> int numrevs = n->merge_range->end - n->merge_range->start + 1;
> char *tmpstr = dngettext(PACKAGE_NAME,
> "--- Merging revision %ld to '%s':\n",
> "--- Merging revisions %ld-%ld to '%s':\n",
> numrevs);
> if (numrevs == 1)
> err = svn_cmdline_printf(pool, tmpstr,
> n->merge_range->start, path_local);
> else
> err = svn_cmdline_printf(pool, tmpstr, n->merge_range->start,
> n->merge_range->end, path_local);
>

The reason we didn't do that (I think we have one or two more
instances where our output depends on plural form( is that not all
gettexts support this feature (including the syntax in the .po
file). We didn't feel it was important enough to try to work around
that (if possible).

Thanks,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 11 08:56:42 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.