~ubuntu-branches/ubuntu/wily/gperiodic/wily

« back to all changes in this revision

Viewing changes to po/README

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2004-05-13 20:46:09 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040513204609-2ymqncvzfrqx8a7i
Tags: 2.0.7-4
Removed the DEPRECATED flags to build fine with GTK+2.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
                  Adding a translation to gperiodic
 
2
                  ---------------------------------
 
3
 
 
4
1) Extract the strings from the source
 
5
--------------------------------------
 
6
In the gperiodic top level directory, create the .po template (.pot):
 
7
 
 
8
        xgettext -k_ -kN_ *.c *.h -o po/gperiodic.pot
 
9
 
 
10
 
 
11
2) Update or create .po files
 
12
-----------------------------
 
13
If there are any existing translations, XX.po files, then merge them:
 
14
 
 
15
        cd po
 
16
        msgmerge XX.po  gperiodic.pot > XX.po.new
 
17
        mv XX.po.new XX.po
 
18
 
 
19
Or, if this is a new translation, copy the template:
 
20
 
 
21
        cd po
 
22
        cp gperiodic.pot XX.po
 
23
 
 
24
 
 
25
3) Add translations
 
26
-------------------
 
27
Edit XX.po to add translations for new strings, fix broken translations,
 
28
and touch up fuzzy translations.
 
29
 
 
30
 
 
31
4) Make and install gperiodic with i18n enabled
 
32
---------------------------------------------
 
33
If make is run from this directory instead of the top level dir, you must
 
34
explicitely enable i18n in all the below examples by adding enable_nls=1
 
35
to the make command:
 
36
 
 
37
        make enable_nls=1
 
38
 
 
39
And for the install step:
 
40
 
 
41
        make install enable_nls=1
 
42
 
 
43
i18n will be automatically enabled when make is run from the top level dir.
 
44
 
 
45
 
 
46
In either case, a make install will for each XX.po file create a XX.mo file
 
47
and copy it to:
 
48
 
 
49
        $LOCALEDIR/XX/LC_MESSAGES/gperiodic.mo
 
50
 
 
51
If there is no LOCALEDIR environment variable, then the default install
 
52
will be to:
 
53
 
 
54
        /usr/share/locale/XX/LC_MESSAGES/gperiodic.mo
 
55
 
 
56
 
 
57
 
 
58
But, if you want a different explicit install directory, do for example:
 
59
 
 
60
        make install LOCALEDIR=/usr/local/share/locale
 
61
 
 
62
or (for bash)
 
63
        export LOCALEDIR=/usr/local/share/locale
 
64
        make install
 
65
 
 
66
Other export lines:
 
67
        sh:  export LOCALEDIR; LOCALEDIR=/usr/local/share/locale
 
68
        csh: setenv LOCALEDIR /usr/local/share/locale
 
69
 
 
70
============================================================================
 
71
Using a translation
 
72
-------------------
 
73
 
 
74
A user must have localizations enabled for a translation to be used.
 
75
To enable a localization, the LANG environment variable should be set
 
76
via the command line or the shell login startup files.
 
77
 
 
78
For example, to see the Swedish translation, a user should be able to:
 
79
 
 
80
From bash:
 
81
        export LANG=sv_SE
 
82
or from csh
 
83
        setenv LANG sv_SE