mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 9.1.0044: po Makefiles can be improved
Problem: po Makefiles can be improved Solution: Improve the style of the Makefiles, update Makefile variables, update documentation (RestorerZ) closes: #13858 closes: #13857 Signed-off-by: RestorerZ <restorer@mail2k.ru> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
91155eb31f
commit
76ba724e1d
@@ -2070,7 +2070,7 @@ xxd/xxd$(EXEEXT): xxd/xxd.c
|
|||||||
languages:
|
languages:
|
||||||
@if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
|
@if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
|
||||||
cd $(PODIR); \
|
cd $(PODIR); \
|
||||||
CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix); \
|
CC="$(CC)" $(MAKE) prefix=$(DESTDIR)$(prefix) originals; \
|
||||||
fi
|
fi
|
||||||
-@if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
|
-@if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
|
||||||
cd $(PODIR); \
|
cd $(PODIR); \
|
||||||
|
@@ -1,15 +1,35 @@
|
|||||||
# Makefile for the Vim message translations for MSVC
|
# Makefile for the Vim message translations for MSVC
|
||||||
# (based on make_ming.mak)
|
# (based on make_ming.mak)
|
||||||
#
|
#
|
||||||
# Mike Williams <mrw@eandem.co.uk>
|
# Mike Williams, <mrw@eandem.co.uk>
|
||||||
|
# 06.01.24, Restorer, <restorer@mail2k.ru>
|
||||||
#
|
#
|
||||||
# Please read README_mvc.txt before using this file.
|
# Please read README_mvc.txt before using this file.
|
||||||
#
|
#
|
||||||
|
|
||||||
!IF [powershell -nologo -noprofile "exit $$psversiontable.psversion.major"] == 2
|
!IF [powershell.exe -nologo -noprofile "exit $$psversiontable.psversion.major"] == 2
|
||||||
!ERROR The program "PowerShell" version 3.0 or higher is required to work
|
!ERROR The program "PowerShell" version 3.0 or higher is required to work
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
!IFNDEF LANGUAGE
|
||||||
|
! IF [powershell.exe -nologo -noprofile $$lng=(Get-UICulture).TwoLetterISOLanguageName;$$Env:LANGUAGE=$$lng;Set-Content -Path .\lng.tmp -Value "LANGUAGE=$$lng"]
|
||||||
|
#! IF [powershell.exe -nologo -noprofile -command $$Env:LANGUAGE=(Get-UICulture).TwoLetterISOLanguageName]
|
||||||
|
! ENDIF
|
||||||
|
# In order for the "install" and "cleanup-po" rule to work.
|
||||||
|
# The others work with just setting the environment variable.
|
||||||
|
# And to show in the message.
|
||||||
|
! INCLUDE lng.tmp
|
||||||
|
! IF [del /q .\lng.tmp]
|
||||||
|
! ENDIF
|
||||||
|
! MESSAGE
|
||||||
|
! MESSAGE The %LANGUAGE% environment variable is not set.
|
||||||
|
! MESSAGE This variable will be temporarily set to "$(LANGUAGE)" while "nmake.exe" is running.
|
||||||
|
! MESSAGE See README_mvc.txt for more information on the %LANGUAGE% environment variable.
|
||||||
|
! MESSAGE
|
||||||
|
!ELSE
|
||||||
|
! MESSAGE LANGUAGE is already set "$(LANGUAGE)"
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
# get LANGUAGES, MOFILES, MOCONVERTED and others
|
# get LANGUAGES, MOFILES, MOCONVERTED and others
|
||||||
!INCLUDE Make_all.mak
|
!INCLUDE Make_all.mak
|
||||||
|
|
||||||
@@ -18,16 +38,17 @@ VIMRUNTIME = ..\..\runtime
|
|||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
PACKAGE = vim
|
PACKAGE = vim
|
||||||
# Correct the following line for the where executeable file vim is installed.
|
# Correct the following line for the where executeable file vim is
|
||||||
VIM = ..\vim
|
# installed. Please do not put the path in quotes.
|
||||||
|
VIM = ..\vim.exe
|
||||||
|
|
||||||
# Correct the following line for the directory where gettext et al is
|
# Correct the following line for the directory where gettext et al is
|
||||||
# installed. Please do not put the path in quotes.
|
# installed. Please do not put the path in quotes.
|
||||||
GETTEXT_PATH = D:\Programs\GetText\bin
|
GETTEXT_PATH = D:\Programs\GetText\bin
|
||||||
|
|
||||||
MSGFMT = "$(GETTEXT_PATH)\msgfmt" -v
|
MSGFMT = "$(GETTEXT_PATH)\msgfmt.exe" -v
|
||||||
XGETTEXT = "$(GETTEXT_PATH)\xgettext"
|
XGETTEXT = "$(GETTEXT_PATH)\xgettext.exe"
|
||||||
MSGMERGE = "$(GETTEXT_PATH)\msgmerge"
|
MSGMERGE = "$(GETTEXT_PATH)\msgmerge.exe"
|
||||||
|
|
||||||
# In case some package like GnuWin32, UnixUtils, gettext
|
# In case some package like GnuWin32, UnixUtils, gettext
|
||||||
# or something similar is installed on the system.
|
# or something similar is installed on the system.
|
||||||
@@ -54,8 +75,10 @@ CP = copy /y
|
|||||||
RM = del /q
|
RM = del /q
|
||||||
MKD = mkdir
|
MKD = mkdir
|
||||||
LS = dir
|
LS = dir
|
||||||
|
PS = PowerShell.exe
|
||||||
|
|
||||||
LSFLAGS = /b /on /l /s
|
LSFLAGS = /b /on /l /s
|
||||||
|
PSFLAGS = -NoLogo -NoProfile -Command
|
||||||
|
|
||||||
INSTALLDIR = $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES
|
INSTALLDIR = $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES
|
||||||
|
|
||||||
@@ -64,8 +87,12 @@ INSTALLDIR = $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES
|
|||||||
|
|
||||||
all: $(MOFILES) $(MOCONVERTED)
|
all: $(MOFILES) $(MOCONVERTED)
|
||||||
|
|
||||||
|
originals : $(MOFILES)
|
||||||
|
|
||||||
|
converted: $(MOCONVERTED)
|
||||||
|
|
||||||
.po.ck:
|
.po.ck:
|
||||||
$(VIM) -u NONE --noplugins -e -s -X --cmd "set enc=utf-8" -S check.vim \
|
"$(VIM)" -u NONE --noplugins -e -s -X --cmd "set enc=utf-8" -S check.vim \
|
||||||
-c "if error == 0 | q | else | num 2 | cq | endif" $<
|
-c "if error == 0 | q | else | num 2 | cq | endif" $<
|
||||||
$(TOUCH_TARGET)
|
$(TOUCH_TARGET)
|
||||||
|
|
||||||
@@ -74,13 +101,8 @@ check: $(CHECKFILES)
|
|||||||
checkclean:
|
checkclean:
|
||||||
$(RM) *.ck
|
$(RM) *.ck
|
||||||
|
|
||||||
converted: $(MOCONVERTED)
|
|
||||||
|
|
||||||
checklanguage:
|
|
||||||
@if "$(LANGUAGE)"=="" (echo Set the environment variable ^%LANGUAGE^%. See README_mvc.txt. && exit 1)
|
|
||||||
|
|
||||||
nl.po:
|
nl.po:
|
||||||
@( echo \# > nl.po )
|
@( echo ^# >> nl.po )
|
||||||
|
|
||||||
# Norwegian/Bokmal: "nb" is an alias for "no".
|
# Norwegian/Bokmal: "nb" is an alias for "no".
|
||||||
nb.po: no.po
|
nb.po: no.po
|
||||||
@@ -95,16 +117,14 @@ ja.sjis.po: ja.po
|
|||||||
!ELSEIF DEFINED (ICONV)
|
!ELSEIF DEFINED (ICONV)
|
||||||
$(ICONV) -f UTF-8 -t CP932 $? | .\sjiscorr.exe > $@
|
$(ICONV) -f UTF-8 -t CP932 $? | .\sjiscorr.exe > $@
|
||||||
!ELSE
|
!ELSE
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", \
|
|
||||||
[System.IO.File]::ReadAllText(\"$?\", \
|
[System.IO.File]::ReadAllText(\"$?\", \
|
||||||
[System.Text.Encoding]::GetEncoding(65001)), \
|
[System.Text.Encoding]::GetEncoding(65001)), \
|
||||||
[System.Text.Encoding]::GetEncoding(932))
|
[System.Text.Encoding]::GetEncoding(932))
|
||||||
type $@ | .\sjiscorr.exe > tmp.$@
|
type $@ | .\sjiscorr.exe > tmp.$@
|
||||||
@$(MV) tmp.$@ $@
|
@$(MV) tmp.$@ $@
|
||||||
!ENDIF
|
!ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(932)) \
|
[System.Text.Encoding]::GetEncoding(932)) \
|
||||||
-replace \"`r`n\", \"`n\"; \
|
-replace \"`r`n\", \"`n\"; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
@@ -122,24 +142,21 @@ ja.euc-jp.po: ja.po
|
|||||||
! IF DEFINED (ICONV)
|
! IF DEFINED (ICONV)
|
||||||
$(ICONV) -f UTF-8 -t EUC-JP $? > $@
|
$(ICONV) -f UTF-8 -t EUC-JP $? > $@
|
||||||
! ELSE
|
! ELSE
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", \
|
|
||||||
[System.IO.File]::ReadAllText(\"$?\", \
|
[System.IO.File]::ReadAllText(\"$?\", \
|
||||||
[System.Text.Encoding]::GetEncoding(65001)), \
|
[System.Text.Encoding]::GetEncoding(65001)), \
|
||||||
[System.Text.Encoding]::GetEncoding(20932))
|
[System.Text.Encoding]::GetEncoding(20932))
|
||||||
! ENDIF
|
! ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(20932)) -replace \
|
[System.Text.Encoding]::GetEncoding(20932)) -replace \
|
||||||
'charset=utf-8', 'charset=EUC-JP'; \
|
'charset=utf-8', 'charset=EUC-JP'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(20932))
|
[System.Text.Encoding]::GetEncoding(20932))
|
||||||
!ENDIF
|
!ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(20932)) -replace \
|
[System.Text.Encoding]::GetEncoding(20932)) -replace \
|
||||||
'# Original translations', \
|
'# Original translations', \
|
||||||
'# Generated from ja.po, DO NOT EDIT'; \
|
'# Generated from $?, DO NOT EDIT'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(20932))
|
[System.Text.Encoding]::GetEncoding(20932))
|
||||||
|
|
||||||
@@ -152,24 +169,21 @@ cs.cp1250.po: cs.po
|
|||||||
! IF DEFINED (ICONV)
|
! IF DEFINED (ICONV)
|
||||||
$(ICONV) -f ISO-8859-2 -t CP1250 $? > $@
|
$(ICONV) -f ISO-8859-2 -t CP1250 $? > $@
|
||||||
! ELSE
|
! ELSE
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", \
|
|
||||||
[System.IO.File]::ReadAllText(\"$?\", \
|
[System.IO.File]::ReadAllText(\"$?\", \
|
||||||
[System.Text.Encoding]::GetEncoding(28592)), \
|
[System.Text.Encoding]::GetEncoding(28592)), \
|
||||||
[System.Text.Encoding]::GetEncoding(1250))
|
[System.Text.Encoding]::GetEncoding(1250))
|
||||||
! ENDIF
|
! ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(1250)) -replace \
|
[System.Text.Encoding]::GetEncoding(1250)) -replace \
|
||||||
'charset=iso-8859-2', 'charset=CP1250'; \
|
'charset=iso-8859-2', 'charset=CP1250'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(1250))
|
[System.Text.Encoding]::GetEncoding(1250))
|
||||||
!ENDIF
|
!ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(1250)) -replace \
|
[System.Text.Encoding]::GetEncoding(1250)) -replace \
|
||||||
'# Original translations', \
|
'# Original translations', \
|
||||||
'# Generated from cs.po, DO NOT EDIT'; \
|
'# Generated from $?, DO NOT EDIT'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(1250))
|
[System.Text.Encoding]::GetEncoding(1250))
|
||||||
|
|
||||||
@@ -182,24 +196,21 @@ pl.cp1250.po: pl.po
|
|||||||
! IF DEFINED (ICONV)
|
! IF DEFINED (ICONV)
|
||||||
$(ICONV) -f ISO-8859-2 -t CP1250 $? > $@
|
$(ICONV) -f ISO-8859-2 -t CP1250 $? > $@
|
||||||
! ELSE
|
! ELSE
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", \
|
|
||||||
[System.IO.File]::ReadAllText(\"$?\", \
|
[System.IO.File]::ReadAllText(\"$?\", \
|
||||||
[System.Text.Encoding]::GetEncoding(28592)), \
|
[System.Text.Encoding]::GetEncoding(28592)), \
|
||||||
[System.Text.Encoding]::GetEncoding(1250))
|
[System.Text.Encoding]::GetEncoding(1250))
|
||||||
! ENDIF
|
! ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(1250)) -replace \
|
[System.Text.Encoding]::GetEncoding(1250)) -replace \
|
||||||
'charset=iso-8859-2', 'charset=CP1250'; \
|
'charset=iso-8859-2', 'charset=CP1250'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(1250))
|
[System.Text.Encoding]::GetEncoding(1250))
|
||||||
!ENDIF
|
!ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(1250)) -replace \
|
[System.Text.Encoding]::GetEncoding(1250)) -replace \
|
||||||
'# Original translations', \
|
'# Original translations', \
|
||||||
'# Generated from pl.po, DO NOT EDIT'; \
|
'# Generated from $?, DO NOT EDIT'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(1250))
|
[System.Text.Encoding]::GetEncoding(1250))
|
||||||
|
|
||||||
@@ -212,20 +223,17 @@ pl.UTF-8.po: pl.po
|
|||||||
! IF DEFINED (ICONV)
|
! IF DEFINED (ICONV)
|
||||||
$(ICONV) -f ISO-8859-2 -t UTF-8 $? > $@
|
$(ICONV) -f ISO-8859-2 -t UTF-8 $? > $@
|
||||||
! ELSE
|
! ELSE
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", \
|
|
||||||
[System.IO.File]::ReadAllText(\"$?\", \
|
[System.IO.File]::ReadAllText(\"$?\", \
|
||||||
[System.Text.Encoding]::GetEncoding(28592)))
|
[System.Text.Encoding]::GetEncoding(28592)))
|
||||||
! ENDIF
|
! ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) (Get-Content -Raw -Encoding UTF8 $@ \
|
||||||
(Get-Content -Raw -Encoding UTF8 $@ \
|
|
||||||
^| % {$$_-replace 'charset=iso-8859-2', 'charset=UTF-8'}) \
|
^| % {$$_-replace 'charset=iso-8859-2', 'charset=UTF-8'}) \
|
||||||
^| 1>nul New-Item -Force -Path . -ItemType file -Name $@
|
^| 1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||||
!ENDIF
|
!ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) (Get-Content -Raw -Encoding UTF8 $@ \
|
||||||
(Get-Content -Raw -Encoding UTF8 $@ \
|
|
||||||
^| % {$$_-replace '# Original translations', \
|
^| % {$$_-replace '# Original translations', \
|
||||||
'# Generated from pl.po, DO NOT EDIT'}) \
|
'# Generated from $?, DO NOT EDIT'}) \
|
||||||
^| 1>nul New-Item -Force -Path . -ItemType file -Name $@
|
^| 1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||||
|
|
||||||
# Convert sk.po to create sk.cp1250.po.
|
# Convert sk.po to create sk.cp1250.po.
|
||||||
@@ -237,24 +245,21 @@ sk.cp1250.po: sk.po
|
|||||||
! IF DEFINED (ICONV)
|
! IF DEFINED (ICONV)
|
||||||
$(ICONV) -f ISO-8859-2 -t CP1250 $? > $@
|
$(ICONV) -f ISO-8859-2 -t CP1250 $? > $@
|
||||||
! ELSE
|
! ELSE
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", \
|
|
||||||
[System.IO.File]::ReadAllText(\"$?\", \
|
[System.IO.File]::ReadAllText(\"$?\", \
|
||||||
[System.Text.Encoding]::GetEncoding(28592)), \
|
[System.Text.Encoding]::GetEncoding(28592)), \
|
||||||
[System.Text.Encoding]::GetEncoding(1250))
|
[System.Text.Encoding]::GetEncoding(1250))
|
||||||
! ENDIF
|
! ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(1250)) -replace \
|
[System.Text.Encoding]::GetEncoding(1250)) -replace \
|
||||||
'charset=iso-8859-2', 'charset=CP1250'; \
|
'charset=iso-8859-2', 'charset=CP1250'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(1250))
|
[System.Text.Encoding]::GetEncoding(1250))
|
||||||
!ENDIF
|
!ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(1250)) -replace \
|
[System.Text.Encoding]::GetEncoding(1250)) -replace \
|
||||||
'# Original translations', \
|
'# Original translations', \
|
||||||
'# Generated from sk.po, DO NOT EDIT'; \
|
'# Generated from $?, DO NOT EDIT'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(1250))
|
[System.Text.Encoding]::GetEncoding(1250))
|
||||||
|
|
||||||
@@ -267,25 +272,22 @@ zh_CN.po: zh_CN.UTF-8.po
|
|||||||
! IF DEFINED (ICONV)
|
! IF DEFINED (ICONV)
|
||||||
$(ICONV) -f UTF-8 -t GB2312 $? > $@
|
$(ICONV) -f UTF-8 -t GB2312 $? > $@
|
||||||
! ELSE
|
! ELSE
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", \
|
|
||||||
[System.IO.File]::ReadAllText(\"$?\", \
|
[System.IO.File]::ReadAllText(\"$?\", \
|
||||||
[System.Text.Encoding]::GetEncoding(65001)), \
|
[System.Text.Encoding]::GetEncoding(65001)), \
|
||||||
[System.Text.Encoding]::GetEncoding(936))
|
[System.Text.Encoding]::GetEncoding(936))
|
||||||
|
|
||||||
! ENDIF
|
! ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(936)) -replace \
|
[System.Text.Encoding]::GetEncoding(936)) -replace \
|
||||||
'charset=UTF-8', 'charset=GB2312'; \
|
'charset=UTF-8', 'charset=GB2312'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(936))
|
[System.Text.Encoding]::GetEncoding(936))
|
||||||
!ENDIF
|
!ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(936)) -replace \
|
[System.Text.Encoding]::GetEncoding(936)) -replace \
|
||||||
'# Original translations', \
|
'# Original translations', \
|
||||||
'# Generated from zh_CN.UTF-8.po, DO NOT EDIT'; \
|
'# Generated from $?, DO NOT EDIT'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(936))
|
[System.Text.Encoding]::GetEncoding(936))
|
||||||
|
|
||||||
@@ -297,19 +299,17 @@ zh_CN.cp936.po: zh_CN.UTF-8.po
|
|||||||
!IF DEFINED (ICONV)
|
!IF DEFINED (ICONV)
|
||||||
$(ICONV) -f UTF-8 -t CP936 $? > $@
|
$(ICONV) -f UTF-8 -t CP936 $? > $@
|
||||||
!ELSE
|
!ELSE
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", \
|
|
||||||
[System.IO.File]::ReadAllText(\"$?\", \
|
[System.IO.File]::ReadAllText(\"$?\", \
|
||||||
[System.Text.Encoding]::GetEncoding(65001)), \
|
[System.Text.Encoding]::GetEncoding(65001)), \
|
||||||
[System.Text.Encoding]::GetEncoding(20936))
|
[System.Text.Encoding]::GetEncoding(20936))
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(20936)) \
|
[System.Text.Encoding]::GetEncoding(20936)) \
|
||||||
-replace 'charset=UTF-8', 'charset=GBK'\
|
-replace 'charset=UTF-8', 'charset=GBK'\
|
||||||
-replace '# Original translations', \
|
-replace '# Original translations', \
|
||||||
'# Generated from zh_CN.UTF-8.po, DO NOT EDIT'; \
|
'# Generated from $?, DO NOT EDIT'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(20936))
|
[System.Text.Encoding]::GetEncoding(20936))
|
||||||
|
|
||||||
@@ -322,31 +322,29 @@ zh_TW.po: zh_TW.UTF-8.po
|
|||||||
! IF DEFINED (ICONV)
|
! IF DEFINED (ICONV)
|
||||||
$(ICONV) -f UTF-8 -t BIG5 $? > $@
|
$(ICONV) -f UTF-8 -t BIG5 $? > $@
|
||||||
! ELSE
|
! ELSE
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", \
|
|
||||||
[System.IO.File]::ReadAllText(\"$?\", \
|
[System.IO.File]::ReadAllText(\"$?\", \
|
||||||
[System.Text.Encoding]::GetEncoding(65001)), \
|
[System.Text.Encoding]::GetEncoding(65001)), \
|
||||||
[System.Text.Encoding]::GetEncoding(950))
|
[System.Text.Encoding]::GetEncoding(950))
|
||||||
|
|
||||||
! ENDIF
|
! ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(950)) -replace \
|
[System.Text.Encoding]::GetEncoding(950)) -replace \
|
||||||
'charset=UTF-8', 'charset=BIG5'; \
|
'charset=UTF-8', 'charset=BIG5'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(950))
|
[System.Text.Encoding]::GetEncoding(950))
|
||||||
!ENDIF
|
!ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(950)) -replace \
|
[System.Text.Encoding]::GetEncoding(950)) -replace \
|
||||||
'# Original translations', \
|
'# Original translations', \
|
||||||
'# Generated from zh_TW.UTF-8.po, DO NOT EDIT'; \
|
'# Generated from $?, DO NOT EDIT'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(950))
|
[System.Text.Encoding]::GetEncoding(950))
|
||||||
|
|
||||||
# Convert zh_TW.UTF-8.po to create zh_TW.po with backslash characters
|
# Convert zh_TW.UTF-8.po to create zh_TW.po with backslash characters
|
||||||
# Requires doubling backslashes in the second byte. Don't depend on big5corr,
|
# Requires doubling backslashes in the second byte. Don't depend on big5corr,
|
||||||
# it should only be compiled when zh_TW.po is outdated.
|
# it should only be compiled when zh_TW.po is outdated.
|
||||||
|
|
||||||
#
|
#
|
||||||
# 06.11.23, added by Restorer:
|
# 06.11.23, added by Restorer:
|
||||||
# For more details, see:
|
# For more details, see:
|
||||||
@@ -368,16 +366,14 @@ zh_TW.po: zh_TW.UTF-8.po
|
|||||||
#!ELSEIF DEFINED (ICONV)
|
#!ELSEIF DEFINED (ICONV)
|
||||||
# $(ICONV) -f UTF-8 -t BIG5 $? | .\big5corr.exe > $@
|
# $(ICONV) -f UTF-8 -t BIG5 $? | .\big5corr.exe > $@
|
||||||
#!ELSE
|
#!ELSE
|
||||||
# powershell -nologo -noprofile -Command \
|
# $(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
|
||||||
# [System.IO.File]::WriteAllText(\"$@\", \
|
|
||||||
# [System.IO.File]::ReadAllText(\"$?\", \
|
# [System.IO.File]::ReadAllText(\"$?\", \
|
||||||
# [System.Text.Encoding]::GetEncoding(65001)), \
|
# [System.Text.Encoding]::GetEncoding(65001)), \
|
||||||
# [System.Text.Encoding]::GetEncoding(950))
|
# [System.Text.Encoding]::GetEncoding(950))
|
||||||
# type $@ | .\big5corr.exe > tmp.$@
|
# type $@ | .\big5corr.exe > tmp.$@
|
||||||
# @$(MV) tmp.$@ $@
|
# @$(MV) tmp.$@ $@
|
||||||
#!ENDIF
|
#!ENDIF
|
||||||
# powershell -nologo -noprofile -Command \
|
# $(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
# $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
# [System.Text.Encoding]::GetEncoding(950)) \
|
# [System.Text.Encoding]::GetEncoding(950)) \
|
||||||
# -replace \"`r`n\", \"`n\"; \
|
# -replace \"`r`n\", \"`n\"; \
|
||||||
# [System.IO.File]::WriteAllText(\"$@\", $$out, \
|
# [System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
@@ -396,25 +392,22 @@ ko.po: ko.UTF-8.po
|
|||||||
! IF DEFINED (ICONV)
|
! IF DEFINED (ICONV)
|
||||||
$(ICONV) -f UTF-8 -t EUC-KR $? > $@
|
$(ICONV) -f UTF-8 -t EUC-KR $? > $@
|
||||||
! ELSE
|
! ELSE
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", \
|
|
||||||
[System.IO.File]::ReadAllText(\"$?\", \
|
[System.IO.File]::ReadAllText(\"$?\", \
|
||||||
[System.Text.Encoding]::GetEncoding(65001)), \
|
[System.Text.Encoding]::GetEncoding(65001)), \
|
||||||
[System.Text.Encoding]::GetEncoding(51949))
|
[System.Text.Encoding]::GetEncoding(51949))
|
||||||
|
|
||||||
! ENDIF
|
! ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(51949)) -replace \
|
[System.Text.Encoding]::GetEncoding(51949)) -replace \
|
||||||
'charset=UTF-8', 'charset=EUC-KR'; \
|
'charset=UTF-8', 'charset=EUC-KR'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(51949))
|
[System.Text.Encoding]::GetEncoding(51949))
|
||||||
!ENDIF
|
!ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(51949)) -replace \
|
[System.Text.Encoding]::GetEncoding(51949)) -replace \
|
||||||
'# Original translations', \
|
'# Original translations', \
|
||||||
'# Generated from ko.UTF-8.po, DO NOT EDIT'; \
|
'# Generated from $?, DO NOT EDIT'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(51949))
|
[System.Text.Encoding]::GetEncoding(51949))
|
||||||
|
|
||||||
@@ -427,25 +420,22 @@ ru.cp1251.po: ru.po
|
|||||||
! IF DEFINED (ICONV)
|
! IF DEFINED (ICONV)
|
||||||
$(ICONV) -f UTF-8 -t CP1251 $? > $@
|
$(ICONV) -f UTF-8 -t CP1251 $? > $@
|
||||||
! ELSE
|
! ELSE
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", \
|
|
||||||
[System.IO.File]::ReadAllText(\"$?\", \
|
[System.IO.File]::ReadAllText(\"$?\", \
|
||||||
[System.Text.Encoding]::GetEncoding(65001)), \
|
[System.Text.Encoding]::GetEncoding(65001)), \
|
||||||
[System.Text.Encoding]::GetEncoding(1251))
|
[System.Text.Encoding]::GetEncoding(1251))
|
||||||
|
|
||||||
! ENDIF
|
! ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(1251)) -replace \
|
[System.Text.Encoding]::GetEncoding(1251)) -replace \
|
||||||
'charset=UTF-8', 'charset=CP1251'; \
|
'charset=UTF-8', 'charset=CP1251'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(1251))
|
[System.Text.Encoding]::GetEncoding(1251))
|
||||||
!ENDIF
|
!ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(1251)) -replace \
|
[System.Text.Encoding]::GetEncoding(1251)) -replace \
|
||||||
'# Original translations', \
|
'# Original translations', \
|
||||||
'# Generated from ru.po, DO NOT EDIT'; \
|
'# Generated from $?, DO NOT EDIT'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(1251))
|
[System.Text.Encoding]::GetEncoding(1251))
|
||||||
|
|
||||||
@@ -458,25 +448,22 @@ uk.cp1251.po: uk.po
|
|||||||
! IF DEFINED (ICONV)
|
! IF DEFINED (ICONV)
|
||||||
$(ICONV) -f UTF-8 -t CP1251 $? > $@
|
$(ICONV) -f UTF-8 -t CP1251 $? > $@
|
||||||
! ELSE
|
! ELSE
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) [System.IO.File]::WriteAllText(\"$@\", \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", \
|
|
||||||
[System.IO.File]::ReadAllText(\"$?\", \
|
[System.IO.File]::ReadAllText(\"$?\", \
|
||||||
[System.Text.Encoding]::GetEncoding(65001)), \
|
[System.Text.Encoding]::GetEncoding(65001)), \
|
||||||
[System.Text.Encoding]::GetEncoding(1251))
|
[System.Text.Encoding]::GetEncoding(1251))
|
||||||
|
|
||||||
! ENDIF
|
! ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(1251)) -replace \
|
[System.Text.Encoding]::GetEncoding(1251)) -replace \
|
||||||
'charset=UTF-8', 'charset=CP1251'; \
|
'charset=UTF-8', 'charset=CP1251'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(1251))
|
[System.Text.Encoding]::GetEncoding(1251))
|
||||||
!ENDIF
|
!ENDIF
|
||||||
powershell -nologo -noprofile -Command \
|
$(PS) $(PSFLAGS) $$out = [System.IO.File]::ReadAllText(\"$@\", \
|
||||||
$$out = [System.IO.File]::ReadAllText(\"$@\", \
|
|
||||||
[System.Text.Encoding]::GetEncoding(1251)) -replace \
|
[System.Text.Encoding]::GetEncoding(1251)) -replace \
|
||||||
'# Original translations', \
|
'# Original translations', \
|
||||||
'# Generated from uk.po, DO NOT EDIT'; \
|
'# Generated from $?, DO NOT EDIT'; \
|
||||||
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
[System.IO.File]::WriteAllText(\"$@\", $$out, \
|
||||||
[System.Text.Encoding]::GetEncoding(1251))
|
[System.Text.Encoding]::GetEncoding(1251))
|
||||||
|
|
||||||
@@ -498,42 +485,42 @@ PO_INPUTLIST = \
|
|||||||
files: $(PO_INPUTLIST)
|
files: $(PO_INPUTLIST)
|
||||||
$(LS) $(LSFLAGS) $(PO_INPUTLIST) > .\files
|
$(LS) $(LSFLAGS) $(PO_INPUTLIST) > .\files
|
||||||
|
|
||||||
first_time: checklanguage files
|
first_time: files
|
||||||
$(VIM) -u NONE --not-a-term -S tojavascript.vim $(LANGUAGE).po \
|
"$(VIM)" -u NONE --not-a-term -S tojavascript.vim $(LANGUAGE).po \
|
||||||
$(PO_VIM_INPUTLIST)
|
$(PO_VIM_INPUTLIST)
|
||||||
set OLD_PO_FILE_INPUT=yes
|
set OLD_PO_FILE_INPUT=yes
|
||||||
set OLD_PO_FILE_OUTPUT=yes
|
set OLD_PO_FILE_OUTPUT=yes
|
||||||
$(XGETTEXT) --default-domain=$(LANGUAGE) --add-comments $(XGETTEXT_KEYWORDS) \
|
$(XGETTEXT) --default-domain=$(LANGUAGE) --add-comments $(XGETTEXT_KEYWORDS) \
|
||||||
--files-from=.\files $(PO_VIM_JSLIST)
|
--files-from=.\files $(PO_VIM_JSLIST)
|
||||||
$(VIM) -u NONE --not-a-term -S fixfilenames.vim $(LANGUAGE).po \
|
"$(VIM)" -u NONE --not-a-term -S fixfilenames.vim $(LANGUAGE).po \
|
||||||
$(PO_VIM_INPUTLIST)
|
$(PO_VIM_INPUTLIST)
|
||||||
$(RM) *.js
|
$(RM) *.js
|
||||||
|
|
||||||
$(PACKAGE).pot: files
|
$(PACKAGE).pot: files
|
||||||
$(VIM) -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot \
|
"$(VIM)" -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot \
|
||||||
$(PO_VIM_INPUTLIST)
|
$(PO_VIM_INPUTLIST)
|
||||||
set OLD_PO_FILE_INPUT=yes
|
set OLD_PO_FILE_INPUT=yes
|
||||||
set OLD_PO_FILE_OUTPUT=yes
|
set OLD_PO_FILE_OUTPUT=yes
|
||||||
$(XGETTEXT) --default-domain=$(PACKAGE) --add-comments $(XGETTEXT_KEYWORDS) \
|
$(XGETTEXT) --default-domain=$(PACKAGE) --add-comments $(XGETTEXT_KEYWORDS) \
|
||||||
--files-from=.\files $(PO_VIM_JSLIST)
|
--files-from=.\files $(PO_VIM_JSLIST)
|
||||||
$(MV) $(PACKAGE).po $(PACKAGE).pot
|
$(MV) $(PACKAGE).po $(PACKAGE).pot
|
||||||
$(VIM) -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot \
|
"$(VIM)" -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot \
|
||||||
$(PO_VIM_INPUTLIST)
|
$(PO_VIM_INPUTLIST)
|
||||||
$(RM) *.js
|
$(RM) *.js
|
||||||
|
|
||||||
# When updating ja.sjis.po there are a bunch of errors and a crash.
|
# Only original translations with default encoding should be updated.
|
||||||
# The files that are converted to a different encoding clearly state "DO NOT EDIT".
|
# The files that are converted to a different encoding clearly state "DO NOT EDIT".
|
||||||
update-po: $(MOFILES:.mo=)
|
update-po: $(MOFILES:.mo=)
|
||||||
|
|
||||||
# Don't add a dependency here, we only want to update the .po files manually
|
# Don't add a dependency here, we only want to update the .po files manually
|
||||||
$(LANGUAGES):
|
$(LANGUAGES):
|
||||||
@$(MAKE) -nologo -f Make_mvc.mak $(PACKAGE).pot GETTEXT_PATH="$(GETTEXT_PATH)"
|
@$(MAKE) -nologo -f Make_mvc.mak GETTEXT_PATH="$(GETTEXT_PATH)" $(PACKAGE).pot
|
||||||
$(CP) $@.po $@.po.orig
|
$(CP) $@.po $@.po.orig
|
||||||
$(MV) $@.po $@.po.old
|
$(MV) $@.po $@.po.old
|
||||||
$(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po
|
$(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po
|
||||||
$(RM) $@.po.old
|
$(RM) $@.po.old
|
||||||
|
|
||||||
install: checklanguage $(LANGUAGE).mo
|
install: $(LANGUAGE).mo
|
||||||
if not exist $(INSTALLDIR) $(MKD) $(INSTALLDIR)
|
if not exist $(INSTALLDIR) $(MKD) $(INSTALLDIR)
|
||||||
$(CP) $(LANGUAGE).mo $(INSTALLDIR)\$(PACKAGE).mo
|
$(CP) $(LANGUAGE).mo $(INSTALLDIR)\$(PACKAGE).mo
|
||||||
|
|
||||||
@@ -543,15 +530,16 @@ install-all: all
|
|||||||
for %%l in ($(LANGUAGES)) do @$(CP) %%l.mo \
|
for %%l in ($(LANGUAGES)) do @$(CP) %%l.mo \
|
||||||
$(VIMRUNTIME)\lang\%%l\LC_MESSAGES\$(PACKAGE).mo
|
$(VIMRUNTIME)\lang\%%l\LC_MESSAGES\$(PACKAGE).mo
|
||||||
|
|
||||||
cleanup-po: checklanguage $(LANGUAGE).po
|
cleanup-po: $(LANGUAGE).po
|
||||||
$(VIM) -u NONE -e -X -S cleanup.vim -c wq $(LANGUAGE).po
|
"$(VIM)" -u NONE -e -X -S cleanup.vim -c wq $(LANGUAGE).po
|
||||||
|
|
||||||
cleanup-po-all: $(POFILES)
|
cleanup-po-all: $(POFILES)
|
||||||
!$(VIM) -u NONE -e -X -S cleanup.vim -c wq $**
|
!"$(VIM)" -u NONE -e -X -S cleanup.vim -c wq $**
|
||||||
|
|
||||||
clean: checkclean
|
clean: checkclean
|
||||||
$(RM) *.mo
|
$(RM) *.mo
|
||||||
$(RM) *.pot
|
$(RM) *.pot
|
||||||
|
$(RM) *.orig
|
||||||
$(RM) files
|
$(RM) files
|
||||||
$(RM) sjiscorr.obj sjiscorr.exe
|
$(RM) sjiscorr.obj sjiscorr.exe
|
||||||
# $(RM) big5corr.obj big5corr.exe
|
# $(RM) big5corr.obj big5corr.exe
|
||||||
|
113
src/po/Makefile
113
src/po/Makefile
@@ -26,7 +26,14 @@ MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
|
|||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .po .mo .pot .ck
|
.SUFFIXES: .po .mo .pot .ck
|
||||||
.PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES)
|
.PHONY: all install uninstall prefixcheck originals converted check clean \
|
||||||
|
checkclean distclean update-po $(LANGUAGES)
|
||||||
|
|
||||||
|
all: $(MOFILES) $(MOCONVERTED) $(MSGFMT_DESKTOP)
|
||||||
|
|
||||||
|
originals: $(MOFILES)
|
||||||
|
|
||||||
|
converted: $(MOCONVERTED)
|
||||||
|
|
||||||
.po.mo:
|
.po.mo:
|
||||||
$(MSGFMTCMD) -o $@ $<
|
$(MSGFMTCMD) -o $@ $<
|
||||||
@@ -36,8 +43,6 @@ MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
|
|||||||
-c "if error == 0 | q | else | num 2 | cq | endif" $<
|
-c "if error == 0 | q | else | num 2 | cq | endif" $<
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
all: $(MOFILES) $(MOCONVERTED) $(MSGFMT_DESKTOP)
|
|
||||||
|
|
||||||
check: $(CHECKFILES)
|
check: $(CHECKFILES)
|
||||||
|
|
||||||
# installing for real
|
# installing for real
|
||||||
@@ -84,12 +89,10 @@ tryoutinstall: $(MOFILES) $(MOCONVERTED)
|
|||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
converted: $(MOCONVERTED)
|
|
||||||
|
|
||||||
# nl.po was added later, if it does not exist use a file with just a # in it
|
# nl.po was added later, if it does not exist use a file with just a # in it
|
||||||
# (an empty file doesn't work with old msgfmt).
|
# (an empty file doesn't work with old msgfmt).
|
||||||
nl.po:
|
nl.po:
|
||||||
@( echo \# > nl.po )
|
@( echo \# >> nl.po )
|
||||||
|
|
||||||
# Norwegian/Bokmal: "nb" is an alias for "no".
|
# Norwegian/Bokmal: "nb" is an alias for "no".
|
||||||
# Copying the file is not efficient, but I don't know of another way to make
|
# Copying the file is not efficient, but I don't know of another way to make
|
||||||
@@ -102,75 +105,75 @@ nb.po: no.po
|
|||||||
# ja.sjis.po is outdated.
|
# ja.sjis.po is outdated.
|
||||||
ja.sjis.po: ja.po
|
ja.sjis.po: ja.po
|
||||||
@$(MAKE) sjiscorr
|
@$(MAKE) sjiscorr
|
||||||
rm -f ja.sjis.po
|
rm -f $@
|
||||||
iconv -f UTF-8 -t CP932 ja.po | ./sjiscorr > ja.sjis.po
|
iconv -f UTF-8 -t CP932 $< | ./sjiscorr > $@
|
||||||
|
|
||||||
sjiscorr: sjiscorr.c
|
sjiscorr: sjiscorr.c
|
||||||
$(CC) -o sjiscorr sjiscorr.c
|
$(CC) -o sjiscorr sjiscorr.c
|
||||||
|
|
||||||
ja.euc-jp.po: ja.po
|
ja.euc-jp.po: ja.po
|
||||||
iconv -f UTF-8 -t EUC-JP ja.po | \
|
iconv -f UTF-8 -t EUC-JP $< | \
|
||||||
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=EUC-JP/' \
|
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=EUC-JP/' \
|
||||||
-e 's/# Original translations/# Generated from ja.po, DO NOT EDIT/' \
|
-e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
|
||||||
> ja.euc-jp.po
|
> $@
|
||||||
|
|
||||||
# Convert cs.po to create cs.cp1250.po.
|
# Convert cs.po to create cs.cp1250.po.
|
||||||
cs.cp1250.po: cs.po
|
cs.cp1250.po: cs.po
|
||||||
rm -f cs.cp1250.po
|
rm -f $@
|
||||||
iconv -f ISO-8859-2 -t CP1250 cs.po | \
|
iconv -f ISO-8859-2 -t CP1250 $< | \
|
||||||
$(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=CP1250/' \
|
$(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=CP1250/' \
|
||||||
-e 's/# Original translations/# Generated from cs.po, DO NOT EDIT/' \
|
-e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
|
||||||
> cs.cp1250.po
|
> $@
|
||||||
|
|
||||||
# Convert pl.po to create pl.cp1250.po.
|
# Convert pl.po to create pl.cp1250.po.
|
||||||
pl.cp1250.po: pl.po
|
pl.cp1250.po: pl.po
|
||||||
rm -f pl.cp1250.po
|
rm -f $@
|
||||||
iconv -f ISO-8859-2 -t CP1250 pl.po | \
|
iconv -f ISO-8859-2 -t CP1250 $< | \
|
||||||
$(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=CP1250/' \
|
$(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=CP1250/' \
|
||||||
-e 's/# Original translations/# Generated from pl.po, DO NOT EDIT/' \
|
-e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
|
||||||
> pl.cp1250.po
|
> $@
|
||||||
|
|
||||||
# Convert pl.po to create pl.UTF-8.po.
|
# Convert pl.po to create pl.UTF-8.po.
|
||||||
pl.UTF-8.po: pl.po
|
pl.UTF-8.po: pl.po
|
||||||
rm -f pl.UTF-8.po
|
rm -f $@
|
||||||
iconv -f ISO-8859-2 -t UTF-8 pl.po | \
|
iconv -f ISO-8859-2 -t UTF-8 $< | \
|
||||||
$(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=UTF-8/' \
|
$(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=UTF-8/' \
|
||||||
-e 's/# Original translations/# Generated from pl.po, DO NOT EDIT/' \
|
-e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
|
||||||
> pl.UTF-8.po
|
> $@
|
||||||
|
|
||||||
# Convert sk.po to create sk.cp1250.po.
|
# Convert sk.po to create sk.cp1250.po.
|
||||||
sk.cp1250.po: sk.po
|
sk.cp1250.po: sk.po
|
||||||
rm -f sk.cp1250.po
|
rm -f $@
|
||||||
iconv -f ISO-8859-2 -t CP1250 sk.po | \
|
iconv -f ISO-8859-2 -t CP1250 $< | \
|
||||||
$(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=CP1250/' \
|
$(SED) -e 's/charset=[iI][sS][oO]-8859-2/charset=CP1250/' \
|
||||||
-e 's/# Original translations/# Generated from sk.po, DO NOT EDIT/' \
|
-e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
|
||||||
> sk.cp1250.po
|
> $@
|
||||||
|
|
||||||
# Convert zh_CN.UTF-8.po to create zh_CN.po.
|
# Convert zh_CN.UTF-8.po to create zh_CN.po.
|
||||||
zh_CN.po: zh_CN.UTF-8.po
|
zh_CN.po: zh_CN.UTF-8.po
|
||||||
rm -f zh_CN.po
|
rm -f $@
|
||||||
iconv -f UTF-8 -t GB2312 zh_CN.UTF-8.po | \
|
iconv -f UTF-8 -t GB2312 $< | \
|
||||||
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=GB2312/' \
|
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=GB2312/' \
|
||||||
-e 's/# Original translations/# Generated from zh_CN.UTF-8.po, DO NOT EDIT/' \
|
-e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
|
||||||
> zh_CN.po
|
> $@
|
||||||
|
|
||||||
# Convert zh_CN.UTF-8.po to create zh_CN.cp936.po.
|
# Convert zh_CN.UTF-8.po to create zh_CN.cp936.po.
|
||||||
# Set 'charset' to gbk to avoid that msfmt generates a warning.
|
# Set 'charset' to gbk to avoid that msfmt generates a warning.
|
||||||
# This used to convert from zh_CN.po, but that results in a conversion error.
|
# This used to convert from zh_CN.po, but that results in a conversion error.
|
||||||
zh_CN.cp936.po: zh_CN.UTF-8.po
|
zh_CN.cp936.po: zh_CN.UTF-8.po
|
||||||
rm -f zh_CN.cp936.po
|
rm -f $@
|
||||||
iconv -f UTF-8 -t CP936 zh_CN.UTF-8.po | \
|
iconv -f UTF-8 -t CP936 $< | \
|
||||||
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=GBK/' \
|
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=GBK/' \
|
||||||
-e 's/# Original translations/# Generated from zh_CN.UTF-8.po, DO NOT EDIT/' \
|
-e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
|
||||||
> zh_CN.cp936.po
|
> $@
|
||||||
|
|
||||||
# Convert zh_TW.UTF-8.po to create zh_TW.po
|
# Convert zh_TW.UTF-8.po to create zh_TW.po
|
||||||
zh_TW.po: zh_TW.UTF-8.po
|
zh_TW.po: zh_TW.UTF-8.po
|
||||||
rm -f zh_TW.po
|
rm -f $@
|
||||||
iconv -f UTF-8 -t BIG5 zh_TW.UTF-8.po | \
|
iconv -f UTF-8 -t BIG5 $< | \
|
||||||
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=BIG5/' \
|
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=BIG5/' \
|
||||||
-e 's/# Original translations/# Generated from zh_TW.UTF-8.po, DO NOT EDIT/' \
|
-e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
|
||||||
> zh_TW.po
|
> $@
|
||||||
|
|
||||||
|
|
||||||
# Convert zh_TW.UTF-8.po to create zh_TW.po with backslash characters
|
# Convert zh_TW.UTF-8.po to create zh_TW.po with backslash characters
|
||||||
@@ -192,8 +195,8 @@ zh_TW.po: zh_TW.UTF-8.po
|
|||||||
|
|
||||||
#zh_TW.po: zh_TW.UTF-8.po
|
#zh_TW.po: zh_TW.UTF-8.po
|
||||||
# @$(MAKE) big5corr
|
# @$(MAKE) big5corr
|
||||||
# rm -f zh_TW.po
|
# rm -f $@
|
||||||
# iconv -f UTF-8 -t BIG5 zh_TW.UTF-8.po | ./big5corr > zh_TW.po
|
# iconv -f UTF-8 -t BIG5 $< | ./big5corr > $@
|
||||||
|
|
||||||
|
|
||||||
# 06.11.23, added by Restorer
|
# 06.11.23, added by Restorer
|
||||||
@@ -204,32 +207,32 @@ zh_TW.po: zh_TW.UTF-8.po
|
|||||||
|
|
||||||
# Convert ko.UTF-8.po to create ko.po.
|
# Convert ko.UTF-8.po to create ko.po.
|
||||||
ko.po: ko.UTF-8.po
|
ko.po: ko.UTF-8.po
|
||||||
rm -f ko.po
|
rm -f $@
|
||||||
iconv -f UTF-8 -t EUC-KR ko.UTF-8.po | \
|
iconv -f UTF-8 -t EUC-KR $< | \
|
||||||
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=EUC-KR/' \
|
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=EUC-KR/' \
|
||||||
-e 's/# Original translations/# Generated from ko.UTF-8.po, DO NOT EDIT/' \
|
-e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
|
||||||
> ko.po
|
> $@
|
||||||
|
|
||||||
# Convert ru.po to create ru.cp1251.po.
|
# Convert ru.po to create ru.cp1251.po.
|
||||||
ru.cp1251.po: ru.po
|
ru.cp1251.po: ru.po
|
||||||
rm -f ru.cp1251.po
|
rm -f $@
|
||||||
iconv -f UTF-8 -t CP1251 ru.po | \
|
iconv -f UTF-8 -t CP1251 $< | \
|
||||||
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=CP1251/' \
|
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=CP1251/' \
|
||||||
-e 's/# Original translations/# Generated from ru.po, DO NOT EDIT/' \
|
-e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
|
||||||
> ru.cp1251.po
|
> $@
|
||||||
|
|
||||||
# Convert uk.po to create uk.cp1251.po.
|
# Convert uk.po to create uk.cp1251.po.
|
||||||
uk.cp1251.po: uk.po
|
uk.cp1251.po: uk.po
|
||||||
rm -f uk.cp1251.po
|
rm -f $@
|
||||||
iconv -f UTF-8 -t CP1251 uk.po | \
|
iconv -f UTF-8 -t CP1251 $< | \
|
||||||
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=CP1251/' \
|
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=CP1251/' \
|
||||||
-e 's/# Original translations/# Generated from uk.po, DO NOT EDIT/' \
|
-e 's/# Original translations/# Generated from $<, DO NOT EDIT/' \
|
||||||
> uk.cp1251.po
|
> $@
|
||||||
|
|
||||||
prefixcheck:
|
prefixcheck:
|
||||||
@if test "x" = "x$(prefix)"; then \
|
@if test "x" = "x$(prefix)"; then \
|
||||||
echo "******************************************"; \
|
echo "******************************************"; \
|
||||||
echo " please use make from the src directory "; \
|
echo " Please use make from the src directory "; \
|
||||||
echo "******************************************"; \
|
echo "******************************************"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
@@ -283,7 +286,7 @@ gvim.desktop: gvim.desktop.in $(POFILES) vim.desktop
|
|||||||
if command -v desktop-file-validate; then desktop-file-validate tmp_gvim.desktop; fi
|
if command -v desktop-file-validate; then desktop-file-validate tmp_gvim.desktop; fi
|
||||||
mv tmp_gvim.desktop gvim.desktop
|
mv tmp_gvim.desktop gvim.desktop
|
||||||
|
|
||||||
# When updating ja.sjis.po there are a bunch of errors and a crash.
|
# Only original translations with default encoding should be updated.
|
||||||
# The files that are converted to a different encoding clearly state "DO NOT EDIT".
|
# The files that are converted to a different encoding clearly state "DO NOT EDIT".
|
||||||
update-po: $(MOFILES:.mo=)
|
update-po: $(MOFILES:.mo=)
|
||||||
|
|
||||||
|
@@ -53,7 +53,10 @@ CREATING A NEW PO FILE
|
|||||||
We will use "xx.po" as an example here, replace "xx" with the name of your
|
We will use "xx.po" as an example here, replace "xx" with the name of your
|
||||||
language.
|
language.
|
||||||
|
|
||||||
- Edit Make_all.mak to add xx to LANGUAGES and xx.mo to MOFILES.
|
- Edit Make_all.mak to add xx to LANGUAGES and xx.mo to MOFILES, xx.po to
|
||||||
|
POFILES and xx.ck to CHECKFILES.
|
||||||
|
- If the encoding of the translation text differs from the default UTF-8, add a
|
||||||
|
corresponding entry in MOCONVERTED, specifying the required encoding.
|
||||||
- If you haven't done so already, run ./configure in the top vim directory
|
- If you haven't done so already, run ./configure in the top vim directory
|
||||||
(i.e. go up two directories) and then come back here afterwards.
|
(i.e. go up two directories) and then come back here afterwards.
|
||||||
- Execute these commands:
|
- Execute these commands:
|
||||||
@@ -147,13 +150,13 @@ convert ja.po to EUC-JP (supposed as your system encoding):
|
|||||||
(1) Convert the file encoding:
|
(1) Convert the file encoding:
|
||||||
|
|
||||||
mv ja.po ja.po.orig
|
mv ja.po ja.po.orig
|
||||||
iconv -f utf-8 -t euc-jp ja.po.orig > ja.po
|
iconv -f UTF-8 -t EUC-JP ja.po.orig > ja.po
|
||||||
|
|
||||||
(2) Rewrite charset declaration in the file:
|
(2) Rewrite charset declaration in the file:
|
||||||
|
|
||||||
Open ja.po find this line:
|
Open ja.po find this line:
|
||||||
"Content-Type: text/plain; charset=utf-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
You should change "charset" like this:
|
You should change "charset" like this:
|
||||||
"Content-Type: text/plain; charset=euc-jp\n"
|
"Content-Type: text/plain; charset=EUC-JP\n"
|
||||||
|
|
||||||
There are examples in the Makefile for the conversions already supported.
|
There are examples in the Makefile for the conversions already supported.
|
||||||
|
@@ -20,8 +20,10 @@ The make utility must be run from the po directory.
|
|||||||
First of all you must set the environment variable LANGUAGE to xx, where xx is
|
First of all you must set the environment variable LANGUAGE to xx, where xx is
|
||||||
the name of your language. You can do it from the command line or adding a
|
the name of your language. You can do it from the command line or adding a
|
||||||
line to your autoexec.bat file: set LANGUAGE=xx. You must also add your
|
line to your autoexec.bat file: set LANGUAGE=xx. You must also add your
|
||||||
language to the Make_all.mak file in the lines LANGUAGES, MOFILES, AND
|
language to the Make_all.mak file in the lines LANGUAGES, MOFILES, POFILES,
|
||||||
POFILES.
|
and CHECKFILES. If the encoding of the translation text differs from the
|
||||||
|
default UTF-8, add a corresponding entry in MOCONVERTED, specifying the
|
||||||
|
required encoding.
|
||||||
|
|
||||||
If you don't have a xx.po file, you must create it with the command:
|
If you don't have a xx.po file, you must create it with the command:
|
||||||
|
|
||||||
|
@@ -2,18 +2,19 @@ TRANSLATING VIM MESSAGES
|
|||||||
|
|
||||||
This file explains how to create and maintain po files using a number of
|
This file explains how to create and maintain po files using a number of
|
||||||
GnuWin packages. You will need gettext, libiconv and libexpat. As of
|
GnuWin packages. You will need gettext, libiconv and libexpat. As of
|
||||||
August 2010 the versions known to work are gettext 0.14.4, libiconv 1.9.2-1
|
January 2024 the versions known to work are gettext 0.14.4, libiconv 1.9.2-1
|
||||||
and expat 2.0.1. gettext and libiconv can be found at:
|
and expat 2.5.0. Gettext and libiconv can be found at:
|
||||||
|
|
||||||
http://gnuwin32.sourceforge.net/
|
http://gnuwin32.sourceforge.net/
|
||||||
|
|
||||||
expat can be found at:
|
expat can be found at:
|
||||||
|
|
||||||
http://sourceforge.net/projects/expat/
|
http://sourceforge.net/projects/expat/
|
||||||
|
or
|
||||||
|
https://github.com/libexpat/libexpat
|
||||||
|
|
||||||
expat will install into its own directory. You should copy libexpat.dll into
|
expat will install into its own directory. You should copy libexpat.dll into
|
||||||
the bin directory created from the gettext/libiconv packages.
|
the bin directory created from the gettext/libiconv packages.
|
||||||
|
|
||||||
Or Michele Locati kindly provides precompiled binaries gettext 0.21 and
|
Or Michele Locati kindly provides precompiled binaries gettext 0.21 and
|
||||||
iconv 1.16 for Windows on his site:
|
iconv 1.16 for Windows on his site:
|
||||||
|
|
||||||
@@ -29,10 +30,12 @@ Set the environment variable LANGUAGE to the language code for the language
|
|||||||
you are translating Vim messages to. Language codes are typically two
|
you are translating Vim messages to. Language codes are typically two
|
||||||
characters and you can find a list of them at:
|
characters and you can find a list of them at:
|
||||||
|
|
||||||
http://www.geocities.com/click2speak/languages.html
|
https://www.loc.gov/standards/iso639-2/php/code_list.php
|
||||||
|
https://www.science.co.il/language/Codes.php
|
||||||
|
https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes
|
||||||
|
|
||||||
Another possibility is to use the GnuWin32 port of gettext. This is
|
Another possibility is to use the GnuWin32 port of gettext. This is
|
||||||
recommended especially if you use already gnuwin32 tools to gunzip, bunzip,
|
recommended especially if you use already GnuWin32 tools to gunzip, bunzip,
|
||||||
patch etc. these files. You find the GnuWin32 version of gettext here:
|
patch etc. these files. You find the GnuWin32 version of gettext here:
|
||||||
|
|
||||||
http://gnuwin32.sourceforge.net/packages/gettext.htm
|
http://gnuwin32.sourceforge.net/packages/gettext.htm
|
||||||
@@ -47,7 +50,10 @@ build it even successfully with MSVC8.0.
|
|||||||
|
|
||||||
The LANGUAGE environment variable can be set from the command line, by adding
|
The LANGUAGE environment variable can be set from the command line, by adding
|
||||||
a line to your autoexec.bat file, or by defining a user variable from the
|
a line to your autoexec.bat file, or by defining a user variable from the
|
||||||
Advanced tab in the System control panel.
|
Advanced tab in the System control panel. If the LANGUAGE environment
|
||||||
|
variable has not been set in any of the above ways, the value of this variable
|
||||||
|
will be set automatically according to the language used in the OS. This
|
||||||
|
value will be valid until the "nmake.exe" program terminates.
|
||||||
|
|
||||||
Next, edit Make_mvc.mak so that GETTEXT_PATH points the binary directory of
|
Next, edit Make_mvc.mak so that GETTEXT_PATH points the binary directory of
|
||||||
the installation.
|
the installation.
|
||||||
@@ -56,10 +62,13 @@ the installation.
|
|||||||
CREATING A NEW TRANSLATION
|
CREATING A NEW TRANSLATION
|
||||||
|
|
||||||
When creating a new translation you must add your language code to the
|
When creating a new translation you must add your language code to the
|
||||||
Make_all.mak file in the lines defining LANGUAGES and MOFILES. To create the
|
Make_all.mak file in the lines defining LANGUAGES and MOFILES, POFILES and
|
||||||
initial .po file for your language you must use the command:
|
CHECKFILES. If the encoding of the translation text differs from the default
|
||||||
|
UTF-8, add a corresponding entry in MOCONVERTED, specifying the required
|
||||||
|
encoding.
|
||||||
|
To create the initial .po file for your language you must use the command:
|
||||||
|
|
||||||
make -f make_mvc.mak first_time
|
nmake.exe -f Make_mvc.mak first_time
|
||||||
|
|
||||||
Note: You need to be in the po directory when using this makefile.
|
Note: You need to be in the po directory when using this makefile.
|
||||||
|
|
||||||
@@ -82,7 +91,7 @@ If there are new or changed messages in Vim that need translating, then the
|
|||||||
first thing to do is merge them into the existing translations. This is done
|
first thing to do is merge them into the existing translations. This is done
|
||||||
with the following command:
|
with the following command:
|
||||||
|
|
||||||
nmake -f Make_mvc.mak xx.po
|
nmake.exe -f Make_mvc.mak xx
|
||||||
|
|
||||||
where xx is the language code for the language needing translations. The
|
where xx is the language code for the language needing translations. The
|
||||||
original .po file is copied to xx.po.orig.
|
original .po file is copied to xx.po.orig.
|
||||||
@@ -102,23 +111,30 @@ CHECKING THE TRANSLATION
|
|||||||
|
|
||||||
Check the translation with the following command:
|
Check the translation with the following command:
|
||||||
|
|
||||||
nmake -f make_mvc.mak xx.mo
|
nmake.exe -f Make_mvc.mak xx.ck
|
||||||
|
|
||||||
Correct any syntax errors reported. When there are no more errors, the
|
Correct any errors reported. When there are no more errors, the translation
|
||||||
translation is ready to be installed.
|
is ready to be installed.
|
||||||
|
|
||||||
|
|
||||||
INSTALLING THE TRANSLATION
|
INSTALLING THE TRANSLATION
|
||||||
|
|
||||||
Install your translation with the following command:
|
Install your translation with the following command:
|
||||||
|
|
||||||
nmake -f make_mvc.mak install
|
nmake.exe -f Make_mvc.mak install
|
||||||
|
|
||||||
This will create the xx\LC_MESSAGES directory in runtime\lang if it does not
|
This will create the xx\LC_MESSAGES directory in runtime\lang if it does not
|
||||||
already exist.
|
already exist.
|
||||||
You can also use the following command to install all languages:
|
You can also use the following command to install all languages:
|
||||||
|
|
||||||
nmake -f make_mvc.mak install-all
|
nmake.exe -f Make_mvc.mak install-all
|
||||||
|
|
||||||
|
|
||||||
|
AFTER ALL OF THESE STEPS
|
||||||
|
|
||||||
|
Clean the "po" directory of all temporary and unnecessary files. Execute the
|
||||||
|
command:
|
||||||
|
|
||||||
|
nmake.exe -f Make_mvc.mak clean
|
||||||
|
|
||||||
vim:tw=78:
|
vim:tw=78:
|
||||||
|
@@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
44,
|
||||||
/**/
|
/**/
|
||||||
43,
|
43,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user