449
|
1 " Vim script to cleanup a .po file:
|
|
2 " - Remove line numbers (avoids that diffs are messy).
|
|
3 " - Comment-out fuzzy and empty messages.
|
|
4 " - Make sure there is a space before the string (required for Solaris).
|
439
|
5 " Requires Vim 6.0 or later (because of multi-line search patterns).
|
658
|
6
|
|
7 " Disable diff mode, because it makes this very slow
|
|
8 let s:was_diff = &diff
|
|
9 setl nodiff
|
|
10
|
557
|
11 silent g/^#: /d
|
|
12 silent g/^#, fuzzy\(, .*\)\=\nmsgid ""\@!/.+1,/^$/-1s/^/#\~ /
|
|
13 silent g/^msgstr"/s//msgstr "/
|
|
14 silent g/^msgid"/s//msgid "/
|
|
15 silent g/^msgstr ""\(\n"\)\@!/?^msgid?,.s/^/#\~ /
|
658
|
16
|
|
17 if s:was_diff
|
|
18 setl diff
|
|
19 endif
|