vim-patch:52169db: translation(cleanup): squeeze successive empty lines and remove stray comments

closes: vim/vim#19860

52169dbc28

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
This commit is contained in:
zeertzjq
2026-04-01 07:02:10 +08:00
parent 9b9c72f6d4
commit 0860b24c2c

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