summaryrefslogtreecommitdiff
path: root/README.i18n
blob: 04afe2a5b9189fa646da0a23d4a17a62684a6dee (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
aptitude: information for translators

Aptitude uses the standard gettext mechanism for translations.  However,
there are a few twists that you should be aware of.

  * Documents using po4a -- man page, user's manual

    These documents can be translated and maintained quite simply
    using po4a.  The po template is doc/po4a/po/aptitude.pot and
    contains messages associated with all the documents.  If you just
    wish to translate the man page then focus on the entities from
    manpage.xml.

    The user's manual is typically supplied in both html form, for
    offline reading, and text form (README.$LANG), for browsing from
    the program.  We have set up a makefile system which makes it
    simple to generate and install the translated documents, see the
    file doc/xx/Makefile.am to get started.

    All a translator needs to do is provide a po file based on the
    doc/po4a/po/aptitude.pot template.  Additionally, if translating
    the user's manual, please also provide screenshots based on those
    in doc/en/images/.

  * External data files.

    There are several external data files that you can choose to
    translate: help.txt (online help), help-mine.txt (online help for
    Minesweeper), and README (user's manual/online manual).

    README is generated using po4a or by translating aptitude.xml
    manually.  See the previous section for using po4a.

    The online help files, help.txt and help-mine.txt, are
    quite tractable and it is recommended that you translate
    them. (especially help.txt)

    aptitude applies gettext to the file names before loading them, so
    to tell it that you've translated (eg) help.txt to help-de.txt,
    you should add a translation "help.txt" -> "help-de.txt".

    In addition, each translated file name has a corresponding
    described translation (see below) indicating its encoding.  You
    should translate this as necessary if you write an alternate file.

  * Manpage.

    [This section is old and only applies if you do not wish to use
     po4a for the man page.]

    aptitude has a manpage, and it can be translated; if you choose to
    translate it, your translation should be named aptitude.XX.1
    (replace XX with the language code)

  * fragf

    aptitude uses an internal function called fragf to format text
    with display attributes.  This function works somewhat like
    printf, but most escape codes have different meanings.  For
    instance, %B enables the "bold" character attribute, while %b
    disables it.  See src/vscreen/fragment.h for a full description of
    all escape codes.  You can use parameter numbers (eg, %1$F) if
    your language needs to reorder the arguments.

  * key translations

    Where it makes sense, aptitude allows the default keybinding
    assigned to a command to be translated.  This is done by creating
    a dummy translated string ending in "_key"; the first character of
    the string is the default binding of the key.  For instance, the
    string "yes_key" is used to set the default binding for buttons
    labelled "Yes".  To bind "j" to this command, you could translate
    "yes_key" to "ja_key", "ja", or even just "j".

  * Described translations

    Some translations have descriptions or disambiguating text to the
    left of the input and output string.  In these cases, everything
    up to and including the first pipe character will be removed
    before the string is used.  If no pipe character is present in the
    string, the string will be used without modifications.

    For instance, the string "help.txt encoding|UTF-8" can be
    translated to either "help.txt encoding|ISO-8859-1",
    "|ISO-8859-1", or "ISO-8859-1", and will have the same effect in
    each case.

  * aptitude-defaults

    English messages can be found in file section-descriptions. Paragraph
    separators are " .\n" not "\n\n".