-
Notifications
You must be signed in to change notification settings - Fork 6
/
README
61 lines (45 loc) · 2.07 KB
/
README
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
Initial Setup
The files stylesheetxml.its stylesheetxml.loc
need to be installed into /usr/share/gettext/its/ or wherever
gettext stuff is at. I tried to use the argument --its=FILE
to specify where the .its file is, and xgettext sort of works,
but after it processes the strings, it segfaults, so I gave up
on that method.
So...
sudo cp stylesheet.its /usr/share/gettext/its/
sudo cp stylesheet.loc /usr/share/gettext/its/
I may have to dial the stylesheet.loc back a bit
so that instead of *.xml, it does stylesheet.xml only.
To create a new version of bibledit.pot, do this:
xgettext -k_ ../src/*.cpp -o test.pot
xgettext -j -k_ ../git/*.cpp -o test.pot
xgettext -j -k_ ../shutdown/*.cpp -o test.pot
xgettext -j --language=glade ../templates/gtkbuilder.*.xml -o test.pot
xgettext -j ../templates/stylesheet.xml -o test.pot
(run these commands by doing sh ./getStrings.sh)
and then, if you are creating a refreshed copy of an old
bibledit-desktop.pot, check test.pot against the old one to see if
everything looks right.
The problem with the above approach is that it blasts the header of
the bibledit.pot file, which includes copyright and other niceties. I
am not aware of switches to xgettext that will fill all this
information for you. So, from your old bibledit.pot, copy the top
lines of information from it to the new file.
Once you are happy with the diff of test.pot and bibledit.pot, then do
this:
mv test.pot bibledit-desktop.pot
Now, that is the "portable object template (.pot)." But you also have to
update the language files, that is, the .po files. So, for French, do this:
msgmerge fr.po bibledit-desktop.pot > fr.po.new
compare fr.po.new with the old fr.po and see if you like the changes.
If so,
mv fr.po.new fr.po
git commit -a
and give a message like this in the editor:
Internationalization update
Update bibledit-desktop.pot to new sources.
Add capability to internationalize templates/stylesheet.xml
with new .its and .loc files for xgettext
Update French translation file to match new sources.
Now we need to update the French translation.
and push to the remote repository