Mercurial > vim
comparison src/po/check.vim @ 14187:b79453d0d01c v8.1.0111
patch 8.1.0111: .po files do not use recommended names
commit https://github.com/vim/vim/commit/d1d037e90192ab64e4cec00b9d008b33bc69d979
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 24 18:04:50 2018 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 24 Jun 2018 18:15:05 +0200 |
parents | b9db0bc9b8f9 |
children | 57927799c27e |
comparison
equal
deleted
inserted
replaced
14186:d66b07a9c03d | 14187:b79453d0d01c |
---|---|
171 endif | 171 endif |
172 elseif !plural && search('^"Plural-Forms: ', 'n') | 172 elseif !plural && search('^"Plural-Forms: ', 'n') |
173 " We allow for a stray plural header, msginit adds one. | 173 " We allow for a stray plural header, msginit adds one. |
174 endif | 174 endif |
175 | 175 |
176 " Check that 8bit encoding is used instead of 8-bit | |
177 let cte = search('^"Content-Transfer-Encoding:\s\+8-bit', 'n') | |
178 let ctc = search('^"Content-Type:.*;\s\+\<charset=[iI][sS][oO]_', 'n') | |
179 let ctu = search('^"Content-Type:.*;\s\+\<charset=utf-8', 'n') | |
180 if cte | |
181 echomsg "Content-Transfer-Encoding should be 8bit instead of 8-bit" | |
182 " TODO: make this an error | |
183 " if error == 0 | |
184 " let error = cte | |
185 " endif | |
186 elseif ctc | |
187 echomsg "Content-Type charset should be 'ISO-...' instead of 'ISO_...'" | |
188 " TODO: make this an error | |
189 " if error == 0 | |
190 " let error = ct | |
191 " endif | |
192 elseif ctu | |
193 echomsg "Content-Type charset should be 'UTF-8' instead of 'utf-8'" | |
194 " TODO: make this an error | |
195 " if error == 0 | |
196 " let error = ct | |
197 " endif | |
198 endif | |
199 | |
176 | 200 |
177 if error == 0 | 201 if error == 0 |
178 " If all was OK restore the view. | 202 " If all was OK restore the view. |
179 call winrestview(wsv) | 203 call winrestview(wsv) |
180 echomsg "OK" | 204 echomsg "OK" |
181 else | 205 else |
206 " Put the cursor on the line with the error. | |
182 exe error | 207 exe error |
183 endif | 208 endif |
184 | 209 |
185 let &wrapscan = s:save_wrapscan | 210 let &wrapscan = s:save_wrapscan |
186 unlet s:save_wrapscan | 211 unlet s:save_wrapscan |