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.
This commit is contained in:
Richard Russon 2016-11-22 11:24:09 +00:00
parent c02d774b05
commit 4e93a90441

View File

@ -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