aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/po/check.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/po/check.vim b/src/nvim/po/check.vim
index ba5cad6c3e..2350e00e9a 100644
--- a/src/nvim/po/check.vim
+++ b/src/nvim/po/check.vim
@@ -146,6 +146,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)