Permalink
Browse files

Issue 6056: take into account Simon's remarks about include()

  • Loading branch information...
1 parent a0fbb4b commit 4d958c411e05159d729a22b6f23144796052a0c0 @fflorent fflorent committed with simonlindholm Nov 7, 2012
Showing with 18 additions and 14 deletions.
  1. +7 −3 extension/content/firebug/console/commandLineInclude.js
  2. +11 −11 extension/locale/en-US/firebug.properties
@@ -312,7 +312,7 @@ var CommandLineInclude =
this.log("aliasCreated", [newAlias], [context, "info"]);
}
- this.log("includeSuccess", [filename], [context, "info"]);
+ this.log("includeSuccess", [filename], [context, "info", true]);
},
onError: function(context, url, loadingMsgRow)
@@ -439,20 +439,24 @@ var CommandLineInclude =
catch(ex)
{
this.clearLoadingMessage(loadingMsgRow);
+ if (ex.name === "NS_ERROR_UNKNOWN_PROTOCOL")
+ {
+ this.log("invalidRequestProtocol", [], [context, "error"]);
+ return;
+ }
throw ex;
}
if (!~acceptedSchemes.indexOf(xhr.channel.URI.scheme))
{
this.log("invalidRequestProtocol", [], [context, "error"]);
this.clearLoadingMessage(loadingMsgRow);
- return ;
+ return;
}
xhr.send(null);
// xxxFlorent: TODO show XHR progress
- return xhr;
}
};
@@ -745,50 +745,50 @@ commandline.disabledForXMLDocs=Firebug command line is disabled for XML pages. Y
# LOCALIZATION NOTE (commandline.include.includeSuccess): For the include() function. This message is displayed
# in the Console panel when a remote script evaluation succeeded
# %S = the filename
-commandline.include.includeSuccess=%S properly included
+commandline.include.includeSuccess=%S properly included.
# LOCALIZATION NOTE (commandline.include.aliasNotFound): For the include() function. This message is displayed
# in the Console panel when a requested alias is not found
# %S = the alias name
-commandline.include.aliasNotFound=alias "%S" not found
+commandline.include.aliasNotFound=Alias "%S" not found.
# LOCALIZATION NOTE (commandline.include.loadFail): For the include() function. This message is displayed
# in the Console panel when the remote script download failed
# %S = the filename
-commandline.include.loadFail=%S failed to load
+commandline.include.loadFail=%S failed to load.
# LOCALIZATION NOTE (commandline.include.invalidRequestProtocol): For the include() function. This message is displayed
# in the Console panel when the user tries to download a script with another scheme than HTTP(S)
# %S = the filename
-commandline.include.invalidRequestProtocol=only HTTP/HTTPS protocols are supported
+commandline.include.invalidRequestProtocol=Only HTTP/HTTPS protocols are supported.
# LOCALIZATION NOTE (commandline.include.aliasCreated): For the include() function. This message is displayed
# in the Console panel when a new alias is created successfully
# %S = the alias name
-commandline.include.aliasCreated=alias "%S" created
+commandline.include.aliasCreated=Alias "%S" created.
# LOCALIZATION NOTE (commandline.include.aliasRemoved): For the include() function. This message is displayed
# in the Console panel when a new alias is removed successfully
# %S = the alias name
-commandline.include.aliasRemoved=alias "%S" removed
+commandline.include.aliasRemoved=Alias "%S" removed.
# LOCALIZATION NOTE (commandline.include.invalidAliasName): For the include() function. This message is displayed
# in the Console panel if an invalid alias name (which contains "/" or ".") is provided.
# %S = the invalid alias name
-commandline.include.invalidAliasName=alias names must not contain any "." or "/"; invalid alias name: "%S"
+commandline.include.invalidAliasName=Alias names must not contain any "." or "/"; invalid alias name: "%S".
# LOCALIZATION NOTE (commandline.include.tooLongAliasName): For the include() function. This message is displayed
# in the Console panel if the provided alias name is too long (i.e. more than 30 characters)
# %S = the invalid alias name
-commandline.include.tooLongAliasName=alias names must not contain more than 30 characters; invalid alias name: "%S"
+commandline.include.tooLongAliasName=Alias names must not contain more than 30 characters; invalid alias name: "%S".
# LOCALIZATION NOTE (commandline.include.wrongAliasArgument): For the include() function. This message is displayed
# in the Console panel if the provided alias name is invalid
-commandline.include.wrongAliasArgument=wrong alias argument; expected string
+commandline.include.wrongAliasArgument=Wrong alias argument; expected string.
# LOCALIZATION NOTE (commandline.include.wrongUrlArgument): For the include() function. This message is displayed
# in the Console panel if the provided url argument is invalid
-commandline.include.wrongUrlArgument=wrong url argument; expected string or null
+commandline.include.wrongUrlArgument=Wrong url argument; expected string or null.
# LOCALIZATION NOTE (commandline.include.confirmDelete): For the include() function. This message is displayed
# in a confirmation dialog when the user wants to delete an alias
@@ -821,7 +821,7 @@ Do_not_show_this_message_again=Do not show this message again
# Used when Firebug downloads a remote script and wants to display it in Scratchpad
# The messages appears as Javascript Comments in Scratchpad
scratchpad.loading=Loading, please wait...
-scratchpad.failLoading=Error while loading the script
+scratchpad.failLoading=Error while loading the script.
# LOCALIZATION NOTE (net.sizeinfo.Response_Body, net.sizeinfo.Post_Body, net.sizeinfo.Total_Sent,
# net.sizeinfo.Total_Received, net.sizeinfo.Including_Headers):

0 comments on commit 4d958c4

Please sign in to comment.