summaryrefslogtreecommitdiffstats
path: root/src/po/fixfilenames.vim
blob: c92839e55643325bd8a04a865fcfe3b70c136bd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
" 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.

set shortmess+=A

for name in argv()[1:]
  let jsname = fnamemodify(name, ":r:gs?\\~?_?:gs?\\.?_?:gs?/?__?:gs?\\?__?") .. ".js"
  exe "%s+" .. jsname .. "+" .. substitute(name, '\\', '/', 'g') .. "+"
endfor

write
last
quit