This repository has been archived by the owner on Mar 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.translators
83 lines (57 loc) · 3.27 KB
/
README.translators
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
This file contains instructions for translators to translate OpenTTS interface
to their languages. OpenTTS uses intltool[1] for its internationalization
support. Intltool is a superset of gettext[2] so any translator used to gettext
.po files can translate OpenTTS the same way. If you're not familiar with
gettext po files we recommend that you read the Gettext manual[2].
== Requirements ==
To translate OpenTTS you will need to checkout OpenTTS from the git repository.
If you are not reading this file from a git checkout please check the `INSTALL`
file for detailed instructions.
You will also need intltool and gettext packages installed, as recommended on
the above file.
== Adding a new Language ==
If your locale is not already supported by OpenTTS you must create a new
<locale>.po file and translate it from scratch. The following steps explain the
process.
1. ON your OpenTTS source checkout change to the po directory.
2. Create a pot template for OpenTTS running: $ intltool-update -p This will
create a file called opentts.pot with all translatable OpenTTS messages.
3. Create the po template for the current system locale from opentts.pot running
$ msginit And follow the prompts.
If you want to create a translation for a different locale please run $ msginit
-l<locale> Where <locale> is the locale's name.
This will create a <locale>.po file. msginit will fill in the po template header
for you from your environment but we recommend to double-check that information.
You may also just copy the opentts.pot file to <locale>.po and fill in the
header information yourself.
At this stage you can remove the opentts.pot file since it is not needed
anymore.
4. Open the file `LINGUAS` and add your locale name there. Please put one locale
on each line and keep the file alphabetically sorted.
5. Translate all messages in <locale>.po and run make. If you found errors
reported by msgfmt about your <locale>.po file please correct them before
continuing.
While you are translating you can check the status of your translation running $
intltool-update -r This will give you a status report for each locale with
statistics for translated and untranslated messages.
6. When you're done see the section about testing bellow.
== Updating an existing Locale ==
When there are new OpenTTS messages for translation or some messages are
changed, you need to update your <locale.>.po file. To merge new messages to an
existing po file please run $ intltool-update <locale> Where <locale> is the
locale po file to merge with.
Then you can translate new messages and, if needed, update the ones gettext
translated wrong when merging.
== Testing your Translation ==
To confirm that your translation works, please install OpenTTS with your
translation included and test it on your locale. We recommend you test with
otts-say and otts-conf, since those are the tools with more translatable
content.
== Sending your Translation to OpenTTS ==
When you have translated all OpenTTS messages and have tested OpenTTS in your
locale, please send your translation to our development list at
opentts-dev@lists.opentts.org. You may send it as a git patch or, if you are
not familiar with git, send just the <locale>.po file.
== References ==
[1] Intltool: [2] Gettext Manual:
http://www.gnu.org/software/gettext/manual/gettext.html