mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateStyles
synced 2024-12-03 20:37:00 +00:00
b301a30abf
wikimedia/css-sanitizer provides a real CSS parser, which should be safer than poking at things with regular expressions. Instead of the strange hybrid model that tried to both process inline CSS and save CSS when the template is saved, it now looks for <templatestyles src="Title" /> during the parse to do all the transclusion of styles. The output method is "<style> tags in the body", pending someone implementing T160563. It now also registers a "sanitized-css" content model, which should pick up the CSS syntax highlighting and will validate the submitted CSS on submit and prevent a save if it's not valid. This patch also takes advantage of LGPL-2.x § 3 to relicense the extension as GPL-2.0+, although at this point none of the LGPL code remains anyway. Bug: T133408 Bug: T136054 Bug: T135788 Bug: T135789 Change-Id: I993e6f18d32a43aac8398743133d227b05133bbd Depends-On: If4eb5bf71f94fa366ec4eddb6964e8f4df6b824a
66 lines
5.9 KiB
JSON
66 lines
5.9 KiB
JSON
{
|
|
"@metadata": {
|
|
"authors": [
|
|
"Brad Jorsch",
|
|
"Marc A. Pelletier"
|
|
]
|
|
},
|
|
"templatestyles": "TemplateStyles",
|
|
"templatestyles-desc": "Implement per-template style sheets",
|
|
"templatestyles-missing-src": "TemplateStyles' <code>src</code> attribute must not be empty.",
|
|
"templatestyles-invalid-src": "Invalid title for TemplateStyles' <code>src</code> attribute.",
|
|
"templatestyles-bad-src-missing": "Page [[:$1|$2]] has no content.",
|
|
"templatestyles-bad-src": "Page [[:$1|$2]] must have content model \"{{int:content-model-sanitized-css}}\" for TemplateStyles (current model is \"$3\").",
|
|
"templatestyles-errorcomment": "Errors processing stylesheet [[:$1]] (rev $2):\n$3",
|
|
"templatestyles-size-exceeded": "The stylesheet is larger than the maximum size of $2.",
|
|
"content-model-sanitized-css": "Sanitized CSS",
|
|
|
|
"templatestyles-error-at-rule-block-not-allowed": "Block not allowed for <code>@$3</code> at line $1 character $2.",
|
|
"templatestyles-error-at-rule-block-required": "Block required for <code>@$3</code> at line $1 character $2.",
|
|
"templatestyles-error-bad-character-in-url": "Invalid character in URL at line $1 character $2.",
|
|
"templatestyles-error-bad-escape": "Invalid character in escape at line $1 character $2.",
|
|
"templatestyles-error-bad-value-for-property": "Invalid or unsupported value for property <code>$3</code> at line $1 character $2.",
|
|
"templatestyles-error-expected-at-rule": "Expected <code>@$3</code> at line $1 character $2.",
|
|
"templatestyles-error-expected-colon": "Expected a colon at line $1 character $2.",
|
|
"templatestyles-error-expected-declaration": "Expected a declaration at line $1 character $2.",
|
|
"templatestyles-error-expected-declaration-list": "Expected a declaration list at line $1 character $2.",
|
|
"templatestyles-error-expected-eof": "Expected the end of the stylesheet at line $1 character $2.",
|
|
"templatestyles-error-expected-ident": "Expected an identifier a line $1 character $2.",
|
|
"templatestyles-error-expected-page-margin-at-rule": "Expected a <code>@page</code> margin at-rule at line $1 character $2.",
|
|
"templatestyles-error-expected-qualified-rule": "Expected a style rule at line $1 character $2.",
|
|
"templatestyles-error-expected-stylesheet": "Expected a stylesheet at line $1 character $2.",
|
|
"templatestyles-error-invalid-font-face-at-rule": "<code>@font-face</code> does not allow anything before the block at line $1 character $2.",
|
|
"templatestyles-error-invalid-font-feature-value": "<code>@$3</code> does not allow anything before the block at line $1 character $2.",
|
|
"templatestyles-error-invalid-font-feature-value-declaration": "Invalid value for font feature value property at line $1 character $2.",
|
|
"templatestyles-error-invalid-font-feature-values-font-list": "Invalid font list for <code>@font-feature-values</code> at line $1 character $2.",
|
|
"templatestyles-error-invalid-import-value": "Invalid value for <code>@import</code> at line $1 character $2.",
|
|
"templatestyles-error-invalid-keyframe-name": "Invalid keyframe name at line $1 character $2.",
|
|
"templatestyles-error-invalid-media-query": "Invalid media query at line $1 character $2.",
|
|
"templatestyles-error-invalid-namespace-value": "Invalid value for <code>@namespace</code> at line $1 character $2.",
|
|
"templatestyles-error-invalid-page-margin-at-rule": "<code>@$3</code> does not allow anything before the block at line $1 character $2.",
|
|
"templatestyles-error-invalid-page-rule-content": "Invalid content for <code>@page</code> at line $1 character $2.",
|
|
"templatestyles-error-invalid-page-selector": "Invalid page selector at line $1 character $2.",
|
|
"templatestyles-error-invalid-selector-list": "Invalid selector list at line $1 character $2.",
|
|
"templatestyles-error-invalid-supports-condition": "Invalid condition for <code>@supports</code> at line $1 character $2.",
|
|
"templatestyles-error-misordered-rule": "Misordered rule at line $1 character $2.",
|
|
"templatestyles-error-missing-font-feature-values-font-list": "Missing font list for <code>@font-feature-values</code> at line $1 character $2.",
|
|
"templatestyles-error-missing-import-source": "Missing source for <code>@import</code> at line $1 character $2.",
|
|
"templatestyles-error-missing-keyframe-name": "Missing name for <code>@keyframes</code> at line $1 character $2.",
|
|
"templatestyles-error-missing-namespace-value": "Missing value for <code>@namespace</code> at line $1 character $2.",
|
|
"templatestyles-error-missing-selector-list": "Missing selector list at line $1 character $2.",
|
|
"templatestyles-error-missing-supports-condition": "Missing condition for <code>@supports</code> at line $1 character $2.",
|
|
"templatestyles-error-missing-value-for-property": "Missing value for property <code>$3</code> at line $1 character $2.",
|
|
"templatestyles-error-newline-in-string": "Invalid newline in string at line $1 character $2.",
|
|
"templatestyles-error-recursion-depth-exceeded": "Too many nested blocks and/or functions at line $1 character $2.",
|
|
"templatestyles-error-unclosed-comment": "Unclosed comment starting at line $1 character $2.",
|
|
"templatestyles-error-unclosed-string": "Unclosed string starting at line $1 character $2.",
|
|
"templatestyles-error-unclosed-url": "Unclosed URL at line $1 character $2.",
|
|
"templatestyles-error-unexpected-eof": "Unexpected end of stylesheet at line $1 character $2.",
|
|
"templatestyles-error-unexpected-eof-in-block": "Unexpected end of stylesheet in block at line $1 character $2.",
|
|
"templatestyles-error-unexpected-eof-in-function": "Unexpected end of stylesheet in function at line $1 character $2.",
|
|
"templatestyles-error-unexpected-eof-in-rule": "Unexpected end of stylesheet in rule at line $1 character $2.",
|
|
"templatestyles-error-unexpected-token-in-declaration-list": "Unexpected token in declaration list at line $1 character $2.",
|
|
"templatestyles-error-unrecognized-property": "Unrecognized or unsupported property at line $1 character $2.",
|
|
"templatestyles-error-unrecognized-rule": "Unrecognized or unsupported rule at line $1 character $2."
|
|
}
|