summaryrefslogtreecommitdiff
path: root/Master/tlpkg/doc/howto-translations.txt
blob: 0609f1cc881f3753d0fef25af3825e3aff055c5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
$Id$
(This file public domain, originally written by Norbert Preining.)

Dealing with translations of TeX Live programs
==============================================

BIG FAT NOTE: Before starting please always fetch the latest NN.po from
our svn server because we merge new strings into .po files in
regular intervals.

Here are explanations for gtranslator and poedit. I (np) prefer now
gtranslator because it keeps the strings where no changes have been
made in the format as they were, so there will be less commits and
smaller commits. Another possibility is lokalize (please send details if
you know them).

Testing your translations: Please try

	(perl) install-tl --gui --debug-translation [--lang NN]
	tlmgr --debug-translation gui [--gui-lang NN]

This will give warnings *in*the*terminal* which strings haven't been 
translated.

Don't forget to update the PO-Revision-Date: near the top of the .po file!

Using gtranslator (gtranslator.sf.net)
--------------------------------------
Starting a new translation NN.po:
- copy messages.pot to NN.po
- open it with gtranslator
- select from the menu: Edit -> Header
  and change the items under "Translator and Language", especially
  change CHARSET to utf8
- start translating

The first column gives the status, you can sort by clicking on its head.


Using poedit (poedit.sf.net)
----------------------------
Starting new translation NN.po:
- start fresh poedit
- click on "File -> New catalog from POT file"
- select messages.pot (in tlpkg/translations/messages.pot)
- A dialog opens that asks for some fields, like
        Project name and version:
        Team:
        Team's email address:
        Language:
        Country:
        Charset: UTF-8
        Source code charset:
        Plural Forms:
  etc all of which is unknown to me, but I filled in at least the Language
  and the email of myself of tex-live@tug.org
- click "Ok"
- select where to save (either in tlpkg/translations/NN.po or somewhere else
  and send us the file)
- start translating

Editing an existing NN.po:
- start poedit
- open NN.po
- start translating


Requirements and advice for translations:
----------------------------------------
- please use \" instead of ", as can be seen in the original strings
- several lines in the translations are merged together *without* adding
  anything. So if you want new lines please use \n in the text
  (as seen in several original strings)
- if %s (one or more) is present, then they are replaced in the
  final strings with the respective infos. Please keep them.

We update the messages.pot nightly and merge the strings into all the
.po files (using msgmerge). That means if we change one of the english
strings the translation will normally be marked as "fuzzy" in the
.po file.

In gtranslator the first column shows a warning sign if the message is
fuzzy.

In poedit those fuzzy translations are shown in red, telling you that
those have had a change in the original string and the translation
should be checked.

So before any of you start out with editing a translation, please fetch
the latest messages.pot and NN.po!


For developers:
--------------
Extraction of the messages == update of the po template messages.pot, and
Merging/updating of the .po files
  see ../bin/tl-update-messages

Statistics:
  pocount ../translations/*.po

When a new translation (language) is added, add to lists in
  install-tl (under -lang),
  tlmgr.pl (under --gui-lang),
  tlmgrgui.pl (%code_lang).
Unfortunately nothing checks these for consistency, up to us humans.

When a new translation of the TL Guide is added, update
texmf-dist/doc/texlive/index.html as well as the text of the guide itself.

When a new translation of the top-level README txt/html is added,
update Master/index.html.