From 4e93a904413780d2c2da7340f38553ff4bb64ff1 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Tue, 22 Nov 2016 11:24:09 +0000 Subject: [PATCH] Abbreviate the text for 'po' translation files. A typical status line for a 'po' (Portable Object) translation file is: 1152 translated messages, 91 fuzzy translations, 42 untranslated messages. Adding a substitute(), tidies this to: 1152 translated, 91 fuzzy, 42 untranslated which is still informative, but less verbose. --- autoload/airline/extensions/po.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/autoload/airline/extensions/po.vim b/autoload/airline/extensions/po.vim index b452728..fada471 100644 --- a/autoload/airline/extensions/po.vim +++ b/autoload/airline/extensions/po.vim @@ -77,6 +77,7 @@ function! airline#extensions#po#stats() endif try let b:airline_po_stats = '['. split(airline_po_stats, '\n')[0]. ']' + let b:airline_po_stats = substitute(b:airline_po_stats, ' \(message\|translation\)s*\.*', '', 'g') catch let b:airline_po_stats = '' endtry