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

Re: [PATCH] l10n: add framework for localizing the manpages

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 13, 2017, 00:01 UTC
Message-ID
<xmqq1su2ujsf.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170312200248.3610-2-jn.avila@free.fr>
Jean-Noel Avila <jn.avila@free.fr> writes:
Show 23 quoted lines
> +#. type: Title =
> +#: git-add.txt:2
> +#, no-wrap
> +msgid "git-add(1)"
> +msgstr "git-add(1)"
> +
> +#. type: Title -
> +#: git-add.txt:5
> +#, no-wrap
> +msgid "NAME"
> +msgstr "NOM"
> +
> +#
> +#. type: Plain text
> +#: git-add.txt:7
> +msgid "git-add - Add file contents to the index"
> +msgstr "git-add - Ajoute le contenu de fichiers à l'index"
> +
> +#. type: Title -
> +#: git-add.txt:9
> +#, no-wrap
> +msgid "SYNOPSIS"
> +msgstr "SYNOPSIS"

It is a wonderful goal to make localized manpages and corresponding HTMLized documents available, and the above might look reasonable, but other parts of what the translaters need to do we see below makes me wonder if this is a sensible approach.

Show 13 quoted lines
> +#. type: Plain text
> +#: git-add.txt:15
> +#, no-wrap
> +msgid ""
> +"'git add' [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p]\n"
> +"\t  [--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]]\n"
> +"\t  [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing]\n"
> +"\t  [--chmod=(+|-)x] [--] [<pathspec>...]\n"
> +msgstr ""
> +"'git add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]\n"
> +"\t  [--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]]\n"
> +"\t  [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing]\n"
> +"\t  [--] [<chemin>...]\n"

This shows that even after adding just _one_ new option to the command, the whole thing need to be re-translated (the SYNOPSIS section may be a bad example, as not much is subject to i18n, though). If each paragraph of the description section becomes a single string that need to be re-translated, as we can see below, I am not sure if it really helps the translators. A mere single rephrasing of a word in a large paragraph would have to result in the entire paragraph to be translated again?

Show 23 quoted lines
> +#. type: Title -
> +#: git-add.txt:17
> +#, no-wrap
> +msgid "DESCRIPTION"
> +msgstr "DESCRIPTION"
> +
> +#
> +#. type: Plain text
> +#: git-add.txt:24
> +msgid ""
> +"This command updates the index using the current content found in the "
> +"working tree, to prepare the content staged for the next commit.  It "
> +"typically adds the current content of existing paths as a whole, but with "
> +"some options it can also be used to add content with only part of the "
> +"changes made to the working tree files applied, or remove paths that do not "
> +"exist in the working tree anymore."
> +msgstr ""
> +"Cette commande met à jour l'index en utilisant le contenu actuel trouvé dans "
> +"la copie de travail, pour préparer le contenu de la prochaine validation. "
> +"Typiquement, elle ajoute intégralement le contenu actuel des chemins "
> +"existant, mais peut aussi n'ajouter que certaines parties des modifications "
> +"au moyen d'options ou soustraire certains chemins qui n'existent plus dans "
> +"la copie de travail."

It almost makes me suggest that a totally different approach might be more manageable. For example, we can pick one version of a source file (say, "v2.12.0:Documentation/git-add.txt"), have it fully translated to the target languages, _and_ make it a convention to record the original blob object name at the end of the translated file. Perhaps "Documentation/l10n/fr/git-add.txt" may record the result of such translation effort.

And then, when somebody wants to update the translation for v2.13.0, perhaps

    git diff --color-words $old_blob v2.13.0:Documentation/git-add.txt

(where $old_blob is taken from Documentation/l10n/fr/git-add.txt) can be examined and then Documentation/l10n/fr/git-add.txt can be adjusted to match the changes between the two versions. After that, update the "source" blob object name in the translation.

So, I dunno. I like the goal and appreciate the effort to get to that goal. I am not sure what the best approach would be and the sample translation mechanism I see in this patch makes me doubt that it is the best approach.

Thanks.
Previous: Jean-Noël AVILANext: Ævar Arnfjörð Bjarmason
Message 4 of 37 in “l10n: add framework for localizing the manpages”
  1. l10n: add framework for localizing the manpagesJean-Noel Avila, Mar 12, 2017
  2. l10n: add framework for localizing the manpagesJean-Noel Avila, Mar 12, 2017
  3. Jean-Noël AVILAMar 12, 2017
  4. Junio C HamanoMar 13, 2017
  5. Ævar Arnfjörð BjarmasonMar 14, 2017
  6. Junio C HamanoMar 14, 2017
  7. Jean-Noël AvilaMar 15, 2017
  8. Ævar Arnfjörð BjarmasonMar 15, 2017
  9. Jean-Noël AvilaMar 15, 2017
  10. Junio C HamanoMar 15, 2017
  11. Stefan BellerMar 15, 2017
  12. 1/2 l10n: Introduce framework for localizing man pagesJean-Noel Avila, Mar 18, 2017
  13. 2/2 l10n: Add git-add.txt to localized man pagesJean-Noel Avila, Mar 18, 2017
  14. Junio C HamanoMar 18, 2017
  15. Jean-Noël AVILAMar 18, 2017
  16. Junio C HamanoMar 18, 2017
  17. Junio C HamanoMar 20, 2017
  18. Jean-Noël AvilaMar 20, 2017
  19. Jean-Noël AVILAMar 20, 2017
  20. Junio C HamanoMar 20, 2017
  21. Rework manpage localisationJean-Noel Avila, Mar 20, 2017
  22. 2/2 l10n: Add git-add.txt to localized man pagesJean-Noel Avila, Mar 20, 2017
  23. Junio C HamanoMar 20, 2017
  24. Jean-Noël AvilaMar 22, 2017
  25. Junio C HamanoMar 22, 2017
  26. Stefan BellerMar 22, 2017
  27. Junio C HamanoMar 22, 2017
  28. Stefan BellerMar 22, 2017
  29. Michael J GruberMar 24, 2017
  30. Jean-Noël AVILAMar 25, 2017
  31. Junio C HamanoMar 26, 2017
  32. Jean-Noël AVILAMar 27, 2017
  33. Junio C HamanoMar 27, 2017
  34. Ævar Arnfjörð BjarmasonMar 24, 2017
  35. Junio C HamanoMar 24, 2017
  36. 1/2 l10n: Introduce framework for localizing man pagesJean-Noel Avila, Mar 20, 2017
  37. Junio C HamanoMar 21, 2017

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.