mirror of
https://github.com/vim/vim.git
synced 2025-10-08 06:04:08 -04:00
patch 8.2.1585: messages in globals.h not translated
Problem: Messages in globals.h not translated, xgettext on MS-Windows not fully supported. Solution: Add globals.h to list of input files. Update MS-Windows makefiles to improve message translations. (Ken Takata, closes #6858)
This commit is contained in:
@@ -16,6 +16,7 @@ endif
|
|||||||
include Make_all.mak
|
include Make_all.mak
|
||||||
|
|
||||||
PACKAGE = vim
|
PACKAGE = vim
|
||||||
|
VIM = ../vim
|
||||||
|
|
||||||
# Uncomment one of the lines below or modify it to put the path to your
|
# Uncomment one of the lines below or modify it to put the path to your
|
||||||
# gettext binaries
|
# gettext binaries
|
||||||
@@ -44,21 +45,48 @@ MKD = mkdir -p
|
|||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .po .mo .pot
|
.SUFFIXES: .po .mo .pot
|
||||||
.PHONY: first_time all install clean $(LANGUAGES)
|
.PHONY: first_time all install install-all clean $(LANGUAGES)
|
||||||
|
|
||||||
.po.mo:
|
.po.mo:
|
||||||
$(MSGFMT) -o $@ $<
|
$(MSGFMT) -o $@ $<
|
||||||
|
|
||||||
all: $(MOFILES) $(MOCONVERTED)
|
all: $(MOFILES) $(MOCONVERTED)
|
||||||
|
|
||||||
first_time:
|
PO_INPUTLIST = \
|
||||||
$(XGETTEXT) --default-domain=$(LANGUAGE) \
|
$(wildcard ../*.c) \
|
||||||
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(wildcard ../*.c) ../if_perl.xs ../GvimExt/gvimext.cpp $(wildcard ../globals.h) ../if_py_both.h ../vim.h
|
../if_perl.xs \
|
||||||
|
../GvimExt/gvimext.cpp \
|
||||||
|
../errors.h \
|
||||||
|
../globals.h \
|
||||||
|
../if_py_both.h \
|
||||||
|
../vim.h \
|
||||||
|
gvim.desktop.in \
|
||||||
|
vim.desktop.in
|
||||||
|
|
||||||
$(LANGUAGES):
|
PO_VIM_INPUTLIST = \
|
||||||
|
../../runtime/optwin.vim
|
||||||
|
|
||||||
|
PO_VIM_JSLIST = \
|
||||||
|
optwin.js
|
||||||
|
|
||||||
|
first_time: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST)
|
||||||
|
$(VIM) -u NONE --not-a-term -S tojavascript.vim $(LANGUAGE).pot $(PO_VIM_INPUTLIST)
|
||||||
|
$(XGETTEXT) --default-domain=$(LANGUAGE) \
|
||||||
|
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(PO_INPUTLIST) $(PO_VIM_JSLIST)
|
||||||
|
$(VIM) -u NONE --not-a-term -S fixfilenames.vim $(LANGUAGE).pot $(PO_VIM_INPUTLIST)
|
||||||
|
$(RM) *.js
|
||||||
|
|
||||||
|
$(PACKAGE).pot: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST)
|
||||||
|
$(VIM) -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST)
|
||||||
$(XGETTEXT) --default-domain=$(PACKAGE) \
|
$(XGETTEXT) --default-domain=$(PACKAGE) \
|
||||||
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(wildcard ../*.c) ../if_perl.xs ../GvimExt/gvimext.cpp $(wildcard ../globals.h) ../if_py_both.h ../vim.h
|
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(PO_INPUTLIST) $(PO_VIM_JSLIST)
|
||||||
$(MV) $(PACKAGE).po $(PACKAGE).pot
|
$(MV) $(PACKAGE).po $(PACKAGE).pot
|
||||||
|
$(VIM) -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST)
|
||||||
|
$(RM) *.js
|
||||||
|
|
||||||
|
# Don't add a dependency here, we only want to update the .po files manually
|
||||||
|
$(LANGUAGES):
|
||||||
|
@$(MAKE) -f Make_cyg.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
|
||||||
@@ -75,5 +103,3 @@ install-all: install
|
|||||||
clean:
|
clean:
|
||||||
$(RM) *.mo
|
$(RM) *.mo
|
||||||
$(RM) *.pot
|
$(RM) *.pot
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,6 +22,11 @@ endif
|
|||||||
include Make_all.mak
|
include Make_all.mak
|
||||||
|
|
||||||
PACKAGE = vim
|
PACKAGE = vim
|
||||||
|
ifeq (sh.exe, $(SHELL))
|
||||||
|
VIM = ..\vim
|
||||||
|
else
|
||||||
|
VIM = ../vim
|
||||||
|
endif
|
||||||
|
|
||||||
# Uncomment one of the lines below or modify it to put the path to your
|
# Uncomment one of the lines below or modify it to put the path to your
|
||||||
# gettex binaries; I use the first
|
# gettex binaries; I use the first
|
||||||
@@ -53,21 +58,48 @@ endif
|
|||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .po .mo .pot
|
.SUFFIXES: .po .mo .pot
|
||||||
.PHONY: first_time all install clean $(LANGUAGES)
|
.PHONY: first_time all install install-all clean $(LANGUAGES)
|
||||||
|
|
||||||
.po.mo:
|
.po.mo:
|
||||||
$(MSGFMT) -o $@ $<
|
$(MSGFMT) -o $@ $<
|
||||||
|
|
||||||
all: $(MOFILES) $(MOCONVERTED)
|
all: $(MOFILES) $(MOCONVERTED)
|
||||||
|
|
||||||
first_time:
|
PO_INPUTLIST = \
|
||||||
$(XGETTEXT) --default-domain=$(LANGUAGE) \
|
$(wildcard ../*.c) \
|
||||||
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(wildcard ../*.c) ../if_perl.xs ../GvimExt/gvimext.cpp $(wildcard ../globals.h) ../if_py_both.h ../vim.h
|
../if_perl.xs \
|
||||||
|
../GvimExt/gvimext.cpp \
|
||||||
|
../errors.h \
|
||||||
|
../globals.h \
|
||||||
|
../if_py_both.h \
|
||||||
|
../vim.h \
|
||||||
|
gvim.desktop.in \
|
||||||
|
vim.desktop.in
|
||||||
|
|
||||||
$(LANGUAGES):
|
PO_VIM_INPUTLIST = \
|
||||||
|
../../runtime/optwin.vim
|
||||||
|
|
||||||
|
PO_VIM_JSLIST = \
|
||||||
|
optwin.js
|
||||||
|
|
||||||
|
first_time: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST)
|
||||||
|
$(VIM) -u NONE --not-a-term -S tojavascript.vim $(LANGUAGE).pot $(PO_VIM_INPUTLIST)
|
||||||
|
$(XGETTEXT) --default-domain=$(LANGUAGE) \
|
||||||
|
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(PO_INPUTLIST) $(PO_VIM_JSLIST)
|
||||||
|
$(VIM) -u NONE --not-a-term -S fixfilenames.vim $(LANGUAGE).pot $(PO_VIM_INPUTLIST)
|
||||||
|
$(RM) *.js
|
||||||
|
|
||||||
|
$(PACKAGE).pot: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST)
|
||||||
|
$(VIM) -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST)
|
||||||
$(XGETTEXT) --default-domain=$(PACKAGE) \
|
$(XGETTEXT) --default-domain=$(PACKAGE) \
|
||||||
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(wildcard ../*.c) ../if_perl.xs ../GvimExt/gvimext.cpp $(wildcard ../globals.h) ../if_py_both.h ../vim.h
|
--add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(PO_INPUTLIST) $(PO_VIM_JSLIST)
|
||||||
$(MV) $(PACKAGE).po $(PACKAGE).pot
|
$(MV) $(PACKAGE).po $(PACKAGE).pot
|
||||||
|
$(VIM) -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST)
|
||||||
|
$(RM) *.js
|
||||||
|
|
||||||
|
# Don't add a dependency here, we only want to update the .po files manually
|
||||||
|
$(LANGUAGES):
|
||||||
|
@$(MAKE) -f Make_ming.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
|
||||||
@@ -94,5 +126,3 @@ endif
|
|||||||
clean:
|
clean:
|
||||||
$(RM) *.mo
|
$(RM) *.mo
|
||||||
$(RM) *.pot
|
$(RM) *.pot
|
||||||
|
|
||||||
|
|
||||||
|
@@ -14,6 +14,7 @@ VIMRUNTIME = ..\..\runtime
|
|||||||
!include Make_all.mak
|
!include Make_all.mak
|
||||||
|
|
||||||
PACKAGE = vim
|
PACKAGE = 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
|
||||||
GETTEXT_PATH = H:\gettext.0.14.4\bin
|
GETTEXT_PATH = H:\gettext.0.14.4\bin
|
||||||
@@ -41,19 +42,47 @@ INSTALLDIR = $(VIMRUNTIME)\lang\$(LANGUAGE)\LC_MESSAGES
|
|||||||
|
|
||||||
all: $(MOFILES) $(MOCONVERTED)
|
all: $(MOFILES) $(MOCONVERTED)
|
||||||
|
|
||||||
files:
|
PO_INPUTLIST = \
|
||||||
$(LS) $(LSFLAGS) ..\*.c ..\if_perl.xs ..\GvimExt\gvimext.cpp ..\globals.h ..\if_py_both.h ..\vim.h > .\files
|
..\*.c \
|
||||||
|
..\if_perl.xs \
|
||||||
|
..\GvimExt\gvimext.cpp \
|
||||||
|
..\errors.h \
|
||||||
|
..\globals.h \
|
||||||
|
..\if_py_both.h \
|
||||||
|
..\vim.h \
|
||||||
|
gvim.desktop.in \
|
||||||
|
vim.desktop.in
|
||||||
|
|
||||||
|
PO_VIM_INPUTLIST = \
|
||||||
|
..\..\runtime\optwin.vim
|
||||||
|
|
||||||
|
PO_VIM_JSLIST = \
|
||||||
|
optwin.js
|
||||||
|
|
||||||
|
files: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST)
|
||||||
|
$(LS) $(LSFLAGS) $(PO_INPUTLIST) > .\files
|
||||||
|
echo $(PO_VIM_JSLIST)>> .\files
|
||||||
|
|
||||||
first_time: files
|
first_time: files
|
||||||
|
$(VIM) -u NONE --not-a-term -S tojavascript.vim $(LANGUAGE).pot $(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 --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 --files-from=.\files
|
$(XGETTEXT) --default-domain=$(LANGUAGE) --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 --files-from=.\files
|
||||||
|
$(VIM) -u NONE --not-a-term -S fixfilenames.vim $(LANGUAGE).pot $(PO_VIM_INPUTLIST)
|
||||||
|
$(RM) *.js
|
||||||
|
|
||||||
$(LANGUAGES): files
|
$(PACKAGE).pot: files
|
||||||
|
$(VIM) -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot $(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 --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 --files-from=.\files
|
$(XGETTEXT) --default-domain=$(PACKAGE) --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 --files-from=.\files
|
||||||
$(MV) $(PACKAGE).po $(PACKAGE).pot
|
$(MV) $(PACKAGE).po $(PACKAGE).pot
|
||||||
|
$(VIM) -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST)
|
||||||
|
$(RM) *.js
|
||||||
|
|
||||||
|
# Don't add a dependency here, we only want to update the .po files manually
|
||||||
|
$(LANGUAGES):
|
||||||
|
@$(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
|
||||||
@@ -70,3 +99,4 @@ install-all: all
|
|||||||
clean:
|
clean:
|
||||||
$(RM) *.mo
|
$(RM) *.mo
|
||||||
$(RM) *.pot
|
$(RM) *.pot
|
||||||
|
$(RM) files
|
||||||
|
@@ -181,6 +181,7 @@ PO_INPUTLIST = \
|
|||||||
../*.c \
|
../*.c \
|
||||||
../if_perl.xs \
|
../if_perl.xs \
|
||||||
../GvimExt/gvimext.cpp \
|
../GvimExt/gvimext.cpp \
|
||||||
|
../errors.h \
|
||||||
../globals.h \
|
../globals.h \
|
||||||
../if_py_both.h \
|
../if_py_both.h \
|
||||||
../vim.h \
|
../vim.h \
|
||||||
|
@@ -5,7 +5,7 @@ set shortmess+=A
|
|||||||
|
|
||||||
for name in argv()[1:]
|
for name in argv()[1:]
|
||||||
let jsname = fnamemodify(name, ":t:r") .. ".js"
|
let jsname = fnamemodify(name, ":t:r") .. ".js"
|
||||||
exe "%s+" .. jsname .. "+" .. name .. "+"
|
exe "%s+" .. jsname .. "+" .. substitute(name, '\\', '/', 'g') .. "+"
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
write
|
write
|
||||||
|
@@ -754,6 +754,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 */
|
||||||
|
/**/
|
||||||
|
1585,
|
||||||
/**/
|
/**/
|
||||||
1584,
|
1584,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user