Skip to content

Commit aaef1ba

Browse files
committed
patch 8.0.0830: translating messages is not ideal
Problem: Translating messages is not ideal. Solution: Add a remark about obsolete messages. Use msgfmt in the check script. (Christian Brabandt)
1 parent 7da3460 commit aaef1ba

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

src/po/README.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,13 @@ language.
8484
You should include your name and E-mail address instead, for example:
8585
msgstr "Berichten �bersetzt bei: John Doe <[email protected]>"
8686

87-
(3) Clean up
87+
(3) Remove unused messages (optional)
88+
Remove messages that have been marked as obsolete.
89+
Such messages start with "#~".
90+
91+
The cleanup script will also do that (see next step).
92+
93+
(4) Clean up
8894
This is very important to make sure the translation works on all systems.
8995
Comment-out all non-translated strings. There are two types:
9096
- items marked with "#, fuzzy"

src/po/check.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,16 @@ while 1
143143
endif
144144
endwhile
145145

146+
" Check that the file is well formed according to msgfmts understanding
147+
if executable("msgfmt")
148+
let filename = expand("%")
149+
let a = system("msgfmt --statistics OLD_PO_FILE_INPUT=yes" . filename)
150+
if v:shell_error != 0
151+
let error = matchstr(a, filename.':\zs\d\+\ze:')+0
152+
for line in split(a, '\n') | echomsg line | endfor
153+
endif
154+
endif
155+
146156
if error == 0
147157
" If all was OK restore the view.
148158
call winrestview(wsv)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,8 @@ static char *(features[]) =
769769

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
830,
772774
/**/
773775
829,
774776
/**/

0 commit comments

Comments
 (0)