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