view src/po/tojavascript.vim @ 22683:5cbcd3768125 v8.2.1890

patch 8.2.1890: Vim9: strange error for subtracting from a list Commit: https://github.com/vim/vim/commit/081db1a66d17e46ac3b03b7514f11a004a35009a Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 22 20:09:43 2020 +0200 patch 8.2.1890: Vim9: strange error for subtracting from a list Problem: Vim9: strange error for subtracting from a list. Solution: Check getting a number, not a string. (closes https://github.com/vim/vim/issues/7167)
author Bram Moolenaar <Bram@vim.org>
date Thu, 22 Oct 2020 20:15: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