diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-07-23 19:34:41 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-07-23 19:35:11 -0400 |
commit | 7c7701af1279996c999507750d4beb79ee0f03e0 (patch) | |
tree | 151282ad1791cd6b018df5869454ea223a66f4cf | |
parent | 57c095d5fc155bb29077f9fa2fb8e55b93b7f005 (diff) | |
download | rneovim-7c7701af1279996c999507750d4beb79ee0f03e0.tar.gz rneovim-7c7701af1279996c999507750d4beb79ee0f03e0.tar.bz2 rneovim-7c7701af1279996c999507750d4beb79ee0f03e0.zip |
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)
https://github.com/vim/vim/commit/d1d037e90192ab64e4cec00b9d008b33bc69d979
-rw-r--r-- | src/nvim/po/check.vim | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/nvim/po/check.vim b/src/nvim/po/check.vim index a441a3fee2..eae27ef74d 100644 --- a/src/nvim/po/check.vim +++ b/src/nvim/po/check.vim @@ -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 |