0
0
mirror of https://github.com/vim/vim.git synced 2025-07-24 10:45:12 -04:00

patch 9.0.1537: message for opening the cmdline window is not translated

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)
This commit is contained in:
Bram Moolenaar 2023-05-10 14:47:50 +01:00
parent 5fc7959dcb
commit 65b34868da
4 changed files with 9 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1537,
/**/
1536,
/**/