add localisable strings for Internal JavaScript Error

This commit is contained in:
Myeongjin
2015-10-18 17:26:42 +09:00
parent d7f1f973a9
commit 2fee131aa4
3 changed files with 6 additions and 2 deletions

View File

@@ -126,8 +126,8 @@ Display an error and exit
*/
$tw.utils.error = function(err) {
// Prepare the error message
var errHeading = "Internal JavaScript Error",
promptMsg = "Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser";
var errHeading = ( $tw.language == undefined ? "Internal JavaScript Error" : $tw.language.getString("InternalJavaScriptError/Title") ),
promptMsg = ( $tw.language == undefined ? "Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser" : $tw.language.getString("InternalJavaScriptError/Hint") );
// Log the error to the console
console.error($tw.node ? "\x1b[1;31m" + err + "\x1b[0m" : err);
if($tw.browser && !$tw.node) {