check.vim: Further improve po message checks
Commit:
https://github.com/vim/vim/commit/96dab9c9b1a1046a4f30ed0aed5686136d52ed19
Author: Antonio Giovanni Colombo <[email protected]>
Date: Wed Aug 6 11:33:49 2025 +0200
check.vim: Further improve po message checks
Signed-off-by: Antonio Giovanni Colombo <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/po/check.vim b/src/po/check.vim
old mode 100644
new mode 100755
index ee3e3700b..8ecf05a56
--- a/src/po/check.vim
+++ b/src/po/check.vim
@@ -4,9 +4,9 @@
" and verify various congruences
" See the comments in the code
-" Last Update: 2025 Jul 22
+" Last Update: 2025 Aug 06
-if 1" Only execute this if the eval feature is available.
+if 1 " Only execute this if the eval feature is available.
" Using line continuation (set cpo to vim default value)
let s:save_cpo = &cpo
@@ -71,7 +71,7 @@ while 1
" for each "msgid"
" check msgid "Text;editor;"
- " translation must have two ";" as well
+ " translation must have two or more ";" (in case of more categories)
let lnum = line('.')
if getline(lnum) =~ 'msgid "Text;.*;"'
if getline(lnum + 1) !~ '^msgstr "\([^;]\+;\)\+"$'
@@ -188,7 +188,7 @@ while 1
endwhile
" Check that the eventual continuation of 'msgstr' is well formed
-" final '""', '
"', ' "' are OK
+" final '""', '
"', ' "' '/"' '."' '-"' are OK
" Beware, it can give false positives if the message is split
" in the middle of a word
1
@@ -210,19 +210,28 @@ while 1
while ilnum < end - 1
let iltype = 0
if getline( ilnum ) =~ "^msgid_plural"
- let iltype = 99
+ let iltype = 2
endif
if getline( ilnum ) =~ "^msgstr["
- let iltype = 98
+ let iltype = 2
endif
if getline( ilnum ) =~ "\"\""
let iltype = 1
endif
if getline( ilnum ) =~ " \"$"
- let iltype = 2
+ let iltype = 1
+ endif
+ if getline( ilnum ) =~ "-\"$"
+ let iltype = 1
+ endif
+ if getline( ilnum ) =~ "/\"$"
+ let iltype = 1
+ endif
+ if getline( ilnum ) =~ "\.\"$"
+ let iltype = 1
endif
if getline( ilnum ) =~ "\\n\"$"
- let iltype = 3
+ let iltype = 1
endif
if iltype == 0
echomsg 'Possibly incorrect final at line: ' . ilnum
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1ujahl-00FiDK-33%40256bit.org.