summaryrefslogtreecommitdiff
path: root/src/po/cleanup.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/po/cleanup.vim')
-rw-r--r--src/po/cleanup.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/po/cleanup.vim b/src/po/cleanup.vim
new file mode 100644
index 000000000..cb697e8b1
--- /dev/null
+++ b/src/po/cleanup.vim
@@ -0,0 +1,7 @@
+" Vim script to cleanup a .po file: comment-out fuzzy and empty messages.
+" Make sure there is a space before the string (required for Solaris).
+" Requires Vim 6.0 (because of multi-line search patterns).
+g/^#, fuzzy\(, .*\)\=\nmsgid ""\@!/.+1,/^$/-1s/^/#\~ /
+g/^msgstr"/s//msgstr "/
+g/^msgid"/s//msgid "/
+g/^msgstr ""\(\n"\)\@!/?^msgid?,.s/^/#\~ /