Blob Blame History Raw
To: vim-dev@vim.org
Subject: Patch 7.1.312
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 7.1.312
Problem:    The .po files have mistakes in error numbers.
Solution:   Search for these mistakes in the check script. (Dominique Pelle)
Files:	    src/po/check.vim


*** ../vim-7.1.311/src/po/check.vim	Wed Nov 23 22:10:37 2005
--- src/po/check.vim	Sun May 25 13:47:59 2008
***************
*** 1,7 ****
  " 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".
  
  if 1	" Only execute this if the eval feature is available.
  
--- 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".
! " - An error or warning code in "msgid" matches the one in "msgstr".
  
  if 1	" Only execute this if the eval feature is available.
  
***************
*** 56,61 ****
--- 57,76 ----
    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
*** ../vim-7.1.311/src/version.c	Wed Jun  4 21:34:51 2008
--- src/version.c	Mon Jun  9 14:43:59 2008
***************
*** 668,669 ****
--- 673,676 ----
  {   /* Add new patch number below this line */
+ /**/
+     312,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
24. You realize there is not a sound in the house and you have no idea where
    your children are.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///