First drop of aptitude for Maemo
[aptitude] / README.i18n
1 aptitude: information for translators
2
3 Aptitude uses the standard gettext mechanism for translations.  However,
4 there are a few twists that you should be aware of.
5
6   * External data files.
7
8     There are several external data files that you can choose to
9     translate: help.txt (online help), help-mine.txt (online help for
10     Minesweeper), and aptitude.xml (user's manual/online manual).
11     aptitude.xml is a large file, but help.txt and help-mine.txt are
12     quite tractable and it is recommended that you translate
13     them. (especially help.txt)
14
15     aptitude applies gettext to the file names before loading them, so
16     to tell it that you've translated (eg) help.txt to help-de.txt,
17     you should add a translation "help.txt" -> "help-de.txt".
18
19     In addition, each translated file name has a corresponding
20     described translation (see below) indicating its encoding.  You
21     should translate this as necessary if you write an alternate file.
22
23   * Manpage.
24
25     aptitude has a manpage, and it can be translated; if you choose to
26     translate it, your translation should be named aptitude.XX.1
27     (replace XX with the language code)
28
29   * fragf
30
31     aptitude uses an internal function called fragf to format text
32     with display attributes.  This function works somewhat like
33     printf, but most escape codes have different meanings.  For
34     instance, %B enables the "bold" character attribute, while %b
35     disables it.  See src/vscreen/fragment.h for a full description of
36     all escape codes.  You can use parameter numbers (eg, %1$F) if
37     your language needs to reorder the arguments.
38
39   * key translations
40
41     Where it makes sense, aptitude allows the default keybinding
42     assigned to a command to be translated.  This is done by creating
43     a dummy translated string ending in "_key"; the first character of
44     the string is the default binding of the key.  For instance, the
45     string "yes_key" is used to set the default binding for buttons
46     labelled "Yes".  To bind "j" to this command, you could translate
47     "yes_key" to "ja_key", "ja", or even just "j".
48
49   * Described translations
50
51     Some translations have descriptions or disambiguating text to the
52     left of the input and output string.  In these cases, everything
53     up to and including the first pipe character will be removed
54     before the string is used.  If no pipe character is present in the
55     string, the string will be used without modifications.
56
57     For instance, the string "help.txt encoding|UTF-8" can be
58     translated to either "help.txt encoding|ISO-8859-1",
59     "|ISO-8859-1", or "ISO-8859-1", and will have the same effect in
60     each case.
61
62   * aptitude-defaults
63
64     English messages can be found in file section-descriptions. Paragraph
65     separators are " .\n" not "\n\n".