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

Antwort: git-gui i18n introductory document

From
CSChristian Stimming <christian.stimming@ibeo-as.com>
Date
Jul 26, 2007, 08:13 UTC
Message-ID
<OF1A666782.07EBF99C-ONC1257324.002B5B63-C1257324.002D39E0@sick.de>
In-Reply-To
<7vir87adzo.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <gitster@pobox.com> schrieb am 26.07.2007 08:14:03:
> I also noticed that po/ directory lacks
> any guidance document for translators.  Here is an attempt to
> add po/README.

Thanks for this write-up. This is very nice, and I agree it is helpful for everyone working on the translations.

FYI, in the gnucash project we have a similar write-up, only that over time we were asked to cover pretty much any subject that came up, so the document ended up quite long. See http://wiki.gnucash.org/wiki/Translation

One topic that hasn't been covered but should be added is the po/glossary/ directory. I'd suggest to point new translators to there *first*, because getting the glossary right is a necessary condition for achieving a high-quality translation.

> I understand that Christian's stance on this issue, to put it
> bluntly, is that you should not be in the l10n business if you
> are not versed with gettext toolchain.

I wouldn't require someone to be "versed". But I would indeed require someone to 1. have the gettext toolchain *installed* (after all, that person also must have git installed), and 2. I'd strongly recommend to work on the po files with one of the specialized *po file editors* instead of a plain text editor. There are so many editors available: emacs po-mode, KBabel, poedit, GTranslator; it definitely shouldn't be difficult to use at least one of them.

Nevertheless, explaining the po file structure here in the README is a good thing in itself.

Some comments on your explanation in the file itself:
Show 5 quoted lines
> +0. Getting started.
> +
> +You would first need to have a working "git".  Your distribution
> +may have git-core package (do not get "GNU Interactive Tools" --
> +that is a different "git").  Please install it.

You should mention the gettext package (required for .msg creation) and one of the po editors here as well.

Show 6 quoted lines
> + - Control characters, such as newlines, are written in
> +   backslash sequence
> +
> + - A long message can be split across multiple lines by ending
> +   the string with a doublequote, and starting another string on
> +   the next line with another doublequote.

Good points. Additionally, we need to explain the [format...] arguments here, i.e. what to do with a "%s" or "%i" or "%%" in the string.

Show 6 quoted lines
> +You can test the result by running "make", which would create
> +po/af.msg file, and then running the resulting git-gui in your
> +locale:
> +
> +   $ make install
> +   $ LANG=af git-gui

Does the latter line give the newly created translation for you, even without "make install"? For me and from what I understand from the code, the message catalogs are searched for in the subdirectory msgs/ of the lib/ directory, which means they wouldn't be found in an unmodified checkout. But you can create a symlink of that name to have the checkout use directly the po/ directory, like so:

   cd lib
   ln -s ../po msgs
   cd ..
   LANG=jp ./git-gui.sh

and I also have to call the local git-gui with ./ because . is not in my PATH, which is probably the same for some people out there as well.

> +   $ edit po/af.po
> +   ... be sure to update Last-Translator: and
> +   ... PO-Revision-Date: lines.
Yes, thanks for the reminder here.
Show 8 quoted lines
> + - The original text in English of an older message you already
> +   translated might have been changed.  You will notice a
> +   comment line that begins with "#, fuzzy" in front of such a
> +   message.  msgmerge tool made its best effort to match your
> +   old translation with the message from the updated software,
> +   but you will find it matched your old translated message to a
> +   new msgid that does not make any sense -- you would need to
> +   fix them.

Yes. You should also mention here that a msgstr marked as "#, fuzzy" will be treated as if no translation existed at all by msgfmt. Hence, the instructions for the translators should be something like this: "Messages which are marked as fuzzy will not be used in the program. You have to check the msgstr, fix it to match the msgid message, and remove the #, fuzzy line."

Overall, this is a nice writeup and it is very helpful. Thanks a lot.
Christian

IBEO Automobile Sensor GmbH - Sitz: Hamburg - Handelsregister: Hamburg HRB 67903 Geschäftsführer: Dr. Ulrich S. Lages

Next: Junio C Hamano
Message 1 of 6 in “Antwort: git-gui i18n introductory document”
  1. Christian StimmingJul 26, 2007
  2. git-gui: i18n introductory document (2nd draft)Junio C Hamano, Jul 26, 2007
  3. しらいしななこJul 27, 2007
  4. VMiklosJul 27, 2007
  5. Christian StimmingJul 27, 2007
  6. Junio C HamanoJul 27, 2007

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.