mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
vim-patch:8.1.0111: .po files do not use recommended names
Problem: .po files do not use recommended names.
Solution: Give a warning if the recommended name is not used. Accept the
recommended name for conversion. (Christian Brabandt, Ken Takata)
d1d037e901
This commit is contained in:
parent
57c095d5fc
commit
7c7701af12
@ -173,12 +173,37 @@ elseif !plural && search('^"Plural-Forms: ', 'n')
|
||||
" We allow for a stray plural header, msginit adds one.
|
||||
endif
|
||||
|
||||
" Check that 8bit encoding is used instead of 8-bit
|
||||
let cte = search('^"Content-Transfer-Encoding:\s\+8-bit', 'n')
|
||||
let ctc = search('^"Content-Type:.*;\s\+\<charset=[iI][sS][oO]_', 'n')
|
||||
let ctu = search('^"Content-Type:.*;\s\+\<charset=utf-8', 'n')
|
||||
if cte
|
||||
echomsg "Content-Transfer-Encoding should be 8bit instead of 8-bit"
|
||||
" TODO: make this an error
|
||||
" if error == 0
|
||||
" let error = cte
|
||||
" endif
|
||||
elseif ctc
|
||||
echomsg "Content-Type charset should be 'ISO-...' instead of 'ISO_...'"
|
||||
" TODO: make this an error
|
||||
" if error == 0
|
||||
" let error = ct
|
||||
" endif
|
||||
elseif ctu
|
||||
echomsg "Content-Type charset should be 'UTF-8' instead of 'utf-8'"
|
||||
" TODO: make this an error
|
||||
" if error == 0
|
||||
" let error = ct
|
||||
" endif
|
||||
endif
|
||||
|
||||
|
||||
if error == 0
|
||||
" If all was OK restore the view.
|
||||
call winrestview(wsv)
|
||||
echomsg "OK"
|
||||
else
|
||||
" Put the cursor on the line with the error.
|
||||
exe error
|
||||
endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user