Skip to content

Commit

Permalink
Embed link to migration guide in init file error message
Browse files Browse the repository at this point in the history
  • Loading branch information
mooz committed Sep 24, 2015
1 parent c476cee commit f22a53f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
21 changes: 14 additions & 7 deletions content/modules/userscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,20 @@ const userscript = {
{
let self = this;
buttons = [{
label : util.getLocaleString("openErrorOccurredPlace"),
callback : function (aNotification) {
self.editFile(e.fileName, e.lineNumber);
aNotification.close();
},
accessKey : "o"
}];
label : util.getLocaleString("oldSyntaxMigrationGuide"),
callback : function (aNotification) {
openUILinkIn(util.getLocaleString("oldSyntaxMigrationGuideURL"), "tab");
aNotification.close();
},
accessKey : "m"
}, {
label : util.getLocaleString("openErrorOccurredPlace"),
callback : function (aNotification) {
self.editFile(e.fileName, e.lineNumber);
aNotification.close();
},
accessKey : "o"
}];
}
display.notify(msgstr, buttons);
return -2;
Expand Down
2 changes: 2 additions & 0 deletions locale/en-US/keysnail.properties
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ editorNotFound=Editor %S is not found. Please check if the file path is specifie
# init file
failedToOpenDefaultInitFile=Default init file is not found. Extension package may be corrupts.
openErrorOccurredPlace=Open error occurred place with editor
oldSyntaxMigrationGuide=See .keysnail.js migration guide
oldSyntaxMigrationGuideURL=https://github.com/mooz/keysnail/wiki/How-to-fix-errors-in-your-.keysnail.js

# file
failedToWriteText=Failed to write the file.
Expand Down
2 changes: 2 additions & 0 deletions locale/ja/keysnail.properties
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ editorNotFound=エディタ %S が見つかりませんでした。パスが正
# init file
failedToOpenDefaultInitFile=デフォルトの設定ファイルが見つかりませんでした。拡張機能のパッケージが壊れている可能性があります。
openErrorOccurredPlace=エラーの発生した場所をエディタで開く
oldSyntaxMigrationGuide=Firefox 41 以降で発生するエラーの対応ガイドを見る
oldSyntaxMigrationGuideURL=https://github.com/mooz/keysnail/wiki/How-to-fix-errors-in-your-.keysnail.js-%28ja%29

# file
failedToWriteText=ファイルの書き込みに失敗しました。
Expand Down

0 comments on commit f22a53f

Please sign in to comment.