view src/po/tojavascript.vim @ 22101:0ee66f232839 v8.2.1600

patch 8.2.1600: Vim9: cannot use "true" with deepcopy() Commit: https://github.com/vim/vim/commit/44b4a246b62e0622550b963bcf3034dce3bcfc0c Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 5 17:18:28 2020 +0200 patch 8.2.1600: Vim9: cannot use "true" with deepcopy() Problem: Vim9: cannot use "true" with deepcopy(). Solution: Use tv_get_bool_chk(). (closes https://github.com/vim/vim/issues/6867)
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Sep 2020 17:30:03 +0200
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