translation(cleanup): squeeze successive empty lines and remove stray comments

closes: #19860

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Eisuke Kawashima
2026-03-31 19:12:36 +00:00
committed by Christian Brabandt
parent 75661a66a1
commit 52169dbc28
+4 -1
View 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