~vcs-imports/speech-dispatcher/trunk

« back to all changes in this revision

Viewing changes to README.translators

  • Committer: Andrei Kholodnyi
  • Author(s): Rui Batista
  • Date: 2010-09-04 16:16:03 UTC
  • Revision ID: git-v1:9df5c55502546fed016275aaee24f4f6b382c609
Add internationalization support to build infrastructure.

This patch adds intltool/gettext support to the build infrastructure.
From now on, files marked for translation shuld be listed in
po/POTFILES.in.

Documentation for translators is in README.translators.

The INSTALL file is updated with intltool reference.

Reviewed-by: Andrei Kholodnyi <Andrei.Kholodnyi@gmail.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
This file contains instructions for translators to translate Speech Dispatcher
 
2
interface to their languages.  Speech Dispatcher uses intltool[1] for its
 
3
internationalization support.
 
4
Intltool is a superset of gettext[2] so any
 
5
translator used to gettext .po files can translate Speech Dispatcher
 
6
the same way.
 
7
If you're not familiar with gettext po files we recommend that you read the
 
8
Gettext manual[2] before continuing.
 
9
 
 
10
== Requirements ==
 
11
 
 
12
To translate Speech Dispatcher you need a git clone of speech dispatcher.
 
13
If you are not reading this file from a git checkout
 
14
please check the `INSTALL` file for detailed
 
15
instructions.  You will also need intltool and gettext packages installed, as
 
16
recommended on the `InSTALL` file.
 
17
 
 
18
== Adding a new Language ==
 
19
 
 
20
If your locale is not already supported by Speech Dispatcher you must create a
 
21
new <locale>.po file and translate all contained messages. The following steps
 
22
explain the process.
 
23
 
 
24
1. ON your Speech Dispatcher source directory change to the po directory.
 
25
 
 
26
2. Create a pot template for Speech Dispatcher running:
 
27
$ intltool-update -p
 
28
This will create a file called Speech Dispatcher.pot with all translatable
 
29
Speech Dispatcher messages.
 
30
 
 
31
3. Create the po template for the current system locale from Speech
 
32
Dispatcher.pot running
 
33
$ msginit
 
34
And follow the prompts.  If you want to create
 
35
a translation for a different locale please run
 
36
$ msginit -l <locale>
 
37
where <locale> is the locale's name.  This will create a <locale>.po file.
 
38
msginit will fill in the po template header for you from your
 
39
environment but we recommend to
 
40
double-check that information.
 
41
 
 
42
You may also copy the Speech Dispatcher.pot file to <locale>.po and fill in the
 
43
header information yourself.
 
44
 
 
45
At this stage you can remove the Speech-Dispatcher.pot file since it is not
 
46
needed anymore.
 
47
 
 
48
4. Open the file `LINGUAS` and add your locale name there.
 
49
Please put one locale on each line and keep the file alphabetically sorted.
 
50
 
 
51
5. Translate  all messages in <locale>.po and run make.  If you found errors
 
52
reported by msgfmt about your <locale>.po file please correct them before
 
53
continuing.
 
54
 
 
55
6. When you're done see the section about testing bellow.
 
56
 
 
57
== Updating an existing Translation ==
 
58
 
 
59
When there are new Speech Dispatcher messages for translation or some messages
 
60
are changed, you need to update your <locale.>.po file.
 
61
 
 
62
To update an existing po file wit new messages please run
 
63
$ intltool-update <locale>
 
64
Where <locale> is the locale po file to update.
 
65
 
 
66
Then you can translate new messages and, if needed, update the ones gettext
 
67
guessed wrong when updating the po file.
 
68
 
 
69
== Testing your Translation ==
 
70
 
 
71
To confirm that your translation works, please install Speech Dispatcher with
 
72
your translation included
 
73
and test it with your system configured for your locale.
 
74
 
 
75
We recommend you test with spd-say and spd-conf,
 
76
since those are the tools with more translatable content.
 
77
 
 
78
== Sending your Translation to Speech Dispatcher ==
 
79
 
 
80
When you think your translation is ready
 
81
to be included in Speech Dispatcher send the po file
 
82
to our development mailling-list at
 
83
speechd@lists.freebsoft.org
 
84
 
 
85
== References ==
 
86
 
 
87
[1] Intltool: http://freedesktop.org/wiki/Software/intltool
 
88
[2] Gettext Manual: http://www.gnu.org/software/gettext/manual/gettext.html