{ "name": "Gettext", "scopeName": "source.po", "patterns": [ { "begin": "^(?=(msgid(_plural)?|msgctxt)\\s*\"[^\"])|^\\s*$", "end": "\\z", "patterns": [ { "include": "#body" } ] }, { "include": "#comments" }, { "name": "comment.line.number-sign.po", "match": "^msg(id|str)\\s+\"\"\\s*$\\n?" }, { "name": "meta.header.po", "match": "^\"(?:([^\\s:]+)(:)\\s+)?([^\"]*)\"\\s*$\\n?", "captures": { "1": { "name": "constant.language.po" }, "2": { "name": "punctuation.separator.key-value.po" }, "3": { "name": "string.other.po" } } } ], "repository": { "body": { "patterns": [ { "name": "meta.scope.msgid.po", "begin": "^(msgid(_plural)?)\\s+", "end": "^(?!\")", "patterns": [ { "name": "string.quoted.double.po", "begin": "(\\G|^)\"", "end": "\"", "patterns": [ { "name": "constant.character.escape.po", "match": "\\\\[\\\\\"]" } ] } ], "beginCaptures": { "1": { "name": "keyword.control.msgid.po" } } }, { "name": "meta.scope.msgstr.po", "begin": "^(msgstr)(?:(\\[)(\\d+)(\\]))?\\s+", "end": "^(?!\")", "patterns": [ { "name": "string.quoted.double.po", "begin": "(\\G|^)\"", "end": "\"", "patterns": [ { "name": "constant.character.escape.po", "match": "\\\\[\\\\\"]" } ] } ], "beginCaptures": { "1": { "name": "keyword.control.msgstr.po" }, "2": { "name": "keyword.control.msgstr.po" }, "3": { "name": "constant.numeric.po" }, "4": { "name": "keyword.control.msgstr.po" } } }, { "name": "meta.scope.msgctxt.po", "begin": "^(msgctxt)(?:(\\[)(\\d+)(\\]))?\\s+", "end": "^(?!\")", "patterns": [ { "name": "string.quoted.double.po", "begin": "(\\G|^)\"", "end": "\"", "patterns": [ { "name": "constant.character.escape.po", "match": "\\\\[\\\\\"]" } ] } ], "beginCaptures": { "1": { "name": "keyword.control.msgctxt.po" }, "2": { "name": "keyword.control.msgctxt.po" }, "3": { "name": "constant.numeric.po" }, "4": { "name": "keyword.control.msgctxt.po" } } }, { "name": "comment.line.number-sign.obsolete.po", "match": "^(#~).*$\\n?", "captures": { "1": { "name": "punctuation.definition.comment.po" } } }, { "include": "#comments" }, { "name": "invalid.illegal.po", "match": "^(?!\\s*$)[^#\"].*$\\n?" } ] }, "comments": { "patterns": [ { "begin": "^(?=#)", "end": "(?!\\G)", "patterns": [ { "name": "comment.line.number-sign.flag.po", "begin": "(#,)\\s+", "end": "\\n", "patterns": [ { "match": "(?:\\G|,\\s*)((?:fuzzy)|(?:no-)?(?:c|objc|sh|lisp|elisp|librep|scheme|smalltalk|java|csharp|awk|object-pascal|ycp|tcl|perl|perl-brace|php|gcc-internal|qt|boost)-format)", "captures": { "1": { "name": "entity.name.type.flag.po" } } } ], "beginCaptures": { "1": { "name": "punctuation.definition.comment.po" } } }, { "name": "comment.line.number-sign.extracted.po", "begin": "#\\.", "end": "\\n", "beginCaptures": { "0": { "name": "punctuation.definition.comment.po" } } }, { "name": "comment.line.number-sign.reference.po", "begin": "(#:)[ \\t]*", "end": "\\n", "patterns": [ { "name": "storage.type.class.po", "match": "(\\S+:)([\\d;]*)" } ], "beginCaptures": { "1": { "name": "punctuation.definition.comment.po" } } }, { "name": "comment.line.number-sign.previous.po", "begin": "#\\|", "end": "\\n", "beginCaptures": { "0": { "name": "punctuation.definition.comment.po" } } }, { "name": "comment.line.number-sign.po", "begin": "#", "end": "\\n", "beginCaptures": { "0": { "name": "punctuation.definition.comment.po" } } } ] } ] } } }