]> granicus.if.org Git - vim/commitdiff
updated for version 7.1-312 v7.1.312
authorBram Moolenaar <Bram@vim.org>
Mon, 9 Jun 2008 12:46:00 +0000 (12:46 +0000)
committerBram Moolenaar <Bram@vim.org>
Mon, 9 Jun 2008 12:46:00 +0000 (12:46 +0000)
src/po/check.vim
src/version.c

index 50ed9a40f12d3014f23dd21b5ceb57e8d36a62d7..abe999a4f13933df16128d3a813af99083764577 100644 (file)
@@ -1,7 +1,8 @@
 " Vim script for checking .po files.
 "
-" Go through the file and verify that all %...s items in "msgid" are identical
-" to the ones in "msgstr".
+" Go through the file and verify that:
+" - All %...s items in "msgid" are identical to the ones in "msgstr".
+" - An error or warning code in "msgid" matches the one in "msgstr".
 
 if 1   " Only execute this if the eval feature is available.
 
@@ -56,6 +57,20 @@ while 1
   endif
 endwhile
 
+" Check that error code in msgid matches the one in msgstr.
+"
+" Examples of mismatches found with msgid "E123: ..."
+" - msgstr "E321: ..."    error code mismatch
+" - msgstr "W123: ..."    warning instead of error
+" - msgstr "E123 ..."     missing colon
+" - msgstr "..."          missing error code
+"
+1
+if search('msgid "\("\n"\)\?\([EW][0-9]\+:\).*\nmsgstr "\("\n"\)\?[^"]\@=\2\@!') > 0
+  echo 'Mismatching error/warning code in line ' . line('.')
+  let error = 1
+endif
+
 if error == 0
   echo "OK"
 endif
index 045814028bfe876b1ec79c50cbeabc58eaf18dac..5b5705a4cb1b99b56e1c4c2e964a8bfb3f7bcfd2 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    312,
 /**/
     311,
 /**/