From c186b168bc3c5fa385f41b7442b01aef29709be8 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Tue, 3 Nov 2026 10:14:09 +0100 Subject: [PATCH] docs: which-pack names the folder question --- install.py | 12 +++++++----- scripts/generate_site.py | 13 ++++++++----- tests/test_install_tui.py | 4 ++++ tests/test_site_r3_entry.py | 5 ++++- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/install.py b/install.py index b2709f4ba..779a12f13 100644 --- a/install.py +++ b/install.py @@ -5898,6 +5898,8 @@ TUI_SYSTEMS_ROW = "Choose systems" # which-pack names them from here. TUI_FOUND_TITLE = "Where do you play?" TUI_CHOOSE_TITLE = "Which setup?" +# Asked after Which setup? where nothing was found, and on a card. +TUI_FOLDER_TITLE = "Which folder?" def _on_read_only_mount(path: Path) -> bool: @@ -18954,7 +18956,7 @@ def _view_folder(state: TuiState, width: int, height: int) -> tuple: first: list = [] if bound and state.folder_default is not None and state.folder_kind == "found": # On the device itself: its own folder, which is no card to look for. - title = "Which folder?" + title = TUI_FOLDER_TITLE before = [f"{bound[0]} reads its BIOS files from:", str(state.folder_default)] elif bound: title = "Where is the SD card?" @@ -18978,10 +18980,10 @@ def _view_folder(state: TuiState, width: int, height: int) -> tuple: else "No card or drive is mounted.") + " Insert it, then choose Look again.") elif state.folder_kind == "share": - title = "Which folder?" + title = TUI_FOLDER_TITLE before = [share_words(state.platform)] elif state.folder_default is not None: - title = "Which folder?" + title = TUI_FOLDER_TITLE lead = {"found": f"{name} reads its BIOS files from:", "chosen": f"The BIOS folder chosen for {name}:"}.get( state.folder_kind, @@ -18989,10 +18991,10 @@ def _view_folder(state: TuiState, width: int, height: int) -> tuple: "files from:") before = [lead, str(state.folder_default)] elif state.folder_kind == "closed": - title = "Which folder?" + title = TUI_FOLDER_TITLE before = [f"Choose another folder for {name}: browse for it or type it."] else: - title = "Which folder?" + title = TUI_FOLDER_TITLE before = [f"No usual {name} folder here: browse for it or type it."] notes: list = [] if not bound and state.folder_kind != "share": diff --git a/scripts/generate_site.py b/scripts/generate_site.py index b951e8a2d..34be02506 100644 --- a/scripts/generate_site.py +++ b/scripts/generate_site.py @@ -3943,8 +3943,11 @@ def first_screen_words() -> list[str]: # The screen it opens first: the setup found, or the list when none # is. Install comes on the next one, Choose systems beside it and named # above on the page (tui_audit_16 P3-10). - return [f"It asks **{installer.TUI_FOUND_TITLE}** (or **{installer.TUI_CHOOSE_TITLE}**), " - f"then offers **{installer.TUI_INSTALL_ROW}**."] + # Nothing found, the folder comes before Install: which-pack left it + # out (tui_audit_17 P3-9). + return [f"It asks **{installer.TUI_FOUND_TITLE}**, or **{installer.TUI_CHOOSE_TITLE}** " + f"and **{installer.TUI_FOLDER_TITLE}** when it finds nothing, then offers " + f"**{installer.TUI_INSTALL_ROW}**."] def check_pass_line() -> str: @@ -4113,8 +4116,8 @@ def only_some_consoles(name: str, prefix: str = "") -> list[str]: """The way to a smaller download, in the words Get your files uses.""" return [ f"Only some consoles? [Pick them]({prefix}which-pack.md?platform={name}" - f"#only-some-consoles), or choose **{_installer().TUI_SYSTEMS_ROW}** in the " - "command.", + f"#only-some-consoles), or run the command: **{_installer().TUI_SYSTEMS_ROW}** " + "is on its second screen.", "", ] @@ -11412,7 +11415,7 @@ def generate_which_pack() -> str: "## Only some consoles?", "", "Pick them here, and get the files and the command. Or run the command " - f"below and choose **{_installer().TUI_SYSTEMS_ROW}**.", + f"below: **{_installer().TUI_SYSTEMS_ROW}** is on its second screen.", "", "", "", diff --git a/tests/test_install_tui.py b/tests/test_install_tui.py index 98932609d..ed8b44983 100644 --- a/tests/test_install_tui.py +++ b/tests/test_install_tui.py @@ -13952,6 +13952,10 @@ class AuditTwentyThreeAndSixteen(unittest.TestCase): self.assertLess(words.index(install.TUI_FOUND_TITLE), words.index(install.TUI_INSTALL_ROW)) self.assertNotIn("opens a screen", words) + # Nothing found, Which folder? comes before the plan (tui_audit_17 P3-9). + self.assertIn(f"**{install.TUI_FOLDER_TITLE}**", words) + self.assertLess(words.index(install.TUI_FOLDER_TITLE), + words.index(install.TUI_INSTALL_ROW)) if __name__ == "__main__": diff --git a/tests/test_site_r3_entry.py b/tests/test_site_r3_entry.py index 990345902..84ca38a90 100644 --- a/tests/test_site_r3_entry.py +++ b/tests/test_site_r3_entry.py @@ -160,7 +160,10 @@ class SetupPagesOfferPartOfThePack(unittest.TestCase): self.assertIn(f"/retrobios/which-pack/?platform={key}#only-some-consoles", text) # The screen's own row: the line menu's c is not what the # one-liner opens. - self.assertIn("or choose **Choose systems** in the command.", text) + self.assertIn("or run the command: **Choose systems** is on its second " + "screen.", text) + # Never "choose **Choose systems**" (tui_audit_17 P3-9). + self.assertNotIn("choose **Choose systems**", text) def test_the_anchor_exists(self): self.assertIn("## Only some consoles?", _page("which-pack.md"))