From 84ae84cfa818c1771c248a9e2048fb52e6d80b8f Mon Sep 17 00:00:00 2001 From: 1234destiny1234 <180862339+1234destiny1234@users.noreply.github.com> Date: Sun, 29 Nov 2026 17:50:59 +0000 Subject: [PATCH 01/26] Add people face grouping and scoped maintenance Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> --- crates/engine/src/cmd/face_recognize.rs | 223 ++++++++++++++++++++-- crates/engine/src/faces_index.rs | 2 + crates/engine/src/people_store.rs | 18 +- crates/engine/src/tests_face_recognize.rs | 178 +++++++++++++++++ crates/ui-egui/src/lib.rs | 3 + crates/ui-egui/src/menus.rs | 3 +- crates/ui-egui/src/panels/dialogs.rs | 28 ++- crates/ui-egui/src/panels/people.rs | 171 +++++++++++++---- crates/ui-egui/src/panels/suggested.rs | 39 +++- crates/ui-egui/src/panels/unnamed.rs | 93 +++++++-- crates/ui-egui/src/state.rs | 8 + crates/ui-egui/src/tests_panels.rs | 13 ++ docs/faces.md | 22 ++- 13 files changed, 719 insertions(+), 82 deletions(-) diff --git a/crates/engine/src/cmd/face_recognize.rs b/crates/engine/src/cmd/face_recognize.rs index eb191795d4..a4ae1b6de7 100644 --- a/crates/engine/src/cmd/face_recognize.rs +++ b/crates/engine/src/cmd/face_recognize.rs @@ -119,6 +119,11 @@ fn name_faces(s: &mut Session, p: &Value) -> Result { if list.len() > 5000 { return Err(bad(C, "at most 5000 faces at a time")); } + // A UI selection includes boxes: validate the complete snapshot before writing any names, so a + // changed or reordered region is never silently named as the face the user saw. + if list.iter().any(|face| face.get("rect").is_some()) { + unnamed_faces_param(s, C, p)?; + } let mut by_photo: std::collections::BTreeMap> = std::collections::BTreeMap::new(); for f in list { let (Some(photo), Some(index)) = @@ -201,6 +206,33 @@ fn unnamed_faces_param(s: &Session, cmd: &str, p: &Value) -> Result Result { + const C: &str = "faces.splitUnknown"; + let faces = unnamed_faces_param(s, C, p)?; + let split = match p.get("split") { + None => true, + Some(value) => value.as_bool().ok_or_else(|| bad(C, "`split` must be true or false"))?, + }; + let keys: std::collections::HashSet<_> = faces.iter().map(|(photo, index, _)| (*photo, *index)).collect(); + let store = s.people_store(); + let remaining = store.cluster_exclusions.iter().filter(|entry| !keys.contains(&(entry.photo, entry.index))).count(); + if split && remaining.saturating_add(faces.len()) > crate::people_store::MAX_DECISIONS { + return Err(bad(C, "too many excluded faces")); + } + s.with_people(|store| { + store.cluster_exclusions.retain(|entry| !keys.contains(&(entry.photo, entry.index))); + if split { + store.cluster_exclusions.extend(faces.iter().map(|(photo, index, rect)| crate::people_store::ClusterExclusion { + photo: *photo, index: *index, rect: *rect, + })); + store.cluster_exclusions.sort_by_key(|entry| (entry.photo, entry.index)); + } + }).map_err(crate::EngineError::Other)?; + Ok(json!({"split": split, "faces": faces.len()})) +} + /// Today, as `people.json` writes the day of a decision (`YYYY-MM-DD`, the day it is where the user is). fn today() -> String { chrono::Local::now().date_naive().format("%Y-%m-%d").to_string() @@ -616,6 +648,14 @@ fn unnamed(s: &mut Session, p: &Value) -> Result { None => false, Some(v) => v.as_bool().ok_or_else(|| bad(C, "`bySuggestion` must be true or false"))?, }; + let cluster_offset = match p.get("clusterOffset") { + None => 0.0, + Some(v) => { + let n = v.as_f64().filter(|n| n.is_finite() && (-0.2..=0.2).contains(n)) + .ok_or_else(|| bad(C, "`clusterOffset` must be a number from -0.2 to 0.2"))?; + n as f32 + } + }; // how long this call may spend judging faces; zero only asks how far the judging is let budget = std::time::Duration::from_millis(p.get("budgetMs").and_then(Value::as_u64).unwrap_or(15).min(250)); let scope = scope_of(s, C, p)?; @@ -629,11 +669,24 @@ fn unnamed(s: &mut Session, p: &Value) -> Result { } all.sort_by_key(|(photo, index, _)| (*photo, *index)); let total = all.len(); + let offset = match p.get("offset") { + None => 0, + Some(value) => value.as_u64().and_then(|n| usize::try_from(n).ok()) + .ok_or_else(|| bad(C, "`offset` must be a non-negative integer"))?, + }; + // A catalog or filter change can shrink the list while a later page is open. + let offset = offset.min(total.saturating_sub(1) / limit * limit); // the library is judged a slice at a time, this page's faces first, so that a suggestion never depends on which // page a face falls on (issue #1365) let people = current_people(s); let progress = imp::scan_suggestions(s, budget, &all); - let arranged = imp::arrange_unnamed(s, &mut all, limit, &people); + // Bound quadratic grouping work to one page; the catalog-order offset makes every face reachable. + all = all.into_iter().skip(offset).take(limit).collect(); + let exclusions: std::collections::HashMap<_, _> = s.people_store().cluster_exclusions.iter() + .map(|entry| ((entry.photo, entry.index), entry.rect)).collect(); + let split: std::collections::HashSet<_> = all.iter().filter(|(photo, index, rect)| exclusions.get(&(*photo, *index)) == Some(rect)) + .map(|(photo, index, _)| (*photo, *index)).collect(); + let arranged = imp::arrange_unnamed(s, &mut all, limit, &people, cluster_offset, &split); all.truncate(limit); let faces: Vec = all .iter() @@ -642,7 +695,7 @@ fn unnamed(s: &mut Session, p: &Value) -> Result { let suggestion = arranged.suggestions.get(&(*photo, *index)).map(|(name, score)| json!({"name": name, "score": score})); let similarity = arranged.similarities.get(&(*photo, *index)).map(|(name, score)| json!({"name": name, "score": score})); let alike = arranged.groups.get(&(*photo, *index)); - json!({"photo": photo, "index": index, "rect": rect_json(rect), "view": rect_json(&view), "suggestion": suggestion, "similarity": similarity, "group": alike}) + json!({"photo": photo, "index": index, "rect": rect_json(rect), "view": rect_json(&view), "suggestion": suggestion, "similarity": similarity, "group": alike, "split": split.contains(&(*photo, *index))}) }) .collect(); // what the user said about a face's suggestion holds: a face rejected as the person it was suggested as is not put @@ -667,7 +720,7 @@ fn unnamed(s: &mut Session, p: &Value) -> Result { } } let mut out = - json!({"total": total, "faces": faces, "ordered": arranged.ordered, "ready": arranged.ready, "rejected": rejected, "scan": progress.json()}); + json!({"total": total, "offset": offset, "faces": faces, "ordered": arranged.ordered, "ready": arranged.ready, "rejected": rejected, "scan": progress.json()}); if by_suggestion && let Value::Object(map) = &mut out { // every suggestion the library holds within the scope, not only those of the faces this page lists (#1365) map.insert("groups".into(), imp::suggestion_groups(s, &scope, &people)); @@ -1006,6 +1059,19 @@ mod imp { let current_job = d.epoch == s.faces.epoch && d.tag == s.faces.index.tag; let maintenance = s.faces.maintenance.as_mut().is_some_and(|run| run.in_flight.remove(&id)); let (done_embeddings, failed_embeddings) = ingest(s, d); + if maintenance && let Some(regions) = s.faces.maintenance.as_ref().and_then(|run| run.selected_regions.as_ref()) + && let Some(photo) = s.catalog.photo(id) + { + let keys: Vec<_> = photo.meta.regions.iter().enumerate() + .filter(|(_, region)| regions.contains(&(id.0, crate::faces_index::region_key(®ion.rect)))) + .map(|(index, _)| (id.0, index)).collect(); + for key in keys { + s.faces.suggestions.judged.remove(&key); + s.faces.suggestions.suggestions.remove(&key); + s.faces.suggestions.similarities.remove(&key); + } + s.faces.suggestions.complete = false; + } embedded += done_embeddings; failed += failed_embeddings; if !maintenance { @@ -1269,12 +1335,59 @@ mod imp { if s.faces.maintenance.is_some() { return Err(bad(C, "a face maintenance scan is already running")); } + // Clearing is deliberately face-only and never removes catalog regions, names, or decisions. + // Refuse an in-flight job for these photos: otherwise it could restore the just-cleared data. + if p.get("mode").and_then(Value::as_str) == Some("clear") { + if ["ids", "scope", "folder", "folders", "album", "albums"].iter().any(|key| p.get(*key).is_some()) { + return Err(bad(C, "`clear` requires selected faces and cannot be combined with photo scopes")); + } + let faces = super::unnamed_faces_param(s, C, p)?; + if faces.iter().any(|(photo, _, _)| s.faces.in_flight.contains(&PhotoId(*photo))) { + return Err(bad(C, "a selected photo is being scanned; wait for it to finish and try again")); + } + current_manifest(s, C, true)?; + for (photo, index, rect) in &faces { + s.faces.index.forget_region(*photo, rect); + let key = (*photo, *index); + s.faces.suggestions.judged.remove(&key); + s.faces.suggestions.suggestions.remove(&key); + s.faces.suggestions.similarities.remove(&key); + } + s.faces.suggestions.complete = false; + s.faces.suggestions.indexed = usize::MAX; + s.faces.queue_stamp = None; + s.faces.index.save().map_err(|e| bad(C, format!("could not save the cleared face cache: {e}")))?; + return Ok(json!({"state": "complete", "mode": "clear", "scope": "selected faces", "cleared": faces.len()})); + } let mode = parse_scan_mode(p)?; current_with(s, C, true)?; if mode.detects() { super::super::face_detect::detector(s).map_err(|e| e.into_error(C))?; } - let (scope_ids, scope) = maintenance_scope(s, p)?; + // Face selectors are exclusive: accidentally unioning them with a catalog or photo scope could + // rebuild unrelated embeddings. Detection actions intentionally operate on their containing photos. + let selected_faces = if p.get("faces").is_some() { + if ["ids", "scope", "folder", "folders", "album", "albums"].iter().any(|key| p.get(*key).is_some()) { + return Err(bad(C, "`faces` cannot be combined with photo scope selectors")); + } + Some(super::unnamed_faces_param(s, C, p)?) + } else { + None + }; + let (scope_ids, scope) = if let Some(faces) = &selected_faces { + let mut ids: Vec<_> = faces.iter().map(|(photo, _, _)| PhotoId(*photo)).collect(); + ids.sort_by_key(|id| id.0); + ids.dedup(); + (ids, "selected faces".to_string()) + } else { + maintenance_scope(s, p)? + }; + if selected_faces.is_some() && mode == FaceScanMode::RebuildNamed { + return Err(bad(C, "selected faces are unnamed; choose rebuild instead")); + } + let selected_regions: Option> = selected_faces.as_ref().map(|faces| { + faces.iter().map(|(photo, _, rect)| (*photo, crate::faces_index::region_key(rect))).collect() + }); if mode.detects() { // A deliberate user run retries photos the continuous indexer could not read earlier in this session. for id in &scope_ids { @@ -1309,12 +1422,36 @@ mod imp { return Err(bad(C, "`behavior` and `replaceDetections` apply only to `mode: rescan`")); } + // Re-judge only the requested faces, even when their embeddings already exist. Rebuild also + // invalidates old suggestions before replacing their vectors. + if let Some(faces) = &selected_faces { + for (photo, index, rect) in faces { + let key = (*photo, *index); + s.faces.suggestions.judged.remove(&key); + s.faces.suggestions.suggestions.remove(&key); + s.faces.suggestions.similarities.remove(&key); + if mode == FaceScanMode::Rebuild { + s.faces.index.forget_region(*photo, rect); + } + } + s.faces.suggestions.complete = false; + s.faces.suggestions.indexed = usize::MAX; + } let mut queue = std::collections::VecDeque::new(); for id in &scope_ids { - if !mode_needs_photo(s, mode, *id) { + let needs = if let Some(faces) = &selected_faces { + if mode == FaceScanMode::Recognize { + faces.iter().any(|(photo, _, rect)| *photo == id.0 && s.faces.index.needs(*photo, rect)) + } else { + mode_needs_photo(s, mode, *id) + } + } else { + mode_needs_photo(s, mode, *id) + }; + if !needs { continue; } - if mode == FaceScanMode::Rebuild { + if mode == FaceScanMode::Rebuild && selected_faces.is_none() { s.faces.index.forget_photo(id.0); } else if mode == FaceScanMode::RebuildNamed && let Some(photo) = s.catalog.photo(*id) @@ -1352,6 +1489,7 @@ mod imp { queue, min_score, named_only: mode.named_only(), + selected_regions: if mode.detects() { None } else { selected_regions }, in_flight: std::collections::HashSet::new(), total, done: 0, @@ -1449,15 +1587,36 @@ mod imp { } continue; } + // A continuous indexing job may have been in flight when this rebuild was requested. + // Drop the selected vectors again after that job drains, immediately before preparing ours. + if let Some(run) = s.faces.maintenance.as_ref() + && run.mode == FaceScanMode::Rebuild + && let Some(regions) = &run.selected_regions + && let Some(photo) = s.catalog.photo(item.photo) + { + let rects: Vec<_> = photo.meta.regions.iter().filter(|region| regions.contains(&(item.photo.0, crate::faces_index::region_key(®ion.rect)))).map(|region| region.rect).collect(); + for rect in rects { + s.faces.index.forget_region(item.photo.0, &rect); + } + } let (min_score, named_only) = s.faces.maintenance.as_ref().map_or((crate::faces_worker::REGION_SCORE, false), |run| (run.min_score, run.named_only)); let needs_work = scan_item_needs_work(s, item, named_only); - let Some(job) = prepare(s, item.photo, item.search, item.redetect, item.replace_detections, min_score, named_only) else { + let Some(mut job) = prepare(s, item.photo, item.search, item.redetect, item.replace_detections, min_score, named_only) else { if let Some(run) = s.faces.maintenance.as_mut() { finish_scan_photo(run, item.photo, needs_work, "photo could not be prepared for scanning"); } continue; }; + if let Some(regions) = s.faces.maintenance.as_ref().and_then(|run| run.selected_regions.as_ref()) { + job.todo.retain(|rect| regions.contains(&(item.photo.0, crate::faces_index::region_key(rect)))); + if job.todo.is_empty() && !job.detect { + if let Some(run) = s.faces.maintenance.as_mut() { + finish_scan_photo(run, item.photo, false, ""); + } + continue; + } + } let detail = s.catalog.photo(item.photo).map(|photo| photo.file_name.clone()).unwrap_or_else(|| item.photo.0.to_string()); if let Some(run) = s.faces.maintenance.as_ref() { run.task.detail(&detail); @@ -2057,7 +2216,7 @@ mod imp { const RIVAL_CHECKS: usize = 4; /// Most faces put in order of likeness (the order is a pass over every pair of them). - const MAX_ARRANGED: usize = 1500; + const MAX_ARRANGED: usize = 3000; /// Faces in an order that puts look-alikes together: start anywhere, then always go to the closest face not yet placed. fn nearest_chain(embeddings: &[&[f32]]) -> Vec { @@ -2271,6 +2430,8 @@ mod imp { all: &mut Vec<(u64, usize, Rect)>, limit: usize, people: &std::collections::HashSet, + cluster_offset: f32, + split: &std::collections::HashSet<(u64, usize)>, ) -> super::Arranged { let none = super::Arranged { ordered: false, @@ -2283,6 +2444,10 @@ mod imp { let Ok(manifest) = current_manifest(s, "faces.unnamed", false) else { return none }; let (mut embedded, mut plain) = (Vec::new(), Vec::new()); for f in all.drain(..) { + if split.contains(&(f.0, f.1)) { + plain.push(f); + continue; + } match s.faces.index.get(f.0, &f.2) { Some(e) => embedded.push((f, e.clone())), None => plain.push(f), @@ -2291,7 +2456,7 @@ mod imp { let beyond = embedded.split_off(embedded.len().min(MAX_ARRANGED)); let order = nearest_chain(&embedded.iter().map(|(_, e)| &e[..]).collect::>()); let ordered: Vec<((u64, usize, Rect), Arc<[f32]>)> = order.into_iter().filter_map(|i| embedded.get(i).cloned()).collect(); - let threshold = manifest.thresholds.match_cosine.unwrap_or(DEFAULT_THRESHOLD); + let threshold = (manifest.thresholds.match_cosine.unwrap_or(DEFAULT_THRESHOLD) + cluster_offset).clamp(0.0, 1.0); let groups = look_alike_groups(ordered.iter().map(|((photo, index, _), e)| ((*photo, *index), &e[..])), threshold); let grouped = !ordered.is_empty(); all.extend(ordered.into_iter().map(|(f, _)| f)); @@ -2311,8 +2476,9 @@ mod imp { super::Arranged { ordered: grouped, ready: true, suggestions, similarities, groups } } - /// Number the runs of `chain` (faces in order of likeness) whose neighbours are at least `threshold` alike: each - /// run is one look-alike group. A pair that cannot be compared starts a new group. + /// Group consecutive neighbours that also resemble the first face in the group. The anchor check prevents + /// a long chain of small changes from silently joining faces that are very different from one another. + /// A pair that cannot be compared starts a new group. pub(super) fn look_alike_groups<'a>( chain: impl Iterator, threshold: f32, @@ -2320,13 +2486,18 @@ mod imp { let mut groups = std::collections::HashMap::new(); let mut group = 0usize; let mut prev: Option<&[f32]> = None; + let mut anchor: Option<&[f32]> = None; for (key, e) in chain { - if let Some(p) = prev - && !matching::cosine(p, e).is_some_and(|c| c >= threshold) + if prev.is_some_and(|p| !matching::cosine(p, e).is_some_and(|c| c >= threshold)) + || anchor.is_some_and(|a| !matching::cosine(a, e).is_some_and(|c| c >= threshold)) { group = group.saturating_add(1); + anchor = None; } groups.insert(key, group); + if anchor.is_none() { + anchor = Some(e); + } prev = Some(e); } groups @@ -2434,6 +2605,21 @@ mod imp { assert!(look_alike_groups(std::iter::empty(), 0.5).is_empty()); } + #[test] + fn grouping_threshold_and_anchor_prevent_chain_drift() { + let a = vec![1.0, 0.0]; + let b = vec![0.8, 0.6]; + let c = vec![0.28, 0.96]; + let chain = [((1, 0), &a), ((2, 0), &b), ((3, 0), &c)]; + let groups = look_alike_groups(chain.iter().map(|(key, e)| (*key, &e[..])), 0.75); + assert_eq!(groups[&(1, 0)], groups[&(2, 0)]); + assert_ne!(groups[&(1, 0)], groups[&(3, 0)]); + let strict = look_alike_groups(chain.iter().map(|(key, e)| (*key, &e[..])), 0.9); + assert_ne!(strict[&(1, 0)], strict[&(2, 0)]); + let loose = look_alike_groups(chain.iter().map(|(key, e)| (*key, &e[..])), 0.2); + assert_eq!(loose[&(1, 0)], loose[&(3, 0)]); + } + fn unit(parts: &[(usize, f32)]) -> Vec { let mut v = vec![0.0; 64]; for (i, x) in parts { @@ -2899,6 +3085,8 @@ mod imp { _: &mut Vec<(u64, usize, lcc_geom::Rect)>, _: usize, _: &std::collections::HashSet, + _: f32, + _: &std::collections::HashSet<(u64, usize)>, ) -> super::Arranged { super::Arranged { ordered: false, @@ -2912,6 +3100,11 @@ mod imp { pub fn specs() -> Vec { vec![ + cmd!( + "faces.splitUnknown", "Split Unknown Faces", [], None, + "{faces: [{photo, index, rect?}], split?: true}: exclude unnamed faces from automatic grouping, or restore them with split: false; reversible and stored locally", + super::always, split_unknown + ), cmd!( "faces.ignore", "Ignore Faces", @@ -2937,7 +3130,7 @@ pub fn specs() -> Vec { "Maintain Face Index", [], None, - "{mode?: detect | recognize | new | rebuild | rebuildNamed | rescan, scope?: all | visible | selected, ids?, folder?, folders?, album?, albums?, includeSubfolders?: bool (filesystem folders only; collection sets include nested collections), minScore?: 0..1, behavior?: merge | replace} → {state, mode, scope, done, total, pendingPhotos, failed, taskId}: start a cancellable background maintenance pass. `detect` finds and embeds missing faces; `recognize` embeds existing boxes only; `new` skips indexed/searched photos; `rebuild` re-embeds existing boxes; `rebuildNamed` rebuilds the named-face gallery; `rescan` runs detection again and merges, or replaces earlier automatic detections with `behavior: replace`. Select folders/albums/ids, or the whole library by default. Pause with `faces.pause`, cancel its `taskId` with `activity.cancel`, and poll `faces.scanStatus`", + "{mode?: detect | recognize | new | rebuild | rebuildNamed | rescan | clear, scope?: all | visible | selected, faces?: [{photo, index, rect?}], ids?, folder?, folders?, album?, albums?, includeSubfolders?: bool (filesystem folders only; collection sets include nested collections), minScore?: 0..1, behavior?: merge | replace} → {state, mode, scope, done, total, pendingPhotos, failed, taskId}: start a cancellable background maintenance pass. `detect` finds and embeds missing faces; `recognize` embeds existing boxes only; `new` skips indexed/searched photos; `rebuild` re-embeds existing boxes; `rebuildNamed` rebuilds the named-face gallery; `rescan` runs detection again and merges, or replaces earlier automatic detections with `behavior: replace`. Select faces (exclusive of photo selectors), folders/albums/ids, or the whole library by default. Recognition and rebuilding are face-scoped; detection uses the containing photos. `clear` forgets the selected unnamed faces’ cached embeddings and suggestions; background indexing may recreate them. Pause with `faces.pause`, cancel its `taskId` with `activity.cancel`, and poll `faces.scanStatus`", super::always, imp::maintain ), @@ -3036,7 +3229,7 @@ pub fn specs() -> Vec { "Unnamed Faces", [], None, - "{limit?: 600, scope?: \"filter\", bySuggestion?: false, budgetMs?: 15} → {total, faces: [{photo, index, rect, view, suggestion: {name, score} | null, similarity: {name, score} | null}], ordered, ready, rejected, scan: {total, judged, complete}, groups?}: the faces nobody has named (with `scope: \"filter\"`, only in the photos the library shows: the sidebar's source and the filter, any person filter aside); with a recognition model chosen, look-alikes are next to each other and a face the named ones recognise carries the name they suggest. `similarity` is the best confirmed-person match, including below-threshold matches. Every unnamed face with an embedding is judged against the named ones, `budgetMs` of that per call at most, so a suggestion does not depend on the page a face falls on: `scan` says how many of the library's faces were judged, and whether all of them were (`budgetMs: 0` only reports). With `bySuggestion: true`, `groups` lists every suggested face in the scope under the person suggested ([{name, total, faces: [{photo, index, rect, view, score}]}], the most faces first), not only the listed page's. `view` is the box to show the face by. Name them with `faces.nameFaces`, ignore them with `faces.ignore`", + "{limit?: 600, offset?: 0, scope?: \"filter\", bySuggestion?: false, budgetMs?: 15, clusterOffset?: -0.2..0.2} → {total, faces: [{photo, index, rect, view, suggestion: {name, score} | null, similarity: {name, score} | null}], ordered, ready, rejected, scan: {total, judged, complete}, groups?}: the faces nobody has named (with `scope: \"filter\"`, only in the photos the library shows: the sidebar's source and the filter, any person filter aside); with a recognition model chosen, look-alikes are next to each other and a face the named ones recognise carries the name they suggest. `similarity` is the best confirmed-person match, including below-threshold matches. Every unnamed face with an embedding is judged against the named ones, `budgetMs` of that per call at most, so a suggestion does not depend on the page a face falls on: `scan` says how many of the library's faces were judged, and whether all of them were (`budgetMs: 0` only reports). With `bySuggestion: true`, `groups` lists every suggested face in the scope under the person suggested ([{name, total, faces: [{photo, index, rect, view, score}]}], the most faces first), not only the listed page's. `view` is the box to show the face by. Name them with `faces.nameFaces`, ignore them with `faces.ignore`", super::always, unnamed ), diff --git a/crates/engine/src/faces_index.rs b/crates/engine/src/faces_index.rs index c80bc15793..fa5045482d 100644 --- a/crates/engine/src/faces_index.rs +++ b/crates/engine/src/faces_index.rs @@ -706,6 +706,8 @@ pub(crate) struct FaceScanRun { pub min_score: f32, /// Recognition/gallery-only rebuild: only named face regions are embedded. pub named_only: bool, + /// Region keys to embed for a face-scoped pass; detection still operates on whole photos. + pub selected_regions: Option>, /// The subset of `FacesState::in_flight` belonging to this request. pub in_flight: HashSet, pub total: u64, diff --git a/crates/engine/src/people_store.rs b/crates/engine/src/people_store.rs index a630e23c2f..afda6c031a 100644 --- a/crates/engine/src/people_store.rs +++ b/crates/engine/src/people_store.rs @@ -95,6 +95,14 @@ pub struct SuggestionDecision { pub decided: String, } +/// A face excluded from automatic Unknown grouping until the user restores it. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ClusterExclusion { + pub photo: u64, + pub index: usize, + pub rect: lcc_geom::Rect, +} + #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct PeopleStore { pub version: u32, @@ -106,11 +114,14 @@ pub struct PeopleStore { /// `faces.suggestionDecisions` lists them newest first). #[serde(default)] pub decisions: Vec, + /// Explicitly split faces, tied to the face box so an edited region cannot inherit the decision. + #[serde(default)] + pub cluster_exclusions: Vec, } impl Default for PeopleStore { fn default() -> Self { - PeopleStore { version: 1, roles: Vec::new(), people: Vec::new(), decisions: Vec::new() } + PeopleStore { version: 1, roles: Vec::new(), people: Vec::new(), decisions: Vec::new(), cluster_exclusions: Vec::new() } } } @@ -167,6 +178,11 @@ impl PeopleStore { } let mut s: PeopleStore = serde_json::from_slice(bytes).map_err(|e| format!("{FILE} is damaged: {e}"))?; s.roles.truncate(MAX_ROLES); + s.cluster_exclusions.truncate(MAX_DECISIONS); + s.cluster_exclusions.retain(|entry| entry.index < MAX_DECISION_INDEX + && [entry.rect.x0, entry.rect.y0, entry.rect.x1, entry.rect.y1].iter().all(|v| v.is_finite())); + s.cluster_exclusions.sort_by_key(|entry| (entry.photo, entry.index)); + s.cluster_exclusions.dedup_by_key(|entry| (entry.photo, entry.index)); let n = s.decisions.len(); if n > MAX_DECISIONS { s.decisions.drain(..n - MAX_DECISIONS); diff --git a/crates/engine/src/tests_face_recognize.rs b/crates/engine/src/tests_face_recognize.rs index 5850cdb28c..66d3d47d0e 100644 --- a/crates/engine/src/tests_face_recognize.rs +++ b/crates/engine/src/tests_face_recognize.rs @@ -1318,3 +1318,181 @@ fn naming_someone_judges_the_library_again_for_suggestions() { assert_eq!((robert["faces"][0]["photo"].clone(), robert["faces"][0]["index"].clone()), (json!(b.0), json!(1)), "{r}"); let _ = std::fs::remove_dir_all(&d); } + +#[test] +fn selected_face_rebuild_does_not_forget_other_faces_on_the_photo() { + let d = temp("maintenance-selected-faces"); + let (mut s, _) = setup(&d, 64); + s.execute("faces.index", &json!({"budgetMs": 0})).unwrap(); + let (a, _) = two_photos(&s); + let first = region(0.1, None); + let second = region(0.5, None); + set_regions(&mut s, a, vec![first.clone(), second.clone()]); + s.faces.index.insert(a.0, &first.rect, unit64(&[(0, 1.0)])); + s.faces.index.insert(a.0, &second.rect, unit64(&[(1, 1.0)])); + let selection = json!([{ "photo": a.0, "index": 0, "rect": first.rect }]); + assert!(s.execute("faces.maintain", &json!({"mode": "rebuild", "faces": selection, "scope": "all"})).is_err()); + assert!(s.faces.index.contains(a.0, &first.rect)); + let r = s.execute("faces.maintain", &json!({"mode": "rebuild", "faces": selection})).unwrap(); + assert_eq!(r["scope"], "selected faces"); + assert!(!s.faces.index.contains(a.0, &first.rect)); + assert!(s.faces.index.contains(a.0, &second.rect)); +} + +#[test] +fn unnamed_cluster_offset_is_validated() { + let mut s = Session::with_demo(); + for bad in [json!(0.21), json!(-0.21), json!("strict"), json!(null)] { + assert!(s.execute("faces.unnamed", &json!({"clusterOffset": bad})).is_err()); + } + for good in [-0.2, 0.0, 0.2] { + assert!(s.execute("faces.unnamed", &json!({"clusterOffset": good})).is_ok()); + } +} + +#[test] +fn selected_face_recognition_invalidates_only_its_suggestion() { + let d = temp("maintenance-selected-recognize"); + let (mut s, _) = setup(&d, 64); + s.execute("faces.index", &json!({"budgetMs": 0})).unwrap(); + let (a, _) = two_photos(&s); + let first = region(0.1, None); + let second = region(0.5, None); + set_regions(&mut s, a, vec![first.clone(), second.clone()]); + s.faces.index.insert(a.0, &first.rect, unit64(&[(0, 1.0)])); + s.faces.index.insert(a.0, &second.rect, unit64(&[(1, 1.0)])); + for index in [0, 1] { + s.faces.suggestions.judge((a.0, index), Some(("Ann".into(), 0.9)), Some(("Ann".into(), 0.9))); + } + s.execute("faces.maintain", &json!({"mode": "recognize", "faces": [{"photo": a.0, "index": 0, "rect": first.rect}]})).unwrap(); + assert!(!s.faces.suggestions.judged.contains(&(a.0, 0))); + assert!(s.faces.suggestions.judged.contains(&(a.0, 1))); + assert!(s.faces.index.contains(a.0, &first.rect)); + assert!(s.faces.index.contains(a.0, &second.rect)); +} + +#[test] +fn unnamed_listing_can_request_more_than_the_default_page() { + let mut s = Session::with_demo(); + let (id, _) = two_photos(&s); + set_regions(&mut s, id, (0..650).map(|_| region(0.1, None)).collect()); + let default = s.execute("faces.unnamed", &json!({})).unwrap(); + assert_eq!(default["total"], 650); + assert_eq!(default["faces"].as_array().unwrap().len(), 600); + let expanded = s.execute("faces.unnamed", &json!({"limit": 3000})).unwrap(); + assert_eq!(expanded["faces"].as_array().unwrap().len(), 650); +} + +#[test] +fn grouping_includes_embedded_faces_beyond_the_old_limit() { + let d = temp("grouping-over-1500"); + let (mut s, _) = setup(&d, 64); + s.execute("faces.index", &json!({"budgetMs": 0})).unwrap(); + let (id, _) = two_photos(&s); + let regions: Vec<_> = (0..1501).map(|i| region(i as f64 / 10_000.0, None)).collect(); + set_regions(&mut s, id, regions.clone()); + let vector = unit64(&[(0, 1.0)]); + for face in ®ions { + s.faces.index.insert(id.0, &face.rect, vector.clone()); + } + let result = s.execute("faces.unnamed", &json!({"limit": 3000})).unwrap(); + let faces = result["faces"].as_array().unwrap(); + assert_eq!(faces.len(), 1501); + let group = faces[0]["group"].as_u64().unwrap(); + assert!(faces.iter().all(|face| face["group"] == group), "all embedded faces belong to the same group"); +} + +#[test] +fn naming_a_stale_face_snapshot_does_not_change_any_face() { + let mut s = Session::with_demo(); + let (id, _) = two_photos(&s); + let first = region(0.1, None); + let second = region(0.5, None); + set_regions(&mut s, id, vec![first.clone(), second.clone()]); + let selection = json!([ + {"photo": id.0, "index": 0, "rect": first.rect}, + {"photo": id.0, "index": 1, "rect": first.rect} + ]); + assert!(s.execute("faces.nameFaces", &json!({"faces": selection, "name": "Alex"})).is_err()); + let photo = s.catalog.photo(id).unwrap(); + assert!(photo.meta.regions.iter().all(|region| region.name.is_none())); +} + +#[test] +fn selected_face_clear_does_not_touch_the_other_face() { + let d = temp("maintenance-clear-selected"); + let (mut s, _) = setup(&d, 64); + s.execute("faces.index", &json!({"budgetMs": 0})).unwrap(); + let (id, _) = two_photos(&s); + let a = region(0.1, None); + let b = region(0.5, None); + set_regions(&mut s, id, vec![a.clone(), b.clone()]); + s.faces.index.insert(id.0, &a.rect, unit64(&[(0, 1.0)])); + s.faces.index.insert(id.0, &b.rect, unit64(&[(1, 1.0)])); + s.faces.suggestions.judge((id.0, 0), None, Some(("Ann".into(), 0.9))); + s.faces.suggestions.judge((id.0, 1), None, Some(("Ann".into(), 0.9))); + let selected = json!([{ "photo": id.0, "index": 0, "rect": a.rect }]); + let out = s.execute("faces.maintain", &json!({"mode": "clear", "faces": selected})).unwrap(); + assert_eq!(out["cleared"], 1); + assert!(!s.faces.index.contains(id.0, &a.rect)); + assert!(s.faces.index.contains(id.0, &b.rect)); + assert!(!s.faces.suggestions.suggestions.contains_key(&(id.0, 0))); + assert!(s.faces.suggestions.suggestions.contains_key(&(id.0, 1))); + assert_eq!(s.catalog.photo(id).unwrap().meta.regions.len(), 2); +} + +#[test] +fn splitting_a_face_is_persistent_reversible_and_box_specific() { + let mut s = Session::with_demo(); + let (id, _) = two_photos(&s); + let a = region(0.1, None); + set_regions(&mut s, id, vec![a.clone()]); + let faces = json!([{ "photo": id.0, "index": 0, "rect": a.rect }]); + s.execute("faces.splitUnknown", &json!({"faces": faces})).unwrap(); + let saved = s.people_store().to_bytes(); + let restored = crate::people_store::PeopleStore::from_bytes(&saved).unwrap(); + assert_eq!(restored.cluster_exclusions.len(), 1); + assert_eq!(s.execute("faces.unnamed", &json!({})).unwrap()["faces"][0]["split"], true); + s.execute("faces.splitUnknown", &json!({"faces": faces, "split": false})).unwrap(); + assert!(s.people_store().cluster_exclusions.is_empty()); +} + +#[test] +fn unnamed_listing_pages_are_disjoint_and_reach_the_end() { + let mut s = Session::with_demo(); + let (id, _) = two_photos(&s); + set_regions(&mut s, id, (0..650).map(|i| region(i as f64 / 10_000.0, None)).collect()); + let first = s.execute("faces.unnamed", &json!({"limit": 600})).unwrap(); + let last = s.execute("faces.unnamed", &json!({"limit": 600, "offset": 600})).unwrap(); + assert_eq!(first["faces"].as_array().unwrap().len(), 600); + assert_eq!(last["offset"], 600); + assert_eq!(last["faces"].as_array().unwrap().len(), 50); + assert_eq!(last["faces"][0]["index"], 600); + assert!(s.execute("faces.unnamed", &json!({"offset": "bad"})).is_err()); +} + +#[test] +fn split_outlier_is_removed_from_group_and_can_be_restored() { + let d = temp("split-group"); + let (mut s, _) = setup(&d, 64); + s.execute("faces.index", &json!({"budgetMs": 0})).unwrap(); + let (id, _) = two_photos(&s); + let a = region(0.1, None); + let b = region(0.5, None); + set_regions(&mut s, id, vec![a.clone(), b.clone()]); + for region in [&a, &b] { + s.faces.index.insert(id.0, ®ion.rect, unit64(&[(0, 1.0)])); + } + let selected = json!([{ "photo": id.0, "index": 1, "rect": b.rect }]); + let initial = s.execute("faces.unnamed", &json!({})).unwrap(); + assert_eq!(initial["faces"][0]["group"], initial["faces"][1]["group"]); + assert!(initial["faces"][0]["group"].is_number()); + s.execute("faces.splitUnknown", &json!({"faces": selected})).unwrap(); + let split = s.execute("faces.unnamed", &json!({})).unwrap(); + let outlier = split["faces"].as_array().unwrap().iter().find(|f| f["index"] == 1).unwrap(); + assert_eq!(outlier["split"], true); + assert!(outlier["group"].is_null()); + s.execute("faces.splitUnknown", &json!({"faces": selected, "split": false})).unwrap(); + let again = s.execute("faces.unnamed", &json!({})).unwrap(); + assert_eq!(again["faces"][0]["group"], again["faces"][1]["group"]); +} diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index b15c090a25..3907b0bbcb 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -1632,6 +1632,9 @@ impl LccApp { if let Ok(v) = &r { edit_in::after_command(self, id, v); } + if r.is_ok() && id == "faces.splitUnknown" { + self.caches.faces_epoch = self.caches.faces_epoch.wrapping_add(1); + } if let Ok(v) = &r && id == "ml.status" && (params.get("device").is_some() || params.get("preference").is_some()) diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index dcfd082090..29246fe651 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -2716,6 +2716,7 @@ pub fn run_ui_command(app: &mut LccApp, id: &str, p: &Value) -> Option "recognize", + "clear" => "clear", "new" | "newitems" | "new-only" => "new", "rebuild" | "all" => "rebuild", "rebuildnamed" | "named" | "confirmed" => "rebuildNamed", @@ -2726,7 +2727,7 @@ pub fn run_ui_command(app: &mut LccApp, id: &str, p: &Value) -> Option "Recognize Existing Faces", + "clear" => "Clear Selected Face Data", "new" => "Scan New Items", "rebuild" => "Rebuild All Embeddings", "rebuildNamed" => "Rebuild Named Faces", @@ -632,13 +633,16 @@ pub fn show(app: &mut LccApp, ctx: &egui::Context) { for (value, label) in [ ("detect", "Detect and Recognize"), ("recognize", "Recognize Existing Faces"), + ("clear", "Clear Selected Face Data"), ("new", "Scan New Items"), ("rebuild", "Rebuild All Embeddings"), ("rebuildNamed", "Rebuild Named Faces"), ("rescan", "Rescan and Merge"), ("reset", "Reset All Face Data"), ] { - let r = ui.selectable_value(mode, value.to_string(), crate::i18n::tr(label)); + let r = ui.add_enabled_ui(!(scope == "people" && value == "rebuildNamed") && !(scope != "people" && value == "clear"), |ui| { + ui.selectable_value(mode, value.to_string(), crate::i18n::tr(label)) + }).inner; crate::widgets::register(ui.ctx(), format!("faceMaintenance:mode:{value}"), r.rect); } }); @@ -661,11 +665,16 @@ pub fn show(app: &mut LccApp, ctx: &egui::Context) { for (value, label) in [ ("visible", "the photos in view"), ("selected", "the selected photos"), + ("people", "selected faces in People"), ("all", "the whole catalog"), ("folder", "Folder"), ("album", "Collection"), ] { - let enabled = value != "selected" || selected_count > 0; + let enabled = match value { + "selected" => selected_count > 0, + "people" => !app.ui.unnamed_selected.is_empty(), + _ => true, + }; let r = ui.add_enabled_ui(enabled, |ui| { ui.radio_value(scope, value.to_string(), crate::i18n::tr(label)) }).inner; @@ -673,6 +682,15 @@ pub fn show(app: &mut LccApp, ctx: &egui::Context) { } }); match scope.as_str() { + "people" => { + if matches!(mode.as_str(), "detect" | "new" | "rescan") { + crate::dialog_frame::note(ui, egui::RichText::new(crate::i18n::tr("Detection runs on the entire photos containing the selected faces, including other faces in those photos.")).color(t.caution)); + } else if mode == "clear" { + crate::dialog_frame::note(ui, egui::RichText::new(crate::i18n::tr("Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.")).color(t.caution)); + } else { + crate::dialog_frame::note(ui, egui::RichText::new(crate::i18n::tr("Only the selected faces are processed.")).color(t.text_dim)); + } + } "folder" => { ui.label(egui::RichText::new(crate::i18n::tr("Enter folders, one path per line. Only catalog photos in those folders are scanned.")).color(t.text_dim)); let r = ui.add(egui::TextEdit::multiline(folders).desired_rows(2).hint_text(crate::i18n::tr("Folder"))); @@ -2056,6 +2074,8 @@ pub fn show(app: &mut LccApp, ctx: &egui::Context) { || (scope == "folder" && folders.trim().is_empty()) || (scope == "album" && album_ids.is_empty() && album_choice.is_none()) || (scope == "selected" && app.session.selected().is_empty()) + || (mode != "reset" && scope == "people" && (app.ui.unnamed_selected.is_empty() || mode == "rebuildNamed")) + || (mode == "clear" && scope != "people") ); let can_confirm = !rename_blocked && !face_maintenance_blocked @@ -2855,6 +2875,10 @@ pub fn confirm_dialog(app: &mut LccApp, dlg: &Dialog) -> Result *params.field_mut("scope") = json!(scope), + "people" => { + let selected: Vec<_> = app.ui.unnamed_selected.iter().copied().collect(); + *params.field_mut("faces") = json!(super::unnamed::selection_snapshot(app, &selected)?); + } "folder" => { let paths: Vec<&str> = folders.lines().map(str::trim).filter(|path| !path.is_empty()).collect(); if paths.is_empty() { diff --git a/crates/ui-egui/src/panels/people.rs b/crates/ui-egui/src/panels/people.rs index c2c3268ff9..7056be481d 100644 --- a/crates/ui-egui/src/panels/people.rs +++ b/crates/ui-egui/src/panels/people.rs @@ -296,50 +296,91 @@ pub(super) fn heading_row(ui: &mut egui::Ui) -> Rect { ui.allocate_exact_size(vec2(ui.available_width(), SECTION_H), Sense::hover()).0 } -/// Draws Unknown faces in a flat, virtualized grid with a border around each multi-face similarity cluster. The list -/// keeps its original ordering and category-wide indices; faces outside the viewport are not requested. +/// A section contains one similarity group, or the faces without a displayed match. Indices refer to +/// the original Unknown list so tile selection and Shift-click continue to use the category's ordering. +#[derive(Debug, PartialEq, Eq)] +struct UnknownSection { + grouped: bool, + indices: Vec, +} + +fn unknown_sections(faces: &[UnnamedFace]) -> Vec { + let mut sections: Vec = Vec::new(); + for range in unknown_clusters(faces) { + if range.len() > 1 { + sections.push(UnknownSection { grouped: true, indices: range.collect() }); + } else if let Some(last) = sections.last_mut().filter(|section| !section.grouped) { + last.indices.extend(range); + } else { + sections.push(UnknownSection { grouped: false, indices: range.collect() }); + } + } + sections +} + +/// Draw each similarity group as its own section, like the Suggested category. Only tiles in the +/// viewport request previews; unmatched and not-yet-embedded faces appear in a separate section. pub(super) fn clustered_face_grid(app: &mut LccApp, ui: &mut egui::Ui, visible: &[UnnamedFace], viewport: egui::Rect, ppp: f32) { + let sections = unknown_sections(visible); let tile = tile_edge(app.ui.thumb_size); let width = ui.available_width(); let cols = columns(width, tile); - let rows = visible.len().div_ceil(cols); let step = tile + GAP; - const CLUSTER_INSET: f32 = 4.0; - let (area, _) = ui.allocate_exact_size(vec2(width, rows as f32 * step + PAD + CLUSTER_INSET), Sense::hover()); - let visible_rect = viewport.translate(area.min.to_vec2()); - let t = Tokens::get(ui.ctx()); - // Outline only genuine multi-face groups. Singletons and not-yet-embedded faces stay in the efficient flat grid. - for range in unknown_clusters(visible).into_iter().filter(|range| range.len() > 1) { - let mut start = range.start; - while start < range.end { - let row = start / cols; - let end = range.end.min(row.saturating_add(1).saturating_mul(cols)); - let Some(last) = end.checked_sub(1) else { break }; - let min = pos2(area.left() + PAD + (start % cols) as f32 * step - CLUSTER_INSET, area.top() + row as f32 * step); - let max = pos2( - area.left() + PAD + (last % cols) as f32 * step + tile + CLUSTER_INSET, - area.top() + row as f32 * step + tile + 2.0 * CLUSTER_INSET, - ); - let bounds = Rect::from_min_max(min, max); - if bounds.intersects(visible_rect) { - ui.painter().rect_stroke(bounds, 5.0, Stroke::new(1.0, t.divider), StrokeKind::Inside); - } - start = end; - } + let mut tops = Vec::with_capacity(sections.len()); + let mut height = 0.0; + for section in §ions { + tops.push(height); + height += SECTION_H + section.indices.len().div_ceil(cols) as f32 * step + PAD; } - let first = ((viewport.top() - CLUSTER_INSET) / step).floor().max(0.0) as usize; - let last = ((viewport.bottom() - CLUSTER_INSET) / step).ceil().max(0.0) as usize; - let last = last.min(rows).max(first.min(rows)); + let (area, _) = ui.allocate_exact_size(vec2(width, height), Sense::hover()); let mut shown = 0usize; - for row in first..last { - for col in 0..cols { - let Some(i) = row.checked_mul(cols).and_then(|n| n.checked_add(col)) else { break }; - if i >= visible.len() { - break; + let mut group_number = 0usize; + for (number, section) in sections.iter().enumerate() { + if section.grouped { + group_number += 1; + } + let top = tops.get(number).copied().unwrap_or_default(); + let rows = section.indices.len().div_ceil(cols); + if top + SECTION_H + rows as f32 * step + PAD < viewport.top() || top > viewport.bottom() { + continue; + } + let selected = section.indices.iter().filter_map(|i| visible.get(*i)) + .all(|face| app.ui.unnamed_selected.contains(&(face.photo, face.index))); + let title = if section.grouped { + crate::i18n::tr_format!("Unknown group {}", group_number).to_string() + } else { + crate::i18n::tr("Other unknown faces").to_string() + }; + let label = crate::i18n::tr(if selected { "Deselect group" } else { "Select group" }).to_string(); + let note = if section.grouped { + crate::i18n::tr("Review these similar faces before naming or ignoring them.").to_string() + } else { + crate::i18n::tr("Faces without a displayed look-alike group.").to_string() + }; + let rect = Rect::from_min_size(pos2(area.left(), area.top() + top), vec2(width, SECTION_H)); + let action = Some((label, format!("unnamed:selectGroup:{number}"))); + if heading(ui, rect, &Heading { title: &title, count: section.indices.len(), note, action }).is_some() { + for face in section.indices.iter().filter_map(|i| visible.get(*i)) { + let key = (face.photo, face.index); + if selected { + app.ui.unnamed_selected.remove(&key); + } else { + app.ui.unnamed_selected.insert(key); + } + } + app.ui.unnamed_anchor = None; + app.ui.unnamed_focus = !selected; + } + let grid_top = top + SECTION_H; + let first = ((viewport.top() - grid_top) / step).floor().max(0.0) as usize; + let last = ((viewport.bottom() - grid_top) / step).ceil().max(0.0) as usize; + for row in first.min(rows)..last.min(rows) { + for col in 0..cols { + let Some(index) = row.checked_mul(cols).and_then(|n| n.checked_add(col)).and_then(|n| section.indices.get(n)) else { break }; + let min = pos2(area.left() + PAD + col as f32 * step, area.top() + grid_top + row as f32 * step); + super::unnamed::tile_at(app, ui, visible, *index, Rect::from_min_size(min, vec2(tile, tile)), ppp); + shown = shown.saturating_add(1); } - let min = area.min + vec2(PAD + col as f32 * step, CLUSTER_INSET + row as f32 * step); - super::unnamed::tile_at(app, ui, visible, i, Rect::from_min_size(min, vec2(tile, tile)), ppp); - shown = shown.saturating_add(1); } } app.renderer.want_variants(shown); @@ -474,10 +515,46 @@ fn unknown(app: &mut LccApp, ui: &mut egui::Ui) { // the filters narrowing the list (a date, a keyword…), removable here let chips = lcc_engine::filter_chips(&app.session.filter, &app.session.catalog); super::chips::show(app, ui, &chips); + ui.horizontal(|ui| { + ui.add_space(PAD - 4.0); + ui.label(crate::i18n::tr("Grouping")); + for (value, label) in [(-10, "Loose"), (0, "Balanced"), (10, "Strict")] { + let response = ui.selectable_value(&mut app.ui.unnamed_cluster_offset, value, crate::i18n::tr(label)); + register(ui.ctx(), format!("unnamed:grouping:{value}"), response.rect); + if response.changed() { + app.caches.unnamed = None; + app.ui.unnamed_anchor = None; + } + } + }); // what is selected below, and the box to name it with super::unnamed::naming_bar(app, ui); let list = super::unnamed::faces(app, now); let faces = unknown_faces(&list, &app.ui.rejected_suggestions, &app.ui.confirmed_suggestions); + if list.total > super::unnamed::PEOPLE_FACE_LIMIT || list.offset > 0 { + ui.horizontal_wrapped(|ui| { + let first = if list.faces.is_empty() { 0 } else { list.offset.saturating_add(1) }; + let last = list.offset.saturating_add(list.faces.len()).min(list.total); + ui.label(crate::i18n::tr_format!("Faces {}–{} of {}", first, last, list.total)); + let previous = ui.add_enabled(list.offset > 0, egui::Button::new(crate::i18n::tr("Previous"))); + register(ui.ctx(), "unnamed:previousPage", previous.rect); + let next = ui.add_enabled(last < list.total, egui::Button::new(crate::i18n::tr("Next"))); + register(ui.ctx(), "unnamed:nextPage", next.rect); + let target = if previous.clicked() { + Some(list.offset.saturating_sub(super::unnamed::PEOPLE_FACE_LIMIT)) + } else if next.clicked() { + Some(list.offset.saturating_add(super::unnamed::PEOPLE_FACE_LIMIT)) + } else { None }; + if let Some(offset) = target { + app.ui.unnamed_page_offset = offset; + app.ui.unnamed_selected.clear(); + app.ui.unnamed_anchor = None; + app.caches.unnamed = None; + ui.ctx().request_repaint(); + } + }); + ui.label(crate::i18n::tr("Groups are compared within each page; similar faces on other pages are not included.")); + } // what this category is (and why it is empty), in the UI's language let tr = crate::i18n::tr; let note = if !list.ready && list.faces.is_empty() { @@ -487,7 +564,7 @@ fn unknown(app: &mut LccApp, ui: &mut egui::Ui) { } else if faces.is_empty() { tr("No unknown faces. Faces found in your photos appear here until you name them.").to_string() } else if list.ordered { - tr("No name and no suggestion. Faces that look alike are next to each other: click to select, Shift-click for a range, then type a name.") + tr("Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.") .to_string() } else { tr("No name and no suggestion. Click faces to select them, Shift-click for a range, then type a name.").to_string() @@ -625,11 +702,12 @@ mod tests { similarity: None, suggestion_similarity: None, group: None, + split: false, } } fn listing(faces: Vec) -> Unnamed { - Unnamed { total: faces.len(), faces, ordered: true, ready: true, groups: Vec::new(), rejected: 0, scan: None } + Unnamed { total: faces.len(), offset: 0, faces, ordered: true, ready: true, groups: Vec::new(), rejected: 0, scan: None } } #[test] @@ -644,6 +722,23 @@ mod tests { assert!(unknown_clusters(&[]).is_empty()); } + #[test] + fn unknown_sections_put_each_cluster_under_a_heading_and_keep_unmatched_faces() { + let mut faces: Vec<_> = (1..=8).map(|id| face(id, 0, None)).collect(); + faces[0].group = Some(4); + faces[1].group = Some(4); + faces[4].group = Some(7); + faces[5].group = Some(7); + faces[6].group = Some(7); + assert_eq!(unknown_sections(&faces), vec![ + UnknownSection { grouped: true, indices: vec![0, 1] }, + UnknownSection { grouped: false, indices: vec![2, 3] }, + UnknownSection { grouped: true, indices: vec![4, 5, 6] }, + UnknownSection { grouped: false, indices: vec![7] }, + ]); + assert!(unknown_sections(&[]).is_empty()); + } + #[test] fn faces_follow_the_thumbnail_slider_within_their_own_limits() { assert_eq!((card_edge(90.0), card_edge(480.0)), (84.0, 260.0)); diff --git a/crates/ui-egui/src/panels/suggested.rs b/crates/ui-egui/src/panels/suggested.rs index 36b47aaccb..19460d8ae9 100644 --- a/crates/ui-egui/src/panels/suggested.rs +++ b/crates/ui-egui/src/panels/suggested.rs @@ -217,6 +217,19 @@ pub fn show(app: &mut LccApp, ui: &mut egui::Ui) { // the filters narrowing the list (a date, a keyword…), removable here let chips = lcc_engine::filter_chips(&app.session.filter, &app.session.catalog); super::chips::show(app, ui, &chips); + if !app.ui.unnamed_selected.is_empty() { + ui.horizontal(|ui| { + ui.label(crate::i18n::tr_format!("{} faces selected", app.ui.unnamed_selected.len())); + let maintenance = ui.button(crate::i18n::tr("Face Maintenance…")); + register(ui.ctx(), "suggested:maintenance", maintenance.rect); + if maintenance.clicked() { + let _ = app.run("dialog.faceMaintenance", json!({"scope": "people", "mode": "recognize"})); + } + if ui.button(crate::i18n::tr("Clear selection")).clicked() { + app.ui.unnamed_selected.clear(); + } + }); + } let list = super::unnamed::faces(app, now); // while the engine is still comparing the library's faces, keep asking it, so the groups fill in as it goes super::unnamed::keep_scanning(ui, &list); @@ -337,7 +350,7 @@ pub fn show(app: &mut LccApp, ui: &mut egui::Ui) { top + people::SECTION_H + row as f32 * (tile + people::TILE_GAP), ); shown += 1; - if let Some(verdict) = self::tile(app, ui, group.name, face, Rect::from_min_size(min, vec2(tile, tile)), ppp) { + if let Some(verdict) = self::tile(app, ui, group.name, face, &group.faces, Rect::from_min_size(min, vec2(tile, tile)), ppp) { decisions.push(Decision { verdict, person: group.name.to_string(), faces: vec![(*face).clone()] }); } } @@ -352,9 +365,10 @@ pub fn show(app: &mut LccApp, ui: &mut egui::Ui) { /// One suggested face: its picture, who it was suggested as along the bottom, and, while it is pointed at, **✓** at the /// right, **✗** under it and **−** at the left. Returns what was clicked, if anything. -fn tile(app: &mut LccApp, ui: &mut egui::Ui, person: &str, f: &UnnamedFace, r: Rect, ppp: f32) -> Option { +#[allow(clippy::too_many_arguments)] +fn tile(app: &mut LccApp, ui: &mut egui::Ui, person: &str, f: &UnnamedFace, group: &[&UnnamedFace], r: Rect, ppp: f32) -> Option { let t = Tokens::get(ui.ctx()); - let resp = ui.interact(r, egui::Id::new(("suggested-face", f.photo, f.index)), Sense::hover()); + let resp = ui.interact(r, egui::Id::new(("suggested-face", f.photo, f.index)), Sense::click()); crate::widgets::announce(&resp, crate::i18n::tr_format!("Suggested as {}", person)); register(ui.ctx(), format!("suggested:face:{}:{}", f.photo, f.index), r); // the three controls, each found by a script whether it is drawn yet or not (they show while the tile is pointed at) @@ -381,7 +395,9 @@ fn tile(app: &mut LccApp, ui: &mut egui::Ui, person: &str, f: &UnnamedFace, r: R } // which face this tile is about, when another shares it (#1147) super::face_preview::outline(app, p, r, f.photo, f.view); - if hovered { + if app.ui.unnamed_selected.contains(&(f.photo, f.index)) { + p.rect_stroke(r, 3.0, Stroke::new(2.0, Color32::from_rgb(110, 160, 255)), StrokeKind::Inside); + } else if hovered { p.rect_stroke(r, 3.0, Stroke::new(1.5, Color32::WHITE), StrokeKind::Inside); } // who it was suggested as, along the bottom edge @@ -421,6 +437,18 @@ fn tile(app: &mut LccApp, ui: &mut egui::Ui, person: &str, f: &UnnamedFace, r: R f.view, super::face_preview::suggestion_caption(f.suggestion.as_deref().zip(f.suggestion_similarity)), ); + crate::widgets::context_menu(&resp, |ui| { + if ui.button(crate::i18n::tr("Select group for maintenance")).clicked() { + app.ui.unnamed_selected.extend(group.iter().map(|face| (face.photo, face.index))); + ui.close(); + } + }); + if resp.clicked() { + let key = (f.photo, f.index); + if !app.ui.unnamed_selected.remove(&key) { + app.ui.unnamed_selected.insert(key); + } + } if check_r.clicked() { return Some(Verdict::Confirm); } @@ -448,11 +476,12 @@ mod tests { similarity: None, suggestion_similarity: None, group: None, + split: false, } } fn listing(faces: Vec) -> Unnamed { - Unnamed { total: faces.len(), faces, ordered: true, ready: true, groups: Vec::new(), rejected: 0, scan: None } + Unnamed { total: faces.len(), offset: 0, faces, ordered: true, ready: true, groups: Vec::new(), rejected: 0, scan: None } } /// Issue #1050: the groups hold the suggested faces under the person suggested, the most faces first and one diff --git a/crates/ui-egui/src/panels/unnamed.rs b/crates/ui-egui/src/panels/unnamed.rs index d351d1e455..23ee890f89 100644 --- a/crates/ui-egui/src/panels/unnamed.rs +++ b/crates/ui-egui/src/panels/unnamed.rs @@ -31,6 +31,8 @@ pub struct UnnamedFace { pub suggestion_similarity: Option, /// Its look-alike group (#259), once recognition has compared it: faces sharing one can be selected at once. pub group: Option, + /// Explicitly kept out of automatic similarity groups. + pub split: bool, } /// One person's suggested faces (issue #1050): the faces the named ones recognise as them, most alike first, so one @@ -42,6 +44,7 @@ pub struct SuggestionGroup { /// How many faces the library has for this person within the filter (`faces.len()`, a face never in two), which /// can be more than the listed page holds (issue #1365). pub total: usize, + pub offset: usize, pub faces: Vec, } @@ -106,6 +109,7 @@ fn face_of(v: &Value, suggested_as: Option<&str>) -> Option { similarity, suggestion_similarity, group: v["group"].as_u64().and_then(|g| usize::try_from(g).ok()), + split: v["split"] == true, }) } @@ -135,6 +139,7 @@ pub fn parse(v: &Value) -> Unnamed { .unwrap_or_default(); Unnamed { total: count(&v["total"]), + offset: count(&v["offset"]), faces: v["faces"].as_array().map(|a| a.iter().filter_map(|face| face_of(face, None)).collect()).unwrap_or_default(), ordered: v["ordered"] == true, ready: v["ready"] == true, @@ -147,6 +152,8 @@ pub fn parse(v: &Value) -> Unnamed { /// How often a listing is read again while the engine is still judging faces for suggestions: the judging goes on /// between answers, so a listing that waits for the next catalog change would show a part as though it were the whole. const SCANNING_SECS: f64 = 0.3; +/// The engine supports up to 3,000 faces per listing; previews remain viewport-virtualized. +pub(super) const PEOPLE_FACE_LIMIT: usize = 3000; /// The unnamed faces, asked for again only when the catalog changed, or (while the scan runs and learns more faces) at /// most every few seconds, since putting look-alikes together looks at every pair. While the engine is still judging @@ -161,14 +168,15 @@ pub fn faces(app: &mut LccApp, now: f64) -> Arc { return list.clone(); } } - let v = app.session.execute("faces.unnamed", &json!({"scope": "filter", "bySuggestion": true})).unwrap_or(Value::Null); + let v = app.session.execute("faces.unnamed", &json!({"scope": "filter", "bySuggestion": true, "limit": PEOPLE_FACE_LIMIT, "offset": app.ui.unnamed_page_offset, "clusterOffset": f64::from(app.ui.unnamed_cluster_offset.clamp(-20, 20)) / 100.0})).unwrap_or(Value::Null); let list = Arc::new(parse(&v)); + app.ui.unnamed_page_offset = list.offset; // what was selected and has since been named (or removed) is no longer selected; nor is a decision about a face // that has left the list (a confirmed one is named by now, and the name is what keeps it out). A suggested face // may be under Suggested without being on the listed page, so its decisions are kept by the groups too. let present: std::collections::HashSet<(u64, usize)> = list.faces.iter().map(|f| (f.photo, f.index)).collect(); let suggested: std::collections::HashSet<(u64, usize)> = list.groups.iter().flat_map(|g| g.faces.iter().map(|f| (f.photo, f.index))).collect(); - app.ui.unnamed_selected.retain(|k| present.contains(k)); + app.ui.unnamed_selected.retain(|k| present.contains(k) || suggested.contains(k)); app.ui.confirmed_suggestions.retain(|k| present.contains(k) || suggested.contains(k)); app.ui.rejected_suggestions.retain(|k| present.contains(k) || suggested.contains(k)); app.caches.unnamed = Some((rev, indexed, epoch, now, list.clone())); @@ -205,10 +213,26 @@ fn click(app: &mut LccApp, visible: &[UnnamedFace], i: usize, shift: bool) { app.ui.unnamed_focus = !app.ui.unnamed_selected.is_empty(); } +/// Resolve selection keys to the boxes the user saw, refusing a stale or incomplete listing. +pub(super) fn selection_snapshot(app: &LccApp, faces: &[(u64, usize)]) -> Result, String> { + let wanted: std::collections::HashSet<_> = faces.iter().copied().collect(); + let list = app.caches.unnamed.as_ref().map(|entry| &entry.4) + .ok_or_else(|| crate::i18n::tr("Reload the faces and try again").to_string())?; + let mut found: Vec<_> = list.faces.iter().chain(list.groups.iter().flat_map(|group| group.faces.iter())) + .filter(|face| wanted.contains(&(face.photo, face.index))) + .map(|face| (face.photo, face.index, face.rect)).collect(); + found.sort_by_key(|(photo, index, _)| (*photo, *index)); + found.dedup_by_key(|(photo, index, _)| (*photo, *index)); + if found.is_empty() || found.len() != wanted.len() { + return Err(crate::i18n::tr("The selection changed. Reload the faces and try again").to_string()); + } + Ok(found.iter().map(|(photo, index, rect)| json!({"photo": photo, "index": index, "rect": rect})).collect()) +} + /// Name `faces` (photo, region) `name`, as one undo step. -fn name(app: &mut LccApp, faces: &[(u64, usize)], name: &str) { - let list: Vec = faces.iter().map(|(photo, index)| json!({"photo": photo, "index": index})).collect(); - let _ = app.run("faces.nameFaces", json!({"faces": list, "name": name})); +fn name(app: &mut LccApp, faces: &[(u64, usize)], name: &str) -> Result { + let list = selection_snapshot(app, faces)?; + app.run("faces.nameFaces", json!({"faces": list, "name": name})) } /// The bar above the faces while some are selected: how many, a box to name them all, and the people already named. @@ -235,6 +259,7 @@ pub fn naming_bar(app: &mut LccApp, ui: &mut egui::Ui) { let mut submit: Option = None; let mut clear = false; let mut ignore = false; + let mut maintenance = false; ui.horizontal(|ui| { ui.add_space(super::people::PAD - 4.0); let n = selected.len(); @@ -259,10 +284,16 @@ pub fn naming_bar(app: &mut LccApp, ui: &mut egui::Ui) { let ig = ui.button(crate::i18n::tr("Ignore")).on_hover_text(crate::i18n::tr("Leave these faces out of People; they are not found again")); register(ui.ctx(), "unnamed:ignore", ig.rect); ignore = ig.clicked(); + let m = ui.button(crate::i18n::tr("Face Maintenance…")); + register(ui.ctx(), "unnamed:maintenance", m.rect); + maintenance = m.clicked(); let c = ui.button(crate::i18n::tr("Clear")); register(ui.ctx(), "unnamed:clear", c.rect); clear = c.clicked() || field.cancelled(); }); + if maintenance { + let _ = app.run("dialog.faceMaintenance", json!({"scope": "people", "mode": "recognize"})); + } // the people already named, matching what is typed (a click names the faces) let typed = app.ui.unnamed_name.trim().to_lowercase(); if !typed.is_empty() { @@ -282,16 +313,24 @@ pub fn naming_bar(app: &mut LccApp, ui: &mut egui::Ui) { } } if let Some(who) = submit { - name(app, &selected, &who); - app.ui.unnamed_selected.clear(); - app.ui.unnamed_name.clear(); - app.ui.unnamed_anchor = None; + match name(app, &selected, &who) { + Ok(_) => { + app.ui.unnamed_selected.clear(); + app.ui.unnamed_name.clear(); + app.ui.unnamed_anchor = None; + } + Err(error) => app.toast_error(ui.ctx(), error), + } } else if ignore { - let list: Vec = selected.iter().map(|(photo, index)| json!({"photo": photo, "index": index})).collect(); - let _ = app.run("faces.ignore", json!({"faces": list})); - app.ui.unnamed_selected.clear(); - app.ui.unnamed_name.clear(); - app.ui.unnamed_anchor = None; + let result = selection_snapshot(app, &selected).and_then(|faces| app.run("faces.ignore", json!({"faces": faces}))); + match result { + Ok(_) => { + app.ui.unnamed_selected.clear(); + app.ui.unnamed_name.clear(); + app.ui.unnamed_anchor = None; + } + Err(error) => app.toast_error(ui.ctx(), error), + } } else if clear { app.ui.unnamed_selected.clear(); app.ui.unnamed_name.clear(); @@ -314,6 +353,7 @@ pub fn tile(app: &mut LccApp, ui: &mut egui::Ui, visible: &[UnnamedFace], i: usi similarity: None, suggestion_similarity: None, group: None, + split: false, }; &keep } @@ -359,7 +399,9 @@ pub fn tile(app: &mut LccApp, ui: &mut egui::Ui, visible: &[UnnamedFace], i: usi if let (Some(a), Some(who)) = (&accept, &f.suggestion) && a.clone().on_hover_text(crate::i18n::tr_format!("Name this face {who}", who = who)).clicked() { - name(app, &[key], who); + if let Err(error) = name(app, &[key], who) { + app.toast_error(ui.ctx(), error); + } return resp; } // hovered: the whole photo, this face marked (#1147) @@ -392,11 +434,28 @@ pub fn tile(app: &mut LccApp, ui: &mut egui::Ui, visible: &[UnnamedFace], i: usi app.ui.unnamed_focus = true; ui.close(); } + let label = if f.split { "Restore automatic grouping" } else { "Remove from similarity groups" }; + let b = ui.button(crate::i18n::tr(label)); + register(ui.ctx(), "unnamedMenu:split", b.rect); + if b.clicked() { + let faces = json!([{"photo": f.photo, "index": f.index, "rect": f.rect}]); + match app.run("faces.splitUnknown", json!({"faces": faces, "split": !f.split})) { + Ok(_) => { + app.ui.unnamed_selected.remove(&key); + app.toast_with_action(ui.ctx(), crate::i18n::tr(if f.split { "Automatic grouping restored" } else { "Face removed from similarity groups" }), + crate::i18n::tr("Undo"), "faces.splitUnknown", json!({"faces": faces, "split": f.split})); + } + Err(error) => app.toast_error(ui.ctx(), error), + } + ui.close(); + } let b = ui.button(crate::i18n::tr("Ignore this face")); register(ui.ctx(), "unnamedMenu:ignore", b.rect); if b.clicked() { - let _ = app.run("faces.ignore", json!({"faces": [{"photo": f.photo, "index": f.index}]})); - app.ui.unnamed_selected.remove(&key); + match app.run("faces.ignore", json!({"faces": [{"photo": f.photo, "index": f.index, "rect": f.rect}]})) { + Ok(_) => { app.ui.unnamed_selected.remove(&key); } + Err(error) => app.toast_error(ui.ctx(), error), + } ui.close(); } }); diff --git a/crates/ui-egui/src/state.rs b/crates/ui-egui/src/state.rs index dd97362a1b..ee8101c68b 100644 --- a/crates/ui-egui/src/state.rs +++ b/crates/ui-egui/src/state.rs @@ -1635,6 +1635,12 @@ pub struct UiState { pub unnamed_anchor: Option, #[serde(skip)] pub unnamed_focus: bool, + /// Similarity adjustment relative to the active recognition model, in hundredths. + #[serde(default)] + pub unnamed_cluster_offset: i32, + /// First catalog-order face on the current Unknown page. + #[serde(skip)] + pub unnamed_page_offset: usize, /// The "More" faces selected on a person's page (photo, region), the name being typed to assign them to, the face /// last clicked (Shift-click selects a range from it) and whether the name box should take the keyboard. #[serde(skip)] @@ -2903,6 +2909,8 @@ impl Default for UiState { unnamed_name: String::new(), unnamed_anchor: None, unnamed_focus: false, + unnamed_cluster_offset: 0, + unnamed_page_offset: 0, person_selected: Default::default(), person_assign: String::new(), person_anchor: None, diff --git a/crates/ui-egui/src/tests_panels.rs b/crates/ui-egui/src/tests_panels.rs index c0a61f0787..c5de84db3f 100644 --- a/crates/ui-egui/src/tests_panels.rs +++ b/crates/ui-egui/src/tests_panels.rs @@ -3280,3 +3280,16 @@ fn folder_face_scan_menu_payload_prefills_the_maintenance_dialog() { assert_eq!(folders, "/pics/trip"); assert!(*include_subfolders); } + +#[test] +fn people_selection_opens_scoped_face_maintenance() { + let mut app = LccApp::new(lcc_engine::Session::with_demo(), Services::default()); + app.ui.unnamed_selected.insert((1, 0)); + let result = crate::menus::run_ui_command(&mut app, "dialog.faceMaintenance", &json!({"mode": "recognize", "scope": "people"})); + assert!(matches!(result, Some(Ok(_)))); + let Some(crate::state::Dialog::FaceMaintenance { mode, scope, .. }) = &app.ui.dialog else { + panic!("people selection did not open face maintenance"); + }; + assert_eq!(mode, "recognize"); + assert_eq!(scope, "people"); +} diff --git a/docs/faces.md b/docs/faces.md index cd5f8c9b38..1a8f4e714a 100644 --- a/docs/faces.md +++ b/docs/faces.md @@ -73,6 +73,14 @@ one or more collections. Folder scope includes subfolders by default and can be applies only to filesystem folders. Collection sets always include nested collections, and selecting multiple regular or smart collections unions their photos. Only photos already in the catalog are included, and folder membership follows each photo's current source path. +In People ▸ Unknown, select faces (or right-click a face and select its look-alikes), then choose **Face Maintenance…**. +In Suggested, click faces or right-click one to select its whole suggestion group. **Recognize Existing Faces** re-judges +those faces against the current named gallery and embeds only selected boxes that need it; **Rebuild All Embeddings** +rebuilds selected boxes. **Clear Selected Face Data** removes only their cached embeddings and suggestions, without +changing names or decisions; background indexing may recreate the cache. Detection actions run on the entire photos +containing the selection and may affect other faces. +Reset remains a separate, explicitly confirmed catalog-wide operation. Continuous background indexing can also process +other faces independently of the maintenance pass. The actions are: @@ -392,10 +400,18 @@ does a person's page. **People** has three categories, picked in the row at the top of the view (each shows its count): - **Unknown**: every face nobody has named and no name is suggested for, as cropped pictures. With recognition running, - faces that look alike are next to each other (put in order by looking at every pair, for up to the first 1,500 embedded - faces). To name a group: click faces to select them (Shift-click selects a range, **Select all** takes every one listed), + faces that look alike appear under numbered **Unknown group** headings, each with a face count and a **Select group** + button (put in order by looking at every pair, for up to the first 3,000 embedded faces). Faces without a displayed + match appear under **Other unknown faces**. To name a group: select it, then click any outliers to deselect them + (Shift-click selects a range, **Select all** takes every face listed), type a name in the bar that appears (people already named complete as you type), press Enter: all of them are named at once, as one undo step. Selecting names nothing. + Right-click a face and choose **Select look-alikes** to select its displayed group, then click any outliers to + deselect them before naming or ignoring. **Remove from similarity groups** keeps an outlier separate across sessions; + use **Restore automatic grouping** on that face or the Undo toast to reverse the decision. **Loose / Balanced / Strict** adjusts the grouping threshold relative to the + active recognition model by −0.10 / 0 / +0.10; it does not change recognition's suggestion threshold. Grouping is a + preview, not a permanent identity decision. The list pages through up to 3,000 unnamed faces at a time in catalog order; + groups compare only faces within the current page, so a group and its selection do not include similar faces on other pages. - **Suggested**: the faces recognition has matched to a person, each person's faces under their own name, so one person's suggestions are reviewed together. See [Suggested faces](#suggested-faces). - **Confirmed**: a card for each named person (their face, with the number of photos they are in on the picture). @@ -532,7 +548,7 @@ reuses the pictures of its step instead of rendering every face again. All of this is reachable from the control channel, the CLI and MCP: `faces.models.list`, `faces.models.inspect {path}`, `faces.models.install {path, acknowledged: true, activate?}`, `faces.models.download {id, acknowledged: true}` (then `faces.models.downloads`, which also installs what has arrived, and `faces.models.downloadCancel {id}`), `faces.models.remove {id}`, `faces.models.select {id}`, -`faces.enable {enabled?}`, `faces.detect {ids?, apply?}`, `faces.index {budgetMs?, ids?}`, `faces.maintain {mode?, scope?, ids?, folder?, folders?, album?, albums?, includeSubfolders?, minScore?, behavior?}`, `faces.scanStatus`, `faces.reset {confirmed: true}`, `faces.pump` (what the app calls every frame), `faces.suggest {ids?, threshold?, margin?}`, `faces.person {name, more?}` (a person's faces and the unnamed faces that look like them), `faces.unnamed {limit?, bySuggestion?, budgetMs?}` (every unnamed face, look-alikes together, with suggested names found across the whole library; `scan` says how far that comparison is), `faces.setName {id?, index, name}`, `faces.nameFaces {faces: [{photo, index}], name}` (name many at once, one undo step), `faces.renamePerson {from, to, merge?}` (rename every in-library face of one person, or merge two when `merge` is true, one undo step), `faces.confirmSuggestions {faces}` and `faces.rejectSuggestions {faces}` (the Suggested category's decisions: name the faces what is suggested for them now, one undo step; or keep them unknown and suggest that person no more), `faces.undoSuggestionDecision {faces}` (forget a decision, so the suggestion is back) and `faces.suggestionDecisions {photo?}` (what was decided, a page at a time), and `faces.evaluate`. `faces.unnamed {bySuggestion: true}` also answers `groups`: the suggested faces under the person suggested, the most faces first. Neither a confirmation nor a rejection writes to a photo's sidecar: a confirmation is a name on a face region (catalog only, undoable), a rejection is a line in `people.json`. `acknowledged` must be `true`: the caller has shown the user the terms and the user agreed. Installing makes the model the one in use and switches recognition on unless `activate` is `false`. +`faces.enable {enabled?}`, `faces.detect {ids?, apply?}`, `faces.index {budgetMs?, ids?}`, `faces.maintain {mode?, scope?, faces?, ids?, folder?, folders?, album?, albums?, includeSubfolders?, minScore?, behavior?}`, `faces.scanStatus`, `faces.reset {confirmed: true}`, `faces.pump` (what the app calls every frame), `faces.suggest {ids?, threshold?, margin?}`, `faces.person {name, more?}` (a person's faces and the unnamed faces that look like them), `faces.unnamed {limit?, offset?, bySuggestion?, budgetMs?, clusterOffset?}` (every unnamed face, look-alikes together, with suggested names found across the whole library; `scan` says how far that comparison is), `faces.splitUnknown {faces, split?}` (remove unnamed faces from automatic groups or restore them), `faces.setName {id?, index, name}`, `faces.nameFaces {faces: [{photo, index}], name}` (name many at once, one undo step), `faces.renamePerson {from, to, merge?}` (rename every in-library face of one person, or merge two when `merge` is true, one undo step), `faces.confirmSuggestions {faces}` and `faces.rejectSuggestions {faces}` (the Suggested category's decisions: name the faces what is suggested for them now, one undo step; or keep them unknown and suggest that person no more), `faces.undoSuggestionDecision {faces}` (forget a decision, so the suggestion is back) and `faces.suggestionDecisions {photo?}` (what was decided, a page at a time), and `faces.evaluate`. `faces.unnamed {bySuggestion: true}` also answers `groups`: the suggested faces under the person suggested, the most faces first. Neither a confirmation nor a rejection writes to a photo's sidecar: a confirmation is a name on a face region (catalog only, undoable), a rejection is a line in `people.json`. `acknowledged` must be `true`: the caller has shown the user the terms and the user agreed. Installing makes the model the one in use and switches recognition on unless `activate` is `false`. ## Find Blemishes From 468e2cf3f82e41b9b5c3680041f3f82f3444e950 Mon Sep 17 00:00:00 2001 From: 1234destiny1234 <180862339+1234destiny1234@users.noreply.github.com> Date: Mon, 30 Nov 2026 12:52:17 +0000 Subject: [PATCH 02/26] Format people clustering changes Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> --- crates/engine/src/cmd/face_recognize.rs | 58 ++++++++++++++++--------- crates/engine/src/people_store.rs | 5 ++- crates/ui-egui/src/panels/people.rs | 25 ++++++----- crates/ui-egui/src/panels/unnamed.rs | 24 +++++++--- 4 files changed, 72 insertions(+), 40 deletions(-) diff --git a/crates/engine/src/cmd/face_recognize.rs b/crates/engine/src/cmd/face_recognize.rs index a4ae1b6de7..2bf5613674 100644 --- a/crates/engine/src/cmd/face_recognize.rs +++ b/crates/engine/src/cmd/face_recognize.rs @@ -225,11 +225,14 @@ fn split_unknown(s: &mut Session, p: &Value) -> Result { store.cluster_exclusions.retain(|entry| !keys.contains(&(entry.photo, entry.index))); if split { store.cluster_exclusions.extend(faces.iter().map(|(photo, index, rect)| crate::people_store::ClusterExclusion { - photo: *photo, index: *index, rect: *rect, + photo: *photo, + index: *index, + rect: *rect, })); store.cluster_exclusions.sort_by_key(|entry| (entry.photo, entry.index)); } - }).map_err(crate::EngineError::Other)?; + }) + .map_err(crate::EngineError::Other)?; Ok(json!({"split": split, "faces": faces.len()})) } @@ -651,7 +654,9 @@ fn unnamed(s: &mut Session, p: &Value) -> Result { let cluster_offset = match p.get("clusterOffset") { None => 0.0, Some(v) => { - let n = v.as_f64().filter(|n| n.is_finite() && (-0.2..=0.2).contains(n)) + let n = v + .as_f64() + .filter(|n| n.is_finite() && (-0.2..=0.2).contains(n)) .ok_or_else(|| bad(C, "`clusterOffset` must be a number from -0.2 to 0.2"))?; n as f32 } @@ -671,8 +676,7 @@ fn unnamed(s: &mut Session, p: &Value) -> Result { let total = all.len(); let offset = match p.get("offset") { None => 0, - Some(value) => value.as_u64().and_then(|n| usize::try_from(n).ok()) - .ok_or_else(|| bad(C, "`offset` must be a non-negative integer"))?, + Some(value) => value.as_u64().and_then(|n| usize::try_from(n).ok()).ok_or_else(|| bad(C, "`offset` must be a non-negative integer"))?, }; // A catalog or filter change can shrink the list while a later page is open. let offset = offset.min(total.saturating_sub(1) / limit * limit); @@ -682,10 +686,10 @@ fn unnamed(s: &mut Session, p: &Value) -> Result { let progress = imp::scan_suggestions(s, budget, &all); // Bound quadratic grouping work to one page; the catalog-order offset makes every face reachable. all = all.into_iter().skip(offset).take(limit).collect(); - let exclusions: std::collections::HashMap<_, _> = s.people_store().cluster_exclusions.iter() - .map(|entry| ((entry.photo, entry.index), entry.rect)).collect(); - let split: std::collections::HashSet<_> = all.iter().filter(|(photo, index, rect)| exclusions.get(&(*photo, *index)) == Some(rect)) - .map(|(photo, index, _)| (*photo, *index)).collect(); + let exclusions: std::collections::HashMap<_, _> = + s.people_store().cluster_exclusions.iter().map(|entry| ((entry.photo, entry.index), entry.rect)).collect(); + let split: std::collections::HashSet<_> = + all.iter().filter(|(photo, index, rect)| exclusions.get(&(*photo, *index)) == Some(rect)).map(|(photo, index, _)| (*photo, *index)).collect(); let arranged = imp::arrange_unnamed(s, &mut all, limit, &people, cluster_offset, &split); all.truncate(limit); let faces: Vec = all @@ -719,8 +723,7 @@ fn unnamed(s: &mut Session, p: &Value) -> Result { map.insert("suggestion".into(), Value::Null); } } - let mut out = - json!({"total": total, "offset": offset, "faces": faces, "ordered": arranged.ordered, "ready": arranged.ready, "rejected": rejected, "scan": progress.json()}); + let mut out = json!({"total": total, "offset": offset, "faces": faces, "ordered": arranged.ordered, "ready": arranged.ready, "rejected": rejected, "scan": progress.json()}); if by_suggestion && let Value::Object(map) = &mut out { // every suggestion the library holds within the scope, not only those of the faces this page lists (#1365) map.insert("groups".into(), imp::suggestion_groups(s, &scope, &people)); @@ -1059,12 +1062,18 @@ mod imp { let current_job = d.epoch == s.faces.epoch && d.tag == s.faces.index.tag; let maintenance = s.faces.maintenance.as_mut().is_some_and(|run| run.in_flight.remove(&id)); let (done_embeddings, failed_embeddings) = ingest(s, d); - if maintenance && let Some(regions) = s.faces.maintenance.as_ref().and_then(|run| run.selected_regions.as_ref()) + if maintenance + && let Some(regions) = s.faces.maintenance.as_ref().and_then(|run| run.selected_regions.as_ref()) && let Some(photo) = s.catalog.photo(id) { - let keys: Vec<_> = photo.meta.regions.iter().enumerate() + let keys: Vec<_> = photo + .meta + .regions + .iter() + .enumerate() .filter(|(_, region)| regions.contains(&(id.0, crate::faces_index::region_key(®ion.rect)))) - .map(|(index, _)| (id.0, index)).collect(); + .map(|(index, _)| (id.0, index)) + .collect(); for key in keys { s.faces.suggestions.judged.remove(&key); s.faces.suggestions.suggestions.remove(&key); @@ -1385,9 +1394,8 @@ mod imp { if selected_faces.is_some() && mode == FaceScanMode::RebuildNamed { return Err(bad(C, "selected faces are unnamed; choose rebuild instead")); } - let selected_regions: Option> = selected_faces.as_ref().map(|faces| { - faces.iter().map(|(photo, _, rect)| (*photo, crate::faces_index::region_key(rect))).collect() - }); + let selected_regions: Option> = + selected_faces.as_ref().map(|faces| faces.iter().map(|(photo, _, rect)| (*photo, crate::faces_index::region_key(rect))).collect()); if mode.detects() { // A deliberate user run retries photos the continuous indexer could not read earlier in this session. for id in &scope_ids { @@ -1594,7 +1602,13 @@ mod imp { && let Some(regions) = &run.selected_regions && let Some(photo) = s.catalog.photo(item.photo) { - let rects: Vec<_> = photo.meta.regions.iter().filter(|region| regions.contains(&(item.photo.0, crate::faces_index::region_key(®ion.rect)))).map(|region| region.rect).collect(); + let rects: Vec<_> = photo + .meta + .regions + .iter() + .filter(|region| regions.contains(&(item.photo.0, crate::faces_index::region_key(®ion.rect)))) + .map(|region| region.rect) + .collect(); for rect in rects { s.faces.index.forget_region(item.photo.0, &rect); } @@ -3101,9 +3115,13 @@ mod imp { pub fn specs() -> Vec { vec![ cmd!( - "faces.splitUnknown", "Split Unknown Faces", [], None, + "faces.splitUnknown", + "Split Unknown Faces", + [], + None, "{faces: [{photo, index, rect?}], split?: true}: exclude unnamed faces from automatic grouping, or restore them with split: false; reversible and stored locally", - super::always, split_unknown + super::always, + split_unknown ), cmd!( "faces.ignore", diff --git a/crates/engine/src/people_store.rs b/crates/engine/src/people_store.rs index afda6c031a..3916982774 100644 --- a/crates/engine/src/people_store.rs +++ b/crates/engine/src/people_store.rs @@ -179,8 +179,9 @@ impl PeopleStore { let mut s: PeopleStore = serde_json::from_slice(bytes).map_err(|e| format!("{FILE} is damaged: {e}"))?; s.roles.truncate(MAX_ROLES); s.cluster_exclusions.truncate(MAX_DECISIONS); - s.cluster_exclusions.retain(|entry| entry.index < MAX_DECISION_INDEX - && [entry.rect.x0, entry.rect.y0, entry.rect.x1, entry.rect.y1].iter().all(|v| v.is_finite())); + s.cluster_exclusions.retain(|entry| { + entry.index < MAX_DECISION_INDEX && [entry.rect.x0, entry.rect.y0, entry.rect.x1, entry.rect.y1].iter().all(|v| v.is_finite()) + }); s.cluster_exclusions.sort_by_key(|entry| (entry.photo, entry.index)); s.cluster_exclusions.dedup_by_key(|entry| (entry.photo, entry.index)); let n = s.decisions.len(); diff --git a/crates/ui-egui/src/panels/people.rs b/crates/ui-egui/src/panels/people.rs index 7056be481d..5616d16d49 100644 --- a/crates/ui-egui/src/panels/people.rs +++ b/crates/ui-egui/src/panels/people.rs @@ -344,8 +344,7 @@ pub(super) fn clustered_face_grid(app: &mut LccApp, ui: &mut egui::Ui, visible: if top + SECTION_H + rows as f32 * step + PAD < viewport.top() || top > viewport.bottom() { continue; } - let selected = section.indices.iter().filter_map(|i| visible.get(*i)) - .all(|face| app.ui.unnamed_selected.contains(&(face.photo, face.index))); + let selected = section.indices.iter().filter_map(|i| visible.get(*i)).all(|face| app.ui.unnamed_selected.contains(&(face.photo, face.index))); let title = if section.grouped { crate::i18n::tr_format!("Unknown group {}", group_number).to_string() } else { @@ -544,7 +543,9 @@ fn unknown(app: &mut LccApp, ui: &mut egui::Ui) { Some(list.offset.saturating_sub(super::unnamed::PEOPLE_FACE_LIMIT)) } else if next.clicked() { Some(list.offset.saturating_add(super::unnamed::PEOPLE_FACE_LIMIT)) - } else { None }; + } else { + None + }; if let Some(offset) = target { app.ui.unnamed_page_offset = offset; app.ui.unnamed_selected.clear(); @@ -564,8 +565,7 @@ fn unknown(app: &mut LccApp, ui: &mut egui::Ui) { } else if faces.is_empty() { tr("No unknown faces. Faces found in your photos appear here until you name them.").to_string() } else if list.ordered { - tr("Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.") - .to_string() + tr("Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.").to_string() } else { tr("No name and no suggestion. Click faces to select them, Shift-click for a range, then type a name.").to_string() }; @@ -730,12 +730,15 @@ mod tests { faces[4].group = Some(7); faces[5].group = Some(7); faces[6].group = Some(7); - assert_eq!(unknown_sections(&faces), vec![ - UnknownSection { grouped: true, indices: vec![0, 1] }, - UnknownSection { grouped: false, indices: vec![2, 3] }, - UnknownSection { grouped: true, indices: vec![4, 5, 6] }, - UnknownSection { grouped: false, indices: vec![7] }, - ]); + assert_eq!( + unknown_sections(&faces), + vec![ + UnknownSection { grouped: true, indices: vec![0, 1] }, + UnknownSection { grouped: false, indices: vec![2, 3] }, + UnknownSection { grouped: true, indices: vec![4, 5, 6] }, + UnknownSection { grouped: false, indices: vec![7] }, + ] + ); assert!(unknown_sections(&[]).is_empty()); } diff --git a/crates/ui-egui/src/panels/unnamed.rs b/crates/ui-egui/src/panels/unnamed.rs index 23ee890f89..b0990aad18 100644 --- a/crates/ui-egui/src/panels/unnamed.rs +++ b/crates/ui-egui/src/panels/unnamed.rs @@ -216,11 +216,14 @@ fn click(app: &mut LccApp, visible: &[UnnamedFace], i: usize, shift: bool) { /// Resolve selection keys to the boxes the user saw, refusing a stale or incomplete listing. pub(super) fn selection_snapshot(app: &LccApp, faces: &[(u64, usize)]) -> Result, String> { let wanted: std::collections::HashSet<_> = faces.iter().copied().collect(); - let list = app.caches.unnamed.as_ref().map(|entry| &entry.4) - .ok_or_else(|| crate::i18n::tr("Reload the faces and try again").to_string())?; - let mut found: Vec<_> = list.faces.iter().chain(list.groups.iter().flat_map(|group| group.faces.iter())) + let list = app.caches.unnamed.as_ref().map(|entry| &entry.4).ok_or_else(|| crate::i18n::tr("Reload the faces and try again").to_string())?; + let mut found: Vec<_> = list + .faces + .iter() + .chain(list.groups.iter().flat_map(|group| group.faces.iter())) .filter(|face| wanted.contains(&(face.photo, face.index))) - .map(|face| (face.photo, face.index, face.rect)).collect(); + .map(|face| (face.photo, face.index, face.rect)) + .collect(); found.sort_by_key(|(photo, index, _)| (*photo, *index)); found.dedup_by_key(|(photo, index, _)| (*photo, *index)); if found.is_empty() || found.len() != wanted.len() { @@ -442,8 +445,13 @@ pub fn tile(app: &mut LccApp, ui: &mut egui::Ui, visible: &[UnnamedFace], i: usi match app.run("faces.splitUnknown", json!({"faces": faces, "split": !f.split})) { Ok(_) => { app.ui.unnamed_selected.remove(&key); - app.toast_with_action(ui.ctx(), crate::i18n::tr(if f.split { "Automatic grouping restored" } else { "Face removed from similarity groups" }), - crate::i18n::tr("Undo"), "faces.splitUnknown", json!({"faces": faces, "split": f.split})); + app.toast_with_action( + ui.ctx(), + crate::i18n::tr(if f.split { "Automatic grouping restored" } else { "Face removed from similarity groups" }), + crate::i18n::tr("Undo"), + "faces.splitUnknown", + json!({"faces": faces, "split": f.split}), + ); } Err(error) => app.toast_error(ui.ctx(), error), } @@ -453,7 +461,9 @@ pub fn tile(app: &mut LccApp, ui: &mut egui::Ui, visible: &[UnnamedFace], i: usi register(ui.ctx(), "unnamedMenu:ignore", b.rect); if b.clicked() { match app.run("faces.ignore", json!({"faces": [{"photo": f.photo, "index": f.index, "rect": f.rect}]})) { - Ok(_) => { app.ui.unnamed_selected.remove(&key); } + Ok(_) => { + app.ui.unnamed_selected.remove(&key); + } Err(error) => app.toast_error(ui.ctx(), error), } ui.close(); From a45b89a38b0d6674552cf0a766d9626aeaf54b60 Mon Sep 17 00:00:00 2001 From: 1234destiny1234 <180862339+1234destiny1234@users.noreply.github.com> Date: Mon, 30 Nov 2026 13:11:07 +0000 Subject: [PATCH 03/26] Group unknown faces across the catalog Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> --- crates/engine/src/cmd/face_recognize.rs | 148 +++++++++++-------- crates/engine/src/faces_cluster.rs | 172 ++++++++++++++++++++++ crates/engine/src/faces_index.rs | 3 + crates/engine/src/lib.rs | 2 + crates/engine/src/tests_face_recognize.rs | 55 ++++++- crates/ui-egui/src/lib.rs | 3 + crates/ui-egui/src/panels/people.rs | 38 +++-- crates/ui-egui/src/panels/suggested.rs | 13 +- crates/ui-egui/src/panels/unnamed.rs | 63 +++++++- docs/faces.md | 7 +- 10 files changed, 412 insertions(+), 92 deletions(-) create mode 100644 crates/engine/src/faces_cluster.rs diff --git a/crates/engine/src/cmd/face_recognize.rs b/crates/engine/src/cmd/face_recognize.rs index 2bf5613674..2f4e8d0065 100644 --- a/crates/engine/src/cmd/face_recognize.rs +++ b/crates/engine/src/cmd/face_recognize.rs @@ -116,8 +116,8 @@ fn name_faces(s: &mut Session, p: &Value) -> Result { const C: &str = "faces.nameFaces"; let name = name_param(p, C)?; let list = p.get("faces").and_then(Value::as_array).ok_or_else(|| bad(C, "missing `faces`"))?; - if list.len() > 5000 { - return Err(bad(C, "at most 5000 faces at a time")); + if list.len() > 100_000 { + return Err(bad(C, "at most 100000 faces at a time")); } // A UI selection includes boxes: validate the complete snapshot before writing any names, so a // changed or reordered region is never silently named as the face the user saw. @@ -175,11 +175,11 @@ fn set_name(s: &mut Session, p: &Value) -> Result { /// The faces a decision command was given, as `(photo, region index, the face's box)`, checked before anything changes: /// each must be an unnamed Face region of a photo in the library (a stale list changes nothing). Reads nothing but the -/// catalog, and refuses more than 5,000 at a time. +/// catalog, and refuses more than 100,000 at a time. fn unnamed_faces_param(s: &Session, cmd: &str, p: &Value) -> Result> { let list = p.get("faces").and_then(Value::as_array).ok_or_else(|| bad(cmd, "missing `faces`"))?; - if list.is_empty() || list.len() > 5000 { - return Err(bad(cmd, "select between 1 and 5000 faces")); + if list.is_empty() || list.len() > 100_000 { + return Err(bad(cmd, "select between 1 and 100000 faces")); } let mut out = Vec::with_capacity(list.len()); let mut seen = std::collections::HashSet::new(); @@ -544,6 +544,8 @@ impl Progress { struct Arranged { /// Faces that look alike are next to each other (only the ones already embedded can be). ordered: bool, + /// Catalog-wide grouping is running in the background. + clustering: bool, /// A recognition model is chosen and its face index is available. ready: bool, /// A name for some faces, when the faces already named say so with confidence: `(photo, index)` to `(name, score)`. @@ -684,14 +686,14 @@ fn unnamed(s: &mut Session, p: &Value) -> Result { // page a face falls on (issue #1365) let people = current_people(s); let progress = imp::scan_suggestions(s, budget, &all); - // Bound quadratic grouping work to one page; the catalog-order offset makes every face reachable. - all = all.into_iter().skip(offset).take(limit).collect(); let exclusions: std::collections::HashMap<_, _> = s.people_store().cluster_exclusions.iter().map(|entry| ((entry.photo, entry.index), entry.rect)).collect(); let split: std::collections::HashSet<_> = all.iter().filter(|(photo, index, rect)| exclusions.get(&(*photo, *index)) == Some(rect)).map(|(photo, index, _)| (*photo, *index)).collect(); - let arranged = imp::arrange_unnamed(s, &mut all, limit, &people, cluster_offset, &split); - all.truncate(limit); + let count = all.len(); + let arranged = imp::arrange_unnamed(s, &mut all, count, &people, cluster_offset, &split); + let catalog_faces = all; + let all: Vec<_> = catalog_faces.iter().skip(offset).take(limit).copied().collect(); let faces: Vec = all .iter() .map(|(photo, index, rect)| { @@ -723,7 +725,51 @@ fn unnamed(s: &mut Session, p: &Value) -> Result { map.insert("suggestion".into(), Value::Null); } } - let mut out = json!({"total": total, "offset": offset, "faces": faces, "ordered": arranged.ordered, "ready": arranged.ready, "rejected": rejected, "scan": progress.json()}); + // Keep selected snapshots across page changes, but never retain a face whose box changed. + let retained: std::collections::HashMap<(u64, usize), lcc_geom::Rect> = match p.get("retainFaces") { + None | Some(Value::Null) => Default::default(), + Some(value) => { + let items = value + .as_array() + .filter(|items| items.len() <= 100_000) + .ok_or_else(|| bad(C, "`retainFaces` must be an array of at most 100000 faces"))?; + let mut retained = std::collections::HashMap::new(); + for item in items { + let photo = item.get("photo").and_then(Value::as_u64).ok_or_else(|| bad(C, "invalid retained photo"))?; + let index = item + .get("index") + .and_then(Value::as_u64) + .and_then(|n| usize::try_from(n).ok()) + .ok_or_else(|| bad(C, "invalid retained index"))?; + let rect = serde_json::from_value(item.get("rect").cloned().unwrap_or(Value::Null)).map_err(|_| bad(C, "invalid retained rect"))?; + retained.insert((photo, index), rect); + } + retained + } + }; + // Include complete snapshots of represented groups and selected faces beyond the page. + let page_groups: std::collections::HashSet = + all.iter().filter_map(|(photo, index, _)| arranged.groups.get(&(*photo, *index)).copied()).collect(); + let cluster_members: Vec = catalog_faces + .iter() + .filter_map(|(photo, index, rect)| { + let key = (*photo, *index); + let group = arranged.groups.get(&key).copied(); + let selected = retained.get(&key) == Some(rect); + if !selected && !group.is_some_and(|group| page_groups.contains(&group)) { + return None; + } + if !selected + && let Some((name, _)) = arranged.suggestions.get(&key) + && !s.people_store().rejected_as(*photo, *index, *rect, name) + { + return None; + } + let view = s.face_view(lcc_catalog::PhotoId(*photo), *rect); + Some(json!({"photo": photo, "index": index, "rect": rect_json(rect), "view": rect_json(&view), "group": group})) + }) + .collect(); + let mut out = json!({"total": total, "offset": offset, "faces": faces, "ordered": arranged.ordered, "clustering": arranged.clustering, "clusterMembers": cluster_members, "ready": arranged.ready, "rejected": rejected, "scan": progress.json()}); if by_suggestion && let Value::Object(map) = &mut out { // every suggestion the library holds within the scope, not only those of the faces this page lists (#1365) map.insert("groups".into(), imp::suggestion_groups(s, &scope, &people)); @@ -2229,38 +2275,6 @@ mod imp { /// next page (after a face is named) checks the next ones. const RIVAL_CHECKS: usize = 4; - /// Most faces put in order of likeness (the order is a pass over every pair of them). - const MAX_ARRANGED: usize = 3000; - - /// Faces in an order that puts look-alikes together: start anywhere, then always go to the closest face not yet placed. - fn nearest_chain(embeddings: &[&[f32]]) -> Vec { - let n = embeddings.len(); - let (mut placed, mut order) = (vec![false; n], Vec::with_capacity(n)); - let mut current = 0; - if n == 0 { - return order; - } - placed[0] = true; - order.push(0); - for _ in 1..n { - let mut best: Option<(usize, f32)> = None; - for (j, e) in embeddings.iter().enumerate() { - if placed[j] { - continue; - } - let c = matching::cosine(embeddings[current], e).unwrap_or(-1.0); - if best.is_none_or(|(_, b)| c > b) { - best = Some((j, c)); - } - } - let Some((j, _)) = best else { break }; - placed[j] = true; - order.push(j); - current = j; - } - order - } - /// How many faces one chunk of the judging covers: they are scored in parallel, and the clock is looked at between /// chunks, so a call overshoots its budget by about one chunk rather than by the library. const JUDGE_CHUNK: usize = 16; @@ -2435,10 +2449,9 @@ mod imp { } /// Put the unnamed faces `all` in order of likeness (the ones already embedded; the rest follow in photo order) and - /// give the page's faces what the named faces recognise them as, as the library-wide scan found it. + /// give the faces what the named faces recognise them as, as the library-wide scan found it. /// - /// The scan ([`scan_suggestions`]) has already judged the library, so which faces carry a suggestion no longer - /// depends on their place in this order or on `limit` (issue #1365): that is only how many are listed. + /// Grouping runs in a worker across this scope before pagination; suggestions are supplied by the library-wide scan. pub fn arrange_unnamed( s: &mut Session, all: &mut Vec<(u64, usize, Rect)>, @@ -2449,6 +2462,7 @@ mod imp { ) -> super::Arranged { let none = super::Arranged { ordered: false, + clustering: false, ready: false, suggestions: Default::default(), similarities: Default::default(), @@ -2456,26 +2470,32 @@ mod imp { }; let Some(_) = s.face_models_dir.clone() else { return none }; let Ok(manifest) = current_manifest(s, "faces.unnamed", false) else { return none }; - let (mut embedded, mut plain) = (Vec::new(), Vec::new()); - for f in all.drain(..) { - if split.contains(&(f.0, f.1)) { - plain.push(f); + use std::hash::{Hash, Hasher}; + let threshold = (manifest.thresholds.match_cosine.unwrap_or(DEFAULT_THRESHOLD) + cluster_offset).clamp(0.0, 1.0); + let mut stamp = std::collections::hash_map::DefaultHasher::new(); + s.faces.epoch.hash(&mut stamp); + s.faces.index.tag.hash(&mut stamp); + threshold.to_bits().hash(&mut stamp); + let mut embedded = Vec::new(); + for (photo, index, rect) in all.iter() { + if split.contains(&(*photo, *index)) { continue; } - match s.faces.index.get(f.0, &f.2) { - Some(e) => embedded.push((f, e.clone())), - None => plain.push(f), + if let Some(e) = s.faces.index.get(*photo, rect) { + photo.hash(&mut stamp); + index.hash(&mut stamp); + (Arc::as_ptr(e) as *const f32 as usize).hash(&mut stamp); + embedded.push(((*photo, *index), Arc::clone(e))); } } - let beyond = embedded.split_off(embedded.len().min(MAX_ARRANGED)); - let order = nearest_chain(&embedded.iter().map(|(_, e)| &e[..]).collect::>()); - let ordered: Vec<((u64, usize, Rect), Arc<[f32]>)> = order.into_iter().filter_map(|i| embedded.get(i).cloned()).collect(); - let threshold = (manifest.thresholds.match_cosine.unwrap_or(DEFAULT_THRESHOLD) + cluster_offset).clamp(0.0, 1.0); - let groups = look_alike_groups(ordered.iter().map(|((photo, index, _), e)| ((*photo, *index), &e[..])), threshold); - let grouped = !ordered.is_empty(); - all.extend(ordered.into_iter().map(|(f, _)| f)); - all.extend(beyond.into_iter().map(|(f, _)| f)); - all.extend(plain); + let answer = s.faces.clusters.get(stamp.finish(), embedded, threshold); + let clustering = answer.is_none(); + let mut groups = std::collections::HashMap::new(); + if let Some(answer) = answer { + all.sort_by_key(|(photo, index, _)| answer.order.get(&(*photo, *index)).copied().unwrap_or(usize::MAX)); + groups.clone_from(&answer.groups); + } + let grouped = answer.is_some_and(|answer| !answer.order.is_empty()); // a suggestion naming someone since renamed or removed is not shown: the judging has still to reach this face let known = |v: &(String, f32)| people.contains(&v.0.trim().to_lowercase()); let (mut suggestions, mut similarities) = (std::collections::HashMap::new(), std::collections::HashMap::new()); @@ -2487,12 +2507,13 @@ mod imp { suggestions.insert((*photo, *index), v.clone()); } } - super::Arranged { ordered: grouped, ready: true, suggestions, similarities, groups } + super::Arranged { ordered: grouped, clustering, ready: true, suggestions, similarities, groups } } /// Group consecutive neighbours that also resemble the first face in the group. The anchor check prevents /// a long chain of small changes from silently joining faces that are very different from one another. /// A pair that cannot be compared starts a new group. + #[cfg(test)] pub(super) fn look_alike_groups<'a>( chain: impl Iterator, threshold: f32, @@ -3104,6 +3125,7 @@ mod imp { ) -> super::Arranged { super::Arranged { ordered: false, + clustering: false, ready: false, suggestions: Default::default(), similarities: Default::default(), @@ -3247,7 +3269,7 @@ pub fn specs() -> Vec { "Unnamed Faces", [], None, - "{limit?: 600, offset?: 0, scope?: \"filter\", bySuggestion?: false, budgetMs?: 15, clusterOffset?: -0.2..0.2} → {total, faces: [{photo, index, rect, view, suggestion: {name, score} | null, similarity: {name, score} | null}], ordered, ready, rejected, scan: {total, judged, complete}, groups?}: the faces nobody has named (with `scope: \"filter\"`, only in the photos the library shows: the sidebar's source and the filter, any person filter aside); with a recognition model chosen, look-alikes are next to each other and a face the named ones recognise carries the name they suggest. `similarity` is the best confirmed-person match, including below-threshold matches. Every unnamed face with an embedding is judged against the named ones, `budgetMs` of that per call at most, so a suggestion does not depend on the page a face falls on: `scan` says how many of the library's faces were judged, and whether all of them were (`budgetMs: 0` only reports). With `bySuggestion: true`, `groups` lists every suggested face in the scope under the person suggested ([{name, total, faces: [{photo, index, rect, view, score}]}], the most faces first), not only the listed page's. `view` is the box to show the face by. Name them with `faces.nameFaces`, ignore them with `faces.ignore`", + "{limit?: 600, offset?: 0, scope?: \"filter\", bySuggestion?: false, budgetMs?: 15, clusterOffset?: -0.2..0.2, retainFaces?: [{photo, index, rect}]} → {total, faces: [{photo, index, rect, view, suggestion: {name, score} | null, similarity: {name, score} | null}], ordered, ready, rejected, scan: {total, judged, complete}, groups?}: the faces nobody has named (with `scope: \"filter\"`, only in the photos the library shows: the sidebar's source and the filter, any person filter aside); with a recognition model chosen, look-alikes are next to each other and a face the named ones recognise carries the name they suggest. `similarity` is the best confirmed-person match, including below-threshold matches. Every unnamed face with an embedding is judged against the named ones, `budgetMs` of that per call at most, so a suggestion does not depend on the page a face falls on: `scan` says how many of the library's faces were judged, and whether all of them were (`budgetMs: 0` only reports). With `bySuggestion: true`, `groups` lists every suggested face in the scope under the person suggested ([{name, total, faces: [{photo, index, rect, view, score}]}], the most faces first), not only the listed page's. `view` is the box to show the face by. Name them with `faces.nameFaces`, ignore them with `faces.ignore`", super::always, unnamed ), diff --git a/crates/engine/src/faces_cluster.rs b/crates/engine/src/faces_cluster.rs new file mode 100644 index 0000000000..57f4767cd3 --- /dev/null +++ b/crates/engine/src/faces_cluster.rs @@ -0,0 +1,172 @@ +//! Background grouping of the current scope's unnamed face embeddings. +//! +//! Groups use a representative face as an anchor, rather than joining chains transitively: every +//! member must resemble its group's anchor. No identity is assigned without the user's review. + +use std::collections::HashMap; +use std::sync::{ + Arc, + atomic::{AtomicBool, Ordering}, + mpsc, +}; + +pub(crate) type Key = (u64, usize); +pub(crate) type Input = Vec<(Key, Arc<[f32]>)>; + +#[derive(Default)] +pub(crate) struct Clusters { + stamp: Option, + job: Option, + result: Option<(u64, Answer)>, +} + +struct Job { + cancel: Arc, + rx: mpsc::Receiver, +} + +pub(crate) struct Answer { + pub order: HashMap, + pub groups: HashMap, + // Keep embeddings alive so their pointer identities cannot be reused while this answer is cached. + _keep_alive: Input, +} + +impl Drop for Job { + fn drop(&mut self) { + self.cancel.store(true, Ordering::Relaxed); + } +} + +impl Clusters { + /// Start a new computation if the input changed. A stale result is never exposed. + pub fn get(&mut self, stamp: u64, input: Input, threshold: f32) -> Option<&Answer> { + if self.stamp != Some(stamp) { + self.job = None; + self.result = None; + self.stamp = Some(stamp); + let cancel = Arc::new(AtomicBool::new(false)); + let worker_cancel = Arc::clone(&cancel); + let (tx, rx) = mpsc::channel(); + if std::thread::Builder::new() + .name("face-clusters".into()) + .spawn(move || { + if let Some(mut answer) = group(&input, threshold, &worker_cancel) { + answer._keep_alive = input; + let _ = tx.send(answer); + } + }) + .is_ok() + { + self.job = Some(Job { cancel, rx }); + } else { + self.stamp = None; + } + } + if let Some(job) = &self.job { + match job.rx.try_recv() { + Ok(answer) => { + self.result = Some((stamp, answer)); + self.job = None; + } + Err(mpsc::TryRecvError::Disconnected) => { + self.job = None; + self.stamp = None; + } + Err(mpsc::TryRecvError::Empty) => {} + } + } + self.result.as_ref().filter(|(s, _)| *s == stamp).map(|(_, answer)| answer) + } +} + +fn group(input: &Input, threshold: f32, cancel: &AtomicBool) -> Option { + let mut anchors: Vec = Vec::new(); + let mut members: Vec> = Vec::new(); + for (i, (key, embedding)) in input.iter().enumerate() { + if cancel.load(Ordering::Relaxed) { + return None; + } + let mut best: Option<(usize, f32)> = None; + for (group, anchor) in anchors.iter().enumerate() { + if group % 256 == 0 && cancel.load(Ordering::Relaxed) { + return None; + } + let Some((_, candidate)) = input.get(*anchor) else { continue }; + let Some(score) = lcc_faces::matching::cosine(embedding, candidate) else { continue }; + if score >= threshold && best.is_none_or(|(_, previous)| score > previous) { + best = Some((group, score)); + } + } + if let Some((group, _)) = best { + if let Some(list) = members.get_mut(group) { + list.push(*key); + } + } else { + anchors.push(i); + members.push(vec![*key]); + } + } + // Larger groups come first; stable ordering breaks ties by the first face in catalog order. + members.sort_by(|a, b| b.len().cmp(&a.len()).then_with(|| a.first().cmp(&b.first()))); + let mut order = HashMap::new(); + let mut groups = HashMap::new(); + let mut rank = 0; + for (group, list) in members.iter().enumerate() { + for key in list { + order.insert(*key, rank); + if list.len() > 1 { + groups.insert(*key, group); + } + rank += 1; + } + } + Some(Answer { order, groups, _keep_alive: Vec::new() }) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn compares_faces_across_the_entire_input_and_checks_the_anchor() { + let vector = |x: &[f32]| Arc::<[f32]>::from(x); + let input = vec![((1, 0), vector(&[1.0, 0.0])), ((2, 0), vector(&[0.0, 1.0])), ((4000, 0), vector(&[1.0, 0.0]))]; + let answer = group(&input, 0.9, &AtomicBool::new(false)).unwrap(); + assert_eq!(answer.groups.get(&(1, 0)), answer.groups.get(&(4000, 0))); + assert!(answer.groups.contains_key(&(1, 0))); + assert!(!answer.groups.contains_key(&(2, 0))); + } + + #[test] + fn changing_the_input_discards_the_previous_answer() { + let input = vec![((1, 0), Arc::from([1.0f32])), ((4000, 0), Arc::from([1.0f32]))]; + let mut clusters = Clusters::default(); + let deadline = std::time::Instant::now() + std::time::Duration::from_secs(5); + loop { + if let Some(result) = clusters.get(1, input.clone(), 0.9) { + assert_eq!(result.groups.len(), 2); + assert_eq!(result.order.len(), 2); + break; + } + assert!(std::time::Instant::now() < deadline); + std::thread::yield_now(); + } + let changed = vec![((1, 0), Arc::from([1.0f32]))]; + let deadline = std::time::Instant::now() + std::time::Duration::from_secs(5); + loop { + if let Some(result) = clusters.get(2, changed.clone(), 0.9) { + assert!(result.groups.is_empty()); + assert_eq!(result.order.len(), 1); + break; + } + assert!(std::time::Instant::now() < deadline); + std::thread::yield_now(); + } + } + + #[test] + fn cancelled_work_does_not_publish_a_result() { + assert!(group(&vec![((1, 0), Arc::from([1.0f32]))], 0.9, &AtomicBool::new(true)).is_none()); + } +} diff --git a/crates/engine/src/faces_index.rs b/crates/engine/src/faces_index.rs index fa5045482d..c0b583673c 100644 --- a/crates/engine/src/faces_index.rs +++ b/crates/engine/src/faces_index.rs @@ -773,6 +773,8 @@ pub(crate) struct FacesState { /// What the named faces suggest for the library's unnamed faces, judged across the whole library rather than the /// page `faces.unnamed` lists (issue #1365). pub suggestions: crate::face_suggestions::Scan, + /// Cached catalog-wide unknown-face grouping. + pub clusters: crate::faces_cluster::Clusters, } impl FacesState { @@ -799,6 +801,7 @@ impl FacesState { self.task = None; self.peak = 0; self.suggestions = Default::default(); + self.clusters = Default::default(); self.epoch = self.epoch.wrapping_add(1); } diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rs index e2224a2233..5fcb9d397c 100644 --- a/crates/engine/src/lib.rs +++ b/crates/engine/src/lib.rs @@ -70,6 +70,8 @@ pub mod face_download; mod face_suggestions; pub mod face_tiles; #[cfg(not(target_arch = "wasm32"))] +mod faces_cluster; +#[cfg(not(target_arch = "wasm32"))] mod faces_index; #[cfg(not(target_arch = "wasm32"))] mod faces_worker; diff --git a/crates/engine/src/tests_face_recognize.rs b/crates/engine/src/tests_face_recognize.rs index 66d3d47d0e..c8e106bc52 100644 --- a/crates/engine/src/tests_face_recognize.rs +++ b/crates/engine/src/tests_face_recognize.rs @@ -217,7 +217,7 @@ fn naming_one_face_or_many_is_one_undo_step_and_makes_them_yours() { json!({"faces": [{"photo": 987_654, "index": 0}], "name": "x"}), json!({"faces": [{"photo": a.0, "index": 0}], "name": 7}), json!({"faces": [{"photo": a.0, "index": 0}], "name": "bad\u{7}name"}), - json!({"faces": vec![json!({"photo": a.0, "index": 0}); 5001], "name": "x"}), + json!({"faces": vec![json!({"photo": a.0, "index": 0}); 100_001], "name": "x"}), ] { assert!(s.execute("faces.nameFaces", &bad).is_err(), "{bad}"); } @@ -489,6 +489,19 @@ fn unit64(parts: &[(usize, f32)]) -> Vec { v.iter().map(|x| x / n).collect() } +/// Wait for the background grouping worker; queries may initially return an ungrouped page. +fn clustered(s: &mut Session, params: Value) -> Value { + let deadline = std::time::Instant::now() + std::time::Duration::from_secs(30); + loop { + let result = s.execute("faces.unnamed", ¶ms).unwrap(); + if result["clustering"] != true { + return result; + } + assert!(std::time::Instant::now() < deadline, "grouping did not finish"); + std::thread::sleep(std::time::Duration::from_millis(2)); + } +} + #[test] fn unnamed_faces_come_with_look_alikes_together_and_the_name_the_named_ones_suggest() { let d = temp("unnamed"); @@ -507,7 +520,7 @@ fn unnamed_faces_come_with_look_alikes_together_and_the_name_the_named_ones_sugg put(&mut s, b, 0.5, unit64(&[(1, 0.98), (2, 0.2)])); // like Bob put(&mut s, c, 0.3, unit64(&[(0, 0.95), (3, 0.3)])); // like Ann // (a's last face, at 0.7, is not embedded yet) - let r = s.execute("faces.unnamed", &json!({})).unwrap(); + let r = clustered(&mut s, json!({})); assert_eq!((r["total"].clone(), r["ordered"].clone(), r["ready"].clone()), (json!(5), json!(true), json!(true)), "{r}"); let faces = r["faces"].as_array().unwrap(); let at = |f: &Value| (f["photo"].as_u64().unwrap(), f["index"].as_u64().unwrap()); @@ -951,7 +964,7 @@ fn face_review_queue_and_actions_remain_accessible_when_background_scan_is_off() // 5. Unnamed faces list and loupe hints (`faces.suggest {budgetMs: 0}`) still provide suggestions without loading ONNX s.execute("edit.undo", &json!({})).unwrap(); // restore ignored face - let unnamed_res = s.execute("faces.unnamed", &json!({})).unwrap(); + let unnamed_res = clustered(&mut s, json!({})); assert_eq!(unnamed_res["ready"], true); assert_eq!(unnamed_res["ordered"], true); let suggestion = unnamed_res["faces"].as_array().unwrap().iter().find(|f| f["photo"] == b.0 && f["index"] == 0).unwrap(); @@ -1395,13 +1408,41 @@ fn grouping_includes_embedded_faces_beyond_the_old_limit() { for face in ®ions { s.faces.index.insert(id.0, &face.rect, vector.clone()); } - let result = s.execute("faces.unnamed", &json!({"limit": 3000})).unwrap(); + let result = clustered(&mut s, json!({"limit": 3000})); let faces = result["faces"].as_array().unwrap(); assert_eq!(faces.len(), 1501); let group = faces[0]["group"].as_u64().unwrap(); assert!(faces.iter().all(|face| face["group"] == group), "all embedded faces belong to the same group"); } +#[test] +fn grouping_and_group_selection_include_members_beyond_the_page() { + let d = temp("cluster-cross-page"); + let (mut s, _) = setup(&d, 64); + s.execute("faces.index", &json!({"budgetMs": 0})).unwrap(); + let (id, _) = two_photos(&s); + let regions: Vec<_> = (0..650).map(|i| region(i as f64 / 10_000.0, None)).collect(); + set_regions(&mut s, id, regions.clone()); + for face in ®ions { + s.faces.index.insert(id.0, &face.rect, unit64(&[(0, 1.0)])); + } + let first = clustered(&mut s, json!({"limit": 600})); + let second = clustered(&mut s, json!({"limit": 600, "offset": 600})); + assert_eq!(first["faces"].as_array().unwrap().len(), 600); + assert_eq!(second["faces"].as_array().unwrap().len(), 50); + assert_eq!(first["faces"][0]["group"], second["faces"][0]["group"]); + let members = first["clusterMembers"].as_array().unwrap(); + assert_eq!(members.len(), 650); + assert!(members.iter().any(|face| face["index"] == 649)); + let retained = json!([members[0].clone()]); + let next = clustered(&mut s, json!({"limit": 600, "offset": 600, "retainFaces": retained})); + assert!(next["clusterMembers"].as_array().unwrap().iter().any(|face| face["index"] == 0)); + s.execute("faces.nameFaces", &json!({"faces": members, "name": "Alex"})).unwrap(); + assert!(s.catalog.photo(id).unwrap().meta.regions.iter().all(|face| face.name.as_deref() == Some("Alex"))); + s.execute("edit.undo", &json!({})).unwrap(); + assert!(s.catalog.photo(id).unwrap().meta.regions.iter().all(|face| face.name.is_none())); +} + #[test] fn naming_a_stale_face_snapshot_does_not_change_any_face() { let mut s = Session::with_demo(); @@ -1484,15 +1525,15 @@ fn split_outlier_is_removed_from_group_and_can_be_restored() { s.faces.index.insert(id.0, ®ion.rect, unit64(&[(0, 1.0)])); } let selected = json!([{ "photo": id.0, "index": 1, "rect": b.rect }]); - let initial = s.execute("faces.unnamed", &json!({})).unwrap(); + let initial = clustered(&mut s, json!({})); assert_eq!(initial["faces"][0]["group"], initial["faces"][1]["group"]); assert!(initial["faces"][0]["group"].is_number()); s.execute("faces.splitUnknown", &json!({"faces": selected})).unwrap(); - let split = s.execute("faces.unnamed", &json!({})).unwrap(); + let split = clustered(&mut s, json!({})); let outlier = split["faces"].as_array().unwrap().iter().find(|f| f["index"] == 1).unwrap(); assert_eq!(outlier["split"], true); assert!(outlier["group"].is_null()); s.execute("faces.splitUnknown", &json!({"faces": selected, "split": false})).unwrap(); - let again = s.execute("faces.unnamed", &json!({})).unwrap(); + let again = clustered(&mut s, json!({})); assert_eq!(again["faces"][0]["group"], again["faces"][1]["group"]); } diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index da25391f03..a3e7f7c000 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -1583,6 +1583,9 @@ impl LccApp { pub fn run_typed(&mut self, id: &str, params: Value) -> Result { let id = &*lcc_engine::canonical_id(id); self.note_ran(id); + if matches!(id, "faces.splitUnknown" | "faces.rejectSuggestions" | "faces.undoSuggestionDecision") { + panels::unnamed::invalidate(self); + } shortcuts::set_active(self.ui.settings.keymap_set); // a brush stroke being painted belongs to the mask and photo it started on: picking another // ends it first, so its release can't land on the one picked diff --git a/crates/ui-egui/src/panels/people.rs b/crates/ui-egui/src/panels/people.rs index 5616d16d49..0356ba23c8 100644 --- a/crates/ui-egui/src/panels/people.rs +++ b/crates/ui-egui/src/panels/people.rs @@ -307,7 +307,7 @@ struct UnknownSection { fn unknown_sections(faces: &[UnnamedFace]) -> Vec { let mut sections: Vec = Vec::new(); for range in unknown_clusters(faces) { - if range.len() > 1 { + if faces.get(range.start).is_some_and(|face| face.group.is_some()) { sections.push(UnknownSection { grouped: true, indices: range.collect() }); } else if let Some(last) = sections.last_mut().filter(|section| !section.grouped) { last.indices.extend(range); @@ -344,7 +344,12 @@ pub(super) fn clustered_face_grid(app: &mut LccApp, ui: &mut egui::Ui, visible: if top + SECTION_H + rows as f32 * step + PAD < viewport.top() || top > viewport.bottom() { continue; } - let selected = section.indices.iter().filter_map(|i| visible.get(*i)).all(|face| app.ui.unnamed_selected.contains(&(face.photo, face.index))); + let keys = if section.grouped { + section.indices.first().and_then(|i| visible.get(*i)).map(|face| super::unnamed::group_keys(app, visible, face)).unwrap_or_default() + } else { + section.indices.iter().filter_map(|i| visible.get(*i)).map(|face| (face.photo, face.index)).collect() + }; + let selected = !keys.is_empty() && keys.iter().all(|key| app.ui.unnamed_selected.contains(key)); let title = if section.grouped { crate::i18n::tr_format!("Unknown group {}", group_number).to_string() } else { @@ -358,9 +363,8 @@ pub(super) fn clustered_face_grid(app: &mut LccApp, ui: &mut egui::Ui, visible: }; let rect = Rect::from_min_size(pos2(area.left(), area.top() + top), vec2(width, SECTION_H)); let action = Some((label, format!("unnamed:selectGroup:{number}"))); - if heading(ui, rect, &Heading { title: &title, count: section.indices.len(), note, action }).is_some() { - for face in section.indices.iter().filter_map(|i| visible.get(*i)) { - let key = (face.photo, face.index); + if heading(ui, rect, &Heading { title: &title, count: keys.len(), note, action }).is_some() { + for key in keys { if selected { app.ui.unnamed_selected.remove(&key); } else { @@ -521,7 +525,7 @@ fn unknown(app: &mut LccApp, ui: &mut egui::Ui) { let response = ui.selectable_value(&mut app.ui.unnamed_cluster_offset, value, crate::i18n::tr(label)); register(ui.ctx(), format!("unnamed:grouping:{value}"), response.rect); if response.changed() { - app.caches.unnamed = None; + super::unnamed::invalidate(app); app.ui.unnamed_anchor = None; } } @@ -548,17 +552,18 @@ fn unknown(app: &mut LccApp, ui: &mut egui::Ui) { }; if let Some(offset) = target { app.ui.unnamed_page_offset = offset; - app.ui.unnamed_selected.clear(); app.ui.unnamed_anchor = None; - app.caches.unnamed = None; + super::unnamed::invalidate(app); ui.ctx().request_repaint(); } }); - ui.label(crate::i18n::tr("Groups are compared within each page; similar faces on other pages are not included.")); + ui.label(crate::i18n::tr("Groups use faces across the current library filter; selecting a group includes its faces on other pages.")); } // what this category is (and why it is empty), in the UI's language let tr = crate::i18n::tr; - let note = if !list.ready && list.faces.is_empty() { + let note = if list.clustering { + tr("Grouping faces across the library in the background…").to_string() + } else if !list.ready && list.faces.is_empty() { tr("Turn on face recognition in Settings ▸ Faces to find the faces in your photos.").to_string() } else if faces.is_empty() && list.total > 0 { tr("No face here is unknown: the rest are named or suggested as someone (see Suggested).").to_string() @@ -707,7 +712,18 @@ mod tests { } fn listing(faces: Vec) -> Unnamed { - Unnamed { total: faces.len(), offset: 0, faces, ordered: true, ready: true, groups: Vec::new(), rejected: 0, scan: None } + Unnamed { + total: faces.len(), + offset: 0, + clustering: false, + cluster_members: Vec::new(), + faces, + ordered: true, + ready: true, + groups: Vec::new(), + rejected: 0, + scan: None, + } } #[test] diff --git a/crates/ui-egui/src/panels/suggested.rs b/crates/ui-egui/src/panels/suggested.rs index 19460d8ae9..269a19e84c 100644 --- a/crates/ui-egui/src/panels/suggested.rs +++ b/crates/ui-egui/src/panels/suggested.rs @@ -481,7 +481,18 @@ mod tests { } fn listing(faces: Vec) -> Unnamed { - Unnamed { total: faces.len(), offset: 0, faces, ordered: true, ready: true, groups: Vec::new(), rejected: 0, scan: None } + Unnamed { + total: faces.len(), + offset: 0, + clustering: false, + cluster_members: Vec::new(), + faces, + ordered: true, + ready: true, + groups: Vec::new(), + rejected: 0, + scan: None, + } } /// Issue #1050: the groups hold the suggested faces under the person suggested, the most faces first and one diff --git a/crates/ui-egui/src/panels/unnamed.rs b/crates/ui-egui/src/panels/unnamed.rs index b0990aad18..5f4009b7a7 100644 --- a/crates/ui-egui/src/panels/unnamed.rs +++ b/crates/ui-egui/src/panels/unnamed.rs @@ -44,7 +44,6 @@ pub struct SuggestionGroup { /// How many faces the library has for this person within the filter (`faces.len()`, a face never in two), which /// can be more than the listed page holds (issue #1365). pub total: usize, - pub offset: usize, pub faces: Vec, } @@ -65,6 +64,11 @@ pub struct Scan { pub struct Unnamed { /// Unnamed faces in the library (more than are listed when the list was cut). pub total: usize, + pub offset: usize, + /// Whether the catalog-wide grouping worker is still running. + pub clustering: bool, + /// Complete members of the groups represented on this page. + pub cluster_members: Vec, pub faces: Vec, /// Look-alikes are next to each other. pub ordered: bool, @@ -140,6 +144,8 @@ pub fn parse(v: &Value) -> Unnamed { Unnamed { total: count(&v["total"]), offset: count(&v["offset"]), + clustering: v["clustering"] == true, + cluster_members: v["clusterMembers"].as_array().map(|a| a.iter().filter_map(|f| face_of(f, None)).collect()).unwrap_or_default(), faces: v["faces"].as_array().map(|a| a.iter().filter_map(|face| face_of(face, None)).collect()).unwrap_or_default(), ordered: v["ordered"] == true, ready: v["ready"] == true, @@ -155,6 +161,13 @@ const SCANNING_SECS: f64 = 0.3; /// The engine supports up to 3,000 faces per listing; previews remain viewport-virtualized. pub(super) const PEOPLE_FACE_LIMIT: usize = 3000; +/// Force a refresh without throwing away the boxes of faces selected on another page. +pub(crate) fn invalidate(app: &mut LccApp) { + if let Some(entry) = app.caches.unnamed.as_mut() { + entry.0 = !app.session.catalog.revision; + } +} + /// The unnamed faces, asked for again only when the catalog changed, or (while the scan runs and learns more faces) at /// most every few seconds, since putting look-alikes together looks at every pair. While the engine is still judging /// the library for suggestions it is asked again every [`SCANNING_SECS`], so the Suggested faces fill in as it goes. @@ -163,20 +176,32 @@ pub fn faces(app: &mut LccApp, now: f64) -> Arc { let (rev, indexed, epoch) = (app.session.catalog.revision, app.caches.faces_indexed, app.caches.faces_epoch); if let Some((r, i, e, at, list)) = &app.caches.unnamed { // while the engine is still judging, its answer changes without the catalog or the index changing - let anyway = if list.scan.is_some_and(|s| !s.complete) { now - *at < SCANNING_SECS } else { *i == indexed || now - *at < 3.0 }; + let anyway = + if list.clustering || list.scan.is_some_and(|s| !s.complete) { now - *at < SCANNING_SECS } else { *i == indexed || now - *at < 3.0 }; if *r == rev && *e == epoch && anyway { return list.clone(); } } - let v = app.session.execute("faces.unnamed", &json!({"scope": "filter", "bySuggestion": true, "limit": PEOPLE_FACE_LIMIT, "offset": app.ui.unnamed_page_offset, "clusterOffset": f64::from(app.ui.unnamed_cluster_offset.clamp(-20, 20)) / 100.0})).unwrap_or(Value::Null); + let selected: Vec<_> = app.ui.unnamed_selected.iter().copied().collect(); + let retained = selection_snapshot(app, &selected).unwrap_or_default(); + let v = app.session.execute("faces.unnamed", &json!({"scope": "filter", "bySuggestion": true, "limit": PEOPLE_FACE_LIMIT, "offset": app.ui.unnamed_page_offset, "retainFaces": retained, "clusterOffset": f64::from(app.ui.unnamed_cluster_offset.clamp(-20, 20)) / 100.0})).unwrap_or(Value::Null); let list = Arc::new(parse(&v)); app.ui.unnamed_page_offset = list.offset; // what was selected and has since been named (or removed) is no longer selected; nor is a decision about a face // that has left the list (a confirmed one is named by now, and the name is what keeps it out). A suggested face // may be under Suggested without being on the listed page, so its decisions are kept by the groups too. - let present: std::collections::HashSet<(u64, usize)> = list.faces.iter().map(|f| (f.photo, f.index)).collect(); + let present: std::collections::HashSet<(u64, usize)> = list.faces.iter().chain(&list.cluster_members).map(|f| (f.photo, f.index)).collect(); let suggested: std::collections::HashSet<(u64, usize)> = list.groups.iter().flat_map(|g| g.faces.iter().map(|f| (f.photo, f.index))).collect(); - app.ui.unnamed_selected.retain(|k| present.contains(k) || suggested.contains(k)); + let snapshots: std::collections::HashMap<(u64, usize), lcc_geom::Rect> = + retained.iter().filter_map(|v| Some(((v["photo"].as_u64()?, usize::try_from(v["index"].as_u64()?).ok()?), rect_of(&v["rect"])?))).collect(); + let current: std::collections::HashMap<(u64, usize), lcc_geom::Rect> = list + .faces + .iter() + .chain(&list.cluster_members) + .chain(list.groups.iter().flat_map(|group| group.faces.iter())) + .map(|face| ((face.photo, face.index), face.rect)) + .collect(); + app.ui.unnamed_selected.retain(|key| snapshots.get(key).is_some_and(|rect| current.get(key) == Some(rect))); app.ui.confirmed_suggestions.retain(|k| present.contains(k) || suggested.contains(k)); app.ui.rejected_suggestions.retain(|k| present.contains(k) || suggested.contains(k)); app.caches.unnamed = Some((rev, indexed, epoch, now, list.clone())); @@ -186,7 +211,7 @@ pub fn faces(app: &mut LccApp, now: f64) -> Arc { /// The engine is still judging faces for suggestions: ask for a frame soon, so [`faces`] asks it again and the /// Suggested faces (and the progress beside them) catch up while it works. pub fn keep_scanning(ui: &egui::Ui, list: &Unnamed) { - if list.scan.is_some_and(|s| !s.complete) { + if list.clustering || list.scan.is_some_and(|s| !s.complete) { ui.ctx().request_repaint_after(std::time::Duration::from_secs_f64(SCANNING_SECS)); } } @@ -220,6 +245,7 @@ pub(super) fn selection_snapshot(app: &LccApp, faces: &[(u64, usize)]) -> Result let mut found: Vec<_> = list .faces .iter() + .chain(list.cluster_members.iter()) .chain(list.groups.iter().flat_map(|group| group.faces.iter())) .filter(|face| wanted.contains(&(face.photo, face.index))) .map(|face| (face.photo, face.index, face.rect)) @@ -426,7 +452,7 @@ pub fn tile(app: &mut LccApp, ui: &mut egui::Ui, visible: &[UnnamedFace], i: usi click(app, visible, i, shift); } // its look-alikes, selected at once to be named or ignored together (#259); or this face, ignored - let alikes = look_alikes(visible, f); + let alikes = group_keys(app, visible, f); crate::widgets::context_menu(&resp, |ui| { let n = alikes.len(); let label = crate::i18n::tr_format!("Select {n} look-alikes", n = n); @@ -477,6 +503,29 @@ pub fn tile_at(app: &mut LccApp, ui: &mut egui::Ui, visible: &[UnnamedFace], i: let _ = tile(app, ui, visible, i, r, ppp); } +/// Resolve the complete group snapshot, including faces outside the current display page. +pub(super) fn group_keys(app: &LccApp, visible: &[UnnamedFace], face: &UnnamedFace) -> Vec<(u64, usize)> { + if let Some(group) = face.group + && let Some((_, _, _, _, list)) = &app.caches.unnamed + { + let mut members: Vec<_> = list + .cluster_members + .iter() + .filter(|f| f.group == Some(group)) + .map(|f| (f.photo, f.index)) + .filter(|key| !app.ui.confirmed_suggestions.contains(key)) + .collect(); + let key = (face.photo, face.index); + if !members.is_empty() { + if !members.contains(&key) { + members.push(key); + } + return members; + } + } + look_alikes(visible, face) +} + /// The faces in `f`'s look-alike group (`f` among them), or just `f` when it has none yet. fn look_alikes(visible: &[UnnamedFace], f: &UnnamedFace) -> Vec<(u64, usize)> { match f.group { diff --git a/docs/faces.md b/docs/faces.md index 1e4ec9df76..8a7781ba99 100644 --- a/docs/faces.md +++ b/docs/faces.md @@ -401,7 +401,7 @@ does a person's page. - **Unknown**: every face nobody has named and no name is suggested for, as cropped pictures. With recognition running, faces that look alike appear under numbered **Unknown group** headings, each with a face count and a **Select group** - button (put in order by looking at every pair, for up to the first 3,000 embedded faces). Faces without a displayed + button. The current library filter is grouped in the background using all available embeddings. Faces without a displayed match appear under **Other unknown faces**. To name a group: select it, then click any outliers to deselect them (Shift-click selects a range, **Select all** takes every face listed), type a name in the bar that appears (people already named complete as you type), press Enter: all of them are named at @@ -410,8 +410,9 @@ does a person's page. deselect them before naming or ignoring. **Remove from similarity groups** keeps an outlier separate across sessions; use **Restore automatic grouping** on that face or the Undo toast to reverse the decision. **Loose / Balanced / Strict** adjusts the grouping threshold relative to the active recognition model by −0.10 / 0 / +0.10; it does not change recognition's suggestion threshold. Grouping is a - preview, not a permanent identity decision. The list pages through up to 3,000 unnamed faces at a time in catalog order; - groups compare only faces within the current page, so a group and its selection do not include similar faces on other pages. + preview, not a permanent identity decision. The list displays up to 3,000 faces per page, but groups and group selection + include matching faces on other pages. Review all group members before naming or ignoring them. Grouping compares each + face with group representatives, not every possible pair; it is heuristic and can take time on a very large library. - **Suggested**: the faces recognition has matched to a person, each person's faces under their own name, so one person's suggestions are reviewed together. See [Suggested faces](#suggested-faces). - **Confirmed**: a card for each named person (their face, with the number of photos they are in on the picture). From beff217f493e65e614eea9adbf34eed62f719729 Mon Sep 17 00:00:00 2001 From: deunderscorepaul <131645063+deunderscorepaul@users.noreply.github.com> Date: Mon, 30 Nov 2026 18:22:09 +0100 Subject: [PATCH 04/26] #1735: guard wgpu queue on device loss, deduplicate iGPU, honor cached face GPU verdicts Manual: none, no user-visible change --- apps/app/src/window_gpu.rs | 10 ++- crates/faces/src/net.rs | 38 +++++++++- crates/gpu/src/cards.rs | 69 ++++++++++++++++-- crates/gpu/src/faces.rs | 72 +++++++++++++++---- ...026-11-30-face-gpu-device-loss-and-igpu.md | 3 + ...026-11-30-face-gpu-device-loss-and-igpu.md | 3 + vendor/egui-wgpu/src/winit.rs | 28 ++++++-- 7 files changed, 195 insertions(+), 28 deletions(-) create mode 100644 docs/changelog/unreleased/2026-11-30-face-gpu-device-loss-and-igpu.md create mode 100644 docs/whats-new/2026-11-30-face-gpu-device-loss-and-igpu.md diff --git a/apps/app/src/window_gpu.rs b/apps/app/src/window_gpu.rs index b4637eb19f..4142f542b7 100644 --- a/apps/app/src/window_gpu.rs +++ b/apps/app/src/window_gpu.rs @@ -295,13 +295,18 @@ fn watch() -> std::sync::MutexGuard<'static, LossWatch> { WATCH.lock().unwrap_or_else(std::sync::PoisonError::into_inner) } +fn is_device_lost_status(status: &wgpu::CurrentSurfaceTexture, engine_lost: bool) -> bool { + engine_lost || matches!(status, wgpu::CurrentSurfaceTexture::Lost) +} + /// Watch the window's frames (see [`LossWatch`]); `which` is recorded in `files` when its device /// is judged lost. egui-wgpu's own handling of each dropped frame is kept. pub fn watch_device_loss(options: &mut WgpuConfiguration, files: std::sync::Arc, which: WindowRenderer) { let inner = options.on_surface_status.clone(); options.on_surface_status = std::sync::Arc::new(move |status| { let action = inner(status); - if counts_as_failure(status) && watch().dropped(std::time::Instant::now(), lcc_engine::gpu::last_loss().is_some()) { + let device_lost = is_device_lost_status(status, lcc_engine::gpu::last_loss().is_some()); + if counts_as_failure(status) && watch().dropped(std::time::Instant::now(), device_lost) { log::error!("window: the {} renderer has drawn nothing since its GPU device was lost ({status:?}); ending the run", which.name()); // on disk now: the process may yet be ended by hand files.record_lost(which); @@ -681,6 +686,9 @@ mod tests { assert!(!counts_as_failure(&wgpu::CurrentSurfaceTexture::Timeout)); assert!(counts_as_failure(&wgpu::CurrentSurfaceTexture::Validation)); assert!(counts_as_failure(&wgpu::CurrentSurfaceTexture::Lost)); + assert!(is_device_lost_status(&wgpu::CurrentSurfaceTexture::Lost, false)); + assert!(!is_device_lost_status(&wgpu::CurrentSurfaceTexture::Validation, false)); + assert!(is_device_lost_status(&wgpu::CurrentSurfaceTexture::Validation, true)); } /// #1194: the renderer that lost its device is kept on disk, stops being the remembered one and diff --git a/crates/faces/src/net.rs b/crates/faces/src/net.rs index 30a6c6c251..69500ccbf1 100644 --- a/crates/faces/src/net.rs +++ b/crates/faces/src/net.rs @@ -130,6 +130,11 @@ pub trait Accelerator: Send + Sync { fn plan_cached(&self, _program_fingerprint: u64) -> bool { false } + /// Cached benchmark verdict (`Some(true)` faster than CPU, `Some(false)` slower than CPU, + /// `None` not measured). + fn cached_plan(&self, program_fingerprint: u64) -> Option { + self.plan_cached(program_fingerprint).then_some(true) + } /// Persist the outcome of benchmarking `program_fingerprint` on this accelerator. fn record_plan(&self, _program_fingerprint: u64, _faster: bool, _fast_ms: f64, _cpu_ms: f64) {} } @@ -173,6 +178,10 @@ impl Net { self.detach(); let cpu = self.run(probe.clone()).map_err(|e| e.to_string())?; let prog_fp = self.program(&probe.shape).ok().flatten().map(|p| p.fingerprint()); + let cached = prog_fp.and_then(|fp| accelerator.cached_plan(fp)); + if require_faster && cached == Some(false) { + return Err("the device was previously measured slower than the CPU for this model".into()); + } let acc = accelerator.clone(); *self.accelerator.write().unwrap_or_else(PoisonError::into_inner) = Some(accelerator); // the first run also uploads the weights and builds the kernels: time a second one @@ -183,7 +192,7 @@ impl Net { Ok(_) if self.accelerator().is_none() => Err("the device failed on the test input".into()), Ok(fast) => agree(&cpu, &fast, eff_tol), }; - if verdict.is_ok() && require_faster && !prog_fp.is_some_and(|fp| acc.plan_cached(fp)) { + if verdict.is_ok() && require_faster && cached != Some(true) { // Measure batch throughput rather than single-face driver launch latency. // Face recognition in production batches faces (up to 16 per dispatch). const BENCH_BATCH: usize = 8; @@ -849,6 +858,7 @@ mod tests { struct ProgramFake { calls: std::sync::atomic::AtomicUsize, poison: bool, + cached: Option, } fn run_steps(p: &program::Program, input: &[f32]) -> Vec> { @@ -977,6 +987,9 @@ mod tests { } Ok(Some(out)) } + fn cached_plan(&self, _program_fingerprint: u64) -> Option { + self.cached + } } fn every_operator_input(seed: usize) -> Tensor { @@ -988,7 +1001,7 @@ mod tests { let net = Net::new(crate::synthetic::every_operator_graph()).unwrap(); let x = every_operator_input(0); let cpu = net.run(x.clone()).unwrap(); - let fake = Arc::new(ProgramFake { calls: 0.into(), poison: false }); + let fake = Arc::new(ProgramFake { calls: 0.into(), poison: false, cached: None }); net.attach_checked(fake.clone(), &x, 1e-5, false).unwrap(); let calls = fake.calls.load(std::sync::atomic::Ordering::Relaxed); assert!(calls > 0, "the whole network ran as one program"); @@ -1009,7 +1022,7 @@ mod tests { let net = Net::new(crate::synthetic::every_operator_graph()).unwrap(); let x = every_operator_input(1); let cpu = net.run(x.clone()).unwrap(); - assert!(net.attach_checked(Arc::new(ProgramFake { calls: 0.into(), poison: true }), &x, 1e-5, false).is_err()); + assert!(net.attach_checked(Arc::new(ProgramFake { calls: 0.into(), poison: true, cached: None }), &x, 1e-5, false).is_err()); assert!(net.accelerator().is_none()); assert_eq!(net.run(x).unwrap(), cpu); } @@ -1044,6 +1057,25 @@ mod tests { assert!(run(g, x.clone()).is_err(), "{what}"); } } + + #[test] + fn attach_checked_respects_cached_slower_and_faster_verdicts() { + let net = Net::new(crate::synthetic::every_operator_graph()).unwrap(); + let x = every_operator_input(2); + + // Cached slower (`Some(false)`) with `require_faster = true`: skips GPU completely. + let slower = Arc::new(ProgramFake { calls: 0.into(), poison: false, cached: Some(false) }); + let err = net.attach_checked(slower.clone(), &x, 1e-5, true).unwrap_err(); + assert!(err.contains("slower"), "{err}"); + assert_eq!(slower.calls.load(std::sync::atomic::Ordering::Relaxed), 0); + assert!(net.accelerator().is_none()); + + // Cached faster (`Some(true)`): runs only the single probe check, skips the 8-input benchmark. + let faster = Arc::new(ProgramFake { calls: 0.into(), poison: false, cached: Some(true) }); + net.attach_checked(faster.clone(), &x, 1e-5, true).unwrap(); + assert_eq!(faster.calls.load(std::sync::atomic::Ordering::Relaxed), 1); + assert!(net.accelerator().is_some()); + } } #[cfg(test)] diff --git a/crates/gpu/src/cards.rs b/crates/gpu/src/cards.rs index fe5f7ffbe4..d88a5f5fdc 100644 --- a/crates/gpu/src/cards.rs +++ b/crates/gpu/src/cards.rs @@ -162,9 +162,22 @@ impl ScreenCard { } } +/// Whether `a` and `b` are enumerations of the same physical built-in (integrated) GPU. +/// Unlike identical discrete cards, a system has at most one physical integrated GPU of a given +/// vendor/device/name, so enumerating it twice (e.g. DX12 twice or DX12 + Vulkan) does not yield +/// a separate second card. +pub(crate) fn same_physical_builtin(a: &AdapterEntry, b: &AdapterEntry) -> bool { + a.kind == AdapterKind::BuiltIn + && b.kind == AdapterKind::BuiltIn + && a.key.vendor == b.key.vendor + && a.key.device == b.key.device + && a.key.name == b.key.name +} + /// The settings' list from wgpu's adapters, in its order: (adapter info, its storage buffers per -/// shader stage, its memory). Identical cards get `#1`, `#2` …; the screen's card is the first of -/// its model. +/// shader stage, its memory). Identical discrete cards get `#1`, `#2` … and the screen's card is +/// the first of its model; duplicate enumerations of the same built-in GPU all mark +/// `drives_screen`. pub fn entries_from(adapters: &[(wgpu::AdapterInfo, u32, Option)], screen: Option<&ScreenCard>) -> Vec { let mut out: Vec = Vec::with_capacity(adapters.len()); let mut screen_taken = false; @@ -179,8 +192,11 @@ pub fn entries_from(adapters: &[(wgpu::AdapterInfo, u32, Option)], screen: } else { None }; - let drives_screen = !screen_taken && screen.is_some_and(|s| s.is(&key)); - screen_taken |= drives_screen; + let matches_screen = screen.is_some_and(|s| s.is(&key)); + let drives_screen = matches_screen && (kind == AdapterKind::BuiltIn || !screen_taken); + if kind != AdapterKind::BuiltIn { + screen_taken |= drives_screen; + } out.push(AdapterEntry { name: key.name.clone(), key, @@ -307,7 +323,9 @@ impl HelperChoice { /// means no helper (agents test on one card and must leave the other alone); a helper named /// outright still counts. pub fn resolve_helper(entries: &[AdapterEntry], primary: Option, choice: &HelperChoice, variable_pins: bool) -> Option { - let other = |i: &usize| Some(*i) != primary; + let other = |i: &usize| { + Some(*i) != primary && !primary.and_then(|p| entries.get(p)).zip(entries.get(*i)).is_some_and(|(p, e)| same_physical_builtin(p, e)) + }; match choice { HelperChoice::Off => None, HelperChoice::Same => primary.filter(|i| entries.get(*i).is_some_and(|e| e.usable)), @@ -397,8 +415,11 @@ pub(crate) fn set_screen(card: ScreenCard) { if let Some(l) = s.listed.as_mut() { let mut taken = false; for e in l.iter_mut() { - e.drives_screen = !taken && card.is(&e.key); - taken |= e.drives_screen; + let matches = card.is(&e.key); + e.drives_screen = matches && (e.kind == AdapterKind::BuiltIn || !taken); + if e.kind != AdapterKind::BuiltIn { + taken |= e.drives_screen; + } } } } @@ -576,4 +597,38 @@ mod tests { assert_eq!(HelperChoice::parse_variable("4070"), Some(HelperChoice::Named("4070".into()))); assert_eq!(HelperChoice::parse_variable("OFF"), Some(HelperChoice::Off)); } + + /// Issue #1735: DX12 (or multiple backends) enumerating the same physical integrated GPU twice + /// must not treat the second enumeration as a separate second card. + #[test] + fn duplicate_integrated_gpu_is_not_treated_as_a_second_card() { + use wgpu::DeviceType::{DiscreteGpu, IntegratedGpu}; + let mut vulkan = info("AMD Radeon(TM) Graphics", 0x1002, 0x15e7, IntegratedGpu); + vulkan.backend = wgpu::Backend::Vulkan; + let dup_igpu = [ + (info("AMD Radeon(TM) Graphics", 0x1002, 0x15e7, IntegratedGpu), 64, None), + (info("AMD Radeon(TM) Graphics", 0x1002, 0x15e7, IntegratedGpu), 64, None), + (vulkan, 64, None), + (info("Microsoft Basic Render Driver", 0x1414, 0x8c, wgpu::DeviceType::Cpu), 64, None), + ]; + let screen = ScreenCard { vendor: 0x1002, device: 0x15e7, name: "AMD Radeon(TM) Graphics".into() }; + let e = entries_from(&dup_igpu, Some(&screen)); + assert!(e[0].drives_screen && e[1].drives_screen && e[2].drives_screen, "all enumerations of the built-in screen GPU mark drives_screen"); + assert!(same_physical_builtin(&e[0], &e[1]) && same_physical_builtin(&e[0], &e[2])); + assert_eq!(resolve_helper(&e, Some(0), &HelperChoice::Auto, false), None); + assert_eq!(resolve_helper(&e, Some(0), &HelperChoice::Card(e[1].key.clone()), false), None); + assert_eq!(resolve_helper(&e, Some(0), &HelperChoice::Named("Radeon".into()), false), None); + assert_eq!(resolve_helper(&e, Some(0), &HelperChoice::Same, false), Some(0)); + + // Identical discrete GPUs remain distinct cards. + let dual_dgpu = [ + (info("NVIDIA GeForce RTX 4090", 0x10de, 0x2684, DiscreteGpu), 64, None), + (info("NVIDIA GeForce RTX 4090", 0x10de, 0x2684, DiscreteGpu), 64, None), + ]; + let d_screen = ScreenCard { vendor: 0x10de, device: 0x2684, name: "NVIDIA GeForce RTX 4090".into() }; + let de = entries_from(&dual_dgpu, Some(&d_screen)); + assert!(de[0].drives_screen && !de[1].drives_screen); + assert!(!same_physical_builtin(&de[0], &de[1])); + assert_eq!(resolve_helper(&de, Some(0), &HelperChoice::Auto, false), Some(1)); + } } diff --git a/crates/gpu/src/faces.rs b/crates/gpu/src/faces.rs index 7008fe42bc..1234b9547b 100644 --- a/crates/gpu/src/faces.rs +++ b/crates/gpu/src/faces.rs @@ -517,16 +517,24 @@ fn make_device_on(backends: wgpu::Backends, card: Card) -> Result { build_dev(adapter, card, key) } +/// Whether adapter `idx` in `entries` should be treated as a separate `Card::Second` for face +/// compute. Only returns `Card::Second` when the chosen adapter does not drive the screen and +/// another physically distinct usable adapter exists. +pub(crate) fn auto_card_for(entries: &[AdapterEntry], idx: usize) -> Card { + let Some(entry) = entries.get(idx) else { return Card::Editing }; + if entry.drives_screen { + return Card::Editing; + } + let has_other_card = entries.iter().enumerate().any(|(j, other)| j != idx && other.usable && !crate::cards::same_physical_builtin(entry, other)); + if has_other_card { Card::Second } else { Card::Editing } +} + fn make_auto_device(backends: wgpu::Backends) -> Result { let instance = new_compute_instance(backends); let adapters = pollster::block_on(instance.enumerate_adapters(backends)); let entries = crate::remember_adapters(&adapters); let wanted_hit = crate::backend::wanted_adapter().and_then(|wanted| { - entries - .iter() - .enumerate() - .find(|(_, e)| e.usable && crate::backend::adapter_name_matches(&wanted, &e.name)) - .map(|(i, e)| (i, e.key.clone(), e.drives_screen)) + entries.iter().enumerate().find(|(_, e)| e.usable && crate::backend::adapter_name_matches(&wanted, &e.name)).map(|(i, e)| (i, e.key.clone())) }); let chosen = wanted_hit.or_else(|| { entries @@ -534,12 +542,12 @@ fn make_auto_device(backends: wgpu::Backends) -> Result { .enumerate() .filter(|(i, e)| e.usable && adapters.get(*i).is_some_and(|a| adapter_limits_ok(a).is_ok())) .max_by_key(|(_, e)| auto_adapter_score(e)) - .map(|(i, e)| (i, e.key.clone(), e.drives_screen)) + .map(|(i, e)| (i, e.key.clone())) }); - if let Some((idx, key, drives_screen)) = chosen + if let Some((idx, key)) = chosen && let Some(adapter) = adapters.into_iter().nth(idx) { - let card = if drives_screen { Card::Editing } else { Card::Second }; + let card = auto_card_for(&entries, idx); return build_dev(adapter, card, key); } // Fallback to the standard second-then-editing card resolution. @@ -555,10 +563,9 @@ fn make_named_device(backends: wgpu::Backends, key: AdapterKey) -> Result bool { - let hit = read_cached_plan(&self.dev.driver_sig, self.precision, program_fingerprint) == Some(true); - self.cache_hit.store(hit, Ordering::Relaxed); + self.cached_plan(program_fingerprint) == Some(true) + } + + fn cached_plan(&self, program_fingerprint: u64) -> Option { + let hit = read_cached_plan(&self.dev.driver_sig, self.precision, program_fingerprint); + self.cache_hit.store(hit == Some(true), Ordering::Relaxed); hit } @@ -1710,6 +1721,43 @@ mod tests { assert!(auto_adapter_score(&amd_dgpu) > auto_adapter_score(&intel_igpu)); } + #[test] + fn auto_card_for_treats_sole_or_duplicated_igpu_as_editing_card() { + let mk = |name: &str, vendor: u32, device: u32, kind: AdapterKind, drives_screen: bool, usable: bool, index: u32| AdapterEntry { + key: AdapterKey { backend: "dx12".into(), vendor, device, name: name.into(), index }, + name: name.into(), + kind, + memory: None, + backend: "dx12".into(), + drives_screen, + usable, + why_not: (!usable).then(|| "unusable".into()), + }; + + // Sole iGPU (even when screen isn't set yet) and software adapter: never Card::Second. + let sole = [ + mk("AMD Radeon(TM) Graphics", 0x1002, 0x15e7, AdapterKind::BuiltIn, false, true, 1), + mk("Microsoft Basic Render Driver", 0x1414, 0x8c, AdapterKind::Software, false, false, 1), + ]; + assert_eq!(auto_card_for(&sole, 0), Card::Editing); + + // Duplicated iGPU (e.g. DX12 enumerates the same iGPU twice): never Card::Second. + let dup = [ + mk("AMD Radeon(TM) Graphics", 0x1002, 0x15e7, AdapterKind::BuiltIn, true, true, 1), + mk("AMD Radeon(TM) Graphics", 0x1002, 0x15e7, AdapterKind::BuiltIn, false, true, 2), + ]; + assert_eq!(auto_card_for(&dup, 0), Card::Editing); + assert_eq!(auto_card_for(&dup, 1), Card::Editing); + + // Off-screen dedicated GPU alongside an on-screen iGPU: Card::Second. + let hybrid = [ + mk("NVIDIA RTX 4070", VENDOR_NVIDIA, 0x2783, AdapterKind::Dedicated, false, true, 1), + mk("AMD Radeon(TM) Graphics", 0x1002, 0x15e7, AdapterKind::BuiltIn, true, true, 1), + ]; + assert_eq!(auto_card_for(&hybrid, 0), Card::Second); + assert_eq!(auto_card_for(&hybrid, 1), Card::Editing); + } + #[test] fn persistent_plan_cache_roundtrips_and_rejects_mismatches() { let dir = std::env::temp_dir().join(format!("lc-face-cache-{}", std::process::id())); diff --git a/docs/changelog/unreleased/2026-11-30-face-gpu-device-loss-and-igpu.md b/docs/changelog/unreleased/2026-11-30-face-gpu-device-loss-and-igpu.md new file mode 100644 index 0000000000..3c0b927d81 --- /dev/null +++ b/docs/changelog/unreleased/2026-11-30-face-gpu-device-loss-and-igpu.md @@ -0,0 +1,3 @@ +## Fixes + +- **Face scan GPU selection and device loss:** prevented duplicate enumerations of an integrated GPU from being treated as a second card for face models, honored cached slower-than-CPU face benchmark results on restart, and guarded `egui-wgpu` queue submission against panicking on `Lost` device errors (#1735). diff --git a/docs/whats-new/2026-11-30-face-gpu-device-loss-and-igpu.md b/docs/whats-new/2026-11-30-face-gpu-device-loss-and-igpu.md new file mode 100644 index 0000000000..db824e4a05 --- /dev/null +++ b/docs/whats-new/2026-11-30-face-gpu-device-loss-and-igpu.md @@ -0,0 +1,3 @@ +### Avoid driver-reset crash on integrated GPUs during face scan +- Stopped treating duplicate enumerations of an integrated GPU as a separate second card for background face compute, and stopped re-benchmarking face models on a GPU already measured slower than the CPU (issue #1735). +- Guarded window queue submission against panicking on GPU device loss so the app saves and switches renderers cleanly instead of crashing. diff --git a/vendor/egui-wgpu/src/winit.rs b/vendor/egui-wgpu/src/winit.rs index dc5164d0b8..183a7a4e4d 100644 --- a/vendor/egui-wgpu/src/winit.rs +++ b/vendor/egui-wgpu/src/winit.rs @@ -626,8 +626,13 @@ impl Painter { fn drop(&mut self) { // Only submit an empty command buffer array if no commands were // explicitly submitted. - if !self.commands_submitted { - self.queue.submit([]); + if !self.commands_submitted + && std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { + self.queue.submit([]); + })) + .is_err() + { + log::error!("Queue::submit([]) panicked during RendererQueueGuard drop (device lost)"); } } } @@ -737,6 +742,9 @@ impl Painter { frame } other => { + if matches!(other, wgpu::CurrentSurfaceTexture::Lost) { + render_queue_guard.commands_submitted = true; + } match (*self.config.on_surface_status)(&other) { SurfaceErrorAction::Reconfigure => { Self::configure_surface(surface_state, render_state, &self.config.surface); @@ -856,10 +864,20 @@ impl Painter { profiling::scope!("Queue::submit"); // wgpu doesn't document where vsync can happen. Maybe here? let start = web_time::Instant::now(); - render_state - .queue - .submit(core::iter::chain(user_cmd_bufs, [encoded])); + let submitted = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { + render_state + .queue + .submit(core::iter::chain(user_cmd_bufs, [encoded])); + })); vsync_sec += start.elapsed().as_secs_f32(); + if submitted.is_err() { + log::error!("Queue::submit panicked (device lost)"); + render_queue_guard.commands_submitted = true; + let _ = (*self.config.on_surface_status)(&wgpu::CurrentSurfaceTexture::Lost); + surface_state.needs_recreate = true; + self.context.request_repaint_of(viewport_id); + return vsync_sec; + } }; // Ensure that the queue guard does not do unnecessary work when dropped From 43dea35c678106393cb610d7202638c8ae31b7c1 Mon Sep 17 00:00:00 2001 From: 1234destiny1234 <180862339+1234destiny1234@users.noreply.github.com> Date: Tue, 1 Dec 2026 07:16:24 +0000 Subject: [PATCH 05/26] Address face grouping review feedback Manual: People and faces, Faces and people. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> --- crates/engine/src/cmd/face_recognize.rs | 4 ++-- crates/ui-egui/locales/fork/cs-formats.json | 3 +++ crates/ui-egui/locales/fork/de-formats.json | 3 +++ crates/ui-egui/locales/fork/es-formats.json | 3 +++ crates/ui-egui/locales/fork/fi-formats.json | 3 +++ crates/ui-egui/locales/fork/fr-formats.json | 3 +++ crates/ui-egui/locales/fork/id-formats.json | 3 +++ crates/ui-egui/locales/fork/it-formats.json | 3 +++ crates/ui-egui/locales/fork/ja-formats.json | 3 +++ crates/ui-egui/locales/fork/ka-formats.json | 3 +++ crates/ui-egui/locales/fork/pl-formats.json | 3 +++ crates/ui-egui/locales/fork/pt-br-formats.json | 3 +++ crates/ui-egui/locales/fork/ru-formats.json | 3 +++ crates/ui-egui/locales/fork/sv-formats.json | 3 +++ crates/ui-egui/locales/fork/uk-formats.json | 3 +++ crates/ui-egui/locales/fork/vi-formats.json | 3 +++ crates/ui-egui/locales/fork/zh-hans-formats.json | 3 +++ crates/ui-egui/locales/fork/zh-hant-formats.json | 3 +++ crates/ui-egui/src/panels/people.rs | 4 ++-- crates/ui-egui/src/panels/suggested.rs | 2 +- docs/changelog/unreleased/2026-11-29-unknown-face-groups.md | 3 +++ docs/manual-site/src/content/docs/ai/faces.mdx | 3 ++- docs/manual-site/src/content/docs/library/people.mdx | 3 ++- docs/whats-new/2026-11-29-unknown-face-groups.md | 3 +++ 24 files changed, 66 insertions(+), 7 deletions(-) create mode 100644 docs/changelog/unreleased/2026-11-29-unknown-face-groups.md create mode 100644 docs/whats-new/2026-11-29-unknown-face-groups.md diff --git a/crates/engine/src/cmd/face_recognize.rs b/crates/engine/src/cmd/face_recognize.rs index 61418efb78..db67b6a16c 100644 --- a/crates/engine/src/cmd/face_recognize.rs +++ b/crates/engine/src/cmd/face_recognize.rs @@ -2567,7 +2567,7 @@ mod imp { /// Grouping runs in a worker across this scope before pagination; suggestions are supplied by the library-wide scan. pub fn arrange_unnamed( s: &mut Session, - all: &mut Vec<(u64, usize, Rect)>, + all: &mut [(u64, usize, Rect)], limit: usize, people: &std::collections::HashSet, cluster_offset: f32, @@ -3282,7 +3282,7 @@ mod imp { pub fn arrange_unnamed( _: &mut Session, - _: &mut Vec<(u64, usize, lcc_geom::Rect)>, + _: &mut [(u64, usize, lcc_geom::Rect)], _: usize, _: &std::collections::HashSet, _: f32, diff --git a/crates/ui-egui/locales/fork/cs-formats.json b/crates/ui-egui/locales/fork/cs-formats.json index 4ed318e0f5..6eea485043 100644 --- a/crates/ui-egui/locales/fork/cs-formats.json +++ b/crates/ui-egui/locales/fork/cs-formats.json @@ -88,6 +88,7 @@ "Exporting {done}/{total}": "Exportuje se {done}/{total}", "Exports, previews and thumbnails also use {card}.": "Exporty, náhledy a miniatury používají také {card}.", "Eye focus: {}": "Zaostření na oči: {}", + "Faces {first}–{last} of {total}": "Tváře {first}–{last} z {total}", "Faces: {spec}": "Obličeje: {spec}", "Fill Edges failed: {e}": "Vyplnění okrajů selhalo: {e}", "Filled the location of {n} photos": "Doplněno místo u {n} fotek", @@ -228,6 +229,7 @@ "This computer: {ram} of memory, graphics card: {gpu}": "Tento počítač: {ram} paměti, grafická karta: {gpu}", "Tile cache: {mb} MB, {n} tiles": "Mezipaměť dlaždic: {mb} MB, {n} dlaždic", "Unflagged photos to reject: {n}": "Neoznačené k zamítnutí: {n}", + "Unknown group {group_number}": "Neznámá skupina {group_number}", "Updated {count} plug-ins": "Aktualizované zásuvné moduly: {count}", "Updated {name} to version {version}": "{name} aktualizován na verzi {version}", "Uploaded: only this {} × {} px crop (red: the area to fill) and its mask. Not the whole photo, not its metadata.": "Odesílá se: jen tento výřez {} × {} px (červeně: oblast k vyplnění) a jeho maska. Ne celá fotka ani její metadata.", @@ -301,6 +303,7 @@ "{n} Stars": "Hvězdičky: {n}", "{n} alternatives in the catalog": "Alternativ v katalogu: {n}", "{n} faces learned.": "Naučené tváře: {n}.", + "{n} faces selected": "Vybráno tváří: {n}", "{n} keywords imported": "Importováno klíčových slov: {n}", "{n} keywords removed": "Odebráno klíčových slov: {n}", "{n} new photos in {folders} folders: see the badges in Folders": "Nové fotky: {n} ve složkách ({folders}). Viz značky v části Složky", diff --git a/crates/ui-egui/locales/fork/de-formats.json b/crates/ui-egui/locales/fork/de-formats.json index 6393a7a804..e2b13feb0a 100644 --- a/crates/ui-egui/locales/fork/de-formats.json +++ b/crates/ui-egui/locales/fork/de-formats.json @@ -87,6 +87,7 @@ "Exporting {done}/{total}": "Exportiere {done}/{total}", "Exports, previews and thumbnails also use {card}.": "Exporte, Vorschauen und Miniaturen nutzen auch {card}.", "Eye focus: {}": "Augenschärfe: {}", + "Faces {first}–{last} of {total}": "Gesichter {first}–{last} von {total}", "Faces: {spec}": "Gesichter: {spec}", "Fill Edges failed: {e}": "Ränder füllen fehlgeschlagen: {e}", "Filled the location of {n} photos": "Ort von {n} Fotos ergänzt", @@ -223,6 +224,7 @@ "Tile cache: {mb} MB, {n} tiles": "Kachel-Cache: {mb} MB, {n} Kacheln", "Trained on: {provenance}": "Trainiert mit: {provenance}", "Unflagged photos to reject: {n}": "Unmarkierte Fotos zum Ablehnen: {n}", + "Unknown group {group_number}": "Unbekannte Gruppe {group_number}", "Updated {count} plug-ins": "{count} Zusatzmodule aktualisiert", "Updated {name} to version {version}": "{name} auf Version {version} aktualisiert", "Version {new} is older than the installed version {installed}": "Version {new} ist älter als die installierte Version {installed}", @@ -293,6 +295,7 @@ "{n} change{} saved in memory but not written to disk: {e}\n{app} retries automatically; quitting now would lose {}.": "Ungespeicherte Änderungen: {n}{0:.0} im Arbeitsspeicher, aber nicht auf dem Datenträger: {e}\n{app} versucht es automatisch erneut; beim Beenden gingen diese Änderungen verloren.{1:.0}", "{n} change{} saved in memory but not written to disk: {e}. {app} will retry": "Änderungen nur im Arbeitsspeicher gespeichert: {n}{:.0}: {e}. {app} versucht es erneut", "{n} faces learned.": "{n} Gesichter gelernt.", + "{n} faces selected": "{n} Gesichter ausgewählt", "{n} keywords imported": "{n} Stichwörter importiert", "{n} keywords removed": "{n} Stichwörter entfernt", "{n} new photos in {folders} folders: see the badges in Folders": "{n} neue Fotos in {folders} Ordnern: siehe die Markierungen unter Ordner", diff --git a/crates/ui-egui/locales/fork/es-formats.json b/crates/ui-egui/locales/fork/es-formats.json index 5252dcfbcb..d61a2188a2 100644 --- a/crates/ui-egui/locales/fork/es-formats.json +++ b/crates/ui-egui/locales/fork/es-formats.json @@ -87,6 +87,7 @@ "Exporting {done}/{total}": "Exportando {done}/{total}", "Exports, previews and thumbnails also use {card}.": "Las exportaciones, vistas previas y miniaturas también usan {card}.", "Eye focus: {}": "Enfoque de ojos: {}", + "Faces {first}–{last} of {total}": "Caras {first}–{last} de {total}", "Faces: {spec}": "Caras: {spec}", "Fill Edges failed: {e}": "Error al rellenar los bordes: {e}", "Filled the location of {n} photos": "Ubicación completada en {n} fotos", @@ -223,6 +224,7 @@ "Tile cache: {mb} MB, {n} tiles": "Caché de teselas: {mb} MB, {n} teselas", "Trained on: {provenance}": "Entrenado con: {provenance}", "Unflagged photos to reject: {n}": "Fotos sin marca a rechazar: {n}", + "Unknown group {group_number}": "Grupo desconocido {group_number}", "Updated {count} plug-ins": "Complementos actualizados: {count}", "Updated {name} to version {version}": "{name} actualizado a la versión {version}", "Version {new} is older than the installed version {installed}": "La versión {new} es anterior a la versión instalada {installed}", @@ -293,6 +295,7 @@ "{n} change{} saved in memory but not written to disk: {e}\n{app} retries automatically; quitting now would lose {}.": "Cambios guardados en memoria, pero no escritos en el disco: {n}{0:.0}: {e}\n{app} vuelve a intentarlo automáticamente; si se sale ahora, se perderán.{1:.0}", "{n} change{} saved in memory but not written to disk: {e}. {app} will retry": "Cambios guardados solo en memoria: {n}{:.0}: {e}; {app} volverá a intentarlo", "{n} faces learned.": "{n} caras aprendidas.", + "{n} faces selected": "{n} caras seleccionadas", "{n} keywords imported": "{n} palabras clave importadas", "{n} keywords removed": "{n} palabras clave eliminadas", "{n} new photos in {folders} folders: see the badges in Folders": "{n} fotos nuevas en {folders} carpetas: mira las marcas en Carpetas", diff --git a/crates/ui-egui/locales/fork/fi-formats.json b/crates/ui-egui/locales/fork/fi-formats.json index a9c7bce96a..8aa3118d1b 100644 --- a/crates/ui-egui/locales/fork/fi-formats.json +++ b/crates/ui-egui/locales/fork/fi-formats.json @@ -90,6 +90,7 @@ "Exporting {done}/{total}": "Viedään {done}/{total}", "Exports, previews and thumbnails also use {card}.": "Viennit, esikatselut ja pikkukuvat käyttävät myös: {card}.", "Eye focus: {}": "Silmien tarkennus: {}", + "Faces {first}–{last} of {total}": "Kasvot {first}–{last} / {total}", "Faces: {spec}": "Kasvot: {spec}", "Fill Edges failed: {e}": "Reunojen täyttö epäonnistui: {e}", "Filled the location of {n} photos": "Sijainti täytetty kuviin: {n}", @@ -239,6 +240,7 @@ "This computer: {ram} of memory, graphics card: {gpu}": "Tämä tietokone: {ram} muistia, näytönohjain: {gpu}", "Tile cache: {mb} MB, {n} tiles": "Ruutuvälimuisti: {mb} Mt, ruutuja {n}", "Unflagged photos to reject: {n}": "Hylättävät liputtomat kuvat: {n}", + "Unknown group {group_number}": "Tuntematon ryhmä {group_number}", "Updated {count} plug-ins": "Päivitettyjä laajennuksia: {count}", "Updated {name} to version {version}": "{name} päivitetty versioon {version}", "Uploaded: only this {} × {} px crop (red: the area to fill) and its mask. Not the whole photo, not its metadata.": "Lähetetään: vain tämä {} × {} px:n rajaus (punainen: täytettävä alue) ja sen maski. Ei koko kuvaa eikä sen metatietoja.", @@ -316,6 +318,7 @@ "{n} change{} saved in memory but not written to disk: {e}\n{app} retries automatically; quitting now would lose {}.": "Muistissa olevia muutoksia, joita ei ole kirjoitettu levylle: {n}{:.0}: {e}\n{app} yrittää automaattisesti uudelleen; jos lopetat nyt, ne{:.0} menetetään.", "{n} change{} saved in memory but not written to disk: {e}. {app} will retry": "Muistissa olevia muutoksia, joita ei ole kirjoitettu levylle: {n}{:.0}: {e}. {app} yrittää uudelleen", "{n} faces learned.": "{n} kasvoa opittu.", + "{n} faces selected": "{n} kasvoa valittu", "{n} keywords imported": "Tuotuja avainsanoja: {n}", "{n} keywords removed": "Poistettuja avainsanoja: {n}", "{n} new photos in {folders} folders: see the badges in Folders": "Uusia kuvia: {n} ({folders} kansiossa) – katso merkit Kansiot-paneelissa", diff --git a/crates/ui-egui/locales/fork/fr-formats.json b/crates/ui-egui/locales/fork/fr-formats.json index 803df41192..e8b68a60f2 100644 --- a/crates/ui-egui/locales/fork/fr-formats.json +++ b/crates/ui-egui/locales/fork/fr-formats.json @@ -85,6 +85,7 @@ "Exporting {done}/{total}": "Exportation {done}/{total}", "Exports, previews and thumbnails also use {card}.": "Les exports, aperçus et vignettes utilisent aussi {card}.", "Eye focus: {}": "Netteté des yeux : {}", + "Faces {first}–{last} of {total}": "Visages {first}–{last} sur {total}", "Faces: {spec}": "Visages : {spec}", "Fill Edges failed: {e}": "Échec du remplissage des bords : {e}", "Filled the location of {n} photos": "Lieu renseigné pour {n} photos", @@ -215,6 +216,7 @@ "This computer: {ram} of memory, graphics card: {gpu}": "Cet ordinateur : {ram} de mémoire, carte graphique : {gpu}", "Tile cache: {mb} MB, {n} tiles": "Cache de tuiles : {mb} Mo, {n} tuiles", "Unflagged photos to reject: {n}": "Photos sans drapeau à rejeter : {n}", + "Unknown group {group_number}": "Groupe inconnu {group_number}", "Updated {count} plug-ins": "{count} modules mis à jour", "Updated {name} to version {version}": "{name} mis à jour vers la version {version}", "Version {new} is older than the installed version {installed}": "La version {new} est plus ancienne que la version installée {installed}", @@ -285,6 +287,7 @@ "{n} change{} saved in memory but not written to disk: {e}\n{app} retries automatically; quitting now would lose {}.": "{n} modification{} enregistrée(s) en mémoire mais non écrite(s) sur le disque : {e}\n{app} réessaiera automatiquement ; quitter maintenant entraînerait la perte de {}.", "{n} change{} saved in memory but not written to disk: {e}. {app} will retry": "{n} modification{} enregistrée(s) en mémoire mais non écrite(s) sur le disque : {e}. {app} réessaiera.", "{n} faces learned.": "{n} visages appris.", + "{n} faces selected": "{n} visages sélectionnés", "{n} keywords imported": "{n} mots-clés importés", "{n} keywords removed": "{n} mots-clés supprimés", "{n} new photos in {folders} folders: see the badges in Folders": "{n} nouvelles photos dans {folders} dossiers : voir les badges dans Dossiers", diff --git a/crates/ui-egui/locales/fork/id-formats.json b/crates/ui-egui/locales/fork/id-formats.json index e5f9276d6c..d773d11427 100644 --- a/crates/ui-egui/locales/fork/id-formats.json +++ b/crates/ui-egui/locales/fork/id-formats.json @@ -89,6 +89,7 @@ "Exporting {done}/{total}": "Mengekspor {done}/{total}", "Exports, previews and thumbnails also use {card}.": "Ekspor, pratinjau, dan gambar mini juga memakai {card}.", "Eye focus: {}": "Fokus mata: {}", + "Faces {first}–{last} of {total}": "Wajah {first}–{last} dari {total}", "Faces: {spec}": "Wajah: {spec}", "Fill Edges failed: {e}": "Isi tepi gagal: {e}", "Filled the location of {n} photos": "Lokasi {n} foto telah diisi", @@ -238,6 +239,7 @@ "This computer: {ram} of memory, graphics card: {gpu}": "Komputer ini: memori {ram}, kartu grafis: {gpu}", "Tile cache: {mb} MB, {n} tiles": "Cache ubin: {mb} MB, {n} ubin", "Unflagged photos to reject: {n}": "Foto tanpa tanda yang ditolak: {n}", + "Unknown group {group_number}": "Grup tidak dikenal {group_number}", "Updated {count} plug-ins": "{count} plug-in diperbarui", "Updated {name} to version {version}": "{name} diperbarui ke versi {version}", "Uploaded: only this {} × {} px crop (red: the area to fill) and its mask. Not the whole photo, not its metadata.": "Diunggah: hanya potongan {} × {} px ini (merah: area yang akan diisi) dan masker-nya. Bukan seluruh foto, bukan metadatanya.", @@ -315,6 +317,7 @@ "{n} change{} saved in memory but not written to disk: {e}\n{app} retries automatically; quitting now would lose {}.": "{n} perubahan{:.0} tersimpan di memori tetapi belum ditulis ke disk: {e}\n{app} mencoba lagi secara otomatis; keluar sekarang akan menghilangkan perubahan tersebut.{:.0}", "{n} change{} saved in memory but not written to disk: {e}. {app} will retry": "{n} perubahan{:.0} tersimpan di memori tetapi belum ditulis ke disk: {e}. {app} akan mencoba lagi", "{n} faces learned.": "{n} wajah dipelajari.", + "{n} faces selected": "{n} wajah dipilih", "{n} keywords imported": "{n} kata kunci diimpor", "{n} keywords removed": "{n} kata kunci dihapus", "{n} new photos in {folders} folders: see the badges in Folders": "{n} foto baru di {folders} folder: lihat lencana di Folder", diff --git a/crates/ui-egui/locales/fork/it-formats.json b/crates/ui-egui/locales/fork/it-formats.json index e986dc6491..c8678c3c9e 100644 --- a/crates/ui-egui/locales/fork/it-formats.json +++ b/crates/ui-egui/locales/fork/it-formats.json @@ -88,6 +88,7 @@ "Exporting {done}/{total}": "Esportazione {done}/{total}", "Exports, previews and thumbnails also use {card}.": "Esportazioni, anteprime e miniature usano anche {card}.", "Eye focus: {}": "Messa a fuoco occhi: {}", + "Faces {first}–{last} of {total}": "Volti {first}–{last} di {total}", "Faces: {spec}": "Volti: {spec}", "Fill Edges failed: {e}": "Riempimento dei bordi non riuscito: {e}", "Filled the location of {n} photos": "Luogo compilato per {n} foto", @@ -229,6 +230,7 @@ "This computer: {ram} of memory, graphics card: {gpu}": "Questo computer: {ram} di memoria, scheda grafica: {gpu}", "Tile cache: {mb} MB, {n} tiles": "Cache dei riquadri: {mb} MB, {n} riquadri", "Unflagged photos to reject: {n}": "Foto senza contrassegno da rifiutare: {n}", + "Unknown group {group_number}": "Gruppo sconosciuto {group_number}", "Updated {count} plug-ins": "Plug-in aggiornati: {count}", "Updated {name} to version {version}": "{name} aggiornato alla versione {version}", "Uploaded: only this {} × {} px crop (red: the area to fill) and its mask. Not the whole photo, not its metadata.": "Caricato: solo questo ritaglio di {} × {} px (in rosso: l'area da riempire) e la sua maschera. Non la foto intera né i suoi metadati.", @@ -302,6 +304,7 @@ "{n} Stars": "{n} stelle", "{n} alternatives in the catalog": "{n} alternative nel catalogo", "{n} faces learned.": "{n} volti imparati.", + "{n} faces selected": "{n} volti selezionati", "{n} keywords imported": "{n} parole chiave importate", "{n} keywords removed": "{n} parole chiave rimosse", "{n} new photos in {folders} folders: see the badges in Folders": "{n} nuove foto in {folders} cartelle: vedi i badge in Cartelle", diff --git a/crates/ui-egui/locales/fork/ja-formats.json b/crates/ui-egui/locales/fork/ja-formats.json index fa21d54e78..c019587714 100644 --- a/crates/ui-egui/locales/fork/ja-formats.json +++ b/crates/ui-egui/locales/fork/ja-formats.json @@ -87,6 +87,7 @@ "Exporting {done}/{total}": "書き出し中 {done}/{total}", "Exports, previews and thumbnails also use {card}.": "書き出し、プレビュー、サムネイルには {card} も使います。", "Eye focus: {}": "目のフォーカス:{}", + "Faces {first}–{last} of {total}": "顔 {first}–{last} / {total}", "Faces: {spec}": "顔:{spec}", "Fill Edges failed: {e}": "端の塗りつぶしに失敗しました: {e}", "Filled the location of {n} photos": "{n} 枚の写真の場所を入力しました", @@ -223,6 +224,7 @@ "Tile cache: {mb} MB, {n} tiles": "タイルキャッシュ: {mb} MB、{n} タイル", "Trained on: {provenance}": "学習データ:{provenance}", "Unflagged photos to reject: {n}": "不採用にするフラグなしの写真: {n}", + "Unknown group {group_number}": "不明なグループ {group_number}", "Updated {count} plug-ins": "{count} 個のプラグインを更新しました", "Updated {name} to version {version}": "{name} をバージョン {version} に更新しました", "Version {new} is older than the installed version {installed}": "バージョン {new} はインストール済みのバージョン {installed} より古いです", @@ -293,6 +295,7 @@ "{n} change{} saved in memory but not written to disk: {e}\n{app} retries automatically; quitting now would lose {}.": "{n}件の変更{:.0}をディスクに保存できません:{e}\n自動で再試行します。終了すると変更が失われます{:.0}", "{n} change{} saved in memory but not written to disk: {e}. {app} will retry": "{n}件の変更{:.0}はメモリに保存しましたが、ディスクには書き込めていません:{e}。{app}が再試行します", "{n} faces learned.": "{n} 個の顔を学習しました。", + "{n} faces selected": "{n} 件の顔を選択", "{n} keywords imported": "{n} 個のキーワードを読み込みました", "{n} keywords removed": "{n} 個のキーワードを削除しました", "{n} new photos in {folders} folders: see the badges in Folders": "{folders} 個のフォルダーに新しい写真が {n} 枚あります: フォルダーのバッジを参照", diff --git a/crates/ui-egui/locales/fork/ka-formats.json b/crates/ui-egui/locales/fork/ka-formats.json index 2833d976d6..f4133c8abb 100644 --- a/crates/ui-egui/locales/fork/ka-formats.json +++ b/crates/ui-egui/locales/fork/ka-formats.json @@ -106,6 +106,7 @@ "Exporting {done}/{total}": "ექსპორტი {done}/{total}", "Exports, previews and thumbnails also use {card}.": "ექსპორტი, გადახედვები და მინიატურები ასევე იყენებს {card}-ს.", "Eye focus: {}": "თვალებზე ფოკუსი: {}", + "Faces {first}–{last} of {total}": "სახეები {first}–{last} სულ {total}", "Faces: {spec}": "სახეები: {spec}", "Fill Edges failed: {e}": "კიდეების შევსება ვერ მოხერხდა: {e}", "Filled the location of {n} photos": "მდებარეობა შევსებულია {n} ფოტოსთვის", @@ -280,6 +281,7 @@ "Tile cache: {mb} MB, {n} tiles": "ფილების ქეში: {mb} მბ, {n} ფილა", "Undo: {what}": "დაბრუნება: {what}", "Unflagged photos to reject: {n}": "უარსაყოფი ნიშნის გარეშე ფოტოები: {n}", + "Unknown group {group_number}": "უცნობი ჯგუფი {group_number}", "Update “{name}” with Current Settings": "„{name}“-ის განახლება მიმდინარე პარამეტრებით", "Updated {count} plug-ins": "განახლდა {count} დანამატი", "Updated {name}": "განახლდა: {name}", @@ -364,6 +366,7 @@ "{n} Stars": "{n} ვარსკვლავი", "{n} alternatives in the catalog": "{n} ალტერნატივა კატალოგში", "{n} faces learned.": "ნასწავლი სახეები: {n}.", + "{n} faces selected": "არჩეულია {n} სახე", "{n} keywords imported": "იმპორტირებულია {n} საკვანძო სიტყვა", "{n} keywords removed": "ამოშლილია {n} საკვანძო სიტყვა", "{n} new photos in {folders} folders: see the badges in Folders": "{folders} საქაღალდეში {n} ახალი ფოტოა: იხილეთ ნიშნები საქაღალდეებში", diff --git a/crates/ui-egui/locales/fork/pl-formats.json b/crates/ui-egui/locales/fork/pl-formats.json index 0f726bc435..aa3284487e 100644 --- a/crates/ui-egui/locales/fork/pl-formats.json +++ b/crates/ui-egui/locales/fork/pl-formats.json @@ -88,6 +88,7 @@ "Exporting {done}/{total}": "Eksportowanie {done}/{total}", "Exports, previews and thumbnails also use {card}.": "Eksporty, podglądy i miniatury używają też {card}.", "Eye focus: {}": "Ostrość na oczach: {}", + "Faces {first}–{last} of {total}": "Twarze {first}–{last} z {total}", "Faces: {spec}": "Twarze: {spec}", "Fill Edges failed: {e}": "Wypełnianie krawędzi nie powiodło się: {e}", "Filled the location of {n} photos": "Uzupełniono lokalizację zdjęć: {n}", @@ -228,6 +229,7 @@ "This computer: {ram} of memory, graphics card: {gpu}": "Ten komputer: {ram} pamięci, karta graficzna: {gpu}", "Tile cache: {mb} MB, {n} tiles": "Pamięć podręczna kafelków: {mb} MB, kafelki: {n}", "Unflagged photos to reject: {n}": "Nieflagowane do odrzucenia: {n}", + "Unknown group {group_number}": "Nieznana grupa {group_number}", "Updated {count} plug-ins": "Zaktualizowane wtyczki: {count}", "Updated {name} to version {version}": "Zaktualizowano {name} do wersji {version}", "Uploaded: only this {} × {} px crop (red: the area to fill) and its mask. Not the whole photo, not its metadata.": "Wysyłane: tylko ten wycinek {} × {} px (czerwony: obszar do wypełnienia) i jego maska. Nie całe zdjęcie ani jego metadane.", @@ -301,6 +303,7 @@ "{n} Stars": "Gwiazdki: {n}", "{n} alternatives in the catalog": "Alternatywy w katalogu: {n}", "{n} faces learned.": "Nauczone twarze: {n}.", + "{n} faces selected": "Wybrano {n} twarzy", "{n} keywords imported": "Zaimportowane słowa kluczowe: {n}", "{n} keywords removed": "Usunięte słowa kluczowe: {n}", "{n} new photos in {folders} folders: see the badges in Folders": "Nowe zdjęcia: {n} w folderach ({folders}). Zobacz oznaczenia w sekcji Foldery", diff --git a/crates/ui-egui/locales/fork/pt-br-formats.json b/crates/ui-egui/locales/fork/pt-br-formats.json index ad78916331..becb70353c 100644 --- a/crates/ui-egui/locales/fork/pt-br-formats.json +++ b/crates/ui-egui/locales/fork/pt-br-formats.json @@ -87,6 +87,7 @@ "Exporting {done}/{total}": "Exportando {done}/{total}", "Exports, previews and thumbnails also use {card}.": "Exportações, prévias e miniaturas também usam {card}.", "Eye focus: {}": "Foco dos olhos: {}", + "Faces {first}–{last} of {total}": "Rostos {first}–{last} de {total}", "Faces: {spec}": "Rostos: {spec}", "Fill Edges failed: {e}": "Falha ao preencher bordas: {e}", "Filled the location of {n} photos": "Local preenchido em {n} fotos", @@ -223,6 +224,7 @@ "Tile cache: {mb} MB, {n} tiles": "Cache de blocos: {mb} MB, {n} blocos", "Trained on: {provenance}": "Treinado com: {provenance}", "Unflagged photos to reject: {n}": "Fotos sem marca a rejeitar: {n}", + "Unknown group {group_number}": "Grupo desconhecido {group_number}", "Updated {count} plug-ins": "{count} plug-ins atualizados", "Updated {name} to version {version}": "{name} atualizado para a versão {version}", "Version {new} is older than the installed version {installed}": "A versão {new} é mais antiga que a versão instalada {installed}", @@ -293,6 +295,7 @@ "{n} change{} saved in memory but not written to disk: {e}\n{app} retries automatically; quitting now would lose {}.": "{n} alteração{:.0} salva na memória mas não gravada no disco: {e}\nO {app} tenta novamente automaticamente; encerrar agora perderia {}.", "{n} change{} saved in memory but not written to disk: {e}. {app} will retry": "{n} alteração(ões){:.0} salva(s) na memória, mas não gravada(s) no disco: {e}. O {app} tentará de novo", "{n} faces learned.": "{n} rostos aprendidos.", + "{n} faces selected": "{n} rostos selecionados", "{n} keywords imported": "{n} palavras-chave importadas", "{n} keywords removed": "{n} palavras-chave removidas", "{n} new photos in {folders} folders: see the badges in Folders": "{n} fotos novas em {folders} pastas: veja os selos em Pastas", diff --git a/crates/ui-egui/locales/fork/ru-formats.json b/crates/ui-egui/locales/fork/ru-formats.json index 1f9e237707..accc6ebf78 100644 --- a/crates/ui-egui/locales/fork/ru-formats.json +++ b/crates/ui-egui/locales/fork/ru-formats.json @@ -87,6 +87,7 @@ "Exporting {done}/{total}": "Экспорт {done}/{total}", "Exports, previews and thumbnails also use {card}.": "Экспорт, превью и миниатюры также используют {card}.", "Eye focus: {}": "Фокус глаз: {}", + "Faces {first}–{last} of {total}": "Лица {first}–{last} из {total}", "Faces: {spec}": "Лица: {spec}", "Fill Edges failed: {e}": "Не удалось заполнить края: {e}", "Filled the location of {n} photos": "Местоположение заполнено у фото: {n}", @@ -223,6 +224,7 @@ "Tile cache: {mb} MB, {n} tiles": "Кэш тайлов: {mb} МБ, тайлов: {n}", "Trained on: {provenance}": "Обучена на: {provenance}", "Unflagged photos to reject: {n}": "Фотографий без отметки для отклонения: {n}", + "Unknown group {group_number}": "Неизвестная группа {group_number}", "Updated {count} plug-ins": "Обновлено плагинов: {count}", "Updated {name} to version {version}": "{name} обновлён до версии {version}", "Version {new} is older than the installed version {installed}": "Версия {new} старше установленной версии {installed}", @@ -294,6 +296,7 @@ "{n} change{} saved in memory but not written to disk: {e}\n{app} retries automatically; quitting now would lose {}.": "Не записано на диск, хранится только в памяти (изменений: {n}): {e}\n{app} повторяет попытку автоматически; при выходе сейчас они будут потеряны.{:.0}{:.0}", "{n} change{} saved in memory but not written to disk: {e}. {app} will retry": "Изменений сохранено в памяти, но не записано на диск: {n}{:.0}: {e}. {app} повторит попытку", "{n} faces learned.": "Выучено лиц: {n}.", + "{n} faces selected": "Выбрано лиц: {n}", "{n} keywords imported": "Импортировано ключевых слов: {n}", "{n} keywords removed": "Удалено ключевых слов: {n}", "{n} new photos in {folders} folders: see the badges in Folders": "Новых фото: {n} в папках ({folders}). См. отметки в разделе «Папки»", diff --git a/crates/ui-egui/locales/fork/sv-formats.json b/crates/ui-egui/locales/fork/sv-formats.json index 82bce2f07d..32b6183485 100644 --- a/crates/ui-egui/locales/fork/sv-formats.json +++ b/crates/ui-egui/locales/fork/sv-formats.json @@ -92,6 +92,7 @@ "Exporting {done}/{total}": "Exporterar {done}/{total}", "Exports, previews and thumbnails also use {card}.": "Exporter, förhandsvisningar och miniatyrer använder även {card}.", "Eye focus: {}": "Ögonskärpa: {}", + "Faces {first}–{last} of {total}": "Ansikten {first}–{last} av {total}", "Faces: {spec}": "Ansikten: {spec}", "Fill Edges failed: {e}": "Kantfyllning misslyckades: {e}", "Filled the location of {n} photos": "Fyllde i platsen för {n} foton", @@ -243,6 +244,7 @@ "This computer: {ram} of memory, graphics card: {gpu}": "Den här datorn: {ram} minne, grafikkort: {gpu}", "Tile cache: {mb} MB, {n} tiles": "Rutcache: {mb} MB, {n} rutor", "Unflagged photos to reject: {n}": "Oflaggade foton att avvisa: {n}", + "Unknown group {group_number}": "Okänd grupp {group_number}", "Updated {count} plug-ins": "Uppdaterade {count} tillägg", "Updated {name} to version {version}": "{name} uppdaterat till version {version}", "Uploaded: only this {} × {} px crop (red: the area to fill) and its mask. Not the whole photo, not its metadata.": "Laddas upp: endast detta utsnitt på {} × {} px (rött: området som ska fyllas) och dess mask. Inte hela fotot, inte dess metadata.", @@ -320,6 +322,7 @@ "{n} change{} saved in memory but not written to disk: {e}\n{app} retries automatically; quitting now would lose {}.": "Ändringar sparade i minnet men inte skrivna till disk: {n}{:.0} ({e})\n{app} försöker igen automatiskt; om du avslutar nu går ändringarna förlorade{:.0}.", "{n} change{} saved in memory but not written to disk: {e}. {app} will retry": "Ändringar sparade i minnet men inte skrivna till disk: {n}{:.0} ({e}) – {app} försöker igen", "{n} faces learned.": "{n} ansikten inlärda.", + "{n} faces selected": "{n} ansikten valda", "{n} keywords imported": "{n} nyckelord importerade", "{n} keywords removed": "{n} nyckelord borttagna", "{n} new photos in {folders} folders: see the badges in Folders": "{n} nya foton i {folders} mappar: se markeringarna under Mappar", diff --git a/crates/ui-egui/locales/fork/uk-formats.json b/crates/ui-egui/locales/fork/uk-formats.json index d41060650b..95677b1e1b 100644 --- a/crates/ui-egui/locales/fork/uk-formats.json +++ b/crates/ui-egui/locales/fork/uk-formats.json @@ -85,6 +85,7 @@ "Exporting {done}/{total}": "Експорт {done}/{total}", "Exports, previews and thumbnails also use {card}.": "Експорт, попередні перегляди й мініатюри також використовують {card}.", "Eye focus: {}": "Фокус очей: {}", + "Faces {first}–{last} of {total}": "Обличчя {first}–{last} із {total}", "Faces: {spec}": "Обличчя: {spec}", "Fill Edges failed: {e}": "Не вдалося заповнити краї: {e}", "Filled the location of {n} photos": "Місце заповнено у фото: {n}", @@ -215,6 +216,7 @@ "This computer: {ram} of memory, graphics card: {gpu}": "Цей комп’ютер: {ram} пам’яті, відеокарта: {gpu}", "Tile cache: {mb} MB, {n} tiles": "Кеш тайлів: {mb} МБ, тайлів: {n}", "Unflagged photos to reject: {n}": "Фотографій без позначки для відхилення: {n}", + "Unknown group {group_number}": "Невідома група {group_number}", "Updated {count} plug-ins": "Оновлено плагінів: {count}", "Updated {name} to version {version}": "{name} оновлено до версії {version}", "Version {new} is older than the installed version {installed}": "Версія {new} старіша за встановлену версію {installed}", @@ -285,6 +287,7 @@ "{n} change{} saved in memory but not written to disk: {e}\n{app} retries automatically; quitting now would lose {}.": "Змін збережено в пам’яті, але не записано на диск: {n}{:.0}: {e}\n{app} повторює спроби автоматично; вихід зараз призведе до їхньої втрати.{:.0}", "{n} change{} saved in memory but not written to disk: {e}. {app} will retry": "Змін збережено в пам’яті, але не записано на диск: {n}{:.0}: {e}. {app} повторить спробу", "{n} faces learned.": "Вивчено облич: {n}.", + "{n} faces selected": "Вибрано облич: {n}", "{n} keywords imported": "Імпортовано ключових слів: {n}", "{n} keywords removed": "Видалено ключових слів: {n}", "{n} new photos in {folders} folders: see the badges in Folders": "Нових фото: {n} у папках ({folders}). Див. позначки в розділі «Папки»", diff --git a/crates/ui-egui/locales/fork/vi-formats.json b/crates/ui-egui/locales/fork/vi-formats.json index 01792b67bd..cf7d08e0eb 100644 --- a/crates/ui-egui/locales/fork/vi-formats.json +++ b/crates/ui-egui/locales/fork/vi-formats.json @@ -105,6 +105,7 @@ "Exporting {done}/{total}": "Đang xuất {done}/{total}", "Exports, previews and thumbnails also use {card}.": "Xuất, bản xem trước và hình thu nhỏ cũng dùng {card}.", "Eye focus: {}": "Lấy nét mắt: {}", + "Faces {first}–{last} of {total}": "Khuôn mặt {first}–{last} trong {total}", "Faces: {spec}": "Khuôn mặt: {spec}", "Fill Edges failed: {e}": "Lấp đầy mép thất bại: {e}", "Filled the location of {n} photos": "Đã điền vị trí cho {n} ảnh", @@ -265,6 +266,7 @@ "This computer: {ram} of memory, graphics card: {gpu}": "Máy tính này: {ram} bộ nhớ, card đồ họa: {gpu}", "Tile cache: {mb} MB, {n} tiles": "Bộ nhớ đệm ô: {mb} MB, {n} ô", "Unflagged photos to reject: {n}": "Ảnh chưa gắn cờ sẽ bị loại: {n}", + "Unknown group {group_number}": "Nhóm chưa biết {group_number}", "Update “{name}” with Current Settings": "Cập nhật «{name}» với thiết lập hiện tại", "Updated {count} plug-ins": "Đã cập nhật {count} plugin", "Updated {name}": "Đã cập nhật {name}", @@ -350,6 +352,7 @@ "{n} change{} saved in memory but not written to disk: {e}\n{app} retries automatically; quitting now would lose {}.": "{n} thay đổi{:.0} đã lưu trong bộ nhớ nhưng chưa ghi ra đĩa: {e}\n{app} tự động thử lại; thoát bây giờ sẽ mất các thay đổi này{:.0}.", "{n} change{} saved in memory but not written to disk: {e}. {app} will retry": "{n} thay đổi{:.0} đã lưu trong bộ nhớ nhưng chưa ghi ra đĩa: {e}. {app} sẽ thử lại", "{n} faces learned.": "Đã học {n} khuôn mặt.", + "{n} faces selected": "Đã chọn {n} khuôn mặt", "{n} keywords imported": "Đã nhập {n} từ khóa", "{n} keywords removed": "Đã xóa {n} từ khóa", "{n} new photos in {folders} folders: see the badges in Folders": "{n} ảnh mới trong {folders} thư mục: xem các huy hiệu trong Thư mục", diff --git a/crates/ui-egui/locales/fork/zh-hans-formats.json b/crates/ui-egui/locales/fork/zh-hans-formats.json index 31acdcd040..e28dd04d36 100644 --- a/crates/ui-egui/locales/fork/zh-hans-formats.json +++ b/crates/ui-egui/locales/fork/zh-hans-formats.json @@ -87,6 +87,7 @@ "Exporting {done}/{total}": "正在导出 {done}/{total}", "Exports, previews and thumbnails also use {card}.": "导出、预览和缩略图也使用 {card}。", "Eye focus: {}": "眼睛对焦:{}", + "Faces {first}–{last} of {total}": "人脸 {first}–{last},共 {total} 个", "Faces: {spec}": "人脸:{spec}", "Fill Edges failed: {e}": "填充边缘失败:{e}", "Filled the location of {n} photos": "已填写 {n} 张照片的位置", @@ -223,6 +224,7 @@ "Tile cache: {mb} MB, {n} tiles": "瓦片缓存:{mb} MB,{n} 个瓦片", "Trained on: {provenance}": "训练数据:{provenance}", "Unflagged photos to reject: {n}": "将拒绝的未标记照片:{n}", + "Unknown group {group_number}": "未知分组 {group_number}", "Updated {count} plug-ins": "已更新 {count} 个插件", "Updated {name} to version {version}": "已将 {name} 更新到版本 {version}", "Version {new} is older than the installed version {installed}": "版本 {new} 比已安装的版本 {installed} 旧", @@ -293,6 +295,7 @@ "{n} change{} saved in memory but not written to disk: {e}\n{app} retries automatically; quitting now would lose {}.": "{n} 项更改已保存在内存中,但尚未写入磁盘:{e}\n{app} 会自动重试;现在退出将丢失这些更改。{0:.0}{1:.0}", "{n} change{} saved in memory but not written to disk: {e}. {app} will retry": "{n} 项更改{0:.0}已保存在内存中,但未写入磁盘:{e}。{app} 会重试", "{n} faces learned.": "已学习 {n} 张人脸。", + "{n} faces selected": "已选择 {n} 个人脸", "{n} keywords imported": "已导入 {n} 个关键字", "{n} keywords removed": "已移除 {n} 个关键字", "{n} new photos in {folders} folders: see the badges in Folders": "{folders} 个文件夹中有 {n} 张新照片:请查看“文件夹”中的标记", diff --git a/crates/ui-egui/locales/fork/zh-hant-formats.json b/crates/ui-egui/locales/fork/zh-hant-formats.json index cea46181e8..b4ed9a78c2 100644 --- a/crates/ui-egui/locales/fork/zh-hant-formats.json +++ b/crates/ui-egui/locales/fork/zh-hant-formats.json @@ -87,6 +87,7 @@ "Exporting {done}/{total}": "正在輸出 {done}/{total}", "Exports, previews and thumbnails also use {card}.": "輸出、預覽和縮圖也使用 {card}。", "Eye focus: {}": "眼睛對焦:{}", + "Faces {first}–{last} of {total}": "人臉 {first}–{last},共 {total} 個", "Faces: {spec}": "人臉:{spec}", "Fill Edges failed: {e}": "填充邊緣失敗:{e}", "Filled the location of {n} photos": "已填寫 {n} 張相片的位置", @@ -223,6 +224,7 @@ "Tile cache: {mb} MB, {n} tiles": "圖磚快取:{mb} MB,{n} 個圖磚", "Trained on: {provenance}": "訓練資料:{provenance}", "Unflagged photos to reject: {n}": "將拒絕的未標記相片:{n}", + "Unknown group {group_number}": "未知群組 {group_number}", "Updated {count} plug-ins": "已更新 {count} 個外掛程式", "Updated {name} to version {version}": "已將 {name} 更新至版本 {version}", "Version {new} is older than the installed version {installed}": "版本 {new} 比已安裝的版本 {installed} 舊", @@ -293,6 +295,7 @@ "{n} change{} saved in memory but not written to disk: {e}\n{app} retries automatically; quitting now would lose {}.": "{n} 項變更{:.0}已保留在記憶體,但尚未寫入磁碟:{e}\n{app} 會自動重試;現在結束程式會遺失{}。", "{n} change{} saved in memory but not written to disk: {e}. {app} will retry": "{n} 項變更{:.0}已儲存在記憶體中,但未寫入磁碟:{e}。{app} 會重試", "{n} faces learned.": "已學習 {n} 張人臉。", + "{n} faces selected": "已選取 {n} 個人臉", "{n} keywords imported": "已匯入 {n} 個關鍵字", "{n} keywords removed": "已移除 {n} 個關鍵字", "{n} new photos in {folders} folders: see the badges in Folders": "{folders} 個資料夾中有 {n} 張新照片:請查看「資料夾」中的標記", diff --git a/crates/ui-egui/src/panels/people.rs b/crates/ui-egui/src/panels/people.rs index 0356ba23c8..fb8ff24c29 100644 --- a/crates/ui-egui/src/panels/people.rs +++ b/crates/ui-egui/src/panels/people.rs @@ -351,7 +351,7 @@ pub(super) fn clustered_face_grid(app: &mut LccApp, ui: &mut egui::Ui, visible: }; let selected = !keys.is_empty() && keys.iter().all(|key| app.ui.unnamed_selected.contains(key)); let title = if section.grouped { - crate::i18n::tr_format!("Unknown group {}", group_number).to_string() + crate::i18n::tr_format!("Unknown group {group_number}", group_number = group_number).to_string() } else { crate::i18n::tr("Other unknown faces").to_string() }; @@ -538,7 +538,7 @@ fn unknown(app: &mut LccApp, ui: &mut egui::Ui) { ui.horizontal_wrapped(|ui| { let first = if list.faces.is_empty() { 0 } else { list.offset.saturating_add(1) }; let last = list.offset.saturating_add(list.faces.len()).min(list.total); - ui.label(crate::i18n::tr_format!("Faces {}–{} of {}", first, last, list.total)); + ui.label(crate::i18n::tr_format!("Faces {first}–{last} of {total}", first = first, last = last, total = list.total)); let previous = ui.add_enabled(list.offset > 0, egui::Button::new(crate::i18n::tr("Previous"))); register(ui.ctx(), "unnamed:previousPage", previous.rect); let next = ui.add_enabled(last < list.total, egui::Button::new(crate::i18n::tr("Next"))); diff --git a/crates/ui-egui/src/panels/suggested.rs b/crates/ui-egui/src/panels/suggested.rs index 269a19e84c..3c6011a77b 100644 --- a/crates/ui-egui/src/panels/suggested.rs +++ b/crates/ui-egui/src/panels/suggested.rs @@ -219,7 +219,7 @@ pub fn show(app: &mut LccApp, ui: &mut egui::Ui) { super::chips::show(app, ui, &chips); if !app.ui.unnamed_selected.is_empty() { ui.horizontal(|ui| { - ui.label(crate::i18n::tr_format!("{} faces selected", app.ui.unnamed_selected.len())); + ui.label(crate::i18n::tr_format!("{n} faces selected", n = app.ui.unnamed_selected.len())); let maintenance = ui.button(crate::i18n::tr("Face Maintenance…")); register(ui.ctx(), "suggested:maintenance", maintenance.rect); if maintenance.clicked() { diff --git a/docs/changelog/unreleased/2026-11-29-unknown-face-groups.md b/docs/changelog/unreleased/2026-11-29-unknown-face-groups.md new file mode 100644 index 0000000000..3227578539 --- /dev/null +++ b/docs/changelog/unreleased/2026-11-29-unknown-face-groups.md @@ -0,0 +1,3 @@ +## People +- Group unknown faces across the current library filter with adjustable similarity; select groups across pages and remove or restore outliers. +- Scope face maintenance to People selections for recognition, embedding rebuild and clearing, or to their photos for detection and rescanning. diff --git a/docs/manual-site/src/content/docs/ai/faces.mdx b/docs/manual-site/src/content/docs/ai/faces.mdx index 7dbc364dda..525491b402 100644 --- a/docs/manual-site/src/content/docs/ai/faces.mdx +++ b/docs/manual-site/src/content/docs/ai/faces.mdx @@ -17,6 +17,7 @@ import { Aside } from '@astrojs/starlight/components'; - **Recognise faces (experimental)**: Settings ▸ **Faces**. Off until you switch it on, even after a model is downloaded: scanning a big library takes a long time. With a recognition model chosen, a background scan works out what each face looks like and suggests names from faces you have already named. A suggestion is only a label such as "Jane Doe?" until you confirm it; nothing is named for you. - **Face scan controls**: Settings ▸ Faces ▸ **Face scan** shows where the scan is (not started, indexing, paused, complete, and how many photos are done) with **Pause** / **Resume**, **Clear…** (deletes what the scan learned and leaves it paused; named faces stay) and **Restart…** (deletes it and scans every photo again). Both ask first. While the scan runs, its "Finding faces" row in the activity stack has a pause button (resume while paused; a pause is kept across restarts) and a gear that opens Settings ▸ Faces. - **Face Maintenance…**: run a cancellable detect-and-recognise, recognise-existing, new-items, embedding rebuild, or rescan-and-merge pass over visible photos, the selection, one or more folders, or one or more regular or smart collections. Right-click a folder to prefill **Scan Folder for Faces…**; filesystem folders include subfolders by default and can be limited to direct children. Collection sets always include nested collections. Rescan can merge old automatic detections or replace them while preserving named, ignored, manual, and non-face regions. Reset All Face Data is a separate confirmed action; it leaves the continuous scan paused so the reset data is not immediately recreated. Recognize Existing Faces, Rebuild All Embeddings and Rebuild Named Faces find no new faces; with the face model installed they align each face as the background scan does, since a recognition model matches a face cut by its box much less well. Scripts use `faces.maintain` and `faces.scanStatus`; `faces.reset` requires `{ confirmed: true }`. MCP clients also get `cmd_faces_maintain`, `cmd_faces_scanStatus` and `cmd_faces_reset`. +- **Selected faces**: in People, select faces in Unknown or Suggested and open **Face Maintenance…**. Recognition and embedding rebuild work on those faces; detection and rescanning work on their entire photos. Clearing selected face data removes cached embeddings and suggestions, which background indexing may recreate. - **Build Face Thumbnails**: Library ▸ Faces ▸ **Build Face Thumbnails** renders a tile of every face in the library at the size the People view shows now, ahead of the scrolling that would otherwise build them one by one — on a library with hundreds of people that is the slow part of People. It runs in the background (a cancellable row in the activity stack) and keeps the tiles in the thumbnail cache, so People scrolls without rendering afterwards, also after a restart. Scripts use `faces.buildThumbnails` (`status` reports the last run, `cancel` stops it). - **Sorting a person's faces**: a person's page in the People view has a sort picker next to its title — import order, capture time oldest or newest first, folder, or largest face first. Scripts use `person.sort`. - **Everything stays local**: face data is cached beside the library, not in the catalog or XMP. @@ -33,7 +34,7 @@ import { Aside } from '@astrojs/starlight/components'; ## Limits -- Partial: no separated clusters, no manual tagging beyond naming, and regions are never written back to the sidecar. +- Unknown face groups are suggestions based on similarity, not confirmed identities. Review groups before naming or ignoring; faces without embeddings remain separate. Regions are never written back to the sidecar. - Detection is a replacement for the earlier detector, whose training data had a restrictive licence; an old one is listed so you can remove it. - Not a Lightroom feature set: accuracy is unmeasured against Lightroom. diff --git a/docs/manual-site/src/content/docs/library/people.mdx b/docs/manual-site/src/content/docs/library/people.mdx index 0d9db06b0b..6b1486814f 100644 --- a/docs/manual-site/src/content/docs/library/people.mdx +++ b/docs/manual-site/src/content/docs/library/people.mdx @@ -22,7 +22,8 @@ import Shot from '../../../components/Shot.astro'; - **Detect Faces** (**Library** menu) finds faces; the model is an opt-in download (**Settings ▸ Faces**), nothing ships bundled. - **Face Maintenance…** (**Library ▸ Faces** menu) runs a cancellable detection/recognition pass over the visible photos, the selection, one or more folders, or regular/smart collections. Right-click a folder and choose **Scan Folder for Faces…** to prefill it; rebuild embeddings, rescan while merging/replacing automatic boxes, or perform a separately confirmed **Reset All Face Data** there. See [Faces and people](../../ai/faces/#face-maintenance). - **Build Face Thumbnails** (**Library ▸ Faces** menu) renders a tile of every face in the library at the size the People view shows now, ahead of the scrolling that would otherwise build them one by one. It runs in the background (a cancellable row in the activity stack) and keeps the tiles in the thumbnail cache, so People scrolls without rendering afterwards, also after a restart. -- **Name Faces**: unnamed faces are grouped (**Group Unnamed Faces**); type a name once for a group. In **Unknown**, look-alike clusters are visually separated, and selecting a cluster selects only its Unknown faces. Hover a tile to see the closest confirmed person's name and similarity. With an optional recognition model, **Recognize People** suggests names; hover a **Suggested** face to see the suggested match and its score. +- **Group unknown faces**: with a recognition model installed, similar Unknown faces are grouped in the background across the current library filter, not just the visible page. Choose **Loose**, **Balanced** or **Strict** to adjust the similarity threshold. Select a group to include its members on other pages; review them and deselect outliers before naming or ignoring. Right-click a face to remove it from automatic grouping or restore it. Grouping is a heuristic, not a confirmed identity; unembedded faces remain separate and large libraries can take time. +- **Maintenance for selected faces**: select faces or a group in Unknown or Suggested, then choose **Face Maintenance…**. Recognition, embedding rebuild and cache clearing apply to selected faces; detection and rescanning apply to the entire photos containing them, including other faces. Background indexing may recreate cleared embeddings. - **Which face a tile is about**: each face close-up outlines its own face, so a tile with two people in it shows which one you are naming. **Hover** a face (unnamed, Suggested, or on a person's page) to see the whole photo with that face marked and its similarity percentage when a comparison is available. - **Right-click an unnamed face** to select its whole look-alike group, then name or ignore the group at once; the menu can also ignore that face alone. Naming faces immediately lets recognition suggest that person for the remaining Unknown faces. - **Ignore** a face; the ignored list can be reviewed. diff --git a/docs/whats-new/2026-11-29-unknown-face-groups.md b/docs/whats-new/2026-11-29-unknown-face-groups.md new file mode 100644 index 0000000000..bb2f825767 --- /dev/null +++ b/docs/whats-new/2026-11-29-unknown-face-groups.md @@ -0,0 +1,3 @@ +### Group unknown faces +- People ▸ Unknown groups similar faces across the current library filter, with Loose, Balanced and Strict similarity settings. Select a group across pages, review outliers, then name or ignore the faces together. +- Open Face Maintenance from selected People faces to recognize, rebuild or clear those faces; detection and rescanning work on their containing photos. From cb44682dbc21bf8e537bd20a69b4c6d988d8e12b Mon Sep 17 00:00:00 2001 From: 1234destiny1234 <180862339+1234destiny1234@users.noreply.github.com> Date: Tue, 1 Dec 2026 07:21:58 +0000 Subject: [PATCH 06/26] Issue #1732: add On This Day Memories Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> --- crates/catalog/src/query.rs | 21 ++++++ crates/catalog/src/tests.rs | 20 ++++++ crates/engine/src/cmd/library.rs | 62 +++++++++++++++- .../src/cmd/library/tests_source_history.rs | 37 +++++++++- crates/engine/src/cmd/query.rs | 1 + crates/engine/src/lib.rs | 17 ++++- crates/engine/src/library.rs | 8 +++ crates/engine/src/tests_library.rs | 14 ++++ crates/engine/src/view.rs | 6 ++ crates/engine/src/view_undo.rs | 4 ++ crates/ui-egui/locales/fork/cs.json | 4 +- crates/ui-egui/locales/fork/de.json | 4 +- crates/ui-egui/locales/fork/es.json | 4 +- crates/ui-egui/locales/fork/fi.json | 4 +- crates/ui-egui/locales/fork/fr.json | 4 +- crates/ui-egui/locales/fork/id.json | 4 +- crates/ui-egui/locales/fork/it.json | 4 +- crates/ui-egui/locales/fork/ja.json | 4 +- crates/ui-egui/locales/fork/ka.json | 4 +- crates/ui-egui/locales/fork/pl.json | 4 +- crates/ui-egui/locales/fork/pt-br.json | 4 +- crates/ui-egui/locales/fork/ru.json | 4 +- crates/ui-egui/locales/fork/sv.json | 4 +- crates/ui-egui/locales/fork/uk.json | 4 +- crates/ui-egui/locales/fork/vi.json | 4 +- crates/ui-egui/locales/fork/zh-hans.json | 4 +- crates/ui-egui/locales/fork/zh-hant.json | 4 +- crates/ui-egui/src/modern_library.rs | 72 +++++++++++++++++++ crates/ui-egui/src/modern_sources.rs | 1 + crates/ui-egui/src/panels/classic_left.rs | 1 + crates/ui-egui/src/tests_modern_library.rs | 14 ++++ .../2026-11-30-on-this-day-memories.md | 2 + .../src/content/docs/library/sources.mdx | 5 +- .../2026-11-30-on-this-day-memories.md | 2 + 34 files changed, 331 insertions(+), 24 deletions(-) create mode 100644 docs/changelog/unreleased/2026-11-30-on-this-day-memories.md create mode 100644 docs/whats-new/2026-11-30-on-this-day-memories.md diff --git a/crates/catalog/src/query.rs b/crates/catalog/src/query.rs index a1c624b637..0f0468e066 100644 --- a/crates/catalog/src/query.rs +++ b/crates/catalog/src/query.rs @@ -1,5 +1,6 @@ //! Filtering, search and sorting. +use chrono::Datelike; use serde::{Deserialize, Serialize}; use crate::{AlbumId, Catalog, ColorLabel, Flag, MediaKind, Photo, PhotoId}; @@ -107,6 +108,12 @@ pub struct Filter { /// `dateTo` as a prefix upper bound (`2026-04` includes all of April). pub date_from: Option, pub date_to: Option, + /// Capture month and day (`MM-DD`), independent of year. Used by the Memories source. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_month_day: Option, + /// Memories includes captures strictly before this calendar year. + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_before_year: Option, /// Import date prefix. pub imported: Option, /// Imported at or after this time (ISO; Recently Added). @@ -1226,6 +1233,20 @@ impl Filter { { return false; } + if let Some(day) = self.capture_month_day.as_deref() { + let Some(captured) = p.captured.as_deref().filter(|c| c.get(..10).is_some()) else { return false }; + // Parse the stored prefix directly: capture_start deliberately turns a year/month-only + // timestamp into the first day of its period, but that is not a known capture day. + // Malformed and non-ASCII metadata simply won't match. + let Some(date) = captured.get(..10).and_then(|s| chrono::NaiveDate::parse_from_str(s, "%Y-%m-%d").ok()) else { + return false; + }; + if date.format("%m-%d").to_string() != day + || self.capture_before_year.is_some_and(|year| date.year() >= year) + { + return false; + } + } if let Some(l) = &self.lens && !p.meta.lens.to_lowercase().contains(&l.to_lowercase()) { diff --git a/crates/catalog/src/tests.rs b/crates/catalog/src/tests.rs index f4cf362f4b..5c9749d9e0 100644 --- a/crates/catalog/src/tests.rs +++ b/crates/catalog/src/tests.rs @@ -48,6 +48,26 @@ mod filter_deserialize_tests { } } +#[test] +fn memories_match_the_calendar_day_only_in_past_years() { + let mut c = Catalog::new(); + let old = photo(&mut c, "old.jpg", "2021-11-30T08:00:00"); + let newer = photo(&mut c, "newer.mov", "2025-11-30T09:00:00"); + let this_year = photo(&mut c, "today.jpg", "2026-11-30T10:00:00"); + let other_day = photo(&mut c, "yesterday.jpg", "2025-11-29T10:00:00"); + let partial = photo(&mut c, "partial.jpg", "2025-11"); + let filter = Filter { + capture_month_day: Some("11-30".into()), + capture_before_year: Some(2026), + ..Default::default() + }; + let got = c.query(&filter, &Sort { ascending: true, ..Default::default() }); + assert_eq!(got, vec![old, newer]); + assert!(!got.contains(&this_year)); + assert!(!got.contains(&other_day)); + assert!(!got.contains(&partial), "a month-only date is not a calendar-day match"); +} + #[test] fn date_token_matches_time_part_case_insensitively() { let mut c = Catalog::new(); diff --git a/crates/engine/src/cmd/library.rs b/crates/engine/src/cmd/library.rs index 14563e8c8a..846c4119a5 100644 --- a/crates/engine/src/cmd/library.rs +++ b/crates/engine/src/cmd/library.rs @@ -814,6 +814,26 @@ fn next_seed(prev: u64, now: &str) -> u64 { (lcc_catalog::mix64(prev.wrapping_add(1)) ^ t) & (MAX_SEED - 1) } +/// A valid month/day for Memories. The leap year admits February 29 while rejecting impossible dates. +pub(crate) fn valid_memories_day(day: &str) -> bool { + let bytes = day.as_bytes(); + if bytes.len() != 5 || bytes.get(2) != Some(&b'-') || !bytes.iter().enumerate().all(|(i, b)| i == 2 || b.is_ascii_digit()) { + return false; + } + let Some(month) = day.get(..2).and_then(|part| part.parse::().ok()) else { return false }; + let Some(date) = day.get(3..).and_then(|part| part.parse::().ok()) else { return false }; + chrono::NaiveDate::from_ymd_opt(2000, month, date).is_some() +} + +pub(crate) fn today_month_day(s: &Session) -> String { + s.clock + .as_ref()() + .get(5..10) + .filter(|day| valid_memories_day(day)) + .unwrap_or("01-01") + .to_string() +} + /// `library.source`: show the source `p` names (the part of it that is not Go Back's bookkeeping). fn show_source(s: &mut Session, p: &Value) -> Result { let kind = str_param(p, "kind").unwrap_or("all"); @@ -823,6 +843,16 @@ fn show_source(s: &mut Session, p: &Value) -> Result { "recentlyAdded" => LibrarySource::RecentlyAdded, "recentlyDeleted" => LibrarySource::RecentlyDeleted, "picks" => LibrarySource::Picks, + "memories" => { + let day = match p.get("day") { + None | Some(Value::Null) => today_month_day(s), + Some(Value::String(day)) if valid_memories_day(day) => day.clone(), + Some(value) => return Err(bad("library.source", format!("`day` must be a valid MM-DD calendar date, not {value}"))), + }; + s.memories_day = day; + s.sort = Sort { key: SortKey::CaptureDate, ascending: false, group: GroupBy::Year, ..s.sort }; + LibrarySource::Memories + } "missing" => LibrarySource::Missing, "previousImport" => LibrarySource::PreviousImport, "quickCollection" => LibrarySource::QuickCollection, @@ -891,7 +921,7 @@ pub fn specs() -> Vec { "Show Source", [], None, - "{kind: all|recentlyAdded|previousImport|previousExport|quickCollection|album|recentlyDeleted|picks|missing|libraryFolder, id?: albumId, path?: a path from library.folders (for libraryFolder)}", + "{kind: all|recentlyAdded|previousImport|previousExport|quickCollection|album|recentlyDeleted|picks|memories|missing|libraryFolder, id?: albumId, day?: MM-DD (for memories), path?: a path from library.folders (for libraryFolder)}", always, |s, p| { let before = crate::view::SourceHistory::params_of(s); @@ -901,6 +931,25 @@ pub fn specs() -> Vec { Ok(r) } ), + cmd!( + "library.memories", + "Open On This Day Memories", + ["View"], + None, + "{day?: MM-DD}: show photos and videos captured on this calendar date in previous years, grouped by year; without a day, use today", + always, + |s, p| { + let before = crate::view::SourceHistory::params_of(s); + let mut request = json!({"kind": "memories"}); + if let Some(day) = p.get("day") { + request["day"] = day.clone(); + } + let result = show_source(s, &request)?; + let after = crate::view::SourceHistory::params_of(s); + s.source_history.chose(before, after); + Ok(result) + } + ), cmd!( "library.sourceBack", "Go Back", @@ -1016,12 +1065,21 @@ pub fn specs() -> Vec { "Filter", [], None, - "partial Filter: {text?, semantic?, rating?, ratingOp?: atLeast|exactly|atMost, flag?: pick|reject|none|null, label?, kind?, copy?: true (virtual copies only) | false (master photos only) | null, merged?: hdr|panorama|hdrPanorama|focusStack|any, immich?: linked|notLinked|probable, vignettingReference?: reference|none (Vignetting Calibration references in use; a withdrawn one counts as none), quality?: accepted|pending|rejected|unscanned (the Image Quality Scanner's verdict; unscanned: no scan has scored the photo), qualityMin?: 0..100 (the score's floor), qualityMax?: 0..100 (its ceiling; a photo no scan scored matches neither), edited?, date?, libraryFolder?: a path from library.folders, keyword?, person?, camera?, lens?, keywords?/people?/cameras?/lenses?: [any of these values], keywordOp?/personOp?/lensOp?: any|all (how each list combines: any = OR, all = AND), labels?: [any of these labels], labelsNone?: true (photos with no colour label), faces?: count|min+|range}", + "partial Filter: {text?, semantic?, rating?, ratingOp?: atLeast|exactly|atMost, flag?: pick|reject|none|null, label?, kind?, copy?: true (virtual copies only) | false (master photos only) | null, merged?: hdr|panorama|hdrPanorama|focusStack|any, immich?: linked|notLinked|probable, vignettingReference?: reference|none (Vignetting Calibration references in use; a withdrawn one counts as none), quality?: accepted|pending|rejected|unscanned (the Image Quality Scanner's verdict; unscanned: no scan has scored the photo), qualityMin?: 0..100 (the score's floor), qualityMax?: 0..100 (its ceiling; a photo no scan scored matches neither), edited?, date?, captureMonthDay?: MM-DD, captureBeforeYear?: year (Memories filter), libraryFolder?: a path from library.folders, keyword?, person?, camera?, lens?, keywords?/people?/cameras?/lenses?: [any of these values], keywordOp?/personOp?/lensOp?: any|all (how each list combines: any = OR, all = AND), labels?: [any of these labels], labelsNone?: true (photos with no colour label), faces?: count|min+|range}", always, |s, p| { let mut v = serde_json::to_value(&s.filter).unwrap_or_default(); lcc_develop::presets::deep_merge(&mut v, p); let f: Filter = serde_json::from_value(v).map_err(|e| bad("library.filter", e.to_string()))?; + if f.capture_month_day.as_deref().is_some_and(|day| !valid_memories_day(day)) { + return Err(bad("library.filter", "captureMonthDay must be a valid MM-DD date")); + } + if f.capture_before_year.is_some_and(|year| !(1..=9999).contains(&year)) { + return Err(bad("library.filter", "captureBeforeYear must be a year from 1 to 9999")); + } + if f.capture_before_year.is_some() && f.capture_month_day.is_none() { + return Err(bad("library.filter", "captureBeforeYear needs captureMonthDay")); + } let mut f = f; f.semantic = f.semantic.map(|q| q.trim().to_string()).filter(|q| !q.is_empty()); // a blank folder is no folder: no hidden "filters active" state diff --git a/crates/engine/src/cmd/library/tests_source_history.rs b/crates/engine/src/cmd/library/tests_source_history.rs index 38d5f3b5db..9d99990536 100644 --- a/crates/engine/src/cmd/library/tests_source_history.rs +++ b/crates/engine/src/cmd/library/tests_source_history.rs @@ -1,5 +1,5 @@ //! Go Back / Go Forward through the sources `library.source` showed. -use lcc_catalog::{AlbumId, Op, Photo, PhotoId, Source}; +use lcc_catalog::{AlbumId, MediaKind, Op, Photo, PhotoId, Source}; use serde_json::json; use crate::{LibrarySource, Session}; @@ -23,6 +23,41 @@ fn show_album(s: &mut Session, id: u64) { s.execute("library.source", &json!({"kind": "album", "id": id})).unwrap(); } +#[test] +fn memories_filter_previous_years_and_restore_the_chosen_day() { + let mut s = Session::new(); + for (id, date) in [(1, "2023-11-30T12:00:00"), (2, "2025-11-30T12:00:00"), (3, "2026-11-30T12:00:00"), (4, "2025-11-29T12:00:00")] { + let mut p = Photo::new(PhotoId(id), Source::File { path: format!("/memories/{id}.jpg") }, "photo.jpg", "JPEG", 40, 30, "2026-11-30"); + p.captured = Some(date.to_string()); + if id == 2 { + p.kind = MediaKind::Video; + } + s.catalog.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap(); + } + s.execute("library.memories", &json!({"day": "11-30"})).unwrap(); + assert_eq!(s.source, LibrarySource::Memories); + assert_eq!(s.memories_day, "11-30"); + assert_eq!(s.visible(), &[PhotoId(2), PhotoId(1)]); + assert_eq!(s.sort.group, lcc_catalog::GroupBy::Year); + assert!(s.execute("library.memories", &json!({"day": "02-30"})).is_err()); + assert_eq!(s.memories_day, "11-30", "invalid dates must not change the source"); + s.execute("library.memories", &json!({"day": "11-29"})).unwrap(); + s.execute("library.sourceBack", &json!({})).unwrap(); + assert_eq!(s.source, LibrarySource::Memories); + assert_eq!(s.memories_day, "11-30", "Go Back restores the month/day too"); +} + +#[test] +fn undo_and_redo_restore_the_memories_date() { + let mut s = Session::new(); + s.execute("library.memories", &json!({"day": "11-30"})).unwrap(); + s.execute("library.memories", &json!({"day": "11-29"})).unwrap(); + s.execute("edit.undo", &json!({})).unwrap(); + assert_eq!(s.memories_day(), "11-30"); + s.execute("edit.redo", &json!({})).unwrap(); + assert_eq!(s.memories_day(), "11-29"); +} + #[test] fn back_and_forward_walk_the_source_history() { // back and forward walk the sources and are off at the ends diff --git a/crates/engine/src/cmd/query.rs b/crates/engine/src/cmd/query.rs index 19bc09c5b1..1959f4eb9c 100644 --- a/crates/engine/src/cmd/query.rs +++ b/crates/engine/src/cmd/query.rs @@ -150,6 +150,7 @@ pub fn specs() -> Vec { "source": s.source, "libraryFolder": s.library_folder.as_ref().filter(|_| s.source == LibrarySource::LibraryFolder), "sourceLabel": label, + "memoriesDay": (s.source == LibrarySource::Memories).then(|| s.memories_day().to_string()), "filter": s.filter, "sort": s.sort, "selection": s.selection, diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rs index 2bf0e60e2e..19fa882df0 100644 --- a/crates/engine/src/lib.rs +++ b/crates/engine/src/lib.rs @@ -380,6 +380,8 @@ pub struct Session { pub auto_applied: std::collections::HashMap, pub catalog: Catalog, pub source: LibrarySource, + /// The month/day shown by Memories, as `MM-DD`; choosing a Memories source updates this. + pub(crate) memories_day: String, /// The sources `library.source` showed, for Go Back / Go Forward (`library.sourceBack`); not saved. pub(crate) source_history: view::SourceHistory, pub filter: Filter, @@ -903,6 +905,7 @@ impl Session { auto_applied: Default::default(), catalog: Catalog::new(), source: LibrarySource::All, + memories_day: "09-30".to_string(), source_history: Default::default(), filter: Filter::default(), shelved_filter: None, @@ -2334,7 +2337,7 @@ impl Session { self.reconcile_view(); let mut key = ( self.catalog.revision, - format!("{:?}|{:?}|{:?}|{:?}|{:?}|{}", self.source, self.filter, self.sort, self.browse, self.library_folder, self.folder_subfolders), + format!("{:?}|{:?}|{:?}|{:?}|{:?}|{}|{}", self.source, self.filter, self.sort, self.browse, self.library_folder, self.folder_subfolders, self.memories_day), ); // What a held view is told apart by: what is shown and how, and for a smart album its rules (rules that were // changed ask something else). Not the checks of Missing Photos below: they fill the view in, they are @@ -2391,7 +2394,7 @@ impl Session { let whole = own_order || self.filter.semantic.is_some() || matches!(self.source, LibrarySource::RecentlyAdded | LibrarySource::Missing); // A view that asks about "the last N days" (itself, or through a smart album it looks into) changes // with the clock as well as with edits: a photo nobody touched can stop matching. It is asked whole. - let clocked = filter_depends_on_clock(&f, &self.catalog); + let clocked = self.source == LibrarySource::Memories || filter_depends_on_clock(&f, &self.catalog); let base = self.base.take().filter(|(of, _, _)| *of == view); // A small edit to the same view: the photos it touched are taken out, asked about again, and put back // at their place in the order. The others neither stopped matching nor moved. @@ -2553,6 +2556,11 @@ impl Session { pub(crate) fn view_filter(&self, source: LibrarySource, base: &Filter) -> Filter { let mut f = source.to_filter(base, &self.catalog); + if source == LibrarySource::Memories { + f.capture_month_day = Some(self.memories_day.clone()); + let year = (self.clock)().get(..4).and_then(|year| year.parse::().ok()).unwrap_or(i32::MIN); + f.capture_before_year = Some(year); + } if source == LibrarySource::Folder { // no folder chosen: nothing (an empty path matches nothing) let b = self.browse.clone().unwrap_or_default(); @@ -2730,6 +2738,11 @@ impl Session { /// (issue #1447: a Local folder kept a library photo active, so Detail and the info showed a /// photo the grid didn't). /// Names the shown source for [`Session::source_filters`] (a folder or collection by its id/path). + /// The selected month/day (`MM-DD`) of the Memories source. + pub fn memories_day(&self) -> &str { + &self.memories_day + } + pub(crate) fn source_key(&self) -> String { match self.source { LibrarySource::LibraryFolder => format!("folder:{}", lcc_catalog::query::folder_key(self.library_folder.as_deref().unwrap_or_default())), diff --git a/crates/engine/src/library.rs b/crates/engine/src/library.rs index 89c49e7ba9..65b4a54a8c 100644 --- a/crates/engine/src/library.rs +++ b/crates/engine/src/library.rs @@ -334,6 +334,8 @@ pub(crate) fn presets_serialized() -> usize { #[serde(default)] struct ViewFile { source: LibrarySource, + #[serde(skip_serializing_if = "String::is_empty")] + memories_day: String, browse: Option, /// The folder a `libraryFolder` source shows. library_folder: Option, @@ -997,6 +999,11 @@ impl Session { // view state if let Some(v) = settings.read::(files.as_mut(), "view.json") { self.source = v.source; + self.memories_day = if crate::cmd::library::valid_memories_day(&v.memories_day) { + v.memories_day + } else { + crate::cmd::library::today_month_day(self) + }; self.browse = v.browse; self.library_folder = v.library_folder.filter(|f| !f.trim().is_empty()); self.folder_subfolders = !v.folder_direct; @@ -1402,6 +1409,7 @@ impl Session { fn view_json(&self) -> Vec { let view = ViewFile { source: self.source, + memories_day: self.memories_day.clone(), browse: self.browse.clone(), // only while it is shown: a leftover would be a stale choice nobody made library_folder: self.library_folder.clone().filter(|_| self.source == LibrarySource::LibraryFolder), diff --git a/crates/engine/src/tests_library.rs b/crates/engine/src/tests_library.rs index ef2881f24e..7968fb8704 100644 --- a/crates/engine/src/tests_library.rs +++ b/crates/engine/src/tests_library.rs @@ -252,6 +252,20 @@ fn preset_at_import_and_hidden_marks_survive_reopen() { let _ = std::fs::remove_dir_all(&dir); } +#[test] +fn the_memories_source_keeps_its_calendar_day_across_reopen() { + let dir = temp_dir("memories-day"); + let mut s = open(&dir, true); + s.execute("library.memories", &json!({"day": "02-29"})).unwrap(); + s.close_library().unwrap(); + drop(s); + let mut s = open(&dir, false); + assert_eq!(s.source, crate::LibrarySource::Memories); + assert_eq!(s.memories_day(), "02-29"); + s.close_library().unwrap(); + let _ = std::fs::remove_dir_all(&dir); +} + #[test] fn the_shown_library_folder_survives_reopen() { let dir = temp_dir("libfolder"); diff --git a/crates/engine/src/view.rs b/crates/engine/src/view.rs index 29186ad1b7..e500bba9f8 100644 --- a/crates/engine/src/view.rs +++ b/crates/engine/src/view.rs @@ -15,6 +15,8 @@ pub enum LibrarySource { RecentlyDeleted, /// Photos with picks. Picks, + /// Photos captured on the selected month/day in earlier years (`Session::memories_day`). + Memories, /// A folder on disk ([`crate::Session::browse`]): its files, added to the library or not. Folder, /// Photos whose original file can't be found (`library.missing`). @@ -52,6 +54,7 @@ impl SourceHistory { LibrarySource::RecentlyAdded => Some(json!({"kind": "recentlyAdded"})), LibrarySource::RecentlyDeleted => Some(json!({"kind": "recentlyDeleted"})), LibrarySource::Picks => Some(json!({"kind": "picks"})), + LibrarySource::Memories => Some(json!({"kind": "memories", "day": &s.memories_day})), LibrarySource::Missing => Some(json!({"kind": "missing"})), LibrarySource::PreviousImport => Some(json!({"kind": "previousImport"})), LibrarySource::QuickCollection => Some(json!({"kind": "quickCollection"})), @@ -163,6 +166,8 @@ impl LibrarySource { LibrarySource::QuickCollection => f.album = Some(cat.quick_collection().unwrap_or(AlbumId(u64::MAX))), LibrarySource::RecentlyDeleted => f.deleted = true, LibrarySource::Picks => f.flag = Some(lcc_catalog::Flag::Pick), + // the date and cutoff year are filled in by Session::view_filter + LibrarySource::Memories => f.in_library = Some(true), // the folder itself is filled in by the session (it holds the path) LibrarySource::Folder | LibrarySource::Missing | LibrarySource::LibraryFolder | LibrarySource::PreviousExport => {} } @@ -176,6 +181,7 @@ impl LibrarySource { LibrarySource::Album(a) => cat.album(*a).map(|a| a.name.clone()).unwrap_or_else(|| "Collection".into()), LibrarySource::RecentlyDeleted => "Recently Deleted".into(), LibrarySource::Picks => "Picks".into(), + LibrarySource::Memories => "On This Day".into(), LibrarySource::Folder => "Folder".into(), LibrarySource::LibraryFolder => "Folder".into(), LibrarySource::Missing => "Missing Photos".into(), diff --git a/crates/engine/src/view_undo.rs b/crates/engine/src/view_undo.rs index adf05f2e25..2195e8c3a7 100644 --- a/crates/engine/src/view_undo.rs +++ b/crates/engine/src/view_undo.rs @@ -17,6 +17,8 @@ use crate::{Session, UndoEntry}; #[derive(Clone, Debug, PartialEq)] pub struct ViewState { pub source: LibrarySource, + /// The selected date when the source is Memories; part of the view and Undo state. + pub memories_day: String, pub browse: Option, pub library_folder: Option, pub folder_subfolders: bool, @@ -94,6 +96,7 @@ impl Session { pub fn view_state(&self) -> ViewState { ViewState { source: self.source, + memories_day: self.memories_day.clone(), browse: self.browse.clone(), library_folder: self.library_folder.clone(), folder_subfolders: self.folder_subfolders, @@ -108,6 +111,7 @@ impl Session { pub(crate) fn apply_view_state(&mut self, v: &ViewState) { let active = self.selection.active; self.source = v.source; + self.memories_day = v.memories_day.clone(); self.browse = v.browse.clone(); self.library_folder = v.library_folder.clone(); self.folder_subfolders = v.folder_subfolders; diff --git a/crates/ui-egui/locales/fork/cs.json b/crates/ui-egui/locales/fork/cs.json index 2e45a5b2b0..ffa015155c 100644 --- a/crates/ui-egui/locales/fork/cs.json +++ b/crates/ui-egui/locales/fork/cs.json @@ -3930,5 +3930,7 @@ "‹ Library": "‹ Knihovna", "↑ Apply This and All Above": "↑ Použít na tuto a všechny výše", "↑ This device has changes still to send": "↑ Toto zařízení má ještě změny k odeslání", - "↓ Another device has changes still to fetch": "↓ Jiné zařízení má ještě změny ke stažení" + "↓ Another device has changes still to fetch": "↓ Jiné zařízení má ještě změny ke stažení", + "On This Day": "V tento den", + "Open On This Day Memories": "Otevřít vzpomínky z tohoto dne" } diff --git a/crates/ui-egui/locales/fork/de.json b/crates/ui-egui/locales/fork/de.json index 7c16f84455..73f25598c1 100644 --- a/crates/ui-egui/locales/fork/de.json +++ b/crates/ui-egui/locales/fork/de.json @@ -3819,5 +3819,7 @@ "‹ Library": "‹ Bibliothek", "↑ Apply This and All Above": "↑ Diese und alle darüber anwenden", "↑ This device has changes still to send": "↑ Dieses Gerät hat noch Änderungen zu senden", - "↓ Another device has changes still to fetch": "↓ Ein anderes Gerät hat noch Änderungen zum Abrufen" + "↓ Another device has changes still to fetch": "↓ Ein anderes Gerät hat noch Änderungen zum Abrufen", + "On This Day": "An diesem Tag", + "Open On This Day Memories": "Erinnerungen von diesem Tag öffnen" } diff --git a/crates/ui-egui/locales/fork/es.json b/crates/ui-egui/locales/fork/es.json index 76d7e2bd89..0967754406 100644 --- a/crates/ui-egui/locales/fork/es.json +++ b/crates/ui-egui/locales/fork/es.json @@ -4178,5 +4178,7 @@ "↑ This device has changes still to send": "↑ Este dispositivo aún tiene cambios por enviar", "↓ Another device has changes still to fetch": "↓ Otro dispositivo aún tiene cambios por obtener", "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘-arrastrar para enderezar, ⇧G Upright guiado, una cuadrícula al transformar.", - "★ Favorites": "★ Favoritos" + "★ Favorites": "★ Favoritos", + "On This Day": "Un día como hoy", + "Open On This Day Memories": "Abrir recuerdos de este día" } diff --git a/crates/ui-egui/locales/fork/fi.json b/crates/ui-egui/locales/fork/fi.json index db3f3af5a6..49510776e0 100644 --- a/crates/ui-egui/locales/fork/fi.json +++ b/crates/ui-egui/locales/fork/fi.json @@ -4170,5 +4170,7 @@ "↑ This device has changes still to send": "↑ Tällä laitteella on vielä lähetettäviä muutoksia", "↓ Another device has changes still to fetch": "↓ Toisella laitteella on vielä haettavia muutoksia", "日本語": "日本語", - "繁體中文(台灣)": "繁體中文(台灣)" + "繁體中文(台灣)": "繁體中文(台灣)", + "On This Day": "Tänä päivänä", + "Open On This Day Memories": "Avaa tämän päivän muistot" } diff --git a/crates/ui-egui/locales/fork/fr.json b/crates/ui-egui/locales/fork/fr.json index acd7fd0cfb..152f271228 100644 --- a/crates/ui-egui/locales/fork/fr.json +++ b/crates/ui-egui/locales/fork/fr.json @@ -3818,5 +3818,7 @@ "↑ Apply This and All Above": "↑ Appliquer à celui-ci et à tous ceux au-dessus", "↑ This device has changes still to send": "↑ Cet appareil a encore des modifications à envoyer", "↓ Another device has changes still to fetch": "↓ Un autre appareil a encore des modifications à récupérer", - "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘-glisser pour redresser, ⇧G Upright guidé, une grille pendant la transformation." + "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘-glisser pour redresser, ⇧G Upright guidé, une grille pendant la transformation.", + "On This Day": "Un jour comme aujourd’hui", + "Open On This Day Memories": "Ouvrir les souvenirs de ce jour" } diff --git a/crates/ui-egui/locales/fork/id.json b/crates/ui-egui/locales/fork/id.json index 655d4efd13..3f28870cec 100644 --- a/crates/ui-egui/locales/fork/id.json +++ b/crates/ui-egui/locales/fork/id.json @@ -4163,5 +4163,7 @@ "↑ Apply This and All Above": "↑ Terapkan ke ini dan semua di atasnya", "↑ This device has changes still to send": "↑ Perangkat ini masih punya perubahan untuk dikirim", "↓ Another device has changes still to fetch": "↓ Perangkat lain masih punya perubahan untuk diambil", - "★ Favorites": "★ Favorit" + "★ Favorites": "★ Favorit", + "On This Day": "Pada hari ini", + "Open On This Day Memories": "Buka Kenangan Hari Ini" } diff --git a/crates/ui-egui/locales/fork/it.json b/crates/ui-egui/locales/fork/it.json index 0d6a6e7d10..9afb205372 100644 --- a/crates/ui-egui/locales/fork/it.json +++ b/crates/ui-egui/locales/fork/it.json @@ -3937,5 +3937,7 @@ "↑ Apply This and All Above": "↑ Applica a questo e a tutti quelli sopra", "↑ This device has changes still to send": "↑ Questo dispositivo ha ancora modifiche da inviare", "↓ Another device has changes still to fetch": "↓ Un altro dispositivo ha ancora modifiche da scaricare", - "★ Favorites": "★ Preferiti" + "★ Favorites": "★ Preferiti", + "On This Day": "In questo giorno", + "Open On This Day Memories": "Apri i ricordi di oggi" } diff --git a/crates/ui-egui/locales/fork/ja.json b/crates/ui-egui/locales/fork/ja.json index ea4280bac7..bf5d5ba9b8 100644 --- a/crates/ui-egui/locales/fork/ja.json +++ b/crates/ui-egui/locales/fork/ja.json @@ -4177,5 +4177,7 @@ "↑ This device has changes still to send": "↑ このデバイスにはまだ送信する変更があります", "↓ Another device has changes still to fetch": "↓ 別のデバイスにまだ取得する変更があります", "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘-ドラッグで水平補正、⇧G でガイド付き Upright、変形中はグリッドを表示。", - "★ Favorites": "★ お気に入り" + "★ Favorites": "★ お気に入り", + "On This Day": "この日", + "Open On This Day Memories": "この日の思い出を開く" } diff --git a/crates/ui-egui/locales/fork/ka.json b/crates/ui-egui/locales/fork/ka.json index 50faf8a3d5..efed2e43a8 100644 --- a/crates/ui-egui/locales/fork/ka.json +++ b/crates/ui-egui/locales/fork/ka.json @@ -4369,5 +4369,7 @@ "↑ Apply This and All Above": "↑ ამაზე და ზემოთ ყველაზე გამოყენება", "↑ This device has changes still to send": "↑ ამ მოწყობილობას ჯერ კიდევ აქვს გასაგზავნი ცვლილებები", "↓ Another device has changes still to fetch": "↓ სხვა მოწყობილობას ჯერ კიდევ აქვს ჩამოსატვირთი ცვლილებები", - "★ Favorites": "★ რჩეულები" + "★ Favorites": "★ რჩეულები", + "On This Day": "ამ დღეს", + "Open On This Day Memories": "ამ დღის მოგონებების გახსნა" } diff --git a/crates/ui-egui/locales/fork/pl.json b/crates/ui-egui/locales/fork/pl.json index ab1db9eb75..4ebc2070b5 100644 --- a/crates/ui-egui/locales/fork/pl.json +++ b/crates/ui-egui/locales/fork/pl.json @@ -4207,5 +4207,7 @@ "↑ Apply This and All Above": "↑ Zastosuj do tej i wszystkich powyżej", "↑ This device has changes still to send": "↑ To urządzenie ma jeszcze zmiany do wysłania", "↓ Another device has changes still to fetch": "↓ Inne urządzenie ma jeszcze zmiany do pobrania", - "★ Favorites": "★ Ulubione" + "★ Favorites": "★ Ulubione", + "On This Day": "Tego dnia", + "Open On This Day Memories": "Otwórz wspomnienia z tego dnia" } diff --git a/crates/ui-egui/locales/fork/pt-br.json b/crates/ui-egui/locales/fork/pt-br.json index ddb1acf269..9a93029db8 100644 --- a/crates/ui-egui/locales/fork/pt-br.json +++ b/crates/ui-egui/locales/fork/pt-br.json @@ -4177,5 +4177,7 @@ "↑ This device has changes still to send": "↑ Este dispositivo ainda tem alterações a enviar", "↓ Another device has changes still to fetch": "↓ Outro dispositivo ainda tem alterações a buscar", "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘-arrastar para endireitar, ⇧G Upright guiado, uma grade ao transformar.", - "★ Favorites": "★ Favoritos" + "★ Favorites": "★ Favoritos", + "On This Day": "Neste dia", + "Open On This Day Memories": "Abrir lembranças deste dia" } diff --git a/crates/ui-egui/locales/fork/ru.json b/crates/ui-egui/locales/fork/ru.json index 2524491017..020d1a1b12 100644 --- a/crates/ui-egui/locales/fork/ru.json +++ b/crates/ui-egui/locales/fork/ru.json @@ -4184,5 +4184,7 @@ "≥ at least": "≥ не менее", "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘-перетаскивание для выравнивания, ⇧G Upright по направляющим, сетка во время трансформации.", "日本語": "日本語", - "繁體中文(台灣)": "繁體中文(台灣)" + "繁體中文(台灣)": "繁體中文(台灣)", + "On This Day": "В этот день", + "Open On This Day Memories": "Открыть воспоминания за этот день" } diff --git a/crates/ui-egui/locales/fork/sv.json b/crates/ui-egui/locales/fork/sv.json index df7786651b..f511581ee2 100644 --- a/crates/ui-egui/locales/fork/sv.json +++ b/crates/ui-egui/locales/fork/sv.json @@ -4231,5 +4231,7 @@ "‹ Library": "‹ Bibliotek", "↑ Apply This and All Above": "↑ Tillämpa på den här och alla ovanför", "↑ This device has changes still to send": "↑ Den här enheten har ändringar kvar att skicka", - "↓ Another device has changes still to fetch": "↓ En annan enhet har ändringar kvar att hämta" + "↓ Another device has changes still to fetch": "↓ En annan enhet har ändringar kvar att hämta", + "On This Day": "Den här dagen", + "Open On This Day Memories": "Öppna minnen från den här dagen" } diff --git a/crates/ui-egui/locales/fork/uk.json b/crates/ui-egui/locales/fork/uk.json index 2654c39490..fbf59d2099 100644 --- a/crates/ui-egui/locales/fork/uk.json +++ b/crates/ui-egui/locales/fork/uk.json @@ -3929,5 +3929,7 @@ "↑ Apply This and All Above": "↑ Застосувати до цієї та всіх вище", "↑ This device has changes still to send": "↑ Цей пристрій має ще не надіслані зміни", "↓ Another device has changes still to fetch": "↓ Інший пристрій має зміни для завантаження", - "★ Favorites": "★ Улюблені" + "★ Favorites": "★ Улюблені", + "On This Day": "Цього дня", + "Open On This Day Memories": "Відкрити спогади цього дня" } diff --git a/crates/ui-egui/locales/fork/vi.json b/crates/ui-egui/locales/fork/vi.json index 3e9823b52a..bba7e804af 100644 --- a/crates/ui-egui/locales/fork/vi.json +++ b/crates/ui-egui/locales/fork/vi.json @@ -4425,5 +4425,7 @@ "↑ Apply This and All Above": "↑ Áp dụng cho nhóm này và tất cả ở trên", "↑ This device has changes still to send": "↑ Thiết bị này còn thay đổi cần gửi", "↓ Another device has changes still to fetch": "↓ Một thiết bị khác còn thay đổi cần tải về", - "★ Favorites": "★ Yêu thích" + "★ Favorites": "★ Yêu thích", + "On This Day": "Vào ngày này", + "Open On This Day Memories": "Mở kỷ niệm ngày này" } diff --git a/crates/ui-egui/locales/fork/zh-hans.json b/crates/ui-egui/locales/fork/zh-hans.json index e86405ad5d..59298f3ac8 100644 --- a/crates/ui-egui/locales/fork/zh-hans.json +++ b/crates/ui-egui/locales/fork/zh-hans.json @@ -4100,5 +4100,7 @@ "↑ This device has changes still to send": "↑ 此设备仍有更改待发送", "↓ Another device has changes still to fetch": "↓ 另一台设备仍有更改待获取", "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘ 拖动以拉直,⇧G 引导式垂直,变换时显示网格。", - "★ Favorites": "★ 收藏" + "★ Favorites": "★ 收藏", + "On This Day": "历史上的今天", + "Open On This Day Memories": "打开今日回忆" } diff --git a/crates/ui-egui/locales/fork/zh-hant.json b/crates/ui-egui/locales/fork/zh-hant.json index c59496d141..fcb4a102ad 100644 --- a/crates/ui-egui/locales/fork/zh-hant.json +++ b/crates/ui-egui/locales/fork/zh-hant.json @@ -4178,5 +4178,7 @@ "↑ This device has changes still to send": "↑ 此裝置仍有變更待傳送", "↓ Another device has changes still to fetch": "↓ 另一台裝置仍有變更待取得", "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘ 拖動以拉直,⇧G 引導式垂直,變換時顯示格線。", - "★ Favorites": "★ 喜好項目" + "★ Favorites": "★ 喜好項目", + "On This Day": "歷史上的今天", + "Open On This Day Memories": "開啟今日回憶" } diff --git a/crates/ui-egui/src/modern_library.rs b/crates/ui-egui/src/modern_library.rs index 3c6dfac659..33221f60a5 100644 --- a/crates/ui-egui/src/modern_library.rs +++ b/crates/ui-egui/src/modern_library.rs @@ -28,6 +28,9 @@ const MARGIN: f32 = 12.0; pub(crate) fn show(app: &mut LccApp, ui: &egui::Ui, area: Rect) { // on a phone the Info card is a sheet along the bottom, where the search pill sits let sheet = phone(area); + if app.session.source == lcc_engine::LibrarySource::Memories { + memories_toolbar(app, ui, area); + } if !(sheet && app.ui.modern.info) { search(app, ui, area); } @@ -37,6 +40,75 @@ pub(crate) fn show(app: &mut LccApp, ui: &egui::Ui, area: Rect) { } } +/// The Memories source's day controls. Dates use the catalog's month/day key and the engine +/// validates it before changing the view; the input is deliberately a plain calendar date, not a +/// text search that can accidentally include the current year. +fn memories_toolbar(app: &mut LccApp, ui: &egui::Ui, area: Rect) { + let ctx = ui.ctx().clone(); + let current = app.session.memories_day().to_string(); + let day_id = Id::new("memories-day-edit"); + let source_id = Id::new("memories-day-source"); + let (mut day, previous_source) = ctx.data(|d| (d.get_temp::(day_id), d.get_temp::(source_id))); + if previous_source.as_deref() != Some(current.as_str()) { + day = Some(current.clone()); + ctx.data_mut(|d| d.insert_temp(source_id, current.clone())); + } + let mut day = day.unwrap_or(current); + let width = (area.width() - 24.0).clamp(260.0, 390.0); + let height = 42.0; + let at = pos2(area.center().x - width / 2.0, area.top() + 10.0); + egui::Area::new(Id::new("memories-toolbar")).fixed_pos(at).order(egui::Order::Foreground).show(&ctx, |ui| { + egui::Frame::popup(ui.style()).show(ui, |ui| { + ui.set_min_width(width); + ui.set_max_width(width); + ui.set_min_height(height); + ui.horizontal_centered(|ui| { + let previous = ui.button("‹"); + register(ui.ctx(), "button:memoriesPrevious", previous.rect); + if previous.clicked() { + step_memories_day(app, &ctx, -1); + } + let field = crate::text_field::TextField::singleline("memoriesDay", &mut day).width(76.0).show(ui); + register(ui.ctx(), "memories:date", field.response.rect); + if field.ending.is_some() { + app.session.end_typing(); + } + if field.committed() { + let result = app.run("library.memories", json!({"day": day})); + if result.is_err() { + day = app.session.memories_day().to_string(); + } + app.report(&ctx, result); + } + let next = ui.button("›"); + register(ui.ctx(), "button:memoriesNext", next.rect); + if next.clicked() { + step_memories_day(app, &ctx, 1); + } + let play = ui.button(crate::i18n::tr("Slideshow")); + register(ui.ctx(), "button:memoriesSlideshow", play.rect); + if play.clicked() { + let result = app.run("view.slideshow", json!({})); + app.report(&ctx, result); + } + }); + }); + }); + ctx.data_mut(|d| d.insert_temp(day_id, day)); +} + +fn step_memories_day(app: &mut LccApp, ctx: &egui::Context, delta: i64) { + let current = app.session.memories_day().to_string(); + let date = chrono::NaiveDate::parse_from_str(&format!("2000-{current}"), "%Y-%m-%d"); + let next = date.ok().and_then(|d| { + if delta < 0 { d.checked_sub_days(chrono::Days::new(1)) } else { d.checked_add_days(chrono::Days::new(1)) } + }); + if let Some(day) = next.map(|d| d.format("%m-%d").to_string()) { + let result = app.run("library.memories", json!({"day": day})); + app.report(ctx, result); + } +} + /// A phone-sized window (the Info card is a bottom sheet there). fn phone(area: Rect) -> bool { area.width() < 600.0 diff --git a/crates/ui-egui/src/modern_sources.rs b/crates/ui-egui/src/modern_sources.rs index 3cd7a8ca70..78e476d268 100644 --- a/crates/ui-egui/src/modern_sources.rs +++ b/crates/ui-egui/src/modern_sources.rs @@ -112,6 +112,7 @@ fn items(app: &LccApp) -> Vec { let fixed = [ ("all", LibrarySource::All, "All Photographs"), ("picks", LibrarySource::Picks, "Picks"), + ("memories", LibrarySource::Memories, "On This Day"), ("recentlyAdded", LibrarySource::RecentlyAdded, "Recently Added"), ("recentlyDeleted", LibrarySource::RecentlyDeleted, "Recently Deleted"), ]; diff --git a/crates/ui-egui/src/panels/classic_left.rs b/crates/ui-egui/src/panels/classic_left.rs index 5279b3a509..cea2c0fcfd 100644 --- a/crates/ui-egui/src/panels/classic_left.rs +++ b/crates/ui-egui/src/panels/classic_left.rs @@ -275,6 +275,7 @@ pub(super) fn catalog_section(app: &mut LccApp, ui: &mut egui::Ui, total: usize, ("previousImport", Icon::Clock, "Previous Import", None, LibrarySource::PreviousImport), ("recentlyAdded", Icon::Clock, "Recently Added", None, LibrarySource::RecentlyAdded), ("picks", Icon::FlagPick, "Picks", Some(picks), LibrarySource::Picks), + ("memories", Icon::Clock, "On This Day", None, LibrarySource::Memories), ] { if super::row(app, ui, id, icon, label, count, src == s, 0.0).clicked() { let _ = app.run("library.source", json!({"kind": id})); diff --git a/crates/ui-egui/src/tests_modern_library.rs b/crates/ui-egui/src/tests_modern_library.rs index c333f033b5..5d67804db8 100644 --- a/crates/ui-egui/src/tests_modern_library.rs +++ b/crates/ui-egui/src/tests_modern_library.rs @@ -79,6 +79,20 @@ fn the_info_card_writes_to_every_selected_photo_and_leaves_mixed_values_alone() assert_eq!(crate::menubar::checked(&h.app, "panel.info"), Some(true)); } +#[test] +fn memories_are_available_from_view_and_the_modern_date_controls_step_days() { + let mut h = library(); + let command = crate::menus::menu_entries(&h.app).into_iter().find(|entry| entry.id == "library.memories").expect("the View command"); + assert_eq!(command.menu, vec!["View".to_string()]); + assert_eq!(command.label, "Open On This Day Memories"); + + assert_eq!(exec(&mut h, "library.memories", json!({"day": "09-30"}))["ok"], true); + ask(&mut h, "ui.widgets", json!({})); + assert!(has(&h, "button:memoriesPrevious") && has(&h, "memories:date") && has(&h, "button:memoriesNext") && has(&h, "button:memoriesSlideshow")); + assert_eq!(ask(&mut h, "ui.clickWidget", json!({"id": "button:memoriesNext"}))["ok"], true); + assert_eq!(h.app.session.memories_day(), "10-01"); +} + #[test] fn the_search_pill_narrows_the_grid_and_takes_any_text() { let mut h = library(); diff --git a/docs/changelog/unreleased/2026-11-30-on-this-day-memories.md b/docs/changelog/unreleased/2026-11-30-on-this-day-memories.md new file mode 100644 index 0000000000..d526eca994 --- /dev/null +++ b/docs/changelog/unreleased/2026-11-30-on-this-day-memories.md @@ -0,0 +1,2 @@ +## Library +- Add an **On This Day** source for photos and videos from the same calendar date in earlier years, with year grouping, day navigation, and a slideshow action. diff --git a/docs/manual-site/src/content/docs/library/sources.mdx b/docs/manual-site/src/content/docs/library/sources.mdx index e53aac7871..bd0c85af85 100644 --- a/docs/manual-site/src/content/docs/library/sources.mdx +++ b/docs/manual-site/src/content/docs/library/sources.mdx @@ -13,7 +13,8 @@ import Shot from '../../../components/Shot.astro'; -- **Catalog**: **All Photographs**, **Quick Collection**, **Previous Import**, **Recently Added**, **Picks**, **Recently Deleted**; **Missing** and **Previous Export** appear when they apply. Counts show beside each. +- **Catalog**: **All Photographs**, **Quick Collection**, **Previous Import**, **Recently Added**, **Picks**, **On This Day**, **Recently Deleted**; **Missing** and **Previous Export** appear when they apply. Counts show beside each. +- **On This Day**: photos and videos captured on today's month/day in earlier years, grouped by year. In the Modern grid, step to the previous or next calendar day, enter any `MM-DD` (including `02-29`), and play the visible memories as a slideshow. The **View ▸ Open On This Day Memories** command opens today's memories. Capture dates come from the catalog; items without a known capture date are not included. - **By Date**: year, month, day tree from capture time. - **Folders**: the folders your photos were imported from, with counts including subfolders. Each disk is a row of its own. - Right-click: **Rename Folder…**, **Move Folder To…** (on disk; photos relinked; undoable), **Create Folder**, **Show in File Manager**, **Synchronize**, **Remove**, a colour **Label**. @@ -29,5 +30,5 @@ import Shot from '../../../components/Shot.astro'; - Drag the left-panel sections to reorder; show or hide them with **View ▸ Show Sidebar Section**. diff --git a/docs/whats-new/2026-11-30-on-this-day-memories.md b/docs/whats-new/2026-11-30-on-this-day-memories.md new file mode 100644 index 0000000000..7b9686137e --- /dev/null +++ b/docs/whats-new/2026-11-30-on-this-day-memories.md @@ -0,0 +1,2 @@ +### Rediscover your photos on this day +- **On This Day** in the Library gathers photos and videos captured on the same month and day in earlier years, grouped by year. Open it from the Library source list or **View ▸ Open On This Day Memories**. In the Modern grid, step between dates, enter any `MM-DD`, or start a slideshow of the memories. Photos without a known capture date are left out. From 4fbf3b6f0974e2a24538756e841d126f6ea7c14b Mon Sep 17 00:00:00 2001 From: 1234destiny1234 <180862339+1234destiny1234@users.noreply.github.com> Date: Tue, 1 Dec 2026 07:30:49 +0000 Subject: [PATCH 07/26] Fix Rust formatting for Memories changes Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> --- crates/catalog/src/query.rs | 4 +--- crates/catalog/src/tests.rs | 6 +----- crates/engine/src/cmd/library.rs | 7 +------ crates/engine/src/lib.rs | 5 ++++- crates/engine/src/library.rs | 7 ++----- crates/ui-egui/src/modern_library.rs | 4 +--- 6 files changed, 10 insertions(+), 23 deletions(-) diff --git a/crates/catalog/src/query.rs b/crates/catalog/src/query.rs index 0f0468e066..a1fe63a60a 100644 --- a/crates/catalog/src/query.rs +++ b/crates/catalog/src/query.rs @@ -1241,9 +1241,7 @@ impl Filter { let Some(date) = captured.get(..10).and_then(|s| chrono::NaiveDate::parse_from_str(s, "%Y-%m-%d").ok()) else { return false; }; - if date.format("%m-%d").to_string() != day - || self.capture_before_year.is_some_and(|year| date.year() >= year) - { + if date.format("%m-%d").to_string() != day || self.capture_before_year.is_some_and(|year| date.year() >= year) { return false; } } diff --git a/crates/catalog/src/tests.rs b/crates/catalog/src/tests.rs index 5c9749d9e0..ebf09c3b44 100644 --- a/crates/catalog/src/tests.rs +++ b/crates/catalog/src/tests.rs @@ -56,11 +56,7 @@ fn memories_match_the_calendar_day_only_in_past_years() { let this_year = photo(&mut c, "today.jpg", "2026-11-30T10:00:00"); let other_day = photo(&mut c, "yesterday.jpg", "2025-11-29T10:00:00"); let partial = photo(&mut c, "partial.jpg", "2025-11"); - let filter = Filter { - capture_month_day: Some("11-30".into()), - capture_before_year: Some(2026), - ..Default::default() - }; + let filter = Filter { capture_month_day: Some("11-30".into()), capture_before_year: Some(2026), ..Default::default() }; let got = c.query(&filter, &Sort { ascending: true, ..Default::default() }); assert_eq!(got, vec![old, newer]); assert!(!got.contains(&this_year)); diff --git a/crates/engine/src/cmd/library.rs b/crates/engine/src/cmd/library.rs index 846c4119a5..104a172da2 100644 --- a/crates/engine/src/cmd/library.rs +++ b/crates/engine/src/cmd/library.rs @@ -826,12 +826,7 @@ pub(crate) fn valid_memories_day(day: &str) -> bool { } pub(crate) fn today_month_day(s: &Session) -> String { - s.clock - .as_ref()() - .get(5..10) - .filter(|day| valid_memories_day(day)) - .unwrap_or("01-01") - .to_string() + s.clock.as_ref()().get(5..10).filter(|day| valid_memories_day(day)).unwrap_or("01-01").to_string() } /// `library.source`: show the source `p` names (the part of it that is not Go Back's bookkeeping). diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rs index 19fa882df0..64ddd4ba56 100644 --- a/crates/engine/src/lib.rs +++ b/crates/engine/src/lib.rs @@ -2337,7 +2337,10 @@ impl Session { self.reconcile_view(); let mut key = ( self.catalog.revision, - format!("{:?}|{:?}|{:?}|{:?}|{:?}|{}|{}", self.source, self.filter, self.sort, self.browse, self.library_folder, self.folder_subfolders, self.memories_day), + format!( + "{:?}|{:?}|{:?}|{:?}|{:?}|{}|{}", + self.source, self.filter, self.sort, self.browse, self.library_folder, self.folder_subfolders, self.memories_day + ), ); // What a held view is told apart by: what is shown and how, and for a smart album its rules (rules that were // changed ask something else). Not the checks of Missing Photos below: they fill the view in, they are diff --git a/crates/engine/src/library.rs b/crates/engine/src/library.rs index 65b4a54a8c..d4c93986ba 100644 --- a/crates/engine/src/library.rs +++ b/crates/engine/src/library.rs @@ -999,11 +999,8 @@ impl Session { // view state if let Some(v) = settings.read::(files.as_mut(), "view.json") { self.source = v.source; - self.memories_day = if crate::cmd::library::valid_memories_day(&v.memories_day) { - v.memories_day - } else { - crate::cmd::library::today_month_day(self) - }; + self.memories_day = + if crate::cmd::library::valid_memories_day(&v.memories_day) { v.memories_day } else { crate::cmd::library::today_month_day(self) }; self.browse = v.browse; self.library_folder = v.library_folder.filter(|f| !f.trim().is_empty()); self.folder_subfolders = !v.folder_direct; diff --git a/crates/ui-egui/src/modern_library.rs b/crates/ui-egui/src/modern_library.rs index 33221f60a5..933ed613f9 100644 --- a/crates/ui-egui/src/modern_library.rs +++ b/crates/ui-egui/src/modern_library.rs @@ -100,9 +100,7 @@ fn memories_toolbar(app: &mut LccApp, ui: &egui::Ui, area: Rect) { fn step_memories_day(app: &mut LccApp, ctx: &egui::Context, delta: i64) { let current = app.session.memories_day().to_string(); let date = chrono::NaiveDate::parse_from_str(&format!("2000-{current}"), "%Y-%m-%d"); - let next = date.ok().and_then(|d| { - if delta < 0 { d.checked_sub_days(chrono::Days::new(1)) } else { d.checked_add_days(chrono::Days::new(1)) } - }); + let next = date.ok().and_then(|d| if delta < 0 { d.checked_sub_days(chrono::Days::new(1)) } else { d.checked_add_days(chrono::Days::new(1)) }); if let Some(day) = next.map(|d| d.format("%m-%d").to_string()) { let result = app.run("library.memories", json!({"day": day})); app.report(ctx, result); From e32cd0fdf4f5e297c8d3c0267bfeece24fe896af Mon Sep 17 00:00:00 2001 From: 1234destiny1234 <180862339+1234destiny1234@users.noreply.github.com> Date: Tue, 1 Dec 2026 07:34:57 +0000 Subject: [PATCH 08/26] Sort Memories locale catalog entries Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> --- crates/ui-egui/locales/fork/cs.json | 6 +++--- crates/ui-egui/locales/fork/de.json | 6 +++--- crates/ui-egui/locales/fork/es.json | 6 +++--- crates/ui-egui/locales/fork/fi.json | 6 +++--- crates/ui-egui/locales/fork/fr.json | 6 +++--- crates/ui-egui/locales/fork/id.json | 6 +++--- crates/ui-egui/locales/fork/it.json | 6 +++--- crates/ui-egui/locales/fork/ja.json | 6 +++--- crates/ui-egui/locales/fork/ka.json | 6 +++--- crates/ui-egui/locales/fork/pl.json | 6 +++--- crates/ui-egui/locales/fork/pt-br.json | 6 +++--- crates/ui-egui/locales/fork/ru.json | 6 +++--- crates/ui-egui/locales/fork/sv.json | 6 +++--- crates/ui-egui/locales/fork/uk.json | 6 +++--- crates/ui-egui/locales/fork/vi.json | 6 +++--- crates/ui-egui/locales/fork/zh-hans.json | 6 +++--- crates/ui-egui/locales/fork/zh-hant.json | 6 +++--- 17 files changed, 51 insertions(+), 51 deletions(-) diff --git a/crates/ui-egui/locales/fork/cs.json b/crates/ui-egui/locales/fork/cs.json index ffa015155c..8f532647be 100644 --- a/crates/ui-egui/locales/fork/cs.json +++ b/crates/ui-egui/locales/fork/cs.json @@ -2211,6 +2211,7 @@ "Offset Saturation": "Sytost offset", "Oldest First": "Nejstarší první", "On": "Zapnuto", + "On This Day": "V tento den", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "U naskenovaného negativu nebo diapozitivu: najde a vyretušuje prachová zrnka, vlasy a škrábance na filmu. Infračervený průchod skeneru (soubor RGBI z VueScanu nebo SilverFastu) říká, kde jsou; jinak se prohledávají hladké plochy obrazu", "On photo": "Na fotografii", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "Na zařízení, které kolekci vlastní, zvolte, co mohou mít ostatní; na ostatních zvolte, co si toto zařízení bere.", @@ -2245,6 +2246,7 @@ "Open Catalog…": "Otevřít katalog…", "Open Help Topic": "Otevřít téma nápovědy", "Open Marketplace Link": "Otevřít odkaz tržiště", + "Open On This Day Memories": "Otevřít vzpomínky z tohoto dne", "Open Plug-in Link": "Otevřít odkaz zásuvného modulu", "Open Recent": "Otevřít nedávné", "Open Recent Catalog": "Otevřít nedávný katalog", @@ -3930,7 +3932,5 @@ "‹ Library": "‹ Knihovna", "↑ Apply This and All Above": "↑ Použít na tuto a všechny výše", "↑ This device has changes still to send": "↑ Toto zařízení má ještě změny k odeslání", - "↓ Another device has changes still to fetch": "↓ Jiné zařízení má ještě změny ke stažení", - "On This Day": "V tento den", - "Open On This Day Memories": "Otevřít vzpomínky z tohoto dne" + "↓ Another device has changes still to fetch": "↓ Jiné zařízení má ještě změny ke stažení" } diff --git a/crates/ui-egui/locales/fork/de.json b/crates/ui-egui/locales/fork/de.json index 73f25598c1..591e6da551 100644 --- a/crates/ui-egui/locales/fork/de.json +++ b/crates/ui-egui/locales/fork/de.json @@ -2119,6 +2119,7 @@ "Offset Luminance": "Offset-Helligkeit", "Offset Saturation": "Offset-Sättigung", "Oldest First": "Älteste zuerst", + "On This Day": "An diesem Tag", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "Bei einem gescannten Negativ oder Dia: Staubkörner, Haare und Kratzer auf dem Film finden und reparieren. Der Infrarotdurchgang des Scanners (eine RGBI-Datei aus VueScan oder SilverFast) sagt, wo sie sind; sonst werden die glatten Flächen des Bildes durchsucht", "On photo": "Auf dem Foto", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "Auf dem Gerät, dem eine Sammlung gehört, wählen, was die anderen haben dürfen; auf den anderen wählen, was dieses Gerät übernimmt.", @@ -2152,6 +2153,7 @@ "Open Catalog…": "Katalog öffnen…", "Open Help Topic": "Hilfethema öffnen", "Open Marketplace Link": "Marktplatz-Link öffnen", + "Open On This Day Memories": "Erinnerungen von diesem Tag öffnen", "Open Plug-in Link": "Zusatzmodul-Link öffnen", "Open Recent": "Zuletzt geöffnet", "Open Recent Catalog": "Letzten Katalog öffnen", @@ -3819,7 +3821,5 @@ "‹ Library": "‹ Bibliothek", "↑ Apply This and All Above": "↑ Diese und alle darüber anwenden", "↑ This device has changes still to send": "↑ Dieses Gerät hat noch Änderungen zu senden", - "↓ Another device has changes still to fetch": "↓ Ein anderes Gerät hat noch Änderungen zum Abrufen", - "On This Day": "An diesem Tag", - "Open On This Day Memories": "Erinnerungen von diesem Tag öffnen" + "↓ Another device has changes still to fetch": "↓ Ein anderes Gerät hat noch Änderungen zum Abrufen" } diff --git a/crates/ui-egui/locales/fork/es.json b/crates/ui-egui/locales/fork/es.json index 0967754406..68bac9960c 100644 --- a/crates/ui-egui/locales/fork/es.json +++ b/crates/ui-egui/locales/fork/es.json @@ -2274,6 +2274,7 @@ "Offset Luminance": "Luminancia de offset", "Offset Saturation": "Saturación de offset", "Oldest First": "Más antiguas primero", + "On This Day": "Un día como hoy", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "En un negativo o diapositiva escaneados: busca y corrige motas de polvo, pelos y rayas en la película. La pasada infrarroja del escáner (un archivo RGBI de VueScan o SilverFast) dice dónde están; si no, se buscan en las zonas lisas de la imagen", "On photo": "En la foto", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "En el dispositivo propietario de una colección, elige qué pueden tener los demás; en los demás, elige qué toma este dispositivo.", @@ -2308,6 +2309,7 @@ "Open Catalog…": "Abrir catálogo…", "Open Help Topic": "Abrir tema de ayuda", "Open Marketplace Link": "Abrir enlace del mercado", + "Open On This Day Memories": "Abrir recuerdos de este día", "Open Original in Other Editor (RAW, no copy)": "Abrir original en otro editor (RAW, sin copia)", "Open Plug-in Link": "Abrir enlace del plugin", "Open Recent": "Abrir reciente", @@ -4178,7 +4180,5 @@ "↑ This device has changes still to send": "↑ Este dispositivo aún tiene cambios por enviar", "↓ Another device has changes still to fetch": "↓ Otro dispositivo aún tiene cambios por obtener", "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘-arrastrar para enderezar, ⇧G Upright guiado, una cuadrícula al transformar.", - "★ Favorites": "★ Favoritos", - "On This Day": "Un día como hoy", - "Open On This Day Memories": "Abrir recuerdos de este día" + "★ Favorites": "★ Favoritos" } diff --git a/crates/ui-egui/locales/fork/fi.json b/crates/ui-egui/locales/fork/fi.json index 49510776e0..b675352ca2 100644 --- a/crates/ui-egui/locales/fork/fi.json +++ b/crates/ui-egui/locales/fork/fi.json @@ -2304,6 +2304,7 @@ "Offset Saturation": "Offset-kylläisyys", "Oldest First": "Vanhimmat ensin", "On": "Päällä", + "On This Day": "Tänä päivänä", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "Skannatulla negatiivilla tai dialla: etsi ja korjaa filmin pölyhiukkaset, hiukset ja naarmut. Skannerin infrapunakuva (VueScanin tai SilverFastin RGBI-tiedosto) kertoo, missä ne ovat; muuten etsitään kuvan tasaisilta alueilta", "On photo": "Kuvassa", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "Kokoelman omistavalla laitteella valitse, mitä muut saavat; muilla valitse, mitä tämä laite ottaa.", @@ -2341,6 +2342,7 @@ "Open Catalog…": "Avaa katalogi…", "Open Help Topic": "Avaa ohjeaihe", "Open Marketplace Link": "Avaa kauppapaikan linkki", + "Open On This Day Memories": "Avaa tämän päivän muistot", "Open Plug-in Link": "Avaa laajennuksen linkki", "Open Recent": "Avaa viimeisin", "Open Recent Catalog": "Avaa viimeisin katalogi", @@ -4170,7 +4172,5 @@ "↑ This device has changes still to send": "↑ Tällä laitteella on vielä lähetettäviä muutoksia", "↓ Another device has changes still to fetch": "↓ Toisella laitteella on vielä haettavia muutoksia", "日本語": "日本語", - "繁體中文(台灣)": "繁體中文(台灣)", - "On This Day": "Tänä päivänä", - "Open On This Day Memories": "Avaa tämän päivän muistot" + "繁體中文(台灣)": "繁體中文(台灣)" } diff --git a/crates/ui-egui/locales/fork/fr.json b/crates/ui-egui/locales/fork/fr.json index 152f271228..a4f68c71c8 100644 --- a/crates/ui-egui/locales/fork/fr.json +++ b/crates/ui-egui/locales/fork/fr.json @@ -2091,6 +2091,7 @@ "Offset Luminance": "Luminance du offset", "Offset Saturation": "Saturation du offset", "Oldest First": "Les plus anciens d’abord", + "On This Day": "Un jour comme aujourd’hui", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "Sur un négatif ou une diapositive numérisés : trouver et corriger les poussières, cheveux et rayures du film. La passe infrarouge du scanner (un fichier RGBI de VueScan ou SilverFast) dit où ils sont ; sinon les zones lisses de l'image sont parcourues", "On photo": "Sur la photo", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "Sur l’appareil propriétaire d’une collection, choisissez ce que les autres peuvent avoir ; sur les autres, choisissez ce que cet appareil prend.", @@ -2121,6 +2122,7 @@ "Open Catalog…": "Ouvrir un catalogue…", "Open Help Topic": "Ouvrir une rubrique d’aide", "Open Marketplace Link": "Ouvrir le lien de la place de marché", + "Open On This Day Memories": "Ouvrir les souvenirs de ce jour", "Open Plug-in Link": "Ouvrir le lien du module externe", "Open Recent": "Ouvrir récent", "Open Recent Catalog": "Ouvrir un catalogue récent", @@ -3818,7 +3820,5 @@ "↑ Apply This and All Above": "↑ Appliquer à celui-ci et à tous ceux au-dessus", "↑ This device has changes still to send": "↑ Cet appareil a encore des modifications à envoyer", "↓ Another device has changes still to fetch": "↓ Un autre appareil a encore des modifications à récupérer", - "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘-glisser pour redresser, ⇧G Upright guidé, une grille pendant la transformation.", - "On This Day": "Un jour comme aujourd’hui", - "Open On This Day Memories": "Ouvrir les souvenirs de ce jour" + "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘-glisser pour redresser, ⇧G Upright guidé, une grille pendant la transformation." } diff --git a/crates/ui-egui/locales/fork/id.json b/crates/ui-egui/locales/fork/id.json index 3f28870cec..93188d8fee 100644 --- a/crates/ui-egui/locales/fork/id.json +++ b/crates/ui-egui/locales/fork/id.json @@ -2321,6 +2321,7 @@ "Offset Saturation": "Saturasi offset", "Oldest First": "Terlama dulu", "On": "Aktif", + "On This Day": "Pada hari ini", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "Pada negatif atau slide hasil pindaian: temukan dan perbaiki bintik debu, rambut, dan goresan pada film. Lintasan inframerah pemindai (berkas RGBI dari VueScan atau SilverFast) menunjukkan letaknya; jika tidak, area halus pada gambar yang dicari", "On photo": "Di foto", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "Di perangkat pemilik koleksi, pilih apa yang boleh dimiliki perangkat lain; di perangkat lain, pilih apa yang diambil perangkat ini.", @@ -2359,6 +2360,7 @@ "Open Catalog…": "Buka katalog…", "Open Help Topic": "Buka Topik Bantuan", "Open Marketplace Link": "Buka tautan marketplace", + "Open On This Day Memories": "Buka Kenangan Hari Ini", "Open Plug-in Link": "Buka tautan plug-in", "Open Recent": "Buka terbaru", "Open Recent Catalog": "Buka katalog terbaru", @@ -4163,7 +4165,5 @@ "↑ Apply This and All Above": "↑ Terapkan ke ini dan semua di atasnya", "↑ This device has changes still to send": "↑ Perangkat ini masih punya perubahan untuk dikirim", "↓ Another device has changes still to fetch": "↓ Perangkat lain masih punya perubahan untuk diambil", - "★ Favorites": "★ Favorit", - "On This Day": "Pada hari ini", - "Open On This Day Memories": "Buka Kenangan Hari Ini" + "★ Favorites": "★ Favorit" } diff --git a/crates/ui-egui/locales/fork/it.json b/crates/ui-egui/locales/fork/it.json index 9afb205372..ba1c9456f6 100644 --- a/crates/ui-egui/locales/fork/it.json +++ b/crates/ui-egui/locales/fork/it.json @@ -2213,6 +2213,7 @@ "Offset Saturation": "Saturazione del offset", "Oldest First": "I più vecchi prima", "On": "Attivo", + "On This Day": "In questo giorno", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "Su un negativo o una diapositiva scansionati: trova e corregge granelli di polvere, peli e graffi sulla pellicola. La passata a infrarossi dello scanner (un file RGBI di VueScan o SilverFast) dice dove sono; altrimenti si cercano nelle zone uniformi dell'immagine", "On photo": "Sulla foto", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "Sul dispositivo proprietario di una raccolta, scegli cosa possono avere gli altri; sugli altri, scegli cosa prende questo dispositivo.", @@ -2247,6 +2248,7 @@ "Open Catalog…": "Apri catalogo…", "Open Help Topic": "Apri argomento della guida", "Open Marketplace Link": "Apri link del marketplace", + "Open On This Day Memories": "Apri i ricordi di oggi", "Open Plug-in Link": "Apri collegamento del plug-in", "Open Recent": "Apri recente", "Open Recent Catalog": "Apri catalogo recente", @@ -3937,7 +3939,5 @@ "↑ Apply This and All Above": "↑ Applica a questo e a tutti quelli sopra", "↑ This device has changes still to send": "↑ Questo dispositivo ha ancora modifiche da inviare", "↓ Another device has changes still to fetch": "↓ Un altro dispositivo ha ancora modifiche da scaricare", - "★ Favorites": "★ Preferiti", - "On This Day": "In questo giorno", - "Open On This Day Memories": "Apri i ricordi di oggi" + "★ Favorites": "★ Preferiti" } diff --git a/crates/ui-egui/locales/fork/ja.json b/crates/ui-egui/locales/fork/ja.json index bf5d5ba9b8..ecdc65c84d 100644 --- a/crates/ui-egui/locales/fork/ja.json +++ b/crates/ui-egui/locales/fork/ja.json @@ -2278,6 +2278,7 @@ "Offset Luminance": "Offsetの明度", "Offset Saturation": "Offsetの彩度", "Oldest First": "古い順", + "On This Day": "この日", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "スキャンしたネガやポジで、フィルム上のゴミ、毛、傷を見つけて修復します。スキャナーの赤外線パス(VueScanやSilverFastのRGBIファイル)があればその位置を使い、なければ画像の平坦な部分を探します", "On photo": "写真上", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "コレクションを所有するデバイスでは他のデバイスに許可する内容を、その他のデバイスではこのデバイスが受け取る内容を選びます。", @@ -2312,6 +2313,7 @@ "Open Catalog…": "カタログを開く…", "Open Help Topic": "ヘルプトピックを開く", "Open Marketplace Link": "マーケットプレイスのリンクを開く", + "Open On This Day Memories": "この日の思い出を開く", "Open Original in Other Editor (RAW, no copy)": "元画像を他のエディターで開く(RAW、コピーなし)", "Open Plug-in Link": "プラグインのリンクを開く", "Open Recent": "最近使用したものを開く", @@ -4177,7 +4179,5 @@ "↑ This device has changes still to send": "↑ このデバイスにはまだ送信する変更があります", "↓ Another device has changes still to fetch": "↓ 別のデバイスにまだ取得する変更があります", "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘-ドラッグで水平補正、⇧G でガイド付き Upright、変形中はグリッドを表示。", - "★ Favorites": "★ お気に入り", - "On This Day": "この日", - "Open On This Day Memories": "この日の思い出を開く" + "★ Favorites": "★ お気に入り" } diff --git a/crates/ui-egui/locales/fork/ka.json b/crates/ui-egui/locales/fork/ka.json index efed2e43a8..d77d217f6b 100644 --- a/crates/ui-egui/locales/fork/ka.json +++ b/crates/ui-egui/locales/fork/ka.json @@ -2437,6 +2437,7 @@ "Offset Saturation": "Offset-ის გაჯერება", "Oldest First": "ჯერ უძველესი", "On": "ჩართული", + "On This Day": "ამ დღეს", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "დასკანერებულ ნეგატივზე ან სლაიდზე: ფირზე მტვრის, თმისა და ნაკაწრების პოვნა და გასწორება. სკანერის ინფრაწითელი გავლა (VueScan-ის ან SilverFast-ის RGBI ფაილი) ამბობს, სად არიან; სხვა შემთხვევაში სურათის გლუვი უბნები იძებნება", "On photo": "ფოტოზე", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "კოლექციის მფლობელ მოწყობილობაზე აირჩიეთ, რა შეიძლება ჰქონდეთ სხვებს; სხვებზე აირჩიეთ, რას იღებს ეს მოწყობილობა.", @@ -2476,6 +2477,7 @@ "Open Catalog…": "კატალოგის გახსნა…", "Open Help Topic": "დახმარების თემის გახსნა", "Open Marketplace Link": "მარკეტპლეისის ბმულის გახსნა", + "Open On This Day Memories": "ამ დღის მოგონებების გახსნა", "Open Plug-in Link": "დანამატის ბმულის გახსნა", "Open Recent": "ბოლოდროინდელის გახსნა", "Open Recent Catalog": "ბოლო კატალოგის გახსნა", @@ -4369,7 +4371,5 @@ "↑ Apply This and All Above": "↑ ამაზე და ზემოთ ყველაზე გამოყენება", "↑ This device has changes still to send": "↑ ამ მოწყობილობას ჯერ კიდევ აქვს გასაგზავნი ცვლილებები", "↓ Another device has changes still to fetch": "↓ სხვა მოწყობილობას ჯერ კიდევ აქვს ჩამოსატვირთი ცვლილებები", - "★ Favorites": "★ რჩეულები", - "On This Day": "ამ დღეს", - "Open On This Day Memories": "ამ დღის მოგონებების გახსნა" + "★ Favorites": "★ რჩეულები" } diff --git a/crates/ui-egui/locales/fork/pl.json b/crates/ui-egui/locales/fork/pl.json index 4ebc2070b5..b06b1bedbc 100644 --- a/crates/ui-egui/locales/fork/pl.json +++ b/crates/ui-egui/locales/fork/pl.json @@ -2361,6 +2361,7 @@ "Offset Saturation": "Nasycenie offset", "Oldest First": "Najstarsze najpierw", "On": "Wł.", + "On This Day": "Tego dnia", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "Na zeskanowanym negatywie lub slajdzie: znajdź i napraw drobiny kurzu, włosy i rysy na filmie. Przebieg skanera w podczerwieni (plik RGBI z VueScan lub SilverFast) mówi, gdzie są; w przeciwnym razie przeszukiwane są gładkie obszary obrazu", "On photo": "Na zdjęciu", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "Na urządzeniu, do którego należy kolekcja, wybierz, co mogą mieć inne; na innych wybierz, co bierze to urządzenie.", @@ -2397,6 +2398,7 @@ "Open Catalog…": "Otwórz katalog…", "Open Help Topic": "Otwórz temat pomocy", "Open Marketplace Link": "Otwórz łącze marketplace", + "Open On This Day Memories": "Otwórz wspomnienia z tego dnia", "Open Plug-in Link": "Otwórz łącze wtyczki", "Open Recent": "Otwórz ostatnie", "Open Recent Catalog": "Otwórz ostatni katalog", @@ -4207,7 +4209,5 @@ "↑ Apply This and All Above": "↑ Zastosuj do tej i wszystkich powyżej", "↑ This device has changes still to send": "↑ To urządzenie ma jeszcze zmiany do wysłania", "↓ Another device has changes still to fetch": "↓ Inne urządzenie ma jeszcze zmiany do pobrania", - "★ Favorites": "★ Ulubione", - "On This Day": "Tego dnia", - "Open On This Day Memories": "Otwórz wspomnienia z tego dnia" + "★ Favorites": "★ Ulubione" } diff --git a/crates/ui-egui/locales/fork/pt-br.json b/crates/ui-egui/locales/fork/pt-br.json index 9a93029db8..32b3ad6d01 100644 --- a/crates/ui-egui/locales/fork/pt-br.json +++ b/crates/ui-egui/locales/fork/pt-br.json @@ -2277,6 +2277,7 @@ "Offset Luminance": "Luminância do offset", "Offset Saturation": "Saturação do offset", "Oldest First": "Mais antigos primeiro", + "On This Day": "Neste dia", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "Em um negativo ou slide digitalizado: encontra e corrige grãos de poeira, fios e riscos no filme. A passagem infravermelha do scanner (um arquivo RGBI do VueScan ou SilverFast) diz onde estão; caso contrário, as áreas lisas da imagem são examinadas", "On photo": "Na foto", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "No dispositivo dono de uma coleção, escolha o que os outros podem ter; nos outros, escolha o que este dispositivo recebe.", @@ -2311,6 +2312,7 @@ "Open Catalog…": "Abrir catálogo…", "Open Help Topic": "Abrir tópico de ajuda", "Open Marketplace Link": "Abrir link do marketplace", + "Open On This Day Memories": "Abrir lembranças deste dia", "Open Original in Other Editor (RAW, no copy)": "Abrir original em outro editor (RAW, sem cópia)", "Open Plug-in Link": "Abrir link do plug-in", "Open Recent": "Abrir recente", @@ -4177,7 +4179,5 @@ "↑ This device has changes still to send": "↑ Este dispositivo ainda tem alterações a enviar", "↓ Another device has changes still to fetch": "↓ Outro dispositivo ainda tem alterações a buscar", "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘-arrastar para endireitar, ⇧G Upright guiado, uma grade ao transformar.", - "★ Favorites": "★ Favoritos", - "On This Day": "Neste dia", - "Open On This Day Memories": "Abrir lembranças deste dia" + "★ Favorites": "★ Favoritos" } diff --git a/crates/ui-egui/locales/fork/ru.json b/crates/ui-egui/locales/fork/ru.json index 020d1a1b12..213abdd513 100644 --- a/crates/ui-egui/locales/fork/ru.json +++ b/crates/ui-egui/locales/fork/ru.json @@ -2284,6 +2284,7 @@ "Offset Luminance": "Яркость offset", "Offset Saturation": "Насыщенность offset", "Oldest First": "Сначала старые", + "On This Day": "В этот день", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "На отсканированном негативе или слайде: найти и исправить пылинки, волоски и царапины на плёнке. Инфракрасный проход сканера (файл RGBI из VueScan или SilverFast) говорит, где они; иначе просматриваются гладкие участки изображения", "On photo": "На фото", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "На устройстве-владельце коллекции выберите, что могут получить другие; на остальных выберите, что берёт это устройство.", @@ -2317,6 +2318,7 @@ "Open Catalog…": "Открыть каталог…", "Open Help Topic": "Открыть раздел справки", "Open Marketplace Link": "Открыть ссылку маркетплейса", + "Open On This Day Memories": "Открыть воспоминания за этот день", "Open Plug-in Link": "Открыть ссылку плагина", "Open Recent": "Открыть недавние", "Open Recent Catalog": "Открыть недавний каталог", @@ -4184,7 +4186,5 @@ "≥ at least": "≥ не менее", "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘-перетаскивание для выравнивания, ⇧G Upright по направляющим, сетка во время трансформации.", "日本語": "日本語", - "繁體中文(台灣)": "繁體中文(台灣)", - "On This Day": "В этот день", - "Open On This Day Memories": "Открыть воспоминания за этот день" + "繁體中文(台灣)": "繁體中文(台灣)" } diff --git a/crates/ui-egui/locales/fork/sv.json b/crates/ui-egui/locales/fork/sv.json index f511581ee2..ca3493cdb2 100644 --- a/crates/ui-egui/locales/fork/sv.json +++ b/crates/ui-egui/locales/fork/sv.json @@ -2361,6 +2361,7 @@ "Offset Saturation": "Offset-mättnad", "Oldest First": "Äldst först", "On": "På", + "On This Day": "Den här dagen", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "På ett skannat negativ eller en diabild: hitta och laga dammkorn, hårstrån och repor på filmen. Skannerns infraröda pass (en RGBI-fil från VueScan eller SilverFast) säger var de finns; annars söks bildens släta ytor igenom", "On photo": "På fotot", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "På enheten som äger en samling väljer du vad de andra får ha; på de andra väljer du vad den här enheten tar.", @@ -2399,6 +2400,7 @@ "Open Catalog…": "Öppna katalog…", "Open Help Topic": "Öppna hjälpavsnitt", "Open Marketplace Link": "Öppna marknadslänk", + "Open On This Day Memories": "Öppna minnen från den här dagen", "Open Original in Other Editor (RAW, no copy)": "Öppna original i annan redigerare (RAW, ingen kopia)", "Open Plug-in Link": "Öppna tilläggets länk", "Open Recent": "Öppna senaste", @@ -4231,7 +4233,5 @@ "‹ Library": "‹ Bibliotek", "↑ Apply This and All Above": "↑ Tillämpa på den här och alla ovanför", "↑ This device has changes still to send": "↑ Den här enheten har ändringar kvar att skicka", - "↓ Another device has changes still to fetch": "↓ En annan enhet har ändringar kvar att hämta", - "On This Day": "Den här dagen", - "Open On This Day Memories": "Öppna minnen från den här dagen" + "↓ Another device has changes still to fetch": "↓ En annan enhet har ändringar kvar att hämta" } diff --git a/crates/ui-egui/locales/fork/uk.json b/crates/ui-egui/locales/fork/uk.json index fbf59d2099..9c5f2935e0 100644 --- a/crates/ui-egui/locales/fork/uk.json +++ b/crates/ui-egui/locales/fork/uk.json @@ -2178,6 +2178,7 @@ "Offset Luminance": "Яскравість offset", "Offset Saturation": "Насиченість offset", "Oldest First": "Спочатку старі", + "On This Day": "Цього дня", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "На відсканованому негативі чи слайді: знайти й виправити порошинки, волосинки та подряпини на плівці. Інфрачервоний прохід сканера (файл RGBI з VueScan або SilverFast) каже, де вони; інакше переглядаються гладкі ділянки зображення", "On photo": "На фото", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "На пристрої-власнику колекції виберіть, що можуть мати інші; на інших виберіть, що бере цей пристрій.", @@ -2211,6 +2212,7 @@ "Open Catalog…": "Відкрити каталог…", "Open Help Topic": "Відкрити розділ довідки", "Open Marketplace Link": "Відкрити посилання маркетплейсу", + "Open On This Day Memories": "Відкрити спогади цього дня", "Open Original in Other Editor (RAW, no copy)": "Відкрити оригінал в іншому редакторі (RAW, без копії)", "Open Plug-in Link": "Відкрити посилання плагіна", "Open Recent": "Відкрити нещодавні", @@ -3929,7 +3931,5 @@ "↑ Apply This and All Above": "↑ Застосувати до цієї та всіх вище", "↑ This device has changes still to send": "↑ Цей пристрій має ще не надіслані зміни", "↓ Another device has changes still to fetch": "↓ Інший пристрій має зміни для завантаження", - "★ Favorites": "★ Улюблені", - "On This Day": "Цього дня", - "Open On This Day Memories": "Відкрити спогади цього дня" + "★ Favorites": "★ Улюблені" } diff --git a/crates/ui-egui/locales/fork/vi.json b/crates/ui-egui/locales/fork/vi.json index bba7e804af..70e181856d 100644 --- a/crates/ui-egui/locales/fork/vi.json +++ b/crates/ui-egui/locales/fork/vi.json @@ -2465,6 +2465,7 @@ "Offset Saturation": "Độ bão hòa offset", "Oldest First": "Cũ nhất trước", "On": "Bật", + "On This Day": "Vào ngày này", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "Trên âm bản hoặc phim dương đã quét: tìm và sửa hạt bụi, sợi tóc và vết xước trên phim. Lượt quét hồng ngoại của máy quét (tệp RGBI từ VueScan hoặc SilverFast) cho biết chúng ở đâu; nếu không, các vùng phẳng của ảnh sẽ được dò tìm", "On photo": "Trên ảnh", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "Trên thiết bị sở hữu bộ sưu tập, chọn những gì thiết bị khác được có; trên các thiết bị khác, chọn những gì thiết bị này nhận.", @@ -2504,6 +2505,7 @@ "Open Catalog…": "Mở catalog…", "Open Help Topic": "Mở chủ đề trợ giúp", "Open Marketplace Link": "Mở liên kết của chợ", + "Open On This Day Memories": "Mở kỷ niệm ngày này", "Open Plug-in Link": "Mở liên kết plugin", "Open Recent": "Mở gần đây", "Open Recent Catalog": "Mở catalog gần đây", @@ -4425,7 +4427,5 @@ "↑ Apply This and All Above": "↑ Áp dụng cho nhóm này và tất cả ở trên", "↑ This device has changes still to send": "↑ Thiết bị này còn thay đổi cần gửi", "↓ Another device has changes still to fetch": "↓ Một thiết bị khác còn thay đổi cần tải về", - "★ Favorites": "★ Yêu thích", - "On This Day": "Vào ngày này", - "Open On This Day Memories": "Mở kỷ niệm ngày này" + "★ Favorites": "★ Yêu thích" } diff --git a/crates/ui-egui/locales/fork/zh-hans.json b/crates/ui-egui/locales/fork/zh-hans.json index 59298f3ac8..6902a22a47 100644 --- a/crates/ui-egui/locales/fork/zh-hans.json +++ b/crates/ui-egui/locales/fork/zh-hans.json @@ -2240,6 +2240,7 @@ "Offset Luminance": "Offset 明亮度", "Offset Saturation": "Offset 饱和度", "Oldest First": "从旧到新", + "On This Day": "历史上的今天", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "对于扫描的底片或正片:查找并修复胶片上的灰尘、毛发和划痕。扫描仪的红外通道(VueScan 或 SilverFast 的 RGBI 文件)给出它们的位置;否则在图像的平滑区域中查找", "On photo": "在照片上", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "在拥有收藏夹的设备上选择其他设备可获得的内容;在其他设备上选择此设备获取的内容。", @@ -2273,6 +2274,7 @@ "Open Catalog…": "打开目录…", "Open Help Topic": "打开帮助主题", "Open Marketplace Link": "打开市场链接", + "Open On This Day Memories": "打开今日回忆", "Open Original in Other Editor (RAW, no copy)": "在其他编辑器中打开原始文件(RAW,不复制)", "Open Plug-in Link": "打开增效工具链接", "Open Recent": "打开最近使用的", @@ -4100,7 +4102,5 @@ "↑ This device has changes still to send": "↑ 此设备仍有更改待发送", "↓ Another device has changes still to fetch": "↓ 另一台设备仍有更改待获取", "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘ 拖动以拉直,⇧G 引导式垂直,变换时显示网格。", - "★ Favorites": "★ 收藏", - "On This Day": "历史上的今天", - "Open On This Day Memories": "打开今日回忆" + "★ Favorites": "★ 收藏" } diff --git a/crates/ui-egui/locales/fork/zh-hant.json b/crates/ui-egui/locales/fork/zh-hant.json index fcb4a102ad..d08762fa33 100644 --- a/crates/ui-egui/locales/fork/zh-hant.json +++ b/crates/ui-egui/locales/fork/zh-hant.json @@ -2277,6 +2277,7 @@ "Offset Luminance": "Offset 明亮度", "Offset Saturation": "Offset 飽和度", "Oldest First": "由舊到新", + "On This Day": "歷史上的今天", "On a scanned negative or slide: find and heal dust specks, hairs and scratches on the film. A scanner's infrared pass (a VueScan or SilverFast RGBI file) says where they are; otherwise the picture's smooth areas are searched": "對於掃描的負片或正片:尋找並修復底片上的灰塵、毛髮與刮痕。掃描器的紅外線通道(VueScan 或 SilverFast 的 RGBI 檔案)指出它們的位置;否則在影像的平滑區域中搜尋", "On photo": "在照片上", "On the device that owns a collection, choose what the others may have; on the others, choose what this device takes.": "在擁有收藏集的裝置上選擇其他裝置可取得的內容;在其他裝置上選擇此裝置取得的內容。", @@ -2311,6 +2312,7 @@ "Open Catalog…": "開啟目錄…", "Open Help Topic": "開啟說明主題", "Open Marketplace Link": "開啟市集連結", + "Open On This Day Memories": "開啟今日回憶", "Open Original in Other Editor (RAW, no copy)": "在其他編輯器中開啟原始檔(RAW,不建立副本)", "Open Plug-in Link": "開啟增效模組連結", "Open Recent": "開啟最近使用的", @@ -4178,7 +4180,5 @@ "↑ This device has changes still to send": "↑ 此裝置仍有變更待傳送", "↓ Another device has changes still to fetch": "↓ 另一台裝置仍有變更待取得", "⌘-drag to straighten, ⇧G Guided Upright, a grid while transforming.": "⌘ 拖動以拉直,⇧G 引導式垂直,變換時顯示格線。", - "★ Favorites": "★ 喜好項目", - "On This Day": "歷史上的今天", - "Open On This Day Memories": "開啟今日回憶" + "★ Favorites": "★ 喜好項目" } From 5f9bc1856123338b33e29942bb1609cd2c18e112 Mon Sep 17 00:00:00 2001 From: Andrew Frahn Date: Tue, 1 Dec 2026 21:33:45 +1100 Subject: [PATCH 09/26] #1735: document and mark the vendored egui-wgpu lost-queue-submit patch Manual: none, no user-visible change Co-Authored-By: Claude Sonnet 5.5 --- vendor/README.md | 7 +++++++ vendor/egui-wgpu/src/winit.rs | 3 +++ 2 files changed, 10 insertions(+) diff --git a/vendor/README.md b/vendor/README.md index d6b3c9fdd0..9865e5e55b 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -21,6 +21,13 @@ failed upload is logged (1st, 2nd, 4th… time) and leaves its slices empty, and when slices are missing: the frame is skipped instead of the app crashing. Marked `Patch (no panic on a lost device)`. +Patch: no panic on a lost queue submit (issue #1735). `Queue::submit` panics inside `wgpu-core` +once the device is lost. `RendererQueueGuard::drop`'s empty submit and the main frame submit in +`winit.rs` run under `catch_unwind` (a panicked main submit reports `CurrentSurfaceTexture::Lost` +to `on_surface_status` and requests a surface recreate), and a `Lost` surface texture sets +`commands_submitted` so the guard skips its empty submit. Three hunks, each marked +`Patch (no panic on a lost queue submit)`. + Patch: unconfigured surface. wgpu attaches the device's error sink to a surface only when a `Surface::configure` succeeds, and `get_current_texture` on a surface without one panics ("Surface is not configured for presentation"); inside winit's callbacks that panic can't unwind, so the app diff --git a/vendor/egui-wgpu/src/winit.rs b/vendor/egui-wgpu/src/winit.rs index 183a7a4e4d..74079ccbde 100644 --- a/vendor/egui-wgpu/src/winit.rs +++ b/vendor/egui-wgpu/src/winit.rs @@ -624,6 +624,7 @@ impl Painter { impl Drop for RendererQueueGuard<'_> { fn drop(&mut self) { + // Patch (no panic on a lost queue submit): the empty submit is guarded. // Only submit an empty command buffer array if no commands were // explicitly submitted. if !self.commands_submitted @@ -742,6 +743,7 @@ impl Painter { frame } other => { + // Patch (no panic on a lost queue submit): a lost surface skips the empty submit. if matches!(other, wgpu::CurrentSurfaceTexture::Lost) { render_queue_guard.commands_submitted = true; } @@ -864,6 +866,7 @@ impl Painter { profiling::scope!("Queue::submit"); // wgpu doesn't document where vsync can happen. Maybe here? let start = web_time::Instant::now(); + // Patch (no panic on a lost queue submit): the main submit is guarded. let submitted = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { render_state .queue From fb01ac8b6426f7ac3c8a06db36dc010a160d5666 Mon Sep 17 00:00:00 2001 From: Andrew Frahn Date: Tue, 1 Dec 2026 21:52:43 +1100 Subject: [PATCH 10/26] Packaging: bundle libxkbcommon-x11 in the AppImage The AppImage catalog test (AppImage/appimage.github.io#12926) failed: winit dlopens libxkbcommon-x11.so.0 on X11 and the test system has none, so the window never opened. The AppImage now carries libxkbcommon, libxkbcommon-x11 and libxcb-xkb in usr/lib/chromaforge/ (with their licence files), and the Linux executable gets DT_RPATH $ORIGIN/../lib/chromaforge (apps/app/build.rs) so dlopen finds them and their own dependencies. The release workflow installs the libraries and checks the RPATH and the bundled files. Manual: none, no user-visible change beyond the AppImage starting where it failed. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 11 ++++++++- NOTICE | 8 +++++++ apps/app/build.rs | 9 +++++++ ...1-appimage-starts-without-xkbcommon-x11.md | 3 +++ docs/packaging.md | 2 +- ...1-appimage-starts-without-xkbcommon-x11.md | 3 +++ packaging/linux/package.sh | 24 +++++++++++++++++++ 7 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 docs/changelog/unreleased/2026-12-01-appimage-starts-without-xkbcommon-x11.md create mode 100644 docs/whats-new/2026-12-01-appimage-starts-without-xkbcommon-x11.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8dd3b0f706..e2fe388899 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -484,7 +484,7 @@ jobs: run: | DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ build-essential pkg-config file \ - libxkbcommon-dev libwayland-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev \ + libxkbcommon-dev libxkbcommon-x11-0 libxcb-xkb1 libwayland-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev \ desktop-file-utils appstream python3-yaml zsync curl -fsSL -o "$RUNNER_TEMP/nfpm.deb" \ "https://github.com/goreleaser/nfpm/releases/download/v${NFPM_VERSION}/nfpm_${NFPM_VERSION}_${{ matrix.deb }}.deb" @@ -515,11 +515,20 @@ jobs: . packaging/env.sh dpkg-deb --contents dist/release/*.deb | grep -E "usr/bin/$BRAND_BINARY\$|metainfo|applications" ldd "${CARGO_TARGET_DIR:-target}/${PACKAGE_PROFILE:-dist}/app" + readelf -d "${CARGO_TARGET_DIR:-target}/${PACKAGE_PROFILE:-dist}/app" | grep -F "(RPATH)" | grep -F "\$ORIGIN/../lib/$BRAND_BINARY" cargo xtask package --render-only python3 -c "import yaml, os; a = os.environ['BRAND_APP_ID']; m = yaml.safe_load(open(os.path.join(os.environ.get('CARGO_TARGET_DIR', 'target'), f'package/linux/flatpak/{a}.yml'))); assert m['id'] == a" for appimage in dist/release/*.AppImage; do chmod +x "$appimage" APPIMAGE_EXTRACT_AND_RUN=1 "$appimage" --version + # The libraries winit opens at run time are inside, where the executable's DT_RPATH looks. + extract="$RUNNER_TEMP/appimage-extract" + rm -rf "$extract" && mkdir -p "$extract" + (cd "$extract" && "$OLDPWD/$appimage" --appimage-extract >/dev/null) + for soname in libxkbcommon.so.0 libxkbcommon-x11.so.0 libxcb-xkb.so.1; do + test -s "$extract/squashfs-root/usr/lib/$BRAND_BINARY/$soname" + done + rm -rf "$extract" # Update information is embedded, and the .zsync for delta updates sits beside it. "$appimage" --appimage-updateinformation | grep -F 'gh-releases-zsync|' test -s "$appimage.zsync" diff --git a/NOTICE b/NOTICE index 55a0f96f7e..491c296f97 100644 --- a/NOTICE +++ b/NOTICE @@ -335,3 +335,11 @@ from RawTherapee's rtengine/rcd_demosaic.cc (https://github.com/Beep6581/RawTher Luis Sanz Rodríguez and the RawTherapee developers, licensed under the GNU General Public License version 3 or later (text: LICENSE-GPL-3.0.txt). Modified by the Chromaforge contributors (2026): no tiling or SIMD, mirror-reflected borders, guarded divisions. + +Linux AppImage: keyboard libraries +---------------------------------- +The Linux AppImage bundles libxkbcommon and libxkbcommon-x11 (https://xkbcommon.org, MIT +and X11-style licences) and libxcb-xkb (https://xcb.freedesktop.org, X11 licence), unmodified, +as Ubuntu 22.04 builds them, in usr/lib/chromaforge/, with their copyright files beside them as +LICENSE-libxkbcommon.txt and LICENSE-libxcb.txt. winit opens them at run time for the keyboard; +the AppImage carries them for desktops that do not have them installed. diff --git a/apps/app/build.rs b/apps/app/build.rs index 30c9577ec3..1e081e7c6f 100644 --- a/apps/app/build.rs +++ b/apps/app/build.rs @@ -25,6 +25,15 @@ fn main() { println!("cargo:rerun-if-changed=build.rs"); #[cfg(target_os = "linux")] embed_desktop_entry(); + if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("linux") { + // The libraries winit opens at run time (`libxkbcommon-x11.so.0` and the like) are looked up + // in `../lib//` beside the executable first, where the AppImage bundles them + // (`packaging/linux/package.sh`); a system without them otherwise cannot open the window. + // DT_RPATH rather than DT_RUNPATH (`--disable-new-dtags`): only DT_RPATH also covers the + // bundled libraries' own dependencies (`libxcb-xkb.so.1`). Packages that bundle nothing there + // (deb, rpm, tarball) fall through to the system's libraries as before. + println!("cargo:rustc-link-arg-bins=-Wl,--disable-new-dtags,-rpath,$ORIGIN/../lib/{}", lcc_brand::BINARY); + } println!("cargo:rerun-if-changed=../../assets/app-icon/app.ico"); let require = lcc_brand::env_var("REQUIRE_WINRES"); println!("cargo:rerun-if-env-changed={require}"); diff --git a/docs/changelog/unreleased/2026-12-01-appimage-starts-without-xkbcommon-x11.md b/docs/changelog/unreleased/2026-12-01-appimage-starts-without-xkbcommon-x11.md new file mode 100644 index 0000000000..4d85ab429c --- /dev/null +++ b/docs/changelog/unreleased/2026-12-01-appimage-starts-without-xkbcommon-x11.md @@ -0,0 +1,3 @@ +## Fixes + +- **Linux AppImage:** the AppImage bundles libxkbcommon, libxkbcommon-x11 and libxcb-xkb, which winit opens at run time on X11; on a system without libxkbcommon-x11 the window failed to open (AppImage catalog test, AppImage/appimage.github.io#12926). diff --git a/docs/packaging.md b/docs/packaging.md index 1d184fdb40..5535c86b89 100644 --- a/docs/packaging.md +++ b/docs/packaging.md @@ -9,7 +9,7 @@ | Format | Script | Built by CI | Status / notes | |---|---|---|---| -| AppImage (+ `.zsync`) | `packaging/linux/package.sh` | release.yml (Ubuntu 22.04, glibc 2.35) | runs `--version` and checks update info in CI | +| AppImage (+ `.zsync`) | `packaging/linux/package.sh` | release.yml (Ubuntu 22.04, glibc 2.35) | runs `--version` and checks update info in CI; bundles libxkbcommon, libxkbcommon-x11 and libxcb-xkb in `usr/lib/chromaforge/`, found through the executable's `$ORIGIN` RPATH (`apps/app/build.rs`) | | `.deb`, `.rpm` | `packaging/linux/package.sh` + `nfpm.yaml.in` | release.yml | needs `nfpm`; runtime deps (Vulkan/EGL, X11/Wayland) as depends/recommends | | `.tar.gz` (FHS tree) | `packaging/linux/package.sh` | release.yml | input for the Flatpak bundle | | Flatpak bundle | `packaging/linux/flatpak-bundle.sh`, `flatpak/.yml.in` (source build), `.bundle.yml.in` (from the tarball) | release.yml | installed and smoke-tested in CI; not on Flathub | diff --git a/docs/whats-new/2026-12-01-appimage-starts-without-xkbcommon-x11.md b/docs/whats-new/2026-12-01-appimage-starts-without-xkbcommon-x11.md new file mode 100644 index 0000000000..2d6dc5c8fc --- /dev/null +++ b/docs/whats-new/2026-12-01-appimage-starts-without-xkbcommon-x11.md @@ -0,0 +1,3 @@ +### The AppImage starts on systems without libxkbcommon-x11 + +- On Linux, the AppImage now carries the keyboard libraries its window needs on X11 (libxkbcommon, libxkbcommon-x11, libxcb-xkb), so it opens on systems that do not have them installed instead of failing to start. diff --git a/packaging/linux/package.sh b/packaging/linux/package.sh index 74a6edcce7..52caf34d60 100755 --- a/packaging/linux/package.sh +++ b/packaging/linux/package.sh @@ -132,6 +132,30 @@ if has appimage; then cp "$STAGE/usr/share/applications/$APP_ID.desktop" "$APPDIR/$APP_ID.desktop" cp "$STAGE/usr/share/icons/hicolor/256x256/apps/$APP_ID.png" "$APPDIR/$APP_ID.png" ln -s "$APP_ID.png" "$APPDIR/.DirIcon" + # Libraries winit opens at run time that a desktop may lack (the AppImage catalog's test system has no + # libxkbcommon-x11, and the window then fails to open). They go beside ONNX Runtime in usr/lib//, + # which the executable's DT_RPATH names (apps/app/build.rs). libxcb, libX11 and the GL/Vulkan drivers are + # the host's, as in every AppImage (AppImage's excludelist). Ubuntu: libxkbcommon0 libxkbcommon-x11-0 libxcb-xkb1. + for soname in libxkbcommon.so.0 libxkbcommon-x11.so.0 libxcb-xkb.so.1; do + lib="" + for dir in "/usr/lib/$ARCH-linux-gnu" "/lib/$ARCH-linux-gnu" /usr/lib64 /usr/lib; do + if [[ -e "$dir/$soname" ]]; then lib="$dir/$soname"; break; fi + done + if [[ -z "$lib" ]]; then + echo "error: $soname not found; the AppImage bundles it (Ubuntu: apt-get install libxkbcommon0 libxkbcommon-x11-0 libxcb-xkb1)" >&2 + exit 1 + fi + cp -L "$lib" "$APPDIR/usr/lib/$APP/$soname" + done + # Their licences (MIT/X11) ship beside them (NOTICE); Debian and Ubuntu keep them as copyright files. + for pkg in libxkbcommon0:libxkbcommon libxcb-xkb1:libxcb; do + copyright="/usr/share/doc/${pkg%%:*}/copyright" + if [[ -f "$copyright" ]]; then + cp "$copyright" "$APPDIR/usr/lib/$APP/LICENSE-${pkg#*:}.txt" + else + warn "$copyright not found; add the ${pkg#*:} licence beside the bundled library by hand" + fi + done TOOL="${APPIMAGETOOL:-$(command -v appimagetool || true)}" if [[ -z "$TOOL" ]]; then From 1740135d2bc321e2c244af7a51217cf1f735094b Mon Sep 17 00:00:00 2001 From: Andrew Frahn Date: Tue, 1 Dec 2026 23:22:06 +1100 Subject: [PATCH 11/26] Cmd/Ctrl+K focuses the Add Keyword box instead of toggling the side panel Credit: tangentsoft Co-Authored-By: Claude Sonnet 5.5 --- crates/ui-egui/src/menus.rs | 5 +- crates/ui-egui/src/panels/right.rs | 28 +++++++++++ .../ui-egui/src/tests_docking_acceptance.rs | 10 ++-- crates/ui-egui/src/tests_keywording.rs | 50 +++++++++++++++++++ crates/ui-egui/src/tests_masking.rs | 7 ++- .../src/content/docs/library/keywords.mdx | 2 +- .../src/content/docs/reference/shortcuts.md | 2 +- .../2026-12-01-cmd-k-focuses-add-keyword.md | 2 + 8 files changed, 99 insertions(+), 7 deletions(-) create mode 100644 docs/whats-new/2026-12-01-cmd-k-focuses-add-keyword.md diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index de28c120ac..11a71aea25 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -2073,7 +2073,10 @@ pub fn run_ui_command(app: &mut LccApp, id: &str, p: &Value) -> Option { - panel(app, &ctx, RightPanel::Keywords, "Keywords"); + // ⌘K puts the cursor in the Add keyword box (as Lightroom Classic does) instead of + // toggling the side panel on and off — which in the Library full column made the pinned + // histogram and the other panels appear and disappear beneath it + crate::panels::right::focus_add_keyword(app, &ctx); Ok(Value::Null) } "panel.versions" => { diff --git a/crates/ui-egui/src/panels/right.rs b/crates/ui-egui/src/panels/right.rs index d306bfa9bf..85d325101a 100644 --- a/crates/ui-egui/src/panels/right.rs +++ b/crates/ui-egui/src/panels/right.rs @@ -1154,6 +1154,34 @@ fn red_eye(app: &mut LccApp, ui: &mut egui::Ui, id: PhotoId) { }); } +/// `panel.keywords` (⌘K): put the cursor in the Keywording panel's Add keyword box, as Lightroom +/// Classic's ⌘K does. Keywording is the Library module's panel, so this does nothing elsewhere. +/// Where the box isn't on screen yet (both sides hidden by `Tab`, the right side folded away, a +/// different docked panel standing alone, the section folded) the right side and the Keywords panel +/// are brought back first. The column's layout is otherwise left as it is: the pinned histogram and +/// the other panels stay put; the command no longer toggles the side panel on and off. +pub fn focus_add_keyword(app: &mut LccApp, ctx: &egui::Context) { + if app.ui.module != crate::module::ModuleId::Library { + return; + } + // a docked panel other than Keywords standing alone: switch it to Keywords + if !matches!(app.ui.right, RightPanel::None | RightPanel::Keywords) { + app.ui.right = RightPanel::Keywords; + } + // bring the right side back (Tab, the top bar's button, or a tool may have hidden it) + if !app.ui.right_edge || app.ui.right_collapsed { + app.ui.right_edge = true; + app.ui.right_collapsed = false; + } + app.ui.hidden_panels.retain(|h| h.right_panel() != Some(RightPanel::Keywords)); + // the box is drawn by keywording(); unfold it in whichever view is showing (a no-op in the other) + crate::panels::classic::set_open(app, crate::module::PanelId::Keywording, true); + if app.ui.section_folded("keywording") { + app.ui.toggle_folded("keywording"); + } + ctx.memory_mut(|m| m.request_focus(crate::text_field::id("field:keyword"))); +} + fn keywords(app: &mut LccApp, ui: &mut egui::Ui, id: PhotoId) { // (the box is the selection's: the active photo only says that there is one) if app.session.catalog.photo(id).is_none() { diff --git a/crates/ui-egui/src/tests_docking_acceptance.rs b/crates/ui-egui/src/tests_docking_acceptance.rs index 0c15388ebb..6f61ed60ea 100644 --- a/crates/ui-egui/src/tests_docking_acceptance.rs +++ b/crates/ui-egui/src/tests_docking_acceptance.rs @@ -119,15 +119,19 @@ fn key(h: &mut Headless, key: egui::Key) { #[test] fn content_text_edit_retains_command_keys_and_typed_text() { let mut h = app(); + // Keywording (and its Add keyword box) is the Library module's panel + h.app.run("module.library", json!({})).unwrap(); h.app.run("app.setShortcut", json!({"id":"panel.crop","shortcut":"K"})).unwrap(); h.app.run("panel.keywords", json!({})).unwrap(); h.step(); h.step(); - let result = h.request("ui.clickWidget", json!({"id":"field:keywordFilter"}), std::time::Duration::from_secs(20)); + // ⌘K focuses the Add keyword box in place; the side panel isn't switched to the Keywords tab + assert_eq!(h.app.ui.right, RightPanel::None); + assert!(h.view.ctx.memory(|m| m.has_focus(crate::text_field::id("field:keyword"))), "⌘K focuses the Add keyword box"); + let result = h.request("ui.clickWidget", json!({"id": "field:keyword"}), std::time::Duration::from_secs(20)); assert_eq!(result["ok"], true, "{result}"); key(&mut h, egui::Key::K); h.app.synthetic.push(Event::Text("dock search".into())); h.step(); - assert_eq!(h.app.ui.right, RightPanel::Keywords); - assert_eq!(h.view.ctx.data(|data| data.get_temp::(egui::Id::new("keyword-list-filter"))).as_deref(), Some("dock search")); + assert_eq!(h.view.ctx.data(|data| data.get_temp::(egui::Id::new("kw-input"))).as_deref(), Some("dock search")); } diff --git a/crates/ui-egui/src/tests_keywording.rs b/crates/ui-egui/src/tests_keywording.rs index f8282f731e..44530035a9 100644 --- a/crates/ui-egui/src/tests_keywording.rs +++ b/crates/ui-egui/src/tests_keywording.rs @@ -360,6 +360,56 @@ fn the_sections_fold_by_their_titles() { assert!(has(&h, "field:keyword") && has(&h, "field:keywordFilter") && has(&h, "keywordChip:beach")); } +// ⌘K (panel.keywords) puts the cursor in the Add keyword box, as Lightroom Classic's does, unfolding +// Keywording first if it was folded away. +#[test] +fn cmd_k_focuses_the_add_keyword_box_and_opens_keywording() { + let (mut h, _) = two_selected(); + ask(&mut h, "ui.clickWidget", json!({"id": "section:keywording"})); + assert!(!has(&h, "field:keyword"), "Keywording is shut"); + h.app.run("panel.keywords", json!({})).unwrap(); + h.step(); + h.step(); + assert!(has(&h, "field:keyword"), "⌘K reopened Keywording"); + assert!(h.view.ctx.memory(|m| m.has_focus(crate::text_field::id("field:keyword"))), "⌘K focuses the Add keyword box"); +} + +// Keywording is a Library action: in Develop ⌘K does nothing. +#[test] +fn cmd_k_does_nothing_in_develop() { + let (mut h, _) = two_selected(); + ask(&mut h, "engine.execute", json!({"command": "module.develop"})); + assert!(matches!(h.app.ui.module, crate::module::ModuleId::Develop)); + let right = h.app.ui.right; + h.app.run("panel.keywords", json!({})).unwrap(); + h.step(); + h.step(); + assert_eq!(h.app.ui.right, right, "the panel is unchanged"); + assert!(!h.view.ctx.memory(|m| m.has_focus(crate::text_field::id("field:keyword"))), "no cursor taken"); + assert!(!has(&h, "field:keyword"), "the box isn't drawn"); +} + +// Tab hides both sidebars; ⌘K brings the right one back so the box is on screen to focus. +#[test] +fn cmd_k_brings_the_right_side_back_after_tab_hides_it() { + let (mut h, _) = two_selected(); + ask(&mut h, "ui.set", json!({"view": "photoGrid", "right": "none"})); + assert_eq!(h.app.ui.right, crate::state::RightPanel::None); + assert!(h.app.ui.right_edge, "the column is up"); + assert!(has(&h, "field:keyword"), "the Keywording box is drawn"); + assert_eq!(h.request("ui.key", json!({"key": "Tab"}), T)["ok"], true); + h.step(); + h.step(); + assert!(!h.app.ui.right_edge, "Tab hid the right side"); + assert!(!has(&h, "field:keyword"), "the box is gone with the column"); + h.app.run("panel.keywords", json!({})).unwrap(); + h.step(); + h.step(); + assert!(h.app.ui.right_edge, "⌘K restored the right side"); + assert!(has(&h, "field:keyword"), "⌘K redrew the Add keyword box"); + assert!(h.view.ctx.memory(|m| m.has_focus(crate::text_field::id("field:keyword"))), "⌘K focuses the Add keyword box"); +} + // Given the grouped box, the suggestions say only the keyword's own name (its whole path when two // of them have the same name; `suggestion_names`) and still give the whole keyword. Grouped or not, // they sit in three equal columns (issue #222). diff --git a/crates/ui-egui/src/tests_masking.rs b/crates/ui-egui/src/tests_masking.rs index fadd0454c1..53c6eb7860 100644 --- a/crates/ui-egui/src/tests_masking.rs +++ b/crates/ui-egui/src/tests_masking.rs @@ -942,7 +942,12 @@ fn double_click_in_crop_box_applies_the_crop() { #[test] fn option_digit_toggles_keyword_from_set() { - let mut h = detail("panel.keywords"); + // Keywording (and its keyword-set buttons) is the Library module's panel + let mut h = library_loupe(); + exec(&mut h, "panel.keywords", json!({})); + // ⌘K left the cursor in the Add keyword box: click the photo so ⌥1 reaches the keyword set + let c = h.app.image_rect.expect("image on screen").center(); + assert_eq!(h.request("ui.click", json!({"x": c.x, "y": c.y}), T)["ok"], true); exec(&mut h, "photo.setMeta", json!({"addKeywords": ["alpha"]})); exec(&mut h, "photo.setMeta", json!({"removeKeywords": ["alpha"]})); let has = |h: &Headless| develop_photo_keywords(h).iter().any(|k| k == "alpha"); diff --git a/docs/manual-site/src/content/docs/library/keywords.mdx b/docs/manual-site/src/content/docs/library/keywords.mdx index 7198b9eecc..744f74a68d 100644 --- a/docs/manual-site/src/content/docs/library/keywords.mdx +++ b/docs/manual-site/src/content/docs/library/keywords.mdx @@ -13,7 +13,7 @@ import Shot from '../../../components/Shot.astro'; -- **Keywording** panel: type to add keywords to the selection; chips show them (**Keywords**, **& Containing**, **Will Export**). Suggestions appear as chips. A chip says the keyword's own name (hover for its full path; two chips with the same name show their paths), and **& Containing** adds the keywords it sits inside. A star on a chip means only some selected photos have it. +- **Keywording** panel: type to add keywords to the selection; chips show them (**Keywords**, **& Containing**, **Will Export**). Suggestions appear as chips. A chip says the keyword's own name (hover for its full path; two chips with the same name show their paths), and **& Containing** adds the keywords it sits inside. A star on a chip means only some selected photos have it. **`Cmd/Ctrl+K`** puts the cursor in the Add Keyword box (and brings the right side back — the Keywords panel, or the whole Library column with its pinned histogram — if `Tab` or the fold button had hidden it); the right column's other panels and the histogram stay as they are. - Hierarchical keywords: `parent|child|leaf`. Filtering a parent includes its children; renaming a parent moves them. - **Keyword List**: every keyword with photo counts, a filter box, a tri-state box for the selection and an arrow to show its photos. **+** creates a keyword (name, synonyms, parent, add to selection), double-click edits it, **−** deletes with confirmation. - Context menu: create inside, move, **Merge**, set a default parent, **Purge Unused Keywords**, per-keyword export flags. diff --git a/docs/manual-site/src/content/docs/reference/shortcuts.md b/docs/manual-site/src/content/docs/reference/shortcuts.md index 5ce9c0e93e..eefec6fb69 100644 --- a/docs/manual-site/src/content/docs/reference/shortcuts.md +++ b/docs/manual-site/src/content/docs/reference/shortcuts.md @@ -71,7 +71,7 @@ sidebar: | `Ctrl+Up` | Increase Flag Status | | `=` | Increase Grid Thumbnail Size | | `I` | Info | -| `Ctrl+K` | Keywords | +| `Ctrl+K` | Focus the Add Keyword box | | `Ctrl+Alt+O` | Layout Image | | `E` | Loupe | | `Alt+0` | Next Keyword Set | diff --git a/docs/whats-new/2026-12-01-cmd-k-focuses-add-keyword.md b/docs/whats-new/2026-12-01-cmd-k-focuses-add-keyword.md new file mode 100644 index 0000000000..7a3b5797df --- /dev/null +++ b/docs/whats-new/2026-12-01-cmd-k-focuses-add-keyword.md @@ -0,0 +1,2 @@ +### ⌘K puts the cursor in the Add Keyword box +- `Cmd/Ctrl+K` now focuses the Add Keyword box in the Library, as Lightroom Classic does, instead of toggling the side panel; the pinned histogram and other panels stay put. Thanks to tangentsoft. From 013140d830351b456f2614dc38b5b77d27ead1bc Mon Sep 17 00:00:00 2001 From: Andrew Frahn Date: Wed, 2 Dec 2026 00:00:47 +1100 Subject: [PATCH 12/26] #1696: keep the Photo Grid size limit from collapsing for one-photo-per-day views MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit photo_cut searched for the largest size at which full rows keep their layout, comparing only rows that do not end their group. When every row ends its group (a photo per day), nothing constrained the size, so the search handed back the smallest one: the slider and the = / - keys capped at 90 px and Auto date grouping fell back to years. With no constrained rows there is no cut-off; the limit stays at the top. This also stops the grid from oscillating between day and year headers frame to frame, which made headless::tests::grid_groups_by_capture_date flaky since the size keys landed (#1762). Manual: Library ▸ Browse (grid size); whats-new + changelog entry. Co-Authored-By: ZCode --- crates/ui-egui/src/panels/grid.rs | 25 +++++++++++++++++++ .../2026-12-02-grid-size-one-photo-per-day.md | 2 ++ .../src/content/docs/library/browse.mdx | 2 +- .../2026-12-02-grid-size-one-photo-per-day.md | 2 ++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 docs/changelog/unreleased/2026-12-02-grid-size-one-photo-per-day.md create mode 100644 docs/whats-new/2026-12-02-grid-size-one-photo-per-day.md diff --git a/crates/ui-egui/src/panels/grid.rs b/crates/ui-egui/src/panels/grid.rs index d594b3d5b3..1ec853a13e 100644 --- a/crates/ui-egui/src/panels/grid.rs +++ b/crates/ui-egui/src/panels/grid.rs @@ -900,6 +900,13 @@ fn photo_cut(prev: Option<&GridStep>, shapes: &[f32], avail_w: f32, footer: f32, let spans: Vec<(usize, usize)> = runs.iter().map(|r| (r.start, r.count)).collect(); let full = |size: f32| row_geoms(&layout_with_footer(shapes, &spans, avail_w, size, false, footer), &spans); let top = full(crate::state::THUMB_SIZE_MAX); + // Rows that end a group grow alone and are left out of the comparison. When every row is one + // (a photo per group, say a library with one photo per day) nothing constrains the size: the + // search below would then "hold" everywhere and hand back the smallest size, collapsing the + // slider and, with `Auto` grouping, the granularity with it. + if top.iter().all(|row| row.2 == 0) { + return crate::state::THUMB_SIZE_MAX; + } let room = (crate::state::THUMB_SIZE_MAX - crate::state::THUMB_SIZE_MIN).floor() as u32; crate::state::THUMB_SIZE_MAX - last_true(room, |k| full(crate::state::THUMB_SIZE_MAX - k as f32) == top) as f32 } @@ -2593,6 +2600,24 @@ mod tests { assert_eq!(resolve_group(GroupBy::Year, 400.0), GroupBy::Year); } + /// With one photo per group every row ends its group, so nothing constrains the thumbnail size: + /// the cut-off stays at the top instead of collapsing to the smallest size (which, with `Auto` + /// grouping, would also drop the granularity to months or years). + #[test] + fn a_grid_of_one_photo_per_group_has_no_cut_off() { + let runs = Arc::new(vec![ + DateRun { key: "2026-03-01".into(), label: String::new(), start: 0, count: 1 }, + DateRun { key: "2026-03-09".into(), label: String::new(), start: 1, count: 1 }, + DateRun { key: "2026-03-17".into(), label: String::new(), start: 2, count: 1 }, + ]); + let cut = photo_cut(None, &[1.5, 1.5, 1.5], 1000.0, 0.0, &runs); + assert_eq!(cut, crate::state::THUMB_SIZE_MAX); + // a group with more than one row still constrains the size + let shared = Arc::new(vec![DateRun { key: "2026-03".into(), label: String::new(), start: 0, count: 3 }]); + let cut = photo_cut(None, &[1.5, 1.5, 1.5], 1000.0, 0.0, &shared); + assert!(cut < crate::state::THUMB_SIZE_MAX, "{cut}"); + } + /// The Compact strip under the thumbnails adds the same height to every cell and keeps the /// pictures' widths: the marks sit under the picture, never over it. #[test] diff --git a/docs/changelog/unreleased/2026-12-02-grid-size-one-photo-per-day.md b/docs/changelog/unreleased/2026-12-02-grid-size-one-photo-per-day.md new file mode 100644 index 0000000000..b80bf96802 --- /dev/null +++ b/docs/changelog/unreleased/2026-12-02-grid-size-one-photo-per-day.md @@ -0,0 +1,2 @@ +## Library +- Fixed the Photo Grid's size limit collapsing to the smallest size when every photo sits in a group of its own (one photo per day), which also forced `Auto` date grouping to months or years there. diff --git a/docs/manual-site/src/content/docs/library/browse.mdx b/docs/manual-site/src/content/docs/library/browse.mdx index 3f46dfe8da..6e8a06bc28 100644 --- a/docs/manual-site/src/content/docs/library/browse.mdx +++ b/docs/manual-site/src/content/docs/library/browse.mdx @@ -11,7 +11,7 @@ import { Aside } from '@astrojs/starlight/components'; -- **Photo Grid** and **Square Grid**: thumbnails with badges (flag, stars, edited, GPS position, keywords, stack count, virtual copy). A click on the GPS badge (a map marker) opens the Map on that photo; the filmstrip shows the marker with its marks too. Size slider in the bottom bar, or `=` / `-`: each press adds or takes away one column in Square Grid, and goes to the next size at which a row changes in Photo Grid. +- **Photo Grid** and **Square Grid**: thumbnails with badges (flag, stars, edited, GPS position, keywords, stack count, virtual copy). A click on the GPS badge (a map marker) opens the Map on that photo; the filmstrip shows the marker with its marks too. Size slider in the bottom bar, or `=` / `-`: each press adds or takes away one column in Square Grid, and goes to the next size at which a row changes in Photo Grid. In Photo Grid the largest size is where full rows stop changing; a view where every photo sits in a group of its own (one photo per day, say) has no such limit, so the slider and the keys always reach the full range. - **Grid View Style** (**View** menu): compact or expanded cells, index numbers, badges, caption (file name, exposure, capture date). **Grid Info** toggles the info overlay. - **Loupe** (**Detail View**, `D`, or Enter on a photo): one photo with the Navigator, zoom (Fit, Fill, 100%) and filmstrip. In a grid, `⌘=` opens the active photo here at Fit; in the loupe, `=` / `-` go back to the grid and make its thumbnails one step larger or smaller. - **Compare** (`Shift+C`): two photos side by side, *Select* and *Candidate*, zoom linked. **Swap** and **Make Select** in the bar. diff --git a/docs/whats-new/2026-12-02-grid-size-one-photo-per-day.md b/docs/whats-new/2026-12-02-grid-size-one-photo-per-day.md new file mode 100644 index 0000000000..266e6d36fb --- /dev/null +++ b/docs/whats-new/2026-12-02-grid-size-one-photo-per-day.md @@ -0,0 +1,2 @@ +### Grid size with one photo per day +- In the Photo Grid, a view where every photo is in a group of its own (one photo per day) no longer caps the size slider and the `=` / `-` keys at the smallest size, and `Auto` date grouping no longer collapses to months or years there. From 72d42537ecc56429d72f92df7862e500010f7a70 Mon Sep 17 00:00:00 2001 From: Andrew Frahn Date: Wed, 2 Dec 2026 00:00:55 +1100 Subject: [PATCH 13/26] #1696: finish unknown-face grouping and face-scoped maintenance Review follow-ups on top of the grouping work: - Localizations: every new UI string now has entries in all 17 fork catalogs (the plain tr(...) strings were missing; the coverage tests fail on gaps, and PRs to staging run no tests). - Grouping holds a row in the activity stack: an empty scope resolves without spawning a worker, the worker reports progress, and cancelling it from the stack stops the job instead of silently restarting it. - A People selection survives a refresh that no longer lists one of its faces: retained snapshots are collected best-effort, so one stale face no longer drops the whole selection, and a face present with its box unchanged stays selected. - faces.maintain now refreshes the People listing and the faces epoch, so recognition, rebuild and clear reflect at once. - Manual: face maintenance wording for the selected-faces scope and the new Clear action; grouping notes its activity row. Co-Authored-By: ZCode --- crates/engine/src/cmd/face_recognize.rs | 2 +- crates/engine/src/faces_cluster.rs | 84 +++++++++++++++++-- crates/ui-egui/locales/fork/cs.json | 27 ++++++ crates/ui-egui/locales/fork/de.json | 27 ++++++ crates/ui-egui/locales/fork/es.json | 27 ++++++ crates/ui-egui/locales/fork/fi.json | 27 ++++++ crates/ui-egui/locales/fork/fr.json | 27 ++++++ crates/ui-egui/locales/fork/id.json | 27 ++++++ crates/ui-egui/locales/fork/it.json | 27 ++++++ crates/ui-egui/locales/fork/ja.json | 27 ++++++ crates/ui-egui/locales/fork/ka.json | 27 ++++++ crates/ui-egui/locales/fork/pl.json | 27 ++++++ crates/ui-egui/locales/fork/pt-br.json | 27 ++++++ crates/ui-egui/locales/fork/ru.json | 27 ++++++ crates/ui-egui/locales/fork/sv.json | 27 ++++++ crates/ui-egui/locales/fork/uk.json | 27 ++++++ crates/ui-egui/locales/fork/vi.json | 27 ++++++ crates/ui-egui/locales/fork/zh-hans.json | 27 ++++++ crates/ui-egui/locales/fork/zh-hant.json | 27 ++++++ crates/ui-egui/src/lib.rs | 4 +- crates/ui-egui/src/panels/unnamed.rs | 54 +++++++++++- .../manual-site/src/content/docs/ai/faces.mdx | 2 +- .../src/content/docs/library/people.mdx | 2 +- 23 files changed, 592 insertions(+), 15 deletions(-) diff --git a/crates/engine/src/cmd/face_recognize.rs b/crates/engine/src/cmd/face_recognize.rs index db67b6a16c..b03e75ef80 100644 --- a/crates/engine/src/cmd/face_recognize.rs +++ b/crates/engine/src/cmd/face_recognize.rs @@ -2601,7 +2601,7 @@ mod imp { embedded.push(((*photo, *index), Arc::clone(e))); } } - let answer = s.faces.clusters.get(stamp.finish(), embedded, threshold); + let answer = s.faces.clusters.get(stamp.finish(), embedded, threshold, &s.activity); let clustering = answer.is_none(); let mut groups = std::collections::HashMap::new(); if let Some(answer) = answer { diff --git a/crates/engine/src/faces_cluster.rs b/crates/engine/src/faces_cluster.rs index 57f4767cd3..0ff8f8effb 100644 --- a/crates/engine/src/faces_cluster.rs +++ b/crates/engine/src/faces_cluster.rs @@ -10,6 +10,8 @@ use std::sync::{ mpsc, }; +use crate::activity::{Activity, Cancel}; + pub(crate) type Key = (u64, usize); pub(crate) type Input = Vec<(Key, Arc<[f32]>)>; @@ -32,6 +34,12 @@ pub(crate) struct Answer { _keep_alive: Input, } +impl Answer { + fn empty() -> Self { + Self { order: HashMap::new(), groups: HashMap::new(), _keep_alive: Vec::new() } + } +} + impl Drop for Job { fn drop(&mut self) { self.cancel.store(true, Ordering::Relaxed); @@ -40,18 +48,26 @@ impl Drop for Job { impl Clusters { /// Start a new computation if the input changed. A stale result is never exposed. - pub fn get(&mut self, stamp: u64, input: Input, threshold: f32) -> Option<&Answer> { + pub fn get(&mut self, stamp: u64, input: Input, threshold: f32, activity: &Activity) -> Option<&Answer> { if self.stamp != Some(stamp) { self.job = None; self.result = None; self.stamp = Some(stamp); + if input.is_empty() { + self.result = Some((stamp, Answer::empty())); + return self.result.as_ref().map(|(_, answer)| answer); + } let cancel = Arc::new(AtomicBool::new(false)); let worker_cancel = Arc::clone(&cancel); + let task = activity.start("faces", "Grouping unknown faces", Cancel::Flag(Arc::clone(&cancel))); + task.progress(0, input.len() as u64); let (tx, rx) = mpsc::channel(); if std::thread::Builder::new() .name("face-clusters".into()) .spawn(move || { - if let Some(mut answer) = group(&input, threshold, &worker_cancel) { + let _guard = task; + let total = input.len() as u64; + if let Some(mut answer) = group(&input, threshold, &worker_cancel, |done| _guard.progress(done, total)) { answer._keep_alive = input; let _ = tx.send(answer); } @@ -70,8 +86,14 @@ impl Clusters { self.job = None; } Err(mpsc::TryRecvError::Disconnected) => { + let cancelled = job.cancel.load(Ordering::Relaxed); self.job = None; - self.stamp = None; + if cancelled { + // Keep the stamp so cancelling from the activity stack does not immediately restart the same job. + self.result = Some((stamp, Answer::empty())); + } else { + self.stamp = None; + } } Err(mpsc::TryRecvError::Empty) => {} } @@ -80,13 +102,16 @@ impl Clusters { } } -fn group(input: &Input, threshold: f32, cancel: &AtomicBool) -> Option { +fn group(input: &Input, threshold: f32, cancel: &AtomicBool, mut on_progress: impl FnMut(u64)) -> Option { let mut anchors: Vec = Vec::new(); let mut members: Vec> = Vec::new(); for (i, (key, embedding)) in input.iter().enumerate() { if cancel.load(Ordering::Relaxed) { return None; } + if i % 64 == 0 { + on_progress(i as u64); + } let mut best: Option<(usize, f32)> = None; for (group, anchor) in anchors.iter().enumerate() { if group % 256 == 0 && cancel.load(Ordering::Relaxed) { @@ -107,6 +132,7 @@ fn group(input: &Input, threshold: f32, cancel: &AtomicBool) -> Option { members.push(vec![*key]); } } + on_progress(input.len() as u64); // Larger groups come first; stable ordering breaks ties by the first face in catalog order. members.sort_by(|a, b| b.len().cmp(&a.len()).then_with(|| a.first().cmp(&b.first()))); let mut order = HashMap::new(); @@ -132,19 +158,30 @@ mod tests { fn compares_faces_across_the_entire_input_and_checks_the_anchor() { let vector = |x: &[f32]| Arc::<[f32]>::from(x); let input = vec![((1, 0), vector(&[1.0, 0.0])), ((2, 0), vector(&[0.0, 1.0])), ((4000, 0), vector(&[1.0, 0.0]))]; - let answer = group(&input, 0.9, &AtomicBool::new(false)).unwrap(); + let answer = group(&input, 0.9, &AtomicBool::new(false), |_| {}).unwrap(); assert_eq!(answer.groups.get(&(1, 0)), answer.groups.get(&(4000, 0))); assert!(answer.groups.contains_key(&(1, 0))); assert!(!answer.groups.contains_key(&(2, 0))); } + #[test] + fn empty_input_resolves_immediately_without_spawning_a_job() { + let activity = Activity::default(); + let mut clusters = Clusters::default(); + let result = clusters.get(1, Vec::new(), 0.9, &activity).expect("empty input resolves immediately"); + assert!(result.groups.is_empty()); + assert!(result.order.is_empty()); + assert!(activity.list().is_empty()); + } + #[test] fn changing_the_input_discards_the_previous_answer() { + let activity = Activity::default(); let input = vec![((1, 0), Arc::from([1.0f32])), ((4000, 0), Arc::from([1.0f32]))]; let mut clusters = Clusters::default(); let deadline = std::time::Instant::now() + std::time::Duration::from_secs(5); loop { - if let Some(result) = clusters.get(1, input.clone(), 0.9) { + if let Some(result) = clusters.get(1, input.clone(), 0.9, &activity) { assert_eq!(result.groups.len(), 2); assert_eq!(result.order.len(), 2); break; @@ -155,7 +192,7 @@ mod tests { let changed = vec![((1, 0), Arc::from([1.0f32]))]; let deadline = std::time::Instant::now() + std::time::Duration::from_secs(5); loop { - if let Some(result) = clusters.get(2, changed.clone(), 0.9) { + if let Some(result) = clusters.get(2, changed.clone(), 0.9, &activity) { assert!(result.groups.is_empty()); assert_eq!(result.order.len(), 1); break; @@ -167,6 +204,37 @@ mod tests { #[test] fn cancelled_work_does_not_publish_a_result() { - assert!(group(&vec![((1, 0), Arc::from([1.0f32]))], 0.9, &AtomicBool::new(true)).is_none()); + assert!(group(&vec![((1, 0), Arc::from([1.0f32]))], 0.9, &AtomicBool::new(true), |_| {}).is_none()); + } + + #[test] + fn activity_cancel_stops_clustering_without_restarting_the_same_stamp() { + let activity = Activity::default(); + // Enough distinct 64-D vectors so the task stays alive long enough to cancel cleanly, or finishes normally if very fast. + let input: Input = (0..1200) + .map(|i| { + let mut v = vec![0.0f32; 64]; + v[i % 64] = 1.0; + v[(i / 64) % 64] += 0.1 * ((i % 7) as f32 + 1.0); + ((i as u64, 0), Arc::<[f32]>::from(v)) + }) + .collect(); + let mut clusters = Clusters::default(); + let _ = clusters.get(7, input.clone(), 0.9999, &activity); + for task in activity.list() { + assert_eq!(task.kind, "faces"); + assert_eq!(task.label, "Grouping unknown faces"); + assert!(task.cancellable); + activity.cancel(task.id).expect("task can be cancelled"); + } + let deadline = std::time::Instant::now() + std::time::Duration::from_secs(5); + loop { + if clusters.get(7, input.clone(), 0.9999, &activity).is_some() { + break; + } + assert!(std::time::Instant::now() < deadline); + std::thread::yield_now(); + } + assert!(activity.list().is_empty()); } } diff --git a/crates/ui-egui/locales/fork/cs.json b/crates/ui-egui/locales/fork/cs.json index 2e45a5b2b0..e54d946054 100644 --- a/crates/ui-egui/locales/fork/cs.json +++ b/crates/ui-egui/locales/fork/cs.json @@ -280,6 +280,7 @@ "Auto-Tag Selected Photos": "Automaticky označit vybrané fotografie", "Auto-fill new books with the selected photos": "Automaticky vyplnit nové knihy vybranými fotografiemi", "Automatic (FP16 when supported)": "Automaticky (FP16, pokud je podporováno)", + "Automatic grouping restored": "Automatické seskupování obnoveno", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "Automatický režim upřednostňuje dedikované GPU NVIDIA a výpočty v poloviční přesnosti (FP16), pokud jsou podporovány.", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "Automaticky použije SAM 3, pokud je nainstalován, jinak SAM 2.1. Masky podle popisu vždy používají SAM 3.", "Automatically Toggle Mask Overlay": "Automaticky přepínat překrytí masky", @@ -302,6 +303,7 @@ "Background Preparation Settings": "Nastavení přípravy na pozadí", "Backup": "Záloha", "Backup folder": "Složka záloh", + "Balanced": "Vyvážené", "Balanced: a standard dial feel with responsive mid-range acceleration.": "Vyvážené: běžný pocit z kolečka s citlivým zrychlením ve středním rozsahu.", "Band": "Pás", "Base tone": "Základní tón", @@ -548,9 +550,12 @@ "Clear Rating": "Zrušit hodnocení", "Clear Role": "Zrušit roli", "Clear Search Index": "Vymazat index vyhledávání", + "Clear Selected Face Data": "Vymazat data vybraných obličejů", "Clear Sensor Dust Map": "Vymazat mapu prachu na snímači", "Clear Slideshow Music": "Odebrat hudbu prezentace", "Clear Tracklogs": "Vymazat záznamy tras", + "Clear selection": "Zrušit výběr", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "Vymaže uložená vektorová data a návrhy pro vybrané obličeje. Indexování na pozadí je může znovu vytvořit. Jména a rozhodnutí zůstanou zachována.", "Clear…": "Vymazat…", "Click Through": "Proklik", "Click a cell on a page to edit it.": "Kliknutím na buňku na stránce ji upravíte.", @@ -848,6 +853,7 @@ "Describe photos…": "Popsat fotografie…", "Deselect Active Photo": "Zrušit výběr aktivní fotografie", "Deselect Unflagged Photos": "Zrušit výběr fotografií bez příznaku", + "Deselect group": "Zrušit výběr skupiny", "Destination": "Cíl", "Detach Mask List": "Oddělit seznam masek", "Detach the mask list": "Oddělit seznam masek", @@ -858,6 +864,7 @@ "Detect and Recognize": "Detekovat a rozpoznat", "Detecting faces…": "Rozpoznávání obličejů…", "Detecting orientation": "Zjišťování orientace", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "Detekce proběhne na celých fotografiích obsahujících vybrané obličeje, včetně ostatních obličejů na těchto fotografiích.", "Detection sensitivity": "Citlivost detekce", "Develop Settings": "Nastavení vyvolání", "Develop preset": "Přednastavení vyvolání", @@ -1129,7 +1136,9 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "Rozpoznávání obličejů je vypnuté. Zapněte jej, abyste dostávali návrhy jmen a viděli podobné obličeje pohromadě.", "Face recognition is on": "Rozpoznávání obličejů je zapnuté", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "Rozpoznávání obličejů potřebuje k navrhování jmen model: jednorázové stažení v Nastavení.", + "Face removed from similarity groups": "Obličej odebrán ze skupin podobnosti", "Face scan": "Hledání tváří", + "Faces without a displayed look-alike group.": "Obličeje bez zobrazené skupiny podobných obličejů.", "Fades": "Prolínání", "Fail at least one of these conditions": "nesplňují aspoň jednu z těchto podmínek", "Failed photos": "Neúspěšně zpracované fotografie", @@ -1384,7 +1393,11 @@ "Grid: first photo of the view": "Mřížka: první fotografie zobrazení", "Grid: last photo of the view": "Mřížka: poslední fotografie zobrazení", "Group Unnamed Faces": "Seskupit nepojmenované obličeje", + "Grouping": "Seskupování", + "Grouping faces across the library in the background…": "Seskupování obličejů v celé knihovně na pozadí…", + "Grouping unknown faces": "Seskupování neznámých obličejů", "Groups": "Skupiny", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "Skupiny zahrnují obličeje z celého aktuálního filtru knihovny; výběr skupiny zahrne i její obličeje na dalších stránkách.", "Grow": "Rozšířit", "Guided Laplacian": "Řízený laplacián", "Guided Upright isn't supported; straighten these photos again in Transform.": "Narovnání perspektivy s vodítky není podporováno; narovnejte tyto fotografie znovu v panelu Transformace.", @@ -1860,6 +1873,7 @@ "Looking up new photos in Immich": "Vyhledávání nových fotografií v Immich", "Looks at every photo on the server again, not only those changed since the last pass.": "Projde znovu všechny fotografie na serveru, nejen ty změněné od posledního průchodu.", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "Na pozadí posoudí oči fotografovaných stejně jako pás očí, asi sekundu na fotografii. Fotografií s příznakem Vybráno se nedotkne.", + "Loose": "Volné", "Loupe": "Lupa", "Loupe Background": "Pozadí lupy", "Loupe Info": "Informace v lupě", @@ -2235,6 +2249,7 @@ "Only one of the photo and the reference records its aperture": "Clonu uvádí jen fotografie, nebo jen reference", "Only the files and folders you pick": "Jen soubory a složky, které vyberete", "Only the first published photos were asked.": "Dotázáno bylo jen na prvních publikovaných fotografií.", + "Only the selected faces are processed.": "Zpracují se pouze vybrané obličeje.", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "Přidají se jen tyto fotky. Zapněte toto, nebo Nastavení > Složky > Sledovat nové fotky, aby se nové přidávaly průběžně.", "Only you can allow a permission: a click from an agent or a script changes nothing.": "Oprávnění můžete povolit jen vy: kliknutí agenta nebo skriptu nic nezmění.", "Open": "Otevřít", @@ -2289,6 +2304,7 @@ "Other devices see this name. Every device needs its own.": "Ostatní zařízení vidí tento název. Každé zařízení potřebuje vlastní.", "Other models (optional)": "Další modely (volitelné)", "Other server…": "Jiný server…", + "Other unknown faces": "Ostatní neznámé obličeje", "Others get previews to develop; only this device adds photos.": "Ostatní dostávají náhledy k vyvolání; fotky přidává jen toto zařízení.", "Others may also fetch the originals; only this device adds photos.": "Ostatní mohou také stahovat originály; fotky přidává jen toto zařízení.", "Output": "Výstup", @@ -2657,6 +2673,7 @@ "Reload": "Znovu načíst", "Reload MIDI Map": "Znovu načíst mapu MIDI", "Reload Preview": "Znovu načíst náhled", + "Reload the faces and try again": "Načtěte obličeje znovu a zkuste to ještě jednou", "Remember Dialog Choices": "Pamatovat si volby dialogů", "Remember Each Source's Filters Separately": "Pamatovat filtry každého zdroje zvlášť", "Remember as…": "Zapamatovat jako…", @@ -2701,6 +2718,7 @@ "Remove from At Import": "Odebrat ze skupiny Při importu", "Remove from List": "Odebrat ze seznamu", "Remove from Quick Collection": "Odebrat z rychlé kolekce", + "Remove from similarity groups": "Odebrat ze skupin podobnosti", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "Odebrat z katalogu (do nedávno odstraněných; soubory zůstanou na disku)", "Remove from the stack": "Odebrat ze sady", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "Odebrání ponechá soubory na disku a přesune fotografie do nedávno odstraněných.", @@ -2784,6 +2802,7 @@ "Restore Built-ins": "Obnovit vestavěné", "Restore Catalog from Backup…": "Obnovit katalog ze zálohy…", "Restore Generated Fill": "Obnovit generovanou výplň", + "Restore automatic grouping": "Obnovit automatické seskupování", "Restore the photo to use it as the reference": "Obnovte fotografii, abyste ji mohli použít jako referenční", "Resume": "Pokračovat", "Resume Face Scan": "Pokračovat v hledání tváří", @@ -2797,6 +2816,7 @@ "Reverse geocoding is off: choose Offline or Online first": "Zpětné geokódování je vypnuté: nejprve zvolte Offline nebo Online", "Revert Capture Time to Original": "Vrátit původní čas pořízení", "Review Comments": "Zkontrolovat komentáře", + "Review these similar faces before naming or ignoring them.": "Před pojmenováním nebo ignorováním tyto podobné obličeje zkontrolujte.", "Revoke": "Odvolat", "Revoke Plug-in Permission": "Odvolat oprávnění zásuvného modulu", "Right Panel": "Pravý panel", @@ -2941,6 +2961,8 @@ "Select by Color Label": "Vybrat podle barevného štítku", "Select by Flag": "Vybrat podle příznaku", "Select by Rating": "Vybrat podle hodnocení", + "Select group": "Vybrat skupinu", + "Select group for maintenance": "Vybrat skupinu pro údržbu", "Select photos to import": "Vyberte fotografie k importu", "Select photos to move them to this location": "Vyberte fotky, které chcete přesunout na toto místo", "Select photos to see their info.": "Vyberte fotografie, abyste viděli jejich informace.", @@ -3127,6 +3149,7 @@ "Side": "Strana", "Side by Side": "Vedle sebe", "Signed by": "Podepsal", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "Podobné neznámé obličeje jsou níže seskupeny. Vyberte skupinu, zkontrolujte její obličeje a pak je pojmenujte nebo ignorujte.", "Simple": "Jednoduchá", "Single Image / Contact Sheet": "Jeden obrázek / přehled snímků", "Single Page": "Jedna stránka", @@ -3170,6 +3193,7 @@ "Space Zooms To": "Mezerník přibližuje na", "Spacing": "Rozestupy", "Speed-Edit Keys": "Klávesy rychlé úpravy", + "Split Unknown Faces": "Oddělit neznámé obličeje", "Spot Removal": "Odstranění skvrn", "Spread": "Dvoustrana", "Spread View": "Zobrazení dvoustran", @@ -3211,6 +3235,7 @@ "Stop using": "Přestat používat", "Store Presets and Profiles with This Catalog": "Ukládat přednastavení a profily s tímto katalogem", "Strength": "Síla", + "Strict": "Přísné", "Stroke Border": "Ohraničení tahem", "Studio Capture": "Snímání ve studiu", "Studio Session": "Studiová relace", @@ -3386,6 +3411,7 @@ "The second chart photo isn't read yet": "Fotografie druhého terče ještě není načtená", "The second graphics card is left free for previews and thumbnails.": "Druhá grafická karta zůstane volná pro náhledy a miniatury.", "The selected photos are in this location": "Vybrané fotky jsou na tomto místě", + "The selection changed. Reload the faces and try again": "Výběr se změnil. Načtěte obličeje znovu a zkuste to ještě jednou", "The server answers; the key works.": "Server odpovídá; klíč funguje.", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "Server používá certifikát, za který neručí žádná autorita (běžné u domácích serverů). Důvěřujte mu, jen pokud tento otisk SHA-256 odpovídá certifikátu vašeho serveru:", "The size limit picks the highest quality, up to Quality, whose file fits.": "Limit velikosti vybere nejvyšší kvalitu (až do hodnoty Kvalita), při které se soubor vejde.", @@ -3866,6 +3892,7 @@ "removed": "odebráno", "role": "role", "scene-linear Rec. 2020": "lineární Rec. 2020", + "selected faces in People": "vybrané obličeje v Lidé", "selected photos": "vybrané fotografie", "shots": "snímků", "steps": "kroků", diff --git a/crates/ui-egui/locales/fork/de.json b/crates/ui-egui/locales/fork/de.json index 7c16f84455..89572e5574 100644 --- a/crates/ui-egui/locales/fork/de.json +++ b/crates/ui-egui/locales/fork/de.json @@ -263,6 +263,7 @@ "Auto-fill new books with the selected photos": "Neue Bücher automatisch mit den ausgewählten Fotos füllen", "Automatic": "Automatisch", "Automatic (FP16 when supported)": "Automatisch (FP16, wenn unterstützt)", + "Automatic grouping restored": "Automatische Gruppierung wiederhergestellt", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "Automatisch bevorzugt dedizierte NVIDIA-GPUs und Berechnungen mit halber Genauigkeit (FP16), sofern unterstützt.", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "Automatisch nutzt SAM 3, wenn es installiert ist, sonst SAM 2.1. Beschreiben-Masken nutzen immer SAM 3.", "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.": "„Automatisch“ nutzt die Grafikkarte, wo sie schneller als der Prozessor ist: Beim ersten berechneten Foto wird beides auf diesem Computer gemessen.", @@ -288,6 +289,7 @@ "Background Preparation Settings": "Einstellungen der Hintergrundvorbereitung", "Backup": "Sicherung", "Backup folder": "Sicherungsordner", + "Balanced": "Ausgewogen", "Band": "Band", "Base tone": "Grundton", "Baseline": "Grundlinie", @@ -534,10 +536,13 @@ "Clear Rating": "Bewertung entfernen", "Clear Role": "Rolle löschen", "Clear Search Index": "Suchindex leeren", + "Clear Selected Face Data": "Daten ausgewählter Gesichter löschen", "Clear Sensor Dust Map": "Sensorstaub-Karte leeren", "Clear Slideshow Music": "Diashow-Musik entfernen", "Clear Tracklogs": "Tracklogs entfernen", "Clear cache": "Cache leeren", + "Clear selection": "Auswahl aufheben", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "Löscht zwischengespeicherte Einbettungen und Vorschläge für ausgewählte Gesichter. Die Hintergrundindizierung kann sie erneut erstellen. Namen und Entscheidungen bleiben erhalten.", "Clear…": "Leeren …", "Click Through": "Durchklicken", "Click a cell on a page to edit it.": "Klicken Sie auf eine Zelle einer Seite, um sie zu bearbeiten.", @@ -819,6 +824,7 @@ "Describe photos…": "Fotos beschreiben…", "Deselect Active Photo": "Aktives Foto abwählen", "Deselect Unflagged Photos": "Unmarkierte Fotos abwählen", + "Deselect group": "Gruppe abwählen", "Destination": "Ziel", "Detach Mask List": "Maskenliste abtrennen", "Detach the mask list": "Maskenliste abtrennen", @@ -832,6 +838,7 @@ "Detecting faces…": "Gesichter werden erkannt…", "Detecting orientation": "Ausrichtung wird erkannt", "Detection": "Erkennung", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "Die Erkennung läuft auf den gesamten Fotos mit den ausgewählten Gesichtern, einschließlich anderer Gesichter auf diesen Fotos.", "Detection sensitivity": "Erkennungsempfindlichkeit", "Develop": "Entwickeln", "Develop Settings": "Entwicklungseinstellungen", @@ -1100,9 +1107,11 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "Die Gesichtserkennung ist aus. Schalten Sie sie ein, um Namensvorschläge zu erhalten und ähnliche Gesichter zusammen zu sehen.", "Face recognition is on": "Gesichtserkennung ist ein", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "Für Namensvorschläge braucht die Gesichtserkennung ein Modell: ein einmaliger Download in den Einstellungen.", + "Face removed from similarity groups": "Gesicht aus Ähnlichkeitsgruppen entfernt", "Face scan": "Gesichtersuche", "Faces": "Gesichter", "Faces of a Person": "Gesichter einer Person", + "Faces without a displayed look-alike group.": "Gesichter ohne angezeigte Ähnlichkeitsgruppe.", "Fades": "Überblendungen", "Fail at least one of these conditions": "mindestens eine dieser Bedingungen nicht erfüllen", "Failed its last test": "Letzter Test fehlgeschlagen", @@ -1331,7 +1340,11 @@ "Grid: first photo of the view": "Raster: erstes Foto der Ansicht", "Grid: last photo of the view": "Raster: letztes Foto der Ansicht", "Group Unnamed Faces": "Unbenannte Gesichter gruppieren", + "Grouping": "Gruppierung", + "Grouping faces across the library in the background…": "Gesichter in der gesamten Bibliothek werden im Hintergrund gruppiert…", + "Grouping unknown faces": "Unbekannte Gesichter gruppieren", "Groups": "Gruppen", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "Gruppen umfassen Gesichter aus dem gesamten aktuellen Bibliotheksfilter; beim Auswählen einer Gruppe werden auch ihre Gesichter auf anderen Seiten ausgewählt.", "Grow": "Ausdehnen", "Guided Laplacian": "Geführter Laplace", "Guided Upright isn't supported; straighten these photos again in Transform.": "Perspektivkorrektur mit Hilfslinien wird nicht unterstützt; richten Sie diese Fotos unter Transformieren erneut gerade aus.", @@ -1779,6 +1792,7 @@ "Looking up new photos in Immich": "Neue Fotos in Immich nachschlagen", "Looks at every photo on the server again, not only those changed since the last pass.": "Sieht sich alle Fotos auf dem Server erneut an, nicht nur die seit dem letzten Lauf geänderten.", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "Prüft die Augen der Motive wie die Augenleiste, etwa eine Sekunde pro Foto, im Hintergrund. Ausgewählte Fotos bleiben unberührt.", + "Loose": "Locker", "Loupe": "Lupe", "Loupe Background": "Lupenhintergrund", "Loupe Info": "Lupeninformationen", @@ -2142,6 +2156,7 @@ "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.": "Berechnet werden nur Fotos, deren KI-Entrauschen-Stärke über 0 liegt. Exporte berechnen ihr Bild immer, wenn es fehlt.", "Only the files and folders you pick": "Nur ausgewählte Dateien und Ordner", "Only the first published photos were asked.": "Nur die ersten veröffentlichten Fotos wurden abgefragt.", + "Only the selected faces are processed.": "Es werden nur die ausgewählten Gesichter verarbeitet.", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "Nur diese Fotos werden hinzugefügt. Schalten Sie dies ein, oder Einstellungen > Ordner > Auf neue Fotos achten, um neue beim Aufnehmen hinzuzufügen.", "Only you can allow a permission: a click from an agent or a script changes nothing.": "Nur Sie können eine Berechtigung erlauben: Ein Klick eines Agenten oder Skripts ändert nichts.", "Open": "Öffnen", @@ -2198,6 +2213,7 @@ "Other devices see this name. Every device needs its own.": "Andere Geräte sehen diesen Namen. Jedes Gerät braucht einen eigenen.", "Other models (optional)": "Andere Modelle (optional)", "Other server…": "Anderer Server…", + "Other unknown faces": "Weitere unbekannte Gesichter", "Others get previews to develop; only this device adds photos.": "Andere erhalten Vorschauen zum Entwickeln; nur dieses Gerät fügt Fotos hinzu.", "Others may also fetch the originals; only this device adds photos.": "Andere dürfen auch die Originale abrufen; nur dieses Gerät fügt Fotos hinzu.", "Output": "Ausgabe", @@ -2553,6 +2569,7 @@ "Reload": "Neu laden", "Reload MIDI Map": "MIDI-Zuordnung neu laden", "Reload Preview": "Vorschau neu laden", + "Reload the faces and try again": "Gesichter neu laden und erneut versuchen", "Remember Dialog Choices": "Dialogauswahl merken", "Remember Each Source's Filters Separately": "Filter für jede Quelle separat merken", "Remember as…": "Merken als…", @@ -2591,6 +2608,7 @@ "Remove from List": "Aus Liste entfernen", "Remove from Quick Collection": "Aus Schnellsammlung entfernen", "Remove from Target Collection": "Aus Zielsammlung entfernen", + "Remove from similarity groups": "Aus Ähnlichkeitsgruppen entfernen", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "Aus dem Katalog entfernen (in „Zuletzt gelöscht“; die Dateien bleiben auf dem Datenträger)", "Remove from the stack": "Aus dem Stapel entfernen", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "„Entfernen“ behält die Dateien auf dem Datenträger und verschiebt die Fotos nach „Zuletzt gelöscht“.", @@ -2664,6 +2682,7 @@ "Restore Built-ins": "Integrierte wiederherstellen", "Restore Catalog from Backup…": "Katalog aus Sicherung wiederherstellen…", "Restore Generated Fill": "Generierte Füllung wiederherstellen", + "Restore automatic grouping": "Automatische Gruppierung wiederherstellen", "Restore the photo to use it as the reference": "Stellen Sie das Foto wieder her, um es als Referenz zu verwenden", "Resume": "Fortsetzen", "Resume Face Scan": "Gesichtersuche fortsetzen", @@ -2678,6 +2697,7 @@ "Reverse geocoding is off: choose Offline or Online first": "Umgekehrte Geocodierung ist aus: wählen Sie zuerst Offline oder Online", "Revert Capture Time to Original": "Aufnahmezeit auf Original zurücksetzen", "Review Comments": "Kommentare prüfen", + "Review these similar faces before naming or ignoring them.": "Prüfen Sie diese ähnlichen Gesichter, bevor Sie sie benennen oder ignorieren.", "Revoke": "Widerrufen", "Revoke Plug-in Permission": "Plug-in-Berechtigung widerrufen", "Right": "Rechts", @@ -2819,6 +2839,8 @@ "Select by Color Label": "Nach Farbmarkierung auswählen", "Select by Flag": "Nach Markierung auswählen", "Select by Rating": "Nach Bewertung auswählen", + "Select group": "Gruppe auswählen", + "Select group for maintenance": "Gruppe zur Pflege auswählen", "Select photos to import": "Zu importierende Fotos auswählen", "Select photos to move them to this location": "Fotos auswählen, um sie an diesen Ort zu verschieben", "Select photos to see their info.": "Wählen Sie Fotos aus, um ihre Infos zu sehen.", @@ -2997,6 +3019,7 @@ "Side": "Seitlich", "Side by Side": "Nebeneinander", "Signed by": "Signiert von", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "Ähnliche unbekannte Gesichter sind unten gruppiert. Wählen Sie eine Gruppe aus, prüfen Sie ihre Gesichter und benennen oder ignorieren Sie sie dann.", "Simple": "Einfach", "Single Image / Contact Sheet": "Einzelbild / Kontaktabzug", "Single Page": "Einzelseite", @@ -3041,6 +3064,7 @@ "Specific folder": "Bestimmter Ordner", "Speed": "Geschwindigkeit", "Speed-Edit Keys": "Schnellbearbeitungstasten", + "Split Unknown Faces": "Unbekannte Gesichter trennen", "Spot Removal": "Retuschieren", "Spread": "Doppelseite", "Spread View": "Doppelseitenansicht", @@ -3082,6 +3106,7 @@ "Stop syncing? Nothing is deleted on any device.": "Synchronisierung beenden? Auf keinem Gerät wird etwas gelöscht.", "Store Presets and Profiles with This Catalog": "Vorgaben und Profile mit diesem Katalog speichern", "Strength": "Stärke", + "Strict": "Streng", "Stroke Border": "Kontur", "Studio Capture": "Studioaufnahme", "Studio Session": "Studiositzung", @@ -3257,6 +3282,7 @@ "The score is the factors' weighted mean; 0 leaves one out of it (it is still measured).": "Die Bewertung ist der gewichtete Mittelwert der Faktoren; 0 lässt einen aus (gemessen wird er trotzdem).", "The second graphics card is left free for previews and thumbnails.": "Die zweite Grafikkarte bleibt für Vorschauen und Miniaturen frei.", "The selected photos are in this location": "Die ausgewählten Fotos befinden sich an diesem Ort", + "The selection changed. Reload the faces and try again": "Die Auswahl hat sich geändert. Gesichter neu laden und erneut versuchen", "The server answers; the key works.": "Der Server antwortet; der Schlüssel funktioniert.", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "Der Server verwendet ein Zertifikat, für das keine Zertifizierungsstelle bürgt (üblich bei Heimservern). Vertrauen Sie ihm nur, wenn dieser SHA-256-Fingerabdruck zum Zertifikat Ihres Servers passt:", "The size limit picks the highest quality, up to Quality, whose file fits.": "Die Größengrenze wählt die höchste Qualität bis zum Wert „Qualität“, deren Datei hineinpasst.", @@ -3732,6 +3758,7 @@ "removed": "entfernt", "role": "Rolle", "scene-linear Rec. 2020": "szene-linear in Rec. 2020", + "selected faces in People": "ausgewählte Gesichter in Personen", "selected photos": "ausgewählte Fotos", "shots": "Aufnahmen", "size": "Größe", diff --git a/crates/ui-egui/locales/fork/es.json b/crates/ui-egui/locales/fork/es.json index 76d7e2bd89..285aaa6165 100644 --- a/crates/ui-egui/locales/fork/es.json +++ b/crates/ui-egui/locales/fork/es.json @@ -291,6 +291,7 @@ "Auto-fill new books with the selected photos": "Rellenar automáticamente los libros nuevos con las fotos seleccionadas", "Automatic": "Automático", "Automatic (FP16 when supported)": "Automática (FP16 si es compatible)", + "Automatic grouping restored": "Agrupación automática restaurada", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "Automático prefiere GPU NVIDIA dedicadas y cálculo en media precisión (FP16) cuando es compatible.", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "Automático usa SAM 3 si está instalado y, si no, SAM 2.1. Las máscaras Describir siempre usan SAM 3.", "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.": "Automático usa la tarjeta gráfica cuando es más rápida que el procesador: ambos se cronometran en este equipo la primera vez que se genera una foto.", @@ -317,6 +318,7 @@ "Background Tasks": "Tareas en segundo plano", "Backup": "Copia de seguridad", "Backup folder": "Carpeta de copias de seguridad", + "Balanced": "Equilibrado", "Band": "Banda", "Base tone": "Tono base", "Baseline": "Línea base", @@ -575,10 +577,13 @@ "Clear Rating": "Quitar valoración", "Clear Role": "Borrar función", "Clear Search Index": "Borrar índice de búsqueda", + "Clear Selected Face Data": "Borrar datos de los rostros seleccionados", "Clear Sensor Dust Map": "Vaciar mapa de polvo del sensor", "Clear Slideshow Music": "Quitar música de la presentación", "Clear Tracklogs": "Borrar registros de trayecto", "Clear cache": "Vaciar caché", + "Clear selection": "Borrar selección", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "Borra las representaciones en caché y las sugerencias de los rostros seleccionados. La indexación en segundo plano puede volver a crearlas. Los nombres y las decisiones se conservan.", "Clear…": "Borrar…", "Click Through": "Clic directo", "Click a cell on a page to edit it.": "Haz clic en una celda de una página para editarla.", @@ -886,6 +891,7 @@ "Describe photos…": "Describe fotos…", "Deselect Active Photo": "Deseleccionar foto activa", "Deselect Unflagged Photos": "Deseleccionar fotos sin marca", + "Deselect group": "Deseleccionar grupo", "Destination": "Destino", "Detach Mask List": "Separar lista de máscaras", "Detach the mask list": "Separar la lista de máscaras", @@ -899,6 +905,7 @@ "Detecting faces…": "Detectando rostros…", "Detecting orientation": "Detectando la orientación", "Detection": "Detección", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "La detección se ejecuta en las fotos completas que contienen los rostros seleccionados, incluidos otros rostros de esas fotos.", "Detection sensitivity": "Sensibilidad de detección", "Develop": "Revelar", "Develop Settings": "Ajustes de revelado", @@ -1190,9 +1197,11 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "El reconocimiento facial está desactivado. Actívalo para recibir sugerencias de nombres y ver juntos los rostros parecidos.", "Face recognition is on": "El reconocimiento facial está activado", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "El reconocimiento facial necesita un modelo para sugerir nombres: una descarga única, en Ajustes.", + "Face removed from similarity groups": "Rostro quitado de los grupos de similitud", "Face scan": "Búsqueda de caras", "Faces": "Caras", "Faces of a Person": "Rostros de una persona", + "Faces without a displayed look-alike group.": "Rostros sin un grupo de similitud mostrado.", "Fade": "Fundido", "Fade duration": "Duración del fundido", "Fades": "Fundidos", @@ -1430,7 +1439,11 @@ "Grid: last photo of the view": "Cuadrícula: última foto de la vista", "Group (optional)": "Grupo (opcional)", "Group Unnamed Faces": "Agrupar caras sin nombre", + "Grouping": "Agrupación", + "Grouping faces across the library in the background…": "Agrupando rostros en toda la biblioteca en segundo plano…", + "Grouping unknown faces": "Agrupando rostros desconocidos", "Groups": "Grupos", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "Los grupos usan rostros de todo el filtro actual de la biblioteca; seleccionar un grupo incluye sus rostros en otras páginas.", "Grow": "Expandir", "Guided Laplacian": "Laplaciano guiado", "Guided Upright isn't supported; straighten these photos again in Transform.": "Vertical guiado no es compatible; vuelve a enderezar estas fotos en Transformar.", @@ -1901,6 +1914,7 @@ "Looking up new photos in Immich": "Buscando fotos nuevas en Immich", "Looks at every photo on the server again, not only those changed since the last pass.": "Revisa de nuevo todas las fotos del servidor, no solo las que cambiaron desde la última pasada.", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "Examina los ojos de los sujetos como lo hace la tira de ojos, aproximadamente un segundo por foto, en segundo plano. Las fotos seleccionadas no se tocan.", + "Loose": "Amplio", "Lossy DNG files and Smart Previews open as raw photos.": "Los DNG con pérdida y las vistas previas inteligentes se abren como fotos RAW.", "Loupe": "Lupa", "Loupe Background": "Fondo de lupa", @@ -2298,6 +2312,7 @@ "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.": "Solo se generan las fotos cuya cantidad de reducción de ruido con IA es mayor que 0. Las exportaciones siempre generan la suya si falta.", "Only the files and folders you pick": "Solo los archivos y carpetas que elijas", "Only the first published photos were asked.": "Solo se consultaron las primeras fotos publicadas.", + "Only the selected faces are processed.": "Solo se procesan los rostros seleccionados.", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "Solo se añaden estas fotos. Activa esto, o Ajustes > Carpetas > Vigilar fotos nuevas, para añadir las nuevas al tomarlas.", "Only you can allow a permission: a click from an agent or a script changes nothing.": "Solo usted puede permitir un permiso: un clic de un agente o de un script no cambia nada.", "Open": "Abrir", @@ -2357,6 +2372,7 @@ "Other editor": "Otro editor", "Other models (optional)": "Otros modelos (opcional)", "Other server…": "Otro servidor…", + "Other unknown faces": "Otros rostros desconocidos", "Others get previews to develop; only this device adds photos.": "Los demás reciben vistas previas para revelar; solo este dispositivo añade fotos.", "Others may also fetch the originals; only this device adds photos.": "Los demás también pueden obtener los originales; solo este dispositivo añade fotos.", "Output": "Salida", @@ -2735,6 +2751,7 @@ "Reload": "Recargar", "Reload MIDI Map": "Recargar mapa MIDI", "Reload Preview": "Recargar vista previa", + "Reload the faces and try again": "Vuelve a cargar los rostros e inténtalo de nuevo", "Remember Dialog Choices": "Recordar opciones de diálogo", "Remember Each Source's Filters Separately": "Recordar por separado los filtros de cada origen", "Remember as…": "Recordar como…", @@ -2775,6 +2792,7 @@ "Remove from List": "Quitar de la lista", "Remove from Quick Collection": "Quitar de colección rápida", "Remove from Target Collection": "Quitar de colección de destino", + "Remove from similarity groups": "Quitar de los grupos de similitud", "Remove from survey": "Quitar de la Vista múltiple", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "Quitar del catálogo (a Eliminadas recientemente; los archivos se quedan en el disco)", "Remove from the stack": "Quitar de la pila", @@ -2863,6 +2881,7 @@ "Restore Built-ins": "Restaurar integrados", "Restore Catalog from Backup…": "Restaurar catálogo desde una copia de seguridad…", "Restore Generated Fill": "Restaurar relleno generado", + "Restore automatic grouping": "Restaurar agrupación automática", "Restore the photo to use it as the reference": "Restaura la foto para usarla como referencia", "Resume": "Reanudar", "Resume Face Scan": "Reanudar búsqueda de caras", @@ -2877,6 +2896,7 @@ "Reverse geocoding is off: choose Offline or Online first": "La geocodificación inversa está desactivada: elige primero Sin conexión o En línea", "Revert Capture Time to Original": "Revertir hora de captura a la original", "Review Comments": "Revisar comentarios", + "Review these similar faces before naming or ignoring them.": "Revisa estos rostros similares antes de nombrarlos o ignorarlos.", "Revoke": "Revocar", "Revoke Plug-in Permission": "Revocar permiso del complemento", "Right": "Derecha", @@ -3034,6 +3054,8 @@ "Select by Color Label": "Seleccionar por etiqueta de color", "Select by Flag": "Seleccionar por marca", "Select by Rating": "Seleccionar por valoración", + "Select group": "Seleccionar grupo", + "Select group for maintenance": "Seleccionar grupo para mantenimiento", "Select none": "No seleccionar ninguna", "Select photos to import": "Selecciona las fotos que quieres importar", "Select photos to move them to this location": "Selecciona fotos para moverlas a esta ubicación", @@ -3225,6 +3247,7 @@ "Side": "Lateral", "Side by Side": "Lado a lado", "Signed by": "Firmado por", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "Los rostros desconocidos similares se agrupan abajo. Selecciona un grupo, revisa sus rostros y luego nómbralos o ignóralos.", "Simple": "Sencilla", "Single Image / Contact Sheet": "Imagen única / Hoja de contactos", "Single Page": "Página única", @@ -3283,6 +3306,7 @@ "Specific folder": "Carpeta específica", "Speed": "Velocidad", "Speed-Edit Keys": "Teclas de edición rápida", + "Split Unknown Faces": "Separar rostros desconocidos", "Spot Removal": "Eliminación de manchas", "Spread": "Doble página", "Spread View": "Vista de doble página", @@ -3324,6 +3348,7 @@ "Stop syncing? Nothing is deleted on any device.": "¿Dejar de sincronizar? No se borra nada en ningún dispositivo.", "Store Presets and Profiles with This Catalog": "Guardar ajustes preestablecidos y perfiles con este catálogo", "Strength": "Intensidad", + "Strict": "Estricto", "Stroke Border": "Contornear borde", "Studio Capture": "Captura en estudio", "Studio Session": "Sesión de estudio", @@ -3505,6 +3530,7 @@ "The score is the factors' weighted mean; 0 leaves one out of it (it is still measured).": "La puntuación es la media ponderada de los factores; 0 deja uno fuera (se sigue midiendo).", "The second graphics card is left free for previews and thumbnails.": "La segunda tarjeta gráfica queda libre para vistas previas y miniaturas.", "The selected photos are in this location": "Las fotos seleccionadas están en esta ubicación", + "The selection changed. Reload the faces and try again": "La selección ha cambiado. Vuelve a cargar los rostros e inténtalo de nuevo", "The server answers; the key works.": "El servidor responde; la clave funciona.", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "El servidor usa un certificado que ninguna autoridad avala (habitual en servidores domésticos). Confía en él solo si esta huella SHA-256 coincide con el certificado de tu servidor:", "The size limit picks the highest quality, up to Quality, whose file fits.": "El límite de tamaño elige la calidad más alta, hasta Calidad, cuyo archivo quepa.", @@ -4068,6 +4094,7 @@ "role": "función", "save goes through.": "guardado se complete.", "scene-linear Rec. 2020": "lineal de escena en Rec. 2020", + "selected faces in People": "los rostros seleccionados en Personas", "selected photos": "fotos seleccionadas", "shots": "tomas", "siblings) no longer open bright green (issue #148): their as-shot white balance and black level are read from the": "hermanas) ya no se abren en verde brillante (issue #148): su balance de blancos de toma y su nivel de negro se leen del", diff --git a/crates/ui-egui/locales/fork/fi.json b/crates/ui-egui/locales/fork/fi.json index db3f3af5a6..0653cf91f8 100644 --- a/crates/ui-egui/locales/fork/fi.json +++ b/crates/ui-egui/locales/fork/fi.json @@ -300,6 +300,7 @@ "Auto-Tag Selected Photos": "Merkitse valitut kuvat automaattisesti", "Auto-fill new books with the selected photos": "Täytä uudet kirjat automaattisesti valituilla valokuvilla", "Automatic (FP16 when supported)": "Automaattinen (FP16, jos tuettu)", + "Automatic grouping restored": "Automaattinen ryhmittely palautettu", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "Automaattinen suosii erillisiä NVIDIA-näytönohjaimia ja puolitarkkuuden (FP16) laskentaa, kun se on tuettua.", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "Automaattinen käyttää SAM 3:a, jos se on asennettu, muuten SAM 2.1:tä. Kuvailumaskit käyttävät aina SAM 3:a.", "Automatically Toggle Mask Overlay": "Vaihda maskin peittokuvaa automaattisesti", @@ -321,6 +322,7 @@ "Background Preparation Settings": "Taustavalmistelun asetukset", "Backup": "Varmuuskopio", "Backup folder": "Varmuuskopiokansio", + "Balanced": "Tasapainoinen", "Balanced: a standard dial feel with responsive mid-range acceleration.": "Tasapainoinen: tavallinen kiekon tuntuma ja herkkä kiihdytys keskialueella.", "Band": "Nauha", "Base curve": "Peruskäyrä", @@ -574,9 +576,12 @@ "Clear Rating": "Tyhjennä luokitus", "Clear Role": "Tyhjennä rooli", "Clear Search Index": "Tyhjennä hakuhakemisto", + "Clear Selected Face Data": "Tyhjennä valittujen kasvojen tiedot", "Clear Sensor Dust Map": "Tyhjennä anturin pölykartta", "Clear Slideshow Music": "Tyhjennä diaesityksen musiikki", "Clear Tracklogs": "Tyhjennä reittilokit", + "Clear selection": "Tyhjennä valinta", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "Tyhjentää välimuistiin tallennetut upotukset ja ehdotukset valituilta kasvoilta. Taustaindeksointi voi luoda ne uudelleen. Nimet ja päätökset säilyvät.", "Clear…": "Tyhjennä…", "Click Through": "Läpinapsautus", "Click a cell on a page to edit it.": "Napsauta sivun solua muokataksesi sitä.", @@ -889,6 +894,7 @@ "Describe photos…": "Kuvaile kuvia…", "Deselect Active Photo": "Poista aktiivisen kuvan valinta", "Deselect Unflagged Photos": "Poista valinta kuvista, joissa ei ole lippua", + "Deselect group": "Poista ryhmän valinta", "Destination": "Kohde", "Detach Mask List": "Irrota maskiluettelo", "Detach the mask list": "Irrota maskiluettelo", @@ -899,6 +905,7 @@ "Detect and Recognize": "Tunnista kasvot", "Detecting faces…": "Tunnistetaan kasvoja…", "Detecting orientation": "Tunnistetaan suuntaa", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "Tunnistus suoritetaan kaikille kuville, joissa valitut kasvot ovat, mukaan lukien muut kasvot samoissa kuvissa.", "Detection sensitivity": "Tunnistuksen herkkyys", "Develop Settings": "Kehitysasetukset", "Develop preset": "Kehityksen esiasetus", @@ -1183,7 +1190,9 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "Kasvojentunnistus on pois päältä. Ota se käyttöön, niin saat nimiehdotuksia ja näet samannäköiset kasvot yhdessä.", "Face recognition is on": "Kasvojentunnistus on päällä", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "Kasvojentunnistus tarvitsee mallin nimien ehdottamiseen: kertaluonteinen lataus Asetuksissa.", + "Face removed from similarity groups": "Kasvot poistettu samankaltaisuusryhmistä", "Face scan": "Kasvohaku", + "Faces without a displayed look-alike group.": "Kasvot ilman näytettyä samankaltaisuusryhmää.", "Fades": "Häivytykset", "Fail at least one of these conditions": "eivät täytä vähintään yhtä näistä ehdoista", "Failed photos": "Epäonnistuneet kuvat", @@ -1441,7 +1450,11 @@ "Grid of Six": "Kuuden ruudukko", "Grid size": "Ruudukon koko", "Group Unnamed Faces": "Ryhmittele nimeämättömät kasvot", + "Grouping": "Ryhmittely", + "Grouping faces across the library in the background…": "Ryhmitellään kasvoja koko kirjastosta taustalla…", + "Grouping unknown faces": "Ryhmitellään tuntemattomia kasvoja", "Groups": "Ryhmät", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "Ryhmät käyttävät kasvoja koko nykyisestä kirjastosuodattimesta; ryhmän valinta sisältää myös sen kasvot muilla sivuilla.", "Grow": "Laajenna", "Guided Laplacian": "Ohjattu Laplace", "Guided Upright isn't supported; straighten these photos again in Transform.": "Ohjattua Upright-korjausta ei tueta; suorista nämä kuvat uudelleen Muunnos-paneelissa.", @@ -1933,6 +1946,7 @@ "Looking up new photos in Immich": "Haetaan uusia kuvia Immichistä", "Looks at every photo on the server again, not only those changed since the last pass.": "Käy uudelleen läpi kaikki palvelimen kuvat, ei vain edellisen kierroksen jälkeen muuttuneita.", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "Tarkastelee kohteiden silmiä samaan tapaan kuin silmänauha, noin sekunnin kuvaa kohden, taustalla. Valittuihin kuviin ei kosketa.", + "Loose": "Väljä", "Loupe": "Suurennuslasi", "Loupe Background": "Luupin tausta", "Loupe Info": "Suurennuslasin tiedot", @@ -2330,6 +2344,7 @@ "Only one of the photo and the reference records its aperture": "Vain kuva tai vain viitekuva kertoo aukon", "Only the files and folders you pick": "Vain valitsemasi tiedostot ja kansiot", "Only the first published photos were asked.": "Vain ensimmäisistä julkaistuista kuvista kysyttiin.", + "Only the selected faces are processed.": "Vain valitut kasvot käsitellään.", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "Vain nämä kuvat lisätään. Ota tämä käyttöön, tai Asetukset > Kansiot > Seuraa uusia kuvia, niin uudet lisätään sitä mukaa.", "Only this area and the outline of what to fill are sent: not the whole photo, not its metadata.": "Vain tämä alue ja täytettävän ääriviiva lähetetään: ei koko kuvaa eikä sen metatietoja.", "Only you can allow a permission: a click from an agent or a script changes nothing.": "Vain sinä voit sallia käyttöoikeuden: agentin tai skriptin napsautus ei muuta mitään.", @@ -2385,6 +2400,7 @@ "Other devices see this name. Every device needs its own.": "Muut laitteet näkevät tämän nimen. Jokainen laite tarvitsee omansa.", "Other models (optional)": "Muut mallit (valinnainen)", "Other server…": "Muu palvelin…", + "Other unknown faces": "Muut tuntemattomat kasvot", "Others get previews to develop; only this device adds photos.": "Muut saavat esikatselukuvia kehitettäviksi; vain tämä laite lisää kuvia.", "Others may also fetch the originals; only this device adds photos.": "Muut voivat myös hakea alkuperäiset; vain tämä laite lisää kuvia.", "Output": "Tuloste", @@ -2779,6 +2795,7 @@ "Reload": "Lataa uudelleen", "Reload MIDI Map": "Lataa MIDI-määritys uudelleen", "Reload Preview": "Lataa esikatselu uudelleen", + "Reload the faces and try again": "Lataa kasvot uudelleen ja yritä uudelleen", "Remember Dialog Choices": "Muista valintaikkunoiden valinnat", "Remember Each Source's Filters Separately": "Muista kunkin lähteen suodattimet erikseen", "Remember as…": "Muista nimellä…", @@ -2824,6 +2841,7 @@ "Remove from List": "Poista luettelosta", "Remove from Quick Collection": "Poista pikakokoelmasta", "Remove from favorites": "Poista suosikeista", + "Remove from similarity groups": "Poista samankaltaisuusryhmistä", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "Poista katalogista (Äskettäin poistetut -kansioon; tiedostot jäävät levylle)", "Remove from the stack": "Poista pinosta", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "Poista säilyttää tiedostot levyllä ja siirtää kuvat Äskettäin poistetut -kansioon.", @@ -2920,6 +2938,7 @@ "Restore Built-ins": "Palauta sisäänrakennetut", "Restore Catalog from Backup…": "Palauta katalogi varmuuskopiosta…", "Restore Generated Fill": "Palauta luotu täyttö", + "Restore automatic grouping": "Palauta automaattinen ryhmittely", "Restore the photo to use it as the reference": "Palauta kuva käyttääksesi sitä vertailukuvana", "Resume": "Jatka", "Resume Face Scan": "Jatka kasvohakua", @@ -2935,6 +2954,7 @@ "Reverse geocoding is off: choose Offline or Online first": "Käänteinen geokoodaus on pois päältä: valitse ensin ”Ei verkossa” tai ”Verkossa”", "Revert Capture Time to Original": "Palauta kuvausaika alkuperäiseksi", "Review Comments": "Tarkista kommentit", + "Review these similar faces before naming or ignoring them.": "Tarkista nämä samankaltaiset kasvot ennen niiden nimeämistä tai ohittamista.", "Revoke": "Peru", "Revoke Plug-in Permission": "Peru laajennuksen käyttöoikeus", "Right Panel": "Oikea paneeli", @@ -3097,6 +3117,8 @@ "Select by Color Label": "Valitse värimerkinnän mukaan", "Select by Flag": "Valitse lipun mukaan", "Select by Rating": "Valitse luokituksen mukaan", + "Select group": "Valitse ryhmä", + "Select group for maintenance": "Valitse ryhmä ylläpitoon", "Select photos to import": "Valitse tuotavat kuvat", "Select photos to move them to this location": "Valitse kuvat siirtääksesi ne tähän sijaintiin", "Select photos to see their info.": "Valitse kuvia nähdäksesi niiden tiedot.", @@ -3301,6 +3323,7 @@ "Side": "Sivulla", "Side by Side": "Rinnakkain", "Signed by": "Allekirjoittaja", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "Samankaltaiset tuntemattomat kasvot on ryhmitelty alle. Valitse ryhmä, tarkista sen kasvot ja nimeä tai ohita ne sitten.", "Simple": "Yksinkertainen", "Single Image / Contact Sheet": "Yksittäinen kuva / kontaktivedos", "Single Page": "Yksittäinen sivu", @@ -3351,6 +3374,7 @@ "Space Zooms To": "Välilyönti zoomaa", "Spacing": "Välistys", "Speed-Edit Keys": "Pikamuokkausnäppäimet", + "Split Unknown Faces": "Erota tuntemattomat kasvot", "Spot Removal": "Täplienpoisto", "Spread": "Aukeama", "Spread View": "Aukeamanäkymä", @@ -3393,6 +3417,7 @@ "Stop using": "Lopeta käyttö", "Store Presets and Profiles with This Catalog": "Säilytä esiasetukset ja profiilit tämän katalogin mukana", "Strength": "Voimakkuus", + "Strict": "Tiukka", "Stroke Border": "Reunaviiva", "Studio Capture": "Studiokuvaus", "Studio Session": "Studioistunto", @@ -3574,6 +3599,7 @@ "The second chart photo isn't read yet": "Toisen värikartan kuvaa ei ole vielä luettu", "The second graphics card is left free for previews and thumbnails.": "Toinen näytönohjain jää vapaaksi esikatseluille ja pikkukuville.", "The selected photos are in this location": "Valitut kuvat ovat tässä sijainnissa", + "The selection changed. Reload the faces and try again": "Valinta muuttui. Lataa kasvot uudelleen ja yritä uudelleen", "The server answers; the key works.": "Palvelin vastaa; avain toimii.", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "Palvelin käyttää varmennetta, jota mikään varmentaja ei takaa (yleistä kotipalvelimille). Luota siihen vain, jos tämä SHA-256-sormenjälki vastaa palvelimesi varmennetta:", "The size limit picks the highest quality, up to Quality, whose file fits.": "Kokorajoitus valitsee korkeimman laadun (enintään Laatu-asetuksen), jolla tiedosto mahtuu rajaan.", @@ -4093,6 +4119,7 @@ "removed": "poistettu", "role": "rooli", "scene-linear Rec. 2020": "skene-lineaarinen Rec. 2020", + "selected faces in People": "valitut kasvot Henkilöt-näkymässä", "selected photos": "valittua kuvaa", "shots": "otosta", "size": "koko", diff --git a/crates/ui-egui/locales/fork/fr.json b/crates/ui-egui/locales/fork/fr.json index acd7fd0cfb..402baab04c 100644 --- a/crates/ui-egui/locales/fork/fr.json +++ b/crates/ui-egui/locales/fork/fr.json @@ -269,6 +269,7 @@ "Auto-fill new books with the selected photos": "Remplir automatiquement les nouveaux livres avec les photos sélectionnées", "Automatic": "Automatique", "Automatic (FP16 when supported)": "Automatique (FP16 si pris en charge)", + "Automatic grouping restored": "Regroupement automatique rétabli", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "Le mode automatique privilégie les GPU NVIDIA dédiés et le calcul en demi-précision (FP16) lorsqu’ils sont pris en charge.", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "Automatique utilise SAM 3 s’il est installé, sinon SAM 2.1. Les masques Décrire utilisent toujours SAM 3.", "Automatically Toggle Mask Overlay": "Basculer automatiquement l’incrustation du masque", @@ -292,6 +293,7 @@ "Background Preparation Settings": "Réglages de la préparation en arrière-plan", "Backup": "Sauvegarde", "Backup folder": "Dossier de sauvegarde", + "Balanced": "Équilibré", "Band": "Bandeau", "Base tone": "Tonalité de base", "Baseline": "Ligne de base", @@ -532,9 +534,12 @@ "Clear Rating": "Effacer la note", "Clear Role": "Retirer le rôle", "Clear Search Index": "Effacer l’index de recherche", + "Clear Selected Face Data": "Effacer les données des visages sélectionnés", "Clear Sensor Dust Map": "Effacer la carte des poussières du capteur", "Clear Slideshow Music": "Effacer la musique du diaporama", "Clear Tracklogs": "Effacer les traces GPS", + "Clear selection": "Effacer la sélection", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "Efface les vecteurs en cache et les suggestions des visages sélectionnés. L’indexation en arrière-plan peut les recréer. Les noms et décisions sont conservés.", "Clear…": "Effacer…", "Click Through": "Clic traversant", "Click a cell on a page to edit it.": "Cliquez sur une cellule d'une page pour la modifier.", @@ -811,6 +816,7 @@ "Describe photos…": "Décrire les photos…", "Deselect Active Photo": "Désélectionner la photo active", "Deselect Unflagged Photos": "Désélectionner les photos sans drapeau", + "Deselect group": "Désélectionner le groupe", "Destination": "Destination", "Detach Mask List": "Détacher la liste des masques", "Detach the mask list": "Détacher la liste des masques", @@ -824,6 +830,7 @@ "Detecting faces…": "Détection des visages…", "Detecting orientation": "Détection de l’orientation", "Detection": "Détection", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "La détection s’exécute sur l’ensemble des photos contenant les visages sélectionnés, y compris les autres visages présents sur ces photos.", "Detection sensitivity": "Sensibilité de détection", "Develop Settings": "Réglages de développement", "Develop preset": "Paramètre prédéfini de développement", @@ -1092,9 +1099,11 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "La reconnaissance faciale est désactivée. Activez-la pour obtenir des suggestions de noms et voir ensemble les visages qui se ressemblent.", "Face recognition is on": "La reconnaissance faciale est activée", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "La reconnaissance faciale a besoin d’un modèle pour suggérer des noms : un téléchargement unique, dans les Réglages.", + "Face removed from similarity groups": "Visage retiré des groupes de ressemblance", "Face scan": "Recherche de visages", "Faces": "Visages", "Faces of a Person": "Visages d’une personne", + "Faces without a displayed look-alike group.": "Visages sans groupe de ressemblance affiché.", "Fades": "Fondus", "Fail at least one of these conditions": "ne remplissent pas au moins une de ces conditions", "Failed photos": "Photos en échec", @@ -1318,7 +1327,11 @@ "Grid of Six": "Grille de six", "Grid size": "Taille de la grille", "Group Unnamed Faces": "Regrouper les visages sans nom", + "Grouping": "Regroupement", + "Grouping faces across the library in the background…": "Regroupement des visages de la bibliothèque en arrière-plan…", + "Grouping unknown faces": "Regroupement des visages inconnus", "Groups": "Groupes", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "Les groupes utilisent les visages de tout le filtre actuel de la bibliothèque ; sélectionner un groupe inclut ses visages sur les autres pages.", "Grow": "Étendre", "Guided Laplacian": "Laplacien guidé", "Guided Upright isn't supported; straighten these photos again in Transform.": "L’Upright guidé n’est pas pris en charge ; redressez de nouveau ces photos dans Transformation.", @@ -1764,6 +1777,7 @@ "Looking up new photos in Immich": "Recherche des nouvelles photos dans Immich", "Looks at every photo on the server again, not only those changed since the last pass.": "Réexamine toutes les photos du serveur, pas seulement celles modifiées depuis le dernier passage.", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "Examine les yeux des sujets comme le fait le bandeau des yeux, environ une seconde par photo, en arrière-plan. Les photos sélectionnées ne sont pas touchées.", + "Loose": "Large", "Lossy DNG files and Smart Previews open as raw photos.": "Les fichiers DNG avec perte et les aperçus dynamiques s’ouvrent comme des photos raw.", "Loupe": "Loupe", "Loupe Background": "Arrière-plan de la loupe", @@ -2113,6 +2127,7 @@ "Only one of the photo and the reference records its aperture": "Seule la photo ou seule la référence indique son ouverture", "Only the files and folders you pick": "Seulement les fichiers et dossiers choisis", "Only the first published photos were asked.": "Seules les premières photos publiées ont été interrogées.", + "Only the selected faces are processed.": "Seuls les visages sélectionnés sont traités.", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "Seules ces photos sont ajoutées. Activez ceci, ou Réglages > Dossiers > Surveiller les nouvelles photos, pour ajouter les nouvelles à mesure.", "Only you can allow a permission: a click from an agent or a script changes nothing.": "Vous seul pouvez accorder une autorisation : un clic d’un agent ou d’un script ne change rien.", "Open AI Models": "Ouvrir Modèles IA", @@ -2160,6 +2175,7 @@ "Other devices see this name. Every device needs its own.": "Les autres appareils voient ce nom. Chaque appareil a besoin du sien.", "Other models (optional)": "Autres modèles (facultatif)", "Other server…": "Autre serveur…", + "Other unknown faces": "Autres visages inconnus", "Others get previews to develop; only this device adds photos.": "Les autres reçoivent des aperçus à développer ; seul cet appareil ajoute des photos.", "Others may also fetch the originals; only this device adds photos.": "Les autres peuvent aussi récupérer les originaux ; seul cet appareil ajoute des photos.", "Output": "Sortie", @@ -2517,6 +2533,7 @@ "Reload": "Recharger", "Reload MIDI Map": "Recharger la correspondance MIDI", "Reload Preview": "Recharger l'aperçu", + "Reload the faces and try again": "Rechargez les visages et réessayez", "Remember Dialog Choices": "Mémoriser les choix des dialogues", "Remember Each Source's Filters Separately": "Mémoriser séparément les filtres de chaque source", "Remember as…": "Mémoriser comme…", @@ -2554,6 +2571,7 @@ "Remove from Collection": "Retirer de la collection", "Remove from Quick Collection": "Retirer de la collection rapide", "Remove from Target Collection": "Retirer de la collection cible", + "Remove from similarity groups": "Retirer des groupes de ressemblance", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "Retirer du catalogue (vers Supprimés récemment ; les fichiers restent sur le disque)", "Remove from the stack": "Retirer de la pile", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "Retirer conserve les fichiers sur le disque et place les photos dans Supprimées récemment.", @@ -2630,6 +2648,7 @@ "Restore Built-ins": "Rétablir les intégrés", "Restore Catalog from Backup…": "Restaurer le catalogue depuis une sauvegarde…", "Restore Generated Fill": "Restaurer le remplissage généré", + "Restore automatic grouping": "Rétablir le regroupement automatique", "Restore the photo to use it as the reference": "Restaurez la photo pour l’utiliser comme référence", "Resume": "Reprendre", "Resume Face Scan": "Reprendre la recherche de visages", @@ -2644,6 +2663,7 @@ "Reverse geocoding is off: choose Offline or Online first": "Le géocodage inversé est désactivé : choisissez d'abord Hors ligne ou En ligne", "Revert Capture Time to Original": "Rétablir l'heure de capture d'origine", "Review Comments": "Examiner les commentaires", + "Review these similar faces before naming or ignoring them.": "Vérifiez ces visages similaires avant de les nommer ou de les ignorer.", "Revoke": "Révoquer", "Revoke Plug-in Permission": "Révoquer l’autorisation du module externe", "Right": "Droite", @@ -2785,6 +2805,8 @@ "Select by Color Label": "Sélectionner par étiquette de couleur", "Select by Flag": "Sélectionner par drapeau", "Select by Rating": "Sélectionner par note", + "Select group": "Sélectionner le groupe", + "Select group for maintenance": "Sélectionner le groupe pour la maintenance", "Select photos to import": "Sélectionnez les photos à importer", "Select photos to move them to this location": "Sélectionnez des photos pour les déplacer à ce lieu", "Select photos to see their info.": "Sélectionnez des photos pour voir leurs infos.", @@ -2963,6 +2985,7 @@ "Side": "Côté", "Side by Side": "Côte à côte", "Signed by": "Signé par", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "Les visages inconnus similaires sont regroupés ci-dessous. Sélectionnez un groupe, vérifiez ses visages, puis nommez-les ou ignorez-les.", "Simple": "Simple", "Single Image / Contact Sheet": "Image unique / Planche contact", "Single Page": "Page unique", @@ -3011,6 +3034,7 @@ "Spacing": "Espacement", "Specific folder": "Dossier spécifique", "Speed-Edit Keys": "Touches d'édition rapide", + "Split Unknown Faces": "Séparer les visages inconnus", "Spot Removal": "Suppression des taches", "Spread": "Planche", "Spread View": "Affichage en planche", @@ -3051,6 +3075,7 @@ "Stop syncing? Nothing is deleted on any device.": "Arrêter la synchronisation ? Rien n’est supprimé sur aucun appareil.", "Store Presets and Profiles with This Catalog": "Stocker les préréglages et profils avec ce catalogue", "Strength": "Intensité", + "Strict": "Strict", "Stroke Border": "Contour", "Studio Capture": "Capture en studio", "Studio Session": "Session en studio", @@ -3216,6 +3241,7 @@ "The score is the factors' weighted mean; 0 leaves one out of it (it is still measured).": "La note est la moyenne pondérée des facteurs ; 0 en exclut un (il est quand même mesuré).", "The second graphics card is left free for previews and thumbnails.": "La deuxième carte graphique reste libre pour les aperçus et les vignettes.", "The selected photos are in this location": "Les photos sélectionnées sont dans ce lieu", + "The selection changed. Reload the faces and try again": "La sélection a changé. Rechargez les visages et réessayez", "The server answers; the key works.": "Le serveur répond ; la clé fonctionne.", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "Le serveur utilise un certificat qu’aucune autorité ne garantit (courant pour les serveurs domestiques). Faites-lui confiance uniquement si cette empreinte SHA-256 correspond au certificat de votre serveur :", "The size limit picks the highest quality, up to Quality, whose file fits.": "La limite de taille choisit la meilleure qualité, jusqu’à Qualité, dont le fichier tient dans la limite.", @@ -3718,6 +3744,7 @@ "role": "rôle", "save goes through.": "l’enregistrement aboutit.", "scene-linear Rec. 2020": "linéaire de scène en Rec. 2020", + "selected faces in People": "les visages sélectionnés dans Personnes", "selected photos": "photos sélectionnées", "shots": "prises", "siblings) no longer open bright green (issue #148): their as-shot white balance and black level are read from the": "leurs déclinaisons) ne s’ouvrent plus vert vif (issue #148) : leur balance des blancs telle que prise et leur niveau de noir sont lus depuis le", diff --git a/crates/ui-egui/locales/fork/id.json b/crates/ui-egui/locales/fork/id.json index 655d4efd13..dca883614a 100644 --- a/crates/ui-egui/locales/fork/id.json +++ b/crates/ui-egui/locales/fork/id.json @@ -296,6 +296,7 @@ "Auto-Tag Selected Photos": "Tandai lokasi foto yang dipilih otomatis", "Auto-fill new books with the selected photos": "Isi otomatis buku baru dengan foto yang dipilih", "Automatic (FP16 when supported)": "Otomatis (FP16 bila didukung)", + "Automatic grouping restored": "Pengelompokan otomatis dipulihkan", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "Otomatis mengutamakan GPU NVIDIA khusus dan komputasi presisi setengah (FP16) bila didukung.", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "Otomatis memakai SAM 3 jika terinstal, jika tidak SAM 2.1. Masker Deskripsi selalu memakai SAM 3.", "Automatically Toggle Mask Overlay": "Alihkan overlay masker secara otomatis", @@ -317,6 +318,7 @@ "Background Preparation Settings": "Pengaturan persiapan di latar belakang", "Backup": "Cadangan", "Backup folder": "Folder cadangan", + "Balanced": "Seimbang", "Balanced: a standard dial feel with responsive mid-range acceleration.": "Seimbang: nuansa dial standar dengan akselerasi rentang tengah yang responsif.", "Band": "Pita", "Base curve": "Kurva dasar", @@ -572,9 +574,12 @@ "Clear Rating": "Hapus rating", "Clear Role": "Hapus peran", "Clear Search Index": "Hapus indeks pencarian", + "Clear Selected Face Data": "Hapus Data Wajah yang Dipilih", "Clear Sensor Dust Map": "Kosongkan peta debu sensor", "Clear Slideshow Music": "Hapus musik tayangan slide", "Clear Tracklogs": "Hapus log jejak GPS", + "Clear selection": "Hapus pilihan", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "Menghapus embedding tembolok dan saran untuk wajah yang dipilih. Pengindeksan latar belakang dapat membuatnya kembali. Nama dan keputusan tetap dipertahankan.", "Clear…": "Hapus…", "Click Through": "Klik tembus", "Click a cell on a page to edit it.": "Klik sel pada halaman untuk mengeditnya.", @@ -888,6 +893,7 @@ "Describe photos…": "Deskripsikan foto…", "Deselect Active Photo": "Batalkan pilihan foto aktif", "Deselect Unflagged Photos": "Batalkan pilihan foto tanpa tanda", + "Deselect group": "Batalkan pilihan grup", "Destination": "Tujuan", "Detach Mask List": "Lepaskan Daftar Masker", "Detach the mask list": "Lepaskan daftar masker", @@ -898,6 +904,7 @@ "Detect and Recognize": "Deteksi dan Kenali", "Detecting faces…": "Mendeteksi wajah…", "Detecting orientation": "Mendeteksi orientasi", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "Deteksi berjalan pada seluruh foto yang berisi wajah yang dipilih, termasuk wajah lain di foto tersebut.", "Detection sensitivity": "Sensitivitas deteksi", "Develop Settings": "Pengaturan olah", "Develop preset": "Preset olah", @@ -1178,7 +1185,9 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "Pengenalan wajah nonaktif. Aktifkan untuk mendapatkan saran nama dan melihat wajah yang mirip secara berkelompok.", "Face recognition is on": "Pengenalan wajah aktif", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "Pengenalan wajah memerlukan model untuk menyarankan nama: cukup diunduh sekali, di Pengaturan.", + "Face removed from similarity groups": "Wajah dihapus dari grup kemiripan", "Face scan": "Pencarian wajah", + "Faces without a displayed look-alike group.": "Wajah tanpa grup kemiripan yang ditampilkan.", "Fade": "Transisi pudar", "Fade duration": "Durasi transisi pudar", "Fades": "Transisi pudar", @@ -1444,7 +1453,11 @@ "Grid: last photo of the view": "Grid: foto terakhir di tampilan", "Group (optional)": "Grup (opsional)", "Group Unnamed Faces": "Kelompokkan wajah tanpa nama", + "Grouping": "Pengelompokan", + "Grouping faces across the library in the background…": "Mengelompokkan wajah di seluruh pustaka di latar belakang…", + "Grouping unknown faces": "Mengelompokkan wajah tidak dikenal", "Groups": "Grup", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "Grup menggunakan wajah di seluruh filter pustaka saat ini; memilih grup mencakup wajahnya di halaman lain.", "Grow": "Perluas", "Guided Laplacian": "Laplacian terpandu", "Guided Upright isn't supported; straighten these photos again in Transform.": "Tegakkan terpandu tidak didukung; luruskan lagi foto-foto ini di Transformasi.", @@ -1935,6 +1948,7 @@ "Looking up new photos in Immich": "Mencari foto baru di Immich", "Looks at every photo on the server again, not only those changed since the last pass.": "Memeriksa lagi semua foto di server, bukan hanya yang berubah sejak penautan terakhir.", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "Memeriksa mata subjek seperti strip mata, sekitar satu detik per foto, di latar belakang. Foto pilihan dibiarkan.", + "Loose": "Longgar", "Loupe": "Tampilan tunggal", "Loupe Background": "Latar loupe", "Loupe Info": "Info tampilan tunggal", @@ -2348,6 +2362,7 @@ "Only one of the photo and the reference records its aperture": "Hanya foto atau hanya referensi yang mencatat bukaannya", "Only the files and folders you pick": "Hanya file dan folder yang Anda pilih", "Only the first published photos were asked.": "Hanya foto terpublikasi pertama yang ditanyakan.", + "Only the selected faces are processed.": "Hanya wajah yang dipilih yang diproses.", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "Hanya foto-foto ini yang ditambahkan. Nyalakan ini, atau Pengaturan > Folder > Pantau foto baru, untuk menambahkan yang baru saat Anda mengambilnya.", "Only this area and the outline of what to fill are sent: not the whole photo, not its metadata.": "Hanya area ini dan garis bentuk yang akan diisi yang dikirim: bukan seluruh foto, bukan metadatanya.", "Only you can allow a permission: a click from an agent or a script changes nothing.": "Hanya Anda yang dapat mengizinkan izin: klik dari agen atau skrip tidak mengubah apa pun.", @@ -2403,6 +2418,7 @@ "Other devices see this name. Every device needs its own.": "Perangkat lain melihat nama ini. Setiap perangkat memerlukan namanya sendiri.", "Other models (optional)": "Model lain (opsional)", "Other server…": "Server lain…", + "Other unknown faces": "Wajah tidak dikenal lainnya", "Others get previews to develop; only this device adds photos.": "Yang lain mendapat pratinjau untuk diolah; hanya perangkat ini yang menambahkan foto.", "Others may also fetch the originals; only this device adds photos.": "Yang lain juga boleh mengambil aslinya; hanya perangkat ini yang menambahkan foto.", "Output": "Output", @@ -2794,6 +2810,7 @@ "Reload": "Muat ulang", "Reload MIDI Map": "Muat ulang peta MIDI", "Reload Preview": "Muat ulang pratinjau", + "Reload the faces and try again": "Muat ulang wajah lalu coba lagi", "Remember Dialog Choices": "Ingat pilihan dialog", "Remember Each Source's Filters Separately": "Ingat filter setiap sumber secara terpisah", "Remember as…": "Ingat sebagai…", @@ -2838,6 +2855,7 @@ "Remove from At Import": "Keluarkan dari Saat impor", "Remove from List": "Keluarkan dari daftar", "Remove from Quick Collection": "Keluarkan dari koleksi cepat", + "Remove from similarity groups": "Hapus dari grup kemiripan", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "Keluarkan dari katalog (ke Baru dihapus; file tetap di disk)", "Remove from the stack": "Keluarkan dari tumpukan", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "Mengeluarkan foto tidak menghapus file di disk; foto dipindahkan ke Baru dihapus.", @@ -2932,6 +2950,7 @@ "Restore Built-ins": "Pulihkan bawaan", "Restore Catalog from Backup…": "Pulihkan katalog dari cadangan…", "Restore Generated Fill": "Pulihkan isian generatif", + "Restore automatic grouping": "Pulihkan pengelompokan otomatis", "Restore the photo to use it as the reference": "Pulihkan foto untuk menjadikannya referensi", "Resume": "Lanjutkan", "Resume Face Scan": "Lanjutkan pencarian wajah", @@ -2947,6 +2966,7 @@ "Reverse geocoding is off: choose Offline or Online first": "Geocoding terbalik nonaktif: pilih Offline atau Online terlebih dahulu", "Revert Capture Time to Original": "Kembalikan waktu pengambilan ke aslinya", "Review Comments": "Tinjau komentar", + "Review these similar faces before naming or ignoring them.": "Tinjau wajah-wajah yang mirip ini sebelum menamai atau mengabaikannya.", "Revoke": "Cabut", "Revoke Plug-in Permission": "Cabut Izin Plug-in", "Right Panel": "Panel kanan", @@ -3107,6 +3127,8 @@ "Select by Color Label": "Pilih menurut label warna", "Select by Flag": "Pilih menurut tanda", "Select by Rating": "Pilih menurut rating", + "Select group": "Pilih grup", + "Select group for maintenance": "Pilih grup untuk pemeliharaan", "Select photos to import": "Pilih foto untuk diimpor", "Select photos to move them to this location": "Pilih foto untuk memindahkannya ke lokasi ini", "Select photos to see their info.": "Pilih foto untuk melihat infonya.", @@ -3309,6 +3331,7 @@ "Side": "Samping", "Side by Side": "Berdampingan", "Signed by": "Ditandatangani oleh", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "Wajah tidak dikenal yang mirip dikelompokkan di bawah ini. Pilih grup, tinjau wajahnya, lalu beri nama atau abaikan.", "Simple": "Sederhana", "Single Image / Contact Sheet": "Gambar tunggal / Lembar kontak", "Single Page": "Satu halaman", @@ -3355,6 +3378,7 @@ "Space Zooms To": "Spasi memperbesar ke", "Spacing": "Jarak", "Speed-Edit Keys": "Tombol Edit Cepat", + "Split Unknown Faces": "Pisahkan Wajah Tidak Dikenal", "Spot": "Bintik", "Spot Removal": "Penghapusan bintik", "Spread": "Halaman ganda", @@ -3398,6 +3422,7 @@ "Stop using": "Berhenti menggunakan", "Store Presets and Profiles with This Catalog": "Simpan preset dan profil bersama katalog ini", "Strength": "Kekuatan", + "Strict": "Ketat", "Stroke Border": "Garis tepi", "Studio Capture": "Pemotretan studio", "Studio Session": "Sesi studio", @@ -3582,6 +3607,7 @@ "The second chart photo isn't read yet": "Foto bagan kedua belum dibaca", "The second graphics card is left free for previews and thumbnails.": "Kartu grafis kedua dibiarkan bebas untuk pratinjau dan gambar mini.", "The selected photos are in this location": "Foto yang dipilih ada di lokasi ini", + "The selection changed. Reload the faces and try again": "Pilihan berubah. Muat ulang wajah lalu coba lagi", "The server answers; the key works.": "Server merespons; kunci berfungsi.", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "Server memakai sertifikat yang tidak dijamin otoritas mana pun (umum untuk server rumahan). Percayai hanya jika sidik jari SHA-256 ini cocok dengan sertifikat server Anda:", "The size limit picks the highest quality, up to Quality, whose file fits.": "Batas ukuran memilih kualitas tertinggi, hingga nilai Kualitas, yang filenya masih muat.", @@ -4093,6 +4119,7 @@ "removed": "dikeluarkan", "role": "peran", "scene-linear Rec. 2020": "linear scene Rec. 2020", + "selected faces in People": "wajah yang dipilih di Orang", "selected photos": "foto yang dipilih", "shots": "jepretan", "size": "ukuran", diff --git a/crates/ui-egui/locales/fork/it.json b/crates/ui-egui/locales/fork/it.json index 0d6a6e7d10..c18fa69a51 100644 --- a/crates/ui-egui/locales/fork/it.json +++ b/crates/ui-egui/locales/fork/it.json @@ -278,6 +278,7 @@ "Auto-Tag Selected Photos": "Tagga automaticamente le foto selezionate", "Auto-fill new books with the selected photos": "Riempi automaticamente i nuovi libri con le foto selezionate", "Automatic (FP16 when supported)": "Automatica (FP16 se supportata)", + "Automatic grouping restored": "Raggruppamento automatico ripristinato", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "La modalità automatica preferisce le GPU NVIDIA dedicate e il calcolo a mezza precisione (FP16) quando supportati.", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "Automatico usa SAM 3 quando è installato, altrimenti SAM 2.1. Le maschere Descrivi usano sempre SAM 3.", "Automatically Toggle Mask Overlay": "Attiva/disattiva automaticamente la sovrapposizione maschera", @@ -300,6 +301,7 @@ "Background Preparation Settings": "Impostazioni della preparazione in background", "Backup": "Backup", "Backup folder": "Cartella di backup", + "Balanced": "Bilanciato", "Balanced: a standard dial feel with responsive mid-range acceleration.": "Bilanciata: una ghiera dalla risposta standard con accelerazione reattiva nella fascia media.", "Band": "Banda", "Base tone": "Tono di base", @@ -544,9 +546,12 @@ "Clear Rating": "Togli valutazione", "Clear Role": "Togli ruolo", "Clear Search Index": "Cancella indice di ricerca", + "Clear Selected Face Data": "Cancella dati dei volti selezionati", "Clear Sensor Dust Map": "Svuota la mappa della polvere del sensore", "Clear Slideshow Music": "Togli la musica della presentazione", "Clear Tracklogs": "Cancella tracciati", + "Clear selection": "Cancella selezione", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "Cancella gli embedding in cache e i suggerimenti per i volti selezionati. L’indicizzazione in background può ricrearli. Nomi e decisioni vengono mantenuti.", "Clear…": "Cancella…", "Click Through": "Clic passante", "Click a cell on a page to edit it.": "Fai clic su una cella di una pagina per modificarla.", @@ -846,6 +851,7 @@ "Describe photos…": "Descrivi le foto…", "Deselect Active Photo": "Deseleziona foto attiva", "Deselect Unflagged Photos": "Deseleziona foto senza contrassegno", + "Deselect group": "Deseleziona gruppo", "Destination": "Destinazione", "Detach Mask List": "Stacca elenco maschere", "Detach the mask list": "Stacca l'elenco delle maschere", @@ -856,6 +862,7 @@ "Detect and Recognize": "Rileva e riconosci", "Detecting faces…": "Rilevamento dei volti…", "Detecting orientation": "Rilevamento dell’orientamento", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "Il rilevamento viene eseguito sulle intere foto che contengono i volti selezionati, inclusi altri volti presenti in quelle foto.", "Detection sensitivity": "Sensibilità di rilevamento", "Develop Settings": "Impostazioni di sviluppo", "Develop preset": "Preset di sviluppo", @@ -1125,7 +1132,9 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "Il riconoscimento dei volti è disattivato. Attivalo per ricevere suggerimenti di nomi e vedere insieme i volti simili.", "Face recognition is on": "Il riconoscimento dei volti è attivo", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "Il riconoscimento dei volti richiede un modello per suggerire i nomi: un download una tantum, in Impostazioni.", + "Face removed from similarity groups": "Volto rimosso dai gruppi di somiglianza", "Face scan": "Ricerca volti", + "Faces without a displayed look-alike group.": "Volti senza un gruppo di somiglianza mostrato.", "Fade": "Dissolvenza", "Fade duration": "Durata della dissolvenza", "Fades": "Dissolvenze", @@ -1383,7 +1392,11 @@ "Grid: last photo of the view": "Griglia: ultima foto della vista", "Group (optional)": "Gruppo (facoltativo)", "Group Unnamed Faces": "Raggruppa i volti senza nome", + "Grouping": "Raggruppamento", + "Grouping faces across the library in the background…": "Raggruppamento dei volti nella libreria in background…", + "Grouping unknown faces": "Raggruppamento dei volti sconosciuti", "Groups": "Gruppi", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "I gruppi includono i volti dell’intero filtro libreria corrente; selezionare un gruppo include anche i suoi volti nelle altre pagine.", "Grow": "Espandi", "Guided Laplacian": "Laplaciano guidato", "Guided Upright isn't supported; straighten these photos again in Transform.": "Il raddrizzamento guidato non è supportato; raddrizza di nuovo queste foto in Trasforma.", @@ -1857,6 +1870,7 @@ "Looking up new photos in Immich": "Ricerca delle nuove foto in Immich", "Looks at every photo on the server again, not only those changed since the last pass.": "Riesamina tutte le foto sul server, non solo quelle modificate dall'ultimo passaggio.", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "Esamina gli occhi dei soggetti come fa la striscia degli occhi, circa un secondo per foto, in background. Le foto scelte restano intatte.", + "Loose": "Ampio", "Loupe": "Lente", "Loupe Background": "Sfondo lente", "Loupe Info": "Info lente", @@ -2238,6 +2252,7 @@ "Only one of the photo and the reference records its aperture": "Solo la foto o solo il riferimento registra il diaframma", "Only the files and folders you pick": "Solo i file e le cartelle che scegli", "Only the first published photos were asked.": "Sono state interrogate solo le prime foto pubblicate.", + "Only the selected faces are processed.": "Vengono elaborati solo i volti selezionati.", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "Vengono aggiunte solo queste foto. Attiva questa opzione, o Impostazioni > Cartelle > Controlla nuove foto, per aggiungere le nuove man mano.", "Only you can allow a permission: a click from an agent or a script changes nothing.": "Solo tu puoi consentire un'autorizzazione: un clic di un agente o di uno script non cambia nulla.", "Open AI Models": "Apri modelli IA", @@ -2287,6 +2302,7 @@ "Other devices see this name. Every device needs its own.": "Gli altri dispositivi vedono questo nome. Ogni dispositivo ne ha bisogno di uno proprio.", "Other models (optional)": "Altri modelli (facoltativi)", "Other server…": "Altro server…", + "Other unknown faces": "Altri volti sconosciuti", "Others get previews to develop; only this device adds photos.": "Gli altri ricevono anteprime da sviluppare; solo questo dispositivo aggiunge foto.", "Others may also fetch the originals; only this device adds photos.": "Gli altri possono anche scaricare gli originali; solo questo dispositivo aggiunge foto.", "Output": "Uscita", @@ -2658,6 +2674,7 @@ "Reload": "Ricarica", "Reload MIDI Map": "Ricarica mappa MIDI", "Reload Preview": "Ricarica anteprima", + "Reload the faces and try again": "Ricarica i volti e riprova", "Remember Dialog Choices": "Ricorda le scelte delle finestre di dialogo", "Remember Each Source's Filters Separately": "Ricorda separatamente i filtri di ogni origine", "Remember as…": "Memorizza come…", @@ -2701,6 +2718,7 @@ "Remove dust on import": "Rimuovi la polvere all'importazione", "Remove from At Import": "Rimuovi da All'importazione", "Remove from Quick Collection": "Rimuovi dalla raccolta rapida", + "Remove from similarity groups": "Rimuovi dai gruppi di somiglianza", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "Rimuovi dal catalogo (in Eliminate di recente; i file restano sul disco)", "Remove from the stack": "Rimuovi dalla pila", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "Rimuovi lascia i file sul disco e sposta le foto in Eliminate di recente.", @@ -2789,6 +2807,7 @@ "Restore Built-ins": "Ripristina integrati", "Restore Catalog from Backup…": "Ripristina catalogo da backup…", "Restore Generated Fill": "Ripristina riempimento generato", + "Restore automatic grouping": "Ripristina raggruppamento automatico", "Restore the photo to use it as the reference": "Ripristina la foto per usarla come riferimento", "Resume": "Riprendi", "Resume Face Scan": "Riprendi ricerca volti", @@ -2802,6 +2821,7 @@ "Reverse geocoding is off: choose Offline or Online first": "La geocodifica inversa è disattivata: scegli prima Offline oppure Online", "Revert Capture Time to Original": "Ripristina ora di scatto originale", "Review Comments": "Rivedi commenti", + "Review these similar faces before naming or ignoring them.": "Controlla questi volti simili prima di nominarli o ignorarli.", "Revoke": "Revoca", "Revoke Plug-in Permission": "Revoca autorizzazione plug-in", "Right Panel": "Pannello destro", @@ -2949,6 +2969,8 @@ "Select by Color Label": "Seleziona per etichetta colore", "Select by Flag": "Seleziona per bandiera", "Select by Rating": "Seleziona per valutazione", + "Select group": "Seleziona gruppo", + "Select group for maintenance": "Seleziona gruppo per manutenzione", "Select photos to import": "Seleziona le foto da importare", "Select photos to move them to this location": "Seleziona delle foto per spostarle in questo luogo", "Select photos to see their info.": "Seleziona le foto per vederne le informazioni.", @@ -3134,6 +3156,7 @@ "Side": "Lato", "Side by Side": "Affiancate", "Signed by": "Firmato da", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "I volti sconosciuti simili sono raggruppati qui sotto. Seleziona un gruppo, controllane i volti, poi nominali o ignorali.", "Simple": "Semplice", "Single Image / Contact Sheet": "Immagine singola / provino a contatto", "Single Page": "Pagina singola", @@ -3179,6 +3202,7 @@ "Space Zooms To": "Spazio ingrandisce a", "Spacing": "Spaziatura", "Speed-Edit Keys": "Tasti di modifica rapida", + "Split Unknown Faces": "Separa volti sconosciuti", "Spot Removal": "Rimozione macchie", "Spread": "Doppia pagina", "Spread View": "Vista doppia pagina", @@ -3220,6 +3244,7 @@ "Stop using": "Non usare più", "Store Presets and Profiles with This Catalog": "Conserva preset e profili con questo catalogo", "Strength": "Intensità", + "Strict": "Rigoroso", "Stroke Border": "Bordo a tratto", "Studio Capture": "Acquisizione in studio", "Studio Session": "Sessione in studio", @@ -3391,6 +3416,7 @@ "The second chart photo isn't read yet": "La foto della seconda tavola non è ancora stata letta", "The second graphics card is left free for previews and thumbnails.": "La seconda scheda grafica resta libera per anteprime e miniature.", "The selected photos are in this location": "Le foto selezionate sono in questo luogo", + "The selection changed. Reload the faces and try again": "La selezione è cambiata. Ricarica i volti e riprova", "The server answers; the key works.": "Il server risponde; la chiave funziona.", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "Il server usa un certificato non garantito da alcuna autorità (comune per i server domestici). Consideralo attendibile solo se questa impronta SHA-256 corrisponde al certificato del tuo server:", "The size limit picks the highest quality, up to Quality, whose file fits.": "Il limite di dimensione sceglie la qualità più alta, fino a Qualità, il cui file ci rientra.", @@ -3869,6 +3895,7 @@ "removed": "rimossi", "role": "ruolo", "scene-linear Rec. 2020": "lineare di scena in Rec. 2020", + "selected faces in People": "i volti selezionati in Persone", "selected photos": "foto selezionate", "shots": "scatti", "size": "dimensione", diff --git a/crates/ui-egui/locales/fork/ja.json b/crates/ui-egui/locales/fork/ja.json index ea4280bac7..7990469343 100644 --- a/crates/ui-egui/locales/fork/ja.json +++ b/crates/ui-egui/locales/fork/ja.json @@ -291,6 +291,7 @@ "Auto-fill new books with the selected photos": "新しいブックを選択した写真で自動的に埋める", "Automatic": "自動", "Automatic (FP16 when supported)": "自動 (対応時は FP16)", + "Automatic grouping restored": "自動グループ化を復元しました", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "自動では、対応している場合に専用 NVIDIA GPU と半精度 (FP16) 演算を優先します。", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "自動では、SAM 3 がインストールされていれば SAM 3、なければ SAM 2.1 を使います。説明マスクは常に SAM 3 を使います。", "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.": "「自動」では、プロセッサーより速い場合にグラフィックカードを使います。最初に写真を生成するときに、このコンピューターで両方の速度を計測します。", @@ -317,6 +318,7 @@ "Background Tasks": "バックグラウンドタスク", "Backup": "バックアップ", "Backup folder": "バックアップフォルダ", + "Balanced": "バランス", "Band": "帯", "Base tone": "ベーストーン", "Baseline": "ベースライン", @@ -576,10 +578,13 @@ "Clear Rating": "評価を解除", "Clear Role": "役割を解除", "Clear Search Index": "検索インデックスを消去", + "Clear Selected Face Data": "選択した顔のデータを消去", "Clear Sensor Dust Map": "センサーダストマップを消去", "Clear Slideshow Music": "スライドショーの音楽を解除", "Clear Tracklogs": "トラックログを消去", "Clear cache": "キャッシュを消去", + "Clear selection": "選択を解除", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "選択した顔のキャッシュ済み埋め込みと候補を消去します。バックグラウンドのインデックス作成で再生成される場合があります。名前と判定は保持されます。", "Clear…": "消去…", "Click Through": "クリックスルー", "Click a cell on a page to edit it.": "ページのセルをクリックして編集します。", @@ -888,6 +893,7 @@ "Describe photos…": "写真を説明…", "Deselect Active Photo": "アクティブな写真の選択を解除", "Deselect Unflagged Photos": "フラグなしの写真の選択を解除", + "Deselect group": "グループの選択を解除", "Destination": "保存先", "Detach Mask List": "マスク一覧を切り離す", "Detach the mask list": "マスク一覧を切り離す", @@ -901,6 +907,7 @@ "Detecting faces…": "顔を検出しています…", "Detecting orientation": "向きを判定中", "Detection": "検出", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "検出は選択した顔を含む写真全体に対して実行され、同じ写真内の他の顔も含まれます。", "Detection sensitivity": "検出の感度", "Develop": "現像", "Develop Settings": "現像設定", @@ -1193,9 +1200,11 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "顔認識はオフです。オンにすると、名前の候補が表示され、似た顔がまとめて表示されます。", "Face recognition is on": "顔認識はオンです", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "顔認識で名前を提案するにはモデルが必要です。設定から一度だけダウンロードします。", + "Face removed from similarity groups": "類似グループから顔を除外しました", "Face scan": "顔のスキャン", "Faces": "顔", "Faces of a Person": "人物の顔", + "Faces without a displayed look-alike group.": "表示中の類似グループに属さない顔。", "Fade": "フェード", "Fade duration": "フェードの長さ", "Fades": "フェード", @@ -1433,7 +1442,11 @@ "Grid: last photo of the view": "グリッド:表示中の最後の写真", "Group (optional)": "グループ(任意)", "Group Unnamed Faces": "名前のない顔をグループ化", + "Grouping": "グループ化", + "Grouping faces across the library in the background…": "ライブラリ全体の顔をバックグラウンドでグループ化しています…", + "Grouping unknown faces": "不明な顔をグループ化中", "Groups": "グループ", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "グループは現在のライブラリフィルター全体を対象にします。グループを選択すると他のページにある顔も含まれます。", "Grow": "拡張", "Guided Laplacian": "ガイド付きラプラシアン", "Guided Upright isn't supported; straighten these photos again in Transform.": "ガイド付き遠近補正には対応していません。これらの写真は「変形」で傾きを補正し直してください。", @@ -1906,6 +1919,7 @@ "Looking up new photos in Immich": "Immich で新しい写真を検索中", "Looks at every photo on the server again, not only those changed since the last pass.": "前回以降に変更された写真だけでなく、サーバー上のすべての写真をもう一度確認します。", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "アイストリップと同じように被写体の目を確認します。1 枚あたり約 1 秒で、バックグラウンドで実行します。採用の写真はそのままです。", + "Loose": "ゆるやか", "Lossy DNG files and Smart Previews open as raw photos.": "非可逆 DNG とスマートプレビューは RAW 写真として開きます。", "Loupe": "ルーペ", "Loupe Background": "ルーペの背景", @@ -2302,6 +2316,7 @@ "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.": "AIノイズ除去の適用量が0より大きい写真だけを生成します。書き出しでは、未生成の場合は必ず生成します。", "Only the files and folders you pick": "選んだファイルとフォルダーのみ", "Only the first published photos were asked.": "最初の公開済み写真のみ取得しました。", + "Only the selected faces are processed.": "選択した顔のみが処理されます。", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "これらの写真だけが追加されます。撮影した新しい写真も追加するには、これをオンにするか、設定 > フォルダー > 新しい写真を監視 をオンにします。", "Only you can allow a permission: a click from an agent or a script changes nothing.": "権限を許可できるのはあなただけです。エージェントやスクリプトによるクリックでは何も変わりません。", "Open": "開く", @@ -2361,6 +2376,7 @@ "Other editor": "他のエディター", "Other models (optional)": "その他のモデル(任意)", "Other server…": "その他のサーバー…", + "Other unknown faces": "その他の不明な顔", "Others get previews to develop; only this device adds photos.": "他のデバイスは現像用のプレビューを受け取ります。写真を追加するのはこのデバイスだけです。", "Others may also fetch the originals; only this device adds photos.": "他のデバイスは元画像も取得できます。写真を追加するのはこのデバイスだけです。", "Output": "出力", @@ -2739,6 +2755,7 @@ "Reload": "再読み込み", "Reload MIDI Map": "MIDI マップを再読み込み", "Reload Preview": "プレビューを再読み込み", + "Reload the faces and try again": "顔を再読み込みしてやり直してください", "Remember Dialog Choices": "ダイアログの選択を記憶", "Remember Each Source's Filters Separately": "各ソースのフィルターを個別に記憶", "Remember as…": "名前を付けて記憶…", @@ -2779,6 +2796,7 @@ "Remove from List": "リストから削除", "Remove from Quick Collection": "クイックコレクションから削除", "Remove from Target Collection": "ターゲットコレクションから削除", + "Remove from similarity groups": "類似グループから除外", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "カタログから削除(最近削除した項目へ。ファイルはディスクに残ります)", "Remove from the stack": "スタックから外す", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "「取り除く」はファイルをディスクに残し、写真を「最近削除した写真」に移動します。", @@ -2866,6 +2884,7 @@ "Restore Built-ins": "内蔵プリセットを復元", "Restore Catalog from Backup…": "バックアップからカタログを復元…", "Restore Generated Fill": "生成塗りつぶしを復元", + "Restore automatic grouping": "自動グループ化を復元", "Restore the photo to use it as the reference": "参照写真として使うには、写真を復元してください", "Resume": "再開", "Resume Face Scan": "顔のスキャンを再開", @@ -2880,6 +2899,7 @@ "Reverse geocoding is off: choose Offline or Online first": "逆ジオコーディングはオフです:先にオフラインかオンラインを選択してください", "Revert Capture Time to Original": "撮影日時を元に戻す", "Review Comments": "コメントを確認", + "Review these similar faces before naming or ignoring them.": "名前を付けるか無視する前に、これらの似ている顔を確認してください。", "Revoke": "取り消す", "Revoke Plug-in Permission": "プラグインの権限を取り消す", "Right": "右", @@ -3037,6 +3057,8 @@ "Select by Color Label": "カラーラベルで選択", "Select by Flag": "フラグで選択", "Select by Rating": "評価で選択", + "Select group": "グループを選択", + "Select group for maintenance": "メンテナンス用にグループを選択", "Select none": "選択を解除", "Select photos to import": "読み込む写真を選択", "Select photos to move them to this location": "写真を選択すると、この場所に移動できます", @@ -3227,6 +3249,7 @@ "Side": "横", "Side by Side": "左右に並べる", "Signed by": "署名者", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "似ている不明な顔が下にグループ化されています。グループを選択して顔を確認してから、名前を付けるか無視してください。", "Simple": "シンプル", "Single Image / Contact Sheet": "単一画像 / コンタクトシート", "Single Page": "単一ページ", @@ -3286,6 +3309,7 @@ "Specific folder": "指定フォルダー", "Speed": "速度", "Speed-Edit Keys": "スピード編集キー", + "Split Unknown Faces": "不明な顔をグループから除外", "Spot Removal": "スポット除去", "Spread": "見開き", "Spread View": "見開き表示", @@ -3327,6 +3351,7 @@ "Stop syncing? Nothing is deleted on any device.": "同期を停止しますか?どのデバイスでも何も削除されません。", "Store Presets and Profiles with This Catalog": "プリセットとプロファイルをこのカタログに保存", "Strength": "強さ", + "Strict": "厳密", "Stroke Border": "境界線", "Studio Capture": "スタジオ撮影", "Studio Session": "スタジオセッション", @@ -3507,6 +3532,7 @@ "The score is the factors' weighted mean; 0 leaves one out of it (it is still measured).": "スコアは各要素の加重平均です。0 にするとその要素は除外されます(測定はされます)。", "The second graphics card is left free for previews and thumbnails.": "2枚目のグラフィックカードはプレビューとサムネール用に空けておきます。", "The selected photos are in this location": "選択した写真はこの場所にあります", + "The selection changed. Reload the faces and try again": "選択が変更されました。顔を再読み込みしてやり直してください", "The server answers; the key works.": "サーバーが応答しました。キーは有効です。", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "このサーバーは認証局の保証がない証明書を使っています(家庭用サーバーではよくあります)。この SHA-256 フィンガープリントがサーバーの証明書と一致する場合にのみ信頼してください:", "The size limit picks the highest quality, up to Quality, whose file fits.": "サイズ上限では、ファイルが収まる範囲で「品質」以下の最高品質を選びます。", @@ -4070,6 +4096,7 @@ "role": "役割", "save goes through.": "保存が完了するまで。", "scene-linear Rec. 2020": "シーンリニア Rec. 2020", + "selected faces in People": "「人物」で選択した顔", "selected photos": "選択した写真", "shots": "枚", "siblings) no longer open bright green (issue #148): their as-shot white balance and black level are read from the": "兄弟機種)が鮮やかな緑で開かなくなりました(issue #148): 撮影時のホワイトバランスと黒レベルを次から読み取ります:", diff --git a/crates/ui-egui/locales/fork/ka.json b/crates/ui-egui/locales/fork/ka.json index 50faf8a3d5..aebb86e7db 100644 --- a/crates/ui-egui/locales/fork/ka.json +++ b/crates/ui-egui/locales/fork/ka.json @@ -313,6 +313,7 @@ "Auto-Tag Selected Photos": "მონიშნული ფოტოებისთვის მდებარეობის მინიჭება", "Auto-fill new books with the selected photos": "ახალი წიგნების ავტომატური შევსება არჩეული ფოტოებით", "Automatic (FP16 when supported)": "ავტომატური (FP16 მხარდაჭერისას)", + "Automatic grouping restored": "ავტომატური დაჯგუფება აღდგენილია", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "ავტომატური რეჟიმი მხარდაჭერის შემთხვევაში უპირატესობას ანიჭებს გამოყოფილ NVIDIA GPU-ებსა და ნახევარი სიზუსტის (FP16) გამოთვლებს.", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "„ავტომატური“ იყენებს SAM 3-ს, თუ დაყენებულია, თორემ SAM 2.1-ს. ნიღბები „აღწერა“ ყოველთვის SAM 3-ს იყენებს.", "Automatically Toggle Mask Overlay": "ნიღბის ზედდების ავტომატური გადართვა", @@ -339,6 +340,7 @@ "Background image": "ფონის სურათი", "Backup": "სარეზერვო ასლი", "Backup folder": "სარეზერვო ასლების საქაღალდე", + "Balanced": "დაბალანსებული", "Balanced: a standard dial feel with responsive mid-range acceleration.": "დაბალანსებული: სახელურის ჩვეული შეგრძნება, საშუალო დიაპაზონში მგრძნობიარე აჩქარებით.", "Band": "ზოლი", "Base curve": "საბაზისო მრუდი", @@ -605,9 +607,12 @@ "Clear Rating": "შეფასების მოხსნა", "Clear Role": "როლის მოხსნა", "Clear Search Index": "ძებნის ინდექსის გასუფთავება", + "Clear Selected Face Data": "არჩეული სახეების მონაცემების გასუფთავება", "Clear Sensor Dust Map": "სენსორის მტვრის რუკის გასუფთავება", "Clear Slideshow Music": "სლაიდშოუს მუსიკის მოხსნა", "Clear Tracklogs": "მარშრუტის ჟურნალების გასუფთავება", + "Clear selection": "არჩევის გასუფთავება", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "ასუფთავებს არჩეული სახეების ქეშირებულ ჩაშენებულ ვექტორებსა და შემოთავაზებებს. ფონურმა ინდექსაციამ შეიძლება ისინი ხელახლა შექმნას. სახელები და გადაწყვეტილებები შენახულია.", "Clear…": "გასუფთავება…", "Click Through": "გამჭოლი წკაპი", "Click a cell on a page to edit it.": "დააწკაპუნეთ გვერდზე უჯრას მის დასარედაქტირებლად.", @@ -942,6 +947,7 @@ "Describe photos…": "ფოტოების აღწერა…", "Deselect Active Photo": "აქტიური ფოტოს მონიშვნის მოხსნა", "Deselect Unflagged Photos": "დროშის გარეშე ფოტოების მონიშვნის მოხსნა", + "Deselect group": "ჯგუფის არჩევის მოხსნა", "Destination": "დანიშნულება", "Destination catalog": "დანიშნულების კატალოგი", "Detach Mask List": "ნიღბების სიის გამოყოფა", @@ -954,6 +960,7 @@ "Detecting faces…": "სახეები ამოიცნობა…", "Detecting orientation": "ორიენტაციის დადგენა", "Detection": "ამოცნობა", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "აღმოჩენა სრულდება მთელ ფოტოებზე, რომლებიც არჩეულ სახეებს შეიცავს, მათ შორის იმავე ფოტოების სხვა სახეებზეც.", "Detection sensitivity": "აღმოჩენის მგრძნობელობა", "Develop Settings": "დამუშავების პარამეტრები", "Develop preset": "დამუშავების პრესეტი", @@ -1256,8 +1263,10 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "სახის ამოცნობა გამორთულია. ჩართეთ, რომ მიიღოთ სახელების შეთავაზებები და მსგავსი სახეები ერთად ნახოთ.", "Face recognition is on": "სახის ამოცნობა ჩართულია", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "სახელების შესათავაზებლად სახის ამოცნობას მოდელი სჭირდება: ერთჯერადი ჩამოტვირთვა, პარამეტრებში.", + "Face removed from similarity groups": "სახე მსგავსების ჯგუფებიდან ამოღებულია", "Face scan": "სახეების ძებნა", "Face tracking": "სახის თვალთვალი", + "Faces without a displayed look-alike group.": "სახეები ნაჩვენები მსგავსების ჯგუფის გარეშე.", "Fade": "გადასვლა", "Fade duration": "გადასვლის ხანგრძლივობა", "Fades": "გადასვლები", @@ -1529,7 +1538,11 @@ "Group Unnamed Faces": "უსახელო სახეების დაჯგუფება", "Grouped by parent": "დაჯგუფებული მშობლის მიხედვით", "Grouped: keywords inside the same keyword share a line naming it, and long lists and the suggestions are shortened.": "დაჯგუფებული: ერთი საკვანძო სიტყვის შიგნით მყოფი საკვანძო სიტყვები ერთ სტრიქონზეა მისი სახელით, გრძელი სიები და შემოთავაზებები კი შემოკლებულია.", + "Grouping": "დაჯგუფება", + "Grouping faces across the library in the background…": "ბიბლიოთეკის სახეების დაჯგუფება ფონურად…", + "Grouping unknown faces": "უცნობი სახეების დაჯგუფება", "Groups": "ჯგუფები", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "ჯგუფები მოიცავს სახეებს ბიბლიოთეკის მიმდინარე ფილტრის ფარგლებში; ჯგუფის არჩევა სხვა გვერდებზე არსებულ მის სახეებსაც მოიცავს.", "Grow": "გაფართოება", "Guided Laplacian": "მართული ლაპლასიანი", "Guided Upright isn't supported; straighten these photos again in Transform.": "მართვადი Upright მხარდაჭერილი არ არის; ეს ფოტოები ხელახლა გაასწორეთ გარდაქმნაში.", @@ -2040,6 +2053,7 @@ "Looking up new photos in Immich": "ახალი ფოტოების მოძებნა Immich-ში", "Looks at every photo on the server again, not only those changed since the last pass.": "ხელახლა ამოწმებს სერვერზე არსებულ ყველა ფოტოს და არა მხოლოდ ბოლო გავლის შემდეგ შეცვლილებს.", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "ფონურ რეჟიმში ამოწმებს ადამიანების თვალებს ისე, როგორც თვალების ზოლი, დაახლოებით წამი თითო ფოტოზე. რჩეული ფოტოები ხელუხლებელი რჩება.", + "Loose": "თავისუფალი", "Loupe": "ლუპა", "Loupe Background": "ლუპის ფონი", "Loupe Info": "ლუპის ინფორმაცია", @@ -2465,6 +2479,7 @@ "Only one of the photo and the reference records its aperture": "დიაფრაგმა მხოლოდ ფოტოს ან მხოლოდ საცნობარო ფოტოს აქვს ჩაწერილი", "Only the files and folders you pick": "მხოლოდ თქვენ მიერ არჩეული ფაილები და საქაღალდეები", "Only the first published photos were asked.": "მოთხოვნილია მხოლოდ პირველი გამოქვეყნებული ფოტოები.", + "Only the selected faces are processed.": "მუშავდება მხოლოდ არჩეული სახეები.", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "ემატება მხოლოდ ეს ფოტოები. ჩართეთ ეს, ან პარამეტრები > საქაღალდეები > ახალი ფოტოების თვალყურის დევნება, რომ ახლები გადაღებისას დაემატოს.", "Only this area and the outline of what to fill are sent: not the whole photo, not its metadata.": "იგზავნება მხოლოდ ეს არე და შესავსების კონტური: არა მთელი ფოტო, არა მისი მეტამონაცემები.", "Only you can allow a permission: a click from an agent or a script changes nothing.": "ნებართვის დაშვება მხოლოდ თქვენ შეგიძლიათ: აგენტის ან სკრიპტის დაწკაპუნება არაფერს ცვლის.", @@ -2521,6 +2536,7 @@ "Other devices see this name. Every device needs its own.": "სხვა მოწყობილობები ამ სახელს ხედავენ. თითოეულ მოწყობილობას თავისი სჭირდება.", "Other models (optional)": "სხვა მოდელები (არასავალდებულო)", "Other server…": "სხვა სერვერი…", + "Other unknown faces": "სხვა უცნობი სახეები", "Others get previews to develop; only this device adds photos.": "სხვები იღებენ გადახედვებს დასამუშავებლად; ფოტოებს მხოლოდ ეს მოწყობილობა ამატებს.", "Others may also fetch the originals; only this device adds photos.": "სხვებს ორიგინალების ჩამოტვირთვაც შეუძლიათ; ფოტოებს მხოლოდ ეს მოწყობილობა ამატებს.", "Output": "გამომავალი", @@ -2928,6 +2944,7 @@ "Reload": "გადატვირთვა", "Reload MIDI Map": "MIDI რუკის ხელახლა ჩატვირთვა", "Reload Preview": "გადახედვის ხელახლა ჩატვირთვა", + "Reload the faces and try again": "ხელახლა ჩატვირთეთ სახეები და სცადეთ კიდევ ერთხელ", "Remember Dialog Choices": "დიალოგების არჩევანის დამახსოვრება", "Remember Each Source's Filters Separately": "თითოეული წყაროს ფილტრების ცალ-ცალკე დამახსოვრება", "Remember as…": "დამახსოვრება როგორც…", @@ -2973,6 +2990,7 @@ "Remove from At Import": "იმპორტისას გამოყენებიდან ამოშლა", "Remove from List": "სიიდან ამოშლა", "Remove from Quick Collection": "სწრაფი კოლექციიდან ამოშლა", + "Remove from similarity groups": "მსგავსების ჯგუფებიდან ამოღება", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "კატალოგიდან ამოშლა („ახლახან წაშლილში“; ფაილები დისკზე რჩება)", "Remove from the stack": "დასტიდან ამოშლა", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "ამოშლისას ფაილები დისკზე რჩება, ფოტოები კი „ახლახან წაშლილში“ გადადის.", @@ -3076,6 +3094,7 @@ "Restore Built-ins": "ჩაშენებულების აღდგენა", "Restore Catalog from Backup…": "კატალოგის აღდგენა სარეზერვო ასლიდან…", "Restore Generated Fill": "გენერირებული შევსების აღდგენა", + "Restore automatic grouping": "ავტომატური დაჯგუფების აღდგენა", "Restore the photo to use it as the reference": "აღადგინეთ ფოტო, რომ ეტალონად გამოიყენოთ", "Resume": "გაგრძელება", "Resume Face Scan": "სახეების ძებნის გაგრძელება", @@ -3091,6 +3110,7 @@ "Reverse geocoding is off: choose Offline or Online first": "უკუგეოკოდირება გამორთულია: ჯერ აირჩიეთ „ოფლაინ“ ან „ონლაინ“", "Revert Capture Time to Original": "გადაღების დროის თავდაპირველზე დაბრუნება", "Review Comments": "კომენტარების გადახედვა", + "Review these similar faces before naming or ignoring them.": "სახელის დარქმევამდე ან იგნორირებამდე გადაამოწმეთ ეს მსგავსი სახეები.", "Revoke": "გაუქმება", "Revoke Plug-in Permission": "დანამატის ნებართვის გაუქმება", "Right": "მარჯვნივ", @@ -3265,6 +3285,8 @@ "Select by Color Label": "მონიშვნა ფერადი იარლიყით", "Select by Flag": "მონიშვნა დროშით", "Select by Rating": "მონიშვნა შეფასებით", + "Select group": "ჯგუფის არჩევა", + "Select group for maintenance": "ჯგუფის არჩევა მოვლისთვის", "Select none": "მონიშვნის მოხსნა", "Select photos to import": "აირჩიეთ იმპორტირებადი ფოტოები", "Select photos to move them to this location": "აირჩიეთ ფოტოები, რომ ამ ადგილას გადაიტანოთ", @@ -3476,6 +3498,7 @@ "Side": "გვერდით", "Side by Side": "გვერდიგვერდ", "Signed by": "ხელმომწერი", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "მსგავსი უცნობი სახეები ქვემოთ არის დაჯგუფებული. აირჩიეთ ჯგუფი, გადაამოწმეთ მისი სახეები, შემდეგ დაარქვით სახელი ან უგულებელყავით.", "Simple": "მარტივი", "Single Image / Contact Sheet": "ერთი გამოსახულება / საკონტაქტო ფურცელი", "Single Page": "ერთი გვერდი", @@ -3535,6 +3558,7 @@ "Spacing": "დაშორება", "Specific folder": "კონკრეტული საქაღალდე", "Speed-Edit Keys": "სწრაფი რედაქტირების კლავიშები", + "Split Unknown Faces": "უცნობი სახეების გამოყოფა", "Spot": "ლაქა", "Spot Removal": "ლაქების მოშორება", "Spread": "გაშლა", @@ -3578,6 +3602,7 @@ "Stop using": "გამოყენების შეწყვეტა", "Store Presets and Profiles with This Catalog": "პრესეტებისა და პროფილების ამ კატალოგთან შენახვა", "Strength": "სიძლიერე", + "Strict": "მკაცრი", "Stroke Border": "კონტურის ჩარჩო", "Stroke border": "კონტურის ჩარჩო", "Studio Capture": "სტუდიური გადაღება", @@ -3768,6 +3793,7 @@ "The second graphics card is left free for previews and thumbnails.": "მეორე გრაფიკული ბარათი თავისუფალი რჩება გადახედვებისა და ესკიზებისთვის.", "The selected photo as a slide. Playback fills the screen; the aspect preview only changes this preview.": "მონიშნული ფოტო სლაიდად. დაკვრა ეკრანს ავსებს; პროპორციის გადახედვა მხოლოდ ამ გადახედვას ცვლის.", "The selected photos are in this location": "არჩეული ფოტოები ამ ადგილასაა", + "The selection changed. Reload the faces and try again": "არჩევა შეიცვალა. ხელახლა ჩატვირთეთ სახეები და სცადეთ კიდევ ერთხელ", "The server answers; the key works.": "სერვერი პასუხობს; გასაღები მუშაობს.", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "სერვერი იყენებს სერტიფიკატს, რომელსაც არცერთი ცენტრი არ ადასტურებს (ჩვეულებრივია სახლის სერვერებისთვის). ენდეთ მას მხოლოდ მაშინ, თუ ეს SHA-256 ანაბეჭდი თქვენი სერვერის სერტიფიკატს ემთხვევა:", "The size limit picks the highest quality, up to Quality, whose file fits.": "ზომის ლიმიტი ირჩევს უმაღლეს ხარისხს „ხარისხის“ ფარგლებში, რომლის ფაილიც ეტევა.", @@ -4299,6 +4325,7 @@ "removed": "წაშლილია", "role": "როლი", "scene-linear Rec. 2020": "სცენურ-ლინეარული Rec. 2020", + "selected faces in People": "ადამიანებში არჩეული სახეები", "selected photos": "მონიშნული ფოტოები", "shots": "კადრი", "size": "ზომა", diff --git a/crates/ui-egui/locales/fork/pl.json b/crates/ui-egui/locales/fork/pl.json index ab1db9eb75..2f6b7b8cbe 100644 --- a/crates/ui-egui/locales/fork/pl.json +++ b/crates/ui-egui/locales/fork/pl.json @@ -300,6 +300,7 @@ "Auto-Tag Selected Photos": "Automatycznie oznacz zaznaczone zdjęcia", "Auto-fill new books with the selected photos": "Automatycznie wypełniaj nowe książki zaznaczonymi zdjęciami", "Automatic (FP16 when supported)": "Automatycznie (FP16, jeśli obsługiwane)", + "Automatic grouping restored": "Przywrócono automatyczne grupowanie", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "Tryb automatyczny preferuje dedykowane karty NVIDIA oraz obliczenia połowicznej precyzji (FP16), jeśli są obsługiwane.", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "Tryb automatyczny używa SAM 3, gdy jest zainstalowany, w przeciwnym razie SAM 2.1. Maski z opisu zawsze używają SAM 3.", "Automatically Toggle Mask Overlay": "Automatycznie przełączaj nakładkę maski", @@ -326,6 +327,7 @@ "Background image": "Obraz tła", "Backup": "Kopia zapasowa", "Backup folder": "Folder kopii zapasowych", + "Balanced": "Zrównoważone", "Balanced: a standard dial feel with responsive mid-range acceleration.": "Zrównoważony: standardowe działanie pokrętła z wyraźnym przyspieszeniem w średnim zakresie.", "Band": "Pas", "Base tone": "Ton bazowy", @@ -588,9 +590,12 @@ "Clear Rating": "Usuń ocenę", "Clear Role": "Usuń rolę", "Clear Search Index": "Wyczyść indeks wyszukiwania", + "Clear Selected Face Data": "Wyczyść dane wybranych twarzy", "Clear Sensor Dust Map": "Wyczyść mapę kurzu na matrycy", "Clear Slideshow Music": "Usuń muzykę pokazu slajdów", "Clear Tracklogs": "Wyczyść ślady GPS", + "Clear selection": "Wyczyść zaznaczenie", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "Czyści zapisane w pamięci podręcznej wektory i sugestie dla wybranych twarzy. Indeksowanie w tle może je odtworzyć. Imiona i decyzje pozostają zachowane.", "Clear…": "Wyczyść…", "Click Through": "Kliknięcie przelotowe", "Click a cell on a page to edit it.": "Kliknij komórkę na stronie, aby ją edytować.", @@ -908,6 +913,7 @@ "Describe photos…": "Opisz zdjęcia…", "Deselect Active Photo": "Usuń zaznaczenie aktywnego zdjęcia", "Deselect Unflagged Photos": "Usuń zaznaczenie zdjęć bez flagi", + "Deselect group": "Odznacz grupę", "Destination": "Miejsce docelowe", "Destination catalog": "Katalog docelowy", "Detach Mask List": "Odłącz listę masek", @@ -920,6 +926,7 @@ "Detecting faces…": "Wykrywanie twarzy…", "Detecting orientation": "Wykrywanie orientacji", "Detection": "Wykrywanie", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "Wykrywanie działa na całych zdjęciach zawierających wybrane twarze, łącznie z innymi twarzami na tych zdjęciach.", "Detection sensitivity": "Czułość wykrywania", "Develop Settings": "Ustawienia wywoływania", "Develop preset": "Ustawienie wstępne wywoływania", @@ -1215,8 +1222,10 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "Rozpoznawanie twarzy jest wyłączone. Włącz je, aby dostawać propozycje imion i widzieć podobne twarze razem.", "Face recognition is on": "Rozpoznawanie twarzy jest włączone", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "Rozpoznawanie twarzy potrzebuje modelu do proponowania imion: jednorazowe pobranie w Ustawieniach.", + "Face removed from similarity groups": "Usunięto twarz z grup podobieństwa", "Face scan": "Wyszukiwanie twarzy", "Face tracking": "Śledzenie twarzy", + "Faces without a displayed look-alike group.": "Twarze bez wyświetlanej grupy podobnych twarzy.", "Fade": "Przejście", "Fade duration": "Czas przejścia", "Fades": "Przejścia", @@ -1483,7 +1492,11 @@ "Group Unnamed Faces": "Grupuj nienazwane twarze", "Grouped by parent": "Grupowane według nadrzędnego", "Grouped: keywords inside the same keyword share a line naming it, and long lists and the suggestions are shortened.": "Grupowane: słowa kluczowe należące do tego samego słowa kluczowego dzielą wiersz z jego nazwą, a długie listy i sugestie są skracane.", + "Grouping": "Grupowanie", + "Grouping faces across the library in the background…": "Grupowanie twarzy w całej bibliotece w tle…", + "Grouping unknown faces": "Grupowanie nieznanych twarzy", "Groups": "Grupy", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "Grupy obejmują twarze z całego bieżącego filtra biblioteki; zaznaczenie grupy obejmuje również jej twarze na innych stronach.", "Grow": "Rozszerz", "Guided Laplacian": "Laplasjan sterowany", "Guided Upright isn't supported; straighten these photos again in Transform.": "Korekcja perspektywy z prowadnicami nie jest obsługiwana; wyprostuj te zdjęcia ponownie w panelu Przekształcenie.", @@ -1981,6 +1994,7 @@ "Looking up new photos in Immich": "Wyszukiwanie nowych zdjęć w Immich", "Looks at every photo on the server again, not only those changed since the last pass.": "Sprawdza ponownie wszystkie zdjęcia na serwerze, a nie tylko zmienione od ostatniego przebiegu.", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "Sprawdza oczy fotografowanych osób tak jak pasek oczu, około sekundy na zdjęcie, w tle. Zdjęcia oznaczone jako wybrane pozostają nietknięte.", + "Loose": "Luźne", "Loupe": "Lupa", "Loupe Background": "Tło lupy", "Loupe Info": "Informacje w lupie", @@ -2387,6 +2401,7 @@ "Only one of the photo and the reference records its aperture": "Przysłonę zapisuje tylko zdjęcie albo tylko odniesienie", "Only the files and folders you pick": "Tylko wybrane pliki i foldery", "Only the first published photos were asked.": "Zapytano tylko o pierwsze opublikowane zdjęcia.", + "Only the selected faces are processed.": "Przetwarzane są tylko wybrane twarze.", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "Dodawane są tylko te zdjęcia. Włącz to lub Ustawienia > Foldery > Obserwuj nowe zdjęcia, aby dodawać nowe na bieżąco.", "Only you can allow a permission: a click from an agent or a script changes nothing.": "Tylko ty możesz zezwolić na uprawnienie: kliknięcie agenta lub skryptu niczego nie zmienia.", "Open": "Otwórz", @@ -2443,6 +2458,7 @@ "Other editor": "Inny edytor", "Other models (optional)": "Inne modele (opcjonalnie)", "Other server…": "Inny serwer…", + "Other unknown faces": "Inne nieznane twarze", "Others get previews to develop; only this device adds photos.": "Inni dostają podglądy do wywołania; tylko to urządzenie dodaje zdjęcia.", "Others may also fetch the originals; only this device adds photos.": "Inni mogą też pobierać oryginały; tylko to urządzenie dodaje zdjęcia.", "Output": "Wyjście", @@ -2833,6 +2849,7 @@ "Reload": "Wczytaj ponownie", "Reload MIDI Map": "Wczytaj ponownie mapę MIDI", "Reload Preview": "Wczytaj ponownie podgląd", + "Reload the faces and try again": "Odśwież twarze i spróbuj ponownie", "Remember Dialog Choices": "Zapamiętaj wybory w oknach dialogowych", "Remember Each Source's Filters Separately": "Zapamiętuj filtry każdego źródła osobno", "Remember as…": "Zapamiętaj jako…", @@ -2878,6 +2895,7 @@ "Remove from At Import": "Usuń z „Przy imporcie”", "Remove from List": "Usuń z listy", "Remove from Quick Collection": "Usuń z szybkiej kolekcji", + "Remove from similarity groups": "Usuń z grup podobieństwa", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "Usuń z katalogu (do ostatnio usuniętych; pliki zostają na dysku)", "Remove from the stack": "Usuń ze stosu", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "Usunięcie zachowuje pliki na dysku i przenosi zdjęcia do ostatnio usuniętych.", @@ -2969,6 +2987,7 @@ "Restore Built-ins": "Przywróć wbudowane", "Restore Catalog from Backup…": "Przywróć katalog z kopii zapasowej…", "Restore Generated Fill": "Przywróć wygenerowane wypełnienie", + "Restore automatic grouping": "Przywróć automatyczne grupowanie", "Restore the photo to use it as the reference": "Przywróć zdjęcie, aby użyć go jako referencyjnego", "Resume": "Wznów", "Resume Face Scan": "Wznów wyszukiwanie twarzy", @@ -2983,6 +3002,7 @@ "Reverse geocoding is off: choose Offline or Online first": "Odwrotne geokodowanie jest wyłączone: najpierw wybierz tryb offline lub online", "Revert Capture Time to Original": "Przywróć oryginalny czas wykonania", "Review Comments": "Przejrzyj komentarze", + "Review these similar faces before naming or ignoring them.": "Przejrzyj te podobne twarze przed ich nazwaniem lub zignorowaniem.", "Revoke": "Cofnij", "Revoke Plug-in Permission": "Cofnij uprawnienie wtyczki", "Right": "Prawo", @@ -3138,6 +3158,8 @@ "Select by Color Label": "Zaznacz według etykiety koloru", "Select by Flag": "Zaznacz według flagi", "Select by Rating": "Zaznacz według oceny", + "Select group": "Zaznacz grupę", + "Select group for maintenance": "Zaznacz grupę do konserwacji", "Select none": "Odznacz wszystko", "Select photos to import": "Wybierz zdjęcia do importu", "Select photos to move them to this location": "Zaznacz zdjęcia, aby przenieść je w to miejsce", @@ -3338,6 +3360,7 @@ "Side": "Bok", "Side by Side": "Obok siebie", "Signed by": "Podpisany przez", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "Podobne nieznane twarze są pogrupowane poniżej. Zaznacz grupę, przejrzyj jej twarze, a następnie nazwij je lub zignoruj.", "Simple": "Prosty", "Single Image / Contact Sheet": "Pojedynczy obraz / arkusz stykowy", "Single Page": "Pojedyncza strona", @@ -3387,6 +3410,7 @@ "Spacing": "Odstępy", "Specific folder": "Wybrany folder", "Speed-Edit Keys": "Klawisze szybkiej edycji", + "Split Unknown Faces": "Oddziel nieznane twarze", "Spot": "Punkt", "Spot Removal": "Usuwanie plamek", "Spread": "Rozkładówka", @@ -3429,6 +3453,7 @@ "Stop using": "Przestań używać", "Store Presets and Profiles with This Catalog": "Przechowuj ustawienia wstępne i profile w tym katalogu", "Strength": "Siła", + "Strict": "Ścisłe", "Stroke Border": "Obramowanie", "Stroke border": "Obramowanie", "Studio Capture": "Zdjęcia w studiu", @@ -3616,6 +3641,7 @@ "The second graphics card is left free for previews and thumbnails.": "Druga karta graficzna pozostaje wolna dla podglądów i miniatur.", "The selected photo as a slide. Playback fills the screen; the aspect preview only changes this preview.": "Zaznaczone zdjęcie jako slajd. Odtwarzanie wypełnia ekran; podgląd proporcji zmienia tylko ten podgląd.", "The selected photos are in this location": "Zaznaczone zdjęcia są w tym miejscu", + "The selection changed. Reload the faces and try again": "Zaznaczenie się zmieniło. Odśwież twarze i spróbuj ponownie", "The server answers; the key works.": "Serwer odpowiada; klucz działa.", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "Serwer używa certyfikatu, za który nie ręczy żaden urząd (częste w serwerach domowych). Zaufaj mu tylko wtedy, gdy ten odcisk SHA-256 zgadza się z certyfikatem Twojego serwera:", "The size limit picks the highest quality, up to Quality, whose file fits.": "Limit rozmiaru wybiera najwyższą jakość, do wartości Jakość, przy której plik się mieści.", @@ -4134,6 +4160,7 @@ "removed": "usunięte", "role": "rola", "scene-linear Rec. 2020": "liniowy Rec. 2020", + "selected faces in People": "wybrane twarze w Osoby", "selected photos": "zaznaczone zdjęcia", "shots": "zdj.", "size": "rozmiar", diff --git a/crates/ui-egui/locales/fork/pt-br.json b/crates/ui-egui/locales/fork/pt-br.json index ddb1acf269..30f08e7b0b 100644 --- a/crates/ui-egui/locales/fork/pt-br.json +++ b/crates/ui-egui/locales/fork/pt-br.json @@ -291,6 +291,7 @@ "Auto-fill new books with the selected photos": "Preencher automaticamente novos livros com as fotos selecionadas", "Automatic": "Automático", "Automatic (FP16 when supported)": "Automática (FP16 quando compatível)", + "Automatic grouping restored": "Agrupamento automático restaurado", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "Automático prioriza GPUs NVIDIA dedicadas e computação em meia precisão (FP16) quando compatível.", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "Automático usa o SAM 3 quando instalado; caso contrário, o SAM 2.1. Máscaras Descrever sempre usam o SAM 3.", "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.": "Automático usa a placa de vídeo quando ela é mais rápida que o processador: os dois são cronometrados neste computador na primeira vez que uma foto é gerada.", @@ -317,6 +318,7 @@ "Background Tasks": "Tarefas em segundo plano", "Backup": "Backup", "Backup folder": "Pasta de backup", + "Balanced": "Equilibrado", "Band": "Faixa", "Base tone": "Tom base", "Baseline": "Linha de base", @@ -575,10 +577,13 @@ "Clear Rating": "Limpar avaliação", "Clear Role": "Limpar papel", "Clear Search Index": "Limpar índice de busca", + "Clear Selected Face Data": "Limpar dados dos rostos selecionados", "Clear Sensor Dust Map": "Limpar mapa de poeira do sensor", "Clear Slideshow Music": "Limpar música da apresentação", "Clear Tracklogs": "Limpar registros de trajeto", "Clear cache": "Limpar cache", + "Clear selection": "Limpar seleção", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "Limpa as incorporações em cache e as sugestões dos rostos selecionados. A indexação em segundo plano pode recriá-las. Nomes e decisões são mantidos.", "Clear…": "Limpar…", "Click Through": "Clique direto", "Click a cell on a page to edit it.": "Clique em uma célula de uma página para editá-la.", @@ -887,6 +892,7 @@ "Describe photos…": "Descrever fotos…", "Deselect Active Photo": "Desmarcar foto ativa", "Deselect Unflagged Photos": "Desmarcar fotos sem marcação", + "Deselect group": "Desmarcar grupo", "Destination": "Destino", "Detach Mask List": "Destacar lista de máscaras", "Detach the mask list": "Destacar a lista de máscaras", @@ -900,6 +906,7 @@ "Detecting faces…": "Detectando rostos…", "Detecting orientation": "Detectando a orientação", "Detection": "Detecção", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "A detecção é executada nas fotos inteiras que contêm os rostos selecionados, incluindo outros rostos nessas fotos.", "Detection sensitivity": "Sensibilidade de detecção", "Develop": "Revelação", "Develop Settings": "Configurações de revelação", @@ -1193,9 +1200,11 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "O reconhecimento facial está desativado. Ative-o para receber sugestões de nomes e ver rostos parecidos juntos.", "Face recognition is on": "O reconhecimento facial está ativado", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "O reconhecimento facial precisa de um modelo para sugerir nomes: um download único, em Configurações.", + "Face removed from similarity groups": "Rosto removido dos grupos de semelhança", "Face scan": "Busca de rostos", "Faces": "Rostos", "Faces of a Person": "Rostos de uma pessoa", + "Faces without a displayed look-alike group.": "Rostos sem um grupo de semelhança exibido.", "Fade": "Fade", "Fade duration": "Duração do fade", "Fades": "Transições", @@ -1433,7 +1442,11 @@ "Grid: last photo of the view": "Grade: última foto da visualização", "Group (optional)": "Grupo (opcional)", "Group Unnamed Faces": "Agrupar rostos sem nome", + "Grouping": "Agrupamento", + "Grouping faces across the library in the background…": "Agrupando rostos em toda a biblioteca em segundo plano…", + "Grouping unknown faces": "Agrupando rostos desconhecidos", "Groups": "Grupos", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "Os grupos usam rostos de todo o filtro atual da biblioteca; selecionar um grupo inclui os rostos dele em outras páginas.", "Grow": "Expandir", "Guided Laplacian": "Laplaciano guiado", "Guided Upright isn't supported; straighten these photos again in Transform.": "O Upright guiado não é suportado; endireite estas fotos de novo em Transformar.", @@ -1905,6 +1918,7 @@ "Looking up new photos in Immich": "Procurando fotos novas no Immich", "Looks at every photo on the server again, not only those changed since the last pass.": "Examina de novo todas as fotos do servidor, não só as alteradas desde a última passagem.", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "Analisa os olhos das pessoas como a faixa de olhos faz, cerca de um segundo por foto, em segundo plano. Fotos escolhidas não são alteradas.", + "Loose": "Amplo", "Lossy DNG files and Smart Previews open as raw photos.": "Arquivos DNG com perda e prévias inteligentes abrem como fotos RAW.", "Loupe": "Lupa", "Loupe Background": "Fundo da lupa", @@ -2301,6 +2315,7 @@ "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.": "Só são geradas as fotos cuja quantidade de remoção de ruído com IA é maior que 0. As exportações sempre geram a sua, se estiver faltando.", "Only the files and folders you pick": "Somente os arquivos e pastas que você escolher", "Only the first published photos were asked.": "Somente as primeiras fotos publicadas foram consultadas.", + "Only the selected faces are processed.": "Apenas os rostos selecionados são processados.", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "Só estas fotos são adicionadas. Ative isto, ou Configurações > Pastas > Vigiar fotos novas, para adicionar as novas ao tirá-las.", "Only you can allow a permission: a click from an agent or a script changes nothing.": "Só você pode permitir uma permissão: um clique de um agente ou de um script não muda nada.", "Open": "Abrir", @@ -2360,6 +2375,7 @@ "Other editor": "Outro editor", "Other models (optional)": "Outros modelos (opcional)", "Other server…": "Outro servidor…", + "Other unknown faces": "Outros rostos desconhecidos", "Others get previews to develop; only this device adds photos.": "Os outros recebem prévias para revelar; só este dispositivo adiciona fotos.", "Others may also fetch the originals; only this device adds photos.": "Os outros também podem buscar os originais; só este dispositivo adiciona fotos.", "Output": "Saída", @@ -2738,6 +2754,7 @@ "Reload": "Recarregar", "Reload MIDI Map": "Recarregar mapa MIDI", "Reload Preview": "Recarregar visualização", + "Reload the faces and try again": "Recarregue os rostos e tente novamente", "Remember Dialog Choices": "Lembrar escolhas de diálogo", "Remember Each Source's Filters Separately": "Lembrar os filtros de cada origem separadamente", "Remember as…": "Lembrar como…", @@ -2778,6 +2795,7 @@ "Remove from List": "Remover da lista", "Remove from Quick Collection": "Remover da coleção rápida", "Remove from Target Collection": "Remover da coleção de destino", + "Remove from similarity groups": "Remover dos grupos de semelhança", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "Remover do catálogo (para Excluídos recentemente; os arquivos ficam no disco)", "Remove from the stack": "Remover da pilha", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "Remover mantém os arquivos no disco e move as fotos para Excluídos recentemente.", @@ -2865,6 +2883,7 @@ "Restore Built-ins": "Restaurar integradas", "Restore Catalog from Backup…": "Restaurar catálogo do backup…", "Restore Generated Fill": "Restaurar preenchimento gerado", + "Restore automatic grouping": "Restaurar agrupamento automático", "Restore the photo to use it as the reference": "Restaure a foto para usá-la como referência", "Resume": "Retomar", "Resume Face Scan": "Retomar busca de rostos", @@ -2879,6 +2898,7 @@ "Reverse geocoding is off: choose Offline or Online first": "A geocodificação reversa está desativada: escolha primeiro Offline ou Online", "Revert Capture Time to Original": "Reverter hora da captura ao original", "Review Comments": "Revisar comentários", + "Review these similar faces before naming or ignoring them.": "Revise estes rostos semelhantes antes de nomeá-los ou ignorá-los.", "Revoke": "Revogar", "Revoke Plug-in Permission": "Revogar permissão do plug-in", "Right": "Direita", @@ -3036,6 +3056,8 @@ "Select by Color Label": "Selecionar por rótulo de cor", "Select by Flag": "Selecionar por marcação", "Select by Rating": "Selecionar por avaliação", + "Select group": "Selecionar grupo", + "Select group for maintenance": "Selecionar grupo para manutenção", "Select none": "Não selecionar nenhum", "Select photos to import": "Selecione as fotos para importar", "Select photos to move them to this location": "Selecione fotos para movê-las para este local", @@ -3226,6 +3248,7 @@ "Side": "Lateral", "Side by Side": "Lado a lado", "Signed by": "Assinado por", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "Rostos desconhecidos semelhantes são agrupados abaixo. Selecione um grupo, revise seus rostos e depois nomeie ou ignore-os.", "Simple": "Simples", "Single Image / Contact Sheet": "Imagem única / Folha de contato", "Single Page": "Página única", @@ -3284,6 +3307,7 @@ "Specific folder": "Pasta específica", "Speed": "Velocidade", "Speed-Edit Keys": "Teclas de edição rápida", + "Split Unknown Faces": "Separar rostos desconhecidos", "Spot Removal": "Remoção de manchas", "Spread": "Página dupla", "Spread View": "Exibição de página dupla", @@ -3325,6 +3349,7 @@ "Stop syncing? Nothing is deleted on any device.": "Parar a sincronização? Nada é excluído em nenhum dispositivo.", "Store Presets and Profiles with This Catalog": "Armazenar predefinições e perfis com este catálogo", "Strength": "Intensidade", + "Strict": "Rigoroso", "Stroke Border": "Contornar borda", "Studio Capture": "Captura em estúdio", "Studio Session": "Sessão de estúdio", @@ -3504,6 +3529,7 @@ "The score is the factors' weighted mean; 0 leaves one out of it (it is still measured).": "A nota é a média ponderada dos fatores; 0 deixa um de fora (ele ainda é medido).", "The second graphics card is left free for previews and thumbnails.": "A segunda placa de vídeo fica livre para prévias e miniaturas.", "The selected photos are in this location": "As fotos selecionadas estão neste local", + "The selection changed. Reload the faces and try again": "A seleção mudou. Recarregue os rostos e tente novamente", "The server answers; the key works.": "O servidor responde; a chave funciona.", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "O servidor usa um certificado que nenhuma autoridade garante (comum em servidores domésticos). Confie nele somente se esta impressão digital SHA-256 corresponder ao certificado do seu servidor:", "The size limit picks the highest quality, up to Quality, whose file fits.": "O limite de tamanho escolhe a maior qualidade, até a Qualidade, cujo arquivo caiba.", @@ -4067,6 +4093,7 @@ "role": "papel", "save goes through.": "salvamento seja concluído.", "scene-linear Rec. 2020": "linear de cena em Rec. 2020", + "selected faces in People": "os rostos selecionados em Pessoas", "selected photos": "fotos selecionadas", "shots": "fotos", "siblings) no longer open bright green (issue #148): their as-shot white balance and black level are read from the": "irmãs) não abrem mais em verde brilhante (issue #148): o balanço de branco da captura e o nível de preto são lidos do", diff --git a/crates/ui-egui/locales/fork/ru.json b/crates/ui-egui/locales/fork/ru.json index 2524491017..cd476de1c2 100644 --- a/crates/ui-egui/locales/fork/ru.json +++ b/crates/ui-egui/locales/fork/ru.json @@ -298,6 +298,7 @@ "Auto-fill new books with the selected photos": "Автоматически заполнять новые книги выбранными фото", "Automatic": "Автоматически", "Automatic (FP16 when supported)": "Автоматически (FP16 при поддержке)", + "Automatic grouping restored": "Автоматическая группировка восстановлена", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "Автоматический режим отдаёт предпочтение дискретным GPU NVIDIA и вычислениям половинной точности (FP16) при поддержке.", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "Автоматически: SAM 3, если он установлен, иначе SAM 2.1. Маски «Описание» всегда используют SAM 3.", "Automatically Toggle Mask Overlay": "Автоматически переключать наложение маски", @@ -321,6 +322,7 @@ "Background Preparation Settings": "Настройки фоновой подготовки", "Backup": "Резервная копия", "Backup folder": "Папка резервных копий", + "Balanced": "Сбалансированная", "Band": "Полоса", "Base tone": "Базовый тон", "Baseline": "Базовая линия", @@ -581,9 +583,12 @@ "Clear Rating": "Сбросить оценку", "Clear Role": "Снять роль", "Clear Search Index": "Очистить поисковый индекс", + "Clear Selected Face Data": "Очистить данные выбранных лиц", "Clear Sensor Dust Map": "Очистить карту пыли на матрице", "Clear Slideshow Music": "Убрать музыку слайд-шоу", "Clear Tracklogs": "Очистить треки", + "Clear selection": "Снять выделение", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "Удаляет кэшированные векторы и предложения для выбранных лиц. Фоновая индексация может создать их снова. Имена и решения сохраняются.", "Clear…": "Очистить…", "Click Through": "Сквозной щелчок", "Click a cell on a page to edit it.": "Щёлкните ячейку на странице, чтобы изменить её.", @@ -886,6 +891,7 @@ "Describe what to select": "Опишите, что выделить", "Deselect Active Photo": "Снять выделение с активного фото", "Deselect Unflagged Photos": "Снять выделение с фото без флага", + "Deselect group": "Снять выбор группы", "Desktop": "Рабочий стол", "Destination": "Назначение", "Detach Mask List": "Открепить список масок", @@ -900,6 +906,7 @@ "Detecting faces…": "Поиск лиц…", "Detecting orientation": "Определение ориентации", "Detection": "Обнаружение", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "Обнаружение выполняется для всех фотографий, содержащих выбранные лица, включая остальные лица на этих фото.", "Detection sensitivity": "Чувствительность обнаружения", "Develop Settings": "Настройки обработки", "Develop preset": "Пресет обработки", @@ -1190,9 +1197,11 @@ "Face names written to XMP by Lightroom and other apps show up here.": "Здесь отображаются имена лиц, записанные в XMP программой Lightroom и другими приложениями.", "Face or Body": "Лицо или тело", "Face recognition": "Распознавание лиц", + "Face removed from similarity groups": "Лицо исключено из групп сходства", "Face scan": "Поиск лиц", "Faces": "Лица", "Faces of a Person": "Лица человека", + "Faces without a displayed look-alike group.": "Лица без отображаемой группы похожих.", "Fades": "Переходы", "Fail at least one of these conditions": "не удовлетворяют хотя бы одному из этих условий", "Failed photos": "Необработанные фото", @@ -1433,7 +1442,11 @@ "Grid: last photo of the view": "Сетка: последнее фото вида", "Group Unnamed Faces": "Сгруппировать безымянные лица", "Group name": "Имя группы", + "Grouping": "Группировка", + "Grouping faces across the library in the background…": "Группировка лиц по всей библиотеке в фоновом режиме…", + "Grouping unknown faces": "Группировка неизвестных лиц", "Groups": "Группы", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "Группы формируются по всему текущему фильтру библиотеки; выбор группы включает её лица и на других страницах.", "Grow": "Расширить", "Guided Laplacian": "Управляемый лапласиан", "Guided Upright isn't supported; straighten these photos again in Transform.": "Направляемое выравнивание не поддерживается; выровняйте эти фото заново в «Трансформации».", @@ -1913,6 +1926,7 @@ "Looking up new photos in Immich": "Поиск новых фото в Immich", "Looks at every photo on the server again, not only those changed since the last pass.": "Заново просматривает все фото на сервере, а не только изменённые с прошлого прохода.", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "Проверяет глаза людей на снимках так же, как полоса глаз, примерно секунду на фото, в фоне. Отобранные фото не затрагиваются.", + "Loose": "Свободная", "Lossy DNG files and Smart Previews open as raw photos.": "Файлы DNG с потерями и смарт-превью открываются как raw-фото.", "Loupe": "Лупа", "Loupe Background": "Фон лупы", @@ -2307,6 +2321,7 @@ "Only one of the photo and the reference records its aperture": "Диафрагму записывает только фото или только эталон", "Only the files and folders you pick": "Только выбранные файлы и папки", "Only the first published photos were asked.": "Запрошены только первые опубликованные фотографии.", + "Only the selected faces are processed.": "Обрабатываются только выбранные лица.", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "Добавляются только эти фото. Включите это или Настройки > Папки > Следить за новыми фото, чтобы добавлять новые по мере съёмки.", "Only you can allow a permission: a click from an agent or a script changes nothing.": "Разрешение можете дать только вы: щелчок агента или скрипта ничего не меняет.", "Open": "Открыть", @@ -2362,6 +2377,7 @@ "Other devices see this name. Every device needs its own.": "Другие устройства видят это имя. Каждому устройству нужно своё.", "Other models (optional)": "Другие модели (необязательно)", "Other server…": "Другой сервер…", + "Other unknown faces": "Другие неизвестные лица", "Others get previews to develop; only this device adds photos.": "Другие получают превью для обработки; фото добавляет только это устройство.", "Others may also fetch the originals; only this device adds photos.": "Другие могут также загружать оригиналы; фото добавляет только это устройство.", "Output": "Выход", @@ -2744,6 +2760,7 @@ "Reload Changed Files": "Перезагрузить изменённые файлы", "Reload MIDI Map": "Перезагрузить карту MIDI", "Reload Preview": "Обновить предпросмотр", + "Reload the faces and try again": "Обновите список лиц и повторите попытку", "Remember Dialog Choices": "Запоминать выбор в диалогах", "Remember Each Source's Filters Separately": "Запоминать фильтры для каждого источника отдельно", "Remember as…": "Запомнить как…", @@ -2788,6 +2805,7 @@ "Remove from List": "Убрать из списка", "Remove from Quick Collection": "Удалить из быстрой коллекции", "Remove from Target Collection": "Убрать из целевой коллекции", + "Remove from similarity groups": "Убрать из групп сходства", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "Удалить из каталога (в «Недавно удалённые»; файлы остаются на диске)", "Remove from the stack": "Убрать из стопки", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "«Убрать» оставляет файлы на диске и перемещает фото в «Недавно удалённые».", @@ -2868,6 +2886,7 @@ "Restore Built-ins": "Восстановить встроенные", "Restore Catalog from Backup…": "Восстановить каталог из резервной копии…", "Restore Generated Fill": "Восстановить сгенерированную заливку", + "Restore automatic grouping": "Восстановить автоматическую группировку", "Restore keeps their edits; Import as new deletes the old record first.": "«Восстановить» сохраняет их правки; «Импортировать заново» сначала удаляет старую запись.", "Restore the photo to use it as the reference": "Восстановите фото, чтобы использовать его как эталон", "Restore them": "Восстановить", @@ -2886,6 +2905,7 @@ "Revert Capture Time to Original": "Вернуть исходное время съёмки", "Review": "Просмотр", "Review Comments": "Просмотреть комментарии", + "Review these similar faces before naming or ignoring them.": "Проверьте эти похожие лица, прежде чем называть или игнорировать их.", "Revoke": "Отозвать", "Revoke Plug-in Permission": "Отозвать разрешение подключаемого модуля", "Right": "Справа", @@ -3033,6 +3053,8 @@ "Select by Color Label": "Выбрать по цветовой метке", "Select by Flag": "Выбрать по флагу", "Select by Rating": "Выбрать по оценке", + "Select group": "Выбрать группу", + "Select group for maintenance": "Выбрать группу для обслуживания", "Select photos to import": "Выберите фото для импорта", "Select photos to move them to this location": "Выберите фото, чтобы переместить их в это место", "Select photos to see their info.": "Выберите фото, чтобы увидеть сведения о них.", @@ -3225,6 +3247,7 @@ "Side": "Сбоку", "Side by Side": "Рядом", "Signed by": "Подписано", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "Похожие неизвестные лица сгруппированы ниже. Выберите группу, проверьте лица в ней, затем назовите или проигнорируйте их.", "Simple": "Простой", "Single Image / Contact Sheet": "Одно изображение / контактный лист", "Single Page": "Одна страница", @@ -3277,6 +3300,7 @@ "Spacing": "Интервал", "Specific folder": "Указанная папка", "Speed-Edit Keys": "Клавиши быстрой правки", + "Split Unknown Faces": "Исключить неизвестные лица из групп", "Spot Removal": "Удаление пятен", "Spread": "Разворот", "Spread View": "Вид разворотов", @@ -3319,6 +3343,7 @@ "Stop syncing? Nothing is deleted on any device.": "Остановить синхронизацию? Ни на одном устройстве ничего не удаляется.", "Store Presets and Profiles with This Catalog": "Хранить пресеты и профили в этом каталоге", "Strength": "Сила", + "Strict": "Строгая", "Stroke Border": "Обводка", "Studio Capture": "Студийная съёмка", "Studio Session": "Студийный сеанс", @@ -3497,6 +3522,7 @@ "The score is the factors' weighted mean; 0 leaves one out of it (it is still measured).": "Оценка: взвешенное среднее факторов; 0 исключает фактор (он всё равно измеряется).", "The second graphics card is left free for previews and thumbnails.": "Вторая видеокарта остаётся свободной для превью и миниатюр.", "The selected photos are in this location": "Выбранные фото находятся в этом месте", + "The selection changed. Reload the faces and try again": "Выбор изменился. Обновите список лиц и повторите попытку", "The server answers; the key works.": "Сервер отвечает, ключ работает.", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "Сервер использует сертификат, который не подтверждён ни одним центром сертификации (обычно для домашних серверов). Доверяйте ему, только если этот отпечаток SHA-256 совпадает с сертификатом вашего сервера:", "The size limit picks the highest quality, up to Quality, whose file fits.": "Предел размера выбирает наивысшее качество (не выше значения «Качество»), при котором файл помещается.", @@ -4064,6 +4090,7 @@ "save goes through.": "сохранение проходит.", "scene-linear Rec. 2020": "линейный Rec. 2020", "second": "секунда", + "selected faces in People": "выбранных лиц в разделе «Люди»", "selected photos": "выбранные фото", "shots": "снимков", "siblings) no longer open bright green (issue #148): their as-shot white balance and black level are read from the": "родственные модели) больше не открываются ярко-зелёными (issue #148): их баланс белого при съёмке и уровень чёрного читаются из", diff --git a/crates/ui-egui/locales/fork/sv.json b/crates/ui-egui/locales/fork/sv.json index df7786651b..c5a29d49e2 100644 --- a/crates/ui-egui/locales/fork/sv.json +++ b/crates/ui-egui/locales/fork/sv.json @@ -303,6 +303,7 @@ "Auto-Tag Selected Photos": "Tagga markerade foton automatiskt", "Auto-fill new books with the selected photos": "Fyll nya böcker automatiskt med de markerade fotona", "Automatic (FP16 when supported)": "Automatisk (FP16 när det stöds)", + "Automatic grouping restored": "Automatisk gruppering återställd", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "Automatisk föredrar dedikerade NVIDIA-GPU:er och beräkning med halv precision (FP16) när det stöds.", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "Automatiskt använder SAM 3 när den är installerad, annars SAM 2.1. Beskriv-masker använder alltid SAM 3.", "Automatically Toggle Mask Overlay": "Växla masköverlägg automatiskt", @@ -324,6 +325,7 @@ "Background Preparation Settings": "Inställningar för förberedelse i bakgrunden", "Backup": "Säkerhetskopia", "Backup folder": "Mapp för säkerhetskopior", + "Balanced": "Balanserad", "Balanced: a standard dial feel with responsive mid-range acceleration.": "Balanserad: en vanlig rattkänsla med följsam acceleration i mellanregistret.", "Band": "Band", "Base curve": "Baskurva", @@ -583,9 +585,12 @@ "Clear Rating": "Rensa betyg", "Clear Role": "Rensa roll", "Clear Search Index": "Rensa sökindex", + "Clear Selected Face Data": "Rensa data för valda ansikten", "Clear Sensor Dust Map": "Rensa sensordammkarta", "Clear Slideshow Music": "Rensa bildspelsmusik", "Clear Tracklogs": "Rensa spårloggar", + "Clear selection": "Rensa markering", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "Rensar cachade inbäddningar och förslag för valda ansikten. Bakgrundsindexering kan återskapa dem. Namn och beslut behålls.", "Clear…": "Rensa…", "Click Through": "Klicka igenom", "Click a cell on a page to edit it.": "Klicka på en cell på en sida för att redigera den.", @@ -907,6 +912,7 @@ "Describe photos…": "Beskriv foton…", "Deselect Active Photo": "Avmarkera aktivt foto", "Deselect Unflagged Photos": "Avmarkera foton utan flagga", + "Deselect group": "Avmarkera grupp", "Destination": "Mål", "Detach Mask List": "Lösgör masklistan", "Detach the mask list": "Lösgör masklistan", @@ -918,6 +924,7 @@ "Detecting faces…": "Identifierar ansikten…", "Detecting orientation": "Identifierar orientering", "Detection": "Identifiering", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "Identifieringen körs på hela bilderna som innehåller de valda ansiktena, inklusive andra ansikten i dessa bilder.", "Detection sensitivity": "Detekteringskänslighet", "Develop Settings": "Framkallningsinställningar", "Develop preset": "Framkallningsförinställning", @@ -1208,8 +1215,10 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "Ansiktsigenkänning är av. Slå på den för att få namnförslag och se liknande ansikten tillsammans.", "Face recognition is on": "Ansiktsigenkänning är på", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "Ansiktsigenkänning behöver en modell för att föreslå namn: en engångsnedladdning, i Inställningar.", + "Face removed from similarity groups": "Ansikte borttaget från likhetsgrupper", "Face scan": "Ansiktssökning", "Face tracking": "Ansiktsspårning", + "Faces without a displayed look-alike group.": "Ansikten utan en visad likhetsgrupp.", "Fades": "Toningar", "Fail at least one of these conditions": "inte uppfyller minst ett av dessa villkor", "Failed photos": "Misslyckade foton", @@ -1474,7 +1483,11 @@ "Grid: first photo of the view": "Rutnät: första fotot i vyn", "Grid: last photo of the view": "Rutnät: sista fotot i vyn", "Group Unnamed Faces": "Gruppera namnlösa ansikten", + "Grouping": "Gruppering", + "Grouping faces across the library in the background…": "Grupperar ansikten i hela biblioteket i bakgrunden…", + "Grouping unknown faces": "Grupperar okända ansikten", "Groups": "Grupper", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "Grupper omfattar ansikten i hela det aktuella biblioteksfiltret; att välja en grupp inkluderar dess ansikten på andra sidor.", "Grow": "Utvidga", "Guided Laplacian": "Styrd Laplace", "Guided Upright isn't supported; straighten these photos again in Transform.": "Guidad upprätning stöds inte; räta upp de här fotona igen under Transformera.", @@ -1974,6 +1987,7 @@ "Looking up new photos in Immich": "Söker efter nya foton i Immich", "Looks at every photo on the server again, not only those changed since the last pass.": "Går igenom alla foton på servern igen, inte bara dem som ändrats sedan förra gången.", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "Granskar motivens ögon på samma sätt som ögonremsan, ungefär en sekund per foto, i bakgrunden. Plockade foton lämnas orörda.", + "Loose": "Bred", "Loupe": "Lupp", "Loupe Background": "Lupbakgrund", "Loupe Info": "Lupp-info", @@ -2388,6 +2402,7 @@ "Only one of the photo and the reference records its aperture": "Bara fotot eller bara referensen anger bländaren", "Only the files and folders you pick": "Bara de filer och mappar du väljer", "Only the first published photos were asked.": "Bara de första publicerade fotona efterfrågades.", + "Only the selected faces are processed.": "Endast de valda ansiktena bearbetas.", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "Bara de här fotona läggs till. Slå på detta, eller Inställningar > Mappar > Bevaka nya foton, för att lägga till nya när du tar dem.", "Only this area and the outline of what to fill are sent: not the whole photo, not its metadata.": "Bara det här området och konturen av det som ska fyllas skickas: inte hela fotot, inte dess metadata.", "Only you can allow a permission: a click from an agent or a script changes nothing.": "Bara du kan tillåta en behörighet: ett klick från en agent eller ett skript ändrar ingenting.", @@ -2444,6 +2459,7 @@ "Other devices see this name. Every device needs its own.": "Andra enheter ser det här namnet. Varje enhet behöver ett eget.", "Other models (optional)": "Andra modeller (valfritt)", "Other server…": "Annan server…", + "Other unknown faces": "Övriga okända ansikten", "Others get previews to develop; only this device adds photos.": "Andra får förhandsvisningar att framkalla; bara den här enheten lägger till foton.", "Others may also fetch the originals; only this device adds photos.": "Andra får även hämta originalen; bara den här enheten lägger till foton.", "Output": "Utdata", @@ -2848,6 +2864,7 @@ "Reload": "Läs in igen", "Reload MIDI Map": "Läs in MIDI-mappning igen", "Reload Preview": "Läs in förhandsgranskning igen", + "Reload the faces and try again": "Ladda om ansiktena och försök igen", "Remember Dialog Choices": "Kom ihåg val i dialogrutor", "Remember Each Source's Filters Separately": "Kom ihåg varje källas filter separat", "Remember as…": "Kom ihåg som…", @@ -2892,6 +2909,7 @@ "Remove from At Import": "Ta bort från Vid import", "Remove from List": "Ta bort från listan", "Remove from Quick Collection": "Ta bort från snabbsamling", + "Remove from similarity groups": "Ta bort från likhetsgrupper", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "Ta bort från katalogen (till Nyligen raderade; filerna ligger kvar på disken)", "Remove from the stack": "Ta bort från stapeln", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "Ta bort behåller filerna på disken och flyttar fotona till Nyligen raderade.", @@ -2987,6 +3005,7 @@ "Restore Built-ins": "Återställ inbyggda", "Restore Catalog from Backup…": "Återställ katalog från säkerhetskopia…", "Restore Generated Fill": "Återställ genererad fyllning", + "Restore automatic grouping": "Återställ automatisk gruppering", "Restore the photo to use it as the reference": "Återställ fotot för att använda det som referens", "Resume": "Återuppta", "Resume Face Scan": "Återuppta ansiktssökning", @@ -3002,6 +3021,7 @@ "Reverse geocoding is off: choose Offline or Online first": "Omvänd geokodning är av: välj Offline eller Online först", "Revert Capture Time to Original": "Återställ tagningstid till original", "Review Comments": "Granska kommentarer", + "Review these similar faces before naming or ignoring them.": "Granska dessa liknande ansikten innan du namnger eller ignorerar dem.", "Revoke": "Återkalla", "Revoke Plug-in Permission": "Återkalla tilläggets behörighet", "Right Panel": "Höger panel", @@ -3165,6 +3185,8 @@ "Select by Color Label": "Markera efter färgetikett", "Select by Flag": "Markera efter flagga", "Select by Rating": "Markera efter betyg", + "Select group": "Välj grupp", + "Select group for maintenance": "Välj grupp för underhåll", "Select photos to import": "Välj foton att importera", "Select photos to move them to this location": "Markera foton för att flytta dem till den här platsen", "Select photos to see their info.": "Markera foton för att se deras info.", @@ -3372,6 +3394,7 @@ "Side": "Sida", "Side by Side": "Sida vid sida", "Signed by": "Signerad av", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "Liknande okända ansikten är grupperade nedan. Välj en grupp, granska dess ansikten och namnge eller ignorera dem sedan.", "Simple": "Enkel", "Single Image / Contact Sheet": "En bild/kontaktark", "Single Page": "Enkel sida", @@ -3423,6 +3446,7 @@ "Space Zooms To": "Mellanslag zoomar till", "Spacing": "Avstånd", "Speed-Edit Keys": "Snabbredigeringstangenter", + "Split Unknown Faces": "Separera okända ansikten", "Spot Removal": "Fläckborttagning", "Spread": "Uppslag", "Spread View": "Uppslagsvy", @@ -3465,6 +3489,7 @@ "Stop using": "Sluta använda", "Store Presets and Profiles with This Catalog": "Lagra förinställningar och profiler med den här katalogen", "Strength": "Styrka", + "Strict": "Strikt", "Stroke Border": "Konturkant", "Studio Capture": "Studiotagning", "Studio Session": "Studiosession", @@ -3646,6 +3671,7 @@ "The second chart photo isn't read yet": "Fotot av den andra färgkartan har inte lästs än", "The second graphics card is left free for previews and thumbnails.": "Det andra grafikkortet lämnas fritt för förhandsvisningar och miniatyrer.", "The selected photos are in this location": "De markerade fotona finns på den här platsen", + "The selection changed. Reload the faces and try again": "Markeringen ändrades. Ladda om ansiktena och försök igen", "The server answers; the key works.": "Servern svarar; nyckeln fungerar.", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "Servern använder ett certifikat som ingen utfärdare går i god för (vanligt för hemservrar). Lita bara på det om det här SHA-256-fingeravtrycket stämmer med serverns certifikat:", "The size limit picks the highest quality, up to Quality, whose file fits.": "Storleksgränsen väljer den högsta kvalitet, upp till Kvalitet, vars fil får plats.", @@ -4164,6 +4190,7 @@ "removed": "borttagna", "role": "roll", "scene-linear Rec. 2020": "scenlinjär Rec. 2020", + "selected faces in People": "valda ansikten i Människor", "selected photos": "markerade foton", "shots": "bilder", "steps": "steg", diff --git a/crates/ui-egui/locales/fork/uk.json b/crates/ui-egui/locales/fork/uk.json index 2654c39490..0c355e8935 100644 --- a/crates/ui-egui/locales/fork/uk.json +++ b/crates/ui-egui/locales/fork/uk.json @@ -273,6 +273,7 @@ "Auto-fill new books with the selected photos": "Автоматично заповнювати нові книги вибраними фото", "Automatic": "Автоматично", "Automatic (FP16 when supported)": "Автоматично (FP16 за підтримки)", + "Automatic grouping restored": "Автоматичне групування відновлено", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "Автоматичний режим надає перевагу дискретним GPU NVIDIA та обчисленням половинної точности (FP16) за підтримки.", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "Автоматично: SAM 3, якщо його встановлено, інакше SAM 2.1. Маски «Опис» завжди використовують SAM 3.", "Automatically Toggle Mask Overlay": "Автоматично перемикати накладання маски", @@ -297,6 +298,7 @@ "Background Tasks": "Фонові завдання", "Backup": "Резервна копія", "Backup folder": "Тека резервних копій", + "Balanced": "Збалансоване", "Band": "Смуга", "Base tone": "Базовий тон", "Baseline": "Базова лінія", @@ -542,9 +544,12 @@ "Clear Rating": "Очистити оцінку", "Clear Role": "Зняти роль", "Clear Search Index": "Очистити пошуковий індекс", + "Clear Selected Face Data": "Очистити дані вибраних облич", "Clear Sensor Dust Map": "Очистити карту пилу на матриці", "Clear Slideshow Music": "Очистити музику показу слайдів", "Clear Tracklogs": "Очистити журнали маршрутів", + "Clear selection": "Очистити вибір", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "Очищає кешовані вектори та пропозиції для вибраних облич. Фонове індексування може створити їх знову. Імена та рішення зберігаються.", "Clear…": "Очистити…", "Click Through": "Наскрізне клацання", "Click a cell on a page to edit it.": "Клацніть комірку на сторінці, щоб змінити її.", @@ -840,6 +845,7 @@ "Describe photos…": "Опишіть фото…", "Deselect Active Photo": "Зняти виділення з активного фото", "Deselect Unflagged Photos": "Зняти виділення з фото без прапорця", + "Deselect group": "Зняти вибір групи", "Destination": "Призначення", "Detach Mask List": "Відкріпити список масок", "Detach the mask list": "Відкріпити список масок", @@ -851,6 +857,7 @@ "Detecting faces…": "Пошук облич…", "Detecting orientation": "Визначення орієнтації", "Detection": "Виявлення", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "Виявлення виконується на всіх фотографіях, які містять вибрані обличчя, включно з іншими обличчями на цих фотографіях.", "Detection sensitivity": "Чутливість виявлення", "Develop Settings": "Налаштування обробки", "Develop preset": "Набір налаштувань обробки", @@ -1126,7 +1133,9 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "Розпізнавання облич вимкнено. Увімкніть його, щоб отримувати підказки імен і бачити схожі обличчя разом.", "Face recognition is on": "Розпізнавання облич увімкнено", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "Для підказок імен розпізнаванню облич потрібна модель: одноразове завантаження в налаштуваннях.", + "Face removed from similarity groups": "Обличчя вилучено з груп схожості", "Face scan": "Пошук облич", + "Faces without a displayed look-alike group.": "Обличчя без показаної групи схожих.", "Fade": "Згасання", "Fade duration": "Тривалість згасання", "Fades": "Переходи", @@ -1361,7 +1370,11 @@ "Grid: last photo of the view": "Сітка: останнє фото подання", "Group (optional)": "Група (необов’язково)", "Group Unnamed Faces": "Згрупувати безіменні обличчя", + "Grouping": "Групування", + "Grouping faces across the library in the background…": "Групування облич у бібліотеці у фоновому режимі…", + "Grouping unknown faces": "Групування невідомих облич", "Groups": "Групи", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "Групи охоплюють обличчя в усьому поточному фільтрі бібліотеки; вибір групи включає її обличчя й на інших сторінках.", "Grow": "Розширити", "Guided Laplacian": "Керований лапласіан", "Guided Upright isn't supported; straighten these photos again in Transform.": "Кероване випрямлення не підтримується; вирівняйте ці фото знову в «Трансформуванні».", @@ -1815,6 +1828,7 @@ "Looking up new photos in Immich": "Пошук нових фото в Immich", "Looks at every photo on the server again, not only those changed since the last pass.": "Знову переглядає всі фото на сервері, а не лише змінені після останнього проходу.", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "Перевіряє очі людей на фото так само, як смуга очей, приблизно секунду на фото, у фоні. Відібрані фото не змінюються.", + "Loose": "Вільне", "Loupe": "Лупа", "Loupe Background": "Тло лупи", "Loupe Info": "Відомості в лупі", @@ -2201,6 +2215,7 @@ "Only one of the photo and the reference records its aperture": "Діафрагму записує лише фото або лише еталон", "Only the files and folders you pick": "Лише вибрані файли й теки", "Only the first published photos were asked.": "Запитано лише перші опубліковані фотографії.", + "Only the selected faces are processed.": "Обробляються лише вибрані обличчя.", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "Додаються лише ці фото. Увімкніть це або Налаштування > Теки > Стежити за новими фото, щоб додавати нові під час зйомки.", "Only you can allow a permission: a click from an agent or a script changes nothing.": "Дозвіл можете надати лише ви: клацання агента чи скрипту нічого не змінює.", "Open": "Відкрити", @@ -2257,6 +2272,7 @@ "Other editor": "Інший редактор", "Other models (optional)": "Інші моделі (необов’язково)", "Other server…": "Інший сервер…", + "Other unknown faces": "Інші невідомі обличчя", "Others get previews to develop; only this device adds photos.": "Інші отримують прев’ю для обробки; фото додає лише цей пристрій.", "Others may also fetch the originals; only this device adds photos.": "Інші можуть також завантажувати оригінали; фото додає лише цей пристрій.", "Output": "Вихід", @@ -2628,6 +2644,7 @@ "Reload": "Перезавантажити", "Reload MIDI Map": "Перезавантажити розкладку MIDI", "Reload Preview": "Оновити попередній перегляд", + "Reload the faces and try again": "Оновіть список облич і спробуйте ще раз", "Remember Dialog Choices": "Запам'ятовувати вибір у діалогах", "Remember Each Source's Filters Separately": "Запам’ятовувати фільтри для кожного джерела окремо", "Remember as…": "Запам'ятати як…", @@ -2666,6 +2683,7 @@ "Remove from List": "Прибрати зі списку", "Remove from Quick Collection": "Вилучити зі швидкої колекції", "Remove from Target Collection": "Вилучити з цільової колекції", + "Remove from similarity groups": "Вилучити з груп схожості", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "Вилучити з каталогу (до «Нещодавно видалених»; файли лишаються на диску)", "Remove from the stack": "Прибрати зі стосу", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "«Прибрати» залишає файли на диску й переміщує фото до нещодавно видалених.", @@ -2752,6 +2770,7 @@ "Restore Built-ins": "Відновити вбудовані", "Restore Catalog from Backup…": "Відновити каталог із резервної копії…", "Restore Generated Fill": "Відновити згенероване заповнення", + "Restore automatic grouping": "Відновити автоматичне групування", "Restore the photo to use it as the reference": "Відновіть фото, щоб використати його як еталон", "Resume": "Продовжити", "Resume Face Scan": "Продовжити пошук облич", @@ -2766,6 +2785,7 @@ "Reverse geocoding is off: choose Offline or Online first": "Зворотне геокодування вимкнено: спершу виберіть «Офлайн» або «Онлайн»", "Revert Capture Time to Original": "Повернути початковий час зйомки", "Review Comments": "Переглянути коментарі", + "Review these similar faces before naming or ignoring them.": "Перегляньте ці схожі обличчя перед тим, як називати або ігнорувати їх.", "Revoke": "Відкликати", "Revoke Plug-in Permission": "Відкликати дозвіл плагіна", "Right": "Праворуч", @@ -2923,6 +2943,8 @@ "Select by Color Label": "Вибрати за кольоровою міткою", "Select by Flag": "Вибрати за прапорцем", "Select by Rating": "Вибрати за оцінкою", + "Select group": "Вибрати групу", + "Select group for maintenance": "Вибрати групу для обслуговування", "Select none": "Зняти вибір", "Select photos to import": "Виберіть фото для імпорту", "Select photos to move them to this location": "Виберіть фото, щоб перемістити їх у це місце", @@ -3111,6 +3133,7 @@ "Side": "Збоку", "Side by Side": "Поруч", "Signed by": "Підписано", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "Схожі невідомі обличчя згруповано нижче. Виберіть групу, перегляньте її обличчя, а потім назвіть або ігноруйте їх.", "Simple": "Простий", "Single Image / Contact Sheet": "Одне зображення / контактний аркуш", "Single Page": "Одна сторінка", @@ -3160,6 +3183,7 @@ "Spacing": "Інтервал", "Specific folder": "Указана тека", "Speed-Edit Keys": "Клавіші швидкого редагування", + "Split Unknown Faces": "Відокремити невідомі обличчя", "Spot Removal": "Видалення плям", "Spread": "Розворот", "Spread View": "Перегляд розворотів", @@ -3200,6 +3224,7 @@ "Stop syncing? Nothing is deleted on any device.": "Зупинити синхронізацію? На жодному пристрої нічого не видаляється.", "Store Presets and Profiles with This Catalog": "Зберігати набори налаштувань і профілі в цьому каталозі", "Strength": "Сила", + "Strict": "Суворе", "Stroke Border": "Обведення", "Studio Capture": "Студійна зйомка", "Studio Session": "Студійний сеанс", @@ -3369,6 +3394,7 @@ "The score is the factors' weighted mean; 0 leaves one out of it (it is still measured).": "Оцінка: зважене середнє факторів; 0 виключає фактор (він усе одно вимірюється).", "The second graphics card is left free for previews and thumbnails.": "Друга відеокарта лишається вільною для попередніх переглядів і мініатюр.", "The selected photos are in this location": "Вибрані фото знаходяться в цьому місці", + "The selection changed. Reload the faces and try again": "Вибір змінився. Оновіть список облич і спробуйте ще раз", "The server answers; the key works.": "Сервер відповідає; ключ працює.", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "Сервер використовує сертифікат, за який не ручається жоден центр (звично для домашніх серверів). Довіряйте йому, лише якщо цей відбиток SHA-256 збігається з сертифікатом вашого сервера:", "The size limit picks the highest quality, up to Quality, whose file fits.": "Обмеження розміру вибирає найвищу якість, не вище «Якості», за якої файл вміщується.", @@ -3844,6 +3870,7 @@ "removed": "видалено", "role": "роль", "scene-linear Rec. 2020": "лінійний Rec. 2020", + "selected faces in People": "вибрані обличчя в розділі «Люди»", "selected photos": "вибрані фото", "shots": "знімків", "size": "розмір", diff --git a/crates/ui-egui/locales/fork/vi.json b/crates/ui-egui/locales/fork/vi.json index 3e9823b52a..54e416c7a6 100644 --- a/crates/ui-egui/locales/fork/vi.json +++ b/crates/ui-egui/locales/fork/vi.json @@ -318,6 +318,7 @@ "Auto-Tag Selected Photos": "Tự gắn thẻ ảnh đã chọn", "Auto-fill new books with the selected photos": "Tự động điền sách mới bằng các ảnh đã chọn", "Automatic (FP16 when supported)": "Tự động (FP16 khi được hỗ trợ)", + "Automatic grouping restored": "Đã khôi phục gom nhóm tự động", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "Chế độ tự động ưu tiên GPU NVIDIA chuyên dụng và tính toán nửa độ chính xác (FP16) khi được hỗ trợ.", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "Tự động dùng SAM 3 khi đã cài, nếu không thì SAM 2.1. Mặt nạ Mô tả luôn dùng SAM 3.", "Automatically Toggle Mask Overlay": "Tự bật/tắt lớp phủ mặt nạ", @@ -343,6 +344,7 @@ "Background image": "Ảnh nền", "Backup": "Sao lưu", "Backup folder": "Thư mục sao lưu", + "Balanced": "Cân bằng", "Balanced: a standard dial feel with responsive mid-range acceleration.": "Cân bằng: cảm giác núm xoay tiêu chuẩn, gia tốc nhạy ở mức trung bình.", "Band": "Dải", "Base curve": "Đường cong cơ sở", @@ -613,9 +615,12 @@ "Clear Rating": "Xóa xếp hạng", "Clear Role": "Xóa vai trò", "Clear Search Index": "Xoá chỉ mục tìm kiếm", + "Clear Selected Face Data": "Xóa dữ liệu khuôn mặt đã chọn", "Clear Sensor Dust Map": "Xóa bản đồ bụi cảm biến", "Clear Slideshow Music": "Xóa nhạc trình chiếu", "Clear Tracklogs": "Xóa nhật ký hành trình", + "Clear selection": "Bỏ chọn", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "Xóa các véc-tơ đặc trưng đã lưu đệm và gợi ý cho những khuôn mặt đã chọn. Quá trình lập chỉ mục nền có thể tạo lại chúng. Tên và quyết định vẫn được giữ.", "Clear…": "Xoá…", "Click Through": "Nhấp xuyên", "Click a cell on a page to edit it.": "Nhấp vào một ô trên trang để sửa.", @@ -953,6 +958,7 @@ "Describe photos…": "Mô tả ảnh…", "Deselect Active Photo": "Bỏ chọn ảnh đang dùng", "Deselect Unflagged Photos": "Bỏ chọn ảnh không gắn cờ", + "Deselect group": "Bỏ chọn nhóm", "Destination": "Đích", "Destination catalog": "Catalog đích", "Detach Mask List": "Tách danh sách mặt nạ", @@ -965,6 +971,7 @@ "Detecting faces…": "Đang phát hiện khuôn mặt…", "Detecting orientation": "Đang nhận diện chiều ảnh", "Detection": "Phát hiện", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "Quá trình phát hiện chạy trên toàn bộ ảnh chứa các khuôn mặt đã chọn, bao gồm cả các khuôn mặt khác trong những ảnh đó.", "Detection sensitivity": "Độ nhạy phát hiện", "Develop Settings": "Thiết lập chỉnh sửa", "Develop preset": "Thiết lập sẵn chỉnh sửa", @@ -1270,8 +1277,10 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "Nhận diện khuôn mặt đang tắt. Bật lên để nhận gợi ý tên và xem các khuôn mặt giống nhau cùng lúc.", "Face recognition is on": "Nhận diện khuôn mặt đang bật", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "Nhận diện khuôn mặt cần một mô hình để gợi ý tên: tải một lần, trong Cài đặt.", + "Face removed from similarity groups": "Đã bỏ khuôn mặt khỏi các nhóm tương đồng", "Face scan": "Quét khuôn mặt", "Face tracking": "Theo dõi khuôn mặt", + "Faces without a displayed look-alike group.": "Các khuôn mặt không thuộc nhóm tương đồng nào đang hiển thị.", "Fade": "Chuyển mờ", "Fade duration": "Thời lượng chuyển mờ", "Fades": "Chuyển mờ", @@ -1544,7 +1553,11 @@ "Group Unnamed Faces": "Nhóm các khuôn mặt chưa đặt tên", "Grouped by parent": "Nhóm theo mục cha", "Grouped: keywords inside the same keyword share a line naming it, and long lists and the suggestions are shortened.": "Theo nhóm: các từ khóa nằm trong cùng một từ khóa chung một dòng mang tên từ khóa đó, danh sách dài và gợi ý được rút gọn.", + "Grouping": "Gom nhóm", + "Grouping faces across the library in the background…": "Đang gom nhóm khuôn mặt trên toàn thư viện trong nền…", + "Grouping unknown faces": "Đang gom nhóm khuôn mặt chưa rõ", "Groups": "Nhóm", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "Nhóm sử dụng các khuôn mặt trong toàn bộ bộ lọc thư viện hiện tại; chọn một nhóm sẽ bao gồm cả các khuôn mặt của nhóm ở trang khác.", "Grow": "Mở rộng", "Guided Laplacian": "Laplacian có dẫn hướng", "Guided Upright isn't supported; straighten these photos again in Transform.": "Chỉnh thẳng có hướng dẫn chưa được hỗ trợ; hãy chỉnh thẳng lại các ảnh này trong Biến đổi.", @@ -2061,6 +2074,7 @@ "Looking up new photos in Immich": "Đang tìm ảnh mới trong Immich", "Looks at every photo on the server again, not only those changed since the last pass.": "Xem lại mọi ảnh trên máy chủ, không chỉ những ảnh đã thay đổi kể từ lần trước.", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "Xem mắt của chủ thể như dải mắt, khoảng một giây mỗi ảnh, chạy nền. Ảnh đã chọn được giữ nguyên.", + "Loose": "Rộng", "Loupe": "Kính lúp", "Loupe Background": "Nền kính lúp", "Loupe Info": "Thông tin kính lúp", @@ -2493,6 +2507,7 @@ "Only one of the photo and the reference records its aperture": "Chỉ ảnh hoặc chỉ ảnh tham chiếu ghi khẩu độ", "Only the files and folders you pick": "Chỉ các tệp và thư mục bạn chọn", "Only the first published photos were asked.": "Chỉ hỏi các ảnh đã đăng đầu tiên.", + "Only the selected faces are processed.": "Chỉ xử lý các khuôn mặt đã chọn.", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "Chỉ những ảnh này được thêm. Bật tùy chọn này, hoặc Cài đặt > Thư mục > Theo dõi ảnh mới, để thêm ảnh mới khi bạn chụp.", "Only this area and the outline of what to fill are sent: not the whole photo, not its metadata.": "Chỉ gửi vùng này và đường viền của phần cần lấp: không gửi cả ảnh, không gửi siêu dữ liệu.", "Only you can allow a permission: a click from an agent or a script changes nothing.": "Chỉ bạn mới có thể cho phép một quyền: một cú nhấp từ tác tử hoặc tập lệnh không thay đổi gì.", @@ -2549,6 +2564,7 @@ "Other devices see this name. Every device needs its own.": "Các thiết bị khác thấy tên này. Mỗi thiết bị cần một tên riêng.", "Other models (optional)": "Mô hình khác (tùy chọn)", "Other server…": "Máy chủ khác…", + "Other unknown faces": "Các khuôn mặt chưa rõ khác", "Others get previews to develop; only this device adds photos.": "Các thiết bị khác nhận ảnh xem trước để xử lý; chỉ thiết bị này thêm ảnh.", "Others may also fetch the originals; only this device adds photos.": "Các thiết bị khác cũng có thể tải bản gốc; chỉ thiết bị này thêm ảnh.", "Output": "Đầu ra", @@ -2961,6 +2977,7 @@ "Reload": "Tải lại", "Reload MIDI Map": "Tải lại sơ đồ MIDI", "Reload Preview": "Tải lại bản xem trước", + "Reload the faces and try again": "Tải lại danh sách khuôn mặt rồi thử lại", "Remember Dialog Choices": "Ghi nhớ lựa chọn hộp thoại", "Remember Each Source's Filters Separately": "Nhớ riêng bộ lọc của từng nguồn", "Remember as…": "Ghi nhớ thành…", @@ -3006,6 +3023,7 @@ "Remove from At Import": "Gỡ khỏi Khi nhập", "Remove from List": "Gỡ khỏi danh sách", "Remove from Quick Collection": "Gỡ khỏi Bộ sưu tập nhanh", + "Remove from similarity groups": "Bỏ khỏi các nhóm tương đồng", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "Gỡ khỏi catalog (vào Đã xóa gần đây; tệp vẫn nằm trên ổ đĩa)", "Remove from the stack": "Gỡ khỏi chồng", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "Gỡ giữ nguyên tệp trên ổ đĩa và chuyển ảnh vào Đã xóa gần đây.", @@ -3109,6 +3127,7 @@ "Restore Built-ins": "Khôi phục mục tích hợp", "Restore Catalog from Backup…": "Khôi phục catalog từ bản sao lưu…", "Restore Generated Fill": "Khôi phục vùng lấp tạo sinh", + "Restore automatic grouping": "Khôi phục gom nhóm tự động", "Restore the photo to use it as the reference": "Khôi phục ảnh để dùng nó làm ảnh tham chiếu", "Resume": "Tiếp tục", "Resume Face Scan": "Tiếp tục quét khuôn mặt", @@ -3125,6 +3144,7 @@ "Reverse geocoding is off: choose Offline or Online first": "Tra địa danh đang tắt: hãy chọn Ngoại tuyến hoặc Trực tuyến trước", "Revert Capture Time to Original": "Hoàn nguyên thời gian chụp về bản gốc", "Review Comments": "Xem lại nhận xét", + "Review these similar faces before naming or ignoring them.": "Kiểm tra các khuôn mặt tương đồng này trước khi đặt tên hoặc bỏ qua.", "Revoke": "Thu hồi", "Revoke Plug-in Permission": "Thu hồi quyền của plugin", "Right": "Phải", @@ -3297,6 +3317,8 @@ "Select by Color Label": "Chọn theo nhãn màu", "Select by Flag": "Chọn theo cờ", "Select by Rating": "Chọn theo xếp hạng", + "Select group": "Chọn nhóm", + "Select group for maintenance": "Chọn nhóm để bảo trì", "Select none": "Bỏ chọn tất cả", "Select photos to import": "Chọn ảnh để nhập", "Select photos to move them to this location": "Chọn ảnh để chuyển chúng đến vị trí này", @@ -3515,6 +3537,7 @@ "Side": "Bên cạnh", "Side by Side": "Cạnh nhau", "Signed by": "Được ký bởi", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "Các khuôn mặt chưa rõ tương đồng được gom nhóm bên dưới. Chọn một nhóm, kiểm tra các khuôn mặt trong đó rồi đặt tên hoặc bỏ qua.", "Simple": "Đơn giản", "Single Image / Contact Sheet": "Một ảnh / Tờ liên hợp", "Single Page": "Một trang", @@ -3574,6 +3597,7 @@ "Spacing": "Khoảng cách", "Specific folder": "Thư mục cụ thể", "Speed-Edit Keys": "Phím chỉnh nhanh", + "Split Unknown Faces": "Tách khuôn mặt chưa rõ", "Spot": "Điểm", "Spot Removal": "Xóa điểm", "Spread": "Trang đôi", @@ -3617,6 +3641,7 @@ "Stop using": "Ngừng dùng", "Store Presets and Profiles with This Catalog": "Lưu thiết lập sẵn và hồ sơ cùng catalog này", "Strength": "Cường độ", + "Strict": "Chặt", "Stroke Border": "Viền nét", "Stroke border": "Viền nét", "Studio Capture": "Chụp studio", @@ -3808,6 +3833,7 @@ "The second graphics card is left free for previews and thumbnails.": "Card đồ họa thứ hai được để trống cho ảnh xem trước và hình thu nhỏ.", "The selected photo as a slide. Playback fills the screen; the aspect preview only changes this preview.": "Ảnh đã chọn dưới dạng trang chiếu. Khi phát sẽ lấp đầy màn hình; xem trước tỷ lệ khung chỉ thay đổi bản xem trước này.", "The selected photos are in this location": "Các ảnh đã chọn đang ở vị trí này", + "The selection changed. Reload the faces and try again": "Vùng chọn đã thay đổi. Tải lại danh sách khuôn mặt rồi thử lại", "The server answers; the key works.": "Máy chủ phản hồi; khóa hoạt động.", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "Máy chủ dùng chứng chỉ không được tổ chức nào bảo đảm (thường gặp ở máy chủ gia đình). Chỉ tin cậy nếu dấu vân tay SHA-256 này khớp với chứng chỉ máy chủ của bạn:", "The size limit picks the highest quality, up to Quality, whose file fits.": "Giới hạn kích thước chọn chất lượng cao nhất, tối đa bằng Chất lượng, mà tệp vẫn vừa.", @@ -4354,6 +4380,7 @@ "removed": "đã gỡ", "role": "vai trò", "scene-linear Rec. 2020": "tuyến tính theo cảnh Rec. 2020", + "selected faces in People": "các khuôn mặt đã chọn trong Người", "selected photos": "ảnh đã chọn", "shots": "ảnh chụp", "size": "kích thước", diff --git a/crates/ui-egui/locales/fork/zh-hans.json b/crates/ui-egui/locales/fork/zh-hans.json index e86405ad5d..2fa82f4776 100644 --- a/crates/ui-egui/locales/fork/zh-hans.json +++ b/crates/ui-egui/locales/fork/zh-hans.json @@ -287,6 +287,7 @@ "Auto-fill new books with the selected photos": "用所选照片自动填充新相册", "Automatic": "自动", "Automatic (FP16 when supported)": "自动(支持时使用 FP16)", + "Automatic grouping restored": "已恢复自动分组", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "自动模式在受支持时优先使用独立 NVIDIA GPU 和半精度(FP16)计算。", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "自动:已安装 SAM 3 时使用 SAM 3,否则使用 SAM 2.1。描述蒙版始终使用 SAM 3。", "Automatically Toggle Mask Overlay": "自动切换蒙版叠加", @@ -311,6 +312,7 @@ "Background Tasks": "后台任务", "Backup": "备份", "Backup folder": "备份文件夹", + "Balanced": "均衡", "Band": "条带", "Base tone": "基础色调", "Baseline": "基线", @@ -563,9 +565,12 @@ "Clear Rating": "清除星级", "Clear Role": "清除角色", "Clear Search Index": "清除搜索索引", + "Clear Selected Face Data": "清除所选人脸数据", "Clear Sensor Dust Map": "清除传感器灰尘图", "Clear Slideshow Music": "清除幻灯片音乐", "Clear Tracklogs": "清除轨迹记录", + "Clear selection": "清除选择", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "清除所选人脸的缓存嵌入向量和建议。后台索引可能会重新生成它们。姓名和决定将保留。", "Clear…": "清除…", "Click Through": "点击穿透", "Click a cell on a page to edit it.": "单击页面上的单元格进行编辑。", @@ -865,6 +870,7 @@ "Describe photos…": "描述照片…", "Deselect Active Photo": "取消选择活动照片", "Deselect Unflagged Photos": "取消选择无旗标照片", + "Deselect group": "取消选择分组", "Destination": "目标", "Detach Mask List": "分离蒙版列表", "Detach the mask list": "分离蒙版列表", @@ -878,6 +884,7 @@ "Detecting faces…": "正在检测人脸…", "Detecting orientation": "正在检测方向", "Detection": "检测", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "检测将对包含所选人脸的整张照片运行,包括这些照片中的其他人脸。", "Detection sensitivity": "检测灵敏度", "Develop": "修改照片", "Develop Settings": "修改照片设置", @@ -1168,9 +1175,11 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "人脸识别已关闭。开启后可获得姓名建议,并将相似的人脸归在一起显示。", "Face recognition is on": "人脸识别已开启", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "人脸识别需要一个模型来建议姓名:在“设置”中一次性下载。", + "Face removed from similarity groups": "已将此人脸移出相似分组", "Face scan": "人脸扫描", "Faces": "人脸", "Faces of a Person": "某人的人脸", + "Faces without a displayed look-alike group.": "未归入当前显示相似分组的人脸。", "Fade": "淡入淡出", "Fade duration": "淡入淡出时长", "Fades": "淡入淡出", @@ -1407,7 +1416,11 @@ "Grid: last photo of the view": "网格:视图中的最后一张照片", "Group (optional)": "分组(可选)", "Group Unnamed Faces": "将未命名的面部分组", + "Grouping": "分组", + "Grouping faces across the library in the background…": "正在后台对图库中的人脸进行分组…", + "Grouping unknown faces": "正在分组未知人脸", "Groups": "分组", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "分组涵盖当前图库筛选范围内的全部人脸;选择分组时也会包含其他页面中的同组人脸。", "Grow": "扩展", "Guided Laplacian": "引导拉普拉斯", "Guided Upright isn't supported; straighten these photos again in Transform.": "不支持引导式垂直校正;请在“变换”中重新校正这些照片。", @@ -1871,6 +1884,7 @@ "Looking up new photos in Immich": "正在 Immich 中查找新照片", "Looks at every photo on the server again, not only those changed since the last pass.": "重新检查服务器上的所有照片,而不仅是上次之后有更改的照片。", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "在后台像眼睛条一样检查主体的眼睛,每张照片约一秒。已留用的照片不受影响。", + "Loose": "宽松", "Lossy DNG files and Smart Previews open as raw photos.": "有损 DNG 文件和智能预览会作为原始照片打开。", "Loupe": "放大视图", "Loupe Background": "放大镜背景", @@ -2263,6 +2277,7 @@ "Only one of the photo and the reference records its aperture": "只有照片或只有参考照片记录了光圈", "Only the files and folders you pick": "仅限您选择的文件和文件夹", "Only the first published photos were asked.": "仅查询了前面的已发布照片。", + "Only the selected faces are processed.": "仅处理所选人脸。", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "只添加这些照片。打开此项,或打开 设置 > 文件夹 > 监视新照片,即可在拍摄时添加新照片。", "Only you can allow a permission: a click from an agent or a script changes nothing.": "只有您可以允许权限:代理或脚本的点击不会改变任何内容。", "Open": "打开", @@ -2319,6 +2334,7 @@ "Other editor": "其他编辑器", "Other models (optional)": "其他模型(可选)", "Other server…": "其他服务器…", + "Other unknown faces": "其他未知人脸", "Others get previews to develop; only this device adds photos.": "其他设备获取用于修改的预览;只有此设备添加照片。", "Others may also fetch the originals; only this device adds photos.": "其他设备也可获取原片;只有此设备添加照片。", "Output": "输出", @@ -2695,6 +2711,7 @@ "Reload": "重新加载", "Reload MIDI Map": "重新载入 MIDI 映射", "Reload Preview": "重新载入预览", + "Reload the faces and try again": "请重新加载人脸后再试", "Remember Dialog Choices": "记住对话框选择", "Remember Each Source's Filters Separately": "分别记住每个来源的过滤器", "Remember as…": "记住为…", @@ -2734,6 +2751,7 @@ "Remove from List": "从列表中移除", "Remove from Quick Collection": "从快速集合中移除", "Remove from Target Collection": "从目标集合中移除", + "Remove from similarity groups": "从相似分组中移出", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "从目录中移除(移至“最近删除”;文件保留在磁盘上)", "Remove from the stack": "从堆栈中移除", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "“移除”会保留磁盘上的文件,并将照片移到“最近删除”。", @@ -2821,6 +2839,7 @@ "Restore Built-ins": "恢复内置预设", "Restore Catalog from Backup…": "从备份还原目录…", "Restore Generated Fill": "恢复生成式填充", + "Restore automatic grouping": "恢复自动分组", "Restore the photo to use it as the reference": "恢复该照片以将其用作参考", "Resume": "继续", "Resume Face Scan": "继续人脸扫描", @@ -2835,6 +2854,7 @@ "Reverse geocoding is off: choose Offline or Online first": "反向地理编码已关闭:请先选择离线或在线", "Revert Capture Time to Original": "将拍摄时间还原为原始值", "Review Comments": "查看评论", + "Review these similar faces before naming or ignoring them.": "在命名或忽略这些相似人脸之前,请先核对。", "Revoke": "撤销", "Revoke Plug-in Permission": "撤销插件权限", "Right": "右", @@ -2992,6 +3012,8 @@ "Select by Color Label": "按颜色标签选择", "Select by Flag": "按旗标选择", "Select by Rating": "按星级选择", + "Select group": "选择分组", + "Select group for maintenance": "选择该分组用于维护", "Select none": "全不选", "Select photos to import": "选择要导入的照片", "Select photos to move them to this location": "选择照片以将其移到此位置", @@ -3182,6 +3204,7 @@ "Side": "侧边", "Side by Side": "并排", "Signed by": "签名者", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "相似的未知人脸已在下方分组。选择一个分组,核对其中人脸后再命名或忽略。", "Simple": "简洁", "Single Image / Contact Sheet": "单个图像/联系表", "Single Page": "单页", @@ -3239,6 +3262,7 @@ "Spacing": "间距", "Specific folder": "指定文件夹", "Speed-Edit Keys": "快速编辑键", + "Split Unknown Faces": "拆分未知人脸", "Spot Removal": "污点去除", "Spread": "跨页", "Spread View": "跨页视图", @@ -3279,6 +3303,7 @@ "Stop syncing? Nothing is deleted on any device.": "停止同步?任何设备上都不会删除任何内容。", "Store Presets and Profiles with This Catalog": "将预设和配置文件存储在此目录中", "Strength": "强度", + "Strict": "严格", "Stroke Border": "描边", "Studio Capture": "影棚拍摄", "Studio Session": "影棚会话", @@ -3453,6 +3478,7 @@ "The score is the factors' weighted mean; 0 leaves one out of it (it is still measured).": "分数是各因素的加权平均值;0 表示不计入(仍会测量)。", "The second graphics card is left free for previews and thumbnails.": "第二块显卡留给预览和缩略图。", "The selected photos are in this location": "所选照片位于此位置", + "The selection changed. Reload the faces and try again": "选择内容已更改。请重新加载人脸后再试", "The server answers; the key works.": "服务器有响应;密钥可用。", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "服务器使用的证书没有任何机构担保(家用服务器常见)。只有当此 SHA-256 指纹与你的服务器证书一致时才信任它:", "The size limit picks the highest quality, up to Quality, whose file fits.": "大小限制会在不超过“品质”的前提下,选择文件能符合大小的最高品质。", @@ -3994,6 +4020,7 @@ "role": "角色", "save goes through.": "保存会完成。", "scene-linear Rec. 2020": "场景线性 Rec. 2020", + "selected faces in People": "“人物”中所选的人脸", "selected photos": "所选照片", "shots": "张", "siblings) no longer open bright green (issue #148): their as-shot white balance and black level are read from the": "同系列机型)不再呈亮绿色(issue #148):其拍摄时白平衡和黑电平从", diff --git a/crates/ui-egui/locales/fork/zh-hant.json b/crates/ui-egui/locales/fork/zh-hant.json index c59496d141..7088d53aba 100644 --- a/crates/ui-egui/locales/fork/zh-hant.json +++ b/crates/ui-egui/locales/fork/zh-hant.json @@ -291,6 +291,7 @@ "Auto-fill new books with the selected photos": "以所選照片自動填入新相簿", "Automatic": "自動", "Automatic (FP16 when supported)": "自動(支援時使用 FP16)", + "Automatic grouping restored": "已還原自動分組", "Automatic prefers dedicated NVIDIA GPUs and half-precision (FP16) compute when supported.": "自動模式在支援時優先使用獨立 NVIDIA GPU 與半精度(FP16)運算。", "Automatic uses SAM 3 when it is installed, otherwise SAM 2.1. Describe masks always use SAM 3.": "自動:已安裝 SAM 3 時使用 SAM 3,否則使用 SAM 2.1。描述遮罩一律使用 SAM 3。", "Automatic uses the graphics card where it is faster than the processor: both are timed on this computer the first time a photo is made.": "「自動」會在顯示卡比處理器快時使用顯示卡:第一次產生相片時,會在這台電腦上為兩者計時比較。", @@ -317,6 +318,7 @@ "Background Tasks": "背景工作", "Backup": "備份", "Backup folder": "備份資料夾", + "Balanced": "平衡", "Band": "條帶", "Base tone": "基礎色調", "Baseline": "基線", @@ -576,10 +578,13 @@ "Clear Rating": "清除評分", "Clear Role": "清除角色", "Clear Search Index": "清除搜尋索引", + "Clear Selected Face Data": "清除選取的人臉資料", "Clear Sensor Dust Map": "清除感光元件灰塵圖", "Clear Slideshow Music": "清除幻燈片播放音樂", "Clear Tracklogs": "清除軌跡記錄", "Clear cache": "清除快取", + "Clear selection": "清除選取", + "Clears cached embeddings and suggestions for selected faces. Background indexing may recreate them. Names and decisions are kept.": "清除選取人臉的快取嵌入向量與建議。背景索引可能會重新建立它們。名稱與決定會保留。", "Clear…": "清除…", "Click Through": "點按穿透", "Click a cell on a page to edit it.": "按一下頁面上的儲存格進行編輯。", @@ -887,6 +892,7 @@ "Describe photos…": "描述照片…", "Deselect Active Photo": "取消選取使用中的照片", "Deselect Unflagged Photos": "取消選取無旗標照片", + "Deselect group": "取消選取群組", "Destination": "目的地", "Detach Mask List": "分離遮色片清單", "Detach the mask list": "分離遮色片清單", @@ -900,6 +906,7 @@ "Detecting faces…": "正在偵測人臉…", "Detecting orientation": "正在偵測方向", "Detection": "偵測", + "Detection runs on the entire photos containing the selected faces, including other faces in those photos.": "偵測會對包含選取人臉的整張相片執行,包含這些相片中的其他人臉。", "Detection sensitivity": "偵測靈敏度", "Develop": "編輯相片", "Develop Settings": "顯像設定", @@ -1193,9 +1200,11 @@ "Face recognition is off. Turn it on to get name suggestions and see look-alike faces together.": "人臉識別已關閉。開啟後可取得姓名建議,並將相似的人臉歸在一起顯示。", "Face recognition is on": "人臉識別已開啟", "Face recognition needs a model to suggest names: a one-time download, in Settings.": "人臉識別需要一個模型來建議姓名:在「設定」中一次性下載。", + "Face removed from similarity groups": "已將此人臉移出相似群組", "Face scan": "人臉掃描", "Faces": "人臉", "Faces of a Person": "某人的臉孔", + "Faces without a displayed look-alike group.": "未歸入目前顯示相似群組的人臉。", "Fade": "淡化", "Fade duration": "淡化持續時間", "Fades": "淡入淡出", @@ -1433,7 +1442,11 @@ "Grid: last photo of the view": "格狀檢視:檢視中的最後一張照片", "Group (optional)": "群組(選填)", "Group Unnamed Faces": "將未命名的臉部分組", + "Grouping": "分組", + "Grouping faces across the library in the background…": "正在背景對圖庫中的人臉進行分組…", + "Grouping unknown faces": "正在分組未知人臉", "Groups": "群組", + "Groups use faces across the current library filter; selecting a group includes its faces on other pages.": "群組涵蓋目前圖庫篩選範圍內的全部人臉;選取群組時也會包含其他頁面的同組人臉。", "Grow": "擴展", "Guided Laplacian": "引導拉普拉斯", "Guided Upright isn't supported; straighten these photos again in Transform.": "不支援引導式透視校正;請在「變形」中重新拉直這些照片。", @@ -1905,6 +1918,7 @@ "Looking up new photos in Immich": "正在 Immich 中尋找新照片", "Looks at every photo on the server again, not only those changed since the last pass.": "重新檢查伺服器上的所有照片,而不只是上次之後有變更的照片。", "Looks at the subjects' eyes the way the eye strip does, about a second a photo, in the background. Picked photos are left alone.": "以眼睛條相同的方式檢查主體的眼睛,每張照片約一秒,在背景執行。已精選的照片不受影響。", + "Loose": "寬鬆", "Lossy DNG files and Smart Previews open as raw photos.": "有損 DNG 檔案和智能預覽會作為原始照片打開。", "Loupe": "放大檢視", "Loupe Background": "放大鏡背景", @@ -2301,6 +2315,7 @@ "Only photos whose AI Denoise amount is above 0 are made. Exports always make theirs if it is missing.": "只為 AI 降噪強度大於 0 的相片產生影像。匯出時若缺少影像,一律會先產生。", "Only the files and folders you pick": "僅限您選擇的檔案和資料夾", "Only the first published photos were asked.": "僅查詢了前面的已發佈照片。", + "Only the selected faces are processed.": "僅處理選取的人臉。", "Only these photos are added. Turn this on, or Settings ▸ Folders ▸ Watch for new photos, to add new ones as you take them.": "只加入這些照片。開啟此項,或開啟 設定 > 資料夾 > 監看新照片,即可在拍攝時加入新照片。", "Only you can allow a permission: a click from an agent or a script changes nothing.": "只有您可以允許權限:代理程式或指令碼的點按不會改變任何內容。", "Open": "開啟", @@ -2360,6 +2375,7 @@ "Other editor": "其他編輯器", "Other models (optional)": "其他模型(選用)", "Other server…": "其他伺服器…", + "Other unknown faces": "其他未知人臉", "Others get previews to develop; only this device adds photos.": "其他裝置取得用於編修的預覽;只有此裝置加入相片。", "Others may also fetch the originals; only this device adds photos.": "其他裝置也可取得原始檔;只有此裝置加入相片。", "Output": "輸出", @@ -2737,6 +2753,7 @@ "Reload": "重新載入", "Reload MIDI Map": "重新載入 MIDI 對應", "Reload Preview": "重新載入預覽", + "Reload the faces and try again": "請重新載入人臉後再試", "Remember Dialog Choices": "記住對話框選擇", "Remember Each Source's Filters Separately": "分別記住每個來源的篩選", "Remember as…": "記住為…", @@ -2777,6 +2794,7 @@ "Remove from List": "從列表中移除", "Remove from Quick Collection": "從快速集合中移除", "Remove from Target Collection": "從目標集合中移除", + "Remove from similarity groups": "從相似群組中移出", "Remove from the catalog (to Recently Deleted; the files stay on disk)": "從目錄移除(移至「最近刪除」;檔案保留在磁碟上)", "Remove from the stack": "從堆疊中移除", "Remove keeps the files on disk and moves the photos to Recently Deleted.": "「移除」會保留磁碟上的檔案,並將照片移到「最近刪除」。", @@ -2864,6 +2882,7 @@ "Restore Built-ins": "還原內建預設", "Restore Catalog from Backup…": "從備份還原目錄…", "Restore Generated Fill": "還原生成式填充", + "Restore automatic grouping": "還原自動分組", "Restore the photo to use it as the reference": "還原此照片即可將它作為參考照片", "Resume": "繼續", "Resume Face Scan": "繼續人臉掃描", @@ -2878,6 +2897,7 @@ "Reverse geocoding is off: choose Offline or Online first": "反向地理編碼已關閉:請先選擇離線或線上", "Revert Capture Time to Original": "將拍攝時間還原為原始值", "Review Comments": "檢視留言", + "Review these similar faces before naming or ignoring them.": "在命名或忽略這些相似人臉前,請先檢視。", "Revoke": "撤銷", "Revoke Plug-in Permission": "撤銷外掛程式權限", "Right": "右", @@ -3035,6 +3055,8 @@ "Select by Color Label": "依色彩標籤選取", "Select by Flag": "依旗標選取", "Select by Rating": "依評分選取", + "Select group": "選取群組", + "Select group for maintenance": "選取群組以進行維護", "Select none": "全部不選", "Select photos to import": "選擇要匯入的照片", "Select photos to move them to this location": "選取相片以將其移到此位置", @@ -3225,6 +3247,7 @@ "Side": "側邊", "Side by Side": "並排", "Signed by": "簽署者", + "Similar unknown faces are grouped below. Select a group, review its faces, then name or ignore them.": "相似的未知人臉已在下方分組。選取一個群組,檢視其中的人臉後再命名或忽略。", "Simple": "簡潔", "Single Image / Contact Sheet": "單一影像/縮圖目錄", "Single Page": "單頁", @@ -3283,6 +3306,7 @@ "Specific folder": "指定資料夾", "Speed": "速度", "Speed-Edit Keys": "快速編輯鍵", + "Split Unknown Faces": "拆分未知人臉", "Spot Removal": "污點移除", "Spread": "跨頁", "Spread View": "跨頁檢視", @@ -3324,6 +3348,7 @@ "Stop syncing? Nothing is deleted on any device.": "停止同步?任何裝置上都不會刪除任何內容。", "Store Presets and Profiles with This Catalog": "將預設集和描述檔儲存在此目錄中", "Strength": "強度", + "Strict": "嚴格", "Stroke Border": "邊框", "Studio Capture": "攝影棚拍攝", "Studio Session": "攝影棚工作階段", @@ -3504,6 +3529,7 @@ "The score is the factors' weighted mean; 0 leaves one out of it (it is still measured).": "分數是各因素的加權平均值;0 表示不計入(仍會測量)。", "The second graphics card is left free for previews and thumbnails.": "第二張顯示卡留給預覽和縮圖。", "The selected photos are in this location": "所選相片位於此位置", + "The selection changed. Reload the faces and try again": "選取項目已變更。請重新載入人臉後再試", "The server answers; the key works.": "伺服器有回應;金鑰可用。", "The server uses a certificate no authority vouches for (common for home servers). Trust it only if this SHA-256 fingerprint matches your server's certificate:": "伺服器使用的憑證沒有任何機構擔保(家用伺服器常見)。只有當此 SHA-256 指紋與你的伺服器憑證相符時才信任它:", "The size limit picks the highest quality, up to Quality, whose file fits.": "大小上限會選擇不超過「品質」設定、且檔案大小符合上限的最高品質。", @@ -4068,6 +4094,7 @@ "role": "角色", "save goes through.": "保存會完成。", "scene-linear Rec. 2020": "場景線性 Rec. 2020", + "selected faces in People": "「人物」中選取的人臉", "selected photos": "所選照片", "shots": "張", "siblings) no longer open bright green (issue #148): their as-shot white balance and black level are read from the": "同系列機型)不再呈亮綠色(issue #148):其拍攝時白平衡和黑電平從", diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index d73254ff48..4850d91200 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -1621,7 +1621,7 @@ impl LccApp { pub fn run_typed(&mut self, id: &str, params: Value) -> Result { let id = &*lcc_engine::canonical_id(id); self.note_ran(id); - if matches!(id, "faces.splitUnknown" | "faces.rejectSuggestions" | "faces.undoSuggestionDecision") { + if matches!(id, "faces.splitUnknown" | "faces.maintain" | "faces.rejectSuggestions" | "faces.undoSuggestionDecision") { panels::unnamed::invalidate(self); } shortcuts::set_active(self.ui.settings.keymap_set); @@ -1678,7 +1678,7 @@ impl LccApp { if let Ok(v) = &r { edit_in::after_command(self, id, v); } - if r.is_ok() && id == "faces.splitUnknown" { + if r.is_ok() && matches!(id, "faces.splitUnknown" | "faces.maintain") { self.caches.faces_epoch = self.caches.faces_epoch.wrapping_add(1); } if let Ok(v) = &r diff --git a/crates/ui-egui/src/panels/unnamed.rs b/crates/ui-egui/src/panels/unnamed.rs index 5f4009b7a7..3b21e257e3 100644 --- a/crates/ui-egui/src/panels/unnamed.rs +++ b/crates/ui-egui/src/panels/unnamed.rs @@ -183,7 +183,7 @@ pub fn faces(app: &mut LccApp, now: f64) -> Arc { } } let selected: Vec<_> = app.ui.unnamed_selected.iter().copied().collect(); - let retained = selection_snapshot(app, &selected).unwrap_or_default(); + let retained = known_snapshots(app, &selected); let v = app.session.execute("faces.unnamed", &json!({"scope": "filter", "bySuggestion": true, "limit": PEOPLE_FACE_LIMIT, "offset": app.ui.unnamed_page_offset, "retainFaces": retained, "clusterOffset": f64::from(app.ui.unnamed_cluster_offset.clamp(-20, 20)) / 100.0})).unwrap_or(Value::Null); let list = Arc::new(parse(&v)); app.ui.unnamed_page_offset = list.offset; @@ -201,7 +201,10 @@ pub fn faces(app: &mut LccApp, now: f64) -> Arc { .chain(list.groups.iter().flat_map(|group| group.faces.iter())) .map(|face| ((face.photo, face.index), face.rect)) .collect(); - app.ui.unnamed_selected.retain(|key| snapshots.get(key).is_some_and(|rect| current.get(key) == Some(rect))); + app.ui.unnamed_selected.retain(|key| match snapshots.get(key) { + Some(rect) => current.get(key) == Some(rect), + None => current.contains_key(key), + }); app.ui.confirmed_suggestions.retain(|k| present.contains(k) || suggested.contains(k)); app.ui.rejected_suggestions.retain(|k| present.contains(k) || suggested.contains(k)); app.caches.unnamed = Some((rev, indexed, epoch, now, list.clone())); @@ -238,6 +241,26 @@ fn click(app: &mut LccApp, visible: &[UnnamedFace], i: usize, shift: bool) { app.ui.unnamed_focus = !app.ui.unnamed_selected.is_empty(); } +/// Best-effort snapshots of any selected keys present in the cached listing, used to retain +/// unchanged selections across refreshes without letting one stale face drop the rest. +fn known_snapshots(app: &LccApp, faces: &[(u64, usize)]) -> Vec { + let Some(list) = app.caches.unnamed.as_ref().map(|entry| &entry.4) else { + return Vec::new(); + }; + let wanted: std::collections::HashSet<_> = faces.iter().copied().collect(); + let mut found: Vec<_> = list + .faces + .iter() + .chain(list.cluster_members.iter()) + .chain(list.groups.iter().flat_map(|group| group.faces.iter())) + .filter(|face| wanted.contains(&(face.photo, face.index))) + .map(|face| (face.photo, face.index, face.rect)) + .collect(); + found.sort_by_key(|(photo, index, _)| (*photo, *index)); + found.dedup_by_key(|(photo, index, _)| (*photo, *index)); + found.iter().map(|(photo, index, rect)| json!({"photo": photo, "index": index, "rect": rect})).collect() +} + /// Resolve selection keys to the boxes the user saw, refusing a stale or incomplete listing. pub(super) fn selection_snapshot(app: &LccApp, faces: &[(u64, usize)]) -> Result, String> { let wanted: std::collections::HashSet<_> = faces.iter().copied().collect(); @@ -602,4 +625,31 @@ mod tests { // an answer from before the engine reported it: no word, and nothing to wait for assert_eq!(parse(&json!({"faces": []})).scan, None); } + + #[test] + fn refresh_keeps_valid_selected_faces_when_one_selected_face_is_missing() { + let mut app = LccApp::new(lcc_engine::Session::with_demo(), crate::Services::default()); + let id = app.session.catalog.photos().next().expect("demo photo").id; + let face = |x: f64| lcc_meta::Region { + rect: lcc_geom::Rect { x0: x, y0: 0.1, x1: x + 0.1, y1: 0.3 }, + kind: lcc_meta::RegionKind::Face, + name: None, + description: None, + }; + let mut meta = app.session.catalog.photo(id).unwrap().meta.clone(); + meta.regions = vec![face(0.1), face(0.4)]; + app.session.commit("setup", lcc_catalog::Op::SetMeta { id, meta: Box::new(meta) }).unwrap(); + // Cold cache: a valid selection stays selected while a missing key is dropped. + app.ui.unnamed_selected.insert((id.0, 0)); + app.ui.unnamed_selected.insert((id.0, 99)); + let _ = faces(&mut app, 1.0); + assert!(app.ui.unnamed_selected.contains(&(id.0, 0))); + assert!(!app.ui.unnamed_selected.contains(&(id.0, 99))); + // Warm cache with one stale key added: refreshing still retains the valid face. + app.ui.unnamed_selected.insert((id.0, 99)); + invalidate(&mut app); + let _ = faces(&mut app, 2.0); + assert!(app.ui.unnamed_selected.contains(&(id.0, 0))); + assert!(!app.ui.unnamed_selected.contains(&(id.0, 99))); + } } diff --git a/docs/manual-site/src/content/docs/ai/faces.mdx b/docs/manual-site/src/content/docs/ai/faces.mdx index 525491b402..d856d81eea 100644 --- a/docs/manual-site/src/content/docs/ai/faces.mdx +++ b/docs/manual-site/src/content/docs/ai/faces.mdx @@ -16,7 +16,7 @@ import { Aside } from '@astrojs/starlight/components'; - **Detect Faces**: Library ▸ **Detect Faces** finds faces in the selected photos with the MediaPipe Face Landmarker and adds unnamed boxes in one undo step. It offers the small one-time download the first time. Boxes from XMP or that you named are never touched. Finds faces down to about 60 pixels; tiny faces in big group photos can be missed. - **Recognise faces (experimental)**: Settings ▸ **Faces**. Off until you switch it on, even after a model is downloaded: scanning a big library takes a long time. With a recognition model chosen, a background scan works out what each face looks like and suggests names from faces you have already named. A suggestion is only a label such as "Jane Doe?" until you confirm it; nothing is named for you. - **Face scan controls**: Settings ▸ Faces ▸ **Face scan** shows where the scan is (not started, indexing, paused, complete, and how many photos are done) with **Pause** / **Resume**, **Clear…** (deletes what the scan learned and leaves it paused; named faces stay) and **Restart…** (deletes it and scans every photo again). Both ask first. While the scan runs, its "Finding faces" row in the activity stack has a pause button (resume while paused; a pause is kept across restarts) and a gear that opens Settings ▸ Faces. -- **Face Maintenance…**: run a cancellable detect-and-recognise, recognise-existing, new-items, embedding rebuild, or rescan-and-merge pass over visible photos, the selection, one or more folders, or one or more regular or smart collections. Right-click a folder to prefill **Scan Folder for Faces…**; filesystem folders include subfolders by default and can be limited to direct children. Collection sets always include nested collections. Rescan can merge old automatic detections or replace them while preserving named, ignored, manual, and non-face regions. Reset All Face Data is a separate confirmed action; it leaves the continuous scan paused so the reset data is not immediately recreated. Recognize Existing Faces, Rebuild All Embeddings and Rebuild Named Faces find no new faces; with the face model installed they align each face as the background scan does, since a recognition model matches a face cut by its box much less well. Scripts use `faces.maintain` and `faces.scanStatus`; `faces.reset` requires `{ confirmed: true }`. MCP clients also get `cmd_faces_maintain`, `cmd_faces_scanStatus` and `cmd_faces_reset`. +- **Face Maintenance…**: run a cancellable detect-and-recognise, recognise-existing, new-items, embedding rebuild, or rescan-and-merge pass over visible photos, the selection, one or more folders, or one or more regular or smart collections. Right-click a folder to prefill **Scan Folder for Faces…**; filesystem folders include subfolders by default and can be limited to direct children. Collection sets always include nested collections. Rescan can merge old automatic detections or replace them while preserving named, ignored, manual, and non-face regions. Reset All Face Data is a separate confirmed action; it leaves the continuous scan paused so the reset data is not immediately recreated. Recognize Existing Faces, Rebuild All Embeddings and Rebuild Named Faces find no new faces; with the face model installed they align each face as the background scan does, since a recognition model matches a face cut by its box much less well. With **selected faces in People** chosen as the scope, recognition and rebuilding work on just those faces; a new **Clear Selected Face Data** action forgets their cached embeddings and suggestions (names and decisions are kept; background indexing may recreate the cache). Scripts use `faces.maintain` and `faces.scanStatus`; `faces.reset` requires `{ confirmed: true }`. MCP clients also get `cmd_faces_maintain`, `cmd_faces_scanStatus` and `cmd_faces_reset`. - **Selected faces**: in People, select faces in Unknown or Suggested and open **Face Maintenance…**. Recognition and embedding rebuild work on those faces; detection and rescanning work on their entire photos. Clearing selected face data removes cached embeddings and suggestions, which background indexing may recreate. - **Build Face Thumbnails**: Library ▸ Faces ▸ **Build Face Thumbnails** renders a tile of every face in the library at the size the People view shows now, ahead of the scrolling that would otherwise build them one by one — on a library with hundreds of people that is the slow part of People. It runs in the background (a cancellable row in the activity stack) and keeps the tiles in the thumbnail cache, so People scrolls without rendering afterwards, also after a restart. Scripts use `faces.buildThumbnails` (`status` reports the last run, `cancel` stops it). - **Sorting a person's faces**: a person's page in the People view has a sort picker next to its title — import order, capture time oldest or newest first, folder, or largest face first. Scripts use `person.sort`. diff --git a/docs/manual-site/src/content/docs/library/people.mdx b/docs/manual-site/src/content/docs/library/people.mdx index 6b1486814f..afc6e5e785 100644 --- a/docs/manual-site/src/content/docs/library/people.mdx +++ b/docs/manual-site/src/content/docs/library/people.mdx @@ -22,7 +22,7 @@ import Shot from '../../../components/Shot.astro'; - **Detect Faces** (**Library** menu) finds faces; the model is an opt-in download (**Settings ▸ Faces**), nothing ships bundled. - **Face Maintenance…** (**Library ▸ Faces** menu) runs a cancellable detection/recognition pass over the visible photos, the selection, one or more folders, or regular/smart collections. Right-click a folder and choose **Scan Folder for Faces…** to prefill it; rebuild embeddings, rescan while merging/replacing automatic boxes, or perform a separately confirmed **Reset All Face Data** there. See [Faces and people](../../ai/faces/#face-maintenance). - **Build Face Thumbnails** (**Library ▸ Faces** menu) renders a tile of every face in the library at the size the People view shows now, ahead of the scrolling that would otherwise build them one by one. It runs in the background (a cancellable row in the activity stack) and keeps the tiles in the thumbnail cache, so People scrolls without rendering afterwards, also after a restart. -- **Group unknown faces**: with a recognition model installed, similar Unknown faces are grouped in the background across the current library filter, not just the visible page. Choose **Loose**, **Balanced** or **Strict** to adjust the similarity threshold. Select a group to include its members on other pages; review them and deselect outliers before naming or ignoring. Right-click a face to remove it from automatic grouping or restore it. Grouping is a heuristic, not a confirmed identity; unembedded faces remain separate and large libraries can take time. +- **Group unknown faces**: with a recognition model installed, similar Unknown faces are grouped in the background across the current library filter, not just the visible page (grouping has its own row in the activity stack while it works). Choose **Loose**, **Balanced** or **Strict** to adjust the similarity threshold. Select a group to include its members on other pages; review them and deselect outliers before naming or ignoring. Right-click a face to remove it from automatic grouping or restore it. Grouping is a heuristic, not a confirmed identity; unembedded faces remain separate and large libraries can take time. - **Maintenance for selected faces**: select faces or a group in Unknown or Suggested, then choose **Face Maintenance…**. Recognition, embedding rebuild and cache clearing apply to selected faces; detection and rescanning apply to the entire photos containing them, including other faces. Background indexing may recreate cleared embeddings. - **Which face a tile is about**: each face close-up outlines its own face, so a tile with two people in it shows which one you are naming. **Hover** a face (unnamed, Suggested, or on a person's page) to see the whole photo with that face marked and its similarity percentage when a comparison is available. - **Right-click an unnamed face** to select its whole look-alike group, then name or ignore the group at once; the menu can also ignore that face alone. Naming faces immediately lets recognition suggest that person for the remaining Unknown faces. From d80289227adf90015bf1881c96e33b3c061aead4 Mon Sep 17 00:00:00 2001 From: Kaan Date: Tue, 1 Dec 2026 17:10:04 +0300 Subject: [PATCH 14/26] Docs: record Kaan88 GPL licensing consent --- docs/license-status.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/license-status.md b/docs/license-status.md index 26ade33fc9..1aa7b19440 100644 --- a/docs/license-status.md +++ b/docs/license-status.md @@ -1,6 +1,6 @@ # Licence status -Snapshot: 2026-11-30, after the GPL conversion. Source of truth: each crate's +Snapshot: 2026-12-01, after the GPL conversion. Source of truth: each crate's `Cargo.toml`, `NOTICE`, `LICENSE*`, and the per-file notices named below. This document is an inventory, not legal advice. @@ -18,6 +18,12 @@ document is an inventory, not legal advice. under its original licence, named in `NOTICE` or its file header. That is why some entries below are marked **ambiguous**. +## Contributor consent + +- @Kaan88: I consent to licensing my own original contributions to Chromaforge + under the GNU General Public License, version 3 or any later version + (GPL-3.0-or-later). + ## Workspace crates All workspace crates below are `GPL-3.0-or-later` unless the next table says From b2ec6e3bcca2d9e2a1c044622b60d5929b9257c5 Mon Sep 17 00:00:00 2001 From: Andrew Frahn Date: Wed, 2 Dec 2026 02:47:43 +1100 Subject: [PATCH 15/26] #1732: translate the On This Day sidebar row; Synchronize test scrolls to its row MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Classic Catalog panel's row painter translates only the ids it lists, and `memories` was not among them: the row stayed English in every language (tests_i18n_sweep failed on all three OSes in the staging → main batch). The new row also moved the Local rows down by one row height, which put the row that tests_sync right-clicks under the bars at the window's foot on Linux and macOS (more Local rows than Windows). The test now scrolls the sidebar until its row is in the upper half or the sidebar is at its end, so it no longer depends on how long the sidebar is. Checked at 700–1200 pt heights. Manual: none, no user-visible change (On This Day is unreleased). Co-Authored-By: Claude Fable 5.2 --- crates/ui-egui/src/panels/left.rs | 3 ++- crates/ui-egui/src/tests_sync.rs | 23 ++++++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/panels/left.rs b/crates/ui-egui/src/panels/left.rs index e8dd8d25e2..5875188293 100644 --- a/crates/ui-egui/src/panels/left.rs +++ b/crates/ui-egui/src/panels/left.rs @@ -130,7 +130,8 @@ fn row_sensed( sense: Sense, mark: Option, ) -> egui::Response { - let label = if matches!(id, "all" | "recentlyAdded" | "previousImport" | "quickCollection" | "picks" | "missing" | "recentlyDeleted") { + let label = if matches!(id, "all" | "recentlyAdded" | "previousImport" | "quickCollection" | "picks" | "memories" | "missing" | "recentlyDeleted") + { crate::i18n::tr(label) } else { label diff --git a/crates/ui-egui/src/tests_sync.rs b/crates/ui-egui/src/tests_sync.rs index 4236dde8dc..4422c68587 100644 --- a/crates/ui-egui/src/tests_sync.rs +++ b/crates/ui-egui/src/tests_sync.rs @@ -519,7 +519,28 @@ fn the_folders_scan_shows_a_row_and_its_cross_closes_the_dialog() { fn local_menu_synchronizes(h: &mut Headless, folder: &str) -> bool { let row = format!("source:local:{folder}"); assert!(h.step_until(T, |h| h.app.widgets.iter().any(|(w, _)| *w == row)), "no row {row}"); - let rect = h.app.widgets.iter().find(|(w, _)| *w == row).map(|(_, r)| *r).unwrap(); + // The sidebar above the Local rows grows with the machine (its disks and home folders) and with the app (new + // Catalog rows), and the bars at the window's foot cover the end of the panel: a row in the lower half is + // scrolled up first, as a hand would, until it is in the upper half or the sidebar is at its end (where its + // last rows are in view). + let find = |h: &Headless, id: &str| h.app.widgets.iter().find(|(w, _)| *w == id).map(|(_, r)| *r); + for _ in 0..40 { + let (at, panel) = (find(h, &row).unwrap(), find(h, "panel:left_panel").unwrap()); + if at.center().y <= panel.center().y { + break; + } + let over = panel.center(); + let r = h.request("ui.move", json!({"x": over.x, "y": over.y}), T); + assert_eq!(r["ok"], true, "{r}"); + let r = h.request("ui.scroll", json!({"dy": -120.0}), T); + assert_eq!(r["ok"], true, "{r}"); + h.step(); + h.step(); + if find(h, &row).is_some_and(|now| now == at) { + break; + } + } + let rect = find(h, &row).unwrap(); let c = rect.center(); let r = h.request("ui.click", json!({"x": c.x, "y": c.y, "button": "right"}), T); assert_eq!(r["ok"], true, "{r}"); From 3a7b048eb6d887e902658e9d25efb9604dad53d2 Mon Sep 17 00:00:00 2001 From: Brian L Wong Date: Tue, 1 Dec 2026 11:09:38 -0500 Subject: [PATCH 16/26] FX-27: Lightroom import no longer marks rejected settings as an edit lcc_develop::apply_partial returns the settings unchanged when the merge rejects the partial. A Lightroom photo whose mapped settings the develop engine rejected was therefore marked edited and dated with nothing changed, without a warning, and its history steps and snapshots became copies of the base settings. New lcc_develop::try_apply_partial returns the error; apply_partial keeps its contract on top of it (presets and sync are unchanged). The importer's own settings go through apply_mapped: a rejection is an error like an unmappable settings table, so the photo is left unedited and warned about ("the develop engine rejected them (...); imported without its edits"). A rejected history step or snapshot is skipped and counted in the existing warning, now "could not be read or applied". Tests: try_apply_partial errs at 100 % and blended, not at 0 %; a rejected history step and snapshot are skipped and counted; apply_mapped turns a rejected partial into an error, passes a mapping error through and keeps unmapped keys on success. Each fails with apply_partial put back. Manual: library/import-sources.mdx. Co-Authored-By: Claude Sonnet 5.5 --- crates/develop/src/lib.rs | 2 +- crates/develop/src/presets.rs | 26 ++++++- crates/engine/src/lightroom_catalog.rs | 75 ++++++++++++++++--- crates/engine/src/tests_lightroom_history.rs | 2 +- ...26-12-01-lightroom-history-limit-warned.md | 2 + docs/lightroom-catalog-import.md | 4 +- .../content/docs/library/import-sources.mdx | 1 + ...26-12-01-lightroom-history-limit-warned.md | 2 + 8 files changed, 98 insertions(+), 16 deletions(-) create mode 100644 docs/changelog/unreleased/2026-12-01-lightroom-history-limit-warned.md create mode 100644 docs/whats-new/2026-12-01-lightroom-history-limit-warned.md diff --git a/crates/develop/src/lib.rs b/crates/develop/src/lib.rs index 24ce48ac22..1d222f9ae1 100644 --- a/crates/develop/src/lib.rs +++ b/crates/develop/src/lib.rs @@ -20,7 +20,7 @@ pub mod tone_eq; pub mod vignetting_calibration; pub use controls::{CONTROLS, ControlSpec, Section, Shade, Track}; -pub use presets::{Preset, SettingItem, SettingsGroup, SettingsPick, apply_partial, extract_groups}; +pub use presets::{Preset, SettingItem, SettingsGroup, SettingsPick, apply_partial, extract_groups, try_apply_partial}; pub use retouch::{MAX_RETOUCH_MASKS, PartRequest, Retouch, RetouchAnalysis, RetouchMask, RetouchPart, RetouchTeeth}; pub use segmask::SegMask; pub use settings::*; diff --git a/crates/develop/src/presets.rs b/crates/develop/src/presets.rs index 126b9348b7..c927efa3cb 100644 --- a/crates/develop/src/presets.rs +++ b/crates/develop/src/presets.rs @@ -705,17 +705,23 @@ fn blend_curves(b: &[(f64, f64)], p: &[(f64, f64)], t: f64) -> Value { /// Apply a partial settings object with an amount (1.0 = 100 %; blending rules: [`scale_patch`]). /// Out-of-range values are clamped through the control specs, as every merge does /// ([`DevelopSettings::merged`]). -/// At 0 % nothing changes; at 100 % the partial is merged as it is. +/// At 0 % nothing changes; at 100 % the partial is merged as it is. A partial the merge rejects +/// leaves `s` as it was; callers that must tell the user use [`try_apply_partial`]. pub fn apply_partial(s: &DevelopSettings, partial: &Value, amount: f64) -> DevelopSettings { + try_apply_partial(s, partial, amount).unwrap_or_else(|_| s.clone()) +} + +/// [`apply_partial`], with a rejected merge returned as the error instead of `s` unchanged. +pub fn try_apply_partial(s: &DevelopSettings, partial: &Value, amount: f64) -> Result { if amount <= 0.0 { - return s.clone(); + return Ok(s.clone()); } // (a map named without an amount comes at 100 %, which the strength then blends: `DevelopSettings::merged`) let partial = crate::vignetting_calibration::complete_partial(partial); let partial = partial.as_ref(); let patch = if (amount - 1.0).abs() < 1e-9 { Cow::Borrowed(partial) } else { Cow::Owned(scale_patch(&blend_base(s), partial, amount)) }; // (a white balance without a scale keeps its old meaning: `DevelopSettings::merged`) - s.merged(&patch).unwrap_or_else(|_| s.clone()) + s.merged(&patch) } /// `s` as the base a partial's numbers blend from: every group written out, also the ones @@ -1338,4 +1344,18 @@ mod tests { ids.dedup(); assert_eq!(ids.len(), 3, "{:?}", out.masks); } + + /// A partial the merge rejects is an error from `try_apply_partial`, so a caller can say so; `apply_partial` keeps + /// its old contract and returns the settings unchanged. At 0 % nothing is merged, so nothing can be rejected. + #[test] + fn a_rejected_partial_is_an_error_not_a_silent_no_op() { + let s = DevelopSettings::default(); + let bad = json!({"light": {"exposure": "bright"}}); + assert!(try_apply_partial(&s, &bad, 1.0).is_err(), "a text exposure should be rejected"); + assert!(try_apply_partial(&s, &bad, 0.5).is_err(), "also when blended"); + assert_eq!(try_apply_partial(&s, &bad, 0.0).ok(), Some(s.clone()), "0 % merges nothing"); + assert_eq!(apply_partial(&s, &bad, 1.0), s, "the infallible form still returns the settings unchanged"); + let good = try_apply_partial(&s, &json!({"light": {"exposure": 0.5}}), 1.0).unwrap(); + assert_eq!(good.light.exposure, 0.5); + } } diff --git a/crates/engine/src/lightroom_catalog.rs b/crates/engine/src/lightroom_catalog.rs index 1375a5fe9d..63e98553ff 100644 --- a/crates/engine/src/lightroom_catalog.rs +++ b/crates/engine/src/lightroom_catalog.rs @@ -1640,7 +1640,7 @@ pub(crate) fn ensure_read_active(cancel: &AtomicBool) -> Result<(), String> { /// mapped onto `base` like the photo's current settings. A step that can't be read is skipped and /// counted. When the newest step doesn't match `current` (Lightroom records the state after the /// last step separately), a final "Lightroom catalog" entry holds it, so History ends where the -/// photo is. +/// photo is. A step whose settings the develop engine rejects is skipped and counted the same way. fn history_steps( rows: &[Row], base: &Arc, @@ -1663,7 +1663,10 @@ fn history_steps( "" => "Lightroom step".to_string(), n => n.chars().take(120).collect(), }; - let mut settings = lcc_develop::apply_partial(base, &partial, 1.0); + let Ok(mut settings) = lcc_develop::try_apply_partial(base, &partial, 1.0) else { + skipped += 1; + continue; + }; crate::crs::keep_chosen_dcp(base, &mut settings); steps.push(lcc_catalog::HistoryStep { label, settings: Arc::new(settings), batch: None }); } @@ -1679,7 +1682,8 @@ fn history_steps( /// Lightroom's snapshots (named full settings tables) → Versions, in Lightroom's order (by /// `id_local`), each mapped onto `base` like the photo's current settings. A snapshot that can't -/// be read is skipped and counted; an unnamed one is called "Lightroom snapshot". +/// be read, or whose settings the develop engine rejects, is skipped and counted; an unnamed one is +/// called "Lightroom snapshot". fn snapshot_versions( rows: &[Row], base: &Arc, @@ -1700,13 +1704,30 @@ fn snapshot_versions( "" => "Lightroom snapshot".to_string(), n => n.chars().take(120).collect(), }; - let mut settings = lcc_develop::apply_partial(base, &partial, 1.0); + let Ok(mut settings) = lcc_develop::try_apply_partial(base, &partial, 1.0) else { + skipped += 1; + continue; + }; crate::crs::keep_chosen_dcp(base, &mut settings); versions.push(lcc_catalog::Version { name, created: now.to_string(), settings: Arc::new(settings), auto: false }); } (versions, skipped) } +/// A photo's mapped Lightroom settings (`mapped`, with the keys that didn't map) applied onto `base`. A partial the +/// develop engine rejects is an error like one that couldn't be mapped, so the photo is neither changed nor marked +/// edited, and the caller warns. +fn apply_mapped( + base: &Arc, + mapped: Result<(Value, Vec), String>, +) -> Result<(lcc_develop::DevelopSettings, Vec), String> { + let (partial, unknown) = mapped?; + let mut develop = lcc_develop::try_apply_partial(base, &partial, 1.0) + .map_err(|e| format!("the develop engine rejected them ({e}); imported without its edits"))?; + crate::crs::keep_chosen_dcp(base, &mut develop); + Ok((develop, unknown)) +} + fn mapped_settings( text: &str, target: crate::crs::Target, @@ -2330,10 +2351,8 @@ pub(crate) fn apply_prepared(s: &mut crate::Session, mut data: CatalogImport, co let target = crate::crs::Target::for_photo(&p); let aspect = p.width.max(1) as f64 / p.height.max(1) as f64; let base = p.develop.clone(); - match mapped_settings_from(&src.settings, src.as_shot_white, target, aspect, orientation, stored_aspect) { - Ok((partial, unknown)) => { - let mut develop = lcc_develop::apply_partial(&base, &partial, 1.0); - crate::crs::keep_chosen_dcp(&base, &mut develop); + match apply_mapped(&base, mapped_settings_from(&src.settings, src.as_shot_white, target, aspect, orientation, stored_aspect)) { + Ok((develop, unknown)) => { p.develop = Arc::new(develop); if touched.is_none() { untimed.push(src.source_id); @@ -2348,7 +2367,8 @@ pub(crate) fn apply_prepared(s: &mut crate::Session, mut data: CatalogImport, co } let (steps, skipped) = history_steps(&src.history, &base, &p.develop, |t| mapped_settings(t, target, aspect, orientation, stored_aspect)); if skipped > 0 { - warnings.push(format!("image {}: {skipped} Lightroom history step(s) could not be read; left out of History", src.source_id)); + warnings + .push(format!("image {}: {skipped} Lightroom history step(s) could not be read or applied; left out of History", src.source_id)); } if !steps.is_empty() { history_imported += steps.len(); @@ -2357,7 +2377,7 @@ pub(crate) fn apply_prepared(s: &mut crate::Session, mut data: CatalogImport, co let (versions, skipped) = snapshot_versions(&src.snapshots, &base, &now, |t| mapped_settings(t, target, aspect, orientation, stored_aspect)); if skipped > 0 { - warnings.push(format!("image {}: {skipped} Lightroom snapshot(s) could not be read; left out of Versions", src.source_id)); + warnings.push(format!("image {}: {skipped} Lightroom snapshot(s) could not be read or applied; left out of Versions", src.source_id)); } if !versions.is_empty() { snapshots_imported += versions.len(); @@ -3324,6 +3344,41 @@ pub(crate) mod tests { assert_eq!((versions.len(), skipped), (2, 0), "the same for snapshots"); } + /// A step or snapshot whose mapped settings the develop engine rejects is skipped and counted, not imported as a + /// copy of the base settings (FX-27). + #[test] + fn a_step_or_snapshot_the_develop_engine_rejects_is_skipped_and_counted() { + let base = Arc::new(lcc_develop::DevelopSettings::default()); + let map = + |t: &str| Ok((if t == "step 1" { json!({"light": {"exposure": "bright"}}) } else { json!({"light": {"exposure": 0.5}}) }, Vec::new())); + let rows: Vec = (0..3) + .map(|i| { + serde_json::from_value(json!({"id_local": i + 10, "name": format!("Step {i}"), "dateCreated": i as f64, "text": format!("step {i}")})) + .unwrap() + }) + .collect(); + let (steps, skipped) = history_steps(&rows, &base, &base, map); + let labels: Vec<&str> = steps.iter().map(|s| s.label.as_str()).collect(); + assert_eq!(skipped, 1); + assert!(!labels.contains(&"Step 1"), "{labels:?}"); + assert!(steps.iter().filter(|s| s.label.starts_with("Step")).all(|s| s.settings.light.exposure == 0.5), "{labels:?}"); + let (versions, skipped) = snapshot_versions(&rows, &base, "now", map); + assert_eq!((versions.len(), skipped), (2, 1)); + } + + /// The photo's own settings: a partial the develop engine rejects is an error naming why (so the import warns and + /// leaves the photo unedited), like one that couldn't be mapped; a good one applies and keeps its unmapped keys. + #[test] + fn settings_the_develop_engine_rejects_are_an_error_not_an_unchanged_edit() { + let base = Arc::new(lcc_develop::DevelopSettings::default()); + let rejected = apply_mapped(&base, Ok((json!({"light": {"exposure": "bright"}}), Vec::new()))); + assert!(rejected.as_ref().is_err_and(|e| e.contains("rejected")), "{rejected:?}"); + let unmapped = apply_mapped(&base, Err("no settings".into())); + assert_eq!(unmapped.err().as_deref(), Some("no settings")); + let (develop, unknown) = apply_mapped(&base, Ok((json!({"light": {"exposure": 0.5}}), vec!["Odd".into()]))).unwrap(); + assert_eq!((develop.light.exposure, unknown), (0.5, vec!["Odd".to_string()])); + } + /// A stream that inflates past the length its header declares is stopped there, not inflated up to 16 MiB first. #[test] fn a_stream_longer_than_its_declared_length_is_stopped_at_that_length() { diff --git a/crates/engine/src/tests_lightroom_history.rs b/crates/engine/src/tests_lightroom_history.rs index 3e2f223911..d31f5017bb 100644 --- a/crates/engine/src/tests_lightroom_history.rs +++ b/crates/engine/src/tests_lightroom_history.rs @@ -222,6 +222,6 @@ fn a_malformed_settings_blob_is_left_out_of_history_with_a_warning() { let warnings = warnings(&report); assert!(warnings.iter().any(|w| w.starts_with("image 1: history step 10: ")), "the reason names the step: {warnings:?}"); assert!(warnings.iter().any(|w| w.starts_with("image 1: snapshot 5: ")), "and the snapshot: {warnings:?}"); - assert!(warnings.iter().any(|w| w == "image 1: 1 Lightroom history step(s) could not be read; left out of History"), "{warnings:?}"); + assert!(warnings.iter().any(|w| w == "image 1: 1 Lightroom history step(s) could not be read or applied; left out of History"), "{warnings:?}"); assert!(warnings.iter().all(|w| !w.contains("kept in the archive")), "nothing claims an unreadable step was kept: {warnings:?}"); } diff --git a/docs/changelog/unreleased/2026-12-01-lightroom-history-limit-warned.md b/docs/changelog/unreleased/2026-12-01-lightroom-history-limit-warned.md new file mode 100644 index 0000000000..3db242ed38 --- /dev/null +++ b/docs/changelog/unreleased/2026-12-01-lightroom-history-limit-warned.md @@ -0,0 +1,2 @@ +## Library +- Lightroom catalog import no longer marks a photo edited when the develop engine rejects its mapped settings; it warns and leaves the photo unedited, and skips and counts a rejected history step or snapshot. diff --git a/docs/lightroom-catalog-import.md b/docs/lightroom-catalog-import.md index 1e6c9afb95..b02f7c0ee7 100644 --- a/docs/lightroom-catalog-import.md +++ b/docs/lightroom-catalog-import.md @@ -200,7 +200,9 @@ could not restore it), and a new virtual copy of it doesn't inherit it. Develop settings reuse the existing XMP/preset mapper. Supported sliders, curves and supported mask structures remain editable, but this is approximate rendering: Adobe AI models, some masking/retouch fields and process-version algorithms are not reproduced. Unmapped -fields are reported. The profile the person picked (the `Look` table's `Name` when there is one, else `CameraProfile`) selects the camera's Lightroom-matched calibrated look of that +fields are reported. Settings the develop engine rejects after mapping leave the photo unedited (not +marked edited) with a warning naming why; a history step or snapshot rejected that way is skipped and +counted like an unreadable one. The profile the person picked (the `Look` table's `Name` when there is one, else `CameraProfile`) selects the camera's Lightroom-matched calibrated look of that name (`profile.camera = "cal:"`, see [xmp-interop.md](xmp-interop.md)); a camera without one keeps its default colour, and a photo already on an imported `.dcp` keeps it. Lightroom's `ProcessVersion` is not mapped: newly imported photos are on the app's latest rendering process, and photos already in the library keep theirs diff --git a/docs/manual-site/src/content/docs/library/import-sources.mdx b/docs/manual-site/src/content/docs/library/import-sources.mdx index b3285e1f0a..49ebbbc606 100644 --- a/docs/manual-site/src/content/docs/library/import-sources.mdx +++ b/docs/manual-site/src/content/docs/library/import-sources.mdx @@ -25,6 +25,7 @@ import Shot from '../../../components/Shot.astro'; - From a Capture One catalog, each photo's exposure, brightness, Levels, curves (RGB, red, green, blue), crop, rotation and straighten angle, flips and white balance come across, and so do Highlight, Shadow and Saturation, converted to the app's sliders: Highlight only below zero and Shadow and Saturation in both directions (a positive Saturation on a raw becomes Vibrance), all approximate, each with a line in the result window. A raw whose Capture One film curve is one of your base curve files gets that curve as its base curve with the Built-in colour; the curve files are yours, in the base curve folder, and a missing one is named in the result window. A virtual copy starts from the camera defaults and carries only its own settings. The result window lists every other Capture One setting your photos use (Contrast, White, Black, Clarity, Structure, Color Editor, the luma curve, LCC, local adjustment layers, …) with how many photos use it; those photos keep the rest of their settings. White balance is an approximation; for raws the app edits on its relative white balance scale, the result window marks it as approximate, with the photo count. Importing the same catalog again keeps the settings of photos that have any; photos with only the camera's curve pick up a curve you have added since. - A failed import takes back the photos it added. - A record with a broken reference (no photo, or a file, folder or root that does not resolve) is skipped with a warning instead of landing on another photo. A record that can't be read at all (too large or damaged) is left out alone; the result window counts them per table, and the rest of the table imports. The photo behind such a record keeps only what its files say; a record lost from the photos, files or folders table leaves that photo out, and the result says photos may be missing. + - Lightroom settings the app can't apply leave the photo unedited, with a warning, instead of marking it edited with nothing changed. - The catalog's ratings, keywords, metadata and edits win over the photos' XMP sidecars. A sidecar that says something else (keywords added in another app, say) marks its photo with a metadata conflict badge and is counted in the result; **Read Metadata from File** takes the sidecar's values, **Save Metadata to File** writes the catalog's. Photos whose sidecar agrees start in step. This is for Lightroom catalogs: a Capture One import reads no sidecar, and the catalog is the only source. - There is no limit on the number of photos. The read may use three quarters of the memory free when it starts; a catalog that needs more stops with an error that says so, and nothing is imported. Close other apps and retry, or set `CHROMAFORGE_LIGHTROOM_IMPORT_MEMORY` to the GiB it may use. - A large catalog is saved in parts as it imports, still undone in one step. If the app stops partway, the photos already saved stay; importing the catalog again adds the rest (virtual copies saved before the stop may come in twice). diff --git a/docs/whats-new/2026-12-01-lightroom-history-limit-warned.md b/docs/whats-new/2026-12-01-lightroom-history-limit-warned.md new file mode 100644 index 0000000000..7e877ed7ef --- /dev/null +++ b/docs/whats-new/2026-12-01-lightroom-history-limit-warned.md @@ -0,0 +1,2 @@ +### Lightroom import says what it left out +- Lightroom settings the app can't apply now leave the photo unedited with a warning, instead of marking it edited with nothing changed; such a history step or snapshot is skipped and counted. From e5e644c1fb7983c70d42ed2023b39b2aa03a99dc Mon Sep 17 00:00:00 2001 From: Brian L Wong Date: Tue, 1 Dec 2026 11:09:38 -0500 Subject: [PATCH 17/26] FX-17: Lightroom import warns when History can't keep every step A photo with more Lightroom history steps than History keeps (HISTORY_LIMIT, 200, the final "Lightroom catalog" entry included) lost its oldest steps without a word, and the report's historySteps counted only what was kept. history_steps now returns how many it left out, and the import warns per photo: "History keeps the newest 200 steps; the oldest N Lightroom step(s) were left out". Tests: history_steps at limit-1, limit, limit+1 and limit+50 (count left out, newest kept), and the final entry taking a slot; an in-memory import at and past the limit (History, report count, warning text). The SQLite fixture writes one page per table, too small for 250 steps, hence in memory. Each fails with the count dropped. Manual: library/import-sources.mdx. Co-Authored-By: Claude Sonnet 5.5 --- crates/engine/src/lightroom_catalog.rs | 90 +++++++++++++++---- ...26-12-01-lightroom-history-limit-warned.md | 1 + docs/lightroom-catalog-import.md | 3 +- .../content/docs/library/import-sources.mdx | 2 +- ...26-12-01-lightroom-history-limit-warned.md | 1 + 5 files changed, 80 insertions(+), 17 deletions(-) diff --git a/crates/engine/src/lightroom_catalog.rs b/crates/engine/src/lightroom_catalog.rs index 63e98553ff..0dd25a1e81 100644 --- a/crates/engine/src/lightroom_catalog.rs +++ b/crates/engine/src/lightroom_catalog.rs @@ -1641,12 +1641,14 @@ pub(crate) fn ensure_read_active(cancel: &AtomicBool) -> Result<(), String> { /// counted. When the newest step doesn't match `current` (Lightroom records the state after the /// last step separately), a final "Lightroom catalog" entry holds it, so History ends where the /// photo is. A step whose settings the develop engine rejects is skipped and counted the same way. +/// Past [`lcc_catalog::HISTORY_LIMIT`] the oldest entries are left out; the third value counts them, +/// so the caller can say so (the report's `historySteps` counts only what was kept). fn history_steps( rows: &[Row], base: &Arc, current: &Arc, map: impl Fn(&str) -> Result<(Value, Vec), String>, -) -> (Vec, usize) { +) -> (Vec, usize, usize) { let rows: Vec<&Row> = rows.iter().filter(|r| !r.contains_key(OVER_DECODE_BUDGET)).collect(); let mut ordered: Vec<&Row> = rows.iter().copied().filter(|r| !text(r, "text").is_empty()).collect(); let skipped_empty = rows.len() - ordered.len(); @@ -1673,11 +1675,9 @@ fn history_steps( if !steps.is_empty() && steps.last().is_some_and(|l| l.settings != *current) { steps.push(lcc_catalog::HistoryStep { label: "Lightroom catalog".into(), settings: current.clone(), batch: None }); } - if steps.len() > lcc_catalog::HISTORY_LIMIT { - let n = steps.len() - lcc_catalog::HISTORY_LIMIT; - steps.drain(..n); - } - (steps, skipped) + let left_out = steps.len().saturating_sub(lcc_catalog::HISTORY_LIMIT); + steps.drain(..left_out); + (steps, skipped, left_out) } /// Lightroom's snapshots (named full settings tables) → Versions, in Lightroom's order (by @@ -2365,11 +2365,19 @@ pub(crate) fn apply_prepared(s: &mut crate::Session, mut data: CatalogImport, co } Err(e) => warnings.push(format!("image {} settings: {e}", src.source_id)), } - let (steps, skipped) = history_steps(&src.history, &base, &p.develop, |t| mapped_settings(t, target, aspect, orientation, stored_aspect)); + let (steps, skipped, left_out) = + history_steps(&src.history, &base, &p.develop, |t| mapped_settings(t, target, aspect, orientation, stored_aspect)); if skipped > 0 { warnings .push(format!("image {}: {skipped} Lightroom history step(s) could not be read or applied; left out of History", src.source_id)); } + if left_out > 0 { + warnings.push(format!( + "image {}: History keeps the newest {} steps; the oldest {left_out} Lightroom step(s) were left out", + src.source_id, + lcc_catalog::HISTORY_LIMIT + )); + } if !steps.is_empty() { history_imported += steps.len(); p.history = steps; @@ -3338,12 +3346,69 @@ pub(crate) mod tests { let steps = (1..=4).map(|id| fixture::history_step(id, 1, id as f64, "Step", Field::Blob(fixture::compressed(&big)))).collect(); let (rows, _) = steps_within_one_mib("history-budget-count", steps); let base = Arc::new(lcc_develop::DevelopSettings::default()); - let (history, skipped) = history_steps(&rows, &base, &base, |_| Ok((json!({}), Vec::new()))); + let (history, skipped, _) = history_steps(&rows, &base, &base, |_| Ok((json!({}), Vec::new()))); assert_eq!((history.len(), skipped), (2, 0), "the two steps within the budget import; the rest aren't unreadable"); let (versions, skipped) = snapshot_versions(&rows, &base, "now", |_| Ok((json!({}), Vec::new()))); assert_eq!((versions.len(), skipped), (2, 0), "the same for snapshots"); } + /// `n` readable history rows, oldest first, named `Step 0`.. + fn numbered_steps(n: usize) -> Vec { + (0..n) + .map(|i| { + serde_json::from_value(json!({"id_local": i + 10, "name": format!("Step {i}"), "dateCreated": i as f64, "text": format!("step {i}")})) + .unwrap() + }) + .collect() + } + + /// History keeps the newest `HISTORY_LIMIT` entries and counts the ones it leaves out, so the import can say so + /// (FX-17): at the limit nothing is left out, one past it leaves out exactly the oldest one. + #[test] + fn history_past_the_limit_is_counted_and_keeps_the_newest() { + let limit = lcc_catalog::HISTORY_LIMIT; + let base = Arc::new(lcc_develop::DevelopSettings::default()); + let same = |_: &str| Ok((json!({}), Vec::new())); + for (rows, kept, left_out) in [(limit - 1, limit - 1, 0), (limit, limit, 0), (limit + 1, limit, 1), (limit + 50, limit, 50)] { + let (steps, skipped, out) = history_steps(&numbered_steps(rows), &base, &base, same); + assert_eq!((steps.len(), skipped, out), (kept, 0, left_out), "{rows} rows"); + assert_eq!(steps.first().map(|s| s.label.clone()), Some(format!("Step {left_out}")), "the oldest go first ({rows} rows)"); + } + // the final "Lightroom catalog" entry takes a slot too, and is never the one left out + let current = Arc::new(lcc_develop::apply_partial(&base, &json!({"light": {"exposure": 1.0}}), 1.0)); + let (steps, _, out) = history_steps(&numbered_steps(limit), &base, ¤t, same); + assert_eq!((steps.len(), out), (limit, 1)); + assert_eq!(steps.last().map(|s| s.label.as_str()), Some("Lightroom catalog")); + } + + /// A photo with more Lightroom steps than History keeps imports the newest ones and says how many oldest ones were + /// left out; the report counts only what was kept. At exactly the limit nothing is left out or warned about (FX-17). + /// (In memory: the SQLite fixture writes one page per table, too small for 250 steps.) + #[test] + fn history_past_the_limit_is_reported_when_imported() { + let limit = lcc_catalog::HISTORY_LIMIT; + for (older, left_out) in [(limit - 1, 0), (limit + 49, 50)] { + let mut data = sample(); + data.photos.retain(|p| p.source_id == 1); + let current = data.photos[0].settings.clone(); + let mut history: Vec = (0..older) + .map(|i| row(json!({"id_local": i + 10, "name": format!("Step {i}"), "dateCreated": i as f64, "text": "s = { Exposure2012 = 0.5 }"}))) + .collect(); + history.push(row(json!({"id_local": 5000, "name": "Last", "dateCreated": 5000.0, "text": current}))); + data.photos[0].history = history; + let mut s = crate::Session::new(); + let r = apply(&mut s, data, false).unwrap(); + let photo = s.catalog.photo(PhotoId(r["mapping"]["1"].as_u64().unwrap())).unwrap(); + assert_eq!(photo.history.len(), limit, "{older} older steps: {r}"); + assert_eq!(photo.history.first().map(|h| h.label.clone()), Some(format!("Step {left_out}")), "the oldest go first"); + assert_eq!(photo.history.last().map(|h| h.label.as_str()), Some("Last"), "History still ends where the photo is"); + assert_eq!(r["historySteps"], json!(limit), "{r}"); + let warned: Vec<&str> = r["warnings"].as_array().unwrap().iter().filter_map(Value::as_str).filter(|w| w.contains("left out")).collect(); + let expected = format!("image 1: History keeps the newest {limit} steps; the oldest {left_out} Lightroom step(s) were left out"); + assert_eq!(warned, if left_out == 0 { vec![] } else { vec![expected.as_str()] }, "{r}"); + } + } + /// A step or snapshot whose mapped settings the develop engine rejects is skipped and counted, not imported as a /// copy of the base settings (FX-27). #[test] @@ -3351,13 +3416,8 @@ pub(crate) mod tests { let base = Arc::new(lcc_develop::DevelopSettings::default()); let map = |t: &str| Ok((if t == "step 1" { json!({"light": {"exposure": "bright"}}) } else { json!({"light": {"exposure": 0.5}}) }, Vec::new())); - let rows: Vec = (0..3) - .map(|i| { - serde_json::from_value(json!({"id_local": i + 10, "name": format!("Step {i}"), "dateCreated": i as f64, "text": format!("step {i}")})) - .unwrap() - }) - .collect(); - let (steps, skipped) = history_steps(&rows, &base, &base, map); + let rows = numbered_steps(3); + let (steps, skipped, _) = history_steps(&rows, &base, &base, map); let labels: Vec<&str> = steps.iter().map(|s| s.label.as_str()).collect(); assert_eq!(skipped, 1); assert!(!labels.contains(&"Step 1"), "{labels:?}"); diff --git a/docs/changelog/unreleased/2026-12-01-lightroom-history-limit-warned.md b/docs/changelog/unreleased/2026-12-01-lightroom-history-limit-warned.md index 3db242ed38..01201e1e07 100644 --- a/docs/changelog/unreleased/2026-12-01-lightroom-history-limit-warned.md +++ b/docs/changelog/unreleased/2026-12-01-lightroom-history-limit-warned.md @@ -1,2 +1,3 @@ ## Library +- Lightroom catalog import warns when a photo's history is longer than History keeps (200 steps) and says how many of the oldest steps were left out. - Lightroom catalog import no longer marks a photo edited when the develop engine rejects its mapped settings; it warns and leaves the photo unedited, and skips and counts a rejected history step or snapshot. diff --git a/docs/lightroom-catalog-import.md b/docs/lightroom-catalog-import.md index b02f7c0ee7..408782b945 100644 --- a/docs/lightroom-catalog-import.md +++ b/docs/lightroom-catalog-import.md @@ -256,7 +256,8 @@ Lightroom's develop history (`Adobe_libraryImageDevelopHistoryStep`) becomes the oldest first, each step named as in Lightroom and mapped like the current settings (so a step shows what the app can reproduce of it). When the newest step differs from the photo's settings, a final "Lightroom catalog" entry holds them, so History ends where the photo is. Steps that can't be read -are skipped with a warning; at most the newest 200 are kept. Lightroom 6 stores each step's +are skipped with a warning; at most the newest 200 are kept (the final "Lightroom catalog" entry +included), and a photo that had more gets a warning saying how many of its oldest steps were left out. Lightroom 6 stores each step's settings as text, Lightroom Classic 13 and later compressed (a 4-byte big-endian length, then zlib, as for XMP); both are read, and a compressed one that is damaged is skipped with a warning naming the step. The report counts them as diff --git a/docs/manual-site/src/content/docs/library/import-sources.mdx b/docs/manual-site/src/content/docs/library/import-sources.mdx index 49ebbbc606..a9332b887b 100644 --- a/docs/manual-site/src/content/docs/library/import-sources.mdx +++ b/docs/manual-site/src/content/docs/library/import-sources.mdx @@ -25,7 +25,7 @@ import Shot from '../../../components/Shot.astro'; - From a Capture One catalog, each photo's exposure, brightness, Levels, curves (RGB, red, green, blue), crop, rotation and straighten angle, flips and white balance come across, and so do Highlight, Shadow and Saturation, converted to the app's sliders: Highlight only below zero and Shadow and Saturation in both directions (a positive Saturation on a raw becomes Vibrance), all approximate, each with a line in the result window. A raw whose Capture One film curve is one of your base curve files gets that curve as its base curve with the Built-in colour; the curve files are yours, in the base curve folder, and a missing one is named in the result window. A virtual copy starts from the camera defaults and carries only its own settings. The result window lists every other Capture One setting your photos use (Contrast, White, Black, Clarity, Structure, Color Editor, the luma curve, LCC, local adjustment layers, …) with how many photos use it; those photos keep the rest of their settings. White balance is an approximation; for raws the app edits on its relative white balance scale, the result window marks it as approximate, with the photo count. Importing the same catalog again keeps the settings of photos that have any; photos with only the camera's curve pick up a curve you have added since. - A failed import takes back the photos it added. - A record with a broken reference (no photo, or a file, folder or root that does not resolve) is skipped with a warning instead of landing on another photo. A record that can't be read at all (too large or damaged) is left out alone; the result window counts them per table, and the rest of the table imports. The photo behind such a record keeps only what its files say; a record lost from the photos, files or folders table leaves that photo out, and the result says photos may be missing. - - Lightroom settings the app can't apply leave the photo unedited, with a warning, instead of marking it edited with nothing changed. + - A photo's Lightroom history becomes its **History**, up to the newest 200 steps; a photo with more gets a warning saying how many of its oldest steps were left out. Settings the app can't apply leave the photo unedited, with a warning, instead of marking it edited with nothing changed. - The catalog's ratings, keywords, metadata and edits win over the photos' XMP sidecars. A sidecar that says something else (keywords added in another app, say) marks its photo with a metadata conflict badge and is counted in the result; **Read Metadata from File** takes the sidecar's values, **Save Metadata to File** writes the catalog's. Photos whose sidecar agrees start in step. This is for Lightroom catalogs: a Capture One import reads no sidecar, and the catalog is the only source. - There is no limit on the number of photos. The read may use three quarters of the memory free when it starts; a catalog that needs more stops with an error that says so, and nothing is imported. Close other apps and retry, or set `CHROMAFORGE_LIGHTROOM_IMPORT_MEMORY` to the GiB it may use. - A large catalog is saved in parts as it imports, still undone in one step. If the app stops partway, the photos already saved stay; importing the catalog again adds the rest (virtual copies saved before the stop may come in twice). diff --git a/docs/whats-new/2026-12-01-lightroom-history-limit-warned.md b/docs/whats-new/2026-12-01-lightroom-history-limit-warned.md index 7e877ed7ef..8f2867fdb4 100644 --- a/docs/whats-new/2026-12-01-lightroom-history-limit-warned.md +++ b/docs/whats-new/2026-12-01-lightroom-history-limit-warned.md @@ -1,2 +1,3 @@ ### Lightroom import says what it left out +- A Lightroom photo with more than 200 history steps now gets a warning saying how many of its oldest steps were left out of History, instead of losing them silently. - Lightroom settings the app can't apply now leave the photo unedited with a warning, instead of marking it edited with nothing changed; such a history step or snapshot is skipped and counted. From 1b34f2c61f2cc3826c033cbbe21486d863947a87 Mon Sep 17 00:00:00 2001 From: Brian L Wong Date: Tue, 1 Dec 2026 11:03:17 -0500 Subject: [PATCH 18/26] FX-13: Update DNG and Immich sidecar push merge by the sidecar save's rules #1589 item 9. A sidecar save already removes an older full exif:DateTimeOriginal when the capture time is a year or a month alone (it would outrank photoshop:DateCreated on the next read), and removes the GPS tags still stating a position cleared in the app. Update DNG Preview & Metadata and Immich sidecar push merged through merge_packet, which used only the always-owned rules, so in the DNG's embedded XMP and in Immich's sidecar the old full date won again and the cleared position stayed. The rules now live in one place, sidecar::merge_save (GpsOnSave, the partial capture time, OWNED/OWNED_IF_STATED), used by the sidecar save and by the new SavePacket (the photo plus its packets with and without GPS), which Update DNG (Item.xmp) and Immich push (FullSidecar.save) merge through. merge_packet is gone; its tests use SavePacket::plain. Not covered here: the DNG's own Exif date and GPS IFD, which also outrank the XMP on read (FX-62, an open question in #1589). Tests: merge of a year-only date + cleared position (and a different position that stays, a full time that replaces), and Update DNG end to end. Both fail with the old rules put back, pass with the fix. Manual: library/library-tools.mdx (Update DNG), sync/immich.mdx (sidecars). Co-Authored-By: Claude Sonnet 5.5 --- crates/engine/src/cmd/immich_sidecars.rs | 5 +- crates/engine/src/dng_update.rs | 29 ++--- crates/engine/src/remote.rs | 4 +- crates/engine/src/sidecar.rs | 112 ++++++++++++++---- crates/engine/src/tests_dng_update.rs | 23 ++++ crates/engine/src/tests_xmp.rs | 4 +- ...-01-dng-immich-partial-date-cleared-gps.md | 2 + .../content/docs/library/library-tools.mdx | 2 +- .../src/content/docs/sync/immich.mdx | 2 +- ...-01-dng-immich-partial-date-cleared-gps.md | 2 + docs/xmp-interop.md | 3 +- 11 files changed, 134 insertions(+), 54 deletions(-) create mode 100644 docs/changelog/unreleased/2026-12-01-dng-immich-partial-date-cleared-gps.md create mode 100644 docs/whats-new/2026-12-01-dng-immich-partial-date-cleared-gps.md diff --git a/crates/engine/src/cmd/immich_sidecars.rs b/crates/engine/src/cmd/immich_sidecars.rs index 73f2ff35fe..38ed6f76a3 100644 --- a/crates/engine/src/cmd/immich_sidecars.rs +++ b/crates/engine/src/cmd/immich_sidecars.rs @@ -331,7 +331,7 @@ fn push(s: &mut Session, p: &Value) -> Result { ^ made.wrapping_mul(0x9E37_79B9_7F4A_7C15); match placeholder_png(seed) { Some(placeholder) => Some(FullSidecar { - packet: crate::sidecar::Packets::of(ph, &s.catalog).with_gps.into_bytes(), + save: crate::sidecar::SavePacket::of(ph, &s.catalog), placeholder, file_name: format!("cf-sidecar-{}-{made}.png", photo.0), device_asset_id: format!("cf-sidecar-{}-{seed:016x}", photo.0), @@ -563,8 +563,7 @@ fn replace_sidecar(c: &lcc_immich::Client, target: &str, full: &FullSidecar, err } None => String::new(), }; - let fresh = String::from_utf8(full.packet.clone()).map_err(|_| ImmichError::Protocol("the app's packet is not UTF-8 text".into()))?; - let merged = crate::sidecar::merge_packet(&existing, &fresh).map_err(ImmichError::Protocol)?; + let merged = full.save.merge_into(&existing).map_err(ImmichError::Protocol)?; let (temp, duplicate) = c.upload(&NewAsset { data: UploadData::Bytes(&full.placeholder), file_name: &full.file_name, diff --git a/crates/engine/src/dng_update.rs b/crates/engine/src/dng_update.rs index 05322487a7..fe8e93de9e 100644 --- a/crates/engine/src/dng_update.rs +++ b/crates/engine/src/dng_update.rs @@ -48,8 +48,8 @@ struct Item { export: Option, /// What the preview JPEG is encoded with. jpeg: ExportOptions, - /// The photo's XMP as the app writes it (merged with the packet in the file when it runs). - xmp: String, + /// The photo's XMP as the app writes it (merged with the packet in the file when it runs); `None` when skipped. + xmp: Option, skipped: Option, } @@ -134,15 +134,8 @@ pub fn prepare(s: &mut Session, p: &Value) -> Result { for id in ids { let ph = s.catalog.photo(id).ok_or_else(|| bad(format!("no photo {}", id.0)))?; let name = ph.file_name.clone(); - let skip = |why: String| Item { - id, - name: name.clone(), - path: String::new(), - export: None, - jpeg: jpeg.clone(), - xmp: String::new(), - skipped: Some(why), - }; + let skip = + |why: String| Item { id, name: name.clone(), path: String::new(), export: None, jpeg: jpeg.clone(), xmp: None, skipped: Some(why) }; // a virtual copy's edits live only in the catalog: its file is the master's, which must not get the copy's // metadata and render (every other writer of files refuses copies too) if ph.copy_of.is_some() { @@ -161,7 +154,7 @@ pub fn prepare(s: &mut Session, p: &Value) -> Result { continue; } seen.insert(path.clone(), id); - let xmp = crate::sidecar::sidecar_packet(ph, &s.catalog); + let xmp = Some(crate::sidecar::SavePacket::of(ph, &s.catalog)); let export = crate::export::prepare_export(s, id, &opts, 1).map_err(bad)?; items.push(Item { id, name, path, export: Some(export), jpeg: jpeg.clone(), xmp, skipped: None }); } @@ -201,14 +194,14 @@ impl UpdateJob { } } -/// Merge the app's packet into the one the file has: another writer's data in it stays; a packet that -/// cannot be read is a refusal, never a silent replacement. -fn merged_xmp(existing: Option>, fresh: &str) -> std::result::Result { +/// Merge the app's packet into the one the file has, by the rules a sidecar save follows: another writer's data in +/// it stays; a packet that cannot be read is a refusal, never a silent replacement. +fn merged_xmp(existing: Option>, fresh: &crate::sidecar::SavePacket) -> std::result::Result { match existing { - None => Ok(fresh.to_string()), + None => Ok(fresh.packets.with_gps.clone()), Some(bytes) => { let text = String::from_utf8(bytes).map_err(|_| "its embedded XMP is not text this can read".to_string())?; - crate::sidecar::merge_packet(&text, fresh).map_err(|e| format!("its embedded XMP could not be read ({e})")) + fresh.merge_into(&text).map_err(|e| format!("its embedded XMP could not be read ({e})")) } } } @@ -227,7 +220,7 @@ fn update_one(item: Item) -> std::result::Result { // refuse before rendering anything lcc_raw::dngupdate::check(&file).map_err(|e| e.to_string())?; let existing = lcc_raw::dngupdate::embedded_xmp(&file).map_err(|e| e.to_string())?; - let xmp = merged_xmp(existing, &item.xmp)?; + let xmp = merged_xmp(existing, item.xmp.as_ref().ok_or("no packet was prepared")?)?; let export = item.export.ok_or("no preview was prepared")?; let upright = export.run()?; #[cfg(test)] diff --git a/crates/engine/src/remote.rs b/crates/engine/src/remote.rs index e5cd43b4aa..9cfc5ba8f2 100644 --- a/crates/engine/src/remote.rs +++ b/crates/engine/src/remote.rs @@ -176,8 +176,8 @@ pub(crate) struct SidecarPush { /// source asset's sidecar can be copied onto it, then the source is removed). #[derive(Clone, Debug)] pub(crate) struct FullSidecar { - /// The app's XMP packet for the photo. - pub packet: Vec, + /// The app's XMP packets for the photo, merged into Immich's sidecar by the rules a sidecar save follows. + pub save: crate::sidecar::SavePacket, /// A unique placeholder image (never a user photo; deleted after the copy). pub placeholder: Vec, pub file_name: String, diff --git a/crates/engine/src/sidecar.rs b/crates/engine/src/sidecar.rs index c8fd0ef20d..0e04f05109 100644 --- a/crates/engine/src/sidecar.rs +++ b/crates/engine/src/sidecar.rs @@ -987,20 +987,54 @@ pub const OWNED: &[&str] = &[ /// writes (`xmp:CreatorTool`) goes only into new sidecars. pub const OWNED_IF_STATED: &[&str] = &["exif:DateTimeOriginal", "photoshop:DateCreated", "exif:GPSLatitude", "exif:GPSLongitude"]; -/// Merge the app's fresh packet (`fresh`) into an XMP packet another writer produced (`existing`) -/// the way a sidecar save does: the app's properties ([`OWNED`], [`OWNED_IF_STATED`]) replace -/// theirs, everything else — another editor's `crs:` settings, history, unknown namespaces — is -/// kept. An empty `existing` takes `fresh`; an unreadable one is an error, never a silent -/// replacement (the caller leaves the other side as it is). -/// -/// Used by IMM-SIDECARS to fill Immich's sidecar with the app's metadata and develop settings -/// without dropping what Immich or another writer already had. -pub fn merge_packet(existing: &str, fresh: &str) -> std::result::Result { - if existing.trim().is_empty() { - return Ok(fresh.to_string()); - } - let rules = lcc_meta::MergeRules { owned: OWNED, owned_if_present: OWNED_IF_STATED }; - lcc_meta::merge_xmp(existing, fresh, rules).map_err(|e| e.to_string()) +/// The app's side of a merge into an XMP packet another writer produced: the photo (whose capture time and cleared +/// position decide the rules) and its fresh packets. Update DNG Metadata and Immich sidecar sync merge through it, so +/// they follow the same rules as a sidecar save ([`merge_save`]): a year-only capture time removes the file's older +/// full `exif:DateTimeOriginal`, and a position cleared here removes the GPS tags still stating it (FX-13). +#[derive(Clone, Debug)] +pub(crate) struct SavePacket { + pub(crate) photo: Arc, + pub(crate) packets: Packets, +} + +impl SavePacket { + pub(crate) fn of(p: &Arc, cat: &lcc_catalog::Catalog) -> SavePacket { + SavePacket { photo: p.clone(), packets: Packets::of(p, cat) } + } + + /// The packet to write over `existing`: the app's properties ([`OWNED`], [`OWNED_IF_STATED`] and the photo's own + /// rules) replace theirs, everything else — another editor's `crs:` settings, history, unknown namespaces — is + /// kept. An empty `existing` takes the whole fresh packet; an unreadable one is an error, never a silent + /// replacement (the caller leaves the other side as it is). + pub(crate) fn merge_into(&self, existing: &str) -> std::result::Result { + if existing.trim().is_empty() { + return Ok(self.packets.with_gps.clone()); + } + merge_save(existing, &self.photo, &self.packets).map_err(|e| e.to_string()) + } + + /// `fresh` as both packets of a photo with a full capture time and no position cleared: only the always-owned + /// rules apply. + #[cfg(test)] + pub(crate) fn plain(fresh: &str) -> SavePacket { + let photo = + Photo::new(lcc_catalog::PhotoId(1), lcc_catalog::Source::File { path: "/x/a.jpg".into() }, "a.jpg", "JPEG", 1, 1, "2026-01-01T00:00:00"); + SavePacket { photo: Arc::new(photo), packets: Packets { with_gps: fresh.into(), without_gps: fresh.into() } } + } +} + +/// The one set of rules for writing photo `p`'s packets over a packet another writer made (`old`): the app's +/// properties replace theirs; a position the sidecar already states the same stays in its own form, and one cleared +/// here goes ([`GpsOnSave`]); a capture time of a year or a month alone is stated in `photoshop:DateCreated` only, so +/// an `exif:DateTimeOriginal` already there (an earlier full time) is removed rather than left to outrank it on the +/// next read. Sidecar saves, Update DNG Metadata and Immich sidecar sync all merge through this. +fn merge_save(old: &str, p: &Photo, packets: &Packets) -> std::result::Result { + let gps = GpsOnSave::of(p, old); + let partial_capture = p.captured.as_deref().and_then(lcc_catalog::dates::partial_capture).is_some(); + let owned: Vec<&str> = OWNED.iter().chain(gps.owned_tags()).copied().chain(partial_capture.then_some("exif:DateTimeOriginal")).collect(); + let rules = lcc_meta::MergeRules { owned: &owned, owned_if_present: OWNED_IF_STATED }; + let fresh = if gps.write() { &packets.with_gps } else { &packets.without_gps }; + lcc_meta::merge_xmp(old, fresh, rules) } /// Write `data` to `path` atomically: a temp file next to it, synced, then renamed over it. @@ -1096,6 +1130,7 @@ fn sidecar_contents(path: &Path, p: &Photo, cat: &lcc_catalog::Catalog, stamp: & /// A photo's fresh packets: the whole one, and the one without its GPS position (merged into a sidecar that already /// states that position, or one cleared here). Made from the catalog, so a background write needs no catalog. +#[derive(Clone, Debug)] pub(crate) struct Packets { pub(crate) with_gps: String, pub(crate) without_gps: String, @@ -1107,9 +1142,7 @@ impl Packets { } } -/// [`sidecar_contents`] from the photo's packets already made. A capture time of a year or a month alone is stated -/// in `photoshop:DateCreated` only, so an `exif:DateTimeOriginal` already there (an earlier full time) is removed -/// rather than left to outrank it on the next read. +/// [`sidecar_contents`] from the photo's packets already made, merged by [`merge_save`]. fn merged_contents(path: &Path, p: &Photo, packets: &Packets, stamp: &str) -> std::io::Result<(String, bool, Option)> { let bytes = match read_capped(path, SIDECAR_READ_MAX) { Ok(b) => b, @@ -1122,12 +1155,7 @@ fn merged_contents(path: &Path, p: &Photo, packets: &Packets, stamp: &str) -> st } let why = match std::str::from_utf8(&bytes) { Ok(old) => { - let gps = GpsOnSave::of(p, old); - let partial_capture = p.captured.as_deref().and_then(lcc_catalog::dates::partial_capture).is_some(); - let owned: Vec<&str> = OWNED.iter().chain(gps.owned_tags()).copied().chain(partial_capture.then_some("exif:DateTimeOriginal")).collect(); - let rules = lcc_meta::MergeRules { owned: &owned, owned_if_present: OWNED_IF_STATED }; - let fresh = if gps.write() { &packets.with_gps } else { &packets.without_gps }; - match lcc_meta::merge_xmp(old, fresh, rules) { + match merge_save(old, p, packets) { Ok(merged) => return Ok((merged, true, None)), // a readable sidecar whose merge fails (e.g. the merged packet exceeds the XMP limits), or one // that is valid but over the parser's complexity limits: fail the save and keep the file as it @@ -2884,7 +2912,7 @@ mod jpeg_header_tests { 5{{"version":1}}"#, lcc_meta::LC_NS ); - let out = super::merge_packet(existing, &fresh).unwrap(); + let out = super::SavePacket::plain(&fresh).merge_into(existing).unwrap(); let d = lcc_meta::parse_xmp(&out).unwrap(); assert_eq!(d.metadata.rating, Some(5), "ours replaces theirs"); assert_eq!(d.metadata.caption.as_deref(), Some("From the catalog")); @@ -2892,7 +2920,39 @@ mod jpeg_header_tests { assert!(out.contains("other:Secret='keep me'"), "unknown namespaces stay:\n{out}"); assert!(d.lc_settings.is_some(), "the develop settings are there"); // an empty sidecar takes the fresh packet; an unreadable one is refused, not replaced - assert_eq!(super::merge_packet("", &fresh).unwrap(), fresh); - assert!(super::merge_packet(" + +"#; + let stated = lcc_meta::parse_xmp(old).unwrap().metadata.gps.map(|g| (g.latitude, g.longitude)).unwrap(); + let mut p = Photo::new(PhotoId(1), Source::File { path: "/x/IMG_1.dng".into() }, "IMG_1.dng", "DNG", 4, 3, "2026-01-01T00:00:00"); + p.captured = Some("1974".into()); + p.meta.gps_removed = Some(stated); + let cat = lcc_catalog::Catalog::default(); + let save = |p: &Photo| super::SavePacket::of(&Arc::new(p.clone()), &cat).merge_into(old).unwrap(); + let merged = save(&p); + let props = lcc_meta::parse_xmp(&merged).unwrap().properties; + assert_eq!(props.get("photoshop:DateCreated"), Some(&vec!["1974".to_string()]), "{merged}"); + assert_eq!(props.get("exif:DateTimeOriginal"), None, "the older full time is gone: {merged}"); + assert_eq!(lcc_meta::parse_xmp(&merged).unwrap().metadata.gps, None, "the cleared position is gone: {merged}"); + assert!(merged.contains("precious"), "another writer's data stays: {merged}"); + // a position another app wrote after the clear stays, as a full capture time replaces theirs + p.meta.gps_removed = Some((stated.0 + 1.0, stated.1)); + p.captured = Some("1983-04-12T10:00:00".into()); + let merged = save(&p); + let props = lcc_meta::parse_xmp(&merged).unwrap().properties; + assert_eq!(props.get("exif:DateTimeOriginal"), Some(&vec!["1983-04-12T10:00:00".to_string()]), "{merged}"); + assert!(lcc_meta::parse_xmp(&merged).unwrap().metadata.gps.is_some(), "{merged}"); } } diff --git a/crates/engine/src/tests_dng_update.rs b/crates/engine/src/tests_dng_update.rs index bb9dd3153c..4797fa7020 100644 --- a/crates/engine/src/tests_dng_update.rs +++ b/crates/engine/src/tests_dng_update.rs @@ -364,3 +364,26 @@ fn a_photo_that_is_not_a_dng_is_skipped_and_left_alone() { assert_ne!(std::fs::read(&dng_file).unwrap(), dng, "the DNG was rewritten"); let _ = std::fs::remove_dir_all(&dir); } + +/// Update DNG Metadata merges by the sidecar save's rules (FX-13): after the capture time is set to a year alone and +/// the position cleared, the file's XMP no longer states the older full time or the cleared position, which would +/// otherwise win on the next read. (The DNG's own Exif date and GPS IFD are a separate question, FX-62.) +#[test] +fn a_year_only_date_and_a_cleared_position_reach_the_dngs_xmp() { + let xmp = r#" + "#; + let (mut s, _dir, file) = with_dng("dng-update-partial-date", &synthetic_dng_with(Some(xmp), lcc_meta::Metadata::default())); + let id = s.catalog.photos().next().unwrap().id; + assert!(s.catalog.photo(id).unwrap().meta.gps.is_some(), "the position was read from the file"); + s.execute("library.select", &json!({"ids": [id.0]})).unwrap(); + s.execute("photo.setCaptureTime", &json!({"time": "1974"})).unwrap(); + s.execute("photo.setMeta", &json!({"gps": null})).unwrap(); + let r = s.execute("photo.updateDngPreview", &json!({})).unwrap(); + assert_eq!(r["updated"].as_array().map(Vec::len), Some(1), "{r}"); + let after = xmp_of(&std::fs::read(&file).unwrap()); + let read = lcc_meta::parse_xmp(&after).unwrap(); + assert_eq!(read.properties.get("photoshop:DateCreated"), Some(&vec!["1974".to_string()]), "{after}"); + assert_eq!(read.properties.get("exif:DateTimeOriginal"), None, "the older full time is gone: {after}"); + assert_eq!(read.metadata.gps, None, "the cleared position is gone: {after}"); +} diff --git a/crates/engine/src/tests_xmp.rs b/crates/engine/src/tests_xmp.rs index ea2241a2e1..400566bcff 100644 --- a/crates/engine/src/tests_xmp.rs +++ b/crates/engine/src/tests_xmp.rs @@ -2767,10 +2767,10 @@ fn a_save_replaces_the_plugin_fields_in_an_existing_sidecar() { let meta = lcc_meta::Metadata::default(); let old = lcc_meta::write_xmp_filters(&meta, &[], &[("plug", "k", "old-value")], &[], &[]); let new = lcc_meta::write_xmp_filters(&meta, &[], &[("plug", "k", "new-value")], &[], &[]); - let merged = crate::sidecar::merge_packet(&old, &new).unwrap(); + let merged = crate::sidecar::SavePacket::plain(&new).merge_into(&old).unwrap(); assert!(merged.contains("new-value") && !merged.contains("old-value"), "{merged}"); // and a field the app no longer has is removed let none = lcc_meta::write_xmp_filters(&meta, &[], &[], &[], &[]); - let cleared = crate::sidecar::merge_packet(&old, &none).unwrap(); + let cleared = crate::sidecar::SavePacket::plain(&none).merge_into(&old).unwrap(); assert!(!cleared.contains("old-value"), "{cleared}"); } diff --git a/docs/changelog/unreleased/2026-12-01-dng-immich-partial-date-cleared-gps.md b/docs/changelog/unreleased/2026-12-01-dng-immich-partial-date-cleared-gps.md new file mode 100644 index 0000000000..c3b798a16b --- /dev/null +++ b/docs/changelog/unreleased/2026-12-01-dng-immich-partial-date-cleared-gps.md @@ -0,0 +1,2 @@ +## Metadata +- Update DNG Preview & Metadata and Immich sidecar push merge by the sidecar save's rules: a year- or month-only capture time removes the older full `exif:DateTimeOriginal`, and a position cleared in the app removes the GPS tags still stating it. diff --git a/docs/manual-site/src/content/docs/library/library-tools.mdx b/docs/manual-site/src/content/docs/library/library-tools.mdx index 510613c06b..ed12dc0571 100644 --- a/docs/manual-site/src/content/docs/library/library-tools.mdx +++ b/docs/manual-site/src/content/docs/library/library-tools.mdx @@ -11,7 +11,7 @@ import { Aside } from '@astrojs/starlight/components'; - **Validate DNG Files** (**Library** menu): checks the selected DNGs' raw data against the checksum they carry, in the background, and lists the damaged and unverifiable files. DNGs the app writes carry that checksum. - **Exported badge**: photos that were exported show a badge in the grid. **Photo ▸ Reset Export Status** clears it for the selection (one undo step). -- **Update DNG Preview & Metadata** (**Metadata** menu): writes a JPEG preview of the current edit and the current XMP into the selected DNGs. The camera's own previews are kept; the app shows the new one (the photo as edited) wherever it is large enough, and the camera's larger one only where a bigger picture is needed. The raw data is left byte for byte as it was. The preview is stored the way the raw is, so on a photo taken with the camera turned it shows upright wherever the file's orientation is applied. Afterwards the library records the new file's size and content, so Find Missing and duplicate checks still match it. The new file replaces the DNG only once it reads back from the disk exactly as written; otherwise (a failing drive or network volume) the DNG is left as it was and the photo is reported failed. A DNG another program changed, moved or deleted while its preview was being made is left alone too. When the new preview and XMP fit where the old ones were, the file keeps its size; otherwise they are added at the end, and the space of what they replace is blanked, so nothing you removed (a location, a keyword) stays in the file. BigTIFF DNGs work too. Adobe-written and unrecognised DNGs are refused, and so is a DNG that says it holds more data than the file has (a copy cut short). A virtual copy is skipped (its file is its master's: update the master), and a file is updated once however many photos in the selection point at it. +- **Update DNG Preview & Metadata** (**Metadata** menu): writes a JPEG preview of the current edit and the current XMP into the selected DNGs. The camera's own previews are kept; the app shows the new one (the photo as edited) wherever it is large enough, and the camera's larger one only where a bigger picture is needed. The raw data is left byte for byte as it was. The preview is stored the way the raw is, so on a photo taken with the camera turned it shows upright wherever the file's orientation is applied. Afterwards the library records the new file's size and content, so Find Missing and duplicate checks still match it. The new file replaces the DNG only once it reads back from the disk exactly as written; otherwise (a failing drive or network volume) the DNG is left as it was and the photo is reported failed. A DNG another program changed, moved or deleted while its preview was being made is left alone too. The XMP is merged into the one the DNG already has by the rules of a sidecar save: what other programs wrote stays, a capture time set to a year or a month alone replaces the file's older full one, and a position you cleared is removed. When the new preview and XMP fit where the old ones were, the file keeps its size; otherwise they are added at the end, and the space of what they replace is blanked, so nothing you removed (a location, a keyword) stays in the file. BigTIFF DNGs work too. Adobe-written and unrecognised DNGs are refused, and so is a DNG that says it holds more data than the file has (a copy cut short). A virtual copy is skipped (its file is its master's: update the master), and a file is updated once however many photos in the selection point at it. - **Email Photo…** (**File** menu): exports the selection as small JPEGs (you choose the long edge and quality) and opens a new message with them attached in the system mail program. Without one, the files stay in a temporary folder that is shown. - **Review Comments** (**Library** menu): the comments on photos published to Immich or to a plug-in service that has comments, per photo; see [Immich](../../sync/immich/). Not supported by Hard Drive or SFTP publishing. - **Find Duplicates…**: see [Find duplicates](../duplicates/). diff --git a/docs/manual-site/src/content/docs/sync/immich.mdx b/docs/manual-site/src/content/docs/sync/immich.mdx index 9ac1722855..6eb890a196 100644 --- a/docs/manual-site/src/content/docs/sync/immich.mdx +++ b/docs/manual-site/src/content/docs/sync/immich.mdx @@ -35,7 +35,7 @@ The account card shows **Sync Now**, **Import…**, **Choose Albums…** (with a - **Stacks** and Edit In versions: a saved Edit In version is uploaded and stacked on the original. - **People and smart search**: import Immich's faces and names, push names back; search Immich's index (smart, text in image, description, place) and show the result as a collection. - **External libraries**: when Immich indexes the same folders, nothing is uploaded; photos link by path through a path-mapping table. -- **XMP sidecars**: Push and Pull sidecars so two libraries can share one server. +- **XMP sidecars**: Push and Pull sidecars so two libraries can share one server. A push merges into the sidecar Immich already has by the rules of a sidecar save: what other programs wrote stays, a capture time set to a year or a month alone replaces the older full one, and a position you cleared is removed. - **Publish**: an Immich publish service sends a collection to the Immich album of the same name (rendered, original or both), checked by checksum so nothing is stored twice. A shared link can be made for a published gallery. - Long runs show in the activity stack; linking, importing and downloading an original can be stopped there. - A download is kept only once it is whole. A secure connection that ends without the server closing it properly (a flaky network, a proxy cutting the stream) fails the download, and nothing is saved in its place; run it again. diff --git a/docs/whats-new/2026-12-01-dng-immich-partial-date-cleared-gps.md b/docs/whats-new/2026-12-01-dng-immich-partial-date-cleared-gps.md new file mode 100644 index 0000000000..d3f440c74e --- /dev/null +++ b/docs/whats-new/2026-12-01-dng-immich-partial-date-cleared-gps.md @@ -0,0 +1,2 @@ +### Update DNG and Immich keep a year-only date and a cleared position +- Update DNG Preview & Metadata and Immich sidecar push now merge the way a sidecar save does: a capture time set to a year or a month alone replaces the file's older full one instead of being outranked by it on the next read, and a position you cleared is removed from the file. diff --git a/docs/xmp-interop.md b/docs/xmp-interop.md index 15f7736e71..49616f1a2a 100644 --- a/docs/xmp-interop.md +++ b/docs/xmp-interop.md @@ -114,7 +114,8 @@ the only copy of those edits outside that application's catalog. Saving never dr already states (to within about a centimetre) is kept as written there, in its own precision: GPS is rewritten only when it was changed in the app. A position cleared in the app is removed from the sidecar (latitude, longitude and altitude) while the sidecar still states that same position; a different one, written by another application since, - stays. + stays. Update DNG Preview & Metadata (into the DNG's embedded XMP) and Immich sidecar sync (into Immich's sidecar) + merge by these same rules. - **Everything else is kept byte for byte**: other namespaces (`crs:`, `xmpMM:`, `lr:hierarchicalSubject`, unknown ones), `xmp:CreatorTool`, comments, the packet wrapper and padding. The app's properties go into one `rdf:Description` of their own; owned properties written by another application (in attribute or element form) are From 1f3875f2ee36a5056369d12f92785e510a6881ec Mon Sep 17 00:00:00 2001 From: Brian L Wong Date: Tue, 1 Dec 2026 11:30:40 -0500 Subject: [PATCH 19/26] FX-185: export never writes at a missing original's path The originals guard refused a new file only when it had a sidecar's name (check_new). Exporting `{name}` in the original's format into the folder of a catalogued original that is missing wrote the render at the catalogued path, which the library then read as that photo's original (edits applied to developed pixels; a later Original export copying the render). OriginalGuard::check_new now refuses any new file named like a catalogued original or its sidecar in that file's folder (folders by identity, or by path when one is not there yet). OriginalGuard::claims tells the export's placement such a name is taken, so Add number moves on, Skip skips, and Overwrite refuses it, as for an original that is there. Session::check_write_target (presets, keywords, mask effects) looks such a name up too; its fast path for an ordinary free name stays. Not covered: originals catalogued while a long batch runs (a watched folder or auto-import into the destination). The guard is a snapshot taken when the batch starts; protecting those needs the guard to see the catalog live, a question in the umbrella issue. Test: a second photo of the same name exported as `{name}` into the folder of the first, whose file is gone, under Overwrite (refused, with the reason), Add number (IMG_1-2) and Skip (skipped); check_write_target refuses the path. It fails with check_new back to sidecar names only. Manual: output/export-location.mdx. Co-Authored-By: Claude Sonnet 5.5 --- crates/engine/src/export.rs | 5 ++- crates/engine/src/originals.rs | 39 ++++++++++++++----- crates/engine/src/tests_export.rs | 36 +++++++++++++++++ ...6-12-01-export-originals-guard-sidecars.md | 2 + .../content/docs/output/export-location.mdx | 2 +- ...6-12-01-export-originals-guard-sidecars.md | 2 + 6 files changed, 75 insertions(+), 11 deletions(-) create mode 100644 docs/changelog/unreleased/2026-12-01-export-originals-guard-sidecars.md create mode 100644 docs/whats-new/2026-12-01-export-originals-guard-sidecars.md diff --git a/crates/engine/src/export.rs b/crates/engine/src/export.rs index 161bc68819..95fcd42554 100644 --- a/crates/engine/src/export.rs +++ b/crates/engine/src/export.rs @@ -4318,7 +4318,10 @@ impl<'a> Placer<'a> { // names found taken only when this photo was written to them (a file that appeared after // `exists` looked): never replaced under Unique and Skip, see `write_new` below let appeared = std::cell::RefCell::new(std::collections::HashSet::::new()); - let busy = |main: &str| group(main).iter().any(|p| taken.contains(p) || appeared.borrow().contains(p) || exists(p)); + // (a name the guard would refuse, a missing original's or its sidecar's, is taken too: FX-185) + let busy = |main: &str| { + group(main).iter().any(|p| taken.contains(p) || appeared.borrow().contains(p) || exists(p) || guard.claims(std::path::Path::new(p))) + }; let unique = || { // keep the requested folder and basename, split as the sidecars' names are let (folder, stem, ext) = split_file_name(&requested); diff --git a/crates/engine/src/originals.rs b/crates/engine/src/originals.rs index a51157418c..194a188e03 100644 --- a/crates/engine/src/originals.rs +++ b/crates/engine/src/originals.rs @@ -137,19 +137,35 @@ impl OriginalGuard { } /// A new file with a sidecar's name in that sidecar's folder would be read back as the - /// photo's edits. The folders are compared by identity, so `sub/../` or a link counts. + /// photo's edits; one at the path of an original that is missing would be read as that photo + /// (a render in place of its raw, FX-185). The folders are compared by identity, so `sub/../` or + /// a link counts; a folder that isn't there yet (the original's folder went with it) by its path. fn check_new(&self, target: &Path) -> Result<(), String> { - if !is_xmp(target) { - return Ok(()); - } let Some(name) = target.file_name().map(|n| n.to_string_lossy().to_lowercase()) else { return Ok(()) }; for (p, what) in self.by_name.get(&name).into_iter().flatten() { - if same_file(folder_of(p), folder_of(target)) { + if same_folder(folder_of(p), folder_of(target)) { return Err(format!("{} would become {what} in the library (choose another folder or file name)", target.display())); } } Ok(()) } + + /// Whether a file written at `target`, where nothing is now, would become a catalogued photo's + /// original or sidecar ([`OriginalGuard::check`] refuses it). Exports count such a name as taken, + /// so Unique moves past it and Skip skips it, as for an original that is there. + pub fn claims(&self, target: &Path) -> bool { + std::fs::symlink_metadata(target).is_err() && self.check_new(target).is_err() + } +} + +/// Whether folders `a` and `b` are the same: by identity when both are there, by path when one is +/// missing (a missing original's folder may be created by the write itself). +fn same_folder(a: &Path, b: &Path) -> bool { + if a.exists() && b.exists() { + return same_file(a, b); + } + let norm = |p: &Path| p.components().filter(|c| *c != std::path::Component::CurDir).collect::(); + norm(a) == norm(b) } fn is_xmp(path: &Path) -> bool { @@ -179,14 +195,19 @@ impl crate::Session { } /// `Err` when writing `path` would replace a catalogued photo's original or sidecar, or - /// create one of its sidecars. A free path that isn't an `.xmp` (the usual case) is answered - /// without building the guard over the whole library. + /// create one of its sidecars or a missing original. A free path that isn't an `.xmp` and that + /// no photo's original is named (the usual case) is answered without building the guard over + /// the whole library. pub fn check_write_target(&self, path: &str) -> Result<(), String> { let path = Path::new(path); if std::fs::symlink_metadata(path).is_err() { unresolvable_dot_dot(path)?; - if !is_xmp(path) { - return Ok(()); // nothing there to replace, and no sidecar to create + let name = path.file_name().map(|n| n.to_string_lossy().to_lowercase()); + let an_originals_name = |n: &str| { + self.catalog.photos().any(|p| matches!(&p.source, Source::File { path } if Path::new(path).file_name().is_some_and(|f| f.to_string_lossy().to_lowercase() == n))) + }; + if !is_xmp(path) && !name.as_deref().is_some_and(an_originals_name) { + return Ok(()); // nothing there to replace, and no sidecar or missing original to create } } self.original_guard().check(path) diff --git a/crates/engine/src/tests_export.rs b/crates/engine/src/tests_export.rs index d827c87983..18f1cae9fc 100644 --- a/crates/engine/src/tests_export.rs +++ b/crates/engine/src/tests_export.rs @@ -659,6 +659,42 @@ fn export_never_overwrites_an_original() { let _ = std::fs::remove_dir_all(&dir); } +/// FX-185: a catalogued original that is missing keeps its path. A render exported there in the original's format +/// would be read back as the photo's original (edits applied twice, a later Original export copying the render): +/// Overwrite refuses it, Unique moves past it and Skip skips it, as for an original that is there. +#[test] +fn an_export_never_recreates_a_missing_original() { + use crate::export::{Conflict, Destination}; + for conflict in [Conflict::Overwrite, Conflict::Unique, Conflict::Skip] { + let (mut s, _, dir, src, _) = library_with_jpeg(&format!("export-missing-original-{conflict:?}")); + let img = lcc_raster::Rgba8::from_fn(40, 30, |x, y| [200, (x * 6) as u8, (y * 8) as u8, 255]); + let bytes = crate::export::encode_image(&img, &ExportOptions::default()).unwrap(); + // another photo of the same name, exported as `{name}` into the folder of the first, whose file is gone + let other = dir.join("elsewhere"); + std::fs::create_dir_all(&other).unwrap(); + std::fs::write(other.join("IMG_1.jpg"), &bytes).unwrap(); + s.execute("library.import", &json!({"paths": [other.join("IMG_1.jpg").to_string_lossy()]})).unwrap(); + let id = s.catalog.photos().find(|p| matches!(&p.source, lcc_catalog::Source::File { path } if path.contains("elsewhere"))).unwrap().id; + std::fs::remove_file(&src).unwrap(); + let o = ExportOptions { naming: "{name}".into(), conflict, ..Default::default() }; + let to = Destination { dir: dir.to_string_lossy().into(), exact: None, ..Default::default() }; + let r = disk_batch(&mut s, id, &o, &to); + assert!(!src.exists(), "{conflict:?}: nothing was written at the missing original's path; result {r:?}"); + match conflict { + Conflict::Overwrite => { + let error = r.err().unwrap_or_default(); + assert!(error.contains("would become the original of IMG_1.jpg"), "{error}"); + } + Conflict::Unique => assert!(dir.join("IMG_1-2.jpg").exists(), "{r:?}"), + Conflict::Skip => assert!(r.unwrap()[0]["skipped"].is_string()), + } + // the same through the check every other writer of files uses + assert!(s.check_write_target(&src.to_string_lossy()).is_err(), "{conflict:?}"); + assert!(s.check_write_target(&dir.join("IMG_2.jpg").to_string_lossy()).is_ok()); + let _ = std::fs::remove_dir_all(&dir); + } +} + /// #1635: `/missing/../IMG_1.jpg` names the original once the writer creates `missing`, but while `missing` is /// not there the guard saw a free path and the rename replaced the original. Every way of reaching it (an exact /// path, or `dir` with `{name}`; Overwrite or Unique) leaves the original alone. Upstream db4a4e2b5 refused this diff --git a/docs/changelog/unreleased/2026-12-01-export-originals-guard-sidecars.md b/docs/changelog/unreleased/2026-12-01-export-originals-guard-sidecars.md new file mode 100644 index 0000000000..b7d839c330 --- /dev/null +++ b/docs/changelog/unreleased/2026-12-01-export-originals-guard-sidecars.md @@ -0,0 +1,2 @@ +## Fixes +- Export never writes at the path of a catalogued original that is missing (it would be read back as that photo): Add number moves on, Skip skips, Overwrite refuses. diff --git a/docs/manual-site/src/content/docs/output/export-location.mdx b/docs/manual-site/src/content/docs/output/export-location.mdx index 1ccec50511..864af5f71c 100644 --- a/docs/manual-site/src/content/docs/output/export-location.mdx +++ b/docs/manual-site/src/content/docs/output/export-location.mdx @@ -11,7 +11,7 @@ import { Aside } from '@astrojs/starlight/components'; - **Export to**: **Choose folder later** (default; asks when the export starts), **Specific folder**, or **Same folder as original photo**. - **Subfolder**: one folder name inside the destination. `..`, path separators, a leading or trailing dot or space, and Windows-reserved names and characters are refused. A destination whose `..` leads back to an original is refused too. - **If file exists**: **Add number** (-2, -3…), **Overwrite** or **Skip**. A file and its sidecars follow the same rule. **Add number** and **Skip** never replace a file, also not one that appears in the folder while the export runs (another export, a sync app): the photo then takes the next number, or is skipped. -- A catalogued original is never overwritten, whatever the policy. +- A catalogued original is never overwritten, whatever the policy. Nor is its place taken while its file is missing: a photo exported there under the same name would be read back as that photo, so **Add number** moves on to the next number, **Skip** skips it, and **Overwrite** refuses it. - **Overwrite** replaces files from before the export, never one the same export just wrote: when two photos would get one name, the second gets a number. Names that differ only in upper and lower case, or in how an accent is stored, count as one name, as most disks (macOS, Windows, memory cards, network shares) treat them. ## File Naming diff --git a/docs/whats-new/2026-12-01-export-originals-guard-sidecars.md b/docs/whats-new/2026-12-01-export-originals-guard-sidecars.md new file mode 100644 index 0000000000..0e070a6fb2 --- /dev/null +++ b/docs/whats-new/2026-12-01-export-originals-guard-sidecars.md @@ -0,0 +1,2 @@ +### Export keeps out of other files' places +- Exporting under a name whose original is catalogued but missing no longer writes a render where the library expects that photo's original: Add number moves on, Skip skips, Overwrite refuses. From 5013619fd375f46facb8542e7fa3c969fefe88a2 Mon Sep 17 00:00:00 2001 From: Brian L Wong Date: Tue, 1 Dec 2026 11:30:56 -0500 Subject: [PATCH 20/26] FX-183: an Original export's sidecar never replaces another program's An Original export writes its edits in a stem-named sidecar (`IMG_1.xmp`). Under Overwrite, exporting `IMG_1.jpg` into a folder holding another program's uncatalogued `IMG_1.NEF` and its `IMG_1.xmp` replaced that sidecar (the other program's edits), although `IMG_1.jpg` itself was never there; the originals guard covers only catalogued files. Overwrite replaces an earlier export. A sidecar name that is there while the exported file is not, beside another file of its stem (any case, not an .xmp), is that file's sidecar, which an earlier export of this one would not have left: the export takes the next number whose file and sidecars are free or are its own earlier pair, so a later Overwrite replaces that one instead of adding -3, -4. A sidecar with no file of its stem beside it is still replaced, as issue #93 asked (its test is unchanged). A folder that can't be listed answers as before. Test: IMG_1.NEF + IMG_1.xmp in the folder; two Overwrite runs both write IMG_1-2.jpg/.xmp and leave the other program's sidecar alone; with IMG_1.jpg there, Overwrite replaces it as before. Fails with the rule removed. Manual: output/export-location.mdx. Co-Authored-By: Claude Sonnet 5.5 --- crates/engine/src/export.rs | 30 ++++++++++++++++-- crates/engine/src/tests_export.rs | 31 +++++++++++++++++++ ...6-12-01-export-originals-guard-sidecars.md | 1 + .../content/docs/output/export-location.mdx | 2 +- ...6-12-01-export-originals-guard-sidecars.md | 1 + 5 files changed, 62 insertions(+), 3 deletions(-) diff --git a/crates/engine/src/export.rs b/crates/engine/src/export.rs index 95fcd42554..02766d70a9 100644 --- a/crates/engine/src/export.rs +++ b/crates/engine/src/export.rs @@ -3496,6 +3496,19 @@ fn write_with(path: &str, bytes: &[u8], durable: bool) -> Result<(), String> { if durable { write_atomic(p, bytes) } else { write_atomic_nosync(p, bytes) }.map_err(|e| format!("{path}: {e}")) } +/// Whether the folder of the exported file `main` holds another file of its stem (any case, not an `.xmp`): `IMG_1.NEF` +/// beside `IMG_1.jpg`. A folder that can't be listed (not a local one) answers no. +fn another_file_of_its_stem(main: &str) -> bool { + let (folder, stem, _) = split_file_name(main); + let own = &main[folder.len()..]; + let Ok(listing) = std::fs::read_dir(if folder.is_empty() { "." } else { folder }) else { return false }; + listing.flatten().any(|e| { + let name = e.file_name().to_string_lossy().to_string(); + let (_, their_stem, ext) = split_file_name(&name); + their_stem.eq_ignore_ascii_case(stem) && !name.eq_ignore_ascii_case(own) && !ext.is_some_and(|x| x.eq_ignore_ascii_case("xmp")) + }) +} + /// The path of the sidecar with extension `ext` of the exported file `main`. fn sidecar_path(main: &str, ext: &str) -> String { let (folder, stem, _) = split_file_name(main); @@ -4322,11 +4335,21 @@ impl<'a> Placer<'a> { let busy = |main: &str| { group(main).iter().any(|p| taken.contains(p) || appeared.borrow().contains(p) || exists(p) || guard.claims(std::path::Path::new(p))) }; - let unique = || { + // the first of `stem-2`, `stem-3`… that `ok` accepts + let next_name = |ok: &dyn Fn(&str) -> bool| { // keep the requested folder and basename, split as the sidecars' names are let (folder, stem, ext) = split_file_name(&requested); let name = |n: usize| ext.map_or_else(|| format!("{folder}{stem}-{n}"), |x| format!("{folder}{stem}-{n}.{x}")); - (2..1_000_000).map(name).find(|p| !busy(p)).ok_or_else(|| format!("{requested}: no free file name")) + (2..1_000_000).map(name).find(|p| ok(p)).ok_or_else(|| format!("{requested}: no free file name")) + }; + let unique = || next_name(&|p| !busy(p)); + // Overwrite replaces an earlier export: a sidecar name that is there while the file it goes with isn't, beside + // another file of that stem (another program's `IMG_1.NEF` and its `IMG_1.xmp`), is that file's sidecar, which + // an earlier export of this one would not have left, so it is not Overwrite's to replace (FX-183). A sidecar + // with no file of its stem beside it is replaced, as asked (issue #93). + let replaceable = |main: &str| { + let theirs = !exists(main) && group(main).iter().skip(1).any(|p| exists(p)) && another_file_of_its_stem(main); + !theirs && !group(main).iter().any(|p| taken.contains(p) || appeared.borrow().contains(p) || guard.claims(std::path::Path::new(p))) }; let path = if let Err(err) = refused { Err(err) @@ -4337,6 +4360,9 @@ impl<'a> Placer<'a> { // Overwrite replaces files from earlier runs, never another photo of this // same batch: a name already written by this batch gets the next free one Conflict::Overwrite if group(&requested).iter().any(|p| taken.contains(p)) => unique(), + Conflict::Overwrite if !replaceable(&requested) && !group(&requested).iter().any(|p| guard.claims(std::path::Path::new(p))) => { + next_name(&replaceable) + } Conflict::Overwrite => Ok(requested.clone()), Conflict::Skip => { self.out.push(json!({"photo": photo.0, "skipped": requested})); diff --git a/crates/engine/src/tests_export.rs b/crates/engine/src/tests_export.rs index 18f1cae9fc..dfd849ebd1 100644 --- a/crates/engine/src/tests_export.rs +++ b/crates/engine/src/tests_export.rs @@ -659,6 +659,37 @@ fn export_never_overwrites_an_original() { let _ = std::fs::remove_dir_all(&dir); } +/// FX-183: an Original export's stem-named sidecar (`IMG_1.xmp`) never replaces another program's sidecar of that stem +/// under Overwrite. With `IMG_1.NEF` and its `IMG_1.xmp` in the folder but no `IMG_1.jpg`, the export goes to the next +/// name; a second Overwrite run replaces that earlier export of its own (file and sidecar both there), not a third name. +/// (A sidecar with no file of its stem beside it is still replaced: `explicit_export_paths_follow_the_conflict_policy`.) +#[test] +fn an_original_export_never_takes_over_another_programs_sidecar() { + use crate::export::{Conflict, Destination}; + let (mut s, id, dir, src, original) = library_with_jpeg("export-foreign-sidecar"); + let out = dir.join("out"); + std::fs::create_dir_all(&out).unwrap(); + std::fs::write(out.join("IMG_1.NEF"), b"another program's raw").unwrap(); + std::fs::write(out.join("IMG_1.xmp"), b"another program's edits").unwrap(); + let to = Destination { dir: out.to_string_lossy().into(), exact: None, ..Default::default() }; + let o = ExportOptions { format: ExportFormat::Original, naming: "{name}".into(), conflict: Conflict::Overwrite, ..Default::default() }; + for run in 1..=2 { + let files = disk_batch(&mut s, id, &o, &to).unwrap(); + assert!(files[0]["path"].as_str().is_some_and(|p| p.ends_with("IMG_1-2.jpg")), "run {run}: {files:?}"); + assert_eq!(std::fs::read(out.join("IMG_1.xmp")).unwrap(), b"another program's edits", "run {run}"); + assert_eq!(std::fs::read(out.join("IMG_1-2.jpg")).unwrap(), original, "run {run}"); + assert!(out.join("IMG_1-2.xmp").exists(), "run {run}: the export's own sidecar"); + assert!(!out.join("IMG_1-3.jpg").exists(), "run {run}: Overwrite replaced its own earlier export"); + } + // a pair this export left (file and sidecar both there) is Overwrite's to replace, as before + std::fs::write(out.join("IMG_1.jpg"), b"an earlier export").unwrap(); + let files = disk_batch(&mut s, id, &o, &to).unwrap(); + assert!(files[0]["path"].as_str().is_some_and(|p| p.ends_with("IMG_1.jpg")), "{files:?}"); + assert_eq!(std::fs::read(out.join("IMG_1.jpg")).unwrap(), original); + assert_eq!(std::fs::read(&src).unwrap(), original); + let _ = std::fs::remove_dir_all(&dir); +} + /// FX-185: a catalogued original that is missing keeps its path. A render exported there in the original's format /// would be read back as the photo's original (edits applied twice, a later Original export copying the render): /// Overwrite refuses it, Unique moves past it and Skip skips it, as for an original that is there. diff --git a/docs/changelog/unreleased/2026-12-01-export-originals-guard-sidecars.md b/docs/changelog/unreleased/2026-12-01-export-originals-guard-sidecars.md index b7d839c330..02c67ab108 100644 --- a/docs/changelog/unreleased/2026-12-01-export-originals-guard-sidecars.md +++ b/docs/changelog/unreleased/2026-12-01-export-originals-guard-sidecars.md @@ -1,2 +1,3 @@ ## Fixes - Export never writes at the path of a catalogued original that is missing (it would be read back as that photo): Add number moves on, Skip skips, Overwrite refuses. +- An Original export under Overwrite no longer replaces another program's stem-named sidecar when that program's file of the same name is in the folder; it takes the next number. diff --git a/docs/manual-site/src/content/docs/output/export-location.mdx b/docs/manual-site/src/content/docs/output/export-location.mdx index 864af5f71c..e4b1102f40 100644 --- a/docs/manual-site/src/content/docs/output/export-location.mdx +++ b/docs/manual-site/src/content/docs/output/export-location.mdx @@ -12,7 +12,7 @@ import { Aside } from '@astrojs/starlight/components'; - **Subfolder**: one folder name inside the destination. `..`, path separators, a leading or trailing dot or space, and Windows-reserved names and characters are refused. A destination whose `..` leads back to an original is refused too. - **If file exists**: **Add number** (-2, -3…), **Overwrite** or **Skip**. A file and its sidecars follow the same rule. **Add number** and **Skip** never replace a file, also not one that appears in the folder while the export runs (another export, a sync app): the photo then takes the next number, or is skipped. - A catalogued original is never overwritten, whatever the policy. Nor is its place taken while its file is missing: a photo exported there under the same name would be read back as that photo, so **Add number** moves on to the next number, **Skip** skips it, and **Overwrite** refuses it. -- **Overwrite** replaces files from before the export, never one the same export just wrote: when two photos would get one name, the second gets a number. Names that differ only in upper and lower case, or in how an accent is stored, count as one name, as most disks (macOS, Windows, memory cards, network shares) treat them. +- **Overwrite** replaces files from before the export, never one the same export just wrote: when two photos would get one name, the second gets a number. An **Original** export's sidecar (`IMG_1.xmp`) never replaces another program's: when the folder holds another file of that name (`IMG_1.NEF`) with its sidecar but not the exported file, the export takes the next number, and a later Overwrite replaces that one. Names that differ only in upper and lower case, or in how an accent is stored, count as one name, as most disks (macOS, Windows, memory cards, network shares) treat them. ## File Naming - **Template** menu: Filename, Filename - Sequence, Custom Name - Sequence, Custom Name, Date - Filename. diff --git a/docs/whats-new/2026-12-01-export-originals-guard-sidecars.md b/docs/whats-new/2026-12-01-export-originals-guard-sidecars.md index 0e070a6fb2..e2e715c541 100644 --- a/docs/whats-new/2026-12-01-export-originals-guard-sidecars.md +++ b/docs/whats-new/2026-12-01-export-originals-guard-sidecars.md @@ -1,2 +1,3 @@ ### Export keeps out of other files' places - Exporting under a name whose original is catalogued but missing no longer writes a render where the library expects that photo's original: Add number moves on, Skip skips, Overwrite refuses. +- An Original export under Overwrite no longer replaces another program's sidecar (`IMG_1.xmp` beside its `IMG_1.NEF`); it takes the next number. From 45f3739ad410a02504ad4e82c98b306f37ff7a6b Mon Sep 17 00:00:00 2001 From: Brian L Wong Date: Tue, 1 Dec 2026 11:34:48 -0500 Subject: [PATCH 21/26] FX-184: export presets fail closed on unreadable privacy settings The `.lrtemplate` importer left `metadata` at All for an embeddedMetadataOption its table doesn't know (reported only as "metadata `x`", without saying All applies), and dropped a removeLocationMetadata that was neither on nor off without a note. The lenient ExportOptions::from_json, which reads stored presets, the last export and dialog prefill, turned an unknown `metadata` into All and a non-boolean `removeLocation` into false. Now the privacy keys fail closed. Importer: an unknown or unreadable metadata option becomes `none`; an unreadable removeLocationMetadata or removeFaceMetadata becomes on; each is named in the import report with what applies. from_json: a `metadata` that is there but not a known policy is None, a non-boolean `removeLocation` / `removePersonInfo` is true; absent or null keeps the default, as before. from_params (which refuses all of these) is unchanged. Test: unknown and non-string metadata options, unreadable remove-location and remove-person-info, known and absent values, through the importer and from_json. It fails with either reader as it was. Manual: output/export-presets.mdx. Co-Authored-By: Claude Sonnet 5.5 --- crates/engine/src/cmd/export_preset_files.rs | 26 ++++++++-- crates/engine/src/export.rs | 25 ++++++++-- crates/engine/src/tests_preset_interop.rs | 49 +++++++++++++++++++ ...12-01-export-preset-privacy-fail-closed.md | 2 + .../content/docs/output/export-presets.mdx | 2 +- ...12-01-export-preset-privacy-fail-closed.md | 3 ++ 6 files changed, 98 insertions(+), 9 deletions(-) create mode 100644 docs/changelog/unreleased/2026-12-01-export-preset-privacy-fail-closed.md create mode 100644 docs/whats-new/2026-12-01-export-preset-privacy-fail-closed.md diff --git a/crates/engine/src/cmd/export_preset_files.rs b/crates/engine/src/cmd/export_preset_files.rs index e8b46296d2..42b2e71b7a 100644 --- a/crates/engine/src/cmd/export_preset_files.rs +++ b/crates/engine/src/cmd/export_preset_files.rs @@ -476,7 +476,15 @@ pub fn lr_export_params(v: &Lua) -> (Map, Vec) { Some("none") => { o.insert("metadata".into(), json!("none")); } - Some(other) => unmapped.push(format!("metadata `{other}`")), + // an option this table doesn't know fails closed: nothing is embedded, and the report says so (FX-184) + Some(other) => { + o.insert("metadata".into(), json!("none")); + unmapped.push(format!("metadata `{other}` (not known: no metadata is embedded; choose a setting in the Export dialog)")); + } + None if lget(v, "embeddedMetadataOption").is_some() => { + o.insert("metadata".into(), json!("none")); + unmapped.push("metadata (not readable: no metadata is embedded; choose a setting in the Export dialog)".into()); + } None => {} } if lbool(v, "minimizeEmbeddedMetadata") == Some(true) @@ -484,8 +492,16 @@ pub fn lr_export_params(v: &Lua) -> (Map, Vec) { { o.insert("metadata".into(), json!("copyright")); } - if let Some(b) = lbool(v, "removeLocationMetadata") { - o.insert("removeLocation".into(), json!(b)); + match lbool(v, "removeLocationMetadata") { + Some(b) => { + o.insert("removeLocation".into(), json!(b)); + } + // stated but not readable as on or off: location is removed, and the report says so (FX-184) + None if lget(v, "removeLocationMetadata").is_some() => { + o.insert("removeLocation".into(), json!(true)); + unmapped.push("remove location info (not readable as on or off: location is removed)".into()); + } + None => {} } // ---- what the app can't do (reported when it is on) if lbool(v, "useWatermark") == Some(true) { @@ -511,6 +527,10 @@ pub fn lr_export_params(v: &Lua) -> (Map, Vec) { o.insert("removePersonInfo".into(), json!(true)); } Some(false) => unmapped.push("person info (face regions are never written)".into()), + None if lget(v, "removeFaceMetadata").is_some() => { + o.insert("removePersonInfo".into(), json!(true)); + unmapped.push("remove person info (not readable as on or off: person info is removed)".into()); + } None => {} } if lbool(v, "includeVideoFiles") == Some(false) || lstr(v, "export_videoFileHandling").is_some_and(|s| s.eq_ignore_ascii_case("exclude")) { diff --git a/crates/engine/src/export.rs b/crates/engine/src/export.rs index 161bc68819..b749bd99f9 100644 --- a/crates/engine/src/export.rs +++ b/crates/engine/src/export.rs @@ -1129,6 +1129,14 @@ fn whole(v: &serde_json::Value) -> Option { /// A `watermark` object as a [`Watermark`]; a legacy `inset` fills whichever of `insetX` and /// `insetY` is missing. +/// A privacy switch read leniently: absent or null is `default`, a boolean is itself, anything else is on (FX-184). +fn fail_closed_bool(v: Option<&serde_json::Value>, default: bool) -> bool { + match v { + None | Some(serde_json::Value::Null) => default, + Some(v) => v.as_bool().unwrap_or(true), + } +} + fn watermark_from_json(v: &serde_json::Value) -> serde_json::Result { let mut v = v.clone(); if let Some(o) = v.as_object_mut() @@ -1462,8 +1470,9 @@ impl ExportOptions { /// `dontEnlarge` (default true). /// /// Lenient: anything unknown or unreadable falls back to the default, which suits stored - /// prefs and dialog prefill. A command that is about to export uses - /// [`ExportOptions::from_params`], which validates first. + /// prefs and dialog prefill, except the privacy keys (`metadata`, `removeLocation`, + /// `removePersonInfo`), which fall back to embedding nothing and removing. A command that is + /// about to export uses [`ExportOptions::from_params`], which validates first. pub fn from_json(p: &serde_json::Value) -> Self { use serde_json::Value; let d = Self::default(); @@ -1497,9 +1506,15 @@ impl ExportOptions { conflict: s("conflict").and_then(Conflict::parse).unwrap_or(d.conflict), tiff_compression: s("tiffCompression").and_then(tiff_compression).unwrap_or(d.tiff_compression), dng_compression: enm(p, "dngCompression").unwrap_or(d.dng_compression), - metadata: s("metadata").and_then(MetadataPolicy::parse).unwrap_or(d.metadata), - remove_location: p.get("removeLocation").and_then(Value::as_bool).unwrap_or(d.remove_location), - remove_person_info: p.get("removePersonInfo").and_then(Value::as_bool).unwrap_or(d.remove_person_info), + // the privacy keys fail closed: a value that is there but can't be read (a newer build's, one edited by + // hand) embeds nothing and removes, rather than falling back to everything (FX-184); absent or null + // keeps the default + metadata: match p.get("metadata").filter(|v| !v.is_null()) { + None => d.metadata, + Some(v) => v.as_str().and_then(MetadataPolicy::parse).unwrap_or(MetadataPolicy::None), + }, + remove_location: fail_closed_bool(p.get("removeLocation"), d.remove_location), + remove_person_info: fail_closed_bool(p.get("removePersonInfo"), d.remove_person_info), watermark: match p.get("watermark") { Some(Value::String(t)) => Some(Watermark { text: t.clone(), ..Default::default() }), Some(v @ Value::Object(_)) => watermark_from_json(v).ok(), diff --git a/crates/engine/src/tests_preset_interop.rs b/crates/engine/src/tests_preset_interop.rs index 659f3cfac2..a7e4f5fb9b 100644 --- a/crates/engine/src/tests_preset_interop.rs +++ b/crates/engine/src/tests_preset_interop.rs @@ -573,3 +573,52 @@ fn free_names_give_what_free_name_gives() { taken.push(want); } } + +/// FX-184: the privacy options fail closed. A Lightroom preset's metadata option this table doesn't know (or can't +/// read), or a "remove location" / "remove person info" that is neither on nor off, embeds nothing and removes, and +/// the import report says what applies; before, the unknown option left everything embedded and an unreadable switch +/// was dropped without a word. The lenient reader of stored presets and prefs does the same; absent keeps the default. +#[test] +fn unreadable_privacy_options_fail_closed() { + use crate::cmd::export_preset_files::lr_export_params; + use crate::export::{ExportOptions, MetadataPolicy}; + let lua = |body: &str| { + crate::preset_import::parse_lua(&format!("s = {{ value = {{ format = \"JPEG\", {body} }} }}")).unwrap().get("value").unwrap().clone() + }; + for body in [r#"embeddedMetadataOption = "everythingNew""#, "embeddedMetadataOption = 3"] { + let (p, unmapped) = lr_export_params(&lua(body)); + assert_eq!(p.get("metadata"), Some(&json!("none")), "{body}"); + assert!(unmapped.iter().any(|u| u.starts_with("metadata") && u.contains("no metadata is embedded")), "{body}: {unmapped:?}"); + } + let (p, unmapped) = lr_export_params(&lua(r#"embeddedMetadataOption = "copyrightOnly""#)); + assert_eq!((p.get("metadata"), unmapped.iter().any(|u| u.starts_with("metadata"))), (Some(&json!("copyright")), false), "a known one maps"); + let (p, _) = lr_export_params(&lua("")); + assert_eq!(p.get("metadata"), None, "absent: the default"); + for (key, param) in [("removeLocationMetadata", "removeLocation"), ("removeFaceMetadata", "removePersonInfo")] { + let (p, unmapped) = lr_export_params(&lua(&format!(r#"{key} = "maybe""#))); + assert_eq!(p.get(param), Some(&json!(true)), "{key}"); + assert!(unmapped.iter().any(|u| u.contains("not readable as on or off")), "{key}: {unmapped:?}"); + let (p, _) = lr_export_params(&lua(&format!("{key} = true"))); + assert_eq!(p.get(param), Some(&json!(true)), "{key}"); + let (p, unmapped) = lr_export_params(&lua("")); + assert_eq!(p.get(param), None, "{key} absent"); + assert!(!unmapped.iter().any(|u| u.contains("not readable")), "{unmapped:?}"); + } + let (p, _) = lr_export_params(&lua("removeLocationMetadata = false")); + assert_eq!(p.get("removeLocation"), Some(&json!(false))); + + // the lenient reader (stored presets, last export, dialog prefill) + let read = |v: serde_json::Value| ExportOptions::from_json(&v); + for bad in [json!("everythingNew"), json!(7), json!({"x": 1})] { + assert_eq!(read(json!({"metadata": bad})).metadata, MetadataPolicy::None, "{bad}"); + } + assert_eq!(read(json!({"metadata": "copyright"})).metadata, MetadataPolicy::Copyright); + assert_eq!(read(json!({})).metadata, MetadataPolicy::All, "absent: the default"); + assert_eq!(read(json!({"metadata": null})).metadata, MetadataPolicy::All, "null: the default"); + for bad in [json!("yes"), json!(0), json!([])] { + let o = read(json!({"removeLocation": bad, "removePersonInfo": bad})); + assert!(o.remove_location && o.remove_person_info, "{bad}"); + } + let o = read(json!({"removeLocation": false, "removePersonInfo": null})); + assert!(!o.remove_location && !o.remove_person_info); +} diff --git a/docs/changelog/unreleased/2026-12-01-export-preset-privacy-fail-closed.md b/docs/changelog/unreleased/2026-12-01-export-preset-privacy-fail-closed.md new file mode 100644 index 0000000000..481e82d2f5 --- /dev/null +++ b/docs/changelog/unreleased/2026-12-01-export-preset-privacy-fail-closed.md @@ -0,0 +1,2 @@ +## Fixes +- Export presets fail closed on privacy: an unknown Lightroom `embeddedMetadataOption` imports as no metadata (it was All) and an unreadable `removeLocationMetadata` / `removeFaceMetadata` as removed (it was dropped), each named in the import report; stored presets and prefs read the same way. diff --git a/docs/manual-site/src/content/docs/output/export-presets.mdx b/docs/manual-site/src/content/docs/output/export-presets.mdx index 9dbeaea14d..d1d3a0a5d9 100644 --- a/docs/manual-site/src/content/docs/output/export-presets.mdx +++ b/docs/manual-site/src/content/docs/output/export-presets.mdx @@ -11,7 +11,7 @@ import NeedsImage from '../../../components/NeedsImage.astro'; - **Preset column** (left of the Export sheet): built-ins plus your own; **Add**, **Remove**, **Rename**, **Import…**, **Export…**. - Built-ins: JPEG (Small) 2048 px, JPEG (Large) full size, Original + Settings, DNG, Instagram Feed 1080 px, Instagram Story / Reel 1920 px, Web / Portfolio 2048 px (copyright-only metadata), Full Resolution Master (P3). - A preset keeps format, quality, size limit, sizing, sharpening, naming, folder and subfolder, metadata and watermark. -- Share presets as `.lcexport` files; Lightroom Classic export `.lrtemplate` files import too (settings without a counterpart are listed in a report). +- Share presets as `.lcexport` files; Lightroom Classic export `.lrtemplate` files import too (settings without a counterpart are listed in a report). A metadata option the app doesn't know, or a "remove location" or "remove person info" that is neither on nor off, imports as the private choice (no metadata, removed), and the report says so; check it in the Export dialog. - One import adds at most 10,000 export presets, from all its files and zips together; the report names each file whose presets were left out. A preset whose name is taken is added as `Name (2)`, `Name (3)`…, unless one of that name has the same settings. - **File ▸ Export with Preset ▸ …**: exports at once with a saved preset, no sheet. - **File ▸ More Exports ▸ Export with Several Presets…**: tick several presets and export the selection with all of them in one run, each to its own folder (if a ticked preset names no folder you are asked for one, and only those presets use it). The run never writes a file over another of its own: presets that share a folder and a file name, or photos that get the same name, get numbered names. Each photo is read once for every preset; the run is one row in the activity stack, and ✕ stops it between photos (files already written stay). Presets that add to Apple Photos run on their own. Scripts: `export.runPresets {presetIds, fallbackDir?}` (`fallbackDir`: the folder for presets that name none; `dir` puts every preset's files in one folder). diff --git a/docs/whats-new/2026-12-01-export-preset-privacy-fail-closed.md b/docs/whats-new/2026-12-01-export-preset-privacy-fail-closed.md new file mode 100644 index 0000000000..13736221e3 --- /dev/null +++ b/docs/whats-new/2026-12-01-export-preset-privacy-fail-closed.md @@ -0,0 +1,3 @@ +### Export presets keep private what they can't read +- A Lightroom export preset whose metadata option the app doesn't know, or whose "remove location" / "remove person info" is neither on nor off, now imports as no metadata and removed, with a note in the import report, instead of embedding everything. +- A saved preset or last-export setting with an unreadable metadata or privacy value opens the same way, not as "All". From 5f56bdea5b8fe09aff9e8724911dfdabc09b9aff Mon Sep 17 00:00:00 2001 From: Brian L Wong Date: Tue, 1 Dec 2026 11:39:13 -0500 Subject: [PATCH 22/26] FX-243: a waiting export takes the privacy choices made while it waited An export queued behind another (the "Waiting to export" row) refreshed only the originals guard when it started. Everything privacy-related was fixed when it was prepared: a render's metadata (keywords and their export flags, location removal for private places), and an Original's or DNG's packet, location removal, cleared position and private places. A location marked private, a position cleared or a keyword set not to export while the export waited still went out. PreparedExport::refresh_privacy takes those decisions again from the library as it is now; the queue calls it next to use_guard. Work::File keeps the options it was prepared with (each item its own, also in a batch of several presets) and a refusal: a video clip's original that must now lose its location is refused when it runs, as prepare refuses it. A photo removed from the library meanwhile keeps what it was prepared with. Test: a render, an Original copy and an untouched render prepared while nothing is private; a private place and a keyword set not to export are added; after the refresh the render carries neither and the copy is refused, while the untouched one shows what was written before. It fails with the refresh a no-op. Manual: output/export.mdx. Co-Authored-By: Claude Sonnet 5.5 --- crates/engine/src/export.rs | 66 +++++++++++++++++-- crates/engine/src/tests_export.rs | 37 +++++++++++ crates/ui-egui/src/export_task.rs | 2 + .../2026-12-01-waiting-export-privacy.md | 2 + .../src/content/docs/output/export.mdx | 2 +- .../2026-12-01-waiting-export-privacy.md | 2 + 6 files changed, 104 insertions(+), 7 deletions(-) create mode 100644 docs/changelog/unreleased/2026-12-01-waiting-export-privacy.md create mode 100644 docs/whats-new/2026-12-01-waiting-export-privacy.md diff --git a/crates/engine/src/export.rs b/crates/engine/src/export.rs index 161bc68819..f7f04b07fe 100644 --- a/crates/engine/src/export.rs +++ b/crates/engine/src/export.rs @@ -2566,6 +2566,11 @@ enum Work { size: (usize, usize), /// The photo's camera-profile choice (`profile.camera`): a DNG carries the colour the photo renders with. camera: String, + /// The options it was prepared with, to take the privacy decisions again when a waiting export starts + /// ([`PreparedExport::refresh_privacy`]). + opts: Box, + /// Why it can no longer be written (set by [`PreparedExport::refresh_privacy`]): reported when it runs. + refusal: Option, }, } @@ -2689,11 +2694,8 @@ fn prepare_as( }; // a movie's location can sit in places no reader here checks in full (QuickTime and // Matroska tags, a camera's GPS track): its file is never copied when it must not carry one - if p.video.is_some() && (removes_location(p, &session.catalog, o) || p.meta.gps_removed.is_some()) { - return Err(format!( - "{}: can't remove the location from a video clip's original file; export it in another format instead, which writes a new movie", - p.file_name - )); + if let Some(why) = video_location_refusal(p, &session.catalog, o) { + return Err(why); } let dng = (o.format == ExportFormat::Dng).then_some(o.dng_compression); // the file's bytes; a DNG also decodes the raw data (16-bit samples) and writes it again @@ -2715,12 +2717,26 @@ fn prepare_as( private_places: session.catalog.saved_locations().filter(|l| l.private).cloned().collect(), label: p.file_name.clone(), size: (p.width as usize, p.height as usize), + opts: Box::new(o.clone()), + refusal: None, }; (work, weight) }; Ok(PreparedExport { photo: id, file_name, source_dir, work, guard, weight, mix: export_mix(), gpu: export_gpu(), want_hdr: true }) } +/// Why video clip `p`'s original file can't be copied under `o`: a movie's location can sit in places no reader here +/// checks in full (QuickTime and Matroska tags, a camera's GPS track), so its file is never copied when it must not +/// carry one. +fn video_location_refusal(p: &lcc_catalog::Photo, catalog: &lcc_catalog::Catalog, o: &ExportOptions) -> Option { + (p.video.is_some() && (removes_location(p, catalog, o) || p.meta.gps_removed.is_some())).then(|| { + format!( + "{}: can't remove the location from a video clip's original file; export it in another format instead, which writes a new movie", + p.file_name + ) + }) +} + /// The folder a photo's original is in, for [`DestinationMode::SameAsOriginal`]. None for a demo /// photo, and on the web, where an original lives in the browser's storage, not in a folder. fn original_folder(source: &lcc_catalog::Source) -> Option { @@ -2992,6 +3008,26 @@ impl PreparedExport { self.guard = guard; } + /// Take the privacy decisions again from the library as it is now (FX-243): an export that waited its turn + /// writes what the library says when it starts, not when it was queued. A location marked private, a position + /// cleared, or a keyword set not to export meanwhile stays out: a render's metadata, and an Original's or DNG's + /// packet, location removal, cleared position and private places, are made again. A photo no longer in the + /// library keeps what it was prepared with. + pub fn refresh_privacy(&mut self, session: &crate::Session) { + let Some(p) = session.catalog.photo(self.photo) else { return }; + match &mut self.work { + Work::Render(r) => r.meta = export_metadata(p, &session.catalog, &r.opts), + Work::Video(_) => {} + Work::File { packet, remove_location, gps_cleared, private_places, opts, refusal, .. } => { + *packet = crate::sidecar::export_packet(p, &session.catalog, opts); + *remove_location = removes_location(p, &session.catalog, opts); + *gps_cleared = p.meta.gps_removed.is_some(); + *private_places = session.catalog.saved_locations().filter(|l| l.private).cloned().collect(); + *refusal = video_location_refusal(p, &session.catalog, opts); + } + } + } + /// Whether this item and `other` check what they write against the same snapshot of the library's originals. #[cfg(test)] pub(crate) fn shares_guard(&self, other: &Self) -> bool { @@ -3092,7 +3128,25 @@ impl PreparedExport { }) } - Work::File { path, read, packet, dng, quality, lossy_edge, label, size, remove_location, gps_cleared, private_places, camera } => { + Work::File { + path, + read, + packet, + dng, + quality, + lossy_edge, + label, + size, + remove_location, + gps_cleared, + private_places, + camera, + refusal, + .. + } => { + if let Some(why) = refusal { + return Err(why); + } let bytes = match &read { Some(r) => r(&path)?, None => read_source_file(&path, &check)?, diff --git a/crates/engine/src/tests_export.rs b/crates/engine/src/tests_export.rs index d827c87983..3b2aa39356 100644 --- a/crates/engine/src/tests_export.rs +++ b/crates/engine/src/tests_export.rs @@ -712,6 +712,43 @@ fn a_waiting_export_checks_the_originals_catalogued_while_it_waited() { let _ = std::fs::remove_dir_all(&dir); } +/// FX-243: an export that waited its turn takes the library's privacy choices as they are when it starts. A place +/// marked private while it waited keeps the position out of a rendered file and refuses the Original copy; a keyword +/// set not to export meanwhile stays out too. Before, everything but the originals guard was fixed when it was queued. +#[test] +fn a_waiting_export_takes_the_privacy_choices_made_while_it_waited() { + use crate::export::prepare_export; + let dir = temp_dir("export-waited-privacy"); + let home = lcc_meta::Metadata { gps: Some(lcc_meta::Gps { latitude: 48.8566, longitude: 2.3522, altitude: None }), ..Default::default() }; + std::fs::write(dir.join("Home.jpg"), jpeg_with_xmp(&home)).unwrap(); + let mut s = Session::new().with_fs(); + s.execute("library.import", &json!({"paths": [dir.to_string_lossy()]})).unwrap(); + let id = s.catalog.photos().next().unwrap().id; + s.execute("library.select", &json!({"ids": [id.0]})).unwrap(); + s.execute("photo.setMeta", &json!({"ids": [id.0], "keywords": ["secret"]})).unwrap(); + let rendered = ExportOptions::default(); + let original = ExportOptions { format: ExportFormat::Original, ..Default::default() }; + // queued while nothing is private + let mut render = prepare_export(&mut s, id, &rendered, 1).unwrap(); + let mut copy = prepare_export(&mut s, id, &original, 1).unwrap(); + let untouched = prepare_export(&mut s, id, &rendered, 1).unwrap(); + // meanwhile: home becomes a private place, and the keyword stays home + s.execute("map.saveLocation", &json!({"name": "Home", "lat": 48.8566, "lon": 2.3522, "radius": 2000, "private": true})).unwrap(); + s.execute("keyword.edit", &json!({"keyword": "secret", "includeOnExport": false})).unwrap(); + render.refresh_privacy(&s); + copy.refresh_privacy(&s); + let e = render.run_until(&|| false).unwrap(); + let read = lcc_meta::extract(&e.bytes); + assert!(read.gps.is_none(), "the position marked private stays out"); + assert!(!read.keywords.iter().any(|k| k == "secret"), "the keyword set not to export stays out: {:?}", read.keywords); + let err = copy.run_until(&|| false).err().expect("the original holds the private position"); + assert!(err.contains("can't remove the location"), "{err}"); + // (without the refresh, the decisions it was queued with: what staging wrote before) + let stale = lcc_meta::extract(&untouched.run_until(&|| false).unwrap().bytes); + assert!(stale.gps.is_some() && stale.keywords.iter().any(|k| k == "secret"), "{stale:?}"); + let _ = std::fs::remove_dir_all(&dir); +} + /// Issue #93: the native writer truncated the target first; a failure mid-write (full disk, /// unplugged drive) now leaves the previous file intact and no partial one. #[test] diff --git a/crates/ui-egui/src/export_task.rs b/crates/ui-egui/src/export_task.rs index 693ec81956..4e6e62ca4d 100644 --- a/crates/ui-egui/src/export_task.rs +++ b/crates/ui-egui/src/export_task.rs @@ -131,6 +131,8 @@ fn start_next(app: &mut LccApp, ctx: &egui::Context) { let guard = Arc::new(app.session.original_guard()); for item in &mut items { item.use_guard(guard.clone()); + // and its privacy choices as the library has them now (FX-243) + item.refresh_privacy(&app.session); } match start_now(app, items, opts, to, after, then) { Ok(_) => { diff --git a/docs/changelog/unreleased/2026-12-01-waiting-export-privacy.md b/docs/changelog/unreleased/2026-12-01-waiting-export-privacy.md new file mode 100644 index 0000000000..788661a370 --- /dev/null +++ b/docs/changelog/unreleased/2026-12-01-waiting-export-privacy.md @@ -0,0 +1,2 @@ +## Fixes +- A queued export takes its privacy decisions (metadata, private places, cleared positions, keyword export flags, an Original's or DNG's packet) when it starts, not when it was queued, as it already did for the originals guard. diff --git a/docs/manual-site/src/content/docs/output/export.mdx b/docs/manual-site/src/content/docs/output/export.mdx index 502c6ccfd4..206fed03d5 100644 --- a/docs/manual-site/src/content/docs/output/export.mdx +++ b/docs/manual-site/src/content/docs/output/export.mdx @@ -29,7 +29,7 @@ import { Aside } from '@astrojs/starlight/components'; - The bottom line summarises the result, for example "JPEG (90%) / sRGB / 8-bit · Long Edge 2048 px". - **Ask / Folder / Next to Originals** (top right) switches the destination quickly. - Export runs in the background and shows in the activity stack; ✕ cancels it. -- Start another export while one runs and it waits its turn: a "Waiting to export" row appears in the activity stack, ✕ on it drops it, and it starts when the one before ends. +- Start another export while one runs and it waits its turn: a "Waiting to export" row appears in the activity stack, ✕ on it drops it, and it starts when the one before ends. It uses the library's privacy choices as they are when it starts: a place marked private, a position cleared or a keyword set not to export while it waited stays out of its files. diff --git a/docs/whats-new/2026-12-01-waiting-export-privacy.md b/docs/whats-new/2026-12-01-waiting-export-privacy.md new file mode 100644 index 0000000000..ce4b160095 --- /dev/null +++ b/docs/whats-new/2026-12-01-waiting-export-privacy.md @@ -0,0 +1,2 @@ +### A waiting export follows the privacy choices made meanwhile +- An export that waits its turn now uses the library's privacy choices as they are when it starts: a place marked private, a position cleared or a keyword set not to export while it waited stays out of its files. From 474227859919ce6f1eaed2f6268a234429675e1b Mon Sep 17 00:00:00 2001 From: Brian L Wong Date: Tue, 1 Dec 2026 12:22:24 -0500 Subject: [PATCH 23/26] FX-185: Edit In may still restore its own missing edit copy The guard now refuses a missing original's path, and Edit In relied on writing there: when a photo's `-Edit` copy has lost its file, Edit In renders into that same name and the import relinks the copy, so the editor gets a file that exists and nothing is orphaned (external_edit_again_hands_over_a_file_that_exists_when_ the_copys_file_is_gone, which the full engine run showed failing). Destination::restores names the missing originals an export writes again on purpose; the guard and the placement's "taken" check let exactly those through. Edit In fills it with the photo's own `-Edit` copies whose file is gone (the names it already recognises as its copies); every other export leaves it empty, so any other missing original's path is still refused. Destination literals that listed every field use `..Default::default()`. Manual: none, Edit In behaves as before. Co-Authored-By: Claude Sonnet 5.5 --- crates/engine/src/cmd/convert.rs | 11 ++++++++++- crates/engine/src/export.rs | 17 ++++++++++++----- crates/engine/src/render_dng.rs | 2 +- crates/ui-egui/src/control.rs | 2 +- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/crates/engine/src/cmd/convert.rs b/crates/engine/src/cmd/convert.rs index d958616941..2b1a84e30e 100644 --- a/crates/engine/src/cmd/convert.rs +++ b/crates/engine/src/cmd/convert.rs @@ -239,7 +239,16 @@ fn edit_copy(s: &mut Session, p: &Value, id: lcc_catalog::PhotoId, opts: &crate: Ok(()) }; // (written durably through `write`, which records the file: no separate new-file writer) - let to = crate::export::Destination { dir: dir.clone(), exact: None, write_new: None }; + // the photo's own `-Edit` copies whose file is gone may be written again: the import below relinks them (FX-185) + let restores = s + .catalog + .photos() + .filter_map(|c| match &c.source { + Source::File { path } if is_edit_copy_name(&ph.file_name, &dir, path) && !Path::new(path).exists() => Some(path.clone()), + _ => None, + }) + .collect(); + let to = crate::export::Destination { dir: dir.clone(), exact: None, write_new: None, restores }; crate::export::export_batch(s, &[id], opts, &to, &mut write, &|path| Path::new(path).exists()).map_err(|e| bad(cmd, e))?; let ext = format!(".{}", opts.format.extension()); let out = written.into_iter().find(|w| w.ends_with(&ext)).ok_or_else(|| bad(cmd, "nothing was written"))?; diff --git a/crates/engine/src/export.rs b/crates/engine/src/export.rs index 02766d70a9..6286e4f1c5 100644 --- a/crates/engine/src/export.rs +++ b/crates/engine/src/export.rs @@ -3243,6 +3243,10 @@ pub struct Destination { /// `None` for a sink with no folder of its own (the browser's downloads, measurements): /// the batch's own writer then writes every file. pub write_new: Option, + /// Missing originals this export writes again on purpose: Edit In restoring its own `-Edit` copy whose file is + /// gone, which the import then relinks. The originals guard lets exactly these paths through (FX-185 refuses any + /// other missing original's path). Empty for every other export. + pub restores: Vec, } /// Writes a new file ([`write_file_new`]): `Ok(false)` when the name is taken. @@ -3252,7 +3256,7 @@ impl Destination { /// A destination on this computer's disk: folder `dir`, or the file `exact`, with /// [`write_file_new`] for the files that must be new. pub fn on_disk(dir: String, exact: Option) -> Self { - Destination { dir, exact, write_new: Some(write_file_new) } + Destination { dir, exact, write_new: Some(write_file_new), restores: Vec::new() } } } @@ -4332,9 +4336,10 @@ impl<'a> Placer<'a> { // `exists` looked): never replaced under Unique and Skip, see `write_new` below let appeared = std::cell::RefCell::new(std::collections::HashSet::::new()); // (a name the guard would refuse, a missing original's or its sidecar's, is taken too: FX-185) - let busy = |main: &str| { - group(main).iter().any(|p| taken.contains(p) || appeared.borrow().contains(p) || exists(p) || guard.claims(std::path::Path::new(p))) - }; + // a missing original this export restores on purpose is not the guard's (Destination::restores) + let restores = &self.to.restores; + let claimed = |p: &str| !restores.iter().any(|r| r == p) && guard.claims(std::path::Path::new(p)); + let busy = |main: &str| group(main).iter().any(|p| taken.contains(p) || appeared.borrow().contains(p) || exists(p) || claimed(p)); // the first of `stem-2`, `stem-3`… that `ok` accepts let next_name = |ok: &dyn Fn(&str) -> bool| { // keep the requested folder and basename, split as the sidecars' names are @@ -4383,7 +4388,9 @@ impl<'a> Placer<'a> { // never over an original, whatever the conflict policy or the exact path said // (rechecked for the selected main file too: collision probes can outlive its early validation) for f in &files { - guard.check(std::path::Path::new(f))?; + if !(restores.contains(f) && !exists(f)) { + guard.check(std::path::Path::new(f))?; + } } let Some(write_new) = write_new else { match &e.video_file { diff --git a/crates/engine/src/render_dng.rs b/crates/engine/src/render_dng.rs index c6684c5619..964877c7ac 100644 --- a/crates/engine/src/render_dng.rs +++ b/crates/engine/src/render_dng.rs @@ -100,7 +100,7 @@ impl RenderDngJob { return (out, true); } // (`write` is the host's; Unique's check-then-write window remains here, see FX-143) - let to = Destination { dir, exact: None, write_new: None }; + let to = Destination { dir, exact: None, write_new: None, ..Default::default() }; let files = run_batch(vec![item], &self.opts, &to, write, &|path| Path::new(path).exists(), true, &mut |_, _| true); let result = files.and_then(|files| { let f = files.first().ok_or("nothing was written")?; diff --git a/crates/ui-egui/src/control.rs b/crates/ui-egui/src/control.rs index 34ac825b1f..24ea65e38d 100644 --- a/crates/ui-egui/src/control.rs +++ b/crates/ui-egui/src/control.rs @@ -892,7 +892,7 @@ pub fn export_active(app: &mut LccApp, p: &Value) -> Result { return Err(NO_EXPORT_FOLDER.into()); } // the host's new-file writer: Unique and Skip never replace a file that appears meanwhile - let to = Destination { dir: dir.clone(), exact, write_new: app.services.write_new }; + let to = Destination { dir: dir.clone(), exact, write_new: app.services.write_new, ..Default::default() }; let background = p.get("background").and_then(Value::as_bool).unwrap_or(false) && app.services.write_shared.is_some(); // Add to Apple Photos: refused here, before anything is written, when it can't be done. An export that // waits behind a running one reserves Photos when it starts (the running one may hold it; issue #2965). From bb91ca3a1a36a9cf82853041a02d3a9d78d04c3a Mon Sep 17 00:00:00 2001 From: Clyde C Brown Date: Tue, 1 Dec 2026 10:15:34 -0800 Subject: [PATCH 24/26] #1787: Lightroom import: map more smart-collection criteria Map the criteria Cf already has a field for: shutter speed (stored as log2 of 1/seconds, so comparisons flip), flash fired, camera serial number, alt text, folder words, any searchable text, has GPS, has edits, cropped, treatment, aspect ratio, copyright status and the cropped long edge, short edge and megapixels. Sublocation now maps to Cf's Sublocation instead of Location, numeric colour labels (1-5) import, and yes/no criteria stored as isTrue / isFalse map. Has Adjustments no longer maps to Has Edits. A table test covers every smart collection of the two Lightroom test catalogs (243 rows), plus a table of mapped and static rules per criterion. Manual: library/import-sources Co-Authored-By: Claude Sonnet 5.5 --- crates/engine/src/lightroom_smart.rs | 287 ++++++++++++++++-- crates/engine/src/lightroom_smart_rows.tsv | 243 +++++++++++++++ ...ghtroom-smart-collections-more-criteria.md | 2 + docs/lightroom-catalog-import.md | 10 +- .../content/docs/library/import-sources.mdx | 2 +- ...ghtroom-smart-collections-more-criteria.md | 5 + 6 files changed, 525 insertions(+), 24 deletions(-) create mode 100644 crates/engine/src/lightroom_smart_rows.tsv create mode 100644 docs/changelog/unreleased/2026-12-02-lightroom-smart-collections-more-criteria.md create mode 100644 docs/whats-new/2026-12-02-lightroom-smart-collections-more-criteria.md diff --git a/crates/engine/src/lightroom_smart.rs b/crates/engine/src/lightroom_smart.rs index 320bdf7734..13efb2ab67 100644 --- a/crates/engine/src/lightroom_smart.rs +++ b/crates/engine/src/lightroom_smart.rs @@ -119,6 +119,65 @@ fn aperture(op: &str, av: f64, av2: Option) -> Option { }) } +/// Lightroom's stored shutter speed is log2 of 1/seconds (1/100 s is 6.643856), so a larger stored +/// value is a faster shutter and every comparison flips. The stored numbers are rounded, so each +/// bound is widened by a hundredth of a stop (an exact `==` / `!=` becomes a band). +fn shutter(op: &str, ev: f64, ev2: Option) -> Option { + const TOL: f64 = 0.01; + let secs = |e: f64| (-e).exp2(); + if !ev.is_finite() || ev2.is_some_and(|e| !e.is_finite()) { + return None; + } + let band = |e: f64| field("shutterSpeed", "between", json!([secs(e + TOL), secs(e - TOL)])); + Some(match op { + "==" => band(ev), + "!=" => Rule::Group { group: RuleSet { mode: Match::None, rules: vec![band(ev)] } }, + ">=" => field("shutterSpeed", "lte", json!(secs(ev - TOL))), + ">" => field("shutterSpeed", "lt", json!(secs(ev + TOL))), + "<=" => field("shutterSpeed", "gte", json!(secs(ev + TOL))), + "<" => field("shutterSpeed", "gt", json!(secs(ev - TOL))), + "in" => { + let (a, b) = (ev, ev2?); + field("shutterSpeed", "between", json!([secs(a.max(b) + TOL), secs(a.min(b) - TOL)])) + } + _ => return None, + }) +} + +/// A yes/no criterion: `isTrue` / `isFalse` (stored with `value = true`), or `==` / `!=` on a +/// boolean value. `None` when the value is missing or not a boolean (Flash's "Unknown"). +fn yes_no(op: &str, value: Option<&Lua>) -> Option { + let given = match value { + Some(Lua::Bool(b)) => Some(*b), + Some(Lua::Num(n)) if *n == 0.0 || *n == 1.0 => Some(*n == 1.0), + _ => None, + }; + match op { + "isTrue" => Some(true), + "isFalse" => Some(false), + "==" => given, + "!=" => given.map(|b| !b), + _ => None, + } +} + +/// A choice criterion (`==` is, `!=` is not) on one of Cf's choice ids. +fn choice(target: &str, op: &str, id: &str) -> Option { + match op { + "==" => Some(field(target, "is", json!(id))), + "!=" => Some(field(target, "isNot", json!(id))), + _ => None, + } +} + +fn number_rule(target: &str, op: &str, c: &Lua) -> Option { + let n = num(c.get("value"))?; + if op == "in" { + return Some(field(target, "between", json!([n, num(c.get("value2"))?]))); + } + Some(field(target, number_op(op)?, json!(n))) +} + fn criterion(c: &Lua, collections: &[(&str, AlbumId)]) -> Result { let name = c.get("criteria").and_then(Lua::str).unwrap_or_default(); let op = c.get("operation").and_then(Lua::str).unwrap_or_default(); @@ -196,28 +255,59 @@ fn criterion(c: &Lua, collections: &[(&str, AlbumId)]) -> Result { } } "labelColor" => { - let label = value.and_then(Lua::str).map(str::to_ascii_lowercase).ok_or_else(unsupported)?; - if !["red", "yellow", "green", "blue", "purple", "none"].contains(&label.as_str()) { - return Err(unsupported()); - } - match op { - "==" => Ok(field("label", "is", json!(label))), - "!=" => Ok(field("label", "isNot", json!(label))), - _ => Err(unsupported()), - } + // Lightroom stores the five colours as numbers (Red 1 … Purple 5) and "none" / "custom" as text + const COLOURS: [&str; 5] = ["red", "yellow", "green", "blue", "purple"]; + let label = match value { + Some(Lua::Num(n)) if n.fract() == 0.0 && (1.0..=5.0).contains(n) => { + (*n as usize).checked_sub(1).and_then(|i| COLOURS.get(i)).copied() + } + Some(Lua::Str(s)) => { + let s = s.to_ascii_lowercase(); + COLOURS.iter().copied().chain(["none"]).find(|l| *l == s) + } + _ => None, + }; + choice("label", op, label.ok_or_else(unsupported)?).ok_or_else(unsupported) + } + // Has Edits: the user changed the settings. Has Adjustments (settings that differ from the + // camera default) has no equal here yet and stays static. + "edit" | "cropped" | "hasGPSData" | "flashFired" => { + let target = match name { + "edit" => "edited", + "cropped" => "cropped", + "hasGPSData" => "hasGps", + _ => "flash", + }; + let yes = yes_no(op, value).ok_or_else(unsupported)?; + Ok(field(target, "is", json!(yes))) } - "hasAdjustments" => { - let yes = match value { - Some(Lua::Bool(b)) => *b, - Some(Lua::Num(n)) => *n != 0.0, - None => true, + "treatment" => { + let id = match value.and_then(Lua::str) { + Some("grayscale") => "monochrome", + Some("color") => "color", _ => return Err(unsupported()), }; - match op { - "==" | "" => Ok(field("edited", "is", json!(yes))), - "!=" => Ok(field("edited", "is", json!(!yes))), - _ => Err(unsupported()), - } + choice("treatment", op, id).ok_or_else(unsupported) + } + "aspectRatio" => { + let id = value.and_then(Lua::str).filter(|v| ["landscape", "portrait", "square"].contains(v)).ok_or_else(unsupported)?; + choice("aspect", op, id).ok_or_else(unsupported) + } + // only "copyrighted" (`true`) is seen stored; the other states aren't known yet + "copyrightState" => match (op, value) { + ("==", Some(Lua::Bool(true))) => Ok(field("copyrightStatus", "is", json!("copyrighted"))), + ("!=", Some(Lua::Bool(true))) => Ok(field("copyrightStatus", "isNot", json!("copyrighted"))), + _ => Err(unsupported()), + }, + "shutterSpeed" => shutter(op, num(value).ok_or_else(unsupported)?, num(c.get("value2"))).ok_or_else(unsupported), + // the cropped sizes are the shown photo's; the uncropped ones (`longEdge`, `width` …) have no field yet + "longEdgeCropped" | "shortEdgeCropped" | "megapixelsCropped" => { + let target = match name { + "longEdgeCropped" => "longEdge", + "shortEdgeCropped" => "shortEdge", + _ => "megapixels", + }; + number_rule(target, op, c).ok_or_else(unsupported) } "fileFormat" => { let raw = value.and_then(Lua::str).unwrap_or_default(); @@ -249,10 +339,25 @@ fn criterion(c: &Lua, collections: &[(&str, AlbumId)]) -> Result { "copyright" => "copyright", "city" => "city", "country" => "country", - "location" => "location", + // Lightroom's `location` is its Sublocation; Cf's `location` also searches city, state and country + "location" => "sublocation", + "cameraSN" => "cameraSerial", + "altText" => "altText", + "folder" => "folder", + "all" | "metadata" => "text", "state" => "state", _ => return Err(unsupported()), }; + // Lightroom's Folder holds the folder's name; Cf's holds its whole path, so only a substring test carries over. + // Any Searchable Text has no empty or exact test. + let allowed: &[&str] = match target { + "folder" => &["all", "words", "any"], + "text" => &["all", "words", "any", "noneOf"], + _ => &[], + }; + if !allowed.is_empty() && !allowed.contains(&op) { + return Err(unsupported()); + } text_rule(target, op, value.and_then(Lua::str).unwrap_or_default()).ok_or_else(unsupported) } } @@ -414,4 +519,146 @@ mod tests { assert!((value[0].as_f64().unwrap() - 8.0).abs() < 0.1); // APEX 6 -> f/8 assert!((value[1].as_f64().unwrap() - 16.0).abs() < 0.2); // APEX 8 -> f/16 } + + /// One table for the newer criteria: a rule Lightroom stores, and either the rule it + /// imports to (field, operator, value) or `None` when it stays a static collection. + #[test] + fn criteria_map_to_their_fields_or_stay_static() { + type Row = (&'static str, Option<(&'static str, &'static str, Value)>); + let rows: Vec = vec![ + (r#"criteria = "cameraSN", operation = "==", value = "122022003385""#, Some(("cameraSerial", "is", json!("122022003385")))), + (r#"criteria = "altText", operation = "empty", value = """#, Some(("altText", "isEmpty", Value::Null))), + (r#"criteria = "location", operation = "==", value = "Marina""#, Some(("sublocation", "is", json!("Marina")))), + (r#"criteria = "folder", operation = "any", value = "images""#, Some(("folder", "contains", json!("images")))), + (r#"criteria = "folder", operation = "==", value = "images""#, None), + (r#"criteria = "all", operation = "words", value = "calm""#, Some(("text", "contains", json!("calm")))), + (r#"criteria = "metadata", operation = "any", value = "calm""#, Some(("text", "contains", json!("calm")))), + (r#"criteria = "all", operation = "empty", value = """#, None), + (r#"criteria = "hasGPSData", operation = "==", value = true"#, Some(("hasGps", "is", json!(true)))), + (r#"criteria = "hasGPSData", operation = "!=", value = true"#, Some(("hasGps", "is", json!(false)))), + (r#"criteria = "flashFired", operation = "==", value = true"#, Some(("flash", "is", json!(true)))), + (r#"criteria = "flashFired", operation = "!=", value = true"#, Some(("flash", "is", json!(false)))), + (r#"criteria = "flashFired", operation = "==""#, None), + (r#"criteria = "cropped", operation = "isTrue", value = true"#, Some(("cropped", "is", json!(true)))), + (r#"criteria = "cropped", operation = "isFalse", value = true"#, Some(("cropped", "is", json!(false)))), + (r#"criteria = "edit", operation = "isTrue", value = true"#, Some(("edited", "is", json!(true)))), + (r#"criteria = "hasAdjustments", operation = "isTrue", value = true"#, None), + (r#"criteria = "treatment", operation = "==", value = "grayscale""#, Some(("treatment", "is", json!("monochrome")))), + (r#"criteria = "treatment", operation = "!=", value = "grayscale""#, Some(("treatment", "isNot", json!("monochrome")))), + (r#"criteria = "treatment", operation = "==", value = "sepia""#, None), + (r#"criteria = "aspectRatio", operation = "!=", value = "landscape""#, Some(("aspect", "isNot", json!("landscape")))), + (r#"criteria = "aspectRatio", operation = "==", value = "wide""#, None), + (r#"criteria = "copyrightState", operation = "==", value = true"#, Some(("copyrightStatus", "is", json!("copyrighted")))), + (r#"criteria = "copyrightState", operation = "==", value = "unknown""#, None), + (r#"criteria = "longEdgeCropped", operation = ">=", value = 4000"#, Some(("longEdge", "gte", json!(4000.0)))), + (r#"criteria = "shortEdgeCropped", operation = "<", value = 3000"#, Some(("shortEdge", "lt", json!(3000.0)))), + (r#"criteria = "megapixelsCropped", operation = ">", value = 10"#, Some(("megapixels", "gt", json!(10.0)))), + (r#"criteria = "widthCropped", operation = ">", value = 3000"#, None), + (r#"criteria = "longEdge", operation = ">=", value = 4000"#, None), + (r#"criteria = "lastExportTimestamp", operation = "inLast", value = 3"#, None), + (r#"criteria = "likes", operation = "isTrue", value = true"#, None), + (r#"criteria = "comments", operation = "isTrue", value = true"#, None), + (r#"criteria = "labelColor", operation = "==", value = 1"#, Some(("label", "is", json!("red")))), + (r#"criteria = "labelColor", operation = "==", value = 2"#, Some(("label", "is", json!("yellow")))), + (r#"criteria = "labelColor", operation = "==", value = 3"#, Some(("label", "is", json!("green")))), + (r#"criteria = "labelColor", operation = "==", value = 4"#, Some(("label", "is", json!("blue")))), + (r#"criteria = "labelColor", operation = "!=", value = 5"#, Some(("label", "isNot", json!("purple")))), + (r#"criteria = "labelColor", operation = "==", value = "none""#, Some(("label", "is", json!("none")))), + (r#"criteria = "labelColor", operation = "==", value = "custom""#, None), + (r#"criteria = "labelColor", operation = "==", value = 6"#, None), + ]; + let cat = lcc_catalog::Catalog::default(); + for (text, want) in rows { + let got = smart_rules(&format!("s = {{ {{ {text} }} }}"), &[]); + match want { + Some((f, op, v)) => { + let set = got.unwrap_or_else(|e| panic!("{text}: {e}")); + assert_eq!(set.rules, vec![field(f, op, v)], "{text}"); + assert!(set.check(&cat).is_empty(), "{text}: the rule must pass Cf's own check"); + } + None => assert!(got.is_err(), "{text} stays static"), + } + } + } + + #[test] + fn shutter_speed_is_converted_from_log2_of_one_over_seconds() { + // 6.643856 stored = 1/100 s; a larger stored value is a faster shutter, so the comparison flips + let band = |s: &str| match &smart_rules(s, &[]).unwrap().rules[0] { + Rule::Field { op, value, .. } => (op.clone(), value.clone()), + other => panic!("{other:?}"), + }; + let (op, v) = band(r#"s = { { criteria = "shutterSpeed", operation = "==", value = 6.643856, value2 = 0 } }"#); + assert_eq!(op, "between"); + let (lo, hi) = (v[0].as_f64().unwrap(), v[1].as_f64().unwrap()); + assert!(lo < 0.01 && 0.01 < hi && hi - lo < 0.0002, "{lo} {hi}"); + let (op, v) = band(r#"s = { { criteria = "shutterSpeed", operation = ">", value = 6.643856 } }"#); + assert_eq!(op, "lt", "faster than 1/100 s is fewer seconds"); + assert!(v.as_f64().unwrap() < 0.01); + let (op, _) = band(r#"s = { { criteria = "shutterSpeed", operation = "<=", value = 6.643856 } }"#); + assert_eq!(op, "gte"); + // 3.321928 = 1/10 s, 13.287712 = 1/10000 s + let (op, v) = band(r#"s = { { criteria = "shutterSpeed", operation = "in", value = 3.321928, value2 = 13.287712 } }"#); + assert_eq!(op, "between"); + assert!((v[0].as_f64().unwrap() - 0.0001).abs() < 1e-6 && (v[1].as_f64().unwrap() - 0.1).abs() < 1e-3, "{v}"); + let set = smart_rules(r#"s = { { criteria = "shutterSpeed", operation = "!=", value = 6.643856 } }"#, &[]).unwrap(); + assert!(matches!(&set.rules[0], Rule::Group { group } if group.mode == Match::None)); + } + + #[test] + fn text_operators_lightroom_does_not_offer_still_map_when_a_catalog_carries_them() { + for (text, f, op) in [ + (r#"criteria = "filename", operation = "==", value = "a.jpg""#, "fileName", "is"), + (r#"criteria = "filename", operation = "!=", value = "a.jpg""#, "fileName", "isNot"), + (r#"criteria = "title", operation = "empty", value = """#, "title", "isEmpty"), + (r#"criteria = "title", operation = "notEmpty", value = """#, "title", "isNotEmpty"), + ] { + let set = smart_rules(&format!("s = {{ {{ {text} }} }}"), &[]).unwrap(); + let Rule::Field { field, op: got, .. } = &set.rules[0] else { panic!("{text}") }; + assert_eq!((field.as_str(), got.as_str()), (f, op), "{text}"); + } + } + + /// What the importer makes of a rule set, as one line: its rules as JSON, or `static: `. + fn rendered(lua: &str, collections: &[(&str, AlbumId)]) -> String { + match smart_rules(lua, collections) { + Ok(set) => serde_json::to_string(&set).unwrap_or_default(), + Err(why) => format!("static: {why}"), + } + } + + /// Every smart collection of the two Lightroom-made test catalogs (109 in the inventory, 134 in the + /// combinations; no name in both): its stored rules, and the rule they import to or why they stay + /// static. A criterion, operator or value the rows don't cover can't be in the catalogs. Rows are + /// `name TAB rules TAB expected`; set `LCC_BLESS_SMART_ROWS=` to write a file with the + /// expected column filled from the importer, then review it row by row before copying it in. + #[test] + fn every_smart_collection_of_the_test_catalogs_imports_as_its_row_says() { + let collections = [("Holiday", AlbumId(1)), ("Holiday Photos", AlbumId(2))]; + let rows: Vec> = include_str!("lightroom_smart_rows.tsv").lines().map(|l| l.split('\t').collect()).collect(); + assert_eq!(rows.len(), 243, "109 + 134 smart collections"); + let mut names: Vec<&str> = rows.iter().map(|r| r[0]).collect(); + names.sort_unstable(); + names.dedup(); + assert_eq!(names.len(), 243, "no name twice"); + if let Ok(path) = std::env::var("LCC_BLESS_SMART_ROWS") { + let out: String = rows.iter().map(|r| format!("{}\t{}\t{}\n", r[0], r[1], rendered(r[1], &collections))).collect(); + std::fs::write(path, out).unwrap(); + return; + } + // the collections a `collection` rule names aren't in this empty catalog, so that one problem is expected + let cat = lcc_catalog::Catalog::default(); + for r in &rows { + assert_eq!(r.len(), 3, "{}: name, rules, expected", r[0]); + assert_eq!(rendered(r[1], &collections), r[2], "{}", r[0]); + if let Ok(set) = smart_rules(r[1], &collections) { + let problems = set.check(&cat); + assert!( + problems.iter().all(|p| p.issue == lcc_catalog::rules::Issue::NoSuchAlbum), + "{}: must pass Cf's own check: {problems:?}", + r[0] + ); + } + } + } } diff --git a/crates/engine/src/lightroom_smart_rows.tsv b/crates/engine/src/lightroom_smart_rows.tsv new file mode 100644 index 0000000000..7d90522da4 --- /dev/null +++ b/crates/engine/src/lightroom_smart_rows.tsv @@ -0,0 +1,243 @@ +Exported is after "2026-01-01" s = { { criteria = "lastExportTimestamp", operation = ">", value = "2026-01-01", value2 = "2026-11-20", }, combine = "intersect", } static: rule `lastExportTimestamp >` has no equivalent +SC-ALTTEXT-EMPTY s = { { criteria = "altText", operation = "empty", value = "", value2 = "", }, combine = "intersect", } {"match":"all","rules":[{"field":"altText","op":"isEmpty","value":null}]} +SC-ANY-META s = { { criteria = "metadata", operation = "any", value = "calm", }, combine = "intersect", } {"match":"all","rules":[{"field":"text","op":"contains","value":"calm"}]} +SC-ANYTEXT s = { { criteria = "all", operation = "any", value = "calm", }, combine = "intersect", } {"match":"all","rules":[{"field":"text","op":"contains","value":"calm"}]} +SC-APERTURE-LE4 s = { { criteria = "aperture", operation = "<", value = 6, value2 = 0, }, combine = "intersect", } {"match":"all","rules":[{"field":"aperture","op":"lt","value":7.92}]} +SC-ASPECT-LANDSCAPE s = { { criteria = "aspectRatio", operation = "==", value = "landscape", }, combine = "intersect", } {"match":"all","rules":[{"field":"aspect","op":"is","value":"landscape"}]} +SC-ASPECT-PORTRAIT s = { { criteria = "aspectRatio", operation = "==", value = "portrait", }, combine = "intersect", } {"match":"all","rules":[{"field":"aspect","op":"is","value":"portrait"}]} +SC-ASPECT-SQUARE s = { { criteria = "aspectRatio", operation = "==", value = "square", }, combine = "intersect", } {"match":"all","rules":[{"field":"aspect","op":"is","value":"square"}]} +SC-BITS-16 s = { { criteria = "bitDepth", operation = "==", value = 16, value2 = 16, }, combine = "intersect", } static: rule `bitDepth ==` has no equivalent +SC-CAMERA s = { { criteria = "camera", operation = "==", value = "Canon EOS R8", }, combine = "intersect", } {"match":"all","rules":[{"field":"camera","op":"is","value":"Canon EOS R8"}]} +SC-CAMERA-SERIAL s = { { criteria = "cameraSN", operation = "==", value = "122022003385", }, combine = "intersect", } {"match":"all","rules":[{"field":"cameraSerial","op":"is","value":"122022003385"}]} +SC-CAPTION-EMPTY s = { { criteria = "caption", operation = "empty", value = "", }, combine = "intersect", } {"match":"all","rules":[{"field":"caption","op":"isEmpty","value":null}]} +SC-CAPTURE-AFTER s = { { criteria = "captureTime", operation = ">", value = "2026-05-01", }, combine = "intersect", } {"match":"all","rules":[{"field":"captureDate","op":"after","value":"2026-05-01"}]} +SC-CAPTURE-BEFORE s = { { criteria = "captureTime", operation = "<", value = "2026-06-01", }, combine = "intersect", } {"match":"all","rules":[{"field":"captureDate","op":"before","value":"2026-06-01"}]} +SC-CAPTURE-LAST-30 s = { { criteria = "captureTime", operation = "inLast", value = 30, value_units = "days", }, combine = "intersect", } {"match":"all","rules":[{"field":"captureDate","op":"inLast","value":{"n":30.0,"unit":"day"}}]} +SC-CAPTURE-ON s = { { criteria = "captureTime", operation = "==", value = "2026-05-06", }, combine = "intersect", } {"match":"all","rules":[{"field":"captureDate","op":"is","value":"2026-05-06"}]} +SC-CAPTURE-RANGE s = { { criteria = "captureTime", operation = "in", value = "1983-01-01", value2 = "2026-10-24", }, combine = "intersect", } {"match":"all","rules":[{"field":"captureDate","op":"between","value":["1983-01-01","2026-10-24"]}]} +SC-COLORMODE s = { { criteria = "colorMode", operation = "==", value = 2, }, combine = "intersect", } static: rule `colorMode ==` has no equivalent +SC-COLORPROFILE s = { { criteria = "colorProfile", operation = "any", value = "sRGB", value2 = "", }, combine = "intersect", } static: rule `colorProfile any` has no equivalent +SC-COMBO-AND s = { { criteria = "rating", operation = ">=", value = 3, }, { criteria = "keywords", operation = "any", value = "family", }, combine = "intersect", } {"match":"all","rules":[{"field":"rating","op":"gte","value":3.0},{"field":"keywords","op":"contains","value":"family"}]} +SC-COMBO-NESTED s = { { { criteria = "rating", operation = ">=", value = 3, }, { criteria = "keywords", operation = "any", value = "family", }, combine = "intersect", }, { { criteria = "labelColor", operation = "==", value = 1, }, { criteria = "captureTime", operation = "inLast", value = 30, value_units = "days", }, combine = "intersect", }, combine = "union", } {"match":"any","rules":[{"group":{"match":"all","rules":[{"field":"rating","op":"gte","value":3.0},{"field":"keywords","op":"contains","value":"family"}]}},{"group":{"match":"all","rules":[{"field":"label","op":"is","value":"red"},{"field":"captureDate","op":"inLast","value":{"n":30.0,"unit":"day"}}]}}]} +SC-COMBO-NONE s = { { criteria = "rating", operation = ">=", value = 3, }, combine = "exclude", } {"match":"none","rules":[{"field":"rating","op":"gte","value":3.0}]} +SC-COMBO-OR s = { { criteria = "pick", operation = "==", value = 1, }, { criteria = "labelColor", operation = "==", value = 1, }, combine = "union", } {"match":"any","rules":[{"field":"flag","op":"is","value":"pick"},{"field":"label","op":"is","value":"red"}]} +SC-COMMENTS s = { { criteria = "comments", operation = "isTrue", value = true, }, combine = "intersect", } static: rule `comments isTrue` has no equivalent +SC-COPYNAME-EMPTY s = { { criteria = "copyname", operation = "empty", value = "", }, combine = "intersect", } {"match":"all","rules":[{"field":"copyName","op":"isEmpty","value":null}]} +SC-COPYNAME-SET s = { { criteria = "copyname", operation = "any", value = "Alt", }, combine = "intersect", } {"match":"all","rules":[{"field":"copyName","op":"contains","value":"Alt"}]} +SC-COPYRIGHT-STATUS s = { { criteria = "copyrightState", operation = "==", value = true, }, combine = "intersect", } {"match":"all","rules":[{"field":"copyrightStatus","op":"is","value":"copyrighted"}]} +SC-CREATOR s = { { criteria = "creator", operation = "==", value = "Test Photographer", }, combine = "intersect", } {"match":"all","rules":[{"field":"creator","op":"is","value":"Test Photographer"}]} +SC-DEV-ADJ s = { { criteria = "hasAdjustments", operation = "isTrue", value = true, }, combine = "intersect", } static: rule `hasAdjustments isTrue` has no equivalent +SC-DEV-AI s = { { criteria = "hasAI", operation = "isTrue", value = true, }, combine = "intersect", } static: rule `hasAI isTrue` has no equivalent +SC-DEV-AI-EDIT s = { { criteria = "aiEditStatus", operation = "==", value = "denoise", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-DEV-AI-EDIT-UPD s = { { criteria = "aiUpdateRequiredStatus", operation = "==", value = "rawDetails", }, combine = "intersect", } static: rule `aiUpdateRequiredStatus ==` has no equivalent +SC-DEV-CA s = { { criteria = "removeChromaticAberration", operation = "isTrue", value = true, }, combine = "intersect", } static: rule `removeChromaticAberration isTrue` has no equivalent +SC-DEV-CROPPED s = { { criteria = "cropped", operation = "isTrue", value = true, }, combine = "intersect", } {"match":"all","rules":[{"field":"cropped","op":"is","value":true}]} +SC-DEV-DEPTH s = { { criteria = "depthMap", operation = "isTrue", value = true, }, combine = "intersect", } static: rule `depthMap isTrue` has no equivalent +SC-DEV-EDITS s = { { criteria = "edit", operation = "isTrue", value = true, }, combine = "intersect", } {"match":"all","rules":[{"field":"edited","op":"is","value":true}]} +SC-DEV-GENAI s = { { criteria = "hasGenAI", operation = "isTrue", value = true, }, combine = "intersect", } static: rule `hasGenAI isTrue` has no equivalent +SC-DEV-HDR s = { { criteria = "hdrEditMode", operation = "isTrue", value = true, }, combine = "intersect", } static: rule `hdrEditMode isTrue` has no equivalent +SC-DEV-LENSCORR s = { { criteria = "profileCorrections", operation = "isTrue", value = true, }, combine = "intersect", } static: rule `profileCorrections isTrue` has no equivalent +SC-DEV-MASKING s = { { criteria = "maskTypeStatus", operation = "==", value = "subject", }, combine = "intersect", } static: rule `maskTypeStatus ==` has no equivalent +SC-DEV-NEEDS-UPDATE s = { { criteria = "needsAIUpdate", operation = "==", value = 1, }, combine = "intersect", } static: rule `needsAIUpdate ==` has no equivalent +SC-DEV-POINTCOLOR s = { { criteria = "hasPointColor", operation = "isTrue", value = true, }, combine = "intersect", } static: rule `hasPointColor isTrue` has no equivalent +SC-DEV-PRESET-CUSTOM s = { { criteria = "developPreset", operation = "==", value = "custom", }, combine = "intersect", } static: rule `developPreset ==` has no equivalent +SC-DEV-PRESET-DEFAULT s = { { criteria = "developPreset", operation = "==", value = "default", }, combine = "intersect", } static: rule `developPreset ==` has no equivalent +SC-DEV-PRESET-SPEC s = { { criteria = "developPreset", operation = "==", value = "specified", }, combine = "intersect", } static: rule `developPreset ==` has no equivalent +SC-DEV-PROOF s = { { criteria = "isProofCopy", operation = "isTrue", value = true, }, combine = "intersect", } static: rule `isProofCopy isTrue` has no equivalent +SC-DEV-REMOVE s = { { criteria = "hasRetouch", operation = "==", value = "car", }, combine = "intersect", } static: rule `hasRetouch ==` has no equivalent +SC-DEV-TREATMENT-BW s = { { criteria = "treatment", operation = "==", value = "grayscale", }, combine = "intersect", } {"match":"all","rules":[{"field":"treatment","op":"is","value":"monochrome"}]} +SC-EDIT-LAST-7 s = { { criteria = "touchTime", operation = "inLast", value = 7, value_units = "days", }, combine = "intersect", } {"match":"all","rules":[{"field":"editDate","op":"inLast","value":{"n":7.0,"unit":"day"}}]} +SC-EDIT-TODAY s = { { criteria = "touchTime", operation = "==", value = "2026-11-20", value2 = "2026-11-20", }, combine = "intersect", } {"match":"all","rules":[{"field":"editDate","op":"is","value":"2026-11-20"}]} +SC-EXTDESC-EMPTY s = { { criteria = "extDescr", operation = "empty", value = "", value2 = "", }, combine = "intersect", } static: rule `extDescr empty` has no equivalent +SC-FASTLOAD s = { { criteria = "fastLoadDNG", operation = "isTrue", value = true, }, combine = "intersect", } static: rule `fastLoadDNG isTrue` has no equivalent +SC-FILETYPE-DNG s = { { criteria = "fileFormat", operation = "==", value = "DNG", }, combine = "intersect", } {"match":"all","rules":[{"field":"format","op":"is","value":"DNG"}]} +SC-FILETYPE-JPEG s = { { criteria = "fileFormat", operation = "==", value = "JPG", }, combine = "intersect", } {"match":"all","rules":[{"field":"format","op":"is","value":"JPG"}]} +SC-FILETYPE-RAW s = { { criteria = "fileFormat", operation = "==", value = "RAW", }, combine = "intersect", } {"match":"all","rules":[{"group":{"match":"all","rules":[{"field":"kind","op":"is","value":"raw"},{"field":"format","op":"isNot","value":"dng"}]}}]} +SC-FLASH-ON s = { { criteria = "flashFired", operation = "==", value = true, }, combine = "intersect", } {"match":"all","rules":[{"field":"flash","op":"is","value":true}]} +SC-FLASH-UNKNOWN s = { { criteria = "flashFired", operation = "==", }, combine = "intersect", } static: rule `flashFired ==` has no equivalent +SC-FN-CONTAINS s = { { criteria = "filename", operation = "any", value = "AE04FF3D", }, combine = "intersect", } {"match":"all","rules":[{"field":"fileName","op":"contains","value":"AE04FF3D"}]} +SC-FN-ENDS s = { { criteria = "filename", operation = "endsWith", value = ".jpg", }, combine = "intersect", } {"match":"all","rules":[{"field":"fileName","op":"endsWith","value":".jpg"}]} +SC-FN-STARTS s = { { criteria = "filename", operation = "beginsWith", value = "EOSR81", }, combine = "intersect", } {"match":"all","rules":[{"field":"fileName","op":"startsWith","value":"EOSR81"}]} +SC-FOCAL-GT50 s = { { criteria = "focalLength", operation = ">", value = 50, value2 = 200, }, combine = "intersect", } {"match":"all","rules":[{"field":"focalLength","op":"gt","value":50.0}]} +SC-FOCAL-RANGE s = { { criteria = "focalLength", operation = "in", value = 24, value2 = 70, }, combine = "intersect", } {"match":"all","rules":[{"field":"focalLength","op":"between","value":[24.0,70.0]}]} +SC-HAS-SMARTPREVIEW s = { { criteria = "proxyStatus", operation = "isTrue", value = true, }, combine = "intersect", } static: rule `proxyStatus isTrue` has no equivalent +SC-HAS-SNAPSHOTS s = { { criteria = "snapshots", operation = "isTrue", value = true, }, combine = "intersect", } static: rule `snapshots isTrue` has no equivalent +SC-ISO-GE800 s = { { criteria = "isoSpeedRating", operation = ">=", value = 800, }, combine = "intersect", } {"match":"all","rules":[{"field":"iso","op":"gte","value":800.0}]} +SC-JOB s = { { criteria = "jobIdentifier", operation = "==", value = "JOB-042", }, combine = "intersect", } static: rule `jobIdentifier ==` has no equivalent +SC-KW-CONTAINS s = { { criteria = "keywords", operation = "any", value = "family", }, combine = "intersect", } {"match":"all","rules":[{"field":"keywords","op":"contains","value":"family"}]} +SC-KW-CONTAINS-ALL s = { { criteria = "keywords", operation = "all", value = "family beach", }, combine = "intersect", } {"match":"all","rules":[{"group":{"match":"all","rules":[{"field":"keywords","op":"contains","value":"family"},{"field":"keywords","op":"contains","value":"beach"}]}}]} +SC-KW-EMPTY s = { { criteria = "keywords", operation = "empty", value = "", }, combine = "intersect", } {"match":"all","rules":[{"field":"keywords","op":"isEmpty","value":null}]} +SC-KW-NOT-EMPTY s = { { criteria = "keywords", operation = "notEmpty", value = false, }, combine = "intersect", } {"match":"all","rules":[{"field":"keywords","op":"isNotEmpty","value":null}]} +SC-LABEL-BLUE s = { { criteria = "labelColor", operation = "==", value = 4, }, combine = "intersect", } {"match":"all","rules":[{"field":"label","op":"is","value":"blue"}]} +SC-LABEL-CUSTOM s = { { criteria = "labelColor", operation = "==", value = "custom", }, combine = "intersect", } static: rule `labelColor ==` has no equivalent +SC-LABEL-NONE s = { { criteria = "labelColor", operation = "==", value = "none", }, combine = "intersect", } {"match":"all","rules":[{"field":"label","op":"is","value":"none"}]} +SC-LABEL-RED s = { { criteria = "labelColor", operation = "==", value = 1, }, combine = "intersect", } {"match":"all","rules":[{"field":"label","op":"is","value":"red"}]} +SC-LABEL-TEXT s = { { criteria = "labelText", operation = "==", value = "Red", value2 = "", }, combine = "intersect", } static: rule `labelText ==` has no equivalent +SC-LENS s = { { criteria = "lens", operation = "==", value = "RF24-240mm F4-6.3 IS USM", }, combine = "intersect", } {"match":"all","rules":[{"field":"lens","op":"is","value":"RF24-240mm F4-6.3 IS USM"}]} +SC-LIKES s = { { criteria = "likes", operation = "isTrue", value = true, }, combine = "intersect", } static: rule `likes isTrue` has no equivalent +SC-LOC-CITY s = { { criteria = "city", operation = "==", value = "Naples", }, combine = "intersect", } {"match":"all","rules":[{"field":"city","op":"is","value":"Naples"}]} +SC-LOC-COUNTRY s = { { criteria = "country", operation = "==", value = "Italy", }, combine = "intersect", } {"match":"all","rules":[{"field":"country","op":"is","value":"Italy"}]} +SC-LOC-GPS-NO s = { { criteria = "hasGPSData", operation = "==", value = false, }, combine = "intersect", } {"match":"all","rules":[{"field":"hasGps","op":"is","value":false}]} +SC-LOC-GPS-YES s = { { criteria = "hasGPSData", operation = "==", value = true, }, combine = "intersect", } {"match":"all","rules":[{"field":"hasGps","op":"is","value":true}]} +SC-LOC-STATE s = { { criteria = "state", operation = "==", value = "Campania", }, combine = "intersect", } {"match":"all","rules":[{"field":"state","op":"is","value":"Campania"}]} +SC-LOC-SUB s = { { criteria = "location", operation = "==", value = "Marina", }, combine = "intersect", } {"match":"all","rules":[{"field":"sublocation","op":"is","value":"Marina"}]} +SC-META-STATUS s = { { criteria = "metadataStatus", operation = "==", value = "changedOnDisk", }, combine = "intersect", } static: rule `metadataStatus ==` has no equivalent +SC-PICK-FLAG s = { { criteria = "pick", operation = "==", value = 1, }, combine = "intersect", } {"match":"all","rules":[{"field":"flag","op":"is","value":"pick"}]} +SC-PICK-REJ s = { { criteria = "pick", operation = "==", value = -1, }, combine = "intersect", } {"match":"all","rules":[{"field":"flag","op":"is","value":"reject"}]} +SC-PICK-UNFLAG s = { { criteria = "pick", operation = "==", value = 0, }, combine = "intersect", } {"match":"all","rules":[{"field":"flag","op":"is","value":"none"}]} +SC-RATE-EQ0 s = { { criteria = "rating", operation = "==", value = 0, }, combine = "intersect", } {"match":"all","rules":[{"field":"rating","op":"is","value":0.0}]} +SC-RATE-GE3 s = { { criteria = "rating", operation = ">=", value = 3, }, combine = "intersect", } {"match":"all","rules":[{"field":"rating","op":"gte","value":3.0}]} +SC-SEARCH-EXIF s = { { criteria = "exif", operation = "any", value = "Canon EOS R8", }, combine = "intersect", } static: rule `exif any` has no equivalent +SC-SEARCH-IPTC s = { { criteria = "iptc", operation = "any", value = "Sunset", }, combine = "intersect", } static: rule `iptc any` has no equivalent +SC-SEARCH-PLUGIN s = { { criteria = "allPluginMetadata", operation = "any", value = "test", }, combine = "intersect", } static: rule `allPluginMetadata any` has no equivalent +SC-SHUTTER-FAST s = { { criteria = "shutterSpeed", operation = ">", value = 8.2288186904959, value2 = 0, }, combine = "intersect", } {"match":"all","rules":[{"field":"shutterSpeed","op":"lt","value":0.0033103083181234075}]} +SC-SIZE-HEIGHT s = { { criteria = "heightCropped", operation = "<", value = 4000, value2 = 2000, }, combine = "intersect", } static: rule `heightCropped <` has no equivalent +SC-SIZE-HEIGHT-UNCROPPED s = { { criteria = "height", operation = "<", value = 4000, value2 = 2000, }, combine = "intersect", } static: rule `height <` has no equivalent +SC-SIZE-LONG-GE4000 s = { { criteria = "longEdgeCropped", operation = ">=", value = 4000, value2 = 2000, }, combine = "intersect", } {"match":"all","rules":[{"field":"longEdge","op":"gte","value":4000.0}]} +SC-SIZE-LONG-UNCROPPED s = { { criteria = "longEdge", operation = ">=", value = 4000, value2 = 2000, }, combine = "intersect", } static: rule `longEdge >=` has no equivalent +SC-SIZE-MP s = { { criteria = "megapixelsCropped", operation = ">", value = 10, value2 = 10, }, combine = "intersect", } {"match":"all","rules":[{"field":"megapixels","op":"gt","value":10.0}]} +SC-SIZE-MP-UNCROPPED s = { { criteria = "megapixels", operation = ">", value = 10, value2 = 10, }, combine = "intersect", } static: rule `megapixels >` has no equivalent +SC-SIZE-SHORT s = { { criteria = "shortEdgeCropped", operation = "<", value = 3000, value2 = 2000, }, combine = "intersect", } {"match":"all","rules":[{"field":"shortEdge","op":"lt","value":3000.0}]} +SC-SIZE-SHORT-UNCROPPED s = { { criteria = "shortEdge", operation = "<", value = 3000, value2 = 2000, }, combine = "intersect", } static: rule `shortEdge <` has no equivalent +SC-SIZE-WIDTH s = { { criteria = "widthCropped", operation = ">", value = 3000, value2 = 2000, }, combine = "intersect", } static: rule `widthCropped >` has no equivalent +SC-SIZE-WIDTH-UNCROPPED s = { { criteria = "width", operation = ">", value = 3000, value2 = 2000, }, combine = "intersect", } static: rule `width >` has no equivalent +SC-SRC-COLLECTION s = { { criteria = "collection", operation = "any", value = "Holiday", }, combine = "intersect", } {"match":"all","rules":[{"group":{"match":"any","rules":[{"field":"album","op":"is","value":1},{"field":"album","op":"is","value":2}]}}]} +SC-SRC-FOLDER s = { { criteria = "folder", operation = "any", value = "local images", }, combine = "intersect", } {"match":"all","rules":[{"group":{"match":"any","rules":[{"field":"folder","op":"contains","value":"local"},{"field":"folder","op":"contains","value":"images"}]}}]} +SC-SRC-PUBLISH-COLL s = { { criteria = "publishCollection", operation = "any", value = "Shared", value2 = "", }, combine = "intersect", } static: rule `publishCollection any` has no equivalent +SC-SRC-PUBLISHED-VIA s = { { criteria = "publishedVia", operation = "any", value = "TestHD", value2 = "", }, combine = "intersect", } static: rule `publishedVia any` has no equivalent +SC-TITLE-EMPTY s = { { criteria = "title", operation = "empty", value = "", }, combine = "intersect", } {"match":"all","rules":[{"field":"title","op":"isEmpty","value":null}]} +SC-TITLE-SET s = { { criteria = "title", operation = "any", value = "Sunset", }, combine = "intersect", } {"match":"all","rules":[{"field":"title","op":"contains","value":"Sunset"}]} +SC-OP-adjustments-isfalse s = { { criteria = "hasAdjustments", operation = "isFalse", value = true, }, combine = "intersect", } static: rule `hasAdjustments isFalse` has no equivalent +SC-OP-aperture-between s = { { criteria = "aperture", operation = "in", value = 4.0, value2 = 16, }, combine = "intersect", } {"match":"all","rules":[{"field":"aperture","op":"between","value":[3.96,258.56]}]} +SC-OP-aperture-ge s = { { criteria = "aperture", operation = ">=", value = 8, value2 = 0, }, combine = "intersect", } {"match":"all","rules":[{"field":"aperture","op":"gte","value":15.84}]} +SC-OP-aperture-gt s = { { criteria = "aperture", operation = ">", value = 7.9, value2 = 0, }, combine = "intersect", } {"match":"all","rules":[{"field":"aperture","op":"gt","value":15.609531075425506}]} +SC-OP-aperture-is s = { { criteria = "aperture", operation = "==", value = 8, value2 = 0, }, combine = "intersect", } {"match":"all","rules":[{"field":"aperture","op":"between","value":[15.84,16.16]}]} +SC-OP-aperture-isnot s = { { criteria = "aperture", operation = "!=", value = 8, value2 = 0, }, combine = "intersect", } static: rule `aperture !=` has no equivalent +SC-OP-aperture-le s = { { criteria = "aperture", operation = "<=", value = 8, value2 = 0, }, combine = "intersect", } {"match":"all","rules":[{"field":"aperture","op":"lte","value":16.16}]} +SC-OP-aspect-isnot s = { { criteria = "aspectRatio", operation = "!=", value = "landscape", }, combine = "intersect", } {"match":"all","rules":[{"field":"aspect","op":"isNot","value":"landscape"}]} +SC-OP-ca-isfalse s = { { criteria = "removeChromaticAberration", operation = "isFalse", value = true, }, combine = "intersect", } static: rule `removeChromaticAberration isFalse` has no equivalent +SC-OP-capture-notinlast s = { { criteria = "captureTime", operation = "notInLast", value = 30, value_units = "days", }, combine = "intersect", } {"match":"all","rules":[{"field":"captureDate","op":"notInLast","value":{"n":30.0,"unit":"day"}}]} +SC-OP-capture-thismonth s = { { criteria = "captureTime", operation = "thisMonth", value = false, }, combine = "intersect", } {"match":"all","rules":[{"field":"captureDate","op":"thisMonth","value":null}]} +SC-OP-capture-thisweek s = { { criteria = "captureTime", operation = "thisWeek", value = false, }, combine = "intersect", } {"match":"all","rules":[{"field":"captureDate","op":"thisWeek","value":null}]} +SC-OP-capture-thisyear s = { { criteria = "captureTime", operation = "thisYear", value = false, }, combine = "intersect", } {"match":"all","rules":[{"field":"captureDate","op":"thisYear","value":null}]} +SC-OP-capture-today s = { { criteria = "captureTime", operation = "today", }, combine = "intersect", } {"match":"all","rules":[{"field":"captureDate","op":"today","value":null}]} +SC-OP-capture-yesterday s = { { criteria = "captureTime", operation = "yesterday", value = false, }, combine = "intersect", } {"match":"all","rules":[{"field":"captureDate","op":"yesterday","value":null}]} +SC-OP-collection-all s = { { criteria = "collection", operation = "all", value = "Holi day", }, combine = "intersect", } {"match":"all","rules":[{"group":{"match":"any","rules":[{"field":"album","op":"is","value":1},{"field":"album","op":"is","value":2}]}}]} +SC-OP-collection-begins s = { { criteria = "collection", operation = "beginsWith", value = "Holi", }, combine = "intersect", } {"match":"all","rules":[{"group":{"match":"any","rules":[{"field":"album","op":"is","value":1},{"field":"album","op":"is","value":2}]}}]} +SC-OP-collection-ends s = { { criteria = "collection", operation = "endsWith", value = "day", }, combine = "intersect", } {"match":"all","rules":[{"field":"album","op":"is","value":1}]} +SC-OP-collection-noneof s = { { criteria = "collection", operation = "noneOf", value = "Holiday", }, combine = "intersect", } static: rule `collection noneOf` has no equivalent +SC-OP-collection-words s = { { criteria = "collection", operation = "words", value = "Holiday", }, combine = "intersect", } {"match":"all","rules":[{"group":{"match":"any","rules":[{"field":"album","op":"is","value":1},{"field":"album","op":"is","value":2}]}}]} +SC-OP-comments-isfalse s = { { criteria = "comments", operation = "isFalse", value = true, }, combine = "intersect", } static: rule `comments isFalse` has no equivalent +SC-OP-copyright-isnot s = { { criteria = "copyrightState", operation = "!=", value = true, }, combine = "intersect", } {"match":"all","rules":[{"field":"copyrightStatus","op":"isNot","value":"copyrighted"}]} +SC-OP-cropped-isfalse s = { { criteria = "cropped", operation = "isFalse", value = true, }, combine = "intersect", } {"match":"all","rules":[{"field":"cropped","op":"is","value":false}]} +SC-OP-depth-isfalse s = { { criteria = "depthMap", operation = "isFalse", value = true, }, combine = "intersect", } static: rule `depthMap isFalse` has no equivalent +SC-OP-edit-after s = { { criteria = "touchTime", operation = ">", value = "2026-11-01", value2 = "2026-11-20", }, combine = "intersect", } {"match":"all","rules":[{"field":"editDate","op":"after","value":"2026-11-01"}]} +SC-OP-edit-before s = { { criteria = "touchTime", operation = "<", value = "2026-12-31", value2 = "2026-11-20", }, combine = "intersect", } {"match":"all","rules":[{"field":"editDate","op":"before","value":"2026-12-31"}]} +SC-OP-edit-between s = { { criteria = "touchTime", operation = "in", value = "2026-11-01", value2 = "2026-11-30", }, combine = "intersect", } {"match":"all","rules":[{"field":"editDate","op":"between","value":["2026-11-01","2026-11-30"]}]} +SC-OP-edit-isfalse s = { { criteria = "edit", operation = "isFalse", value = true, }, combine = "intersect", } {"match":"all","rules":[{"field":"edited","op":"is","value":false}]} +SC-OP-edit-notinlast s = { { criteria = "touchTime", operation = "notInLast", value = 7, value_units = "days", }, combine = "intersect", } {"match":"all","rules":[{"field":"editDate","op":"notInLast","value":{"n":7.0,"unit":"day"}}]} +SC-OP-edit-thismonth s = { { criteria = "touchTime", operation = "thisMonth", value = false, }, combine = "intersect", } {"match":"all","rules":[{"field":"editDate","op":"thisMonth","value":null}]} +SC-OP-edit-thisweek s = { { criteria = "touchTime", operation = "thisWeek", value = false, }, combine = "intersect", } {"match":"all","rules":[{"field":"editDate","op":"thisWeek","value":null}]} +SC-OP-edit-thisyear s = { { criteria = "touchTime", operation = "thisYear", value = false, }, combine = "intersect", } {"match":"all","rules":[{"field":"editDate","op":"thisYear","value":null}]} +SC-OP-edit-today s = { { criteria = "touchTime", operation = "today", }, combine = "intersect", } {"match":"all","rules":[{"field":"editDate","op":"today","value":null}]} +SC-OP-edit-yesterday s = { { criteria = "touchTime", operation = "yesterday", value = false, }, combine = "intersect", } {"match":"all","rules":[{"field":"editDate","op":"yesterday","value":null}]} +SC-OP-exported-before s = { { criteria = "lastExportTimestamp", operation = "<", value = "2027-01-01", value2 = "2026-11-20", }, combine = "intersect", } static: rule `lastExportTimestamp <` has no equivalent +SC-OP-exported-between s = { { criteria = "lastExportTimestamp", operation = "in", value = "2026-01-01", value2 = "2026-12-31", }, combine = "intersect", } static: rule `lastExportTimestamp in` has no equivalent +SC-OP-exported-inlast s = { { criteria = "lastExportTimestamp", operation = "inLast", value = 30, value_units = "days", }, combine = "intersect", } static: rule `lastExportTimestamp inLast` has no equivalent +SC-OP-exported-is s = { { criteria = "lastExportTimestamp", operation = "==", value = "2026-11-19", value2 = "2026-11-19", }, combine = "intersect", } static: rule `lastExportTimestamp ==` has no equivalent +SC-OP-exported-thismonth s = { { criteria = "lastExportTimestamp", operation = "thisMonth", value = false, }, combine = "intersect", } static: rule `lastExportTimestamp thisMonth` has no equivalent +SC-OP-exported-thisweek s = { { criteria = "lastExportTimestamp", operation = "thisWeek", value = false, }, combine = "intersect", } static: rule `lastExportTimestamp thisWeek` has no equivalent +SC-OP-exported-thisyear s = { { criteria = "lastExportTimestamp", operation = "thisYear", value = false, }, combine = "intersect", } static: rule `lastExportTimestamp thisYear` has no equivalent +SC-OP-exported-today s = { { criteria = "lastExportTimestamp", operation = "today", }, combine = "intersect", } static: rule `lastExportTimestamp today` has no equivalent +SC-OP-exported-yesterday s = { { criteria = "lastExportTimestamp", operation = "yesterday", value = false, }, combine = "intersect", } static: rule `lastExportTimestamp yesterday` has no equivalent +SC-OP-fastload-isfalse s = { { criteria = "fastLoadDNG", operation = "isFalse", value = true, }, combine = "intersect", } static: rule `fastLoadDNG isFalse` has no equivalent +SC-OP-filename-all s = { { criteria = "filename", operation = "all", value = "AE04FF3D jpg", }, combine = "intersect", } {"match":"all","rules":[{"group":{"match":"all","rules":[{"field":"fileName","op":"contains","value":"AE04FF3D"},{"field":"fileName","op":"contains","value":"jpg"}]}}]} +SC-OP-filename-noneof s = { { criteria = "filename", operation = "noneOf", value = "AE04FF3D EOSR81", }, combine = "intersect", } {"match":"all","rules":[{"group":{"match":"all","rules":[{"field":"fileName","op":"notContains","value":"AE04FF3D"},{"field":"fileName","op":"notContains","value":"EOSR81"}]}}]} +SC-OP-filetype-isnot s = { { criteria = "fileFormat", operation = "!=", value = "JPG", }, combine = "intersect", } {"match":"all","rules":[{"field":"format","op":"isNot","value":"JPG"}]} +SC-OP-flash-isnot s = { { criteria = "flashFired", operation = "!=", value = true, }, combine = "intersect", } {"match":"all","rules":[{"field":"flash","op":"is","value":false}]} +SC-OP-focal-ge s = { { criteria = "focalLength", operation = ">=", value = 240, value2 = 200, }, combine = "intersect", } {"match":"all","rules":[{"field":"focalLength","op":"gte","value":240.0}]} +SC-OP-focal-is s = { { criteria = "focalLength", operation = "==", value = 240, value2 = 200, }, combine = "intersect", } {"match":"all","rules":[{"field":"focalLength","op":"is","value":240.0}]} +SC-OP-focal-isnot s = { { criteria = "focalLength", operation = "!=", value = 240, value2 = 200, }, combine = "intersect", } {"match":"all","rules":[{"field":"focalLength","op":"isNot","value":240.0}]} +SC-OP-focal-le s = { { criteria = "focalLength", operation = "<=", value = 240, value2 = 200, }, combine = "intersect", } {"match":"all","rules":[{"field":"focalLength","op":"lte","value":240.0}]} +SC-OP-focal-lt s = { { criteria = "focalLength", operation = "<", value = 241, value2 = 200, }, combine = "intersect", } {"match":"all","rules":[{"field":"focalLength","op":"lt","value":241.0}]} +SC-OP-gps-isnot s = { { criteria = "hasGPSData", operation = "!=", value = true, }, combine = "intersect", } {"match":"all","rules":[{"field":"hasGps","op":"is","value":false}]} +SC-OP-hasai-isfalse s = { { criteria = "hasAI", operation = "isFalse", value = true, }, combine = "intersect", } static: rule `hasAI isFalse` has no equivalent +SC-OP-hasgenai-isfalse s = { { criteria = "hasGenAI", operation = "isFalse", value = true, }, combine = "intersect", } static: rule `hasGenAI isFalse` has no equivalent +SC-OP-hdr-isfalse s = { { criteria = "hdrEditMode", operation = "isFalse", value = true, }, combine = "intersect", } static: rule `hdrEditMode isFalse` has no equivalent +SC-OP-iso-between s = { { criteria = "isoSpeedRating", operation = "in", value = 250, value2 = 1000, }, combine = "intersect", } {"match":"all","rules":[{"field":"iso","op":"between","value":[250.0,1000.0]}]} +SC-OP-iso-gt s = { { criteria = "isoSpeedRating", operation = ">", value = 499, }, combine = "intersect", } {"match":"all","rules":[{"field":"iso","op":"gt","value":499.0}]} +SC-OP-iso-is s = { { criteria = "isoSpeedRating", operation = "==", value = 500, }, combine = "intersect", } {"match":"all","rules":[{"field":"iso","op":"is","value":500.0}]} +SC-OP-iso-isnot s = { { criteria = "isoSpeedRating", operation = "!=", value = 500, }, combine = "intersect", } {"match":"all","rules":[{"field":"iso","op":"isNot","value":500.0}]} +SC-OP-iso-le s = { { criteria = "isoSpeedRating", operation = "<=", value = 500, }, combine = "intersect", } {"match":"all","rules":[{"field":"iso","op":"lte","value":500.0}]} +SC-OP-iso-lt s = { { criteria = "isoSpeedRating", operation = "<", value = 501, }, combine = "intersect", } {"match":"all","rules":[{"field":"iso","op":"lt","value":501.0}]} +SC-OP-keywords-begins s = { { criteria = "keywords", operation = "beginsWith", value = "fam", }, combine = "intersect", } {"match":"all","rules":[{"field":"keywords","op":"startsWith","value":"fam"}]} +SC-OP-keywords-noneof s = { { criteria = "keywords", operation = "noneOf", value = "family beach", }, combine = "intersect", } {"match":"all","rules":[{"group":{"match":"all","rules":[{"field":"keywords","op":"notContains","value":"family"},{"field":"keywords","op":"notContains","value":"beach"}]}}]} +SC-OP-keywords-words s = { { criteria = "keywords", operation = "words", value = "family beach", }, combine = "intersect", } {"match":"all","rules":[{"field":"keywords","op":"contains","value":"family beach"}]} +SC-OP-label-isnot s = { { criteria = "labelColor", operation = "!=", value = 1, }, combine = "intersect", } {"match":"all","rules":[{"field":"label","op":"isNot","value":"red"}]} +SC-OP-lenscorr-isfalse s = { { criteria = "profileCorrections", operation = "isFalse", value = true, }, combine = "intersect", } static: rule `profileCorrections isFalse` has no equivalent +SC-OP-likes-isfalse s = { { criteria = "likes", operation = "isFalse", value = true, }, combine = "intersect", } static: rule `likes isFalse` has no equivalent +SC-OP-pick-isnot s = { { criteria = "pick", operation = "!=", value = 1, }, combine = "intersect", } {"match":"all","rules":[{"field":"flag","op":"isNot","value":"pick"}]} +SC-OP-pointcolor-isfalse s = { { criteria = "hasPointColor", operation = "isFalse", value = true, }, combine = "intersect", } static: rule `hasPointColor isFalse` has no equivalent +SC-OP-proof-isfalse s = { { criteria = "isProofCopy", operation = "isFalse", value = true, }, combine = "intersect", } static: rule `isProofCopy isFalse` has no equivalent +SC-OP-rating-between s = { { criteria = "rating", operation = "in", value = 2, value2 = 4, }, combine = "intersect", } {"match":"all","rules":[{"field":"rating","op":"between","value":[2.0,4.0]}]} +SC-OP-rating-gt s = { { criteria = "rating", operation = ">", value = 2, }, combine = "intersect", } {"match":"all","rules":[{"field":"rating","op":"gt","value":2.0}]} +SC-OP-rating-isnot s = { { criteria = "rating", operation = "!=", value = 0, }, combine = "intersect", } {"match":"all","rules":[{"field":"rating","op":"isNot","value":0.0}]} +SC-OP-rating-le s = { { criteria = "rating", operation = "<=", value = 2, }, combine = "intersect", } {"match":"all","rules":[{"field":"rating","op":"lte","value":2.0}]} +SC-OP-rating-lt s = { { criteria = "rating", operation = "<", value = 4, }, combine = "intersect", } {"match":"all","rules":[{"field":"rating","op":"lt","value":4.0}]} +SC-OP-shutter-between s = { { criteria = "shutterSpeed", operation = "in", value = 3.321928, value2 = 13.287712, }, combine = "intersect", } {"match":"all","rules":[{"field":"shutterSpeed","op":"between","value":[0.00009930927567034492,0.10069556162851012]}]} +SC-OP-shutter-ge s = { { criteria = "shutterSpeed", operation = ">=", value = 6.643856, value2 = 0, }, combine = "intersect", } {"match":"all","rules":[{"field":"shutterSpeed","op":"lte","value":0.010069556825134881}]} +SC-OP-shutter-is s = { { criteria = "shutterSpeed", operation = "==", value = 6.643856, value2 = 0, }, combine = "intersect", } {"match":"all","rules":[{"field":"shutterSpeed","op":"between","value":[0.00993092626070234,0.010069556825134881]}]} +SC-OP-shutter-isnot s = { { criteria = "shutterSpeed", operation = "!=", value = 6.643856, value2 = 0, }, combine = "intersect", } {"match":"all","rules":[{"group":{"match":"none","rules":[{"field":"shutterSpeed","op":"between","value":[0.00993092626070234,0.010069556825134881]}]}}]} +SC-OP-shutter-le s = { { criteria = "shutterSpeed", operation = "<=", value = 6.643856, value2 = 0, }, combine = "intersect", } {"match":"all","rules":[{"field":"shutterSpeed","op":"gte","value":0.00993092626070234}]} +SC-OP-shutter-lt s = { { criteria = "shutterSpeed", operation = "<", value = 6.7, value2 = 0, }, combine = "intersect", } {"match":"all","rules":[{"field":"shutterSpeed","op":"gt","value":0.00968521640577333}]} +SC-OP-smartpreview-isfalse s = { { criteria = "proxyStatus", operation = "isFalse", value = true, }, combine = "intersect", } static: rule `proxyStatus isFalse` has no equivalent +SC-OP-snapshots-isfalse s = { { criteria = "snapshots", operation = "isFalse", value = true, }, combine = "intersect", } static: rule `snapshots isFalse` has no equivalent +SC-OP-title-notempty s = { { criteria = "title", operation = "notEmpty", value = "", }, combine = "intersect", } {"match":"all","rules":[{"field":"title","op":"isNotEmpty","value":null}]} +SC-OP-treatment-isnot s = { { criteria = "treatment", operation = "!=", value = "grayscale", }, combine = "intersect", } {"match":"all","rules":[{"field":"treatment","op":"isNot","value":"monochrome"}]} +SC-STRUCT-ALL3 s = { { criteria = "rating", operation = ">=", value = 2, }, { criteria = "keywords", operation = "any", value = "family", }, { criteria = "labelColor", operation = "==", value = 1, }, combine = "intersect", } {"match":"all","rules":[{"field":"rating","op":"gte","value":2.0},{"field":"keywords","op":"contains","value":"family"},{"field":"label","op":"is","value":"red"}]} +SC-STRUCT-ANY3 s = { { criteria = "rating", operation = ">=", value = 4, }, { criteria = "pick", operation = "==", value = -1, }, { criteria = "keywords", operation = "any", value = "raw", }, combine = "union", } {"match":"any","rules":[{"field":"rating","op":"gte","value":4.0},{"field":"flag","op":"is","value":"reject"},{"field":"keywords","op":"contains","value":"raw"}]} +SC-STRUCT-DEEP s = { { criteria = "rating", operation = ">=", value = 2, }, { { criteria = "keywords", operation = "any", value = "family", }, { { criteria = "labelColor", operation = "==", value = 1, }, { criteria = "pick", operation = "==", value = 1, }, combine = "intersect", }, combine = "union", }, combine = "intersect", } {"match":"all","rules":[{"field":"rating","op":"gte","value":2.0},{"group":{"match":"any","rules":[{"field":"keywords","op":"contains","value":"family"},{"group":{"match":"all","rules":[{"field":"label","op":"is","value":"red"},{"field":"flag","op":"is","value":"pick"}]}}]}}]} +SC-STRUCT-NONE2 s = { { criteria = "pick", operation = "==", value = -1, }, { criteria = "labelColor", operation = "==", value = 4, }, combine = "exclude", } {"match":"none","rules":[{"field":"flag","op":"is","value":"reject"},{"field":"label","op":"is","value":"blue"}]} +SC-STRUCT-SAME-ID s = { { criteria = "rating", operation = ">=", value = 2, }, { criteria = "rating", operation = "<=", value = 4, }, combine = "intersect", } {"match":"all","rules":[{"field":"rating","op":"gte","value":2.0},{"field":"rating","op":"lte","value":4.0}]} +SC-STRUCT-SIBLINGS s = { { { criteria = "rating", operation = ">=", value = 3, }, { criteria = "pick", operation = "==", value = 1, }, combine = "intersect", }, { { criteria = "rating", operation = "<=", value = 2, }, { criteria = "pick", operation = "==", value = -1, }, combine = "intersect", }, combine = "union", } {"match":"any","rules":[{"group":{"match":"all","rules":[{"field":"rating","op":"gte","value":3.0},{"field":"flag","op":"is","value":"pick"}]}},{"group":{"match":"all","rules":[{"field":"rating","op":"lte","value":2.0},{"field":"flag","op":"is","value":"reject"}]}}]} +SC-VAL-aiedit-ailook s = { { criteria = "aiEditStatus", operation = "==", value = "aiLook", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-baked s = { { criteria = "aiEditStatus", operation = "==", value = "baked", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-bakedblemish s = { { criteria = "aiEditStatus", operation = "==", value = "bakedBlemish", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-bakeddenoise s = { { criteria = "aiEditStatus", operation = "==", value = "bakedDenoise", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-bakeddust s = { { criteria = "aiEditStatus", operation = "==", value = "bakedDust", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-bakedexpand s = { { criteria = "aiEditStatus", operation = "==", value = "bakedExpand", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-bakedpeople s = { { criteria = "aiEditStatus", operation = "==", value = "bakedPeople", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-bakedrawdetails s = { { criteria = "aiEditStatus", operation = "==", value = "bakedRawDetails", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-bakedreflections s = { { criteria = "aiEditStatus", operation = "==", value = "bakedReflections", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-bakedretouch s = { { criteria = "aiEditStatus", operation = "==", value = "bakedRetouch", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-bakedsuperres s = { { criteria = "aiEditStatus", operation = "==", value = "bakedSuperRes", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-blemish s = { { criteria = "aiEditStatus", operation = "==", value = "blemish", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-dust s = { { criteria = "aiEditStatus", operation = "==", value = "dust", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-expand s = { { criteria = "aiEditStatus", operation = "==", value = "expand", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-lensblur s = { { criteria = "aiEditStatus", operation = "==", value = "lensBlur", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-masking s = { { criteria = "aiEditStatus", operation = "==", value = "masking", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-none s = { { criteria = "aiEditStatus", operation = "==", value = "none", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-people s = { { criteria = "aiEditStatus", operation = "==", value = "people", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-rawdetails s = { { criteria = "aiEditStatus", operation = "==", value = "rawDetails", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-reflections s = { { criteria = "aiEditStatus", operation = "==", value = "reflections", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-retouch s = { { criteria = "aiEditStatus", operation = "==", value = "retouch", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-superres s = { { criteria = "aiEditStatus", operation = "==", value = "superRes", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-aiedit-unknown s = { { criteria = "aiEditStatus", operation = "==", value = "unknown", }, combine = "intersect", } static: rule `aiEditStatus ==` has no equivalent +SC-VAL-filetype-tiff s = { { criteria = "fileFormat", operation = "==", value = "TIFF", }, combine = "intersect", } {"match":"all","rules":[{"field":"format","op":"is","value":"TIFF"}]} +SC-VAL-filetype-video s = { { criteria = "fileFormat", operation = "==", value = "VIDEO", }, combine = "intersect", } {"match":"all","rules":[{"field":"format","op":"is","value":"VIDEO"}]} +SC-VAL-label-green s = { { criteria = "labelColor", operation = "==", value = 3, }, combine = "intersect", } {"match":"all","rules":[{"field":"label","op":"is","value":"green"}]} +SC-VAL-label-purple s = { { criteria = "labelColor", operation = "==", value = 5, }, combine = "intersect", } {"match":"all","rules":[{"field":"label","op":"is","value":"purple"}]} +SC-VAL-label-yellow s = { { criteria = "labelColor", operation = "==", value = 2, }, combine = "intersect", } {"match":"all","rules":[{"field":"label","op":"is","value":"yellow"}]} +SC-VAL-mask-background s = { { criteria = "maskTypeStatus", operation = "==", value = "background", }, combine = "intersect", } static: rule `maskTypeStatus ==` has no equivalent +SC-VAL-mask-brush s = { { criteria = "maskTypeStatus", operation = "==", value = "brush", }, combine = "intersect", } static: rule `maskTypeStatus ==` has no equivalent +SC-VAL-mask-colorrange s = { { criteria = "maskTypeStatus", operation = "==", value = "colorRange", }, combine = "intersect", } static: rule `maskTypeStatus ==` has no equivalent +SC-VAL-mask-depthrange s = { { criteria = "maskTypeStatus", operation = "==", value = "depthRange", }, combine = "intersect", } static: rule `maskTypeStatus ==` has no equivalent +SC-VAL-mask-landscape s = { { criteria = "maskTypeStatus", operation = "==", value = "landscape", }, combine = "intersect", } static: rule `maskTypeStatus ==` has no equivalent +SC-VAL-mask-lineargradient s = { { criteria = "maskTypeStatus", operation = "==", value = "linearGradient", }, combine = "intersect", } static: rule `maskTypeStatus ==` has no equivalent +SC-VAL-mask-luminancerange s = { { criteria = "maskTypeStatus", operation = "==", value = "luminanceRange", }, combine = "intersect", } static: rule `maskTypeStatus ==` has no equivalent +SC-VAL-mask-none s = { { criteria = "maskTypeStatus", operation = "==", value = "none", }, combine = "intersect", } static: rule `maskTypeStatus ==` has no equivalent +SC-VAL-mask-people s = { { criteria = "maskTypeStatus", operation = "==", value = "people", }, combine = "intersect", } static: rule `maskTypeStatus ==` has no equivalent +SC-VAL-mask-radialgradient s = { { criteria = "maskTypeStatus", operation = "==", value = "radialGradient", }, combine = "intersect", } static: rule `maskTypeStatus ==` has no equivalent +SC-VAL-mask-scribble s = { { criteria = "maskTypeStatus", operation = "==", value = "scribble", }, combine = "intersect", } static: rule `maskTypeStatus ==` has no equivalent +SC-VAL-mask-sky s = { { criteria = "maskTypeStatus", operation = "==", value = "sky", }, combine = "intersect", } static: rule `maskTypeStatus ==` has no equivalent +SC-VAL-mask-unknown s = { { criteria = "maskTypeStatus", operation = "==", value = "unknown", }, combine = "intersect", } static: rule `maskTypeStatus ==` has no equivalent diff --git a/docs/changelog/unreleased/2026-12-02-lightroom-smart-collections-more-criteria.md b/docs/changelog/unreleased/2026-12-02-lightroom-smart-collections-more-criteria.md new file mode 100644 index 0000000000..2bf0d14cc8 --- /dev/null +++ b/docs/changelog/unreleased/2026-12-02-lightroom-smart-collections-more-criteria.md @@ -0,0 +1,2 @@ +## Library +- Lightroom catalog import maps more smart-collection criteria to smart albums (shutter speed, flash, camera serial number, alt text, folder words, any searchable text, Has GPS, Has Edits, Cropped, treatment, aspect ratio, copyright status, cropped sizes, numeric colour labels) and a Sublocation rule no longer matches city, state and country. diff --git a/docs/lightroom-catalog-import.md b/docs/lightroom-catalog-import.md index 1e6c9afb95..f7fb3d8f61 100644 --- a/docs/lightroom-catalog-import.md +++ b/docs/lightroom-catalog-import.md @@ -206,14 +206,18 @@ keeps its default colour, and a photo already on an imported `.dcp` keeps it. Li the app's latest rendering process, and photos already in the library keep theirs ([process-versions.md](process-versions.md)). When a recovery archive is saved, it retains source settings/history/snapshots and original smart-collection rules. Smart collections become smart albums when every rule has an exact equivalent: rating, pick -flag, color label, has-adjustments, ISO, focal length and aperture comparisons; text rules on -keywords, filename, camera, lens, title, caption, creator, copyright, location fields and file +flag, color label (the five colours Lightroom stores as 1–5, and none), has-edits, cropped, has-GPS, flash fired / not fired, treatment, aspect ratio, copyright status +(copyrighted), ISO, focal length, aperture and shutter speed comparisons (Lightroom stores shutter speed as log2 of 1/seconds, +so the comparisons flip), cropped long edge, short edge and megapixels; text rules on +keywords, filename, camera, camera serial number, lens, title, caption, alt text, creator, copyright, sublocation +(Lightroom's `location`), city, state, country, folder (contains words only: Lightroom's value is the folder name and ours +is the whole path), any searchable text and file format (contains all / any / none, begins/ends with, is, empty); capture date and edit date (`captureTime` / `touchTime`: is, after, before, in range, in / not in the last N hours, days, weeks, months or years; is today, yesterday, in this week (Monday to Sunday), month or year); collection-name rules (contains all / any, begins/ends with, is), which become "in album" rules for the collections imported with it whose names match (resolved at import: a collection made later isn't picked up by name); and nested match-all / any / -none groups. Any other rule (metadata status, …) keeps the collection as a +none groups. Any other rule (has adjustments, which means differing from the camera default and not has edits; flash with no recorded state; custom label colours; uncropped and cropped width and height; exported; likes and comments; AI, mask and other develop states; metadata status, …) keeps the collection as a regular album with its current membership, and the report names the rule. On reimport an album keeps its kind: an existing smart album keeps its current (possibly edited) rules, and a regular album made by an earlier import stays regular and gains new members, with a warning (delete it and diff --git a/docs/manual-site/src/content/docs/library/import-sources.mdx b/docs/manual-site/src/content/docs/library/import-sources.mdx index b3285e1f0a..d6c7c80604 100644 --- a/docs/manual-site/src/content/docs/library/import-sources.mdx +++ b/docs/manual-site/src/content/docs/library/import-sources.mdx @@ -20,7 +20,7 @@ import Shot from '../../../components/Shot.astro'; - The same options are the parameters of `library.autoImport`. - **Android camera roll**: adding it (first-start question or **Settings ▸ Folders**) makes it a watched source; see [Android](../../platforms/android/). - **Folder polling** (**Settings ▸ Library ▸ Folder Polling**, off by default): on open, look for new, changed or moved files in the library's folders. While it is on, the system also tells the app when something changes in a library folder (macOS, Windows, Linux), and the folder is checked a couple of seconds later; the regular check every few minutes stays, for network shares the system can't watch. Right-click a folder ▸ **Synchronize** does it now. -- **Import Lightroom or Capture One Catalog…** (**File** menu): reads a `.lrcat` or `.cocatalogdb` read-only. Choose **Merge into the open library** or **Create a new library**. Photos, collections, keywords, captions and edits come across; no Lightroom needed. A Lightroom catalog's photos appear as soon as the catalog is read; the original files are read afterwards in the background (**Reading originals** on the activity stack, which you can stop; the rest resumes when the library next opens). Other work on the same drive meanwhile (a Reload, Find Missing, an import review) takes turns with it, so a few files aren't held up behind thousands; while it saves what it has read, the next files are already being read, from several drives at once when they are on several. When it finishes, the result window lists every warning and failure (scroll for the rest); **Copy** copies the whole report. +- **Import Lightroom or Capture One Catalog…** (**File** menu): reads a `.lrcat` or `.cocatalogdb` read-only. Choose **Merge into the open library** or **Create a new library**. Photos, collections, keywords, captions and edits come across; no Lightroom needed. Smart collections become smart albums when every rule has an equivalent here (rating, flags, colour labels, camera, shutter speed, ISO, aspect ratio, cropped size, location, folder words, dates, search text and more); one with a rule that has none (such as Has Adjustments, Exported or Likes) comes across as a regular collection with its current photos, and the import report names the rule. A Lightroom catalog's photos appear as soon as the catalog is read; the original files are read afterwards in the background (**Reading originals** on the activity stack, which you can stop; the rest resumes when the library next opens). Other work on the same drive meanwhile (a Reload, Find Missing, an import review) takes turns with it, so a few files aren't held up behind thousands; while it saves what it has read, the next files are already being read, from several drives at once when they are on several. When it finishes, the result window lists every warning and failure (scroll for the rest); **Copy** copies the whole report. - Saved prints become **Saved Prints** (page size and margins, Single Image / Contact Sheet / Picture Package / Custom Package layouts with each cell's photo, image settings, page options and print job), not plain collections. Reimporting upgrades earlier plain albums once. The import report lists what did not carry over. - From a Capture One catalog, each photo's exposure, brightness, Levels, curves (RGB, red, green, blue), crop, rotation and straighten angle, flips and white balance come across, and so do Highlight, Shadow and Saturation, converted to the app's sliders: Highlight only below zero and Shadow and Saturation in both directions (a positive Saturation on a raw becomes Vibrance), all approximate, each with a line in the result window. A raw whose Capture One film curve is one of your base curve files gets that curve as its base curve with the Built-in colour; the curve files are yours, in the base curve folder, and a missing one is named in the result window. A virtual copy starts from the camera defaults and carries only its own settings. The result window lists every other Capture One setting your photos use (Contrast, White, Black, Clarity, Structure, Color Editor, the luma curve, LCC, local adjustment layers, …) with how many photos use it; those photos keep the rest of their settings. White balance is an approximation; for raws the app edits on its relative white balance scale, the result window marks it as approximate, with the photo count. Importing the same catalog again keeps the settings of photos that have any; photos with only the camera's curve pick up a curve you have added since. - A failed import takes back the photos it added. diff --git a/docs/whats-new/2026-12-02-lightroom-smart-collections-more-criteria.md b/docs/whats-new/2026-12-02-lightroom-smart-collections-more-criteria.md new file mode 100644 index 0000000000..bff390e03b --- /dev/null +++ b/docs/whats-new/2026-12-02-lightroom-smart-collections-more-criteria.md @@ -0,0 +1,5 @@ +### More Lightroom smart collections import as smart albums +- Lightroom smart collections that use shutter speed, flash, camera serial number, alt text, folder words, Any Searchable Text, Has GPS, Has Edits, Cropped, treatment, aspect ratio, copyright status or the cropped long edge, short edge and megapixels now become smart albums instead of regular collections. +- Colour label rules written with Lightroom's own numbers (Red 1 to Purple 5) now import as smart albums too. +- A Lightroom Sublocation rule now matches the sublocation only; it used to search the city, state and country as well. +- A rule with no equivalent here still keeps the collection as a regular one with its current photos, and the import report names the rule. From 136f967b32f2bfab4a25755378c424c7c640e398 Mon Sep 17 00:00:00 2001 From: Clyde C Brown Date: Tue, 1 Dec 2026 10:32:55 -0800 Subject: [PATCH 25/26] #1789: Double-clicking a smart collection opens its editor Co-Authored-By: Claude Sonnet 5.5 --- crates/ui-egui/src/creations_ui.rs | 74 ++++++++++++++++++- ...026-12-02-smart-collection-double-click.md | 2 + .../src/content/docs/library/collections.mdx | 2 +- ...026-12-02-smart-collection-double-click.md | 2 + 4 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 docs/changelog/unreleased/2026-12-02-smart-collection-double-click.md create mode 100644 docs/whats-new/2026-12-02-smart-collection-double-click.md diff --git a/crates/ui-egui/src/creations_ui.rs b/crates/ui-egui/src/creations_ui.rs index 0919d797c7..0b5fb169cf 100644 --- a/crates/ui-egui/src/creations_ui.rs +++ b/crates/ui-egui/src/creations_ui.rs @@ -1,7 +1,8 @@ //! Saved creations in the Collections panel (P3.7): Saved Prints, Books, Slideshows and Web //! Galleries are collections carrying a layout or module settings (`lcc_engine::creations`). //! The panel marks each kind with its own icon; a double-click (or `creation.open {id}`) shows -//! the collection and opens the creation in its module. +//! the collection and opens the creation in its module. A double-click on a smart collection opens +//! its editor instead. //! //! Sources: own design. @@ -70,8 +71,15 @@ fn open(app: &mut LccApp, p: &Value) -> Result { Ok(json!({"id": id, "kind": lcc_engine::creations::kind_name(k), "module": module, "result": r})) } -/// A double-click on a creation's row in the Collections panel. +/// A double-click on a row in the Collections panel: a creation opens, a smart collection opens its +/// editor (as its context menu does), and a regular collection does nothing. pub fn double_clicked(app: &mut LccApp, ctx: &egui::Context, a: &Album) { + if a.is_smart() { + if let Err(e) = app.run("dialog.smartAlbum", json!({"id": a.id.0})) { + app.toast_error(ctx, e); + } + return; + } if kind(a).is_some() && let Err(e) = app.run("creation.open", json!({"id": a.id.0})) { @@ -142,6 +150,68 @@ mod tests { assert_eq!(super::icon(&a), Some(crate::icons::Icon::Printer)); } + /// Press and release the primary button at `at`, as the user's input: one event a frame, so the + /// next click comes a frame apart, as a double-click does. + fn click_at(h: &mut Headless, at: egui::Pos2) { + use egui::{Event, PointerButton}; + let press = |pressed| Event::PointerButton { pos: at, button: PointerButton::Primary, pressed, modifiers: egui::Modifiers::NONE }; + h.app.user_events.extend([press(true), press(false)]); + while !h.app.user_events.is_empty() { + h.step(); + } + } + + /// Double-clicks the row of album `id` in the Collections panel. + fn double_click_row(h: &mut Headless, id: u64) { + let row = format!("source:album:{id}"); + let at = h.app.widgets.iter().find(|(w, _)| *w == row).map(|(_, r)| r.center()).expect("the collection's row is on screen"); + click_at(h, at); + click_at(h, at); + h.settle(T); + } + + /// A double-click on a smart collection's row opens Edit Smart Collection… with its rules; on a + /// regular collection's row it opens nothing. (A saved creation's row goes through the same + /// function; `every_kind_of_creation_opens_in_its_module_with_its_photos` covers the opening.) + #[test] + fn double_clicking_a_collection_row_opens_what_it_is() { + use lcc_catalog::AlbumId; + // taller than demo(): the Collections rows sit at the foot of the sidebar, under its fold + let services = Services { png: None, ..Default::default() }; + let mut h = Headless::new(LccApp::new(lcc_engine::Session::with_demo(), services), [1400.0, 1300.0], 1.0); + h.settle(Duration::from_secs(120)); + ok(&mut h, "module.library", json!({})); + let r = h.request( + "ui.set", + json!({"view": "photoGrid", "leftPanel": true, "sidebar": ["albums", {"id": "byDate", "hidden": true}, {"id": "folders", "hidden": true}, {"id": "keywords", "hidden": true}]}), + T, + ); + assert_eq!(r["ok"], true, "{r}"); + h.settle(T); + let smart = ok( + &mut h, + "album.createSmart", + json!({"name": "Rated", "rules": {"ruleSet": {"rules": [{"field": "rating", "op": "gte", "value": 3}]}}}), + )["id"] + .as_u64() + .expect("smart album id"); + h.settle(T); + + double_click_row(&mut h, smart); + assert_eq!(h.app.session.source, lcc_engine::LibrarySource::Album(AlbumId(smart)), "the clicks reached the row"); + assert!( + matches!(&h.app.ui.dialog, Some(crate::state::Dialog::SmartRules { id: Some(id), name, rules, .. }) + if *id == smart && name == "Rated" && !rules.rules.is_empty()), + "a double-click on a smart collection opens its editor with its name and rules" + ); + h.app.ui.dialog = None; + + let garden = h.app.session.catalog.albums().find(|a| a.name == "Garden").map(|a| a.id.0).expect("the demo's Garden album"); + double_click_row(&mut h, garden); + assert_eq!(h.app.session.source, lcc_engine::LibrarySource::Album(AlbumId(garden)), "the clicks reached the row"); + assert!(h.app.ui.dialog.is_none(), "a double-click on a regular collection opens nothing"); + } + /// P3.7 audit: what MCP sees when it drives the app (`mcp --connect` → `engine.commands` / /// `engine.execute` on the control channel): every module has commands, and one harmless /// command per module runs, headless. diff --git a/docs/changelog/unreleased/2026-12-02-smart-collection-double-click.md b/docs/changelog/unreleased/2026-12-02-smart-collection-double-click.md new file mode 100644 index 0000000000..4e373e974f --- /dev/null +++ b/docs/changelog/unreleased/2026-12-02-smart-collection-double-click.md @@ -0,0 +1,2 @@ +## Library +- Double-clicking a smart collection in the Collections panel now opens Edit Smart Collection… (it did nothing before). diff --git a/docs/manual-site/src/content/docs/library/collections.mdx b/docs/manual-site/src/content/docs/library/collections.mdx index 8564528dc5..b57eee191e 100644 --- a/docs/manual-site/src/content/docs/library/collections.mdx +++ b/docs/manual-site/src/content/docs/library/collections.mdx @@ -25,7 +25,7 @@ import Shot from '../../../components/Shot.astro'; - Match **all**, **any** or **none** of the rules; **+ Rule**, **+ Group** (nested), 75 fields in groups: Rating, Pick Flag, Color Label, Suggested Stars (from Assisted Culling), camera, lens, keyword, capture date, capture month and day of the month (any year), file path, file size, and more. - A smart collection updates itself as photos change. -- **New Smart Collection from Filter…** (`Cmd/Ctrl+Alt+N`) turns the current filter bar into one; **Edit Smart Collection** changes the rules. +- **New Smart Collection from Filter…** (`Cmd/Ctrl+Alt+N`) turns the current filter bar into one; **Edit Smart Collection** changes the rules; double-click a smart collection in the Collections panel to open Edit Smart Collection….