]> granicus.if.org Git - vim/commitdiff
patch 8.0.0830: translating messages is not ideal v8.0.0830
authorBram Moolenaar <Bram@vim.org>
Tue, 1 Aug 2017 15:40:23 +0000 (17:40 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 1 Aug 2017 15:40:23 +0000 (17:40 +0200)
Problem:    Translating messages is not ideal.
Solution:   Add a remark about obsolete messages.  Use msgfmt in the check
            script. (Christian Brabandt)

src/po/README.txt
src/po/check.vim
src/version.c

index a403a2f23b83b3f54f7454a3a925520f32a8589e..8efed9651de690c1fe26c0a582cb42ae36098906 100644 (file)
@@ -84,7 +84,13 @@ language.
     You should include your name and E-mail address instead, for example:
        msgstr "Berichten übersetzt bei: John Doe <john@doe.org>"
 
-(3) Clean up
+(3) Remove unused messages (optional)
+    Remove messages that have been marked as obsolete. 
+    Such messages start with "#~".
+
+    The cleanup script will also do that (see next step).
+
+(4) Clean up
     This is very important to make sure the translation works on all systems.
     Comment-out all non-translated strings.  There are two types:
     - items marked with "#, fuzzy"
index 3bcbef395e5bd9c06df7a477f1990d6a5f07868e..41df8f88a1d6a255c5539c40ffa0fecb2bd80079 100644 (file)
@@ -143,6 +143,16 @@ while 1
   endif
 endwhile
 
+" Check that the file is well formed according to msgfmts understanding
+if executable("msgfmt")
+  let filename = expand("%")
+  let a = system("msgfmt --statistics OLD_PO_FILE_INPUT=yes" . filename)
+  if v:shell_error != 0
+    let error = matchstr(a, filename.':\zs\d\+\ze:')+0
+    for line in split(a, '\n') | echomsg line | endfor
+  endif
+endif
+
 if error == 0
   " If all was OK restore the view.
   call winrestview(wsv)
index cd8a4cfa1e413812f8942b053a52875843bbfab4..02d43b6c86c67edb6f6df47437243260b5bd85ac 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    830,
 /**/
     829,
 /**/