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