diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-05-10 14:47:50 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-05-10 14:47:50 +0100 |
commit | 65b34868dac4bdc99e1144e36d5315b569795fc4 (patch) | |
tree | ce76c54c66c9bdf13492e66f3cba2f2f09901962 | |
parent | 5fc7959dcbc43ddf2e9a2a06c547a5c10804e3d1 (diff) |
patch 9.0.1537: message for opening the cmdline window is not translatedv9.0.1537
Problem: Message for opening the cmdline window is not translated.
Solution: Add gettext() and scan the defaults script for text to be
translated. (closes #12371)
-rw-r--r-- | runtime/defaults.vim | 2 | ||||
-rw-r--r-- | src/po/Makefile | 6 | ||||
-rw-r--r-- | src/po/tojavascript.vim | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 9 insertions, 4 deletions
diff --git a/runtime/defaults.vim b/runtime/defaults.vim index f1d5cd1edf..f449c6e1e9 100644 --- a/runtime/defaults.vim +++ b/runtime/defaults.vim @@ -120,7 +120,7 @@ if 1 au! autocmd CmdwinEnter * \ echohl Todo | - \ echo 'You discovered the command-line window! You can close it with ":q".' | + \ echo gettext('You discovered the command-line window! You can close it with ":q".') | \ echohl None augroup END diff --git a/src/po/Makefile b/src/po/Makefile index 9dfbc34e74..fbe474b949 100644 --- a/src/po/Makefile +++ b/src/po/Makefile @@ -204,10 +204,12 @@ PO_INPUTLIST = \ vim.desktop.in PO_VIM_INPUTLIST = \ - ../../runtime/optwin.vim + ../../runtime/optwin.vim \ + ../../runtime/defaults.vim PO_VIM_JSLIST = \ - optwin.js + optwin.js \ + defaults.js $(PACKAGE).pot: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST) # Convert the Vim scripts to (what looks like) Javascript diff --git a/src/po/tojavascript.vim b/src/po/tojavascript.vim index 7868570be7..8b0dd736d5 100644 --- a/src/po/tojavascript.vim +++ b/src/po/tojavascript.vim @@ -8,8 +8,9 @@ set shortmess+=A for name in argv()[1:] exe 'edit ' .. fnameescape(name) - " Strip comments + " Strip comments, also after :set commands. g/^\s*"/s/.*// + g/^\s*set .*"/s/.*// " Write as .js file, xgettext recognizes them exe 'w! ' .. fnamemodify(name, ":t:r") .. ".js" diff --git a/src/version.c b/src/version.c index c8daf71c8c..3a7dcb8278 100644 --- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1537, +/**/ 1536, /**/ 1535, |