From 52169dbc285724cf2ba5956426fa08d26c6f4672 Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Tue, 31 Mar 2026 19:12:36 +0000 Subject: [PATCH] translation(cleanup): squeeze successive empty lines and remove stray comments closes: #19860 Signed-off-by: Eisuke Kawashima Signed-off-by: Christian Brabandt --- src/po/cleanup.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/po/cleanup.vim b/src/po/cleanup.vim index 5e1b96799c..b5b207e1e2 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 ""\(\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