summaryrefslogtreecommitdiff
path: root/src/po/cleanup.vim
blob: 313f1595cd5ed5070d3ed36a0856c83ded542efd (plain)
1
2
3
4
5
6
7
8
9
10
" Vim script to cleanup a .po file:
" - Remove line numbers (avoids that diffs are messy).
" - Comment-out fuzzy and empty messages.
" - Make sure there is a space before the string (required for Solaris).
" Requires Vim 6.0 or later (because of multi-line search patterns).
g/^#: /d
g/^#, fuzzy\(, .*\)\=\nmsgid ""\@!/.+1,/^$/-1s/^/#\~ /
g/^msgstr"/s//msgstr "/
g/^msgid"/s//msgid "/
g/^msgstr ""\(\n"\)\@!/?^msgid?,.s/^/#\~ /