Merge pull request #85 from gedgeck/non_en_lang_message_fix

Fixed messages for non-english LANG env variables
This commit is contained in:
Idan Arye 2019-04-12 15:52:03 +03:00 committed by GitHub
commit 9bf2984d13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,7 +132,7 @@ function! vebugger#util#listify(stringOrList)
endif endif
endfunction endfunction
" Return the resul of a:command in English, even if language messages set " Return the result of a:command in English, even if language messages set
" others. " others.
function! vebugger#util#EnglishExecute(command) abort function! vebugger#util#EnglishExecute(command) abort
let l:lang = matchstr(execute('language messages'), '"\zs.*\ze"') let l:lang = matchstr(execute('language messages'), '"\zs.*\ze"')
@ -141,7 +141,7 @@ function! vebugger#util#EnglishExecute(command) abort
endif endif
let l:result = execute(a:command) let l:result = execute(a:command)
if l:lang !~ 'en' if l:lang !~ 'en'
language messages l:lang execute("language messages ". l:lang)
endif endif
return l:result return l:result
endfunction endfunction