translation(cleanup): squeeze successive empty lines and remove stray comments
Commit:
https://github.com/vim/vim/commit/52169dbc285724cf2ba5956426fa08d26c6f4672
Author: Eisuke Kawashima <
e-k...@users.noreply.github.com>
Date: Tue Mar 31 19:12:36 2026 +0000
translation(cleanup): squeeze successive empty lines and remove stray comments
closes:
https://github.com/vim/vim/issues/19860
Signed-off-by: Eisuke Kawashima <
e-k...@users.noreply.github.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/po/cleanup.vim b/src/po/cleanup.vim
index 5e1b96799..b5b207e1e 100644
--- a/src/po/cleanup.vim
+++ b/src/po/cleanup.vim
@@ -22,11 +22,14 @@ silent g/^msgstr"/s//msgstr "/
silent g/^msgid"/s//msgid "/
silent g/^msgstr ""\(
"\)\@!/?^msgid?,.s/^/#\~ /
+" remove stray comment
+silent g/^\%(#.*
\)\+
/d
+
" Comments only useful for the translator
silent g/^#\./d _
" clean up empty lines
-silent g/^
/.d _
+silent g/^
/.d _
silent! %s/
\+\%$//
if s:was_diff