summaryrefslogtreecommitdiffstats
path: root/src/po
diff options
context:
space:
mode:
Diffstat (limited to 'src/po')
-rw-r--r--src/po/Make_all.mak4
-rw-r--r--src/po/Makefile11
-rw-r--r--src/po/fixfilenames.vim2
-rw-r--r--src/po/tojavascript.vim2
4 files changed, 10 insertions, 9 deletions
diff --git a/src/po/Make_all.mak b/src/po/Make_all.mak
index ac1122863d..c3e6459164 100644
--- a/src/po/Make_all.mak
+++ b/src/po/Make_all.mak
@@ -189,8 +189,8 @@ PO_VIM_INPUTLIST = \
../../runtime/defaults.vim
PO_VIM_JSLIST = \
- optwin.js \
- defaults.js
+ ________runtime__optwin.js \
+ ________runtime__defaults.js
# Arguments for xgettext to pick up messages to translate from the source code.
XGETTEXT_KEYWORDS = --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 --keyword=PLURAL_MSG:2,4
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
diff --git a/src/po/fixfilenames.vim b/src/po/fixfilenames.vim
index 04bc0791c0..c92839e556 100644
--- a/src/po/fixfilenames.vim
+++ b/src/po/fixfilenames.vim
@@ -4,7 +4,7 @@
set shortmess+=A
for name in argv()[1:]
- let jsname = fnamemodify(name, ":t:r") .. ".js"
+ let jsname = fnamemodify(name, ":r:gs?\\~?_?:gs?\\.?_?:gs?/?__?:gs?\\?__?") .. ".js"
exe "%s+" .. jsname .. "+" .. substitute(name, '\\', '/', 'g') .. "+"
endfor
diff --git a/src/po/tojavascript.vim b/src/po/tojavascript.vim
index 8b0dd736d5..32eea9b875 100644
--- a/src/po/tojavascript.vim
+++ b/src/po/tojavascript.vim
@@ -13,7 +13,7 @@ for name in argv()[1:]
g/^\s*set .*"/s/.*//
" Write as .js file, xgettext recognizes them
- exe 'w! ' .. fnamemodify(name, ":t:r") .. ".js"
+ exe 'w! ' .. fnamemodify(name, ":r:gs?\\~?_?:gs?\\.?_?:gs?/?__?:gs?\\?__?") .. ".js"
endfor
quit