aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/po/check.vim25
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