vim-patch:511eb84: runtime(po): remove poDiffOld/New, add po-format flags to syntax file

fixes: vim/vim#16120
closes: vim/vim#16132

511eb84c08

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
This commit is contained in:
Christian Clason 2024-11-28 19:00:21 +01:00 committed by Christian Clason
parent b1c907f219
commit e74316bf48

View File

@ -1,10 +1,11 @@
" Vim syntax file " Vim syntax file
" Language: po (gettext) " Language: po (gettext)
" Maintainer: Dwayne Bailey <dwayne@translate.org.za> " Maintainer: Dwayne Bailey <dwayne@translate.org.za>
" Last Change: 2015 Jun 07 " Last Change: 2024 Nov 28
" Contributors: Dwayne Bailey (Most advanced syntax highlighting) " Contributors: Dwayne Bailey (Most advanced syntax highlighting)
" Leonardo Fontenelle (Spell checking) " Leonardo Fontenelle (Spell checking)
" Nam SungHyun <namsh@kldp.org> (Original maintainer) " Nam SungHyun <namsh@kldp.org> (Original maintainer)
" Eisuke Kawashima (add format-flags: #16132)
" quit when a syntax file was already loaded " quit when a syntax file was already loaded
if exists("b:current_syntax") if exists("b:current_syntax")
@ -45,13 +46,43 @@ syn match poCopyrightUnset "SOME DESCRIPTIVE TITLE\|FIRST AUTHOR <EMAIL@ADDR
" Translation comment block including: translator comment, automatic comments, flags and locations " Translation comment block including: translator comment, automatic comments, flags and locations
syn match poComment "^#.*$" syn match poComment "^#.*$"
syn keyword poFlagFuzzy fuzzy contained syn keyword poFlagFuzzy fuzzy contained
syn match poFlagFormat /\<\%(no-\)\?awk-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?boost-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?c++-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?c-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?csharp-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?elisp-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?gcc-internal-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?gfc-internal-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?java-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?java-printf-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?javascript-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?kde-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?librep-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?lisp-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?lua-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?objc-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?object-pascal-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?perl-brace-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?perl-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?php-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?python-brace-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?python-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?qt-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?qt-plural-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?ruby-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?scheme-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?sh-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?smalltalk-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?tcl-format\>/ contained
syn match poFlagFormat /\<\%(no-\)\?ycp-format\>/ contained
syn match poCommentTranslator "^# .*$" contains=poCopyrightUnset syn match poCommentTranslator "^# .*$" contains=poCopyrightUnset
syn match poCommentAutomatic "^#\..*$" syn match poCommentAutomatic "^#\..*$"
syn match poCommentSources "^#:.*$" syn match poCommentSources "^#:.*$"
syn match poCommentFlags "^#,.*$" contains=poFlagFuzzy syn match poCommentFlags "^#,.*$" contains=poFlagFuzzy,poFlagFormat
syn match poDiffOld '\(^#| "[^{]*+}\|{+[^}]*+}\|{+[^}]*\|"$\)' contained syn match poCommentPrevious "^#|.*$"
syn match poDiffNew '\(^#| "[^{]*-}\|{-[^}]*-}\|{-[^}]*\|"$\)' contained
syn match poCommentDiff "^#|.*$" contains=poDiffOld,poDiffNew
" Translations (also includes header fields as they appear in a translation msgstr) " Translations (also includes header fields as they appear in a translation msgstr)
syn region poCommentKDE start=+"_: +ms=s+1 end="\\n" end="\"\n^msgstr"me=s-1 contained syn region poCommentKDE start=+"_: +ms=s+1 end="\\n" end="\"\n^msgstr"me=s-1 contained
@ -86,11 +117,10 @@ hi def link poComment Comment
hi def link poCommentAutomatic Comment hi def link poCommentAutomatic Comment
hi def link poCommentTranslator Comment hi def link poCommentTranslator Comment
hi def link poCommentFlags Special hi def link poCommentFlags Special
hi def link poCommentDiff Comment hi def link poCommentPrevious Comment
hi def link poCopyrightUnset Todo hi def link poCopyrightUnset Todo
hi def link poFlagFuzzy Todo hi def link poFlagFuzzy Todo
hi def link poDiffOld Todo hi def link poFlagFormat Todo
hi def link poDiffNew Special
hi def link poObsolete Comment hi def link poObsolete Comment
hi def link poStatementMsgid Statement hi def link poStatementMsgid Statement