1
0
forked from aniani/vim
Files
vim/src/po/tojavascript.vim
Bram Moolenaar 65b34868da 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)
2023-05-10 14:47:50 +01:00

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