annotate src/po/cleanup.vim @ 7139:d1e35ca56c73 v7.4.881

commit https://github.com/vim/vim/commit/0a777ab9890ba0e8dd57f082e98fde1adab36aa0 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 25 17:56:50 2015 +0200 patch 7.4.881 Problem: Test 49 fails. Solution: Add line number to check of call stack.
author Christian Brabandt <cb@256bit.org>
date Fri, 25 Sep 2015 18:00:05 +0200
parents 903088c7a7c6
children 325a1dbf662d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
449
3709cf52b9b5 updated for version 7.0119
vimboss
parents: 439
diff changeset
1 " Vim script to cleanup a .po file:
3709cf52b9b5 updated for version 7.0119
vimboss
parents: 439
diff changeset
2 " - Remove line numbers (avoids that diffs are messy).
3709cf52b9b5 updated for version 7.0119
vimboss
parents: 439
diff changeset
3 " - Comment-out fuzzy and empty messages.
3709cf52b9b5 updated for version 7.0119
vimboss
parents: 439
diff changeset
4 " - Make sure there is a space before the string (required for Solaris).
439
8d2b705a5a51 updated for version 7.0113
vimboss
parents: 7
diff changeset
5 " Requires Vim 6.0 or later (because of multi-line search patterns).
658
903088c7a7c6 updated for version 7.0193
vimboss
parents: 640
diff changeset
6
903088c7a7c6 updated for version 7.0193
vimboss
parents: 640
diff changeset
7 " Disable diff mode, because it makes this very slow
903088c7a7c6 updated for version 7.0193
vimboss
parents: 640
diff changeset
8 let s:was_diff = &diff
903088c7a7c6 updated for version 7.0193
vimboss
parents: 640
diff changeset
9 setl nodiff
903088c7a7c6 updated for version 7.0193
vimboss
parents: 640
diff changeset
10
557
862863033fdd updated for version 7.0158
vimboss
parents: 449
diff changeset
11 silent g/^#: /d
862863033fdd updated for version 7.0158
vimboss
parents: 449
diff changeset
12 silent g/^#, fuzzy\(, .*\)\=\nmsgid ""\@!/.+1,/^$/-1s/^/#\~ /
862863033fdd updated for version 7.0158
vimboss
parents: 449
diff changeset
13 silent g/^msgstr"/s//msgstr "/
862863033fdd updated for version 7.0158
vimboss
parents: 449
diff changeset
14 silent g/^msgid"/s//msgid "/
862863033fdd updated for version 7.0158
vimboss
parents: 449
diff changeset
15 silent g/^msgstr ""\(\n"\)\@!/?^msgid?,.s/^/#\~ /
658
903088c7a7c6 updated for version 7.0193
vimboss
parents: 640
diff changeset
16
903088c7a7c6 updated for version 7.0193
vimboss
parents: 640
diff changeset
17 if s:was_diff
903088c7a7c6 updated for version 7.0193
vimboss
parents: 640
diff changeset
18 setl diff
903088c7a7c6 updated for version 7.0193
vimboss
parents: 640
diff changeset
19 endif