diff src/po/Make_cyg.mak @ 22071:aa91480771fe v8.2.1585

patch 8.2.1585: messages in globals.h not translated Commit: https://github.com/vim/vim/commit/fa57335e532e505ce9229ddb2354a593fb057561 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 4 13:53:00 2020 +0200 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)
author Bram Moolenaar <Bram@vim.org>
date Fri, 04 Sep 2020 14:00:04 +0200
parents a36fb263c35e
children 2fc568b082ef
line wrap: on
line diff
--- a/src/po/Make_cyg.mak
+++ b/src/po/Make_cyg.mak
@@ -16,6 +16,7 @@ endif
 include Make_all.mak
 
 PACKAGE = vim
+VIM = ../vim
 
 # Uncomment one of the lines below or modify it to put the path to your
 # gettext binaries
@@ -44,21 +45,48 @@ MKD = mkdir -p
 
 .SUFFIXES:
 .SUFFIXES: .po .mo .pot
-.PHONY: first_time all install clean $(LANGUAGES)
+.PHONY: first_time all install install-all clean $(LANGUAGES)
 
 .po.mo:
 	$(MSGFMT) -o $@ $<
 
 all: $(MOFILES) $(MOCONVERTED)
 
-first_time:
-	$(XGETTEXT) --default-domain=$(LANGUAGE) \
-		--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
+PO_INPUTLIST = \
+	$(wildcard ../*.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
 
-$(LANGUAGES):
+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) \
-		--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
+	$(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
 	$(MV) $@.po $@.po.old
 	$(MSGMERGE) $@.po.old $(PACKAGE).pot -o $@.po
@@ -75,5 +103,3 @@ install-all: install
 clean:
 	$(RM) *.mo
 	$(RM) *.pot
-
-