Preferences: the File view entry and the search field carry the window's name (#8318) (#8432)

* claim: #8318

* Preferences: the File view entry and the search field carry the window's name (#8318)

The File view's entry that opens Preferences said "Settings", and the window's
search field said "Search settings" / "No matching settings", while the window
title, the File menu and the help texts around the app say "Preferences".  The
strings that name the window or point to it now use "Preferences"; ids unchanged.

Translations of these ids followed the English source and keep their wording
until the language teams catch up.

Tests: home::tests::the_entry_that_opens_preferences_carries_the_windows_name
and prefs_search::tests::the_search_field_names_the_window_it_searches fail on
main ("Settings" vs "Preferences") and pass here; the prefs_search:: and home::
suites pass, and the full solidcraft-ui-egui lib suite passed in `cargo xtask ci`.
This commit is contained in:
Colin Faulkingham authored and GitHub committed 2026-10-28 20:06:24 +00:00
1 parent 02ac56d12f
commit 90ef106e5f
4 files changed
+28 -6

No files matched your search

+4 -4
View File
@@ -720,7 +720,7 @@
"a picked edge is gone": "a picked edge is gone",
"a picked edge's body is gone": "a picked edge's body is gone",
"add a key for a joint first": "add a key for a joint first",
"ai.connected_toast": "SolidCraft is now available in {clients}. Restart them to use it (Settings > Assistant).",
"ai.connected_toast": "SolidCraft is now available in {clients}. Restart them to use it (Preferences > Assistant).",
"ai.prefs.allow_control": "Let AI agents connect (control channel / MCP)",
"ai.prefs.allow_control_note": "Opens a control channel on this computer only (127.0.0.1, port 27878 or the next free one). A program that connects must also show a secret token that only your user account can read, made fresh at every start. Takes effect the next time SolidCraft starts. Off: nothing listens unless you start SolidCraft with --control.",
"ai.prefs.availability": "Assistant controls",
@@ -1416,7 +1416,7 @@
"home.recovery_hint": "SolidCraft closed before these designs were saved.",
"home.report_issue": "Report an Issue",
"home.samples": "Samples",
"home.settings": "Settings",
"home.settings": "Preferences",
"home.short_date": "{day} {month}",
"home.shortcuts": "Keyboard shortcuts",
"home.start_hint": "Create a design, open a recent file, or explore a sample.",
@@ -1837,8 +1837,8 @@
"prefs.saving": "Autosave and recovery",
"prefs.scale_note": "Also Ctrl + / Ctrl − in the window. Buttons are 28 px at 100%.",
"prefs.scale_text": "Scale and text",
"prefs.search": "Search settings",
"prefs.search_empty": "No matching settings",
"prefs.search": "Search preferences",
"prefs.search_empty": "No matching preferences",
"prefs.select": "Select",
"prefs.select_one_item": "Select one item",
"prefs.selecting": "Selecting",
+11
View File
@@ -1490,6 +1490,17 @@ mod tests {
assert!(!h.app.home.open);
}
/// The entry that opens Preferences (Cmd / Ctrl + `,`) carries the window's own name
/// (#8318): beside the File menu's "Preferences…" it read "Settings" for the same window.
#[test]
fn the_entry_that_opens_preferences_carries_the_windows_name() {
let mut h = crate::scenario::Harness::new();
h.app.home.show(0);
assert_eq!(crate::i18n::tr("home.settings"), crate::i18n::tr("ui.preferences"), "one name for the window");
click_file(&mut h, "home:settings");
assert!(h.app.prefs_window.open, "the entry opens Preferences");
}
#[test]
fn file_view_narrow_navigation_and_content_stay_inside_the_window() {
for dark in [false, true] {
+12 -1
View File
@@ -696,6 +696,17 @@ mod tests {
assert!(!matches_text("dark", &["Units of new designs"]));
}
/// The search field and its empty result name the window they search (#8318): "Search
/// settings" under a "Preferences" title read as two names for one window.
#[test]
fn the_search_field_names_the_window_it_searches() {
let name = crate::i18n::tr("ui.preferences").to_lowercase();
for id in ["prefs.search", "prefs.search_empty"] {
let text = crate::i18n::tr(id).to_lowercase();
assert!(text.contains(&name), "`{text}` should name the window `{name}`");
}
}
/// Typing focuses the field, Enter opens that setting, and Escape returns to the page
/// that was up when the search started. Recording a shortcut keeps the key.
#[test]
@@ -803,7 +814,7 @@ mod tests {
assert!(h.widget("Mouse mapping").is_some(), "the dropdown's current value counts");
h.app.prefs_window.filter = "zzzz-no-setting".into();
h.frames(2);
assert!(h.widget("No matching settings").is_some());
assert!(h.widget("No matching preferences").is_some());
h.app.prefs_window.filter = "units".into();
h.frames(2);
h.step(&serde_json::json!({"click": {"handle": "prefs:page:Design"}})).expect("design page");
@@ -1,5 +1,5 @@
[
{"note": "With Preferences open and nothing being edited, typing focuses Search settings and the letters are the query. Enter opens that setting on its own page."},
{"note": "With Preferences open and nothing being edited, typing focuses Search preferences and the letters are the query. Enter opens that setting on its own page."},
{"click": {"handle": "titlebar:preferences"}},
{"expect": {"shown": "Restore Defaults", "prefs": {"dialog": "General"}}},
{"text": "zo"},