[Top][All Lists]

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

Re: [Bug-gnulib] 4-gary-version-etc-full-author-string.patch

From: Gary V. Vaughan
Subject: Re: [Bug-gnulib] 4-gary-version-etc-full-author-string.patch
Date: Mon, 22 Sep 2003 16:17:31 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030903 Thunderbird/0.2

Bruno Haible wrote:
Gary V. Vaughan wrote:

c) Let the translator translate
        "Written by %s, %s, and %s.\n"
  and   "Written by %s, %s, %s, and %s.\n"
  and at runtime interpolate between the two translations. Like this:

       str3 = _("Written by %s, %s, and %s.\n");
       str4 = _("Written by %s, %s, %s, and %s.\n");
       common_prefix = compute_common_prefix (str3, str4);
       str3_suffix = str3 + strlen(common_prefix);
       str4_suffix = str4 + strlen(common_suffix);
       if (endswith (str4_suffix, str3_suffix))
           one_element_format =
             xstrndup (str4_suffix, strlen(str4_suffix) -
strlen(str3_suffix)); final_format_string =
             concatenate (common_prefix,
                          (N - 3) times one_element_format,
         /* Use a fallback, possibly just the English thing.  */

Ick.  Not this one!


I had to read it twice, very carefully, to figure out what was going on. It seems like a whole lot of code too.

However, considering the options, I think this is the best solution after all.

  ())_.  Gary V. Vaughan    gary@(lilith.warpmail.net|gnu.org)
  ( '/   Research Scientist http://www.oranda.demon.co.uk       ,_())____
  / )=   GNU Hacker         http://www.gnu.org/software/libtool  \'      `&
`(_~)_   Tech' Author       http://sources.redhat.com/autobook   =`---d__/

reply via email to

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