diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index 4ce22b5..08f4558 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -26,6 +26,9 @@ "openInGoogleLabel": { "message": "Open in Google Translate" }, + "openInDeeplLabel": { + "message": "Open in DeepL Translator" + }, "copyLabel": { "message": "Copy" }, diff --git a/src/content/components/TranslatePanel.js b/src/content/components/TranslatePanel.js index fb99989..6ad604d 100644 --- a/src/content/components/TranslatePanel.js +++ b/src/content/components/TranslatePanel.js @@ -184,6 +184,7 @@ export default class TranslatePanel extends Component { const candidateStyles = { color: getSettings("candidateFontColor") }; + const translationApi = getSettings("translationApi"); return (
{errorMessage}
} {isError && (- {browser.i18n.getMessage("openInGoogleLabel")} + + {translationApi === "google" ? + browser.i18n.getMessage("openInGoogleLabel") : + browser.i18n.getMessage("openInDeeplLabel") + } +
)}