diff --git a/simple-translate/_locales/en/messages.json b/simple-translate/_locales/en/messages.json index 3b2472e..a3a2512 100644 --- a/simple-translate/_locales/en/messages.json +++ b/simple-translate/_locales/en/messages.json @@ -12,7 +12,7 @@ "message": "Translate this page" }, "LangListLabel":{ - "message":"Destination language" + "message":"Target language" }, "langList":{ "message":"" @@ -21,9 +21,18 @@ "message": "Pop up a button when selecting text" }, "ifCheckLangLabel":{ - "message": "Do not display the button if the selected text is the same as the destination language" + "message": "Do not display the button if the selected text is the same as the target language" }, "ifShowMenuLabel":{ "message": "Display context menu" + }, + "translatePageMenu":{ + "message": "Translate this page" + }, + "translateTextMenu":{ + "message": "Translate selected text" + }, + "translateLinkMenu":{ + "message": "Translate selected link" } } \ No newline at end of file diff --git a/simple-translate/_locales/ja/messages.json b/simple-translate/_locales/ja/messages.json index 6f67a24..d730d11 100644 --- a/simple-translate/_locales/ja/messages.json +++ b/simple-translate/_locales/ja/messages.json @@ -3,7 +3,7 @@ "message": "Simple Translate" }, "extDescription": { - "message": "シンプルな翻訳を表示するツールです。" + "message": "シンプルな翻訳を表示するアドオンです。" }, "initialTextArea":{ "message": "テキストを入力" @@ -25,5 +25,14 @@ }, "ifShowMenuLabel":{ "message": "コンテキストメニューを表示する" + }, + "translatePageMenu":{ + "message": "ページ全体を翻訳" + }, + "translateTextMenu":{ + "message": "選択したテキストを翻訳" + }, + "translateLinkMenu":{ + "message": "選択したリンクを翻訳" } } \ No newline at end of file diff --git a/simple-translate/background.js b/simple-translate/background.js index 2f4c783..c082f34 100644 --- a/simple-translate/background.js +++ b/simple-translate/background.js @@ -14,7 +14,7 @@ function getSetting() { }); } -//設定の初期化 動く? +//設定の初期化 function initialSetting() { switch (browser.i18n.getUILanguage()) { //一部の言語はブラウザの設定に合わせる case "ja": @@ -39,21 +39,21 @@ function initialSetting() { //メニューを表示 function menuCreate() { + browser.contextMenus.create({ + id: "translatePage", + title: browser.i18n.getMessage("translatePageMenu"), + contexts: ["all"], + }); + browser.contextMenus.create({ id: "translateText", - title: "選択したテキストを翻訳", + title: browser.i18n.getMessage("translateTextMenu"), contexts: ["selection"], }); - browser.contextMenus.create({ - id: "translatePage", - title: "ページ全体を翻訳", - contexts: ["all"], - }); - browser.contextMenus.create({ id: "translateLink", - title: "選択したリンクを翻訳", + title: browser.i18n.getMessage("translateLinkMenu"), contexts: ["link"], }); } @@ -67,12 +67,12 @@ function menuRemove() { //メニュークリック時 browser.contextMenus.onClicked.addListener(function (info, tab) { switch (info.menuItemId) { - case "translateText": - translateTextMenu(info, tab); - break; case "translatePage": translatePageMenu(info, tab); break; + case "translateText": + translateTextMenu(info, tab); + break; case "translateLink": translateLinkMenu(info, tab); break; diff --git a/simple-translate/manifest.json b/simple-translate/manifest.json index 879e55d..7e739c4 100644 --- a/simple-translate/manifest.json +++ b/simple-translate/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, - "version": "1.0", + "version": "1.1.1", "name": "__MSG_extName__", "description": "__MSG_extDescription__", diff --git a/simple-translate/popup/popup.js b/simple-translate/popup/popup.js index 88a1dba..119df22 100644 --- a/simple-translate/popup/popup.js +++ b/simple-translate/popup/popup.js @@ -24,8 +24,7 @@ function getTargetLang() { function changeLang() { targetLang = langList.value; if (sourceWord !== "") { - removeResult(); - splitLine(); + translate(); } if (url !== "") showLink(); } diff --git a/simple-translate/simple-translate.css b/simple-translate/simple-translate.css index d6a040f..3eb4528 100644 --- a/simple-translate/simple-translate.css +++ b/simple-translate/simple-translate.css @@ -8,7 +8,7 @@ height: 22px; width: 22px; position: fixed; - z-index: 10002; + z-index: 2147483647; left: 0px; top: 0px; display: none; @@ -34,7 +34,7 @@ width:300px;/*消すかも*/ position: fixed; padding: 10px 18px; - z-index: 10001; + z-index: 2147483646; left: 0px; top: 0px; display: none; diff --git a/simple-translate/web-ext-artifacts/simple_translate-1.0.2.zip b/simple-translate/web-ext-artifacts/simple_translate-1.0.2.zip new file mode 100644 index 0000000..ee899ed Binary files /dev/null and b/simple-translate/web-ext-artifacts/simple_translate-1.0.2.zip differ diff --git a/simple-translate/web-ext-artifacts/simple_translate-1.1.0.zip b/simple-translate/web-ext-artifacts/simple_translate-1.1.0.zip new file mode 100644 index 0000000..cfb33cd Binary files /dev/null and b/simple-translate/web-ext-artifacts/simple_translate-1.1.0.zip differ diff --git a/simple-translate/web-ext-artifacts/simple_translate-1.1.1.zip b/simple-translate/web-ext-artifacts/simple_translate-1.1.1.zip new file mode 100644 index 0000000..55fe36e Binary files /dev/null and b/simple-translate/web-ext-artifacts/simple_translate-1.1.1.zip differ