forked from aniani/vim
patch 9.0.2130: some errors with translation Makefiles
Problem: some errors with translation Makefiles Solution: fix issues Update src/po/ makefiles after 9.0.2127 * Change how to check `%LANGUAGE%`. Check it only when needed. * Add double quotes to where `GETTEXT_PATH` is used. Before 9.0.2127, this worked: `nmake -f Make_mvc.mak GETTEXT_PATH="\"C:\Program Files\Git\usr\bin\""` (which was a bit tricky.) 9.0.2127 broke this and syntax error occurred. This doesn't work either in 9.0.2127: `nmake -f Make_mvc.mak GETTEXT_PATH="C:\Program Files\Git\usr\bin"` With this Commit, this works: `nmake -f Make_mvc.mak GETTEXT_PATH="C:\Program Files\Git\usr\bin"` * Better error report for the `check` target. Show the line number of the error. (Imported from vim-jp/lang-ja.) closes: #13567 Signed-off-by: Ken Takata <kentkt@csc.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
a555069b7d
commit
075ad70474
@@ -10,10 +10,6 @@
|
|||||||
!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
|
|
||||||
!ERROR Set the environment variable %LANGUAGE%. See README_mvc.txt
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# get LANGUAGES, MOFILES, MOCONVERTED and others
|
# get LANGUAGES, MOFILES, MOCONVERTED and others
|
||||||
!INCLUDE Make_all.mak
|
!INCLUDE Make_all.mak
|
||||||
|
|
||||||
@@ -22,15 +18,16 @@ 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 installed.
|
||||||
VIM = ..\vim
|
VIM = ..\vim
|
||||||
|
|
||||||
# Correct the following line for the directory where gettext et al is installed
|
# Correct the following line for the directory where gettext et al is
|
||||||
|
# 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" -v
|
||||||
XGETTEXT = $(GETTEXT_PATH)\xgettext
|
XGETTEXT = "$(GETTEXT_PATH)\xgettext"
|
||||||
MSGMERGE = $(GETTEXT_PATH)\msgmerge
|
MSGMERGE = "$(GETTEXT_PATH)\msgmerge"
|
||||||
|
|
||||||
# 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.
|
||||||
@@ -47,9 +44,9 @@ ICONV="$(GETTEXT_PATH)\iconv.exe"
|
|||||||
# If the "touch" program is installed on the system, but it is not registered
|
# If the "touch" program is installed on the system, but it is not registered
|
||||||
# in the %PATH% environment variable, then specify the full path to this file.
|
# in the %PATH% environment variable, then specify the full path to this file.
|
||||||
!IF EXIST ("touch.exe")
|
!IF EXIST ("touch.exe")
|
||||||
TOUCH = touch.exe $@
|
TOUCH_TARGET = touch.exe $@
|
||||||
!ELSE
|
!ELSE
|
||||||
TOUCH = @if exist $@ ( copy /b $@+,, ) else ( type nul >$@ )
|
TOUCH_TARGET = @if exist $@ ( copy /b $@+,, ) else ( type nul >$@ )
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
MV = move /y
|
MV = move /y
|
||||||
@@ -68,8 +65,9 @@ INSTALLDIR = $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES
|
|||||||
all: $(MOFILES) $(MOCONVERTED)
|
all: $(MOFILES) $(MOCONVERTED)
|
||||||
|
|
||||||
.po.ck:
|
.po.ck:
|
||||||
$(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $<
|
$(VIM) -u NONE --noplugins -e -s -X --cmd "set enc=utf-8" -S check.vim \
|
||||||
$(TOUCH)
|
-c "if error == 0 | q | else | num 2 | cq | endif" $<
|
||||||
|
$(TOUCH_TARGET)
|
||||||
|
|
||||||
check: $(CHECKFILES)
|
check: $(CHECKFILES)
|
||||||
|
|
||||||
@@ -78,6 +76,9 @@ checkclean:
|
|||||||
|
|
||||||
converted: $(MOCONVERTED)
|
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 )
|
||||||
|
|
||||||
@@ -497,7 +498,7 @@ PO_INPUTLIST = \
|
|||||||
files: $(PO_INPUTLIST)
|
files: $(PO_INPUTLIST)
|
||||||
$(LS) $(LSFLAGS) $(PO_INPUTLIST) > .\files
|
$(LS) $(LSFLAGS) $(PO_INPUTLIST) > .\files
|
||||||
|
|
||||||
first_time: files
|
first_time: checklanguage 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
|
||||||
@@ -526,13 +527,13 @@ 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 $(PACKAGE).pot GETTEXT_PATH="$(GETTEXT_PATH)"
|
||||||
$(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: $(LANGUAGE).mo
|
install: checklanguage $(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
|
||||||
|
|
||||||
@@ -542,8 +543,8 @@ 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: $(LANGUAGE).po
|
cleanup-po: checklanguage $(LANGUAGE).po
|
||||||
$(VIM) -u NONE -e -X -S cleanup.vim -c wq $**
|
$(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 $**
|
||||||
|
@@ -32,7 +32,8 @@ MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
|
|||||||
$(MSGFMTCMD) -o $@ $<
|
$(MSGFMTCMD) -o $@ $<
|
||||||
|
|
||||||
.po.ck:
|
.po.ck:
|
||||||
$(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $<
|
$(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" $<
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
all: $(MOFILES) $(MOCONVERTED) $(MSGFMT_DESKTOP)
|
all: $(MOFILES) $(MOCONVERTED) $(MSGFMT_DESKTOP)
|
||||||
|
@@ -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 */
|
||||||
|
/**/
|
||||||
|
2130,
|
||||||
/**/
|
/**/
|
||||||
2129,
|
2129,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user