Difference between revisions of "Translation addons"

From GCompris
Jump to: navigation, search
m (fixed typos)
(Voices)
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
WARNING: After a .po update and install, run GCompris with --reread-menu option in order to see your changes. (GCompris caches strings in a database).
 
WARNING: After a .po update and install, run GCompris with --reread-menu option in order to see your changes. (GCompris caches strings in a database).
  
To update only you po file, run: intltool-update lang (lang is fr for French).
+
To update only your po file, run: intltool-update lang (lang is fr for French).
  
GCompris is a little bit special in terms of translation needs. The best is done to bring back everything to .po files but it is not exhaustive.
+
For help with choosing your language's font set, have a look at our [[Fontsets]] page.
  
To complete the translation, you must also provide:
+
GCompris is a little bit special in terms of translation needs. The best is done to bring back everything to .po files but it is not exhaustive. To complete the translation, you must also provide some external files, which we have documented on this page.
  
 
== Missing letter ==
 
== Missing letter ==
Line 22: Line 22:
 
|}
 
|}
  
== Word list ==
 
  
=== General word list ===
+
== Simple Letters ==
  
A single word list file for your locale named:
+
You will need to design the levels for this game using the [[Word Lists|Word List]] format.
src/readingh-activity/resources/wordsgame/default-XX.xml
 
