diff options
Diffstat (limited to 'src/po/tojavascript.vim')
-rw-r--r-- | src/po/tojavascript.vim | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/po/tojavascript.vim b/src/po/tojavascript.vim index 8b0dd73..4671a47 100644 --- a/src/po/tojavascript.vim +++ b/src/po/tojavascript.vim @@ -5,15 +5,20 @@ set shortmess+=A -for name in argv()[1:] - exe 'edit ' .. fnameescape(name) +let s:namenum = 0 +let s:fls = [] +for s:name in argv()[1:] + exe 'edit ' .. fnameescape(s:name) " Strip comments, also after :set commands. g/^\s*"/s/.*// g/^\s*set .*"/s/.*// " Write as .js file, xgettext recognizes them - exe 'w! ' .. fnamemodify(name, ":t:r") .. ".js" + let s:fl = fnamemodify(s:name, ":t:r") .. s:namenum .. ".js" + exe 'w! ' .. s:fl + call add(s:fls, s:fl) + let s:namenum += 1 endfor - +call writefile(s:fls, "vim_to_js") quit |