view src/po/tojavascript.vim @ 30894:bf4f25d50fdd v9.0.0781

patch 9.0.0781: workaround to rename "small" to "smallfont" is clumsy Commit: https://github.com/vim/vim/commit/e6a16e9950111adfcfdb85261b3d5a8c13f1d533 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Oct 17 14:51:36 2022 +0100 patch 9.0.0781: workaround to rename "small" to "smallfont" is clumsy Problem: Workaround to rename "small" to "smallfont" is clumsy. Solution: Undefine "small" after including windows.h. (Ken Takata)
author Bram Moolenaar <Bram@vim.org>
date Mon, 17 Oct 2022 16:00:04 +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