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