Bug 881057 - Improve wording in the appcache command r=jwalker
authorMichael Ratcliffe <mratcliffe@mozilla.com>
Tue, 11 Jun 2013 13:28:45 +0100
changeset 146262 fdbd98251aadb24e2261cfcab0f85dcaaf1ed20c
parent 146261 0be523ac15392335d30696c0a3920ee31dd4df70
child 146263 98b40ac6ed9a31158dd2c80c599b8008f3fac739
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalker
bugs881057
milestone24.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 881057 - Improve wording in the appcache command r=jwalker
browser/devtools/commandline/test/browser_cmd_appcache_invalid.js
browser/devtools/shared/AppCacheUtils.jsm
browser/locales/en-US/chrome/browser/devtools/appcacheutils.properties
--- a/browser/devtools/commandline/test/browser_cmd_appcache_invalid.js
+++ b/browser/devtools/commandline/test/browser_cmd_appcache_invalid.js
@@ -28,22 +28,22 @@ function test() {
             status: 'VALID',
             args: {}
           },
           exec: {
             completed: false,
             output: [
               /Manifest has a character encoding of ISO-8859-1\. Manifests must have the utf-8 character encoding\./,
               /The first line of the manifest must be "CACHE MANIFEST" at line 1\./,
-              /"CACHE MANIFEST" is only valid on the first line at line 3\./,
+              /"CACHE MANIFEST" is only valid on the first line but was found at line 3\./,
               /images\/sound-icon\.png points to a resource that is not available at line 9\./,
               /images\/background\.png points to a resource that is not available at line 10\./,
               /NETWORK section line 13 \(\/checking\.cgi\) prevents caching of line 13 \(\/checking\.cgi\) in the NETWORK section\./,
               /\/checking\.cgi points to a resource that is not available at line 13\./,
-              /Asterisk used as a wildcard in the NETWORK section at line 14\. A single line containing an asterisk is called the online whitelist wildcard flag and is only valid in the NETWORK section\. Other uses of the \* character are prohibited\. The presence of this flag indicates that any URI not listed as cached is to be implicitly treated as being in the online whitelist namespaces\. If the flag is not present then the blocking state indicates that URIs not listed explicitly in the manifest are to be treated as unavailable\./,
+              /Asterisk \(\*\) incorrectly used in the NETWORK section at line 14\. If a line in the NETWORK section contains only a single asterisk character, then any URI not listed in the manifest will be treated as if the URI was listed in the NETWORK section\. Otherwice such URIs will be treated as unavailable\. Other uses of the \* character are prohibited/,
               /\.\.\/rel\.html points to a resource that is not available at line 17\./,
               /\.\.\/\.\.\/rel\.html points to a resource that is not available at line 18\./,
               /\.\.\/\.\.\/\.\.\/rel\.html points to a resource that is not available at line 19\./,
               /\.\.\/\.\.\/\.\.\/\.\.\/rel\.html points to a resource that is not available at line 20\./,
               /\.\.\/\.\.\/\.\.\/\.\.\/\.\.\/rel\.html points to a resource that is not available at line 21\./,
               /\/\.\.\/ is not a valid URI prefix at line 22\./,
               /\/test\.css points to a resource that is not available at line 23\./,
               /\/test\.js points to a resource that is not available at line 24\./,
@@ -59,24 +59,24 @@ function test() {
               /\/settings\/home points to a resource that is not available at line 37\./,
               /\/settings\/app\.js points to a resource that is not available at line 38\./,
               /The file http:\/\/sub1\.test1\.example\.com\/browser\/browser\/devtools\/commandline\/test\/browser_cmd_appcache_invalid_page3\.html was modified after http:\/\/sub1\.test1\.example\.com\/browser\/browser\/devtools\/commandline\/test\/browser_cmd_appcache_invalid_appcache\.appcache\. Unless the text in the manifest file is changed the cached version will be used instead at line 39\./,
               /browser_cmd_appcache_invalid_page3\.html has cache-control set to no-store\. This will prevent the application cache from storing the file at line 39\./,
               /http:\/\/example\.com\/logo\.png points to a resource that is not available at line 40\./,
               /http:\/\/example\.com\/check\.png points to a resource that is not available at line 41\./,
               /Spaces in URIs need to be replaced with % at line 42\./,
               /http:\/\/example\.com\/cr oss\.png points to a resource that is not available at line 42\./,
-              /Asterisk used as a wildcard in the CACHE section at line 43\. A single line containing an asterisk is called the online whitelist wildcard flag and is only valid in the NETWORK section\. Other uses of the \* character are prohibited\. The presence of this flag indicates that any URI not listed as cached is to be implicitly treated as being in the online whitelist namespaces\. If the flag is not present then the blocking state indicates that URIs not listed explicitly in the manifest are to be treated as unavailable\./,
+              /Asterisk \(\*\) incorrectly used in the CACHE section at line 43\. If a line in the NETWORK section contains only a single asterisk character, then any URI not listed in the manifest will be treated as if the URI was listed in the NETWORK section\. Otherwice such URIs will be treated as unavailable\. Other uses of the \* character are prohibited/,
               /The SETTINGS section may only contain a single value, "prefer-online" or "fast" at line 47\./,
               /FALLBACK section line 50 \(\/section1\/ \/offline1\.html\) prevents caching of line 30 \(\/section1\/blockedbyfallback\.html\) in the CACHE section\./,
               /\/offline1\.html points to a resource that is not available at line 50\./,
               /FALLBACK section line 51 \(\/section2\/ offline2\.html\) prevents caching of line 32 \(\/section2\/blockedbyfallback\.html\) in the CACHE section\./,
               /offline2\.html points to a resource that is not available at line 51\./,
               /Only two URIs separated by spaces are allowed in the FALLBACK section at line 52\./,
-              /Asterisk \(\*\) incorrectly used as a wildcard in a fallback namespace at line 53\. Namespaces simply need to match a path prefix\./,
+              /Asterisk \(\*\) incorrectly used in the FALLBACK section at line 53\. URIs in the FALLBACK section simply need to match a prefix of the request URI\./,
               /offline3\.html points to a resource that is not available at line 53\./,
               /Invalid section name \(BLAH\) at line 55\./,
               /Only two URIs separated by spaces are allowed in the FALLBACK section at line 55\./
             ]
           },
         },
       ]));
     });
