view src/po/tojavascript.vim @ 23781:6430ca40fd3b

Added tag v8.2.2431 for changeset 6a4554de992570eea61f23937e23d3d046dc3f3a
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 Jan 2021 19:45:05 +0100
parents 52e970719f4b
children 7296f4ef3ead
line wrap: on
line source

" 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
  g/^\s*"/s/.*//

  " Write as .js file, xgettext recognizes them
  exe 'w! ' .. fnamemodify(name, ":t:r") .. ".js"
endfor

quit