diff --git a/CLAUDE.md b/CLAUDE.md index 5bd5b16..f5a7639 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -420,7 +420,7 @@ ms in ipx, the difference being new connections, 80-330 ms each to open (#241). Comments explain **why**, not what. If a line looks odd, the comment says what went wrong without it. No emoji, no exclamation marks, no "obviously". Prose in the UI and docs is plain English and -addressed to the person using it. +addressed to the person using it. The words in the interface follow [docs/STYLE-GUIDE.md](docs/STYLE-GUIDE.md). Every change gets one line under `## [Unreleased]` in the changelog of the service it changes, in its [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) group: Added, Changed, Deprecated, diff --git a/docs/STYLE-GUIDE.md b/docs/STYLE-GUIDE.md new file mode 100644 index 0000000..ae023ff --- /dev/null +++ b/docs/STYLE-GUIDE.md @@ -0,0 +1,180 @@ +# Writing for the iPX interface + +How the words in iPX read: the page (`web/`), the admin page, sign-in, the iOS app's own alerts +(`ios/`) and the directory's and ipx-play's pages. It applies to every string a person sees: +buttons, tooltips, toasts, hints, placeholders, empty lists, errors. + +iPX is a web page in English, used on a desktop browser, a phone's home screen and inside the iOS +app, by people who run their own server or were given an account on one. They know what a podcast +and a feed are; they do not know what a guid, a scan job or a 304 is. + +The rules below were chosen against forty years of interface guides (Apple 1987-2014, Windows +1995 and 2010, GNOME, KDE, Android and others); the reasons for the disputed ones are in the +decision log at the end. + +## Voice and tone + +| Be | This | Not that | +|---|---|---| +| Plain | Nothing in progress. Episodes you start and do not finish show up here. | No in-progress entries found. | +| Direct, to "you" | Choose at least one podcast. | The user must select one or more podcasts. | +| Calm | Unable to reach iPX. Check your connection and try again. | Error! Network request failed! | +| Brief | Link copied | The link has been successfully copied to your clipboard. | +| Honest about what happens next | Saved. It applies from the next check. | Saved. | + +Signals and DeadAir have their own voice, radio's signal against noise; see +[signals.md](signals.md). Everything else is the plain voice above. + +## Capitalization + +Sentence case everywhere: capitalize the first word and proper nouns, nothing else. + +| Element | ✅ | ❌ | +|---|---|---| +| Heading, dialog title | Add a feed | Add a Feed | +| Button | Copy link | Copy Link | +| Menu item, tab | Show notes | Show Notes | +| Label, checkbox | Media types to download | Media Types To Download | +| Tooltip | Check every feed for new items | Check Every Feed For New Items | +| Placeholder | Filter feeds… | FILTER FEEDS… | + +Names of iPX's own features are proper nouns and keep their capitals: **iPX, Up Next, Now Playing, +Currently Listening, All Subscriptions, Signals, DeadAir, Admin, Directory**. The filters Unread, All and In progress +are tab labels, so only their first word is capitalized. Write other products as they write +themselves: TypeSafe, Patreon, OPML, CarPlay. + +## Punctuation + +* **Ellipsis**: the one character `…` (U+2026), never three periods, which screen readers read + out. Use it on a command that needs more from the person before it runs (✅ Import…), on a + placeholder that invites typing (✅ Filter…), and on work in progress (✅ Loading…). Not on a + command that only opens something: ✅ Settings, ❌ Settings…. +* **Periods**: a complete sentence ends with one; a fragment does not. ✅ Link copied · + ✅ There is nothing to play in this item. ❌ Link copied. Two sentences both end with periods. +* **No exclamation marks**, anywhere. +* **Colons** after a label only when what follows completes it in the same line: + ✅ Downloading: *episode title*. Not after a form label. +* **Quotation marks**: curly double quotes around what the person typed: ✅ No podcast is + called “f1”. +* **No symbols for words**: ✅ light or dark, ❌ light/dark · ✅ and, ❌ & · ✅ number of + episodes, ❌ # of episodes. +* **No dashes to join clauses**; two sentences instead. ❌ Could not copy automatically — select + the URL… ✅ Unable to copy the link. Select it and copy it yourself. + +## Elements + +**Buttons** start with a verb and are four words at most, with no closing punctuation: +✅ Use the new address · ✅ Share link · ❌ New address · ❌ Initials. An icon-only button has a +tooltip and an `aria-label` that say the same thing. A link or button inside a sentence takes the sentence's case: ✅ Get one at typesafe.ai, +then add it in Settings. A button that toggles changes its verb: +✅ Pin / Unpin · ❌ Pin: on. + +**Paired commands** match: Subscribe / Unsubscribe, Keep / Remove (an episode on this device), +Mark read / Mark unread, Show / Hide. + +**Tooltips** say what the control does, in more words than its label, and name its key when it has +one: ✅ Back 15 seconds (←) · ✅ Play the next in Up Next. No closing period. Not a repeat of the +label: ❌ title="Clear" on a button reading Clear. + +**Labels** are nouns or short questions: ✅ Feed address · ✅ How many of the newest +undownloaded items? Not instructions. + +**Placeholders** show the form of an answer or invite a search, never replace the label: +✅ https://example.com/rss · ✅ Morning commute · ❌ Enter the feed URL here. A field that holds a +secret says whether one is set: ✅ Set. Paste a new one to replace it. + +**Hints** under a control say what the person would not otherwise know: its effect, not how to use +it. ✅ Only items matching a keyword are downloaded. ❌ Type keywords into the box above. If a +control needs a paragraph, change the control. + +**Empty lists** say what is missing and how it fills: ✅ No podcasts yet. Add a feed with episodes +in it, and it shows here. ❌ No results. + +**Toasts** confirm something that just happened, or say why it did not. One line; the subject is +what changed, not iPX: ✅ Removed from Up Next · ❌ iPX has removed the episode from Up Next. + +## Errors, warnings and confirmations + +An error says **what did not happen, and what to do now**, with the why between them when it +helps. The form is `Unable to . .` + +| ✅ | ❌ | +|---|---| +| Unable to play this file. Try again, or download it again. | Playback error. | +| Unable to reach iPX just now. Try again in a minute. | Request failed (502). | +| Unable to keep it on this device. Try again. | Error: QuotaExceededError | + +* Never "error", "failed" or "invalid" as the message, and nothing that blames the person. +* No codes, status numbers, exception names or paths in the message. They go to the log, which + the admin page shows. +* Before writing an error, ask whether it can be prevented: a Save button stays disabled until the + form is complete, rather than "Name is required" after the click. +* When iPX can fix the problem, the message offers the fix as a button: ✅ Add it in Settings. +* One message per problem; never one alert after another. + +A **confirmation** asks only before something that cannot be undone. Its title is a question; its +buttons name the action, the destructive one not the default. + +| ✅ | ❌ | +|---|---| +| Unsubscribe? · *Cancel* · *Unsubscribe* | Are you sure? · *OK* · *Cancel* | + +Cancel means nothing happened. If the action cannot be taken back halfway, the button is Stop. +The page's `confirm()` (and the iOS app's answer to it) can only offer Cancel and OK, so its +question names the action in full: ✅ Delete this file from the server? + +**please** only when the person has to wait or do something because of iPX: ✅ Please wait while +iPX imports 214 feeds. **sorry** only when something is lost or cannot go on. Neither as filler. + +## Vocabulary + +One word for each thing, everywhere. + +| Use | Not | Meaning | +|---|---|---| +| podcast | show, talk show, channel | a feed with audio or video in it | +| episode | track, file (as the thing played) | an item of a podcast | +| item | entry, post, article | anything a feed publishes; an episode is an item | +| feed | RSS, source, channel | what someone subscribes to | +| address | URL, link (for a feed) | where a feed or server is; "link" is what is shared | +| subscribe, unsubscribe | follow, add/remove (for feeds) | | +| download | fetch, grab | the server saving an episode's file | +| keep on this device | download, save offline, cache | the phone or browser holding a copy | +| check | scan, poll, refresh | the server reading a feed for new items | +| read, unread | seen, new, viewed | | +| pin | star, favorite, protect | an item kept from being deleted | +| sign in, sign out | log in, log out, login | | +| server | backend, instance, daemon | the iPX someone signs in to | +| token | API key, secret | what a script or another server signs in with | +| Up Next | queue, playlist | the episodes lined up to play | +| playlist | smart list, collection | a list made from chosen podcasts | + +Never in the interface: guid, enclosure, entry, scan job, worker, cache, 304, ETag, OPML child, +widget, payload, and the names of the people who use iPX (no character speaks, waiting is a +spinner). OPML stays: people exporting a list meet the word in other apps. + +## Localization + +iPX ships in English only, and its strings live in the code, not in a resource file. Write as if +that will change: no sentence built from fragments joined in code (✅ `Kept on this device, to +play offline: ${title}` keeps the variable at the end), plurals handled as a whole sentence, not +with "(s)", dates and numbers through `toLocaleString` and the page's date helpers, and room for +half again as much text in every label. + +## Decision log + +| Decision | Choice | Why | +|---|---|---| +| Title or sentence case for buttons and menus | Sentence case for everything | The web has no platform rule; Windows 2010 moved everything but titles to sentence case, and iPX's strings already are. One rule, no list of words to keep lowercase | +| Case for labels, checkboxes, tooltips | Sentence case | Follows from the above; Windows 1995, Apple 2009, GNOME and KDE agree | +| Lowercase words in title case | None needed | Nothing is in title case | +| Contractions | Never: do not, cannot, it is | iPX's house style already spells them out, and KDE 2021 and GEM agree. Android and Windows 2010 use them for friendliness; iPX finds it in plain words instead | +| Failure wording | "Unable to …" | Most of the page's errors already say it; one form, not "Could not", "Cannot" and "Unable to" side by side | +| Ellipsis character | `…` | Apple 2009 and KDE: three periods break screen readers | +| Ellipsis on Settings | No | Windows' test: an ellipsis means more input is needed, not that something opens; GNOME agrees, Apple 2009 differs | +| Room for translation | Half again | KDE's 50% over GNOME's 30%; short labels grow most | +| Exclamation marks | Never | House style; KDE and GEM keep them out of errors | +| OK and Cancel | Specific verbs; OK only to acknowledge or where `confirm()` allows nothing else; Cancel only when nothing changed, otherwise Stop | Mac 1992, Windows 1995 and Apple 2009 over Motif's standard pair | +| Button length | Four words at most | Mac 1992 says three; "Use the new address" needs four and is clearer than any three | +| Tone | Plain and friendly, second person, never jokey in errors | Android 2012 and Windows 2010; Signals keeps its own radio voice | +| please and sorry | The Windows 2010 rule: please when the person is put out, sorry when something is lost | Avoids the filler apology Android 2012 warns against | diff --git a/ios/CHANGELOG.md b/ios/CHANGELOG.md index 53ded44..9c283f3 100644 --- a/ios/CHANGELOG.md +++ b/ios/CHANGELOG.md @@ -23,6 +23,7 @@ The iOS app, `ios/`. Format: [Keep a Changelog](https://keepachangelog.com/en/1. ### Changed +- The alert for a server out of reach reads "Unable to reach", with its buttons in sentence case, as the page writes (#507). - The player, the badge and CarPlay talk to ipx in protobuf rather than JSON, which is smaller and quicker to read; they need an ipx with protobuf (#465), and a place saved offline by an older build is still sent (#469). ### Fixed diff --git a/ios/Sources/WebViewController.swift b/ios/Sources/WebViewController.swift index 0d59dd3..f85bfb6 100644 --- a/ios/Sources/WebViewController.swift +++ b/ios/Sources/WebViewController.swift @@ -158,12 +158,12 @@ final class WebViewController: UIViewController, WKNavigationDelegate, WKUIDeleg } triedCache = false let host = Server.url?.host ?? "the server" - let alert = UIAlertController(title: "Cannot reach \(host)", + let alert = UIAlertController(title: "Unable to reach \(host)", message: error.localizedDescription, preferredStyle: .alert) - alert.addAction(UIAlertAction(title: "Try Again", style: .default) { [weak self] _ in + alert.addAction(UIAlertAction(title: "Try again", style: .default) { [weak self] _ in if let url = Server.url { self?.webView.load(URLRequest(url: url)) } }) - alert.addAction(UIAlertAction(title: "Change Server", style: .default) { [weak self] _ in + alert.addAction(UIAlertAction(title: "Change server", style: .default) { [weak self] _ in self?.askForServer() }) if presentedViewController == nil { present(alert, animated: true) } diff --git a/tests/page-unit.ts b/tests/page-unit.ts index cf58860..20a5be0 100644 --- a/tests/page-unit.ts +++ b/tests/page-unit.ts @@ -367,7 +367,7 @@ test('Share says why an episode gets no page anyone can play, and warns of a key const note = (why: string | null, url: string) => run(`noLinkNote(${JSON.stringify(why)}, ${JSON.stringify(url)})`) as string; const paid = 'https://c10.patreonusercdn.com/ep.mp3?token-hash=abc'; assert.match(note('private', paid), /private to you.*includes your own access/s); - assert.match(note('failed', 'https://example.com/ep.mp3'), /could not be made just now/); + assert.match(note('failed', 'https://example.com/ep.mp3'), /Unable to make a page anyone can play just now/); assert.doesNotMatch(note('failed', 'https://example.com/ep.mp3'), /own access/); // A server with no ipx-play shares as it always has, with no reason to give. assert.equal(note('not_set_up', 'https://example.com/ep.mp3'), ''); @@ -388,7 +388,7 @@ test('a file\'s box says where it is: the publisher, on its way, iPX, this devic const where = (x: object) => run(`whereText(${JSON.stringify({ id: 7, deadair: 0, path: null, state: 'held', ...x })})`) as string; assert.equal(where({}), 'Publisher only'); assert.equal(where({ state: 'pending' }), 'Queued for iPX'); - assert.equal(where({ state: 'error' }), 'iPX could not download it'); + assert.equal(where({ state: 'error' }), 'Unable to download to iPX'); run(`want(7, 'Ep')`); assert.equal(where({ state: 'pending' }), 'Downloading to iPX, then this device'); run('unwant(7)'); diff --git a/tests/ui/app.spec.ts b/tests/ui/app.spec.ts index 3415960..6de275a 100644 --- a/tests/ui/app.spec.ts +++ b/tests/ui/app.spec.ts @@ -1618,7 +1618,7 @@ test('a download by hand fills its bar and names its file, and only on its own s await slow.click(); await page.locator('#files button[title="Download to iPX"]').click(); await expect(slow.locator('.dlbar.live')).toBeAttached({ timeout: 10_000 }); - await expect(page.locator('#count')).toContainText(/downloading .+ — \d+%/); + await expect(page.locator('#count')).toContainText(/Downloading .+: \d+%/); await expect(page.locator('.toast', { hasText: /^Downloaded .+\.mp3/ })).toBeVisible({ timeout: 20_000 }); await expect(slow.locator('.kind.here')).toBeVisible({ timeout: 5_000 }); @@ -3132,7 +3132,7 @@ test('a dialog keeps the keyboard inside it and gives it back on closing', async await expect(page.locator('#modalCard[role=dialog]')).toHaveAttribute('aria-labelledby', /.+/); await expect(page.locator('#nurl')).toBeFocused(); // Labels name their boxes (#307). - await expect(page.getByRole('textbox', { name: 'Feed URL' })).toHaveCount(1); + await expect(page.getByRole('textbox', { name: 'Feed address' })).toHaveCount(1); for (let i = 0; i < 8; i++) { await page.keyboard.press('Tab'); // Past the last control Tab goes to the browser's own toolbar (the body, from here), never the page behind. diff --git a/web/CHANGELOG.md b/web/CHANGELOG.md index cab2501..e60c9da 100644 --- a/web/CHANGELOG.md +++ b/web/CHANGELOG.md @@ -65,6 +65,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- The page's words follow one style (docs/STYLE-GUIDE.md): failures say "Unable to …" and what to do, a podcast is a podcast rather than a show, a feed has an address rather than a URL, and the buttons Auto and Initials in a signal's icon picker read Pick for me and Use initials (#507). - A title that is only the opening of an item's own text, as ipx now names an untitled item, is not shown again above that text in the reader or a directory preview (#502). - A folder's triangle in the feed list is at its row's end, before the count, so every feed lines up with the places above at the list's edge, and on a phone Playlists' and Signals' + button sits beside the title rather than on a line of its own (#486, #487). - On a phone, an episode's title starts at the row's edge: the read and pin buttons are gone from the row, an unread episode has a dot before its title and a pinned one a pin under it, and both are changed from the reader's actions (#484). diff --git a/web/index.html b/web/index.html index 98b2041..58d8e5c 100644 --- a/web/index.html +++ b/web/index.html @@ -28,7 +28,7 @@ - +
@@ -36,7 +36,7 @@
@@ -654,7 +654,7 @@ function settingsModal(f: Feed, newUrl?: string){ // Each part named in a column of its own, the controls beside it (#290): the dialog had grown one // captioned setting at a time into a single column three screens long on a phone. const sect=(title: string, body: string)=>`

${title}

${body}
`; - const these=isGroup?'these shows':'this show'; + const these=isGroup?'these podcasts':'this podcast'; // The places in the sidebar this show's items go to, drawn as the sidebar draws them (#288, #289). const place=(id: string, key: 'hide_from_all'|'hide_from_signals', icon: string, title: string)=>{ const byList=f.group?S.feeds.find(g=>g.id===f.group&&g[key]):undefined; @@ -712,7 +712,7 @@ function settingsModal(f: Feed, newUrl?: string){ // The download limit, said as what it does. A number in a box hid that it is a window on the // newest items, not a pace through the back catalogue (#97). - const each=isGroup?' of each show':''; + const each=isGroup?' of each podcast':''; const older=' Older ones stay listed, to download by hand.'; const caption=()=>mode==='newest' ? `Downloads the newest Download latest items
- Queued immediately, ignoring the per-scan limit.
+ Downloaded now, past the limit on each check.
`); $('#dgo').onclick=async()=>{ diff --git a/web/src/events.ts b/web/src/events.ts index 08c733e..4cb1624 100644 --- a/web/src/events.ts +++ b/web/src/events.ts @@ -31,7 +31,7 @@ function connect(){ // every pending bar at once, so adding a feed looked like it was fetching the lot. const bar=document.querySelector(`.dlbar[data-bar="${ev.enclosure}"] i`); if(bar){ bar.style.width=pct+'%'; bar.parentElement!.classList.add('live'); } - $('#count') && ($('#count').textContent=`downloading ${ev.file} — ${pct.toFixed(0)}%`); + $('#count') && ($('#count').textContent=`Downloading ${ev.file}: ${pct.toFixed(0)}%`); } else if(ev.ev==='download_done'){ const bar=document.querySelector(`.dlbar[data-bar="${ev.enclosure}"]`); diff --git a/web/src/feeds.ts b/web/src/feeds.ts index f856429..3f2cda9 100644 --- a/web/src/feeds.ts +++ b/web/src/feeds.ts @@ -181,11 +181,11 @@ function renderFeeds(){ // The mark sits on the artwork, the thing the eye scans the list by, and the line under // the name says what is wrong in place of the counts. `${mine.length?folderArt(f,mine):artHTML(f.image,f.title||f.id)}`+ - (err?`${ICON.alert}`:'')+ + (err?`${ICON.alert}`:'')+ (f.pinned?`${ICON.pinOn}`:'')+``+ `
${esc(f.title||f.id)}`+ (nbad?`${plural(nbad,'feed')} not updating` - :err?esc(f.failing?.reason||'The last check failed') + :err?esc(f.failing?.reason||'Unable to read it at the last check') :`${mine.length?plural(mine.length,'feed'):plural(eps,'item')} · ${saved} downloaded`)+ `
`+ (f.orphaned?'Gone':'')+ diff --git a/web/src/items.ts b/web/src/items.ts index 74cd134..ade86a6 100644 --- a/web/src/items.ts +++ b/web/src/items.ts @@ -266,7 +266,7 @@ function kindIcon(enc: Enclosure){ const k=kindOf(enc); const i=(>{audio:ICON.audio,video:ICON.video,image:ICON.image,pdf:ICON.doc,torrent:ICON.torrent})[k]||ICON.file; const [cls,label]=enc.path ? [' here',`${k}, downloaded`] - : enc.state==='error' ? [' bad',`${k}, download failed${enc.last_error?': '+enc.last_error:''}`] + : enc.state==='error' ? [' bad',`${k}, unable to download${enc.last_error?': '+enc.last_error:''}`] : ['',k]; return `${i}`; } @@ -503,7 +503,7 @@ function whereText(x: Enclosure){ if(here) return 'On this device'; if(wanted.has(x.id)) return 'Downloading to iPX, then this device'; if(x.state==='pending') return 'Queued for iPX'; - if(x.state==='error') return 'iPX could not download it'; + if(x.state==='error') return 'Unable to download to iPX'; return 'Publisher only'; } return here ? 'On iPX and this device' : busy ? 'On iPX, downloading to this device' : 'On iPX'; @@ -589,7 +589,7 @@ const shareAt=(url: string, secs: number)=>secs>=5 ? `${url}?t=${Math.floor(secs function noLinkNote(why: string|null, url: string): string{ const notes: string[]=[]; if(why==='private') notes.push('This podcast\'s feed is private to you, so it gets no page anyone can play, and its file is never shared: this is the episode\'s own page.'); - else if(why==='failed') notes.push('The page anyone can play could not be made just now, so this is the episode\'s own address. Try again later for a link to it.'); + else if(why==='failed') notes.push('Unable to make a page anyone can play just now, so this is the episode\'s own address. Try again later for a link to it.'); if(carriesAccess(url)) notes.push(ACCESS_WARNING); return notes.map(n=>`

${esc(n)}

`).join(''); } diff --git a/web/src/login.ts b/web/src/login.ts index 1a631fa..abf9b15 100644 --- a/web/src/login.ts +++ b/web/src/login.ts @@ -11,5 +11,5 @@ document.getElementById('f')!.onsubmit = async e => { }), }); if (r.ok) location.href = '/'; - else msg.textContent = await r.text() || 'Sign in failed'; + else msg.textContent = await r.text() || 'Unable to sign in. Check your name and password.'; }; diff --git a/web/src/player.ts b/web/src/player.ts index 1e034db..364277d 100644 --- a/web/src/player.ts +++ b/web/src/player.ts @@ -33,7 +33,7 @@ function setSrc(url: string): Promise|null{ return ready.then(()=>{ // Its playlist and audio requests join the trace of the tap that played them (#192). hls=new w.Hls({xhrSetup:(xhr: XMLHttpRequest)=>xhr.setRequestHeader('traceparent',traceparent())}); - hls.on(w.Hls.Events.ERROR,(_: string,d: {fatal: boolean, type: string, details: string})=>{ if(d.fatal){ toast('Unable to play the DeadAir version. Try again, or turn DeadAir off for this show.',true); + hls.on(w.Hls.Events.ERROR,(_: string,d: {fatal: boolean, type: string, details: string})=>{ if(d.fatal){ toast('Unable to play the DeadAir version. Try again, or turn DeadAir off for this podcast.',true); report('player_error',{msg:`hls.js: ${d.type} ${d.details}`,feed:player.feed,enclosure:player.enc}); } }); hls.loadSource(url); hls.attachMedia(audio); }); @@ -247,7 +247,7 @@ function paintDead(){ if(!f||b.hidden) return; b.setAttribute('aria-pressed',String(!!f.deadair)); b.innerHTML=tile(f.deadair?'deadair-on':'deadair-off'); - b.title=f.deadair?'DeadAir is cutting the dead air from this show':'DeadAir: cut the dead air from this show'; + b.title=f.deadair?'DeadAir is cutting the dead air from this podcast':'DeadAir: cut the dead air from this podcast'; } $('#pdead').onclick=async()=>{ const f=S.feeds.find(x=>x.id===player.feed); if(!f) return; @@ -256,8 +256,8 @@ $('#pdead').onclick=async()=>{ catch(err){ toast(why(err),true); return; } f.deadair=on; paintDead(); const switched=await switchVersion(); - toast(!on?'DeadAir is off for this show':switched?'DeadAir is cutting the dead air from this show' - :'DeadAir is on for this show. Episodes lose their dead air a few minutes after they download.'); + toast(!on?'DeadAir is off for this podcast':switched?'DeadAir is cutting the dead air from this podcast' + :'DeadAir is on for this podcast. Episodes lose their dead air a few minutes after they download.'); renderEntries(); }; /// Carries on at the same place in the other version of what is playing, once DeadAir has been @@ -352,7 +352,7 @@ function keysModal(){ [g('a'),'All Subscriptions'],[g('d'),'Directory'], [g('u'),'Up Next'],[g('l'),'Currently Listening'],[g('s'),'Settings'], [k('Shift')+' '+k('J'),'Next feed'],[k('Shift')+' '+k('K'),'Previous feed'], - [k('/'),'Search items, Currently Listening or the Directory'],[k('r'),'Refresh'],[k('['),'Show or hide the feed list'], + [k('/'),'Search items, Currently Listening or the Directory'],[k('r'),'Reload the lists'],[k('['),'Show or hide the feed list'], ['Items'], [k('j')+' or '+k('n'),'Next item'],[k('k')+' or '+k('p'),'Previous item'], [k('Shift')+' '+k('A'),'Mark all read'], diff --git a/web/src/signals.ts b/web/src/signals.ts index f6ce8e2..c3efabf 100644 --- a/web/src/signals.ts +++ b/web/src/signals.ts @@ -144,8 +144,8 @@ function signalModal(sg?: Signal){
diff --git a/web/src/util.ts b/web/src/util.ts index 9fed7ad..1295e9f 100644 --- a/web/src/util.ts +++ b/web/src/util.ts @@ -114,7 +114,7 @@ for(const b of $$('[data-icon]')) b.insertAdjacentHTML('afterbegin',ICON[b.datas /// A search box with an x at its right end that clears it, shown once something is typed (#291). const searchBox=(input: string, cls='')=> - `${input}`; + `${input}`; // Every box's x, wherever it is drawn: cleared as if the typing were deleted, so the box's own input // handler runs and its list comes back whole. document.addEventListener('click',(e: MouseEvent)=>{ @@ -204,7 +204,7 @@ async function api(url: string, opts?: RequestInit): Promise{ // whole 502 page (#219). A 500's words are the daemon's own workings, which its log already // has; they are not something to show the person who pressed the button (#304). const said=!/html/.test(r.headers.get('Content-Type')||'')&&await r.text().catch(()=>''); - throw new Error(r.status===500 ? 'iPX could not do that just now. Try again in a minute.' + throw new Error(r.status===500 ? 'Unable to do that just now. Try again in a minute.' : said || 'Unable to reach iPX just now. Try again in a minute.'); } const pb=wireType(r.headers.get('Content-Type')); @@ -237,7 +237,7 @@ async function copyText(text: string,btn?: HTMLElement){ flash(true); }catch(e){ flash(false); - toast('Could not copy automatically — select the URL and copy it manually',true); + toast('Unable to copy the link. Select it and copy it yourself.',true); } }