diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:05:15 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:05:15 +0000 |
commit | 6e9cd6b491267e6dff3e3f3f37d8af5f28e40672 (patch) | |
tree | 35661af16c4a0ef2a9a8e225d2d5cc82605ea289 /src/po/tojavascript.vim | |
parent | Adding upstream version 2:9.1.0496. (diff) | |
download | vim-6e9cd6b491267e6dff3e3f3f37d8af5f28e40672.tar.xz vim-6e9cd6b491267e6dff3e3f3f37d8af5f28e40672.zip |
Adding upstream version 2:9.1.0698.upstream/2%9.1.0698
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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 |