diff --git a/install.ps1 b/install.ps1 index d04bc71e8..7c2665d48 100644 --- a/install.ps1 +++ b/install.ps1 @@ -16,7 +16,7 @@ # and Invoke-WebRequest throws on a cut transfer before the hash is read: # the site's build rewrites this line there (scripts/sitebootstrap.py). $mismatchAdvice = "The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that." - $defaultInstallSha256 = "4b4833da4ae715233cbb075e0efe073b1ddfbe1635014470aa89e22af83dda8d" + $defaultInstallSha256 = "8dd510a5dbc2468248a74e7bb53b791729b194a6ab97e4cc9d900ffa620fa2ba" $maximumInstallerBytes = 2MB $installerExit = 0 $installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null } diff --git a/install.py b/install.py index 81e14d197..2c3330387 100644 --- a/install.py +++ b/install.py @@ -3278,7 +3278,7 @@ def did_you_mean( if by_key[k] not in close: close.append(by_key[k]) if close: - return f"Did you mean: {', '.join(close[:3])}? {listing} lists all {len(known)}." + return f"Close matches: {', '.join(close[:3])}. {listing} lists all {len(known)}." if len(known) <= SHORT_LIST: return f"Known: {', '.join(known)}." return f"{listing} lists all {len(known)}." @@ -4605,7 +4605,7 @@ def canonical_region(raw: str) -> str: import difflib # noqa: PLC0415 close = difflib.get_close_matches(key, [*REGION_ALIASES, *REGIONS], n=3, cutoff=0.5) - hint = f" Did you mean: {', '.join(close)}?" if close else "" + hint = f" Close matches: {', '.join(close)}." if close else "" raise ValueError( f"unknown region: {raw.strip()}.{hint} " f"Short forms: {', '.join(REGION_ALIASES)}. Regions: " @@ -5632,7 +5632,7 @@ def _kept_lines() -> list[str]: lines = [] for item in KEPT.summary(): folder = Path(item["folder"]) - lines.append(f"Kept {_plural(item['files'], 'file')} you had " + lines.append(f"Kept {_plural(item['files'], 'file')} already there " f"({format_size(item['bytes'])}), which the collection's " f"copies replaced, in {folder}") lines.append(f" To put them back: {_INVOCATION.launcher()} --restore " @@ -5695,7 +5695,7 @@ def restore_kept(run: Path, dry_run: bool = False) -> int: print(f"\nPut back {_plural(restored, 'file')} ({format_size(size)}) under {root}.") if failed: print(f"{_plural(failed, 'file')} could not be put back.", file=sys.stderr) - print(f"The copies are still in {run}. Delete that folder once you no longer need it.") + print(f"The copies are still in {run}. That folder can be deleted once it is no longer needed.") return 1 if failed else 0 @@ -6319,7 +6319,7 @@ TUI_INSTALL_ROW = "Install" TUI_SYSTEMS_ROW = "Choose systems" # The first screen's title: a setup found here, or none, and the list. # which-pack names them from here. -TUI_FOUND_TITLE = "Where do you play?" +TUI_FOUND_TITLE = "Where to install?" TUI_CHOOSE_TITLE = "Which setup?" # Asked after Which setup? where nothing was found, and on a card. TUI_FOLDER_TITLE = "Which folder?" @@ -6781,7 +6781,7 @@ def _offline_remedy(folders: list[str] | None = None, named: bool = False) -> st named = ", ".join(screen_text(shown_path(label)) for label in labels) return (f"They are not in {named}: run the installer again with a pack " f"(--from-pack) or {offline_undo()}.") - return ("Copy them from your old card or a folder (--from), or run the installer " + return ("Copy them from an old card or a folder (--from), or run the installer " f"again with a pack (--from-pack) or {offline_undo()}.") @@ -6857,7 +6857,7 @@ def game_data_missing(names: str, count: int, folders: list[Path]) -> str: # spliced into this sentence, and said again on its own line. return (f"Not available here: {names}, game data " f"{'its game reads' if one else 'their games read'}. Copy " - f"{'it' if one else 'them'} from your own copy of the game{where}.") + f"{'it' if one else 'them'} from an owned copy of the game{where}.") def not_installable_words(count: int, required: int, reasons: dict[str, int]) -> str: @@ -7101,7 +7101,7 @@ def _print_plan( print(f" {term.bold(entry['ref'] + ' data')} {_sized(list(needed.values()))}, " f"from {source}{archive}") for folder, (count, size) in sorted((kept or {}).items()): - print(f"\n Would keep {_plural(count, 'file')} you have ({format_size(size)}), " + print(f"\n Would keep {_plural(count, 'file')} already there ({format_size(size)}), " f"whose contents differ, in {folder}") print("\n Nothing was written. Run without --dry-run to install.") @@ -7962,8 +7962,8 @@ def _choose_platform(title: str, default: str = "", setups: list | None = None, for piece in pieces[1:]: print(" " * len(number) + piece) print(" q) quit") - print("Type a number, a setup's name, or your device's name (Miyoo Mini, R36S).") - usage = (f" Type a number from 1 to {len(choices)}, a setup name or your " + print("Type a number, a setup's name, or the device's name (Miyoo Mini, R36S).") + usage = (f" Type a number from 1 to {len(choices)}, a setup name or the " "device's name, or q to quit.") while True: prompt = f"> [Enter for {display_name(default)}] " if default else "> " @@ -7992,7 +7992,7 @@ def _choose_platform(title: str, default: str = "", setups: list | None = None, print(f" {len(found)} setups run on '{choice.strip()}':") for index, label in found: print(f" {index + 1}) {label}") - print(" Type the number of yours.") + print(" Type the number of the right one.") default = "" continue hint = android_hint(choice, os_type) @@ -8227,7 +8227,7 @@ def unproven_words() -> str: names = _names_and([_mount_name(mount) for mount in drives]) has, it = ("has", "it") if len(drives) == 1 else ("have", "one") return (f"{names} {has} a bios folder but no folder a handheld system writes. " - f"Pick {it} below if your files go there.") + f"Pick {it} below if the BIOS files go there.") def _said_with(label: str, words: str) -> str: @@ -8492,7 +8492,7 @@ def _prompt_platform_choice( labels: dict | None = None, other: Callable[[], list[tuple[str, Path]]] | None = None, ) -> list[tuple[str, Path]]: - """One of the setups found here, as the screen's Where do you play? + """One of the setups found here, as the screen's Where to install? lists them: its labels, Enter taking the first as A does there, and o for another setup or folder (other). Line mode had no Enter default, an All the screen lacks, and no way to another setup once one was found.""" @@ -8863,7 +8863,7 @@ def folder_warnings(plat: str, bios_path: Path, files: list[dict], hint: Invocat return lines -CANNOT_WRITE = "You cannot write to this folder" +CANNOT_WRITE = "This folder cannot be written to" def cannot_write_words(bios_path: Path, plat: str, hint: Invocation, commands: bool, @@ -9076,7 +9076,7 @@ def _prompt_custom_selection( choosable = bool(axes) if choosable: print(f" c) choose {axes}" + (" again" if current is not given else "")) - # The screen's "Copy the BIOS files from your old card or a folder". + # The screen's "Copy the BIOS files from an old card or a folder". copying = not dry_run if copying: print(" f) copy from a folder or an old card") @@ -9162,7 +9162,7 @@ def _print_menu_head( "regions ranked" + (" (--region)" if flag else "") if regions else ""])) named = "" if named == ", " else named if current is not given: - print("\n Counted again for your choices. Nothing is written before Enter.") + print("\n Counted again for these choices. Nothing is written before Enter.") counts = tally(shown) if emptied: # The screen's headline for a choice that keeps no file. @@ -12823,7 +12823,7 @@ def _check_copy_lines( them = "it" if fixed == 1 else "them" lines.append(f" {fixed} of these files {verb} in the BIOS folder in the wrong place: " f"a run without --check copies {them} where the cores open {them}, and " - f"leaves your {'copy' if fixed == 1 else 'copies'} as " + f"leaves the {'copy' if fixed == 1 else 'copies'} found as " f"{'it is' if fixed == 1 else 'they are'}.") for label, count in _counts_by_folder(entries, copies, bios_index): them = "it" if count == 1 else "them" @@ -12868,7 +12868,7 @@ def copy_plan_lines( head = (f"Would fix {sized} misplaced in the BIOS folder, copied where the " "cores open them:" if planned else f"Fixing {sized} misplaced in the BIOS folder: copied where the cores " - "open them, your copies left as they are.") + "open them, the copies found left as they are.") elif key == "=": head = (f"Would copy {sized} the BIOS folder already holds at another " "place of the list:" if planned else @@ -13026,7 +13026,7 @@ def bulk_hint( return [ f" {heavy} pulls {format_size(alone[heavy])} of this " f"{format_size(total)} download. --system naming the systems " - f"you play leaves it out and saves {format_size(alone[heavy])} " + f"played leaves it out and saves {format_size(alone[heavy])} " f"({alone[heavy] * 100 // total}%), --list-systems names them." ] return [] @@ -15262,7 +15262,7 @@ def _install(args: argparse.Namespace, real_stdout: TextIO) -> None: assumed_dests: set[Path] = set() named = args.platform or "" # What detection found, with the screen's labels, and whether the setups - # found are offered as its Where do you play? offers them: always when + # found are offered as its Where to install? screen offers them: always when # detection chose, and when a file list named the platform. setups: list = [] mounted: set = set() @@ -18332,7 +18332,7 @@ def _plan_rows(state: TuiState) -> list[TuiRow]: *([TuiRow("install", "Install anyway")] if rows else [])] # --system given: the choice stays offered, the list widened when it is # opened. With one system named it was neither shown nor changeable. - copy = TuiRow("fromcard", "Copy the BIOS files from your old card or a folder") + copy = TuiRow("fromcard", "Copy the BIOS files from an old card or a folder") if not rows: # Nothing can be installed: the remedy the plan names comes first, # in focus. Choose systems was, whose systems need the internet @@ -19269,7 +19269,7 @@ def _no_setup_reads(state: TuiState, folder: Path | None) -> str: if folder is None: return "" if folder == state.home: - return "No setup reads BIOS files in your home folder." + return "No setup reads BIOS files in the home folder." if folder == Path(folder.anchor): return "No setup reads BIOS files at a drive's root." return "" @@ -21427,7 +21427,7 @@ def _plan_lines(check: dict, dest: Path | None, state: TuiState) -> list: f"{'is' if len(misplaced) == 1 else 'are'} in the wrong place, " f"{'it' if len(misplaced) == 1 else 'they'} will be copied where the " "emulators read " - f"{'it' if len(misplaced) == 1 else 'them'}, your " + f"{'it' if len(misplaced) == 1 else 'them'}, the " f"{'copy' if len(misplaced) == 1 else 'copies'} left as " f"{'it is' if len(misplaced) == 1 else 'they are'}.") if backup: @@ -21616,7 +21616,7 @@ def _view_platforms(state: TuiState, width: int, height: int) -> tuple: # A handheld's owner knows its device, not its system's name: the # filter finds it, and a pad that cannot type finds the cards right # after RetroArch (_cards_first). - pinned.append("Nothing was found here. Choose the setup, or type your device's " + pinned.append("Nothing was found here. Choose the setup, or type the device's " "name (/)." if state.pad in ("both", "keys") else "Nothing was found here. Choose the setup: handhelds come after " "RetroArch.") @@ -21821,7 +21821,7 @@ def _choice_line(state: TuiState) -> list[str]: again by a check of their own, so only ticked systems are left here.""" if tui_flags(state) == state.checked_flags: return [] - return [f"For your {len(state.ticked)} of {len(state.systems)} systems, the exact " + return [f"For the {len(state.ticked)} of {len(state.systems)} systems chosen, the exact " "count comes before the install."] @@ -21903,7 +21903,7 @@ def _view_plan(state: TuiState, width: int, height: int) -> tuple: else "")] if state.regions else [])] said = ", ".join(named) if said and not said.startswith("for "): - said = f"for your choice: {said}" + said = f"for this choice: {said}" # A system --system named that --no-game-data left empty, in line mode's # words. listed = {row["system"] for row in state.systems} @@ -21977,7 +21977,7 @@ def _view_plan(state: TuiState, width: int, height: int) -> tuple: else [line])] rows = tui_rows(state) if width < 54: - rows = [row._replace(label="Copy from your old card or a folder") + rows = [row._replace(label="Copy from an old card or a folder") if row.action == "fromcard" else row for row in rows] # One line: in two, a 40x12 plan dropped it, "1 wrong copy" left # alone to say a file would be replaced. @@ -22126,7 +22126,7 @@ def _view_systems(state: TuiState, width: int, height: int) -> tuple: chosen = _ticked_files(state) total = (f"{len(state.ticked)} of {len(state.systems)} systems: " f"{_plural(len(chosen), 'file')}, {format_size(sum(e['size'] for e in chosen))}" - + (" before your options" if _counts_predate_options(state) else "")) + + (" before the options" if _counts_predate_options(state) else "")) footer = [_styled(total, "title")] focused = rows[min(state.focus.get("systems", 0), len(rows) - 1)] drawn = str(_row_line(focused, True, width)) @@ -22210,7 +22210,7 @@ def _status_footer(state: TuiState) -> list: def _view_cores(state: TuiState, width: int, height: int) -> tuple: # Kept above a list that scrolls: dropped once the rows filled the # screen, 189 cores never said what unticking does. - pinned = ["Untick the cores you do not use: the platform's own files are always kept, " + pinned = ["Untick the cores not in use: the platform's own files are always kept, " "and a core with no extra file reads only those."] return ("Cores", _compose(state, width, height, [], tui_rows(state), (), _status_footer(state), pinned), @@ -22223,7 +22223,7 @@ _STATE_WORDS = {"missing": "missing", "wrong_hash": "wrong copy"} def _pager_items(state: TuiState) -> list: """The text of a screen that scrolls, the same for its view and its keys.""" if state.screen == "misplaced": - return ["They are copied where the emulators read them. Your copies stay where " + return ["They are copied where the emulators read them. The copies found stay where " "they are.", ""] + [f"{event['dest']}: {event['reason']}" for event in _tui_misplaced(state)] if state.screen == "unreadable": @@ -22311,7 +22311,7 @@ def _view_confirm(state: TuiState, width: int, height: int) -> tuple: if str(line).startswith(_FOLDER_LABEL)), len(lines)) lines.insert(at, parts) if any(row.action == "install" for row in tui_rows(state)): - lines.insert(0, "Counted again for your choices. Nothing is written before " + lines.insert(0, "Counted again for these choices. Nothing is written before " "Install.") if not any(row.action == "install" for row in tui_rows(state)) and state.dry is not None: # Back alone: one Back on the bar, and no word of an Install. Titled @@ -22472,7 +22472,7 @@ def unavailable_lines(needed: list[dict], manifest: dict | None, dest: Path | No if firmware: lines.append(f"Not available here, and needed to start " f"{'its emulator' if len(firmware) == 1 else 'their emulators'}: " - f"{named(firmware)}. Your own copy goes in the BIOS folder.") + f"{named(firmware)}. An owned copy goes in the BIOS folder.") if games: lines.append(game_data_missing(named(games), len(games), [ (dest / entry["dest"]).parent for entry in games] if dest else [])) @@ -22574,7 +22574,7 @@ def tui_outcome(state: TuiState) -> tuple[str, list[str]]: ok = {dest for dest, good, _why in state.finished if good} if any(reason and dest in ok for dest, (_folder, reason) in state.local_dests.items()): # A fix copies: the misplaced files are the user's, never moved. - lines.append("Your copies in the wrong place were left as they are.") + lines.append("The copies in the wrong place were left as they are.") if _tui_categories(state) and title != "Stopped" and installed: # As the plan counted them, and as line mode ends, on every result: # the old card's said "6 files copied" and no kind. The data tree diff --git a/install.sh b/install.sh index 2928245a0..464425309 100755 --- a/install.sh +++ b/install.sh @@ -23,7 +23,7 @@ DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/ins # curl or wget stop on a cut transfer before the hash is read: the site's # build rewrites this line there (scripts/sitebootstrap.py). MISMATCH_ADVICE="The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that." -DEFAULT_INSTALL_SHA256="4b4833da4ae715233cbb075e0efe073b1ddfbe1635014470aa89e22af83dda8d" +DEFAULT_INSTALL_SHA256="8dd510a5dbc2468248a74e7bb53b791729b194a6ab97e4cc9d900ffa620fa2ba" MAX_INSTALLER_BYTES=2097152 cleanup() { diff --git a/install/launchers/index.json b/install/launchers/index.json index 532115760..5904a0e9b 100644 --- a/install/launchers/index.json +++ b/install/launchers/index.json @@ -27,8 +27,8 @@ { "dest": "roms/ports/retrobios/install.py", "repo_path": "install.py", - "size": 1125299, - "sha256": "4b4833da4ae715233cbb075e0efe073b1ddfbe1635014470aa89e22af83dda8d", + "size": 1125340, + "sha256": "8dd510a5dbc2468248a74e7bb53b791729b194a6ab97e4cc9d900ffa620fa2ba", "executable": false }, { @@ -62,8 +62,8 @@ { "dest": "roms/ports/retrobios/tui.txt", "repo_path": "ports/shared/tui.txt", - "size": 36434, - "sha256": "fa05432a9a4325f3fd3220eec0548ad932dffc1888b93a08af2047cc78aa4d0c", + "size": 36432, + "sha256": "daa51e746e7930863b6e746d3beadfba615c0ad4017fee8413269a15c93ecb92", "executable": false } ] @@ -71,8 +71,8 @@ "muos": { "archive": { "dest": "ARCHIVE/RetroBIOS.muxapp", - "size": 1178926, - "sha256": "e323c16d792945916f4352442ee7bcfcb4194f13e50d70150b05684adf2d0d88" + "size": 1178965, + "sha256": "beaf9d9caafd8e94953605a78fb878787a811646065764ed325b38223eb6a479" }, "members": [ { @@ -92,8 +92,8 @@ { "name": "RetroBIOS/install.py", "repo_path": "install.py", - "size": 1125299, - "sha256": "4b4833da4ae715233cbb075e0efe073b1ddfbe1635014470aa89e22af83dda8d", + "size": 1125340, + "sha256": "8dd510a5dbc2468248a74e7bb53b791729b194a6ab97e4cc9d900ffa620fa2ba", "executable": false }, { @@ -141,8 +141,8 @@ { "name": "RetroBIOS/tui.txt", "repo_path": "ports/shared/tui.txt", - "size": 36434, - "sha256": "fa05432a9a4325f3fd3220eec0548ad932dffc1888b93a08af2047cc78aa4d0c", + "size": 36432, + "sha256": "daa51e746e7930863b6e746d3beadfba615c0ad4017fee8413269a15c93ecb92", "executable": false } ] @@ -166,8 +166,8 @@ { "dest": ".config/modules/retrobios/install.py", "repo_path": "install.py", - "size": 1125299, - "sha256": "4b4833da4ae715233cbb075e0efe073b1ddfbe1635014470aa89e22af83dda8d", + "size": 1125340, + "sha256": "8dd510a5dbc2468248a74e7bb53b791729b194a6ab97e4cc9d900ffa620fa2ba", "executable": false }, { @@ -208,8 +208,8 @@ { "dest": ".config/modules/retrobios/tui.txt", "repo_path": "ports/shared/tui.txt", - "size": 36434, - "sha256": "fa05432a9a4325f3fd3220eec0548ad932dffc1888b93a08af2047cc78aa4d0c", + "size": 36432, + "sha256": "daa51e746e7930863b6e746d3beadfba615c0ad4017fee8413269a15c93ecb92", "executable": false } ] diff --git a/platforms/_guides.yml b/platforms/_guides.yml index 7a4fcb3c1..a874beaf0 100644 --- a/platforms/_guides.yml +++ b/platforms/_guides.yml @@ -372,7 +372,7 @@ guides: - where: From Windows, over the home network path: '`\\RECALBOX\share\bios\`' run: [device] - download_hint: From a computer, use the network folder above. + download_hint: From a computer, use the network folder below. pack_manual: | Option B: Manual (network share) -------------------------------- diff --git a/ports/RetroBIOS/README.md b/ports/RetroBIOS/README.md index 38b35a138..d99ecebf6 100644 --- a/ports/RetroBIOS/README.md +++ b/ports/RetroBIOS/README.md @@ -7,7 +7,7 @@ the system, checks every file its emulators read against its hash, and installs the missing ones. With a network connection the files are downloaded. Without one, copy the -BIOS pack of your system (a `_BIOS_Pack.zip` file from the releases page) +BIOS pack of the system (a `_BIOS_Pack.zip` file from the releases page) into `ports/retrobios` on the card, and RetroBIOS installs from it. Python 3.8 or newer: the system's, or PortMaster's `python_3.11` runtime on diff --git a/ports/RetroBIOS/port.json b/ports/RetroBIOS/port.json index 5ee915834..a6e74bea8 100644 --- a/ports/RetroBIOS/port.json +++ b/ports/RetroBIOS/port.json @@ -13,7 +13,7 @@ ], "desc": "Checks the BIOS folder of this system against the files its emulators read, and downloads the missing ones from the RetroBIOS collection, each verified by its hash.", "desc_md": null, - "inst": "Downloads the files with a network connection. Without one, copy the BIOS pack of your system (a _BIOS_Pack.zip file from github.com/Abdess/retrobios/releases) into ports/retrobios. Uses the system's Python 3.8 or newer, or PortMaster's python_3.11 runtime on aarch64.", + "inst": "Downloads the files with a network connection. Without one, copy the BIOS pack of the system (a _BIOS_Pack.zip file from github.com/Abdess/retrobios/releases) into ports/retrobios. Uses the system's Python 3.8 or newer, or PortMaster's python_3.11 runtime on aarch64.", "inst_md": null, "genres": [ "other" diff --git a/ports/RetroBIOS/retrobios/screens.txt b/ports/RetroBIOS/retrobios/screens.txt index 5e5d16bd2..cc1fb8ce2 100644 --- a/ports/RetroBIOS/retrobios/screens.txt +++ b/ports/RetroBIOS/retrobios/screens.txt @@ -353,7 +353,7 @@ rb_screen_summary() { ;; kept) kept=$((kept + 1)) - rb_entry "summary" "info:kept:$kept" "Kept $(rb_plural "$b" file) you had ($c)" "The collection's copies replaced them. Yours are in $a. Copy what that folder holds into the folder above retrobios-backup to put them back." + rb_entry "summary" "info:kept:$kept" "Kept $(rb_plural "$b" file) already there ($c)" "The collection's copies replaced them. Yours are in $a. Copy what that folder holds into the folder above retrobios-backup to put them back." ;; skipped) rb_entry "summary" "info:skipped:$a" "Not in the collection ($a): $(rb_plural "$b" file)" "Required: $c. The RetroBIOS collection does not hold these files, so they cannot be downloaded." diff --git a/ports/shared/tui.txt b/ports/shared/tui.txt index c6bf99867..5ec41b193 100644 --- a/ports/shared/tui.txt +++ b/ports/shared/tui.txt @@ -863,7 +863,7 @@ rb_here() { return 1 fi other=$(rb_other_card) - if [ -n "$other" ] && rb_ask "Copy the BIOS files from your other card? $other holds files. RetroBIOS copies the ones this system needs, each checked by its hash, and leaves that card as it is."; then + if [ -n "$other" ] && rb_ask "Copy the BIOS files from the other card? $other holds files. RetroBIOS copies the ones this system needs, each checked by its hash, and leaves that card as it is."; then args=(--from "$other") fi pack=$(rb_find_pack) @@ -874,7 +874,7 @@ rb_here() { if [ -z "$pack" ]; then if [ "${#args[@]}" -gt 0 ]; then # --from needs the list of files, which comes from the network or a pack. - rb_message "$(rb_pack_text) The pack carries the list of files: with it, the files on your other card are copied too." + rb_message "$(rb_pack_text) The pack carries the list of files: with it, the files on the other card are copied too." else rb_message "$(rb_pack_text)" fi diff --git a/scripts/common.py b/scripts/common.py index b717ec9bb..968320769 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -112,7 +112,7 @@ def load_database(db_path: str) -> dict: ) if close: raise DatabaseUnreadable( - f"{db_path} not found. Did you mean {typed.with_name(close[0])}?" + f"{db_path} not found. Close match: {typed.with_name(close[0])}" ) from None raise DatabaseUnreadable( f"{db_path} not found. Build it with: python scripts/generate_db.py " @@ -665,7 +665,7 @@ def suggest_names( close = sorted({m for name in typed for m in difflib.get_close_matches(name, available, n=3, cutoff=0.6)}) if close: - return f"Did you mean: {', '.join(close)}? {listing_flag} lists all {total}." + return f"Close matches: {', '.join(close)}. {listing_flag} lists all {total}." if len(available) <= SHORT_LIST: return f"Known: {', '.join(available)}." return f"{listing_flag} lists all {total}." @@ -733,7 +733,7 @@ def require_platform(name: str, platforms_dir: str = "platforms") -> None: known = list_registered_platforms(platforms_dir) close = difflib.get_close_matches(name, known, n=1) - hint = f" Did you mean '{close[0]}'?" if close else "" + hint = f" Close match: '{close[0]}'." if close else "" raise SystemExit( f"ERROR: unknown platform '{name}'.{hint}\nKnown platforms: {', '.join(known)}" ) @@ -3661,7 +3661,7 @@ def _unknown_target_message(target: str, platforms: list[str], platforms_dir: st close = difflib.get_close_matches(target, sorted(owners), n=3, cutoff=0.6) if close: named = ", ".join(f"{n} ({', '.join(sorted(owners[n]))})" for n in close) - return f"{message} Did you mean: {named}?" + return f"{message} Close matches: {named}." return (f"{message} python scripts/verify.py --platform --list-targets " "lists the targets of one platform.") diff --git a/scripts/generate_site.py b/scripts/generate_site.py index 6a4cc5978..fc14074cb 100644 --- a/scripts/generate_site.py +++ b/scripts/generate_site.py @@ -517,8 +517,8 @@ def generate_home( "## Three steps", "", *markup.steps([ - "**Pick the device.** Its page shows the BIOS folder.", - "**Run one command.** Some setups have a ZIP.", + "**Pick the device.** Its page gives one line to copy.", + "**Paste it, press Enter.** Some setups have a ZIP.", "**Start a game.**", ]), *install_demo(), @@ -4519,6 +4519,8 @@ def _platform_guide(name: str, display: str, cov: dict, registry: dict, no_list: guide = GUIDES[name] entry = registry.get(name, {}) extract_to = entry.get("extract_to") + # An app's page opens on the command: one line to paste is the shortest + # way to a working setup, and the folder table is what a manual copy needs. lines = ["## Where the files go", ""] if guide.lead: lines += [guide.lead, ""] @@ -4542,6 +4544,7 @@ def _platform_guide(name: str, display: str, cov: dict, registry: dict, no_list: if guide.on_card: lines += ["", ""] if _computer_first(name, guide): + # The ZIP copied over the network needs the folder table above it. lines += [ *_guide_download(name, display, guide, extract_to, "## From a computer { #download }"), @@ -4549,10 +4552,12 @@ def _platform_guide(name: str, display: str, cov: dict, registry: dict, no_list: *_guide_install(name, guide, "## On the device { #install }"), ] else: - lines += [ + where = lines + lines = [ *_setup_routes(name, display, page_link=True), *_guide_download(name, display, guide, extract_to, "## Download"), *_offline_line(name), + *where, ] check_args = {key: f"{args} --check" for key, args in platform_args(name, guide).items()} lines += [ diff --git a/scripts/region.py b/scripts/region.py index 52e726d81..2d0a69552 100644 --- a/scripts/region.py +++ b/scripts/region.py @@ -129,7 +129,7 @@ def unknown_region_message(raw: str, aliases: dict[str, str], regions: frozenset spelled = raw.strip() close = difflib.get_close_matches(spelled.lower(), [*aliases, *regions], n=3, cutoff=0.5) - hint = f" Did you mean: {', '.join(close)}?" if close else "" + hint = f" Close matches: {', '.join(close)}." if close else "" return ( f"unknown region: {spelled}.{hint} Short forms: {', '.join(aliases)}; " f"regions: {', '.join(sorted(regions))}" diff --git a/tests/fixtures/tui/colour-120x40.txt b/tests/fixtures/tui/colour-120x40.txt index d32e6cc18..536322f7f 100644 --- a/tests/fixtures/tui/colour-120x40.txt +++ b/tests/fixtures/tui/colour-120x40.txt @@ -1,5 +1,5 @@ === setup -^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Where do you play?^[[0m +^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Where to install?^[[0m Found on this machine: @@ -337,7 +337,7 @@ ^[[0;7;35m > Install^[[0m Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit @@ -534,8 +534,8 @@ === cores ^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Cores^[[0m - Untick the cores you do not use: the platform's own files are always kept, and a core with no - extra file reads only those. + Untick the cores not in use: the platform's own files are always kept, and a core with no extra + file reads only those. ^[[0;7;35m > Filter (/ to type)^[[0m [ ] mesen 1 file, 8.0 KB @@ -657,7 +657,7 @@ === confirm ^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Confirm^[[0m - Counted again for your choices. Nothing is written before Install. + Counted again for these choices. Nothing is written before Install. ^[[0;1m ^[[0;1;35m1^[[0;1m file to download, ^[[0;1;35m16.0 KB^[[0m BIOS folder: ^[[0;1m~/.config/retroarch/system^[[0m 0 in place, 1 missing, 0 wrong copies @@ -917,7 +917,7 @@ Only what starts: no Show the games Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit diff --git a/tests/fixtures/tui/colour-40x12.txt b/tests/fixtures/tui/colour-40x12.txt index ff7783db6..ce9ed9559 100644 --- a/tests/fixtures/tui/colour-40x12.txt +++ b/tests/fixtures/tui/colour-40x12.txt @@ -1,5 +1,5 @@ === setup -^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Where do you play?^[[0m +^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Where to install?^[[0m Found on this machine: @@ -111,7 +111,7 @@ ^[[0;33m1 wrong copy^[[0m: backed up, replaced. ^[[0;7;35m > Install^[[0m Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit ^[[0;1;35mA^[[0m Install ^[[0;2mB^[[0m Back ^[[0;2mY^[[0m Options ^[[0;2m?^[[0m Help @@ -170,7 +170,7 @@ === cores ^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Cores^[[0m - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. @@ -209,7 +209,7 @@ === confirm ^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Confirm^[[0m - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. ^[[0;1m ^[[0;1;35m1^[[0;1m file to download, ^[[0;1;35m16.0 KB^[[0m BIOS folder: ^[[0;1m~/.co.../retroarch/system^[[0m diff --git a/tests/fixtures/tui/colour-40x15.txt b/tests/fixtures/tui/colour-40x15.txt index 080003c4a..8b56ed9b5 100644 --- a/tests/fixtures/tui/colour-40x15.txt +++ b/tests/fixtures/tui/colour-40x15.txt @@ -1,5 +1,5 @@ === setup -^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Where do you play?^[[0m +^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Where to install?^[[0m Found on this machine: @@ -138,7 +138,7 @@ ^[[0;7;35m > Install^[[0m Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit ^[[0;1;35mA^[[0m Install ^[[0;2mB^[[0m Back ^[[0;2mY^[[0m Options ^[[0;2m?^[[0m Help @@ -209,7 +209,7 @@ === cores ^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Cores^[[0m - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. @@ -257,7 +257,7 @@ === confirm ^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Confirm^[[0m - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. ^[[0;1m ^[[0;1;35m1^[[0;1m file to download, ^[[0;1;35m16.0 KB^[[0m BIOS folder: ^[[0;1m~/.co.../retroarch/system^[[0m @@ -362,7 +362,7 @@ Only what starts: no Show the games Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit ^[[0;1;35mA^[[0m Install ^[[0;2mB^[[0m Back ^[[0;2mY^[[0m Options ^[[0;2m?^[[0m Help diff --git a/tests/fixtures/tui/colour-80x24.txt b/tests/fixtures/tui/colour-80x24.txt index 5a7109179..1fbde9a63 100644 --- a/tests/fixtures/tui/colour-80x24.txt +++ b/tests/fixtures/tui/colour-80x24.txt @@ -1,5 +1,5 @@ === setup -^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Where do you play?^[[0m +^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Where to install?^[[0m Found on this machine: @@ -209,7 +209,7 @@ ^[[0;7;35m > Install^[[0m Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit @@ -326,8 +326,8 @@ === cores ^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Cores^[[0m - Untick the cores you do not use: the platform's own files are always kept, and - a core with no extra file reads only those. + Untick the cores not in use: the platform's own files are always kept, and a + core with no extra file reads only those. ^[[0;7;35m > Filter (/ to type)^[[0m [ ] mesen 1 file, 8.0 KB @@ -401,7 +401,7 @@ === confirm ^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Confirm^[[0m - Counted again for your choices. Nothing is written before Install. + Counted again for these choices. Nothing is written before Install. ^[[0;1m ^[[0;1;35m1^[[0;1m file to download, ^[[0;1;35m16.0 KB^[[0m BIOS folder: ^[[0;1m~/.config/retroarch/system^[[0m 0 in place, 1 missing, 0 wrong copies @@ -565,7 +565,7 @@ Only what starts: no Show the games Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit diff --git a/tests/fixtures/tui/confirm-120x40.txt b/tests/fixtures/tui/confirm-120x40.txt index ec7e73637..c870132df 100644 --- a/tests/fixtures/tui/confirm-120x40.txt +++ b/tests/fixtures/tui/confirm-120x40.txt @@ -1,6 +1,6 @@ RetroBIOS: Confirm - Counted again for your choices. Nothing is written before Install. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.config/retroarch/system 0 in place, 1 missing, 0 wrong copies diff --git a/tests/fixtures/tui/confirm-40x12.txt b/tests/fixtures/tui/confirm-40x12.txt index 704d86a7a..9e57bb545 100644 --- a/tests/fixtures/tui/confirm-40x12.txt +++ b/tests/fixtures/tui/confirm-40x12.txt @@ -1,6 +1,6 @@ RetroBIOS: Confirm - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.co.../retroarch/system diff --git a/tests/fixtures/tui/confirm-40x15.txt b/tests/fixtures/tui/confirm-40x15.txt index 6cb81ee9f..d18f06885 100644 --- a/tests/fixtures/tui/confirm-40x15.txt +++ b/tests/fixtures/tui/confirm-40x15.txt @@ -1,6 +1,6 @@ RetroBIOS: Confirm - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.co.../retroarch/system diff --git a/tests/fixtures/tui/confirm-80x24.txt b/tests/fixtures/tui/confirm-80x24.txt index b373fe4db..a44f71b14 100644 --- a/tests/fixtures/tui/confirm-80x24.txt +++ b/tests/fixtures/tui/confirm-80x24.txt @@ -1,6 +1,6 @@ RetroBIOS: Confirm - Counted again for your choices. Nothing is written before Install. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.config/retroarch/system 0 in place, 1 missing, 0 wrong copies diff --git a/tests/fixtures/tui/cores-120x40.txt b/tests/fixtures/tui/cores-120x40.txt index 4bc230c78..bbb58ad5b 100644 --- a/tests/fixtures/tui/cores-120x40.txt +++ b/tests/fixtures/tui/cores-120x40.txt @@ -1,7 +1,7 @@ RetroBIOS: Cores - Untick the cores you do not use: the platform's own files are always kept, and a core with no - extra file reads only those. + Untick the cores not in use: the platform's own files are always kept, and a core with no extra + file reads only those. > Filter (/ to type) [ ] mesen 1 file, 8.0 KB diff --git a/tests/fixtures/tui/cores-40x12.txt b/tests/fixtures/tui/cores-40x12.txt index 1ce5c1751..627b924c6 100644 --- a/tests/fixtures/tui/cores-40x12.txt +++ b/tests/fixtures/tui/cores-40x12.txt @@ -1,6 +1,6 @@ RetroBIOS: Cores - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. diff --git a/tests/fixtures/tui/cores-40x15.txt b/tests/fixtures/tui/cores-40x15.txt index 650545a60..64d1e0898 100644 --- a/tests/fixtures/tui/cores-40x15.txt +++ b/tests/fixtures/tui/cores-40x15.txt @@ -1,6 +1,6 @@ RetroBIOS: Cores - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. diff --git a/tests/fixtures/tui/cores-80x24.txt b/tests/fixtures/tui/cores-80x24.txt index bf4061884..d4e6da2b3 100644 --- a/tests/fixtures/tui/cores-80x24.txt +++ b/tests/fixtures/tui/cores-80x24.txt @@ -1,7 +1,7 @@ RetroBIOS: Cores - Untick the cores you do not use: the platform's own files are always kept, and - a core with no extra file reads only those. + Untick the cores not in use: the platform's own files are always kept, and a + core with no extra file reads only those. > Filter (/ to type) [ ] mesen 1 file, 8.0 KB diff --git a/tests/fixtures/tui/plan-120x40.txt b/tests/fixtures/tui/plan-120x40.txt index 3e51059e0..3ca54cb75 100644 --- a/tests/fixtures/tui/plan-120x40.txt +++ b/tests/fixtures/tui/plan-120x40.txt @@ -8,7 +8,7 @@ > Install Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit diff --git a/tests/fixtures/tui/plan-40x12.txt b/tests/fixtures/tui/plan-40x12.txt index 1bf24ccb2..ef7c55353 100644 --- a/tests/fixtures/tui/plan-40x12.txt +++ b/tests/fixtures/tui/plan-40x12.txt @@ -6,7 +6,7 @@ 1 wrong copy: backed up, replaced. > Install Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit A Install B Back Y Options ? Help diff --git a/tests/fixtures/tui/plan-40x15.txt b/tests/fixtures/tui/plan-40x15.txt index 246ecf5bf..bf4817eda 100644 --- a/tests/fixtures/tui/plan-40x15.txt +++ b/tests/fixtures/tui/plan-40x15.txt @@ -9,7 +9,7 @@ > Install Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit A Install B Back Y Options ? Help diff --git a/tests/fixtures/tui/plan-80x24.txt b/tests/fixtures/tui/plan-80x24.txt index 5a583340e..112f7c53a 100644 --- a/tests/fixtures/tui/plan-80x24.txt +++ b/tests/fixtures/tui/plan-80x24.txt @@ -8,7 +8,7 @@ > Install Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit diff --git a/tests/fixtures/tui/plan-games-120x40.txt b/tests/fixtures/tui/plan-games-120x40.txt index a521bb609..14b9e837a 100644 --- a/tests/fixtures/tui/plan-games-120x40.txt +++ b/tests/fixtures/tui/plan-games-120x40.txt @@ -14,7 +14,7 @@ Only what starts: no Show the games Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit diff --git a/tests/fixtures/tui/plan-games-40x15.txt b/tests/fixtures/tui/plan-games-40x15.txt index c80f21908..b8573927e 100644 --- a/tests/fixtures/tui/plan-games-40x15.txt +++ b/tests/fixtures/tui/plan-games-40x15.txt @@ -9,7 +9,7 @@ Only what starts: no Show the games Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit A Install B Back Y Options ? Help diff --git a/tests/fixtures/tui/plan-games-80x24.txt b/tests/fixtures/tui/plan-games-80x24.txt index cdaaa81b0..a6389d14b 100644 --- a/tests/fixtures/tui/plan-games-80x24.txt +++ b/tests/fixtures/tui/plan-games-80x24.txt @@ -14,7 +14,7 @@ Only what starts: no Show the games Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit diff --git a/tests/fixtures/tui/route-evmapy.txt b/tests/fixtures/tui/route-evmapy.txt index 18bc3d791..5f3beed24 100644 --- a/tests/fixtures/tui/route-evmapy.txt +++ b/tests/fixtures/tui/route-evmapy.txt @@ -1,5 +1,5 @@ === setup 40x12 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -12,7 +12,7 @@ ES-DE: files go to each emulator. A Continue B Quit === setup 40x15 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -28,7 +28,7 @@ A Continue B Quit === setup 80x24 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -410,7 +410,7 @@ 1 wrong copy: backed up, replaced. > Install Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit A Install B Back Y Options @@ -426,7 +426,7 @@ > Install Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit A Install B Back Y Options @@ -441,7 +441,7 @@ > Install Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit @@ -674,7 +674,7 @@ === cores 40x12 RetroBIOS: Cores - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. @@ -687,7 +687,7 @@ === cores 40x15 RetroBIOS: Cores - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. @@ -703,8 +703,8 @@ === cores 80x24 RetroBIOS: Cores - Untick the cores you do not use: the platform's own files are always kept, and - a core with no extra file reads only those. + Untick the cores not in use: the platform's own files are always kept, and a + core with no extra file reads only those. > Filter (with a keyboard) [ ] mesen 1 file, 8.0 KB @@ -778,7 +778,7 @@ === confirm 40x12 RetroBIOS: Confirm - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.co.../retroarch/system @@ -791,7 +791,7 @@ === confirm 40x15 RetroBIOS: Confirm - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.co.../retroarch/system @@ -807,7 +807,7 @@ === confirm 80x24 RetroBIOS: Confirm - Counted again for your choices. Nothing is written before Install. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.config/retroarch/system 0 in place, 1 missing, 0 wrong copies @@ -1079,7 +1079,7 @@ Only what starts: no Show the games Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit A Install B Back Y Options @@ -1100,7 +1100,7 @@ Only what starts: no Show the games Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit diff --git a/tests/fixtures/tui/route-gptokeyb.txt b/tests/fixtures/tui/route-gptokeyb.txt index cce15c7bf..13e24690f 100644 --- a/tests/fixtures/tui/route-gptokeyb.txt +++ b/tests/fixtures/tui/route-gptokeyb.txt @@ -1,5 +1,5 @@ === setup 40x12 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -12,7 +12,7 @@ ES-DE: files go to each emulator. A Continue B Quit === setup 40x15 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -28,7 +28,7 @@ A Continue B Quit === setup 80x24 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -410,7 +410,7 @@ 1 wrong copy: backed up, replaced. > Install Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit A Install B Back Y Options @@ -426,7 +426,7 @@ > Install Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit A Install B Back Y Options @@ -441,7 +441,7 @@ > Install Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit @@ -674,7 +674,7 @@ === cores 40x12 RetroBIOS: Cores - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. @@ -687,7 +687,7 @@ === cores 40x15 RetroBIOS: Cores - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. @@ -703,8 +703,8 @@ === cores 80x24 RetroBIOS: Cores - Untick the cores you do not use: the platform's own files are always kept, and - a core with no extra file reads only those. + Untick the cores not in use: the platform's own files are always kept, and a + core with no extra file reads only those. > Filter (with a keyboard) [ ] mesen 1 file, 8.0 KB @@ -778,7 +778,7 @@ === confirm 40x12 RetroBIOS: Confirm - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.co.../retroarch/system @@ -791,7 +791,7 @@ === confirm 40x15 RetroBIOS: Confirm - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.co.../retroarch/system @@ -807,7 +807,7 @@ === confirm 80x24 RetroBIOS: Confirm - Counted again for your choices. Nothing is written before Install. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.config/retroarch/system 0 in place, 1 missing, 0 wrong copies @@ -1079,7 +1079,7 @@ Only what starts: no Show the games Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit A Install B Back Y Options @@ -1100,7 +1100,7 @@ Only what starts: no Show the games Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit diff --git a/tests/fixtures/tui/route-gptokeyb_muxterm.txt b/tests/fixtures/tui/route-gptokeyb_muxterm.txt index 359cccd65..9342b9667 100644 --- a/tests/fixtures/tui/route-gptokeyb_muxterm.txt +++ b/tests/fixtures/tui/route-gptokeyb_muxterm.txt @@ -1,5 +1,5 @@ === setup 40x12 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -12,7 +12,7 @@ ES-DE: files go to each emulator. A Continue B Quit === setup 40x15 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -28,7 +28,7 @@ A Continue B Quit === setup 80x24 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -410,7 +410,7 @@ 1 wrong copy: backed up, replaced. > Install Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit A Install B Back Y Options @@ -426,7 +426,7 @@ > Install Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit A Install B Back Y Options @@ -441,7 +441,7 @@ > Install Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit @@ -674,7 +674,7 @@ === cores 40x12 RetroBIOS: Cores - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. @@ -687,7 +687,7 @@ === cores 40x15 RetroBIOS: Cores - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. @@ -703,8 +703,8 @@ === cores 80x24 RetroBIOS: Cores - Untick the cores you do not use: the platform's own files are always kept, and - a core with no extra file reads only those. + Untick the cores not in use: the platform's own files are always kept, and a + core with no extra file reads only those. > Filter (with a keyboard) [ ] mesen 1 file, 8.0 KB @@ -778,7 +778,7 @@ === confirm 40x12 RetroBIOS: Confirm - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.co.../retroarch/system @@ -791,7 +791,7 @@ === confirm 40x15 RetroBIOS: Confirm - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.co.../retroarch/system @@ -807,7 +807,7 @@ === confirm 80x24 RetroBIOS: Confirm - Counted again for your choices. Nothing is written before Install. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.config/retroarch/system 0 in place, 1 missing, 0 wrong copies @@ -1079,7 +1079,7 @@ Only what starts: no Show the games Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit A Install B Back Y Options @@ -1100,7 +1100,7 @@ Only what starts: no Show the games Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit diff --git a/tests/fixtures/tui/route-keys.txt b/tests/fixtures/tui/route-keys.txt index 1c811c4b0..4d2e586eb 100644 --- a/tests/fixtures/tui/route-keys.txt +++ b/tests/fixtures/tui/route-keys.txt @@ -1,5 +1,5 @@ === setup 40x12 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -12,7 +12,7 @@ ES-DE: files go to each emulator. Enter Continue Esc Quit ? Help === setup 40x15 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -28,7 +28,7 @@ Enter Continue Esc Quit ? Help === setup 80x24 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -385,7 +385,7 @@ 1 wrong copy: backed up, replaced. > Install Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit Enter Install Esc Back o Options @@ -401,7 +401,7 @@ > Install Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit Enter Install Esc Back o Options @@ -416,7 +416,7 @@ > Install Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit @@ -649,7 +649,7 @@ === cores 40x12 RetroBIOS: Cores - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. @@ -662,7 +662,7 @@ === cores 40x15 RetroBIOS: Cores - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. @@ -678,8 +678,8 @@ === cores 80x24 RetroBIOS: Cores - Untick the cores you do not use: the platform's own files are always kept, and - a core with no extra file reads only those. + Untick the cores not in use: the platform's own files are always kept, and a + core with no extra file reads only those. > Filter (/ to type) [ ] mesen 1 file, 8.0 KB @@ -811,7 +811,7 @@ === confirm 40x12 RetroBIOS: Confirm - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.co.../retroarch/system @@ -824,7 +824,7 @@ === confirm 40x15 RetroBIOS: Confirm - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.co.../retroarch/system @@ -840,7 +840,7 @@ === confirm 80x24 RetroBIOS: Confirm - Counted again for your choices. Nothing is written before Install. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.config/retroarch/system 0 in place, 1 missing, 0 wrong copies @@ -1157,7 +1157,7 @@ Only what starts: no Show the games Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit Enter Install Esc Back o Options @@ -1178,7 +1178,7 @@ Only what starts: no Show the games Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit diff --git a/tests/fixtures/tui/route-miyoo.txt b/tests/fixtures/tui/route-miyoo.txt index 5b8879086..ab456df22 100644 --- a/tests/fixtures/tui/route-miyoo.txt +++ b/tests/fixtures/tui/route-miyoo.txt @@ -1,5 +1,5 @@ === setup 40x12 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -12,7 +12,7 @@ ES-DE: files go to each emulator. A Continue R2 Quit === setup 40x15 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -28,7 +28,7 @@ A Continue R2 Quit === setup 80x24 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -439,7 +439,7 @@ 1 wrong copy: backed up, replaced. > Install Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit A Install R2 Back L2 Options @@ -455,7 +455,7 @@ > Install Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit A Install R2 Back L2 Options @@ -470,7 +470,7 @@ > Install Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit @@ -703,7 +703,7 @@ === cores 40x12 RetroBIOS: Cores - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. @@ -716,7 +716,7 @@ === cores 40x15 RetroBIOS: Cores - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. @@ -732,8 +732,8 @@ === cores 80x24 RetroBIOS: Cores - Untick the cores you do not use: the platform's own files are always kept, and - a core with no extra file reads only those. + Untick the cores not in use: the platform's own files are always kept, and a + core with no extra file reads only those. > Filter (with a keyboard) [ ] mesen 1 file, 8.0 KB @@ -807,7 +807,7 @@ === confirm 40x12 RetroBIOS: Confirm - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.co.../retroarch/system @@ -820,7 +820,7 @@ === confirm 40x15 RetroBIOS: Confirm - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.co.../retroarch/system @@ -836,7 +836,7 @@ === confirm 80x24 RetroBIOS: Confirm - Counted again for your choices. Nothing is written before Install. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.config/retroarch/system 0 in place, 1 missing, 0 wrong copies @@ -1153,7 +1153,7 @@ Only what starts: no Show the games Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit A Install R2 Back L2 Options @@ -1174,7 +1174,7 @@ Only what starts: no Show the games Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit diff --git a/tests/fixtures/tui/route-muxterm.txt b/tests/fixtures/tui/route-muxterm.txt index 83f8c5511..2f19f13e7 100644 --- a/tests/fixtures/tui/route-muxterm.txt +++ b/tests/fixtures/tui/route-muxterm.txt @@ -1,5 +1,5 @@ === setup 40x12 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -12,7 +12,7 @@ ES-DE: files go to each emulator. Start Continue B Quit === setup 40x15 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -28,7 +28,7 @@ Start Continue B Quit === setup 80x24 - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: @@ -439,7 +439,7 @@ 1 wrong copy: backed up, replaced. > Install Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit Start Install B Back @@ -455,7 +455,7 @@ > Install Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit Start Install B Back @@ -470,7 +470,7 @@ > Install Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit @@ -703,7 +703,7 @@ === cores 40x12 RetroBIOS: Cores - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. @@ -716,7 +716,7 @@ === cores 40x15 RetroBIOS: Cores - Untick the cores you do not use: the + Untick the cores not in use: the platform's own files are always kept, and a core with no extra file reads only those. @@ -732,8 +732,8 @@ === cores 80x24 RetroBIOS: Cores - Untick the cores you do not use: the platform's own files are always kept, and - a core with no extra file reads only those. + Untick the cores not in use: the platform's own files are always kept, and a + core with no extra file reads only those. > Filter (Select shows a keyboard) [ ] mesen 1 file, 8.0 KB @@ -865,7 +865,7 @@ === confirm 40x12 RetroBIOS: Confirm - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.co.../retroarch/system @@ -878,7 +878,7 @@ === confirm 40x15 RetroBIOS: Confirm - Counted again for your choices. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.co.../retroarch/system @@ -894,7 +894,7 @@ === confirm 80x24 RetroBIOS: Confirm - Counted again for your choices. Nothing is written before Install. + Counted again for these choices. Nothing is written before Install. 1 file to download, 16.0 KB BIOS folder: ~/.config/retroarch/system 0 in place, 1 missing, 0 wrong copies @@ -1211,7 +1211,7 @@ Only what starts: no Show the games Choose systems - Copy from your old card or a folder + Copy from an old card or a folder Options Quit Start Install B Back @@ -1232,7 +1232,7 @@ Only what starts: no Show the games Choose systems - Copy the BIOS files from your old card or a folder + Copy the BIOS files from an old card or a folder Options Quit diff --git a/tests/fixtures/tui/setup-120x40.txt b/tests/fixtures/tui/setup-120x40.txt index b1155958b..b4d31d226 100644 --- a/tests/fixtures/tui/setup-120x40.txt +++ b/tests/fixtures/tui/setup-120x40.txt @@ -1,4 +1,4 @@ - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: diff --git a/tests/fixtures/tui/setup-40x12.txt b/tests/fixtures/tui/setup-40x12.txt index 29dd46547..66b69b8a7 100644 --- a/tests/fixtures/tui/setup-40x12.txt +++ b/tests/fixtures/tui/setup-40x12.txt @@ -1,4 +1,4 @@ - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: diff --git a/tests/fixtures/tui/setup-40x15.txt b/tests/fixtures/tui/setup-40x15.txt index faa6cbd38..963b2d723 100644 --- a/tests/fixtures/tui/setup-40x15.txt +++ b/tests/fixtures/tui/setup-40x15.txt @@ -1,4 +1,4 @@ - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: diff --git a/tests/fixtures/tui/setup-80x24.txt b/tests/fixtures/tui/setup-80x24.txt index 5211e2b3b..1d6372255 100644 --- a/tests/fixtures/tui/setup-80x24.txt +++ b/tests/fixtures/tui/setup-80x24.txt @@ -1,4 +1,4 @@ - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: diff --git a/tests/test_audit_regressions.py b/tests/test_audit_regressions.py index ea06e86c9..751438ffa 100644 --- a/tests/test_audit_regressions.py +++ b/tests/test_audit_regressions.py @@ -6221,7 +6221,7 @@ class TheRepairCommandWritesTheFileNamed(unittest.TestCase): with self.assertRaises(DatabaseUnreadable) as caught: load_database(str(typo)) message = str(caught.exception) - self.assertIn(f"Did you mean {typo.with_name('database.json')}?", message) + self.assertIn(f"Close match: {typo.with_name('database.json')}", message) self.assertNotIn("generate_db.py", message) @@ -7123,7 +7123,7 @@ class PlatformSystemTypoGetsTheClosestNames(unittest.TestCase): ) self.assertIsNone(result) printed = out.getvalue() - self.assertIn("Did you mean: sony-playstation", printed) + self.assertIn("Close matches: sony-playstation", printed) self.assertIn("--platform retroarch --list-systems", printed) self.assertNotIn("3do", printed) @@ -7423,7 +7423,7 @@ class ATargetTypoIsAnErrorInEveryTool(unittest.TestCase): output = proc.stdout + proc.stderr self.assertNotEqual(proc.returncode, 0) self.assertNotIn("Traceback", output) - self.assertIn("Did you mean: switch?", output) + self.assertIn("Close matches: switch.", output) self.assertIn("verify.py --platform retroarch --list-targets", output) diff --git a/tests/test_check_freshness.py b/tests/test_check_freshness.py index c1bf68952..7cdd8dede 100644 --- a/tests/test_check_freshness.py +++ b/tests/test_check_freshness.py @@ -320,7 +320,7 @@ class CoreResolutionTests(unittest.TestCase): self.assertEqual(cf.load_core_info_record(record), {"a": "2", "b": "1"}) with self.assertRaises(cf.InputMissing) as raised: cf.record_core_info({"a": "2", "ghosts": "1"}, ["ghost"], record) - self.assertIn("Did you mean: ghosts?", str(raised.exception)) + self.assertIn("Close matches: ghosts.", str(raised.exception)) def test_record_errors_are_one_line(self): """A mistyped core and an empty offline cache ended on a traceback.""" diff --git a/tests/test_handheld_launchers.py b/tests/test_handheld_launchers.py index 633d6259a..68f530793 100644 --- a/tests/test_handheld_launchers.py +++ b/tests/test_handheld_launchers.py @@ -1782,7 +1782,7 @@ class TheMuosApp(unittest.TestCase): proc = device.run([str(app / "mux_launch.sh"), str(app)], keys="\r", FAKE_CURL="7", RB_CONSOLE=device.console, RB_BIOS_DEST=str(sd2)) self.assertEqual(proc.returncode, 0, proc.stderr.decode()) - self.assertIn("Copy the BIOS files from your other card?", device.screen) + self.assertIn("Copy the BIOS files from the other card?", device.screen) self.assertIn(str(sd1), device.screen) [call] = device.tui_calls() self.assertEqual(call["args"], ["--tui", "--from", str(sd1), "--from-pack", str(pack), @@ -1899,8 +1899,8 @@ class TheToolsEntry(unittest.TestCase): RB_CONSOLE=device.console, RB_OTHER_CARDS=f"{roms}:{roms2}") self.assertEqual(proc.returncode, 1) screen = " ".join(device.screen.split()) - self.assertIn(f"Copy the BIOS files from your other card? {roms} holds files", screen) - self.assertIn("with it, the files on your other card are copied too", screen) + self.assertIn(f"Copy the BIOS files from the other card? {roms} holds files", screen) + self.assertIn("with it, the files on the other card are copied too", screen) self.assertEqual(device.tui_calls(), []) def test_amberelec_console(self): diff --git a/tests/test_install.py b/tests/test_install.py index 049899d73..262a033ed 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -5240,7 +5240,7 @@ class ATypoGetsTheClosestName(unittest.TestCase): err = io.StringIO() with contextlib.redirect_stderr(err), self.assertRaises(SystemExit): install.normalize_platform("spruce") - self.assertIn("Did you mean: spruceOS?", err.getvalue()) + self.assertIn("Close matches: spruceOS.", err.getvalue()) # The distinct names --list-platforms prints: Batocera is both a # platform and a system it recognises. names = [*install.AVAILABLE_PLATFORMS, @@ -5254,7 +5254,7 @@ class ATypoGetsTheClosestName(unittest.TestCase): with contextlib.redirect_stderr(err), self.assertRaises(SystemExit) as raised: install.normalize_platform("batocra") self.assertEqual(raised.exception.code, 2) - self.assertIn("Did you mean: batocera?", err.getvalue()) + self.assertIn("Close matches: batocera.", err.getvalue()) self.assertNotIn("recalbox", err.getvalue()) def test_a_system_is_found_inside_its_full_id(self): @@ -5272,7 +5272,7 @@ class ATypoGetsTheClosestName(unittest.TestCase): with self.assertRaises(ValueError) as raised: install.resolve_choices(["swanstaton"], known, "core") text = str(raised.exception) - self.assertIn("Did you mean: swanstation?", text) + self.assertIn("Close matches: swanstation.", text) self.assertIn("--list-cores lists all 201", text) self.assertNotIn("core17", text) @@ -5287,7 +5287,7 @@ class ATypoGetsTheClosestName(unittest.TestCase): err = io.StringIO() with contextlib.redirect_stderr(err), self.assertRaises(SystemExit): install._unknown_target("swich", "retroarch", {"switch": {}, "desktop": {}}) - self.assertIn("Did you mean: switch?", err.getvalue()) + self.assertIn("Close matches: switch.", err.getvalue()) self.assertIn("--list-targets", err.getvalue()) @@ -7423,7 +7423,7 @@ class KeptFilesEndToEnd(unittest.TestCase, _SyntheticTree): proc = _install_run(self.env, "--platform", "retroarch", "--dest", str(self.bios), "--dry-run", "--no-input") self.assertEqual(proc.returncode, 0, proc.stderr) - self.assertIn("Would keep 1 file you have (11 B)", proc.stdout) + self.assertIn("Would keep 1 file already there (11 B)", proc.stdout) self.assertIn(str(self.home / install.BACKUP_DIR), proc.stdout) self.assertFalse((self.home / install.BACKUP_DIR).exists()) self.assertEqual((self.bios / "b.bin").read_bytes(), b"other bytes") @@ -7440,7 +7440,7 @@ class KeptFilesEndToEnd(unittest.TestCase, _SyntheticTree): self.assertEqual((self.bios / "b.bin").read_bytes(), self.FILES["bios/A/b.bin"]) runs = list((self.home / install.BACKUP_DIR).iterdir()) self.assertEqual(len(runs), 1) - self.assertIn("Kept 1 file you had (11 B), which the collection's copies " + self.assertIn("Kept 1 file already there (11 B), which the collection's copies " f"replaced, in {runs[0]}", proc.stdout) self.assertIn(f"--restore {runs[0]}", proc.stdout) # a.bin held the expected bytes: it is not among the kept files. diff --git a/tests/test_install_from.py b/tests/test_install_from.py index fdcd3634e..2b36b408e 100644 --- a/tests/test_install_from.py +++ b/tests/test_install_from.py @@ -442,7 +442,7 @@ class MisplacedInTheBiosFolder(Scratch): out = self.check() self.assertIn("4 of these files are in the BIOS folder in the wrong place: a run " "without --check copies them where the cores open them, and leaves " - "your copies as they are.", out) + "the copies found as they are.", out) self.assertFalse((self.dest / "scph5501.bin").exists()) def test_dry_run_counts_them_and_writes_nothing(self): diff --git a/tests/test_install_offline.py b/tests/test_install_offline.py index ebb1d8ab1..c9226b185 100644 --- a/tests/test_install_offline.py +++ b/tests/test_install_offline.py @@ -1040,7 +1040,7 @@ class OneOfflineVocabulary(Scratch): self.assertEqual(proc.returncode, 3, out) self.assertNotIn("to fetch them", out) self.assertIn("4 files need the internet, which --offline does not use.", out) - self.assertIn("Copy them from your old card or a folder (--from)", out) + self.assertIn("Copy them from an old card or a folder (--from)", out) def test_the_screen_says_missing_not_failed(self): """On the full screen: "Finished with errors, 20 failed".""" diff --git a/tests/test_install_selection.py b/tests/test_install_selection.py index 6231aa866..43d6f0d16 100644 --- a/tests/test_install_selection.py +++ b/tests/test_install_selection.py @@ -326,7 +326,7 @@ class CommandLineChoices(unittest.TestCase): ("genesis", "sega-mega-drive"), ("gb", "nintendo-gb")): with self.subTest(typed=typed), self.assertRaises(ValueError) as ctx: install.resolve_choices([typed], known, "system") - self.assertIn(f"Did you mean: {meant}", str(ctx.exception)) + self.assertIn(f"Close matches: {meant}", str(ctx.exception)) def test_a_short_name_for_a_system_the_list_lacks_is_not_suggested(self): with self.assertRaises(ValueError) as ctx: @@ -1345,7 +1345,7 @@ class ThePlatformsOwnSystemNamesAreAccepted(unittest.TestCase): self.assertIn("nintendo-gba (gba)", listing.stdout) typo = repo.run("--system", "psxx", "--no-input") self.assertEqual(typo.returncode, 2) - self.assertIn("Did you mean: sony-playstation", typo.stderr) + self.assertIn("Close matches: sony-playstation", typo.stderr) @@ -1484,7 +1484,7 @@ class SystemNamesResolveOneWay(unittest.TestCase): with self.assertRaises(ValueError) as caught: self._resolve("psx,psxx") self.assertIn("unknown system psxx", str(caught.exception)) - self.assertIn("Did you mean: psx?", str(caught.exception)) + self.assertIn("Close matches: psx.", str(caught.exception)) class AnUnknownNativeNameIsRefusedBeforeAnyWork(unittest.TestCase): @@ -1504,7 +1504,7 @@ class AnUnknownNativeNameIsRefusedBeforeAnyWork(unittest.TestCase): cwd=REPO_ROOT, capture_output=True, text=True, timeout=300, ) self.assertEqual(proc.returncode, 2, proc.stdout + proc.stderr) - self.assertIn("unknown system psxx. Did you mean: psx?", proc.stderr) + self.assertIn("unknown system psxx. Close matches: psx.", proc.stderr) self.assertNotIn("Traceback", proc.stderr) self.assertFalse((REPO_ROOT / "tmp" / "never").exists()) @@ -1634,7 +1634,7 @@ class ThePlatformsOwnListAlone(unittest.TestCase): class AnIdAnotherSetupUses(unittest.TestCase): """The Neo Geo card offers `--system snk-neogeo`, and RetroArch, which - files neogeo.zip under arcade, answered "Did you mean: snk-neogeo-cd?".""" + files neogeo.zip under arcade, answered "Close matches: snk-neogeo-cd.".""" KNOWN = ["arcade", "snk-neogeo-cd", "sony-playstation"] HOLDERS = {"snk-neogeo": ["arcade"]} @@ -1649,12 +1649,12 @@ class AnIdAnotherSetupUses(unittest.TestCase): for typed in ("snk-neogeo", "SNK-NeoGeo", "neogeo", "mvs", "aes"): with self.subTest(typed=typed): text = self._refusal(typed) - self.assertIn("Did you mean: arcade?", text) + self.assertIn("Close matches: arcade.", text) self.assertIn("neogeo.zip", text) self.assertNotIn("snk-neogeo-cd", text) def test_a_typo_still_gets_the_closest_names(self): - self.assertIn("Did you mean: snk-neogeo-cd", self._refusal("snk-neogeo-dc", {})) + self.assertIn("Close matches: snk-neogeo-cd", self._refusal("snk-neogeo-dc", {})) def test_holders_are_read_from_the_file_list(self): files = [ @@ -1676,7 +1676,7 @@ class AnIdAnotherSetupUses(unittest.TestCase): capture_output=True, text=True, timeout=120, check=False, stdin=subprocess.DEVNULL) self.assertEqual(proc.returncode, 2, proc.stdout + proc.stderr) - self.assertIn("Did you mean: arcade?", proc.stderr) + self.assertIn("Close matches: arcade.", proc.stderr) self.assertNotIn("snk-neogeo-cd", proc.stderr) self.assertFalse(never.exists()) diff --git a/tests/test_install_tui.py b/tests/test_install_tui.py index 996b81917..1753efc5b 100644 --- a/tests/test_install_tui.py +++ b/tests/test_install_tui.py @@ -815,7 +815,7 @@ class PlanWarnings(unittest.TestCase): state = checked_state({"free": 1024, "writable": False, "cores": []}) text = " ".join(install.tui_view(state, 120, 40)) self.assertIn("Not enough free space: 1.0 MB needed.", text) - self.assertIn("You cannot write to this folder: choose another one.", text) + self.assertIn("This folder cannot be written to: choose another one.", text) # sudo changes the home folder: the advice names this one. self.assertIn("Or run it as root, this folder named: sudo python3 install.py " f"--platform retroarch --dest {SYSTEM_DIR}", @@ -1549,10 +1549,10 @@ class SmallFixes(unittest.TestCase): def test_numbers_from_before_the_options_say_so(self): state = checked_state() state.stack.append("systems") - self.assertNotIn("before your options", "\n".join(install.tui_view(state, 80, 24))) + self.assertNotIn("before the options", "\n".join(install.tui_view(state, 80, 24))) state.regions = ["japan"] footer = "\n".join(install.tui_view(state, 80, 24)[-3:]) - self.assertIn("before your options", footer) + self.assertIn("before the options", footer) def test_a_cores_folder_implies_the_installed_cores(self): state = checked_state() @@ -2156,7 +2156,7 @@ class CopyFromAnOldCard(unittest.TestCase): state = checked_state() row = next(i for i, r in enumerate(install.tui_rows(state)) if r.action == "fromcard") self.assertEqual(install.tui_rows(state)[row].label, - "Copy the BIOS files from your old card or a folder") + "Copy the BIOS files from an old card or a folder") state.focus["plan"] = row state.home = old with mock.patch.object(install, "_mounted_cards", return_value=[]): @@ -2224,7 +2224,7 @@ class CopyFromAnOldCard(unittest.TestCase): # a fix copies, and the screen says the user's # copy stays. self.assertIn("1 file is in the wrong place, it will be copied where the emulators " - "read it, your copy left as it is.", text) + "read it, the copy left as it is.", text) row = next(i for i, r in enumerate(install.tui_rows(state)) if r.action == "misplaced") state.focus["plan"] = row press(state, "enter") @@ -2245,7 +2245,7 @@ class CopyFromAnOldCard(unittest.TestCase): state.finished = [("scph5500.bin", True, ""), ("gba_bios.bin", True, "")] text = " ".join(" ".join(install.tui_outcome(state)[1]).split()) self.assertIn("1 file copied from the wrong place in the BIOS folder, 1 downloaded. " - "Your copies in the wrong place were left as they are.", text) + "The copies in the wrong place were left as they are.", text) def test_a_local_copy_is_no_download_speed(self): state = checked_state() @@ -2681,7 +2681,7 @@ class CardsSpaceAndConfirm(unittest.TestCase): state = self.unavailable_state() _title, lines = install.tui_outcome(state) self.assertIn("Not available here, and needed to start its emulator: gba_extra.bin " - "(Game Boy Advance). Your own copy goes in the BIOS folder.", lines) + "(Game Boy Advance). An owned copy goes in the BIOS folder.", lines) self.assertNotIn("collection", " ".join(lines)) def test_it_is_left_out_when_it_does_not_concern_the_run(self): @@ -3812,7 +3812,7 @@ class BackTicksAndSaveFolder(unittest.TestCase): rows = [row.action for row in install.tui_rows(state)] text = " ".join(" ".join(install.tui_view(state, 120, 40)).split()) self.assertEqual(rows, ["back"]) - self.assertIn("Copy them from your old card or a folder", text) + self.assertIn("Copy them from an old card or a folder", text) state.found = [{"event": "found", "platform": "retroarch", "dest": FILES[0]["dest"], "folder": "/media/old", "path": "/media/old/x", "member": "", "reason": ""}] @@ -3843,7 +3843,7 @@ class BackTicksAndSaveFolder(unittest.TestCase): state = checked_state() state.stack.append("misplaced") self.assertEqual(install._pager_items(state)[0], - "They are copied where the emulators read them. Your copies stay " + "They are copied where the emulators read them. The copies found stay " "where they are.") def test_the_save_folder_is_a_line_of_its_own(self): @@ -4273,9 +4273,9 @@ class AGoesIntoASubfolder(unittest.TestCase): with mock.patch.object(install, "_mounted_cards", return_value=[self.card]): install._browse_to(self.state, self.home) self.assertEqual(self.focused().label, ".cache/") - self.assertIn("No setup reads BIOS files in your home folder", self.state.status) + self.assertIn("No setup reads BIOS files in the home folder", self.state.status) screen = " ".join(" ".join(install.tui_view(self.state, 80, 24)).split()) - self.assertIn("No setup reads BIOS files in your home folder.", screen) + self.assertIn("No setup reads BIOS files in the home folder.", screen) def test_on_windows_the_other_drives_are_passed_over(self): """The card rows are drive roots there (E:\\): at D:\\ the first @@ -4850,7 +4850,7 @@ class EndToEnd(unittest.TestCase): def test_three_presses_install_everything(self): repo = self.repo() term = self.start() - screen = term.wait("Where do you play?") + screen = term.wait("Where to install?") self.assertIn("> RetroArch", screen) term.send("\r") screen = term.wait("files to download") @@ -4899,7 +4899,7 @@ class EndToEnd(unittest.TestCase): self.assertIn("6 files installed", proc.stdout) else: term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") term.send("\r") screen = term.wait("files to download") self.assertIn("6 files to download", screen) @@ -5058,7 +5058,7 @@ class EndToEnd(unittest.TestCase): def test_ctrl_c_on_the_first_screen(self): self.repo() term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") term.send("\x03") self.assertEqual(term.close(), 130) self.assertIn(b"\x1b[?2004l\x1b[0m\x1b[?25h\x1b[?1049l", term.raw) @@ -5068,7 +5068,7 @@ class EndToEnd(unittest.TestCase): self.repo() term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") mark = len(term.raw) os.kill(term.pid, signal.SIGTSTP) end = time.monotonic() + 10 @@ -5093,11 +5093,11 @@ class EndToEnd(unittest.TestCase): """The terminal gone, the farewell has nowhere to go: the code is 129 (SIGHUP), not 120 from the flush failing at exit.""" self.repo() - for screen_name, keys_first in (("Where do you play?", ()), + for screen_name, keys_first in (("Where to install?", ()), ("files to download", ("\r",))): with self.subTest(screen=screen_name): term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") term.send(*keys_first) term.wait(screen_name) os.close(term.fd) @@ -5146,12 +5146,12 @@ class EndToEnd(unittest.TestCase): self.repo() self.env[install.TUI_IDLE_ENV] = "1" term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") self.assertEqual(term.close(), install.QUIT_CODE) self.assertIn("No button pressed, closing.", term.after()) # A key pressed, the screen stays: the person is there. term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") term.send(DOWN) end = time.monotonic() + 2.5 while time.monotonic() < end: @@ -5181,7 +5181,7 @@ class EndToEnd(unittest.TestCase): with self.subTest(env=env): self.env.update(env) term = self.start(cols=40, rows=12) - term.wait("Where do you play?") + term.wait("Where to install?") screen = term.wait(bar) self.assertEqual(screen.splitlines()[-1].strip(), bar) term.send("q") @@ -5192,7 +5192,7 @@ class EndToEnd(unittest.TestCase): def test_resize_redraws(self): self.repo() term = self.start(cols=40, rows=15) - term.wait("Where do you play?") + term.wait("Where to install?") term.resize(100, 30) term.send(DOWN) screen = term.wait("> Another setup or folder") @@ -5200,7 +5200,7 @@ class EndToEnd(unittest.TestCase): term.resize(30, 10) term.wait("40x12 or more, now 30x10") term.resize(40, 12) - term.wait("Where do you play?") + term.wait("Where to install?") term.send("q") self.assertEqual(term.close(), install.QUIT_CODE) @@ -5278,7 +5278,7 @@ class EndToEnd(unittest.TestCase): self.env.pop("NO_COLOR", None) self.env.update({"TERM": "xterm", **env}) term = self.start() - screen = term.wait("Where do you play?") + screen = term.wait("Where to install?") self.assertIn("> RetroArch", screen) screens[name] = screen # pyte reads the colours drawn: RetroBIOS in the accent. @@ -5511,7 +5511,7 @@ class TheTerminalComesBack(unittest.TestCase): def ended(self, how) -> Pty: self.repo() term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") # Every way out below starts with the clicks asked for, written # right after the frame. term.settle() @@ -5571,7 +5571,7 @@ class TheTerminalComesBack(unittest.TestCase): job control it stops, and fg brings the screen back.""" term = self.shell() self.typed(term, f"{shlex.quote(sys.executable)} {REPO_ROOT / 'install.py'} --tui") - term.wait("Where do you play?") + term.wait("Where to install?") mark = len(term.raw) term.send("\x1a") end = time.monotonic() + 10 @@ -5586,7 +5586,7 @@ class TheTerminalComesBack(unittest.TestCase): while b"\x1b[?1049h" not in term.raw[mark:] and time.monotonic() < end: term._pump(0.05) self.assertIn(b"\x1b[?1049h", term.raw[mark:]) - term.wait("Where do you play?") + term.wait("Where to install?") self.assertFalse(termios.tcgetattr(term.fd)[3] & termios.ECHO) # The clicks come back with the screen. term.settle() @@ -5608,7 +5608,7 @@ class TheTerminalComesBack(unittest.TestCase): term = Pty(["--tui"], self.env, program=program) self.addCleanup(lambda term=term: term.status is None and os.killpg(term.pid, 9)) - term.wait("Where do you play?") + term.wait("Where to install?") term.send("\x1a") screen = term.wait("Ctrl-Z is ignored") self.assertIn("no shell started this installer", " ".join(screen.split())) @@ -5664,7 +5664,7 @@ class TheTerminalComesBack(unittest.TestCase): self.addCleanup(lambda: term.status is None and os.killpg(term.pid, 9)) term.wait("PROMPT$") self.typed(term, f"sh {REPO_ROOT / 'install.sh'} --jobs 1") - term.wait("Where do you play?") + term.wait("Where to install?") term.send("\r") term.wait("to download") term.send("\r") @@ -6231,7 +6231,7 @@ class ConfirmRefusalsAndCardRows(unittest.TestCase): # Back alone, no word of an Install. self.assertNotIn("before Install", text) self.assertNotIn("backup folder", text) - self.assertIn("Copy them from your old card", text) + self.assertIn("Copy them from an old card", text) # The short names at 40 columns, as every screen of that width. self.assertEqual(view[-1].strip(), "A Back ? Help") @@ -6756,7 +6756,7 @@ class WhatEachScreenOffers(unittest.TestCase): self.assertIn("handhelds come after RetroArch", " ".join(text.split())) state.pad = "keys" text = " ".join(" ".join(install.tui_view(state, 80, 24)).split()) - self.assertIn("type your device's name (/)", text) + self.assertIn("type the device's name (/)", text) self.assertIn("Filter by setup or device name", [what for _key, what in install._help_lines(state)]) # Something found here: the list keeps its order. @@ -6769,7 +6769,7 @@ class WhatEachScreenOffers(unittest.TestCase): with mock.patch.object(install, "_ask", side_effect=["bittboy"]), \ contextlib.redirect_stdout(io.StringIO()) as out: self.assertEqual(install._choose_platform("Which?"), "MiyooCFW") - self.assertIn("your device's name", out.getvalue()) + self.assertIn("the device's name", out.getvalue()) choices = install._line_setups() onion = [name for name, _label in choices].index("Onion") + 1 with mock.patch.object(install, "_ask", side_effect=["miyoo mini+", str(onion)]), \ @@ -6841,7 +6841,7 @@ class WhatEachScreenOffers(unittest.TestCase): self.assertIn("Not in from1: ", text) self.assertIn("Run the installer again with a pack (--from-pack)", text) self.assertNotIn("They are not in", text) - self.assertNotIn("Copy them from your old card", text) + self.assertNotIn("Copy them from an old card", text) def test_the_card_browser_focuses_the_card_asked_for(self): """The muOS card, listed first, was focused for Onion.""" @@ -7317,7 +7317,7 @@ class _LineModeFindings(_CardFixtures): with mock.patch.object(install, "_folder_writable", return_value=False), \ mock.patch.object(install, "_on_read_only_mount", return_value=False): lines = install.folder_warnings("retroarch", self.root, [], hint, True, False) - self.assertIn("You cannot write to this folder: run it again with another --dest.", + self.assertIn("This folder cannot be written to: run it again with another --dest.", lines) self.assertNotIn("choose another one", " ".join(lines)) with mock.patch.object(install, "_folder_writable", return_value=False), \ @@ -8184,7 +8184,7 @@ class LineModeAndScreenDecideAlike(_LineModeFindings, _OutsideTextFindings, listing = self.listing("retroarch", files) args = _args(manifest=listing, dest=self.here, declared_only=False) text, asked = self.line_run(args, ["c", "1"]) - self.assertIn("Counted again for your choices. Nothing is written before Enter.", text) + self.assertIn("Counted again for these choices. Nothing is written before Enter.", text) self.assertIn("RetroArch: 1 file, 3 B, for 1 of 2 systems.", text) self.assertIn("Enter) install these", text) self.assertEqual(asked[-1], "> ") @@ -8517,7 +8517,7 @@ class LineModeAndScreenDecideAlike(_LineModeFindings, _OutsideTextFindings, self.assertNotRegex(text, r"Narrowed (\d+) to \1 files") text, _asked = self.line_run(_args(**args), ["c", "1", ""]) # The menu counted the choice again before Enter: said once. - self.assertIn("Counted again for your choices", text) + self.assertIn("Counted again for these choices", text) self.assertNotIn("Narrowed", text) args = _args(manifest=self.counted_list(), dest=self.here, declared_only=False, dry_run=True, no_input=True, system=["doom"]) @@ -8857,7 +8857,7 @@ class PacksWordingAndDocs(unittest.TestCase): state.dest = state.home lines = " ".join(str(line) for line in install._plan_lines(state.check, state.dest, state)) - self.assertIn("No setup reads BIOS files in your home folder.", lines) + self.assertIn("No setup reads BIOS files in the home folder.", lines) def test_systems_seen_and_left_unchanged_keep_the_exact_plan(self): """Opening Choose systems on a --system plan and @@ -10688,14 +10688,14 @@ class MouseOnAPty(unittest.TestCase): def test_taps_choose_a_row_and_press_the_bar(self): self.repo() term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") term.settle() self.assertIn(install._MOUSE_ON.encode(), term.raw) row = self.line_of(term, "Another setup") self.click(term, 60, row) term.settle() self.assertTrue(term.screen.buffer[row][3].reverse, term.text()) - self.assertIn("Where do you play?", term.text()) + self.assertIn("Where to install?", term.text()) self.click(term, 60, row) term.wait("Which setup?") # The bar's ? Help, pressed by a click. @@ -11333,7 +11333,7 @@ class TapsOnAPty(unittest.TestCase): def test_taps_on_systems_tick_and_write_nothing(self): repo = self.repo() term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") term.send("\r") term.wait("> Install") row = self.line_of(term, "Choose systems") @@ -11360,7 +11360,7 @@ class TapsOnAPty(unittest.TestCase): def test_the_result_is_left_by_a_tap_on_exit(self): self.repo() term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") term.send("\r") term.wait("files to download") row = self.line_of(term, "> Install") @@ -12238,7 +12238,7 @@ class TapsOnAPtySeeFirst(unittest.TestCase): def test_one_tap_on_the_bar_install_installs_nothing(self): repo = self.repo() term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") term.send("\r") term.wait("> Install") term.settle() @@ -12253,7 +12253,7 @@ class TapsOnAPtySeeFirst(unittest.TestCase): def test_a_double_tap_on_continue_neither_quits_nor_installs(self): repo = self.repo() term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") term.settle() col, line = self.bar_entry(term, "Continue") report = sgr(col + 1, line + 1) + sgr(col + 1, line + 1, release=True) @@ -12275,7 +12275,7 @@ class TapsOnAPtySeeFirst(unittest.TestCase): with self.subTest(gap=gap): repo = self.repo() term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") term.settle() time.sleep(install.TUI_TAP_SETTLE) col, line = self.bar_entry(term, "Continue") @@ -12285,7 +12285,7 @@ class TapsOnAPtySeeFirst(unittest.TestCase): time.sleep(gap) os.write(term.fd, (press + release).encode()) screen = term.settle(0.8) - self.assertNotIn("Where do you play?", screen) + self.assertNotIn("Where to install?", screen) self.assertNotIn("Quit?", screen) term.wait("> Install") self.assertEqual(repo.installed(), []) @@ -12295,7 +12295,7 @@ class TapsOnAPtySeeFirst(unittest.TestCase): def test_continue_then_install_in_one_cell_stops_on_confirm(self): repo = self.repo() term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") term.send("\r") term.wait("> Install") row = self.line_of(term, "Choose systems") @@ -12321,7 +12321,7 @@ class TapsOnAPtySeeFirst(unittest.TestCase): report = sgr(col + 1, line + 1) + sgr(col + 1, line + 1, release=True) time.sleep(install.TUI_TAP_SETTLE) term.send(report + report) - term.wait("Counted again for your choices") + term.wait("Counted again for these choices") screen = term.settle(0.6) self.assertIn("RetroBIOS: Confirm", screen) self.assertEqual(repo.installed(), []) @@ -12338,7 +12338,7 @@ class TapsOnAPtySeeFirst(unittest.TestCase): repo = self.repo(GameDataRepository) term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") term.send("\r") term.wait("> Install") for _step in range(8): @@ -12381,7 +12381,7 @@ class TapsOnAPtySeeFirst(unittest.TestCase): def test_two_taps_on_a_region_untick_it_where_it_was(self): self.repo() term = self.start() - term.wait("Where do you play?") + term.wait("Where to install?") term.send("\r") term.wait("> Install") term.send("o") @@ -12465,7 +12465,7 @@ class ChoiceStateInBothModes(unittest.TestCase): text, asked = self.line_run(_args(manifest=self.game_listing(), dest=self.here, declared_only=False), ["c", "2", "g", ""]) - menu = text.rsplit("Counted again for your choices", 1)[1] + menu = text.rsplit("Counted again for these choices", 1)[1] self.assertIn("RetroArch: sega-dreamcast holds only game data: nothing is left to " "install.", menu) self.assertNotIn("0 files, 0 B", menu) @@ -12887,9 +12887,9 @@ class DriveIsACardByItsFiles(unittest.TestCase): # The note on drives with a bios folder and no handheld's folder. UNPROVEN_TWO = ("DATA and STICK have a bios folder but no folder a handheld system " - "writes. Pick one below if your files go there.") + "writes. Pick one below if the BIOS files go there.") UNPROVEN_ONE = ("DATA has a bios folder but no folder a handheld system writes. Pick " - "it below if your files go there.") + "it below if the BIOS files go there.") def test_the_layouts_handhelds_write_are_cards(self): """ArkOS's EASYROMS, AmberELEC's GAMES and EmuELEC's EEROMS, each @@ -13047,7 +13047,7 @@ class TheSettleRunsFromTheFrameShown(unittest.TestCase): env = {**self.env, "SLOW": "0.5"} term = Pty([], env, 80, 24, program=[sys.executable, str(wrapper)]) self.addCleanup(lambda: term.status is None and os.kill(term.pid, 9)) - term.wait("Where do you play?") + term.wait("Where to install?") term.send("\r") term.wait("> Install") term.settle() @@ -13816,7 +13816,7 @@ class ProvenCardsAndCounts(unittest.TestCase): text, _asked = self.line_run(_args(manifest=listing, dest=dest, platform="retroarch", declared_only=False, dry_run=True), []) self.assertIn("Not available here: jazz2/Source/Anims.j2a (Jazz Jackrabbit 2), game " - "data its game reads. Copy it from your own copy of the game into " + "data its game reads. Copy it from an owned copy of the game into " f"{dest / 'jazz2' / 'Source'}{os.sep}.", text) self.assertEqual(install.not_installable_words(37, 1, {"not_found": 37}), "Not installable: 37 files are not in the collection, 1 of them " @@ -14012,7 +14012,7 @@ class ProvenCardsAndCounts(unittest.TestCase): mounts = [data, stick] state, text, rows = self.folder_screen(mounts) self.assertIn("DATA and STICK have a bios folder but no folder a handheld system " - "writes. Pick one below if your files go there.", text) + "writes. Pick one below if the BIOS files go there.", text) labels = [row.label for row in rows] self.assertIn("DATA: bios (drive)", labels) self.assertIn("STICK: bios (drive)", labels) @@ -14167,7 +14167,7 @@ class ProvenCardsAndCounts(unittest.TestCase): declared_only=False, dry_run=True), ["c", "", "2"]) self.assertIn("Every core's extra files are kept: Enter keeps them all", text) - head = text.rsplit("Counted again for your choices", 1)[1] + head = text.rsplit("Counted again for these choices", 1)[1] self.assertIn("1 of 2 cores", head) self.assertEqual(install.cores_words(0, 2), "0 of 2 cores") self.assertEqual(install.cores_words(2, 2), "all cores") @@ -14287,7 +14287,7 @@ class CoresListAndFolderFailures(unittest.TestCase): text, _asked = self.line_run( _args(manifest=listing, dest=self.root / "dest", declared_only=False, dry_run=True, no_game_data=no_game_data), ["c", "", "1"]) - head = text.rsplit("Counted again for your choices", 1)[1] + head = text.rsplit("Counted again for these choices", 1)[1] self.assertIn(f"1 of {len(expected)} cores", head) state.cores = ["mesen"] self.assertIn(f"1 of {len(expected)}", @@ -14443,7 +14443,7 @@ class CoresListAndFolderFailures(unittest.TestCase): state.os_type = "android" for cols, rows in ((40, 12), (80, 24)): text = self.text(state, cols, rows) - self.assertIn("You cannot write to this folder", text) + self.assertIn("This folder cannot be written to", text) self.assertNotIn("sudo", text) # Root cause 4: every proven card named, the real marker said. @@ -14552,7 +14552,7 @@ class CoresListAndFolderFailures(unittest.TestCase): state = checked_state() state.regions = ["japan"] text = self.text(state, 100, 30) - self.assertIn("For your choice: regions ranked.", text) + self.assertIn("For this choice: regions ranked.", text) self.assertNotIn(" --region.", text) def test_offline_choice_of_systems_is_never_about_0_files(self): diff --git a/tests/test_pack_probe.py b/tests/test_pack_probe.py index a729dc933..a55a08581 100644 --- a/tests/test_pack_probe.py +++ b/tests/test_pack_probe.py @@ -293,10 +293,10 @@ class RecordsNameNoLocalPath(unittest.TestCase): def test_the_summary_names_the_options(self) -> None: root = Path("/srv/run/tmp/pack_probe/retroarch/installer") - out = (f"Copy it from your own copy of the game into {root / 'system'}/jazz2/Source/.\n" + out = (f"Copy it from an owned copy of the game into {root / 'system'}/jazz2/Source/.\n" f"Saves go to {root / 'saves'}.\n") summary = pp.installer_summary(out, root / "system", root / "saves") - self.assertEqual(summary, "Copy it from your own copy of the game into /jazz2/Source/. " + self.assertEqual(summary, "Copy it from an owned copy of the game into /jazz2/Source/. " "Saves go to .") def test_no_committed_record_holds_a_local_path(self) -> None: diff --git a/tests/test_port.py b/tests/test_port.py index afb8662c7..9685b00d2 100644 --- a/tests/test_port.py +++ b/tests/test_port.py @@ -440,7 +440,7 @@ class TheScreens(unittest.TestCase): ]) summary = [s for s in shown if s[:2] == ("list", "summary")][0][2] self.assertEqual(summary["info:result"][0], "Installed: 2 files") - self.assertEqual(summary["info:kept:1"][0], "Kept 1 file you had (100 B)") + self.assertEqual(summary["info:kept:1"][0], "Kept 1 file already there (100 B)") self.assertIn("/roms/retrobios-backup/20261022-153000", summary["info:kept:1"][1]) self.assertEqual(self.calls(), [ "--check --events", diff --git a/tests/test_profile_sync.py b/tests/test_profile_sync.py index 6711b143e..5f65d85bd 100644 --- a/tests/test_profile_sync.py +++ b/tests/test_profile_sync.py @@ -5639,7 +5639,7 @@ class TestSelectionNamesWhatMatchedNothing(unittest.TestCase): def test_a_misspelt_emulator_suggests(self): with self.assertRaises(SystemExit) as caught: profile_sync.select_profiles(self.PROFILES, self._args(emulator="handyy")) - self.assertIn("Did you mean: handy", str(caught.exception.code)) + self.assertIn("Close matches: handy", str(caught.exception.code)) def test_a_matching_filter_selects(self): selected = profile_sync.select_profiles(self.PROFILES, self._args(system="atari-lynx")) diff --git a/tests/test_region.py b/tests/test_region.py index 208c5bdd0..01a43f094 100644 --- a/tests/test_region.py +++ b/tests/test_region.py @@ -1045,7 +1045,7 @@ class UnknownRegionSaysWhatToType(unittest.TestCase): with self.assertRaises(ValueError) as caught: region.parse_requested("uss") message = str(caught.exception) - self.assertIn("Did you mean: us", message) + self.assertIn("Close matches: us", message) self.assertIn("Short forms: jp", message) def test_the_installer_says_the_same(self): @@ -1058,7 +1058,7 @@ class UnknownRegionSaysWhatToType(unittest.TestCase): spec.loader.exec_module(install) with self.assertRaises(ValueError) as caught: install.canonical_region("europ") - self.assertIn("Did you mean: europe", str(caught.exception)) + self.assertIn("Close matches: europe", str(caught.exception)) self.assertIn("Short forms:", str(caught.exception)) diff --git a/tests/test_site_entry.py b/tests/test_site_entry.py index c258663fd..cd1c1ac55 100644 --- a/tests/test_site_entry.py +++ b/tests/test_site_entry.py @@ -92,7 +92,8 @@ class TrustItemsSayWhereItWrites(unittest.TestCase): self.assertIn("--restore", text) def test_home_shows_the_same_items(self): - home = _page("index.md") + # A term's first use on the page carries its gloss. + home = re.sub(r"]*>", "", _page("index.md")) for item in siteguides.TRUST_ITEMS: self.assertIn(f"- {item}", home) self.assertNotIn("only in your BIOS folder", home) @@ -1036,7 +1037,7 @@ class GetIndex(unittest.TestCase): class HomeAndWhichPack(unittest.TestCase): def test_the_home_step_does_not_promise_a_zip(self): text = _plain_page("index.md") - self.assertIn("**Run one command.** Some setups have a ZIP.", text) + self.assertIn("**Paste it, press Enter.** Some setups have a ZIP.", text) self.assertNotIn("or download a ZIP file", text) def test_which_pack_answers_ios(self): diff --git a/tests/test_site_pronouns.py b/tests/test_site_pronouns.py index 44283b699..e1669a55b 100644 --- a/tests/test_site_pronouns.py +++ b/tests/test_site_pronouns.py @@ -67,18 +67,9 @@ NAMES: dict[str, str] = { } # Program output quoted word for word. INSTALLER holds install.py's own -# messages, which the pass over the installer's wording rewrites, and empties -# this list with it. SOURCE holds what an emulator prints, quoted in its +# messages, empty since the installer speaks without pronouns. SOURCE holds what an emulator prints, quoted in its # profile from the emulator's code, which this project does not write. -INSTALLER: dict[str, str] = { - "Where do you play?": "title of the installer's first screen", - "Copy the BIOS files from your old card or a folder": "installer menu row", - "copy the BIOS files from your other card": "installer menu row on a two-card handheld", - "if your files go there.": "installer hint for a card with no handheld system folder", - "See [Files you already had]": ( - "link label in the generated options table of wiki/installer.md, " - "kept by generate_installer_doc"), -} +INSTALLER: dict[str, str] = {} SOURCE: dict[str, str] = { "You do not have a ROM image installed for Model": "sdltrs message, emulators/sdl2trs.yml", "You might not get sound because": "lindbergh-loader message, emulators/lindbergh-loader.yml", diff --git a/tests/test_system_selection.py b/tests/test_system_selection.py index 4ddafd5b0..96c5ab1ec 100644 --- a/tests/test_system_selection.py +++ b/tests/test_system_selection.py @@ -129,7 +129,7 @@ class AMistypedPlatformIsNamed(unittest.TestCase): ) self.assertNotEqual(proc.returncode, 0) self.assertNotIn("Traceback", proc.stderr, proc.stderr) - self.assertIn("Did you mean 'batocera'?", proc.stderr) + self.assertIn("Close match: 'batocera'.", proc.stderr) self.assertFalse(out.exists()) def test_the_names_the_site_prints_are_accepted(self): @@ -175,7 +175,7 @@ class CrossReferenceAnswersForTheEmulatorAsked(unittest.TestCase): proc = self._run("--emulator", "dolhpin") self.assertNotEqual(proc.returncode, 0) self.assertNotIn("Traceback", proc.stderr) - self.assertIn("Did you mean: dolphin", proc.stderr) + self.assertIn("Close matches: dolphin", proc.stderr) listing = self._run("--list-emulators") self.assertEqual(listing.returncode, 0) self.assertIn("dolphin", listing.stdout.split()) @@ -562,7 +562,7 @@ class ATypoGetsTheNearestNames(unittest.TestCase): def test_suggestions_follow_the_typed_name(self): hint = common.suggest_names(["sony-playstaton"], ["3do", "apple-ii", "sony-playstation"], "--list-systems") - self.assertEqual(hint, "Did you mean: sony-playstation? --list-systems lists all 3.") + self.assertEqual(hint, "Close matches: sony-playstation. --list-systems lists all 3.") self.assertEqual(common.suggest_names(["zzz"], ["3do"], "--list-systems"), "Known: 3do.") many = [f"system-{i}" for i in range(40)] diff --git a/tests/test_tool_messages.py b/tests/test_tool_messages.py index d297c7419..394e84cae 100644 --- a/tests/test_tool_messages.py +++ b/tests/test_tool_messages.py @@ -49,7 +49,7 @@ class ABuildbotNameSelectsItsProfile(unittest.TestCase): def test_an_unknown_name_still_gets_a_hint(self): with self.assertRaises(common.ProfileSelectionError) as caught: common.select_emulator_profiles(["pcsx3"], self.PROFILES) - self.assertIn("Did you mean", str(caught.exception)) + self.assertIn("Close match", str(caught.exception)) def test_cross_reference_reports_the_resolved_profile(self): """cross_reference filtered on the typed name, found no profile under @@ -81,7 +81,7 @@ class AMistypedTargetGetsTheClosestName(unittest.TestCase): with self.assertRaises(ValueError) as caught: common.load_target_config("p", "swich", tmp) message = str(caught.exception) - self.assertIn("Did you mean: switch?", message) + self.assertIn("Close matches: switch.", message) self.assertIn("lists all 31", message) self.assertNotIn("board-0", message) @@ -244,7 +244,7 @@ class AMistypedTargetAcrossAllPlatforms(unittest.TestCase): common.build_target_cores_cache( platforms, "swich", str(REPO_ROOT / "platforms"), is_all=True ) - self.assertIn("Did you mean: switch (", str(caught.exception)) + self.assertIn("Close matches: switch (", str(caught.exception)) self.assertIn("retroarch", str(caught.exception)) self.assertEqual(out.getvalue(), "") @@ -258,7 +258,7 @@ class AMistypedDataKeyGetsTheClosestName(unittest.TestCase): cwd=REPO_ROOT, capture_output=True, text=True, check=False, ) self.assertEqual(proc.returncode, 1) - self.assertIn("unknown key: dolphin-sis. Did you mean: dolphin-sys? --dry-run lists all", + self.assertIn("unknown key: dolphin-sis. Close matches: dolphin-sys. --dry-run lists all", proc.stderr) self.assertNotIn("ppsspp-assets", proc.stderr) diff --git a/wiki/first-install.md b/wiki/first-install.md index 6c9ee71e0..6b41c84a4 100644 --- a/wiki/first-install.md +++ b/wiki/first-install.md @@ -71,7 +71,7 @@ On Batocera, Recalbox and similar setups, see It opens a menu: ``` - RetroBIOS: Where do you play? + RetroBIOS: Where to install? Found on this machine: > Another setup or folder @@ -93,7 +93,7 @@ keep. **Game data** (only a game reads it) has its own row. -**Old card?** In a card reader, choose **Copy the BIOS files from your old +**Old card?** In a card reader, choose **Copy the BIOS files from an old card or a folder**, then the card. ## 4. Wait diff --git a/wiki/installer.md b/wiki/installer.md index cdd777682..e2557ee95 100644 --- a/wiki/installer.md +++ b/wiki/installer.md @@ -185,7 +185,7 @@ downloads, the folder and, for a list with files read from the frontend's save directory, that directory. Each row names the option it sets, and **Show the command line** gives the same choice as one command for a script. **Preview the file list** shows what would be downloaded and writes nothing. **Copy the BIOS -files from your old card or a folder** opens the folder browser on the first +files from an old card or a folder** opens the folder browser on the first mounted card, and adds [`--from`](#copy-from-an-old-card): the plan then says how many files that folder holds and how many are left to download, or that it holds none of them. After an install @@ -530,7 +530,7 @@ BIOS folder: /userdata/bios capcom-cps3 (fbneo): sfiii2a.zip https://abdess.github.io/retrobios/emulators/fbneo/ Each emulator's page, linked above, says what these files are. - Not available here: DARK.GOB, DARKWAR.RTL, DARKWAR.WAD and 76 more, game data their games read. Copy them from your own copy of the game into /userdata/bios/, /userdata/bios/Source/, /userdata/bios/base/ and 10 more folders. + Not available here: DARK.GOB, DARKWAR.RTL, DARKWAR.WAD and 76 more, game data their games read. Copy them from an owned copy of the game into /userdata/bios/, /userdata/bios/Source/, /userdata/bios/base/ and 10 more folders. Game data: files a game or a game engine reads, of no use to the other cores. To check this later, run the same command with --check. ``` @@ -602,7 +602,7 @@ against a list of four files: ``` 3 files to download: - 2 of these files are in the BIOS folder in the wrong place: a run without --check copies them where the cores open them, and leaves your copies as they are. + 2 of these files are in the BIOS folder in the wrong place: a run without --check copies them where the cores open them, and leaves the copies found as they are. wrong copy: scph5501.bin another region: the contents of scph5500.bin (japan) read by beetle_psx, pcsx_rearmed at /home/me/.config/retroarch/system/scph5501.bin @@ -666,7 +666,7 @@ nothing is replaced. The end of the run says how many files were kept, their size, the folder, and the command that puts them back: ``` -Kept 1 file you had (512.0 KB), which the collection's copies replaced, in /home/me/.config/retroarch/retrobios-backup/20261022-153000 +Kept 1 file already there (512.0 KB), which the collection's copies replaced, in /home/me/.config/retroarch/retrobios-backup/20261022-153000 To put them back: python3 install.py --restore /home/me/.config/retroarch/retrobios-backup/20261022-153000 ``` @@ -775,8 +775,8 @@ RetroArch: 14929 files, 6.7 GB. 3259 BIOS files (4.1 GB), 5089 game data files (2.5 GB) and 6581 data files (135.5 MB). Game data: files a game or a game engine reads, of no use to the other cores. Data files: the files an emulator reads from a data folder of its own, such as Dolphin's Sys and PPSSPP's assets. BIOS folder: /home/me/.config/retroarch/system - Not available here, and needed to start its emulator: sfiii2a.zip (Capcom Cps3). Your own copy goes in the BIOS folder. - Not available here: jazz2/Source/Anims.j2a (Jazz Jackrabbit 2), game data its game reads. Copy it from your own copy of the game into /home/me/.config/retroarch/system/jazz2/Source/. + Not available here, and needed to start its emulator: sfiii2a.zip (Capcom Cps3). An owned copy goes in the BIOS folder. + Not available here: jazz2/Source/Anims.j2a (Jazz Jackrabbit 2), game data its game reads. Copy it from an owned copy of the game into /home/me/.config/retroarch/system/jazz2/Source/. Enter) install everything c) choose systems, cores and regions f) copy from a folder or an old card @@ -784,13 +784,13 @@ RetroArch: 14929 files, 6.7 GB. q) quit > g - Counted again for your choices. Nothing is written before Enter. + Counted again for these choices. Nothing is written before Enter. RetroArch: 9840 files, 4.2 GB. 3259 BIOS files (4.1 GB) and 6581 data files (135.5 MB). 5089 game data files left out. Game data: files a game or a game engine reads, of no use to the other cores. Data files: the files an emulator reads from a data folder of its own, such as Dolphin's Sys and PPSSPP's assets. BIOS folder: /home/me/.config/retroarch/system - Not available here, and needed to start its emulator: sfiii2a.zip (Capcom Cps3). Your own copy goes in the BIOS folder. + Not available here, and needed to start its emulator: sfiii2a.zip (Capcom Cps3). An owned copy goes in the BIOS folder. Same choice without questions: python3 install.py --platform retroarch --dest /home/me/.config/retroarch/system --no-game-data Enter) install everything c) choose systems, cores and regions @@ -1013,7 +1013,7 @@ what the options name, everything by default. | `--from-pack PATH` | Install from a pack already downloaded: its ZIP, one of its parts (the others are found in the same folder), or the folder holding them. Makes no network request and checks every file's hash. See [Without a network](#without-a-network-offline-install) | | `--offline` | Make no network request. `--check`, `--from`, `--from-pack` and `--manifest` work without one, the file list stops the run at once when none of them gives it, and a file the run would download fails at once. `RETROBIOS_INSTALL_OFFLINE=1` does the same. `--target` and `--list-targets` read the core list per board a pack carries, or `targets/.json` beside `--manifest`, and are refused when neither gives one | | `--manifest FILE` | Read the file list from FILE, a copy of `install/.json`, instead of downloading it. See [Without a network](#without-a-network-offline-install) | -| `--restore FOLDER` | Put back the files a run replaced and kept in FOLDER, a dated folder inside `retrobios-backup`. Takes no other option but `--dry-run` and `--no-input`. See [Files you already had](#files-you-already-had) | +| `--restore FOLDER` | Put back the files a run replaced and kept in FOLDER, a dated folder inside `retrobios-backup`. Takes no other option but `--dry-run` and `--no-input`. See [Files already in the folder](#files-you-already-had) | | `--tui` | Open the full-screen interface, or stop with the reason it cannot open here (code 2) instead of falling back to the questions. Wins over `RETROBIOS_PLAIN` and `ACCESSIBLE`. See [The full-screen interface](#the-full-screen-interface) | | `--plain` | Ask the questions line by line instead of the full-screen interface, the mode for a screen reader. See [The full-screen interface](#the-full-screen-interface) | | `--version` | Print the installer's identity, the first 12 hex digits of the SHA-256 the bootstraps pin | @@ -1329,7 +1329,7 @@ their systems`), and its `bios` folder comes first at the folder question, under Enter, before this computer's usual folder. A drive with a `bios` folder and none of those folders, a data drive or a stick, is numbered with a note (`DATA has a bios folder but no folder a handheld system writes. Pick it below -if your files go there.`) and never taken under Enter. Another system's card or SHARE drive, and a +if the BIOS files go there.`) and never taken under Enter. Another system's card or SHARE drive, and a drive two systems fit, are left out, and a line names them: each is reached through its own setup. A folder typed is read from the current one when it is not a full path, and named in full after. `q` quits there too @@ -1579,7 +1579,7 @@ it names the pack and the folder. The releases carry no pack for ROCKNIX, Knulli or AmberELEC: there RetroBIOS needs Wi-Fi, or the computer route. On a two-card device, RetroBIOS without Wi-Fi first asks to **copy the BIOS -files from your other card**: muOS's `MUOS/bios` on the card the system does +files from the other card**: muOS's `MUOS/bios` on the card the system does not read, or the other of `/roms/bios` and `/roms2/bios` on ArkOS and dArkOS. A says yes, as [`--from`](#copy-from-an-old-card) does. The list of files still comes from the pack, so the pack is needed too.