nano/syntax/po.nanorc
Benno Schulenberg 227467adb9 syntaxes: remove some superfluous outer parentheses from regexes
Also, standardize some comments, condense a few regexes, add some
word-edge anchors, and remove some superfluous backslashes.
2020-04-21 12:49:29 +02:00

30 lines
957 B
Plaintext

## Syntax highlighting for PO files.
syntax po "\.pot?$"
comment "#"
# Comments.
color green "^#.*$"
color yellow "Copyright|\(C\)"
# Header fields.
color brightred "^\"X-Bugs:.*\"$"
color brightmagenta "\<(Project-Id-Version|Report-Msgid-Bugs-To|Last-Translator|Language(-Team)?|X-Bugs|X-Generator|Plural-Forms)\>"
color cyan "\<(POT-Creation-Date|PO-Revision-Date|MIME-Version|Content-Type|Content-Transfer-Encoding)\>"
# Encodings and numbers.
color yellow "\<(UTF|ISO|Windows|Mac|IBM)-[0-9]+"
color yellow "\<((pre|rc)?[0-9]+|[0-9]bit)\>"
# Msgids.
color brightblue "^(msgid|msgid_plural|msgstr)\>"
# Tags.
color red " fuzzy(,|$)"
color yellow " (no-)?[-[:alpha:]]+-format(,|$)"
# Format specifiers.
color brightmagenta "%([1-9]\$)?[a-z]*"
# Quotes and escaped characters.
color yellow "\""
color cyan "\\([abcefnrtv"\]|x[0-9abcdefABCDEF]{2}|[0-7]{3})"
# Reminders.
color brightwhite,yellow "\<(FIXME|TODO|XXX)\>"
# Obsolete strings.
color red "#~.*"