annotate src/po/fixfilenames.vim @ 21989:52e970719f4b v8.2.1544

patch 8.2.1544: cannot translate messages in a Vim script Commit: https://github.com/vim/vim/commit/0b39c3fd4c5d1c8ebd2efa85fced7df5e17efd3b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 30 15:52:10 2020 +0200 patch 8.2.1544: cannot translate messages in a Vim script Problem: Cannot translate messages in a Vim script. Solution: Add gettext(). Try it out for a few messages in the options window.
author Bram Moolenaar <Bram@vim.org>
date Sun, 30 Aug 2020 16:00:04 +0200
parents
children aa91480771fe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
21989
52e970719f4b patch 8.2.1544: cannot translate messages in a Vim script
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Invoked with the name "vim.pot" and a list of Vim script names.
52e970719f4b patch 8.2.1544: cannot translate messages in a Vim script
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Converts them to a .js file, stripping comments, so that xgettext works.
52e970719f4b patch 8.2.1544: cannot translate messages in a Vim script
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3
52e970719f4b patch 8.2.1544: cannot translate messages in a Vim script
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 set shortmess+=A
52e970719f4b patch 8.2.1544: cannot translate messages in a Vim script
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5
52e970719f4b patch 8.2.1544: cannot translate messages in a Vim script
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 for name in argv()[1:]
52e970719f4b patch 8.2.1544: cannot translate messages in a Vim script
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 let jsname = fnamemodify(name, ":t:r") .. ".js"
52e970719f4b patch 8.2.1544: cannot translate messages in a Vim script
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 exe "%s+" .. jsname .. "+" .. name .. "+"
52e970719f4b patch 8.2.1544: cannot translate messages in a Vim script
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 endfor
52e970719f4b patch 8.2.1544: cannot translate messages in a Vim script
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10
52e970719f4b patch 8.2.1544: cannot translate messages in a Vim script
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 write
52e970719f4b patch 8.2.1544: cannot translate messages in a Vim script
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 last
52e970719f4b patch 8.2.1544: cannot translate messages in a Vim script
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 quit