annotate src/po/cleanup.vim @ 32927:49d43532787f v9.0.1771

patch 9.0.1771: regex: combining chars in collections not handled Commit: https://github.com/vim/vim/commit/ca22fc36a4e8a315f199893ee8ff6253573f5fbe Author: Christian Brabandt <cb@256bit.org> Date: Sun Aug 20 20:34:22 2023 +0200 patch 9.0.1771: regex: combining chars in collections not handled Problem: regex: combining chars in collections not handled Solution: Check for following combining characters for NFA and BT engine closes: #10459 closes: #10286 Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 20 Aug 2023 20:45:04 +0200
parents 1e9e9d89f0ee
children 0c60c61e8fed
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
11686
325a1dbf662d patch 8.0.0726: translations cleanup script is too conservative
Christian Brabandt <cb@256bit.org>
parents: 658
diff changeset
11 " untranslated message preceded by c-format or comment
325a1dbf662d patch 8.0.0726: translations cleanup script is too conservative
Christian Brabandt <cb@256bit.org>
parents: 658
diff changeset
12 silent g/^#, c-format\n#/.d
325a1dbf662d patch 8.0.0726: translations cleanup script is too conservative
Christian Brabandt <cb@256bit.org>
parents: 658
diff changeset
13 silent g/^#\..*\n#/.d
325a1dbf662d patch 8.0.0726: translations cleanup script is too conservative
Christian Brabandt <cb@256bit.org>
parents: 658
diff changeset
14
29087
f3ec3c57e070 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 27772
diff changeset
15 " c-format comments have no effect, the check.vim scripts checks it.
29104
c58baa6d6dda Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29087
diff changeset
16 " But they might still be useful?
c58baa6d6dda Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29087
diff changeset
17 " silent g/^#, c-format$/d
29087
f3ec3c57e070 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 27772
diff changeset
18
11686
325a1dbf662d patch 8.0.0726: translations cleanup script is too conservative
Christian Brabandt <cb@256bit.org>
parents: 658
diff changeset
19 silent g/^#[:~] /d
557
862863033fdd updated for version 7.0158
vimboss
parents: 449
diff changeset
20 silent g/^#, fuzzy\(, .*\)\=\nmsgid ""\@!/.+1,/^$/-1s/^/#\~ /
862863033fdd updated for version 7.0158
vimboss
parents: 449
diff changeset
21 silent g/^msgstr"/s//msgstr "/
862863033fdd updated for version 7.0158
vimboss
parents: 449
diff changeset
22 silent g/^msgid"/s//msgid "/
862863033fdd updated for version 7.0158
vimboss
parents: 449
diff changeset
23 silent g/^msgstr ""\(\n"\)\@!/?^msgid?,.s/^/#\~ /
658
903088c7a7c6 updated for version 7.0193
vimboss
parents: 640
diff changeset
24
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29104
diff changeset
25 " Comments only useful for the translator
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29104
diff changeset
26 silent g/^#\. /d
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29104
diff changeset
27
27772
5d26e9a7f8f2 patch 8.2.4412: translation cleanup script does not remove empty lines at end
Bram Moolenaar <Bram@vim.org>
parents: 11686
diff changeset
28 " clean up empty lines
11686
325a1dbf662d patch 8.0.0726: translations cleanup script is too conservative
Christian Brabandt <cb@256bit.org>
parents: 658
diff changeset
29 silent g/^\n\n\n/.d
27772
5d26e9a7f8f2 patch 8.2.4412: translation cleanup script does not remove empty lines at end
Bram Moolenaar <Bram@vim.org>
parents: 11686
diff changeset
30 silent! %s/\n\+\%$//
11686
325a1dbf662d patch 8.0.0726: translations cleanup script is too conservative
Christian Brabandt <cb@256bit.org>
parents: 658
diff changeset
31
658
903088c7a7c6 updated for version 7.0193
vimboss
parents: 640
diff changeset
32 if s:was_diff
903088c7a7c6 updated for version 7.0193
vimboss
parents: 640
diff changeset
33 setl diff
903088c7a7c6 updated for version 7.0193
vimboss
parents: 640
diff changeset
34 endif