Bug 832398 - change default-source to default-src in CSP error messages. r=l10n
authorSid Stamm <sstamm@mozilla.com>
Thu, 28 Mar 2013 10:05:51 -0700
changeset 126583 c1d4ca637c6107a5a56b38ff2ca0a0993869da06
parent 126582 b2818d4dccfe5d47ceffcaea6e06f3da4444aba2
child 126584 e3c08b01675e907fb9a5ce9bb83bcef90f0a3cca
push id24488
push userryanvm@gmail.com
push dateFri, 29 Mar 2013 00:54:52 +0000
treeherdermozilla-central@8aeabe064932 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersl10n
bugs832398
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 832398 - change default-source to default-src in CSP error messages. r=l10n
content/base/src/CSPUtils.jsm
dom/locales/en-US/chrome/security/csp.properties
--- a/content/base/src/CSPUtils.jsm
+++ b/content/base/src/CSPUtils.jsm
@@ -297,17 +297,17 @@ CSPRep.fromString = function(aStr, self,
       }
       continue directive;
     }
 
     // ALLOW DIRECTIVE //////////////////////////////////////////////////
     // parse "allow" as equivalent to "default-src", at least until the spec
     // stabilizes, at which time we can stop parsing "allow"
     if (dirname === CSPRep.ALLOW_DIRECTIVE) {
-      cspWarn(aCSPR, CSPLocalizer.getStr("allowDirectiveDeprecated"));
+      cspWarn(aCSPR, CSPLocalizer.getStr("allowDirectiveIsDeprecated"));
       if (aCSPR._directives.hasOwnProperty(SD.DEFAULT_SRC)) {
         // Check for duplicate default-src and allow directives
         cspError(aCSPR, CSPLocalizer.getFormatStr("duplicateDirective",
                                                   [dirname]));
         CSPdebug("Skipping duplicate directive: \"" + dir + "\"");
         continue directive;
       }
       var dv = CSPSourceList.fromString(dirvalue, aCSPR, selfUri, true);
--- a/dom/locales/en-US/chrome/security/csp.properties
+++ b/dom/locales/en-US/chrome/security/csp.properties
@@ -40,18 +40,20 @@ notSamePort = can't use report URI with 
 pageCannotSendReportsTo = page on %1$S cannot send reports to %2$S
 allowOrDefaultSrcRequired = 'allow' or 'default-src' directive required but not present.  Reverting to "default-src 'none'"
 # LOCALIZATION NOTE (failedToParseUnrecognizedSource):
 # %1$S is the CSP Source that could not be parsed
 failedToParseUnrecognizedSource = Failed to parse unrecognized source %1$S
 # LOCALIZATION NOTE (reportPostRedirect):
 # %1$S is the specified report URI before redirect
 reportPostRedirect = Post of violation report to %1$S failed, as a redirect occurred
-# LOCALIZATION NOTE (allowDirectiveDeprecated):
-allowDirectiveDeprecated = allow directive is deprecated, use the equivalent default-source directive instead
+# LOCALIZATION NOTE (allowDirectiveIsDeprecated):
+# Don't translate "allow" and "default-src" as they are keywords and part of
+# the CSP protocol syntax.
+allowDirectiveIsDeprecated = allow directive is deprecated, use the equivalent default-src directive instead
 
 # CSP Errors:
 policyURINotAlone = policy-uri directive can only appear alone
 noParentRequest = The policy-uri cannot be fetched without a parent request and a CSP.
 # LOCALIZATION NOTE (policyURIParseError):
 # %1$S is the URI that could not be parsed
 policyURIParseError = could not parse URI in policy URI: %1$S
 # LOCALIZATION NOTE (nonMatchingHost):