forked from aniani/vim
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)
20 lines
509 B
VimL
20 lines
509 B
VimL
" Invoked with the name "vim.pot" and a list of Vim script names.
|
|
" Converts them to a .js file, stripping comments, so that xgettext works.
|
|
" Javascript is used because, like Vim, it accepts both single and double
|
|
" quoted strings.
|
|
|
|
set shortmess+=A
|
|
|
|
for name in argv()[1:]
|
|
exe 'edit ' .. fnameescape(name)
|
|
|
|
" 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"
|
|
endfor
|
|
|
|
quit
|