From ce0ef910df837b9b961f007a0a35064cad85188b Mon Sep 17 00:00:00 2001 From: Christ van Willegen Date: Thu, 20 Jun 2024 23:41:59 +0200 Subject: patch 9.1.0509: not possible to translate Vim script messages Problem: not possible to translate Vim script messages (RestorerZ) Solution: implement bindtextdomain() and gettext() to support Vim script message translations (Christ van Willegen) fixes: #11637 closes: #12447 Signed-off-by: Christ van Willegen Signed-off-by: Christian Brabandt --- src/po/Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/po/Makefile') diff --git a/src/po/Makefile b/src/po/Makefile index cc4008fa37..87d657bd90 100644 --- a/src/po/Makefile +++ b/src/po/Makefile @@ -1,17 +1,18 @@ # Makefile for the Vim message translations. +PO_BASEDIR = . # Include stuff found by configure. -include ../auto/config.mk +include $(PO_BASEDIR)/../auto/config.mk # Get LANGUAGES, MOFILES, MOCONVERTED and others. -include Make_all.mak +include $(PO_BASEDIR)/Make_all.mak # Note: ja.sjis, *.cp1250 and zh_CN.cp936 are only for MS-Windows, they are # not installed on Unix. PACKAGE = vim SHELL = /bin/sh -VIM = ../vim +VIM = $(PO_BASEDIR)/../vim # MacOS sed is locale aware, set $LANG to avoid problems. SED = LANG=C sed @@ -261,13 +262,13 @@ PO_INPUTLIST = \ $(PACKAGE).pot: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST) # Convert the Vim scripts to (what looks like) Javascript. - $(VIM) -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST) + $(VIM) -u NONE --not-a-term -S $(PO_BASEDIR)/tojavascript.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST) # Create vim.pot. $(XGETTEXT) --default-domain=$(PACKAGE) --add-comments \ $(XGETTEXT_KEYWORDS) $(PO_INPUTLIST) $(PO_VIM_JSLIST) mv -f $(PACKAGE).po $(PACKAGE).pot # Fix Vim scripts names, so that "gf" works. - $(VIM) -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST) + $(VIM) -u NONE --not-a-term -S $(PO_BASEDIR)/fixfilenames.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST) # Delete the temporary files. rm *.js -- cgit v1.2.3