Mercurial > vim
annotate src/po/Makefile @ 4440:dfbe53a54c79 v7.3.968
updated for version 7.3.968
Problem: Multi-byte support is only available when compiled with "big"
features.
Solution: Include multi-byte by default, with "normal" features.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sat, 18 May 2013 20:45:59 +0200 |
parents | 12636b824816 |
children | 605c9ce57ec3 |
rev | line source |
---|---|
7 | 1 # Makefile for the Vim message translations. |
2 | |
3 # TODO make this configurable | |
4 # Note: ja.sjis, *.cp1250 and zh_CN.cp936 are only for MS-Windows, they are | |
5 # not installed on Unix | |
6 | |
434 | 7 LANGUAGES = \ |
8 af \ | |
9 ca \ | |
10 cs \ | |
11 de \ | |
12 en_GB \ | |
1620 | 13 eo \ |
434 | 14 es \ |
1620 | 15 fi \ |
434 | 16 fr \ |
17 ga \ | |
18 it \ | |
19 ja \ | |
20 ko \ | |
2098
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
21 ko.UTF-8 \ |
2032
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
22 nb \ |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
2505
diff
changeset
|
23 nl \ |
434 | 24 no \ |
25 pl \ | |
1698 | 26 pt_BR \ |
434 | 27 ru \ |
28 sk \ | |
29 sv \ | |
30 uk \ | |
31 vi \ | |
32 zh_CN \ | |
33 zh_CN.UTF-8 \ | |
34 zh_TW \ | |
492 | 35 zh_TW.UTF-8 |
434 | 36 |
4019 | 37 CONVERTED = \ |
38 cs.cp1250 \ | |
39 ja.sjis \ | |
40 pl.cp1250 \ | |
41 pl.UTF-8 \ | |
42 ru.cp1251 \ | |
43 sk.cp1250 \ | |
44 uk.cp1251 \ | |
45 zh_CN.cp936 | |
46 | |
434 | 47 MOFILES = \ |
48 af.mo \ | |
49 ca.mo \ | |
50 cs.mo \ | |
51 de.mo \ | |
52 en_GB.mo \ | |
1620 | 53 eo.mo \ |
434 | 54 es.mo \ |
1620 | 55 fi.mo \ |
434 | 56 fr.mo \ |
57 ga.mo \ | |
58 it.mo \ | |
59 ja.mo \ | |
60 ko.mo \ | |
2098
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
61 ko.UTF-8.mo \ |
2032
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
62 nb.mo \ |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
2505
diff
changeset
|
63 nl.mo \ |
434 | 64 no.mo \ |
65 pl.mo \ | |
1698 | 66 pt_BR.mo \ |
434 | 67 ru.mo \ |
68 sk.mo \ | |
69 sv.mo \ | |
70 uk.mo \ | |
71 vi.mo \ | |
72 zh_CN.UTF-8.mo \ | |
73 zh_CN.mo \ | |
74 zh_TW.UTF-8.mo \ | |
492 | 75 zh_TW.mo |
7 | 76 |
4019 | 77 MOCONVERTED = \ |
440 | 78 cs.cp1250.mo \ |
79 ja.sjis.mo \ | |
80 pl.cp1250.mo \ | |
819 | 81 pl.UTF-8.mo \ |
440 | 82 ru.cp1251.mo \ |
83 sk.cp1250.mo \ | |
84 uk.cp1251.mo \ | |
492 | 85 zh_CN.cp936.mo |
440 | 86 |
87 CHECKFILES = \ | |
88 af.ck \ | |
89 ca.ck \ | |
90 cs.ck \ | |
91 de.ck \ | |
92 en_GB.ck \ | |
1620 | 93 eo.ck \ |
440 | 94 es.ck \ |
1620 | 95 fi.ck \ |
440 | 96 fr.ck \ |
97 ga.ck \ | |
98 it.ck \ | |
99 ja.ck \ | |
100 ko.ck \ | |
2098
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
101 ko.UTF-8.ck \ |
2032
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
102 nb.ck \ |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
2505
diff
changeset
|
103 nl.ck \ |
440 | 104 no.ck \ |
105 pl.ck \ | |
1698 | 106 pt_BR.ck \ |
440 | 107 ru.ck \ |
108 sk.ck \ | |
109 sv.ck \ | |
110 uk.ck \ | |
111 vi.ck \ | |
112 zh_CN.UTF-8.ck \ | |
113 zh_CN.ck \ | |
114 zh_TW.UTF-8.ck \ | |
115 zh_TW.ck \ | |
116 cs.cp1250.ck \ | |
117 ja.sjis.ck \ | |
118 pl.cp1250.ck \ | |
819 | 119 pl.UTF-8.ck \ |
440 | 120 ru.cp1251.ck \ |
121 sk.cp1250.ck \ | |
122 uk.cp1251.ck \ | |
492 | 123 zh_CN.cp936.ck |
440 | 124 |
7 | 125 PACKAGE = vim |
126 SHELL = /bin/sh | |
440 | 127 VIM = ../vim |
7 | 128 |
129 # The OLD_PO_FILE_INPUT and OLD_PO_FILE_OUTPUT are for the new GNU gettext | |
130 # tools 0.10.37, which use a slightly different .po file format that is not | |
131 # compatible with Solaris (and old gettext implementations) unless these are | |
132 # set. gettext 0.10.36 will not work! | |
133 MSGFMT = OLD_PO_FILE_INPUT=yes msgfmt -v | |
134 XGETTEXT = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes xgettext | |
135 MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge | |
136 | |
137 .SUFFIXES: | |
440 | 138 .SUFFIXES: .po .mo .pot .ck |
4019 | 139 .PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES) $(CONVERTED) |
7 | 140 |
141 .po.mo: | |
142 $(MSGFMT) -o $@ $< | |
143 | |
440 | 144 .po.ck: |
2032
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
145 $(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $< |
440 | 146 touch $@ |
147 | |
4019 | 148 all: $(MOFILES) $(MOCONVERTED) |
7 | 149 |
440 | 150 check: $(CHECKFILES) |
151 | |
4019 | 152 install: $(MOFILES) $(MOCONVERTED) |
440 | 153 @$(MAKE) prefixcheck |
4019 | 154 for lang in $(LANGUAGES) $(CONVERTED); do \ |
7 | 155 dir=$(LOCALEDIR)/$$lang/; \ |
156 if test ! -x "$$dir"; then \ | |
157 mkdir $$dir; chmod 755 $$dir; \ | |
158 fi; \ | |
159 dir=$(LOCALEDIR)/$$lang/LC_MESSAGES; \ | |
160 if test ! -x "$$dir"; then \ | |
161 mkdir $$dir; chmod 755 $$dir; \ | |
162 fi; \ | |
163 if test -r $$lang.mo; then \ | |
164 $(INSTALL_DATA) $$lang.mo $$dir/$(PACKAGE).mo; \ | |
165 chmod $(FILEMOD) $$dir/$(PACKAGE).mo; \ | |
166 fi; \ | |
167 done | |
168 | |
169 uninstall: | |
440 | 170 @$(MAKE) prefixcheck |
4019 | 171 for cat in $(MOFILES) $(MOCONVERTED); do \ |
7 | 172 cat=`basename $$cat`; \ |
173 lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ | |
174 rm -f $(LOCALEDIR)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \ | |
175 done | |
176 | |
4019 | 177 converted: $(MOCONVERTED) |
7 | 178 |
4340 | 179 # nl.po was added later, if it does not exist use a file with just a # in it |
180 # (an empty file doesn't work with old msgfmt). | |
4067 | 181 nl.po: |
4340 | 182 @( echo \# > nl.po ) |
4067 | 183 |
2032
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
184 # Norwegian/Bokmal: "nb" is an alias for "no". |
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
185 # Copying the file is not efficient, but I don't know of another way to make |
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
186 # this work. |
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
187 nb.po: no.po |
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
188 cp no.po nb.po |
592032e9e167
Update message translations.
Bram Moolenaar <bram@zimbu.org>
parents:
1698
diff
changeset
|
189 |
7 | 190 # Convert ja.po to create ja.sjis.po. Requires doubling backslashes in the |
191 # second byte. Don't depend on sjiscorr, it should only be compiled when | |
192 # ja.sjis.po is outdated. | |
193 ja.sjis.po: ja.po | |
194 @$(MAKE) sjiscorr | |
195 rm -f ja.sjis.po | |
196 iconv -f euc-jp -t cp932 ja.po | ./sjiscorr > ja.sjis.po | |
197 | |
198 sjiscorr: sjiscorr.c | |
199 $(CC) -o sjiscorr sjiscorr.c | |
200 | |
201 # Convert cs.po to create cs.cp1250.po. | |
202 cs.cp1250.po: cs.po | |
203 rm -f cs.cp1250.po | |
204 iconv -f iso-8859-2 -t cp1250 cs.po | \ | |
205 sed -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from cs.po, DO NOT EDIT/' > cs.cp1250.po | |
206 | |
207 # Convert pl.po to create pl.cp1250.po. | |
208 pl.cp1250.po: pl.po | |
209 rm -f pl.cp1250.po | |
210 iconv -f iso-8859-2 -t cp1250 pl.po | \ | |
211 sed -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from pl.po, DO NOT EDIT/' > pl.cp1250.po | |
212 | |
819 | 213 # Convert pl.po to create pl.UTF-8.po. |
214 pl.UTF-8.po: pl.po | |
215 rm -f pl.UTF-8.po | |
216 iconv -f iso-8859-2 -t utf-8 pl.po | \ | |
217 sed -e 's/charset=ISO-8859-2/charset=utf-8/' -e 's/# Original translations/# Generated from pl.po, DO NOT EDIT/' > pl.UTF-8.po | |
218 | |
7 | 219 # Convert sk.po to create sk.cp1250.po. |
220 sk.cp1250.po: sk.po | |
221 rm -f sk.cp1250.po | |
222 iconv -f iso-8859-2 -t cp1250 sk.po | \ | |
223 sed -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from sk.po, DO NOT EDIT/' > sk.cp1250.po | |
224 | |
225 # Convert zh_CN.po to create zh_CN.cp936.po. | |
226 # set 'charset' to gbk to avoid that msfmt generates a warning | |
227 zh_CN.cp936.po: zh_CN.po | |
228 rm -f zh_CN.cp936.po | |
229 iconv -f gb2312 -t cp936 zh_CN.po | \ | |
230 sed -e 's/charset=gb2312/charset=gbk/' -e 's/# Original translations/# Generated from zh_CN.po, DO NOT EDIT/' > zh_CN.cp936.po | |
231 | |
2098
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
232 # Convert ko.UTF-8.po to create ko.po. |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
233 ko.po: ko.UTF-8.po |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
234 rm -f ko.po |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
235 iconv -f UTF-8 -t euc-kr ko.UTF-8.po | \ |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
236 sed -e 's/charset=UTF-8/charset=euc-kr/' \ |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
237 -e 's/# Korean translation for Vim/# Generated from ko.UTF-8.po, DO NOT EDIT/' \ |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
238 > ko.po |
3259c3923c1e
Updated runtime an documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
2032
diff
changeset
|
239 |
7 | 240 # Convert ru.po to create ru.cp1251.po. |
241 ru.cp1251.po: ru.po | |
242 rm -f ru.cp1251.po | |
9 | 243 iconv -f utf-8 -t cp1251 ru.po | \ |
244 sed -e 's/charset=utf-8/charset=cp1251/' -e 's/# Original translations/# Generated from ru.po, DO NOT EDIT/' > ru.cp1251.po | |
7 | 245 |
23 | 246 # Convert uk.po to create uk.cp1251.po. |
247 uk.cp1251.po: uk.po | |
248 rm -f uk.cp1251.po | |
1620 | 249 iconv -f utf-8 -t cp1251 uk.po | \ |
250 sed -e 's/charset=utf-8/charset=cp1251/' -e 's/# Original translations/# Generated from uk.po, DO NOT EDIT/' > uk.cp1251.po | |
23 | 251 |
440 | 252 prefixcheck: |
7 | 253 @if test "x" = "x$(prefix)"; then \ |
254 echo "******************************************"; \ | |
255 echo " please use make from the src directory "; \ | |
256 echo "******************************************"; \ | |
257 exit 1; \ | |
258 fi | |
259 | |
628 | 260 clean: checkclean |
261 rm -f core core.* *.old.po *.mo *.pot sjiscorr | |
7 | 262 |
263 distclean: clean | |
264 | |
628 | 265 checkclean: |
266 rm -f *.ck | |
267 | |
2505
4aa73aa648bc
Some messages were missing when updating translations. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2098
diff
changeset
|
268 $(PACKAGE).pot: ../*.c ../if_perl.xs ../GvimExt/gvimext.cpp ../globals.h ../if_py_both.h |
7 | 269 cd ..; $(XGETTEXT) --default-domain=$(PACKAGE) \ |
270 --add-comments --keyword=_ --keyword=N_ \ | |
2505
4aa73aa648bc
Some messages were missing when updating translations. (Dominique Pelle)
Bram Moolenaar <bram@vim.org>
parents:
2098
diff
changeset
|
271 *.c if_perl.xs GvimExt/gvimext.cpp globals.h if_py_both.h |
7 | 272 mv -f ../$(PACKAGE).po $(PACKAGE).pot |
273 | |
1698 | 274 update-po: $(LANGUAGES) |
275 | |
7 | 276 # Don't add a dependency here, we only want to update the .po files manually |
277 $(LANGUAGES): | |
278 @$(MAKE) $(PACKAGE).pot | |
279 if test ! -f $@.po.orig; then cp $@.po $@.po.orig; fi | |
280 mv $@.po $@.po.old | |
281 if $(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po; then \ | |
282 rm -f $@.po.old; \ | |
283 else \ | |
284 echo "msgmerge for $@.po failed!"; mv $@.po.old $@.po; \ | |
285 fi |