]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
translation(cleanup): squeeze successive empty lines and remove stray comments
authorEisuke Kawashima <e-kwsm@users.noreply.github.com>
Tue, 31 Mar 2026 19:12:36 +0000 (19:12 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 31 Mar 2026 19:12:36 +0000 (19:12 +0000)
closes: #19860

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/po/cleanup.vim

index 5e1b96799c5a1049572c5ac7f25d68fdebb67f55..b5b207e1e20e2c716fc86f8b6edd852e4e83bac9 100644 (file)
@@ -22,11 +22,14 @@ silent g/^msgstr"/s//msgstr "/
 silent g/^msgid"/s//msgid "/
 silent g/^msgstr ""\(\n"\)\@!/?^msgid?,.s/^/#\~ /
 
+" remove stray comment
+silent g/^\%(#.*\n\)\+\n/d
+
 " Comments only useful for the translator
 silent g/^#\./d _
 
 " clean up empty lines
-silent g/^\n\n\n/.d _
+silent g/^\n\n/.d _
 silent! %s/\n\+\%$//
 
 if s:was_diff