gecko/dom/locales/en-US/chrome/layout/css.properties
Cameron McCormack ba08f38dc0 Bug 773296 - Part 18: Add error reporting for invalid variable references. r=dbaron
This adds CSS parser error reporting for parsing of custom properties
and normal properties that have variable references.

When re-parsing a normal property that had a variable reference, we
report any parse error to be at the beginning of the property value.
This is because it is difficult to keep track of where exactly each
variable substitution came from to point to the particular value
that would have caused the parse error.  For example, with this:

  :root {
    var-a: 1px 2px;
    var-b: 3px var(a);
  }
  p {
    margin: var(a) var(b);
  }

we would end up resolving the value of 'margin' to:

  "  1px 2px  3px  1px 2px"

In this string, the parse error occurs when we encounter the final
"2px", but by this point we don't know where that value came from.
So instead we just point to the line on which 'margin' was declared.

We extend ErrorReporter with an OutputError overload that takes the
specific line and column number to use in the error report to get this
right, and we store the line and column number for each token stream
we parse on the nsCSSValueTokenStream object.
2013-12-12 13:09:44 +11:00

158 lines
9.9 KiB
Properties

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MimeNotCss=The stylesheet %1$S was not loaded because its MIME type, "%2$S", is not "text/css".
MimeNotCssWarn=The stylesheet %1$S was loaded as CSS even though its MIME type, "%2$S", is not "text/css".
PEUnexpEOF2=Unexpected end of file while searching for %1$S.
PEParseRuleWSOnly=Whitespace-only string given to be parsed as rule.
PEDeclDropped=Declaration dropped.
PEDeclSkipped=Skipped to next declaration.
PEUnknownProperty=Unknown property '%1$S'.
PEValueParsingError=Error in parsing value for '%1$S'.
PEExpectEndValue=Expected end of value but found '%1$S'.
PERuleTrailing=Expected end of rule but found '%1$S'.
PESkipAtRuleEOF2=end of at-rule
PEUnknownAtRule=Unrecognized at-rule or error parsing at-rule '%1$S'.
PECharsetRuleEOF=charset string in @charset rule
PECharsetRuleNotString=Expected charset string but found '%1$S'.
PEGatherMediaEOF=end of media list in @import or @media rule
PEGatherMediaNotComma=Expected ',' in media list but found '%1$S'.
PEGatherMediaNotIdent=Expected identifier in media list but found '%1$S'.
PEGatherMediaReservedMediaType=Found reserved keyword '%1$S' when looking for media type.
PEImportNotURI=Expected URI in @import rule but found '%1$S'.
PEImportBadURI=Invalid URI in @import rule: '%1$S'.
PEImportUnexpected=Found unexpected '%1$S' within @import.
PEGroupRuleEOF2=end of @media, @supports or @-moz-document rule
PEGroupRuleNestedAtRule=%1$S rule not allowed within @media or @-moz-document rule.
PEMozDocRuleBadFunc2=Expected url(), url-prefix(), domain() or regexp() in @-moz-document rule but found '%1$S'.
PEMozDocRuleNotURI=Expected URI in @-moz-document rule but found '%1$S'.
PEMozDocRuleNotString=Expected string in @-moz-document rule regexp() function but found '%1$S'.
PEMozDocRuleEOF=next URI in @-moz-document rule
PEAtNSPrefixEOF=namespace prefix in @namespace rule
PEAtNSURIEOF=namespace URI in @namespace rule
PEAtNSUnexpected=Unexpected token within @namespace: '%1$S'.
PEKeyframeNameEOF=name of @keyframes rule.
PEKeyframeBadName=Expected identifier for name of @keyframes rule.
PEKeyframeBrace=Expected opening { of @keyframes rule.
PESkipDeclBraceEOF=closing } of declaration block
PESkipRSBraceEOF=closing } of invalid rule set
PEBadSelectorRSIgnored=Ruleset ignored due to bad selector.
PEBadSelectorKeyframeRuleIgnored=Keyframe rule ignored due to bad selector.
PESelectorListExtraEOF=',' or '{'
PESelectorListExtra=Expected ',' or '{' but found '%1$S'.
PESelectorGroupNoSelector=Selector expected.
PESelectorGroupExtraCombinator=Dangling combinator.
PEClassSelEOF=class name
PEClassSelNotIdent=Expected identifier for class selector but found '%1$S'.
PETypeSelEOF=element type
PETypeSelNotType=Expected element name or '*' but found '%1$S'.
PEUnknownNamespacePrefix=Unknown namespace prefix '%1$S'.
PEAttributeNameEOF=attribute name
PEAttributeNameExpected=Expected identifier for attribute name but found '%1$S'.
PEAttributeNameOrNamespaceExpected=Expected attribute name or namespace but found '%1$S'.
PEAttSelNoBar=Expected '|' but found '%1$S'.
PEAttSelInnerEOF=part of attribute selector
PEAttSelUnexpected=Unexpected token in attribute selector: '%1$S'.
PEAttSelValueEOF=attribute value
PEAttSelCloseEOF=']' to end attribute selector
PEAttSelNoClose=Expected ']' to terminate attribute selector but found '%1$S'.
PEAttSelBadValue=Expected identifier or string for value in attribute selector but found '%1$S'.
PEPseudoSelEOF=name of pseudo-class or pseudo-element
PEPseudoSelBadName=Expected identifier for pseudo-class or pseudo-element but found '%1$S'.
PEPseudoSelNonFunc=Function token for non-function pseudo-class or pseudo-element, or the other way around, when reading '%1$S'.
PEPseudoSelNotPE=Expected pseudo-element but found '%1$S'.
PEPseudoSelDoubleNot=Negation pseudo-class can't be negated '%1$S'.
PEPseudoSelPEInNot=Pseudo-elements can't be negated '%1$S'.
PEPseudoSelNewStyleOnly=This pseudo-element must use the "::" form: '%1$S'.
PEPseudoSelEndOrUserActionPC=Expected end of selector or a user action pseudo-class after pseudo-element but found '%1$S'.
PEPseudoSelNoUserActionPC=Expected end of selector after pseudo-element that does not support user action pseudo-classes but found '%1$S'.
PEPseudoSelMultiplePE=Extra pseudo-element '%1$S'.
PEPseudoSelUnknown=Unknown pseudo-class or pseudo-element '%1$S'.
PENegationEOF=selector within negation
PENegationBadInner=Malformed simple selector as negation pseudo-class argument '%1$S'.
PENegationNoClose=Missing closing ')' in negation pseudo-class '%1$S'.
PENegationBadArg=Missing argument in negation pseudo-class '%1$S'.
PEPseudoClassArgEOF=argument to pseudo-class selector
PEPseudoClassArgNotIdent=Expected identifier for pseudo-class parameter but found '%1$S'.
PEPseudoClassArgNotNth=Expected part of argument to pseudo-class but found '%1$S'.
PEPseudoClassNoClose=Missing closing ')' in pseudo-class, found '%1$S' instead.
PEPseudoClassNoArg=Missing argument in pseudo-class '%1$S'.
PEPseudoClassNotUserAction=Expected end of selector or a user action pseudo-class after pseudo-element but found pseudo-class '%1$S'.
PESelectorEOF=selector
PEBadDeclBlockStart=Expected '{' to begin declaration block but found '%1$S'.
PEColorEOF=color
PEColorNotColor=Expected color but found '%1$S'.
PEColorComponentEOF=color component
PEExpectedPercent=Expected a percentage but found '%1$S'.
PEExpectedInt=Expected an integer but found '%1$S'.
PEColorBadRGBContents=Expected number or percentage in rgb() but found '%1$S'.
PEColorComponentBadTerm=Expected '%2$S' but found '%1$S'.
PEColorHueEOF=hue
PEExpectedComma=Expected ',' but found '%1$S'.
PEColorSaturationEOF=saturation
PEColorLightnessEOF=lightness
PEColorOpacityEOF=opacity in color value
PEExpectedNumber=Expected a number but found '%1$S'.
PEExpectedCloseParen=Expected ')' but found '%1$S'.
PEDeclEndEOF=';' or '}' to end declaration
PEParseDeclarationNoColon=Expected ':' but found '%1$S'.
PEParseDeclarationDeclExpected=Expected declaration but found '%1$S'.
PEEndOfDeclEOF=end of declaration
PEImportantEOF=important
PEExpectedImportant=Expected 'important' but found '%1$S'.
PEBadDeclEnd=Expected ';' to terminate declaration but found '%1$S'.
PEBadDeclOrRuleEnd2=Expected ';' or '}' to terminate declaration but found '%1$S'.
PEInaccessibleProperty2=Cannot specify value for internal property.
PECommentEOF=end of comment
SEUnterminatedString=Found unclosed string '%1$S'.
PEFontDescExpected=Expected font descriptor but found '%1$S'.
PEUnknownFontDesc=Unknown descriptor '%1$S' in @font-face rule.
PEMQExpectedExpressionStart=Expected '(' to start media query expression but found '%1$S'.
PEMQExpressionEOF=contents of media query expression
PEMQExpectedFeatureName=Expected media feature name but found '%1$S'.
PEMQExpectedFeatureNameEnd=Expected ':' or ')' after media feature name but found '%1$S'.
PEMQNoMinMaxWithoutValue=Media features with min- or max- must have a value.
PEMQExpectedFeatureValue=Found invalid value for media feature.
PEBadFontBlockStart=Expected '{' to begin @font-face rule but found '%1$S'.
PEBadFontBlockEnd=Expected '}' to end @font-face rule but found '%1$S'.
PEAnonBoxNotAlone=Did not expect anonymous box.
PEFFVUnexpectedEOF=Unexpected end of @font-feature-values rule.
PEFFVBlockStart=Expected opening { of @font-feature-values rule but found '%1$S'.
PEFFVValueSetStart=Expected opening { of feature value set but found '%1$S'.
PEFFVNoFamily=Expected font family list for @font-feature-values rule but found '%1$S'.
PEFFVUnexpectedBlockEnd=Expected '}' to end @font-feature-values rule but found '%1$S'.
PEFFVUnknownFontVariantPropValue=Unknown font-variant property value '%1$S'.
PEFFVExpectedIdent=Expected identifier but found '%1$S'.
PEFFVExpectedValue=Expected non-negative integer value but found '%1$S'.
PEFFVTooManyValues=Too many values for feature type '%1$S'.
PEFFVGenericInFamilyList=Family list cannot contain generic font family name.
PEFFVValueDefinitionTrailing=Expected end of value definition but found '%1$S'.
PEBadDirValue=Expected 'ltr' or 'rtl' in direction selector but found '%1$S'.
PESupportsConditionStartEOF2='not', '(', or function
PESupportsConditionInParensEOF=')'
PESupportsConditionNotEOF='not'
PESupportsWhitespaceRequired=Expected whitespace after 'not', 'and', or 'or'.
PESupportsConditionExpectedOpenParenOrFunction=Expected '(' or function while parsing supports condition but found '%1$S'.
PESupportsConditionExpectedCloseParen=Expected ')' while parsing supports condition but found '%1$S'.
PESupportsConditionExpectedStart2=Expected 'not', '(', or function while parsing supports condition but found '%1$S'.
PESupportsConditionExpectedNot=Expected 'not' while parsing supports condition but found '%1$S'.
PESupportsGroupRuleStart=Expected '{' to begin @supports rule but found '%1$S'.
PEFilterEOF=filter
PEExpectedNoneOrURL=Expected 'none' or URL but found '%1$S'.
PEExpectedNoneOrURLOrFilterFunction=Expected 'none', URL, or filter function but found '%1$S'.
PEExpectedNonnegativeNP=Expected non-negative number or percentage.
PEFilterFunctionArgumentsParsingError=Error in parsing arguments for filter function.
PEVariableEOF=variable
PEVariableEmpty=Expected variable value but found '%1$S'.
PEValueWithVariablesParsingError=Error in parsing value for '%1$S' after substituting variables.
PEValueWithVariablesFallbackInherit=Falling back to 'inherit'.
PEValueWithVariablesFallbackInitial=Falling back to 'initial'.
PEInvalidVariableReference=Property contained reference to invalid variable.
PEInvalidVariableTokenFallback=Found invalid token '%1$S' at top level of variable reference fallback.
PEExpectedVariableNameEOF=identifier for variable name
PEExpectedVariableName=Expected identifier for variable name but found '%1$S'.
PEExpectedVariableFallback=Expected variable reference fallback after ','.
PEExpectedVariableCommaOrCloseParen=Expected ',' or ')' after variable name in variable reference but found '%1$S'.