git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH/RFC v7 1/2] Add infrastructure for translating Git with gettext

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jun 5, 2010, 19:47 UTC
Message-ID
<AANLkTimeaQeCoGREwwaOdaW6c9WTUNZF9oLfNZy7DVo3@mail.gmail.com>
In-Reply-To
<20100605192717.GB5273@progeny.tock>
On Sat, Jun 5, 2010 at 19:27, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 27 quoted lines
> Ævar Arnfjörð Bjarmason wrote:
>
>> IMO trying to plan in advance what we should and shouldn't translate
>> is a bit premature.
>>
>> I think it's better to just add glue so that everything can be
>> translated, then we can try decide later if some arbitrary subset
>> shouldn't have translations (even for human readable error messages)
>> and act appropriately.
>
> Certainly there is no need to commit to decisions that will have no
> observable effect.  However, setlocale()
>
>  - takes some small amount of time (probably negligible);
>
>  - changes the semantics of regular expression matching
>   (this affects ‘git grep’, ‘git diff’'s search for a function
>   header, and http-backend’s service-command regexps);
>
>  - changes the human language used for strerror().
>
> We could avoid these issues by turning translations off by default and
> calling it experimental, which might be the right thing to do anyway.
>
> Alternatively we can make some choice and stick to it (e.g., all git
> commands use setlocale(), or just the translated ones, or whatever).
> I just want to ensure it is a conscious choice.

What I'm trying to do is to make Git follow the semantics that localized programs that use gettext traditionally do.

Everything that's translated on my desktop does pretty much what this patch series does, i.e. calls setlocale() very early in main() so that everything's translated and locale aware. Including strerror() invocations and locale-aware functions like grep.

Whether it's the default or not doesn't really matter to me. Normal users are going to get Git via their OS, and those turn on l10n support as a matter of policy if it's available.

But since the semantics of Git will be the same unless users explicitly request translations (by setting the LC_* variables in their OS) I didn't see a reason not to enable it by default.

Previous: Jonathan NiederNext: Jonathan Nieder
Message 8 of 19 in “Add infrastructure for translating Git with gettext”
  1. 0/2 Add infrastructure for translating Git with gettextÆvar Arnfjörð Bjarmason, Jun 5, 2010
  2. 1/2 Add infrastructure for translating Git with gettextÆvar Arnfjörð Bjarmason, Jun 5, 2010
  3. Jonathan NiederJun 5, 2010
  4. Ævar Arnfjörð BjarmasonJun 5, 2010
  5. Jonathan NiederJun 5, 2010
  6. Ævar Arnfjörð BjarmasonJun 5, 2010
  7. Jonathan NiederJun 5, 2010
  8. Ævar Arnfjörð BjarmasonJun 5, 2010
  9. Jonathan NiederJun 12, 2010
  10. Jonathan NiederJun 5, 2010
  11. Ævar Arnfjörð BjarmasonJun 5, 2010
  12. Jonathan NiederJun 5, 2010
  13. Ævar Arnfjörð BjarmasonJun 5, 2010
  14. Jonathan NiederJun 5, 2010
  15. Ævar Arnfjörð BjarmasonJun 5, 2010
  16. Inline functions (Re: [PATCH/RFC v7 1/2] Add infrastructure for translating Git with gettext)Jonathan Nieder, Jun 5, 2010
  17. Jakub NarebskiJun 5, 2010
  18. Ævar Arnfjörð BjarmasonJun 5, 2010
  19. 2/2 Add initial C, Shell and Perl gettext translationsÆvar Arnfjörð Bjarmason, Jun 5, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.