diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 83b70e7..e92c8b6 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -209,5 +209,26 @@ "repairInstallTerminalIntro": { "message": "From a terminal, that would look something like:", "description": "Intro to a terminal-based installation description." + }, + + "troubleshootTitle": { + "message": "Troubleshooting", + "description": "Title of the Troubleshooting-paragraph of the error page." + }, + + "troubleshootDesc": { + "message": "If Shellfox’s script is installed but you still see this page — that is, the above error isn’t “Error: No such native application shellfox” — please report the issue! You can report it on the Shellfox bug-tracker, or by sending an email to xwx@posteo.org. Let’s get that fixed! Please make sure to include your operating system and Firefox version in the report.", + "description": "Contents of the Troubleshooting-paragraph of the error page." + }, + + "errorMessage": { + "message": "Error: “$ERROR$”", + "description": "The text of the header of the error page that displays the error message.", + "placeholders": { + "error": { + "content": "$1", + "example": "No such program." + } + } } } diff --git a/_locales/eo/messages.json b/_locales/eo/messages.json index ddfd52a..25ff21f 100644 --- a/_locales/eo/messages.json +++ b/_locales/eo/messages.json @@ -198,5 +198,24 @@ "repairInstallTerminalIntro": { "message": "Farita sole en terminalo, aspektus jene:" + }, + + "troubleshootTitle": { + "message": "Pluaj eraroj" + }, + + "troubleshootDesc": { + "message": "Se la skripto estas instalita sed vi ankoraŭ renkontas ĉi tiun paĝon — t.e., ke la supra eraro ne estas «Error: No such native application shellfox» — bonvolu raportu la eraron! Raporteblas ĉe la erarraportilo de Ŝelvulpo, aŭ per retletero al xwx@posteo.org. Ni riparu la problemon! Bonvolu ne forgesi noti vian operaciumon kaj Firefox-version en la raporto." + }, + + "errorMessage": { + "message": "Eraro: «$ERROR$»", + "placeholders": { + "error": { + "content": "$1", + "example": "No such program." + } + } } } + diff --git a/html/error.css b/html/error.css new file mode 100644 index 0000000..2349f0b --- /dev/null +++ b/html/error.css @@ -0,0 +1,3 @@ +/* SPCSS theme by Susam Pal, under the MIT license + * https://github.com/susam/spcss */ +body{color:#333;font-family:helvetica,arial,sans-serif;line-height:1.5;margin:0 auto;max-width:40em;padding:0 1em}h1,h2,h3,h4,h5,h6{margin:1.25em 0 .5em;line-height:1.2}a:link{color:#00e}a:visited{color:#518}a:focus,a:hover{color:#03f}a:active{color:#e00}h1 a:empty:before,h2 a:empty:before,h3 a:empty:before,h4 a:empty:before,h5 a:empty:before,h6 a:empty:before{content:"#"}h1 a:empty,h2 a:empty,h3 a:empty,h4 a:empty,h5 a:empty,h6 a:empty{visibility:hidden;padding-left:.25em}h1:hover a:empty,h2:hover a:empty,h3:hover a:empty,h4:hover a:empty,h5:hover a:empty,h6:hover a:empty{visibility:visible}img{max-width:100%}figure{margin:1em 0;text-align:center}figcaption{font-size:small}code,kbd,pre,samp{color:#009;font-family:monospace,monospace}pre kbd{color:#060}blockquote,pre{background:#eee;padding:.5em}pre{overflow:auto}blockquote{border-left:medium solid #ccc;margin:1em 0}blockquote :first-child{margin-top:0}blockquote :last-child{margin-bottom:0}table{border-collapse:collapse}td,th{border:thin solid #999;padding:.3em .4em;text-align:left}@media (prefers-color-scheme:dark){body{background:#111;color:#bbb}a:link{color:#9bf}a:visited{color:#caf}a:focus,a:hover{color:#9cf}a:active{color:#faa}code,kbd,pre,samp{color:#6cf}pre kbd{color:#9c6}blockquote,pre{background:#000}blockquote{border-color:#333}td,th{border-color:#666}} diff --git a/html/error.html b/html/error.html index 4e8da64..0c1300e 100644 --- a/html/error.html +++ b/html/error.html @@ -2,11 +2,17 @@
+ +$ curl https://hak.xwx.moe/jadedctrl/shellfox/archive/master.tar.gz | tar -xzv
$ cd shellfox/
$ sudo make native-install
If Shellfox’s script is installed but you still see this page — that is, the above error isn’t “Error: No such native application shellfox” — please report the issue! You can report it on the Shellfox bug-tracker, or by sending an email to xwx@posteo.org. Let’s get that fixed! Please make sure to include your operating system and Firefox version in the report.
diff --git a/html/error.js b/html/error.js index 5cb8abc..aea18ce 100644 --- a/html/error.js +++ b/html/error.js @@ -1,9 +1,12 @@ +// Most importantly: Write the passed GET error (if any) to the error-header. let urlParams = location.toString().split("?error="); if (urlParams && urlParams.length > 0) { let errorText = unescape(urlParams[urlParams.length - 1]); - document.getElementById("error").innerText = "«" + errorText + "»"; + document.getElementById("error").innerText = browser.i18n.getMessage("errorMessage", errorText); } + +// Write locale-specific translations to the page. document.getElementsByTagName("html")[0].setAttribute("lang", browser.i18n.getMessage("@@ui_locale")); document.getElementById("errorPageTitle").innerText = browser.i18n.getMessage("errorPageTitle"); @@ -20,4 +23,12 @@ document.getElementById("installStep4").innerHTML = browser.i18n.getMessage("rep document.getElementById("installStep5").innerText = browser.i18n.getMessage("repairInstallStep5"); document.getElementById("installTerminalIntro").innerText = browser.i18n.getMessage("repairInstallTerminalIntro"); +document.getElementById("troubleshootTitle").innerText = browser.i18n.getMessage("troubleshootTitle"); +document.getElementById("troubleshootDesc").innerHTML = browser.i18n.getMessage("troubleshootDesc"); + + +// Now, write our repo’s URLs to the links. document.getElementById("zip_link").setAttribute("href", "https://hak.xwx.moe/jadedctrl/shellfox/archive/master.zip"); +document.getElementById("tracker_link").setAttribute("href", "https://hak.xwx.moe/jadedctrl/shellfox/issues"); + +