From 2c73b5a956d151444fc38a79cd2ba1542a7a9b93 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com> Date: Sun, 3 Mar 2024 22:56:30 -0600 Subject: [PATCH] Write placeholders for download-command inputs --- _locales/en/messages.json | 10 ++++++++++ _locales/eo/messages.json | 10 ++++++++++ options.js | 6 ++++-- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index a62b366..cb6715e 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -136,6 +136,16 @@ "description": "Member of menu-list for options-page section for download commands. Completes the sentence, “Run when…”" }, + "optionsPlaceholderDownloadRegex": { + "message": ".*.png", + "description": "Displayed placeholder for options-page input for download command’s regex." + }, + + "optionsPlaceholderDownloadCommand": { + "message": "echo $URL > $FILE.url", + "description": "Displayed placeholder for options-page input for download command." + }, + "optionsSaveButton": { "message": "Apply", "description": "Name of button in options-page to save changes." diff --git a/_locales/eo/messages.json b/_locales/eo/messages.json index 95b7031..902eb71 100644 --- a/_locales/eo/messages.json +++ b/_locales/eo/messages.json @@ -136,6 +136,16 @@ "description": "Menuero ĉe agordo-parto por elŝutaj ordonoj. Finas la frazon, «Rulu je…»" }, + "optionsPlaceholderDownloadRegex": { + "message": ".*.png", + "description": "Provizora valoro ĉe agordopaĝo por enigo de regula esprimo por elŝuta ordono." + }, + + "optionsPlaceholderDownloadCommand": { + "message": "echo $URL > $FILE.url", + "description": "Provizora valoro ĉe agordopaĝo por enigo de elŝuta ordono." + }, + "optionsSaveButton": { "message": "Konservi", "description": "Nomo de butono ĉe agordopaĝo por konservi ŝanĝojn." diff --git a/options.js b/options.js index 6c607ce..e8082fa 100644 --- a/options.js +++ b/options.js @@ -148,7 +148,8 @@ function createDownloadTr(regex, command, type) { let regexInput = document.createElement("INPUT"); regexInput.setAttribute("class", "regex"); regexInput.setAttribute("type", "text"); - regexInput.setAttribute("placeholder", browser.i18n.getMessage("optionsPlaceholderDownloadRule")); + regexInput.setAttribute("placeholder", + browser.i18n.getMessage("optionsPlaceholderDownloadRegex")); if (regex && command && type) regexInput.setAttribute("value", regex); @@ -158,7 +159,8 @@ function createDownloadTr(regex, command, type) { let commandInput = document.createElement("INPUT"); commandInput.setAttribute("class", "command"); commandInput.setAttribute("type", "text"); - commandInput.setAttribute("placeholder", browser.i18n.getMessage("optionsPlaceholderDownloadRule")); + commandInput.setAttribute("placeholder", + browser.i18n.getMessage("optionsPlaceholderDownloadCommand")); if (regex && command && type) commandInput.setAttribute("value", command);