--- a/browser/devtools/shared/AppCacheUtils.jsm
+++ b/browser/devtools/shared/AppCacheUtils.jsm
@@ -403,17 +403,17 @@ ManifestParser.prototype = {
 
       // Ignore comments
       if (/^#/.test(text) || !text.length) {
         continue;
       }
 
       if (text == "CACHE MANIFEST") {
         if (this.currentLine != 1) {
-          this._addError(this.currentLine, "cacheManifestOnlyFirstLine",
+          this._addError(this.currentLine, "cacheManifestOnlyFirstLine2",
                          this.currentLine);
         }
         continue;
       }
 
       if (this._maybeUpdateSectionName()) {
         continue;
       }
@@ -440,17 +440,17 @@ ManifestParser.prototype = {
     };
   },
 
   parseLine: function OCIMP_parseLine() {
     let text = this.text;
 
     if (text.indexOf("*") != -1) {
       if (this.currSection != "NETWORK" || text.length != 1) {
-        this._addError(this.currentLine, "asteriskInWrongSection",
+        this._addError(this.currentLine, "asteriskInWrongSection2",
                        this.currSection, this.currentLine);
         return;
       }
     }
 
     if (/\s/.test(text)) {
       this._addError(this.currentLine, "escapeSpaces", this.currentLine);
       text = text.replace(/\s/g, "%20")
@@ -496,17 +496,17 @@ ManifestParser.prototype = {
     if (split.length != 2) {
       this._addError(this.currentLine, "fallbackUseSpaces", this.currentLine);
       return;
     }
 
     let [ namespace, fallback ] = split;
 
     if (namespace.indexOf("*") != -1) {
-      this._addError(this.currentLine, "fallbackAsterisk", this.currentLine);
+      this._addError(this.currentLine, "fallbackAsterisk2", this.currentLine);
     }
 
     if (/\s/.test(namespace)) {
       this._addError(this.currentLine, "escapeSpaces", this.currentLine);
       namespace = namespace.replace(/\s/g, "%20")
     }
 
     if (namespace.substr(0, 4) == "/../") {
--- a/browser/locales/en-US/chrome/browser/devtools/appcacheutils.properties
+++ b/browser/locales/en-US/chrome/browser/devtools/appcacheutils.properties
@@ -65,25 +65,25 @@ noResults=Your search returned no result
 # an attempt is made to view offline data.
 cacheDisabled=Your disk cache is disabled. Please set browser.cache.disk.enable to true in about:config and try again.
 
 # LOCALIZATION NOTE (firstLineMustBeCacheManifest): the associated cache
 # manifest has a first line that is not "CACHE MANIFEST". Parameters: %S is
 # the line number.
 firstLineMustBeCacheManifest=The first line of the manifest must be "CACHE MANIFEST" at line %S.
 
-# LOCALIZATION NOTE (cacheManifestOnlyFirstLine): the associated cache
+# LOCALIZATION NOTE (cacheManifestOnlyFirstLine2): the associated cache
 # manifest has "CACHE MANIFEST" on a line other than the first line.
 # Parameters: %S is the line number where "CACHE MANIFEST" appears.
-cacheManifestOnlyFirstLine="CACHE MANIFEST" is only valid on the first line at line %S.
+cacheManifestOnlyFirstLine2="CACHE MANIFEST" is only valid on the first line but was found at line %S.
 
-# LOCALIZATION NOTE (asteriskInWrongSection): the associated cache manifest
+# LOCALIZATION NOTE (asteriskInWrongSection2): the associated cache manifest
 # has an asterisk (*) in a section other than the NETWORK section. Parameters:
 # %1$S is the section name, %2$S is the line number.
-asteriskInWrongSection=Asterisk used as a wildcard in the %1$S section at line %2$S. A single line containing an asterisk is called the online whitelist wildcard flag and is only valid in the NETWORK section. Other uses of the * character are prohibited. The presence of this flag indicates that any URI not listed as cached is to be implicitly treated as being in the online whitelist namespaces. If the flag is not present then the blocking state indicates that URIs not listed explicitly in the manifest are to be treated as unavailable.
+asteriskInWrongSection2=Asterisk (*) incorrectly used in the %1$S section at line %2$S. If a line in the NETWORK section contains only a single asterisk character, then any URI not listed in the manifest will be treated as if the URI was listed in the NETWORK section. Otherwice such URIs will be treated as unavailable. Other uses of the * character are prohibited.
 
 # LOCALIZATION NOTE (escapeSpaces): the associated cache manifest has a space
 # in a URI. Spaces must be replaced with %20. Parameters: %S is the line
 # number where this error occurs.
 escapeSpaces=Spaces in URIs need to be replaced with %20 at line %S.
 
 # LOCALIZATION NOTE (slashDotDotSlashBad): the associated cache manifest has a
 # URI containing /../, which is invalid. Parameters: %S is the line number
@@ -97,21 +97,21 @@ slashDotDotSlashBad=/../ is not a valid 
 tooManyDotDotSlashes=Too many dot dot slash operators (../) at line %S.
 
 # LOCALIZATION NOTE (fallbackUseSpaces): the associated cache manifest has a
 # FALLBACK section containing more or less than the standard two URIs
 # separated by a single space. Parameters: %S is the line number where this
 # error occurs.
 fallbackUseSpaces=Only two URIs separated by spaces are allowed in the FALLBACK section at line %S.
 
-# LOCALIZATION NOTE (fallbackAsterisk): the associated cache manifest has a
+# LOCALIZATION NOTE (fallbackAsterisk2): the associated cache manifest has a
 # FALLBACK section that attempts to use an asterisk (*) as a wildcard. In this
 # section the URI is simply a path prefix. Parameters: %S is the line number
 # where this error occurs.
-fallbackAsterisk=Asterisk (*) incorrectly used as a wildcard in a fallback namespace at line %S. Namespaces simply need to match a path prefix.
+fallbackAsterisk2=Asterisk (*) incorrectly used in the FALLBACK section at line %S. URIs in the FALLBACK section simply need to match a prefix of the request URI.
 
 # LOCALIZATION NOTE (settingsBadValue): the associated cache manifest has a
 # SETTINGS section containing something other than the valid "prefer-online"
 # or "fast". Parameters: %S is the line number where this error occurs.
 settingsBadValue=The SETTINGS section may only contain a single value, "prefer-online" or "fast" at line %S.
 
 # LOCALIZATION NOTE (invalidSectionName): the associated cache manifest
 # contains an invalid section name. Parameters: %1$S is the section name, %2$S