Re: [PATCH][GSOC2014] changed logical chain in branch.c to lookup tables
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Mar 10, 2014, 22:39 UTC
- Message-ID
- <CAPig+cTOZrQY1azPCmzdrfut0S_-8ZDoob3cEqT7Z1kDpj+PQw@mail.gmail.com>
- In-Reply-To
- <1394488063227-7605372.post@n2.nabble.com>
On Mon, Mar 10, 2014 at 5:47 PM, Tamer TAS <tamertas@outlook.com> wrote:
Show 10 quoted lines
> Eric Sunshine wrote >> Even allowing internationalization of them (via N_() in the location[] >> and type[] tables) might not be sufficient since grammatical rules >> differ from language to language. > > I didn't fully understand what you meant by that. Since they were being > internationalized before using _() in the if-else bodies, wouldn't it > produce > the same output if I were to use the same method for location[] and type[] > tables?
In the original code, the person translating the text has the full context:
"Branch %s set up to track remote ref %s."
With your revision, the translator has to translate standalone words "local", "remote", "branch", "ref" without context about how they are used. He then has to translate:
"Branch %s set up to track %s %s %s."
without context of the words being inserted, which, depending upon grammatical rules of the language can result in a different (and perhaps worse) translation than the original full-context translation.
Section 4.3 of the GNU gettext manual [1] explains the issues in more detail. I urge you to read it. The upshot is that translators fare best when handed full sentences.
Note also that your change effectively reverts d53a35032a67 [2], which did away with the sort of string composition used in your patch.
[1]: http://www.gnu.org/software/gettext/manual/gettext.html#Preparing-Strings [2]: https://github.com/git/git/commit/d53a35032a67fde5b59c8a6a66e0466837cbaf1e