summaryrefslogtreecommitdiff
path: root/src/po/check.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/po/check.vim')
-rw-r--r--src/po/check.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/po/check.vim b/src/po/check.vim
index 3bcbef395..41df8f88a 100644
--- a/src/po/check.vim
+++ b/src/po/check.vim
@@ -143,6 +143,16 @@ while 1
endif
endwhile
+" Check that the file is well formed according to msgfmts understanding
+if executable("msgfmt")
+ let filename = expand("%")
+ let a = system("msgfmt --statistics OLD_PO_FILE_INPUT=yes" . filename)
+ if v:shell_error != 0
+ let error = matchstr(a, filename.':\zs\d\+\ze:')+0
+ for line in split(a, '\n') | echomsg line | endfor
+ endif
+endif
+
if error == 0
" If all was OK restore the view.
call winrestview(wsv)