docs(core,fuse,gui,cli): US spelling and correct schema lines

User-visible strings, doc comments and docs now say "Favorite" and
"color", matching the `pdfs favorite` command; UI_UX_PLAN.md §8 records
the choice. The changelog's 1.11.x and Unreleased entries said schema 30,
but V31 (`photos.resolved_at`) shipped in 1.11.0. Adds the missing
release links for 1.10.0 to 1.11.1.
This commit is contained in:
nvrl committed 2026-09-23 03:01:27 +02:00
1 parent 8351382ef2
commit 91a5f21340
18 files changed
+78 -74

No files matched your search

@@ -19,7 +19,7 @@ pub(crate) struct Viewer {
pub(crate) info_map: gtk4::Button,
/// Coordinates behind `info_map`, once a photo with GPS tags is shown.
pub(crate) coords: RefCell<Option<(f64, f64)>>,
/// The favourite toggle in the top bar, and whether it is being set from
/// The favorite toggle in the top bar, and whether it is being set from
/// the model rather than by the user — the same suppression the details pane
/// uses for its pin switch, so painting a photo doesn't fire a round-trip.
pub(crate) favorite: gtk4::ToggleButton,
@@ -51,7 +51,7 @@ pub(crate) struct ExifInfo {
pub(crate) coords: Option<(f64, f64)>,
}
/// Paint the favourite toggle without firing its handler.
/// Paint the favorite toggle without firing its handler.
pub(crate) fn show_favorite(viewer: &Rc<Viewer>, favorite: bool) {
viewer.favorite_suppress.set(true);
viewer.favorite.set_active(favorite);
@@ -59,7 +59,7 @@ pub(crate) fn show_favorite(viewer: &Rc<Viewer>, favorite: bool) {
viewer.favorite_suppress.set(false);
}
/// Filled star for a favourite, outline for the rest.
/// Filled star for a favorite, outline for the rest.
fn set_favorite_icon(button: &gtk4::ToggleButton, favorite: bool) {
button.set_icon_name(if favorite {
"starred-symbolic"
@@ -68,7 +68,7 @@ fn set_favorite_icon(button: &gtk4::ToggleButton, favorite: bool) {
});
}
/// Write a favourite change back into the loaded gallery page, so returning to
/// Write a favorite change back into the loaded gallery page, so returning to
/// the grid (or reopening the photo) shows what was just set without a reload.
pub(crate) fn set_gallery_favorite(ui: &Rc<Ui>, uid: &str, favorite: bool) {
let Some(idx) = find_photo_index(&ui.gallery.model, uid) else {
@@ -147,7 +147,7 @@ pub(crate) fn load_photo(ui: &Rc<Ui>, viewer: &Rc<Viewer>, uid: String) {
*viewer.path.borrow_mut() = None;
clear_info(viewer);
// The favourite state comes from the timeline page the gallery already has,
// The favorite state comes from the timeline page the gallery already has,
// so the button is right on the first frame instead of after a round-trip.
let favorite = find_photo_index(&ui.gallery.model, &uid)
.and_then(|idx| ui.gallery.model.item(idx))
@@ -556,7 +556,7 @@ pub(crate) fn open_photo_viewer(ui: &Rc<Ui>, initial_uid: String) {
let favorite_btn = gtk4::ToggleButton::builder()
.icon_name("non-starred-symbolic")
.tooltip_text("Favourite")
.tooltip_text("Favorite")
.valign(gtk4::Align::Center)
.build();
favorite_btn.add_css_class("flat");
@@ -758,7 +758,7 @@ pub(crate) fn open_photo_viewer(ui: &Rc<Ui>, initial_uid: String) {
_ => Some("The mount service didn't respond.".to_string()),
};
if let Some(detail) = failed {
toast_error(&ui_result, "Couldn't change the favourite", &detail);
toast_error(&ui_result, "Couldn't change the favorite", &detail);
// The server refused, so the button must go back to describing
// what is actually stored — without firing this handler again.
if *viewer_result.uid.borrow() == uid {
+16 -16
View File
@@ -84,7 +84,7 @@ pub(crate) struct GalleryState {
/// The capture-time window the timeline is currently filtered to, or `None`
/// for the whole span. Read by [`load_gallery`], set by the date dropdown.
pub(crate) range: Cell<Option<(i64, i64)>>,
/// The favourites toggle, and whether it is on. When on, the timeline is
/// The favorites toggle, and whether it is on. When on, the timeline is
/// restricted to photos carrying Proton's `Favorite` tag.
pub(crate) favorites_btn: gtk4::ToggleButton,
pub(crate) favorites: Cell<bool>,
@@ -495,12 +495,12 @@ pub(crate) fn build_gallery_page() -> (gtk4::Widget, GalleryWidgets) {
tab_group.append(btn);
}
// Favourites: a filter, not a tab — it cuts across Photos / Videos / Raw, so
// Favorites: a filter, not a tab — it cuts across Photos / Videos / Raw, so
// it stays outside the segmented control rather than becoming a fifth option
// that would silently drop the kind the user picked.
let favorites_btn = gtk4::ToggleButton::builder()
.icon_name("starred-symbolic")
.tooltip_text("Show only favourites")
.tooltip_text("Show only favorites")
.build();
favorites_btn.add_css_class("pill");
@@ -962,7 +962,7 @@ pub(crate) fn wire_gallery(
});
}
// Favourites: reload the timeline restricted to favourites (or back to all).
// Favorites: reload the timeline restricted to favorites (or back to all).
// Independent of the kind tabs and the date jump, both of which keep their
// current value across the toggle.
let ui_fav = ui.clone();
@@ -2118,7 +2118,7 @@ pub(crate) fn short_capture_time(secs: i64) -> String {
/// Fetch a timeline page from the daemon. When `append` is false the model is
/// cleared first (fresh load); otherwise the next page is tacked on.
/// The empty state for a timeline filtered to `kind`, favourites and/or a
/// The empty state for a timeline filtered to `kind`, favorites and/or a
/// `month`: what is missing, in the filter's own words.
pub(crate) fn empty_timeline_text(
kind: Option<PhotoKind>,
@@ -2138,12 +2138,12 @@ pub(crate) fn empty_timeline_text(
"Photos you upload to Proton Drive appear here.".to_string(),
),
(true, None, None) => (
"No favourites yet".to_string(),
"No favorites yet".to_string(),
"Star a photo in the viewer or from its menu to find it here.".to_string(),
),
(true, _, _) => (
format!("No favourite {what}{when}"),
"Turn off the favourites filter to see everything.".to_string(),
format!("No favorite {what}{when}"),
"Turn off the favorites filter to see everything.".to_string(),
),
(false, _, _) => (
format!("No {what}{when}"),
@@ -2222,9 +2222,9 @@ fn show_photo_menu(ui: &Rc<Ui>, photo: &PhotoItem, anchor: &gtk4::Button, x: f64
let (ui_c, uid, favorite) = (ui.clone(), photo.uid.clone(), photo.favorite);
item(
if favorite {
"Remove from Favourites"
"Remove from Favorites"
} else {
"Add to Favourites"
"Add to Favorites"
},
if favorite {
"non-starred-symbolic"
@@ -2269,18 +2269,18 @@ fn set_photo_favorite(ui: &Rc<Ui>, uid: String, favorite: bool) {
toast(
&ui,
if favorite {
"Added to Favourites"
"Added to Favorites"
} else {
"Removed from Favourites"
"Removed from Favorites"
},
);
}
Ok(Ok(Response::Error { message, .. })) => {
toast_error(&ui, "Couldn't change the favourite", &message)
toast_error(&ui, "Couldn't change the favorite", &message)
}
_ => toast_error(
&ui,
"Couldn't change the favourite",
"Couldn't change the favorite",
"The mount service didn't respond.",
),
}
@@ -2540,14 +2540,14 @@ mod tests {
#[test]
fn an_empty_filter_names_what_it_filtered() {
assert_eq!(empty_timeline_text(None, false, None).0, "No photos yet");
assert_eq!(empty_timeline_text(None, true, None).0, "No favourites yet");
assert_eq!(empty_timeline_text(None, true, None).0, "No favorites yet");
assert_eq!(
empty_timeline_text(Some(PhotoKind::Video), false, Some("June 2024")).0,
"No videos in June 2024"
);
assert_eq!(
empty_timeline_text(Some(PhotoKind::Raw), true, None).0,
"No favourite raw files"
"No favorite raw files"
);
}
}
+2 -6
View File
@@ -190,7 +190,7 @@ pub(crate) fn build_main_page() -> MainWidgets {
let appearance_group = adw::PreferencesGroup::builder().title("Appearance").build();
let accent_row = adw::SwitchRow::builder()
.title("Proton purple accent")
.subtitle("Use the Proton brand colour instead of the system accent colour")
.subtitle("Use the Proton brand color instead of the system accent color")
.build();
appearance_group.add(&accent_row);
@@ -531,11 +531,7 @@ pub(crate) fn wire_settings(
let mut config = ui_accent.dirs.load_config();
config.proton_accent = Some(on);
if let Err(e) = ui_accent.dirs.save_config(&config) {
toast_error(
&ui_accent,
"Couldn't save the accent colour",
&e.to_string(),
);
toast_error(&ui_accent, "Couldn't save the accent color", &e.to_string());
}
});
}