Antwort: git-gui i18n introductory document
From: Christian Stimming <hidden>
Date: 2016-06-15 22:43:24
Junio C Hamano [off-list ref] 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:
+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.
+ - 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.
+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.
+ - 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