annotate src/po/Make_mvc.mak @ 34859:de4405462a2a v9.1.0298

patch 9.1.0298: MS-Windows: GETTEXT_PATH hard-coded in src/po/Make_mvc.mak Commit: https://github.com/vim/vim/commit/2f27c65410dcb68fd06cb6c54c1ed8fae2d11c79 Author: Cthulhux <github@tuxproject.de> Date: Wed Apr 10 16:34:49 2024 +0200 patch 9.1.0298: MS-Windows: GETTEXT_PATH hard-coded in src/po/Make_mvc.mak Problem: MS-Windows: GETTEXT_PATH hard-coded in src/po/Make_mvc.mak Solution: Add IFNDEF/ENDIF around the definition of GETTEXT_PATH (Cthulhux) It makes no sense to enforce modifying Vim source files just because your build stuff is not where it's expected. My change is supposed to add support for a locally-defined %GETTEXT_PATH%. closes: #14480 Signed-off-by: Cthulhux <github@tuxproject.de> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 10 Apr 2024 16:45:03 +0200
parents 748a8a413816
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
1 # Makefile for the Vim message translations for MSVC
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
2 # (based on make_ming.mak)
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
3 #
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
4 # Mike Williams, <mrw@eandem.co.uk>
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
5 # 06.01.24, Restorer, <restorer@mail2k.ru>
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
6 #
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
7 # Please read README_mvc.txt before using this file.
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
8 #
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
9
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
10 !IF [powershell.exe -nologo -noprofile "exit $$psversiontable.psversion.major"] == 2
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
11 !ERROR The program "PowerShell" version 3.0 or higher is required to work
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
12 !ENDIF
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
13
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
14 !IFNDEF LANGUAGE
34543
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
15 ! IF [powershell.exe -nologo -noprofile $$lng=(Get-UICulture).TwoLetterISOLanguageName; \
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
16 $$Env:LANGUAGE=$$lng;Set-Content -Path .\lng.tmp -Value "LANGUAGE=$$lng"]
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
17 ! ENDIF
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
18 # In order for the "install" and "cleanup-po" rule to work.
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
19 # The others work with just setting the environment variable.
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
20 # And to show in the message.
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
21 ! INCLUDE lng.tmp
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
22 ! IF [del /q .\lng.tmp]
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
23 ! ENDIF
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
24 ! MESSAGE
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
25 ! MESSAGE The %LANGUAGE% environment variable is not set.
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
26 ! MESSAGE This variable will be temporarily set to "$(LANGUAGE)" while "nmake.exe" is running.
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
27 ! MESSAGE See README_mvc.txt for more information on the %LANGUAGE% environment variable.
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
28 ! MESSAGE
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
29 !ELSE
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
30 ! MESSAGE LANGUAGE is already set "$(LANGUAGE)"
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
31 !ENDIF
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
32
34543
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
33 # Get LANGUAGES, MOFILES, MOCONVERTED and others.
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
34 !INCLUDE Make_all.mak
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
35
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
36 !IFNDEF VIMRUNTIME
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
37 VIMRUNTIME = ..\..\runtime
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
38 !ENDIF
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
39
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
40 PACKAGE = vim
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
41 # Correct the following line for the where executeable file vim is
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
42 # installed. Please do not put the path in quotes.
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
43 VIM = ..\vim.exe
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
44
33831
2b222b99faec patch 9.0.2130: some errors with translation Makefiles
Christian Brabandt <cb@256bit.org>
parents: 33823
diff changeset
45 # Correct the following line for the directory where gettext et al is
2b222b99faec patch 9.0.2130: some errors with translation Makefiles
Christian Brabandt <cb@256bit.org>
parents: 33823
diff changeset
46 # installed. Please do not put the path in quotes.
34859
de4405462a2a patch 9.1.0298: MS-Windows: GETTEXT_PATH hard-coded in src/po/Make_mvc.mak
Christian Brabandt <cb@256bit.org>
parents: 34543
diff changeset
47 !IFNDEF GETTEXT_PATH
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
48 GETTEXT_PATH = D:\Programs\GetText\bin
34859
de4405462a2a patch 9.1.0298: MS-Windows: GETTEXT_PATH hard-coded in src/po/Make_mvc.mak
Christian Brabandt <cb@256bit.org>
parents: 34543
diff changeset
49 !ENDIF
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
50
34543
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
51 # Starting from version 0.22, msgfmt forcibly converts text to UTF-8 regardless
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
52 # of the value of the "charset" field.
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
53 !IF [%comspec% /v:on /e:on /c "for /F "tokens=4 delims= " %G in \
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
54 ('"$(GETTEXT_PATH)\msgfmt.exe" --version^|findstr /rc:[0-9^]\.[0-9^][0-9^]') do \
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
55 @(set "v=%G" && if !v:~2^,2! GEQ 22 exit /b 1)"]
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
56 MSGFMT = "$(GETTEXT_PATH)\msgfmt.exe" -v --no-convert
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
57 !ELSE
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
58 MSGFMT = "$(GETTEXT_PATH)\msgfmt.exe" -v
34543
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
59 !ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
60 XGETTEXT = "$(GETTEXT_PATH)\xgettext.exe"
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
61 MSGMERGE = "$(GETTEXT_PATH)\msgmerge.exe"
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
62
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
63 # In case some package like GnuWin32, UnixUtils, gettext
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
64 # or something similar is installed on the system.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
65 # If the "iconv" program is installed on the system, but it is not registered
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
66 # in the %PATH% environment variable, then specify the full path to this file.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
67 !IF EXIST ("iconv.exe")
34543
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
68 ICONV = iconv.exe
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
69 !ELSEIF EXIST ("$(GETTEXT_PATH)\iconv.exe")
34543
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
70 ICONV = "$(GETTEXT_PATH)\iconv.exe"
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
71 !ENDIF
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
72
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
73 # In case some package like GnuWin32, UnixUtils
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
74 # or something similar is installed on the system.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
75 # If the "touch" program is installed on the system, but it is not registered
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
76 # in the %PATH% environment variable, then specify the full path to this file.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
77 !IF EXIST ("touch.exe")
33831
2b222b99faec patch 9.0.2130: some errors with translation Makefiles
Christian Brabandt <cb@256bit.org>
parents: 33823
diff changeset
78 TOUCH_TARGET = touch.exe $@
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
79 !ELSE
33831
2b222b99faec patch 9.0.2130: some errors with translation Makefiles
Christian Brabandt <cb@256bit.org>
parents: 33823
diff changeset
80 TOUCH_TARGET = @if exist $@ ( copy /b $@+,, ) else ( type nul >$@ )
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
81 !ENDIF
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
82
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
83 MV = move /y
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
84 CP = copy /y
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
85 RM = del /q
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
86 MKD = mkdir
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
87 LS = dir
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
88 PS = PowerShell.exe
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
89
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
90 LSFLAGS = /b /on /l /s
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
91 PSFLAGS = -NoLogo -NoProfile -Command
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
92
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
93 INSTALLDIR = $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
94
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
95 .SUFFIXES:
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
96 .SUFFIXES: .po .mo .pot .ck
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
97
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
98 all: $(MOFILES) $(MOCONVERTED)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
99
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
100 originals : $(MOFILES)
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
101
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
102 converted: $(MOCONVERTED)
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
103
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
104 .po.ck:
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
105 "$(VIM)" -u NONE --noplugins -e -s -X --cmd "set enc=utf-8" -S check.vim \
33831
2b222b99faec patch 9.0.2130: some errors with translation Makefiles
Christian Brabandt <cb@256bit.org>
parents: 33823
diff changeset
106 -c "if error == 0 | q | else | num 2 | cq | endif" $<
2b222b99faec patch 9.0.2130: some errors with translation Makefiles
Christian Brabandt <cb@256bit.org>
parents: 33823
diff changeset
107 $(TOUCH_TARGET)
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
108
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
109 check: $(CHECKFILES)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
110
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
111 checkclean:
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
112 $(RM) *.ck
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
113
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
114 nl.po:
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
115 @( echo ^# >> nl.po )
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
116
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
117 # Norwegian/Bokmal: "nb" is an alias for "no".
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
118 nb.po: no.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
119 $(CP) no.po nb.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
120
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
121 # Convert ja.po to create ja.sjis.po.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
122 ja.sjis.po: ja.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
123 @$(MAKE) -nologo -f Make_mvc.mak sjiscorr
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
124 -$(RM) $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
125 !IF EXIST ("$(GETTEXT_PATH)\msgconv.exe")
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
126 "$(GETTEXT_PATH)\msgconv.exe" -t CP932 $? | .\sjiscorr.exe > $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
127 !ELSEIF DEFINED (ICONV)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
128 $(ICONV) -f UTF-8 -t CP932 $? | .\sjiscorr.exe > $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
129 !ELSE
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
130 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
131 [System.IO.File]::ReadAllText(\"$?\", \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
132 [System.Text.Encoding]::GetEncoding(65001)), \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
133 [System.Text.Encoding]::GetEncoding(932))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
134 type $@ | .\sjiscorr.exe > tmp.$@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
135 @$(MV) tmp.$@ $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
136 !ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
137 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
138 [System.Text.Encoding]::GetEncoding(932)) \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
139 -replace \"`r`n\", \"`n\"; \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
140 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
141 [System.Text.Encoding]::GetEncoding(932))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
142
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
143 sjiscorr: sjiscorr.c
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
144 $(CC) sjiscorr.c
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
145
34543
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
146 # Convert ja.po to create ja.euc-jp.po.
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
147 ja.euc-jp.po: ja.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
148 -$(RM) $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
149 !IF EXIST ("$(GETTEXT_PATH)\msgconv.exe")
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
150 "$(GETTEXT_PATH)\msgconv.exe" -t EUC-JP -o $@ $?
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
151 !ELSE
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
152 ! IF DEFINED (ICONV)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
153 $(ICONV) -f UTF-8 -t EUC-JP $? > $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
154 ! ELSE
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
155 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
156 [System.IO.File]::ReadAllText(\"$?\", \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
157 [System.Text.Encoding]::GetEncoding(65001)), \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
158 [System.Text.Encoding]::GetEncoding(20932))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
159 ! ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
160 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
161 [System.Text.Encoding]::GetEncoding(20932)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
162 'charset=utf-8', 'charset=EUC-JP'; \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
163 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
164 [System.Text.Encoding]::GetEncoding(20932))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
165 !ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
166 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
167 [System.Text.Encoding]::GetEncoding(20932)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
168 '# Original translations', \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
169 '# Generated from $?, DO NOT EDIT'; \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
170 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
171 [System.Text.Encoding]::GetEncoding(20932))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
172
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
173 # Convert cs.po to create cs.cp1250.po.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
174 cs.cp1250.po: cs.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
175 -$(RM) $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
176 !IF EXIST ("$(GETTEXT_PATH)\msgconv.exe")
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
177 "$(GETTEXT_PATH)\msgconv.exe" -t CP1250 -o $@ $?
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
178 !ELSE
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
179 ! IF DEFINED (ICONV)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
180 $(ICONV) -f ISO-8859-2 -t CP1250 $? > $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
181 ! ELSE
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
182 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
183 [System.IO.File]::ReadAllText(\"$?\", \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
184 [System.Text.Encoding]::GetEncoding(28592)), \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
185 [System.Text.Encoding]::GetEncoding(1250))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
186 ! ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
187 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
188 [System.Text.Encoding]::GetEncoding(1250)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
189 'charset=iso-8859-2', 'charset=CP1250'; \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
190 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
191 [System.Text.Encoding]::GetEncoding(1250))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
192 !ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
193 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
194 [System.Text.Encoding]::GetEncoding(1250)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
195 '# Original translations', \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
196 '# Generated from $?, DO NOT EDIT'; \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
197 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
198 [System.Text.Encoding]::GetEncoding(1250))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
199
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
200 # Convert pl.po to create pl.cp1250.po.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
201 pl.cp1250.po: pl.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
202 -$(RM) $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
203 !IF EXIST ("$(GETTEXT_PATH)\msgconv.exe")
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
204 "$(GETTEXT_PATH)\msgconv.exe" -t CP1250 -o $@ $?
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
205 !ELSE
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
206 ! IF DEFINED (ICONV)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
207 $(ICONV) -f ISO-8859-2 -t CP1250 $? > $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
208 ! ELSE
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
209 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
210 [System.IO.File]::ReadAllText(\"$?\", \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
211 [System.Text.Encoding]::GetEncoding(28592)), \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
212 [System.Text.Encoding]::GetEncoding(1250))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
213 ! ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
214 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
215 [System.Text.Encoding]::GetEncoding(1250)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
216 'charset=iso-8859-2', 'charset=CP1250'; \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
217 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
218 [System.Text.Encoding]::GetEncoding(1250))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
219 !ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
220 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
221 [System.Text.Encoding]::GetEncoding(1250)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
222 '# Original translations', \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
223 '# Generated from $?, DO NOT EDIT'; \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
224 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
225 [System.Text.Encoding]::GetEncoding(1250))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
226
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
227 # Convert pl.po to create pl.UTF-8.po.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
228 pl.UTF-8.po: pl.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
229 -$(RM) $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
230 !IF EXIST ("$(GETTEXT_PATH)\msgconv.exe")
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
231 "$(GETTEXT_PATH)\msgconv.exe" -t UTF-8 -o $@ $?
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
232 !ELSE
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
233 ! IF DEFINED (ICONV)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
234 $(ICONV) -f ISO-8859-2 -t UTF-8 $? > $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
235 ! ELSE
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
236 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
237 [System.IO.File]::ReadAllText(\"$?\", \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
238 [System.Text.Encoding]::GetEncoding(28592)))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
239 ! ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
240 $(PS) $(PSFLAGS) (Get-Content -Raw -Encoding UTF8 $@ \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
241 ^| % {$$_-replace 'charset=iso-8859-2', 'charset=UTF-8'}) \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
242 ^| 1>nul New-Item -Force -Path . -ItemType file -Name $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
243 !ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
244 $(PS) $(PSFLAGS) (Get-Content -Raw -Encoding UTF8 $@ \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
245 ^| % {$$_-replace '# Original translations', \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
246 '# Generated from $?, DO NOT EDIT'}) \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
247 ^| 1>nul New-Item -Force -Path . -ItemType file -Name $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
248
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
249 # Convert sk.po to create sk.cp1250.po.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
250 sk.cp1250.po: sk.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
251 -$(RM) $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
252 !IF EXIST ("$(GETTEXT_PATH)\msgconv.exe")
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
253 "$(GETTEXT_PATH)\msgconv.exe" -t CP1250 -o $@ $?
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
254 !ELSE
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
255 ! IF DEFINED (ICONV)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
256 $(ICONV) -f ISO-8859-2 -t CP1250 $? > $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
257 ! ELSE
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
258 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
259 [System.IO.File]::ReadAllText(\"$?\", \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
260 [System.Text.Encoding]::GetEncoding(28592)), \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
261 [System.Text.Encoding]::GetEncoding(1250))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
262 ! ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
263 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
264 [System.Text.Encoding]::GetEncoding(1250)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
265 'charset=iso-8859-2', 'charset=CP1250'; \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
266 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
267 [System.Text.Encoding]::GetEncoding(1250))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
268 !ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
269 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
270 [System.Text.Encoding]::GetEncoding(1250)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
271 '# Original translations', \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
272 '# Generated from $?, DO NOT EDIT'; \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
273 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
274 [System.Text.Encoding]::GetEncoding(1250))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
275
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
276 # Convert zh_CN.UTF-8.po to create zh_CN.po.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
277 zh_CN.po: zh_CN.UTF-8.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
278 -$(RM) $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
279 !IF EXIST ("$(GETTEXT_PATH)\msgconv.exe")
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
280 "$(GETTEXT_PATH)\msgconv.exe" -t GB2312 -o $@ $?
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
281 !ELSE
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
282 ! IF DEFINED (ICONV)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
283 $(ICONV) -f UTF-8 -t GB2312 $? > $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
284 ! ELSE
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
285 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
286 [System.IO.File]::ReadAllText(\"$?\", \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
287 [System.Text.Encoding]::GetEncoding(65001)), \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
288 [System.Text.Encoding]::GetEncoding(936))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
289
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
290 ! ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
291 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
292 [System.Text.Encoding]::GetEncoding(936)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
293 'charset=UTF-8', 'charset=GB2312'; \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
294 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
295 [System.Text.Encoding]::GetEncoding(936))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
296 !ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
297 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
298 [System.Text.Encoding]::GetEncoding(936)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
299 '# Original translations', \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
300 '# Generated from $?, DO NOT EDIT'; \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
301 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
302 [System.Text.Encoding]::GetEncoding(936))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
303
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
304 # Convert zh_CN.UTF-8.po to create zh_CN.cp936.po.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
305 # Set 'charset' to gbk to avoid that msfmt generates a warning.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
306 # This used to convert from zh_CN.po, but that results in a conversion error.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
307 zh_CN.cp936.po: zh_CN.UTF-8.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
308 -$(RM) $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
309 !IF DEFINED (ICONV)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
310 $(ICONV) -f UTF-8 -t CP936 $? > $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
311 !ELSE
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
312 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
313 [System.IO.File]::ReadAllText(\"$?\", \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
314 [System.Text.Encoding]::GetEncoding(65001)), \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
315 [System.Text.Encoding]::GetEncoding(20936))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
316
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
317 !ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
318 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
319 [System.Text.Encoding]::GetEncoding(20936)) \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
320 -replace 'charset=UTF-8', 'charset=GBK'\
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
321 -replace '# Original translations', \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
322 '# Generated from $?, DO NOT EDIT'; \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
323 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
324 [System.Text.Encoding]::GetEncoding(20936))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
325
34543
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
326 # Convert zh_TW.UTF-8.po to create zh_TW.po.
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
327 zh_TW.po: zh_TW.UTF-8.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
328 -$(RM) $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
329 !IF EXIST ("$(GETTEXT_PATH)\msgconv.exe")
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
330 "$(GETTEXT_PATH)\msgconv.exe" -t BIG5 -o $@ $?
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
331 !ELSE
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
332 ! IF DEFINED (ICONV)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
333 $(ICONV) -f UTF-8 -t BIG5 $? > $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
334 ! ELSE
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
335 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
336 [System.IO.File]::ReadAllText(\"$?\", \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
337 [System.Text.Encoding]::GetEncoding(65001)), \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
338 [System.Text.Encoding]::GetEncoding(950))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
339
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
340 ! ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
341 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
342 [System.Text.Encoding]::GetEncoding(950)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
343 'charset=UTF-8', 'charset=BIG5'; \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
344 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
345 [System.Text.Encoding]::GetEncoding(950))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
346 !ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
347 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
348 [System.Text.Encoding]::GetEncoding(950)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
349 '# Original translations', \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
350 '# Generated from $?, DO NOT EDIT'; \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
351 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
352 [System.Text.Encoding]::GetEncoding(950))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
353
34543
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
354 # Convert zh_TW.UTF-8.po to create zh_TW.po with backslash characters.
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
355 # Requires doubling backslashes in the second byte. Don't depend on big5corr,
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
356 # it should only be compiled when zh_TW.po is outdated.
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
357
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
358 #
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
359 # 06.11.23, added by Restorer:
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
360 # For more details, see:
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
361 # https://github.com/vim/vim/pull/3261
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
362 # https://github.com/vim/vim/pull/3476
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
363 # https://github.com/vim/vim/pull/12153
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
364 # (read all comments)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
365 #
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
366 # I checked the workability on the list of backslash characters
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
367 # specified in zh_TW.UTF-8.po. It works.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
368 # But it is better to have someone native speaker check it.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
369 #
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
370
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
371 #zh_TW.po: zh_TW.UTF-8.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
372 # @$(MAKE) -nologo -f Make_mvc.mak big5corr
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
373 # -$(RM) $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
374 #!IF EXIST ("$(GETTEXT_PATH)\msgconv.exe")
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
375 # "$(GETTEXT_PATH)\msgconv.exe" -t BIG5 $? | .\big5corr.exe > $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
376 #!ELSEIF DEFINED (ICONV)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
377 # $(ICONV) -f UTF-8 -t BIG5 $? | .\big5corr.exe > $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
378 #!ELSE
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
379 # $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
380 # [System.IO.File]::ReadAllText(\"$?\", \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
381 # [System.Text.Encoding]::GetEncoding(65001)), \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
382 # [System.Text.Encoding]::GetEncoding(950))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
383 # type $@ | .\big5corr.exe > tmp.$@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
384 # @$(MV) tmp.$@ $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
385 #!ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
386 # $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
387 # [System.Text.Encoding]::GetEncoding(950)) \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
388 # -replace \"`r`n\", \"`n\"; \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
389 # [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
390 # [System.Text.Encoding]::GetEncoding(950))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
391
34543
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
392 # See above in the zh_TW.po conversion section for backslashes.
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
393 #big5corr: big5corr.c
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
394 # $(CC) big5corr.c
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
395
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
396 # Convert ko.UTF-8.po to create ko.po.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
397 ko.po: ko.UTF-8.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
398 -$(RM) $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
399 !IF EXIST ("$(GETTEXT_PATH)\msgconv.exe")
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
400 "$(GETTEXT_PATH)\msgconv.exe" -t EUC-KR -o $@ $?
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
401 !ELSE
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
402 ! IF DEFINED (ICONV)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
403 $(ICONV) -f UTF-8 -t EUC-KR $? > $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
404 ! ELSE
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
405 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
406 [System.IO.File]::ReadAllText(\"$?\", \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
407 [System.Text.Encoding]::GetEncoding(65001)), \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
408 [System.Text.Encoding]::GetEncoding(51949))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
409
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
410 ! ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
411 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
412 [System.Text.Encoding]::GetEncoding(51949)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
413 'charset=UTF-8', 'charset=EUC-KR'; \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
414 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
415 [System.Text.Encoding]::GetEncoding(51949))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
416 !ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
417 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
418 [System.Text.Encoding]::GetEncoding(51949)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
419 '# Original translations', \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
420 '# Generated from $?, DO NOT EDIT'; \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
421 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
422 [System.Text.Encoding]::GetEncoding(51949))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
423
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
424 # Convert ru.po to create ru.cp1251.po.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
425 ru.cp1251.po: ru.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
426 -$(RM) $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
427 !IF EXIST ("$(GETTEXT_PATH)\msgconv.exe")
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
428 "$(GETTEXT_PATH)\msgconv.exe" -t CP1251 -o $@ $?
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
429 !ELSE
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
430 ! IF DEFINED (ICONV)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
431 $(ICONV) -f UTF-8 -t CP1251 $? > $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
432 ! ELSE
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
433 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
434 [System.IO.File]::ReadAllText(\"$?\", \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
435 [System.Text.Encoding]::GetEncoding(65001)), \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
436 [System.Text.Encoding]::GetEncoding(1251))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
437
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
438 ! ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
439 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
440 [System.Text.Encoding]::GetEncoding(1251)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
441 'charset=UTF-8', 'charset=CP1251'; \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
442 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
443 [System.Text.Encoding]::GetEncoding(1251))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
444 !ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
445 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
446 [System.Text.Encoding]::GetEncoding(1251)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
447 '# Original translations', \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
448 '# Generated from $?, DO NOT EDIT'; \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
449 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
450 [System.Text.Encoding]::GetEncoding(1251))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
451
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
452 # Convert uk.po to create uk.cp1251.po.
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
453 uk.cp1251.po: uk.po
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
454 -$(RM) $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
455 !IF EXIST ("$(GETTEXT_PATH)\msgconv.exe")
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
456 "$(GETTEXT_PATH)\msgconv.exe" -t CP1251 -o $@ $?
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
457 !ELSE
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
458 ! IF DEFINED (ICONV)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
459 $(ICONV) -f UTF-8 -t CP1251 $? > $@
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
460 ! ELSE
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
461 $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
462 [System.IO.File]::ReadAllText(\"$?\", \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
463 [System.Text.Encoding]::GetEncoding(65001)), \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
464 [System.Text.Encoding]::GetEncoding(1251))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
465
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
466 ! ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
467 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
468 [System.Text.Encoding]::GetEncoding(1251)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
469 'charset=UTF-8', 'charset=CP1251'; \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
470 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
471 [System.Text.Encoding]::GetEncoding(1251))
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
472 !ENDIF
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
473 $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
474 [System.Text.Encoding]::GetEncoding(1251)) -replace \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
475 '# Original translations', \
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
476 '# Generated from $?, DO NOT EDIT'; \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
477 [System.IO.File]::WriteAllText(\"$@\", $$out, \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
478 [System.Text.Encoding]::GetEncoding(1251))
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
479
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
480 .po.mo:
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
481 set OLD_PO_FILE_INPUT=yes
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
482 $(MSGFMT) -o $@ $<
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
483
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
484 PO_INPUTLIST = \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
485 ..\*.c \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
486 ..\if_perl.xs \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
487 ..\GvimExt\gvimext.cpp \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
488 ..\errors.h \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
489 ..\globals.h \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
490 ..\if_py_both.h \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
491 ..\vim.h \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
492 gvim.desktop.in \
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
493 vim.desktop.in
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
494
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
495 files: $(PO_INPUTLIST)
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
496 $(LS) $(LSFLAGS) $(PO_INPUTLIST) > .\files
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
497
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
498 first_time: files
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
499 "$(VIM)" -u NONE --not-a-term -S tojavascript.vim $(LANGUAGE).po \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
500 $(PO_VIM_INPUTLIST)
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
501 set OLD_PO_FILE_INPUT=yes
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
502 set OLD_PO_FILE_OUTPUT=yes
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
503 $(XGETTEXT) --default-domain=$(LANGUAGE) --add-comments $(XGETTEXT_KEYWORDS) \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
504 --files-from=.\files $(PO_VIM_JSLIST)
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
505 "$(VIM)" -u NONE --not-a-term -S fixfilenames.vim $(LANGUAGE).po \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
506 $(PO_VIM_INPUTLIST)
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
507 $(RM) *.js
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
508
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
509 $(PACKAGE).pot: files
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
510 "$(VIM)" -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
511 $(PO_VIM_INPUTLIST)
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
512 set OLD_PO_FILE_INPUT=yes
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
513 set OLD_PO_FILE_OUTPUT=yes
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
514 $(XGETTEXT) --default-domain=$(PACKAGE) --add-comments $(XGETTEXT_KEYWORDS) \
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
515 --files-from=.\files $(PO_VIM_JSLIST)
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
516 $(MV) $(PACKAGE).po $(PACKAGE).pot
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
517 "$(VIM)" -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot \
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
518 $(PO_VIM_INPUTLIST)
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
519 $(RM) *.js
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
520
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
521 # Only original translations with default encoding should be updated.
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
522 # The files that are converted to a different encoding clearly state "DO NOT EDIT".
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
523 update-po: $(MOFILES:.mo=)
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
524
34543
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
525 # Don't add a dependency here, we only want to update the .po files manually.
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
526 $(LANGUAGES):
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
527 @$(MAKE) -nologo -f Make_mvc.mak GETTEXT_PATH="$(GETTEXT_PATH)" $(PACKAGE).pot
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
528 $(CP) $@.po $@.po.orig
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
529 $(MV) $@.po $@.po.old
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
530 $(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
531 $(RM) $@.po.old
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
532
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
533 install: $(LANGUAGE).mo
34543
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
534 if not exist "$(INSTALLDIR)" $(MKD) "$(INSTALLDIR)"
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
535 $(CP) $(LANGUAGE).mo "$(INSTALLDIR)\$(PACKAGE).mo"
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
536
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
537 install-all: all
34543
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
538 for %%l in ($(LANGUAGES)) do @if not exist "$(VIMRUNTIME)\lang\%%l\LC_MESSAGES" \
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
539 $(MKD) "$(VIMRUNTIME)\lang\%%l\LC_MESSAGES"
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
540 for %%l in ($(LANGUAGES)) do @$(CP) %%l.mo \
34543
748a8a413816 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Christian Brabandt <cb@256bit.org>
parents: 34178
diff changeset
541 "$(VIMRUNTIME)\lang\%%l\LC_MESSAGES\$(PACKAGE).mo"
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
542
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
543 cleanup-po: $(LANGUAGE).po
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
544 "$(VIM)" -u NONE -e -X -S cleanup.vim -c wq $(LANGUAGE).po
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
545
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
546 cleanup-po-all: $(POFILES)
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
547 !"$(VIM)" -u NONE -e -X -S cleanup.vim -c wq $**
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
548
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
549 clean: checkclean
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
550 $(RM) *.mo
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
551 $(RM) *.pot
34178
c5a10c03afb8 patch 9.1.0044: po Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 33831
diff changeset
552 $(RM) *.orig
32670
695b50472e85 Fix line endings issue
Christian Brabandt <cb@256bit.org>
parents: 32669
diff changeset
553 $(RM) files
33823
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
554 $(RM) sjiscorr.obj sjiscorr.exe
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
555 # $(RM) big5corr.obj big5corr.exe
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
556
45c0a5330758 patch 9.0.2127: translation Makefiles can be improved
Christian Brabandt <cb@256bit.org>
parents: 32670
diff changeset
557 # vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make: