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