blob: 7868570be75b188450e33d6cfb0b522f60b6aad1 [file] [log] [blame]
Bram Moolenaar0b39c3f2020-08-30 15:52:10 +02001" Invoked with the name "vim.pot" and a list of Vim script names.
2" Converts them to a .js file, stripping comments, so that xgettext works.
3" Javascript is used because, like Vim, it accepts both single and double
4" quoted strings.
5
6set shortmess+=A
7
8for name in argv()[1:]
9 exe 'edit ' .. fnameescape(name)
10
11 " Strip comments
12 g/^\s*"/s/.*//
13
14 " Write as .js file, xgettext recognizes them
15 exe 'w! ' .. fnamemodify(name, ":t:r") .. ".js"
16endfor
17
18quit