File: howto

package info (click to toggle)
alpine 2.20+dfsg1-7
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 35,680 kB
  • sloc: ansic: 319,334; tcl: 26,277; sh: 12,178; makefile: 1,904; perl: 189; xml: 93; exp: 69; csh: 48; sed: 16
file content (27 lines) | stat: -rw-r--r-- 993 bytes parent folder | download | duplicates (7)
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
xgettext -d alpine -c --keyword=_ --keyword=N_ -o po/alpine.pot	\
   alpine/*.[ch] pith/*.[ch] pico/*.[ch]			\
   alpine/osdep/*.[ch] pith/osdep/*.[ch] pith/charconv/*.[ch]	\
   pico/osdep/*.[ch]

Usually a translator would do msginit or msgmerge, I think...

Either,
  msginit -l ja_JP -i po/alpine.pot -o po/ja.po

(or maybe msgmerge if trying to preserve old translations)
  msgmerge -o po/ja.po po/ja.po po/alpine.pot

Edit po/ja.po to add translations, then

Probably this would get saved in po/ja/LC_MESSAGES/ja.po, I suppose.
I was putting it here while testing. See the bindtextdomain call
in pine/pine.c

msgfmt -c -v -o locale/ja/LC_MESSAGES/alpine.mo po/ja.po

NOTE: I had trouble getting ngettext to work correctly. Maybe I
didn't understand exactly how it was supposed to get set up.
It is also a GNU-only extension as far as I can tell. Another
problem with ngettext is that when ENABLE_NLS is not defined
the English text will not be correct. So let's not use ngettext
for now.