Where XX is your target locale. You can pick the [http://git.gnome.org/browse/gcompris/plain/src/readingh-activity/resources/wordsgame/default-en.xml english file] from our git repository to get an up to date example.
 
  
Note that these words must be choosen to be simple in your language,
 
don't necessary translate the English. Also, if you only keep one list, it is important to make sure
 
that these words can be written with your keyboard in one key
 
(no alt gr stuff or compose key). We will explain more about fine-tuning word lists for different activities below.
 
  
In order to be useful, this list must contain about 1000 words.
+
== Wordsgame ==
If you can, pick the words from a school children book or wiktionary.
 
  
The files are XML formatted. There should be at least 5 level sections which contain:
+
You will need to provide a  [[Word Lists|Word List]] for this game.
  
{| class="wikitable" style="margin: 1em auto 1em auto"
 
|+ '''Here is the format description:'''
 
! Level || Word Length
 
|-
 
| 1 || < 4 and very easy to type
 
|-
 
| 2 || = 4 or < 4 not so easy
 
|-
 
| 3 || = 5
 
|-
 
| 4 || = 6
 
|-
 
| 5 || > 6
 
|}
 
  
There are currently three activities that use this word list:
+
== Reading ==
 +
 
 +
You will need to provide a  [[Word Lists|Word List]] for this game.
  
<pre>
 
/computer/keyboard/wordsgame
 
/reading/readingh and /reading/readingv
 
/reading/hangman
 
</pre>
 
  
You can provide separate word lists for them if your language needs this.
+
== Hangman ==
  
=== Word list level design ===
+
You will need to provide a  [[Word Lists|Word List]] for this game.
  
Here are some level design suggestions for you. Of course, you can do as best fits your language!
+
The letters on the virtual keyboard for this activity are defined in the ''.po''-file. There are three strings to translate: One for the vowels, one for the consonants and one for keyboard shortcuts.
  
 +
<pre>a/e/i/o/u/y</pre>
 +
<pre>b/c/d/f/g/h/j/k/l/m/n/p/q/r/s/t/v/w/x/z</pre>
 +
<pre>a=a</pre>
  
==== Wordsgame ====
+
Note that this game supports complex letters, e.g. <sh> makes a single sound in English, so you could design the game to have a button with "sh" on it if you want. The letter buttons are defined in the ''.po''-File.
  
This is a typing game. Unless your language has characters that are difficult to type, just follow the rules layed out above for English. If your language has letters that require more keystrokea than simple letters, it is best to keep these letters out of the lower levels. Create a level higher up that will introduce them with some shorter words, then start to mix.
+
The '.po'-File also provides an option for keyboard shortcuts for complex letters. For example, if I have both "s" and "sh", if I type &lt;s>, "s" gets selected. However, I could define "sh=S" in the ''.po''-File, so when I type uppercase &lt;S>, "sh" gets selected. Fur using keyboard shortcuts, translate the string "a=a" in the form of a space separated list like: "é=e/E è=e/E sch=S". Letters on the left of the = can be multigraphs and represent the letters on the buttons. Letters on the right are single letters pressed on the keyboard. If you wish to allow different key presses for the same letter, separate the letters on the right with /.
  
==== Reading ====
+
== Click on letter ==
  
In this game, words on the same level should have the same length. Just follow the rules layed out above for English, except that you can have letters in there that are complicated to type. This is a reading activity, so typing doesn't matter here.
+
=== Automatic level generation from alphabet ===
  
==== Hangman ====
+
First, translate the following string in the PO-file to specify all the letters:
  
For Hangman, take your reading list and reverse the letters. Short words are harder than long words here! Remove all words that are longer than 10 letters, because they won't fit the screen.
+
<pre>a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z</pre>
  
Note that this game supports complex letters, e.g. <sh> makes a single sound in English, so you can have a button with "sh" on it if you want. The letter buttons are defined in the PO-File. The PO-File also provied an option for keyboard shortcuts for complex letters. For example, if I have both "s" and "sh", if I type <s>, "s" gets selected. However, I could define "sh=S" in the PO-File, so when I type uppercase <S>, "sh" gets selected.
+
You can use multigraphs. For example, ''/sch/'' counts as a single letter. The important thing is that you separate your letters with / and that you have no white spaces in between. Once you have done this, on a first installation, GCompris will create random levels from the alphabet the first time the game is played in your language.
  
== Click on letter ==
+
=== Manually designing your levels ===
  
A level description for the click on letter activity in src/click_on_letter/resources/click_on_letter/default-<locale>.desktop. This file describes the different levels of this activity and depends on how letters are teached to children in your language. See bellow for the instructions.
+
We recommend you do some level design yourself, so letters are introduced in an order that makes sense. For this, you need to create a 'desktop' file. In the source code, these are found in ''src/click_on_letter/resources/click_on_letter/default-<locale>.desktop'' for the lowercase game and in ''src/click_on_letter/resources/click_on_letter/upper-<locale>.desktop'' for the uppercase game. This file describes the different levels of this activity and depends on how letters are taught to children in your language. The file looks like this
  
 
<code><pre>
 
<code><pre>
Line 98: Line 76:
 
# WARNING: Answer must have at max 18 characters
 
# WARNING: Answer must have at max 18 characters
 
[1]
 
[1]
Questions=aeiouy
+
Questions=a e i o u y
Answers=aeiouy
+
Answers=a e i o u y
 
...
 
...
 
</pre></code>
 
</pre></code>
  
 +
Letters can also be made up of more than one letter, turning them into multigraphs:
  
 +
<code><pre>
 +
[11]
 +
Questions=i u ì ù mh dh gh l t f n
 +
Answers=i u ì ù mh dh gh l t f n
 +
</pre></code>
 +
 +
For designing your levels, rather than coding the desktop files by hand, you can also start the game and use the Configuration option. Please note that there is a little bug: after editing a cell in the table, you have to click somewhere else on the list to leave the cell's edit mode before hitting any buttons, or your edit will get lost. Once you're finished designing the activity for your language, you will find the desktop file in ''<userdir>/My GCompris/click_on_letter''. You can design separate levels for the lowercase and the uppercase game if you want.
 +
 +
 +
== Advanced Colors ==
 +
 +
To help you translate the advanced colors, look at the list in the [[Color_translation|Color Translation Page]].
  
  
Line 112: Line 103:
 
It is best to choose somebody that speaks and articulate well your language.
 
It is best to choose somebody that speaks and articulate well your language.
 
What is great with GCompris is that you can use it to practice a foreign language.
 
What is great with GCompris is that you can use it to practice a foreign language.
Read the file boards/voices/HOWTO_ENCODE and this [[Voices_translation|page]] to get more detailed instructions
+
Read the file boards/voices/HOWTO_ENCODE and this [[Voices_translation|page]] to get more detailed instructions.
  
 
To check that you completed the translation of all voices and that there are no missing files. You can use the tool check_missing_voices.pl located in the tools directory.
 
To check that you completed the translation of all voices and that there are no missing files. You can use the tool check_missing_voices.pl located in the tools directory.
 +
 +
[[Category:Translation]]
 +
[[Category:English]]

Latest revision as of 12:23, 27 January 2015

WARNING: After a .po update and install, run GCompris with --reread-menu option in order to see your changes. (GCompris caches strings in a database).

To update only your po file, run: intltool-update lang (lang is fr for French).

For help with choosing your language's font set, have a look at our Fontsets page.

GCompris is a little bit special in terms of translation needs. The best is done to bring back everything to .po files but it is not exhaustive. To complete the translation, you must also provide some external files, which we have documented on this page.

Missing letter

Note that in the po file when you encounter string like this:

  1. ../boards/missing_letter/board1.xml.in.h:2

msgid "apple/appl_/e/h/a"

The number in board1.xml.in means this word will be provided at level 1 of this very activity in gcompris.

Here is the format description:
The word to find The _ is the missing letter 3 proposals, choose them to confuse the children
apple appl_ /e/h/a


Simple Letters

You will need to design the levels for this game using the Word List format.


Wordsgame

You will need to provide a Word List for this game.


Reading

You will need to provide a Word List for this game.


Hangman

You will need to provide a Word List for this game.

The letters on the virtual keyboard for this activity are defined in the .po-file. There are three strings to translate: One for the vowels, one for the consonants and one for keyboard shortcuts.

a/e/i/o/u/y
b/c/d/f/g/h/j/k/l/m/n/p/q/r/s/t/v/w/x/z
a=a

Note that this game supports complex letters, e.g. <sh> makes a single sound in English, so you could design the game to have a button with "sh" on it if you want. The letter buttons are defined in the .po-File.

The '.po'-File also provides an option for keyboard shortcuts for complex letters. For example, if I have both "s" and "sh", if I type <s>, "s" gets selected. However, I could define "sh=S" in the .po-File, so when I type uppercase <S>, "sh" gets selected. Fur using keyboard shortcuts, translate the string "a=a" in the form of a space separated list like: "é=e/E è=e/E sch=S". Letters on the left of the = can be multigraphs and represent the letters on the buttons. Letters on the right are single letters pressed on the keyboard. If you wish to allow different key presses for the same letter, separate the letters on the right with /.

Click on letter

Automatic level generation from alphabet

First, translate the following string in the PO-file to specify all the letters:

a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z

You can use multigraphs. For example, /sch/ counts as a single letter. The important thing is that you separate your letters with / and that you have no white spaces in between. Once you have done this, on a first installation, GCompris will create random levels from the alphabet the first time the game is played in your language.

Manually designing your levels

We recommend you do some level design yourself, so letters are introduced in an order that makes sense. For this, you need to create a 'desktop' file. In the source code, these are found in src/click_on_letter/resources/click_on_letter/default-<locale>.desktop for the lowercase game and in src/click_on_letter/resources/click_on_letter/upper-<locale>.desktop for the uppercase game. This file describes the different levels of this activity and depends on how letters are taught to children in your language. The file looks like this

# Section matches the level, you can put any number of level
# but they must be in sequence starting at 1

# Question is a list of letters that will be asked to search for
# Answer is a list of possible answers the children will have to choose from
# WARNING: It is up to you to put at least all the Question letters in the Answer.
#          You can also add some confusing letters in the Answer section
# WARNING: Answer must have at max 18 characters
[1]
Questions=a e i o u y
Answers=a e i o u y
...

Letters can also be made up of more than one letter, turning them into multigraphs:

[11]
Questions=i u ì ù mh dh gh l t f n
Answers=i u ì ù mh dh gh l t f n

For designing your levels, rather than coding the desktop files by hand, you can also start the game and use the Configuration option. Please note that there is a little bug: after editing a cell in the table, you have to click somewhere else on the list to leave the cell's edit mode before hitting any buttons, or your edit will get lost. Once you're finished designing the activity for your language, you will find the desktop file in <userdir>/My GCompris/click_on_letter. You can design separate levels for the lowercase and the uppercase game if you want.


Advanced Colors

To help you translate the advanced colors, look at the list in the Color Translation Page.


Voices

A complete voice translation in boards/voices/yy The voices are in a separate git branch. If you got the source from the git, you can get the voices simply by running 'make update-voices'. It is best to choose somebody that speaks and articulate well your language. What is great with GCompris is that you can use it to practice a foreign language. Read the file boards/voices/HOWTO_ENCODE and this page to get more detailed instructions.

To check that you completed the translation of all voices and that there are no missing files. You can use the tool check_missing_voices.pl located in the tools directory.