diff --git a/crates/engine/src/cmd/browse.rs b/crates/engine/src/cmd/browse.rs index b24246592ef..53aa01a7d80 100644 --- a/crates/engine/src/cmd/browse.rs +++ b/crates/engine/src/cmd/browse.rs @@ -18,7 +18,7 @@ use serde_json::{Value, json}; use super::{CommandSpec, always, bad, bool_or, cmd, str_param}; use crate::import::{ImportMode, ImportOptions, import_with, is_supported}; -use crate::{Browse, LibrarySource, Result, Session}; +use crate::{Browse, EngineError, LibrarySource, Result, Session}; fn browse(s: &mut Session, p: &Value) -> Result { const C: &str = "library.browse"; @@ -299,10 +299,19 @@ pub fn specs() -> Vec { "Move to Folder", [], None, - "{folder, ids?} — move the photos' files (default: the selection) with their XMP sidecars into `folder` on disk and relink them; virtual copies follow their master; across volumes the file is copied, verified and only then removed; never overwrites (a name taken in `folder` refuses the whole move); missing/offline and Local photos are refused; one undo step (undo moves them back) → {moved, folder}", + "{folder, ids?, skip?} — move the photos' files (default: the selection) with their XMP sidecars into `folder` on disk and relink them; virtual copies follow their master; across volumes the file is copied, verified and only then removed; never overwrites (a name taken in `folder`, or a file that is missing or offline, refuses the whole move unless that photo's id is in `skip`: skipped photos stay put and the rest move); Local photos (and ones with no file) are refused unless skipped; one undo step (undo moves them back) → {moved, folder, skipped: [{id, name, kind: clash|missing|asked}]}", always, move_to_folder ), + cmd!(query + "photo.checkMove", + "Check Move to Folder", + [], + None, + "{folder, ids?} — how `photo.moveToFolder` would go for the photos (default: the selection), without moving anything → {folder, photos, movable, here, problems: [{id, name, kind: clash|missing|unmovable, twin?}]}; photos count as the person sees them (a virtual copy is one, though it moves with its master's file); `here`: already in the folder; a name taken in `folder`, a file that is missing or offline, or a photo that can't move as it is (Local, or no file) or a library photo of the same file as such a photo in the batch, since skipping is by file (`unmovable`) is a problem (pass those ids as `skip` to move the rest); `twin: true` marks a `clash` with another photo of the same move rather than with a file in the folder", + always, + |s, p| crate::move_check::check_command(s, p) + ), cmd!( "library.browse", "Browse Folder", @@ -387,7 +396,7 @@ fn remove_empty_folder(path: &str) -> std::result::Result<(), String> { } /// A folder path parameter without trailing separators (`None` when missing or blank). -fn folder_param<'a>(p: &'a Value, key: &str) -> Option<&'a str> { +pub(crate) fn folder_param<'a>(p: &'a Value, key: &str) -> Option<&'a str> { str_param(p, key).map(|x| x.trim_end_matches(['/', '\\'])).filter(|x| !x.is_empty()) } @@ -417,65 +426,42 @@ fn create_folder(s: &mut Session, p: &Value) -> Result { /// `photo.moveToFolder`: move the photos' files (with their sidecars) into `folder` and relink /// them, as one undo step. Virtual copies follow their master's file. Never overwrites: a name -/// already taken in `folder` refuses the whole move. +/// already taken in `folder`, or a file that is missing or offline, refuses the whole move, +/// unless the photo is in `skip`: those stay where they are and the rest move. Refusals are plain +/// sentences for the person (`photo.checkMove` finds the same problems beforehand). fn move_to_folder(s: &mut Session, p: &Value) -> Result { const C: &str = "photo.moveToFolder"; let folder = folder_param(p, "folder").ok_or_else(|| bad(C, "missing folder"))?; let dir = Path::new(folder); if !dir.is_dir() { - return Err(bad(C, format!("{folder} is not a folder (create it first with folder.create)"))); - } - let ids = s.targets(p)?; + return Err(EngineError::Other(format!( + "“{}” is not a folder (offline, moved or deleted?). Choose another folder", + crate::move_check::folder_name(folder) + ))); + } + let ids = s.targets(p).map_err(|e| match e { + EngineError::BadParams { cmd, msg } if cmd.is_empty() => bad(C, msg), + e => e, + })?; if ids.is_empty() { - return Err(bad(C, "no photos to move: select some or give ids")); - } - let mut plans: Vec = Vec::new(); - let mut taken: std::collections::HashSet = std::collections::HashSet::new(); - let mut clashes: Vec = Vec::new(); - for id in ids { - let ph = s.catalog.photo(id).ok_or_else(|| bad(C, format!("no photo {}", id.0)))?; - if ph.local { - return Err(bad(C, format!("{} is not in the library (Local): add it first", ph.file_name))); - } - let lightcraft_catalog::Source::File { path } = &ph.source else { - return Err(bad(C, format!("{} has no file on disk", ph.file_name))); - }; - if plans.iter().any(|pl| pl.from_path.as_deref() == Some(path.as_str())) { - continue; // a virtual copy of a photo already moving - } - let src = Path::new(path); - if !src.is_file() { - return Err(bad(C, format!("{path} is missing or offline: find it first (Find Missing Photos)"))); - } - let Some(file) = src.file_name() else { return Err(bad(C, format!("{path}: no file name"))) }; - if src.parent() == Some(dir) { - continue; // already there - } - let to = dir.join(file); - let to_s = to.to_string_lossy().to_string(); - if to.exists() || !taken.insert(to_s.to_lowercase()) { - clashes.push(file.to_string_lossy().to_string()); - continue; - } - let name = ph.file_name.clone(); - plans.push(crate::rename::RenamePlan { id: id.0, from: name.clone(), to: name, from_path: Some(path.clone()), to_path: Some(to_s) }); + return Err(EngineError::Other("There are no photos to move. Select some first".into())); } - if !clashes.is_empty() { - let s_ = if clashes.len() == 1 { "" } else { "s" }; - return Err(bad( - C, - format!("{} already in {folder}: nothing was moved. Rename the photo{s_} first or choose another folder", clashes.join(", ")), - )); + let skip = crate::move_check::skip_param(p)?; + let sorted = crate::move_check::sort(s, dir, &ids, &skip, false)?; + if !sorted.problems.is_empty() { + return Err(EngineError::Other(crate::move_check::refusal(folder, &sorted.problems))); } - let n = plans.len(); + let skipped: Vec = sorted.skipped.iter().map(crate::move_check::Left::json).collect(); + let n = sorted.plans.len(); if n == 0 { - return Ok(json!({"moved": 0, "folder": folder})); + return Ok(json!({"moved": 0, "folder": folder, "skipped": skipped})); } let plural = |k: usize| if k == 1 { "" } else { "s" }; let _task = s.activity.start("move", &format!("Moving {n} photo{}", plural(n)), crate::activity::Cancel::No); let name = dir.file_name().map(|f| f.to_string_lossy().to_string()).unwrap_or_else(|| folder.to_string()); - s.apply_file_plans(&crate::rename::RealFs, &plans, &|k| format!("Move {k} Photo{} to “{name}”", plural(k)))?; - Ok(json!({"moved": n, "folder": folder})) + s.apply_file_plans(&crate::rename::RealFs, &sorted.plans, &|k| format!("Move {k} Photo{} to “{name}”", plural(k)))?; + // photos as the person sees them (a virtual copy is one, though it moves with its master's file), not file plans + Ok(json!({"moved": sorted.movable, "folder": folder, "skipped": skipped})) } /// After a folder moved from `from` to `to`: a browsed folder at or below it follows. diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rs index acaa1807009..1765062d530 100644 --- a/crates/engine/src/lib.rs +++ b/crates/engine/src/lib.rs @@ -57,6 +57,7 @@ pub mod media; pub mod memory; pub mod merge; mod model_download; +mod move_check; pub mod open_path; pub mod originals; mod pdf; diff --git a/crates/engine/src/move_check.rs b/crates/engine/src/move_check.rs new file mode 100644 index 00000000000..4898d4df8a4 --- /dev/null +++ b/crates/engine/src/move_check.rs @@ -0,0 +1,297 @@ +//! Sorting the photos of a move to another folder (`photo.moveToFolder`) before anything moves: +//! which ones go, which are in that folder already, and which can't go (a name taken there, the +//! file missing or offline, or a photo that can't move as it is: a Local photo or one with no file, +//! and a library photo of the same file as one in the batch, since skipping is by file). `photo.checkMove` reports the sort so a confirmation can show the +//! problems up front; the move itself uses the same sort, and leaves out the photos it was told +//! to skip (`skip`) instead of refusing the batch for them. +//! +//! Reads the disk (one look at each file and each name) but writes nothing. + +use std::collections::{HashMap, HashSet}; +use std::path::Path; + +use lightcraft_catalog::{PhotoId, Source}; +use serde_json::{Value, json}; + +use crate::cmd::bad; +use crate::rename::RenamePlan; +use crate::{EngineError, Result, Session}; + +const C: &str = "photo.moveToFolder"; + +/// Why a photo can't be moved into the folder. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub(crate) enum Kind { + /// A file of that name is in the folder already, or another photo of the batch brings one. + Clash, + /// The file isn't where the library has it: the disk is offline, or it was moved or deleted. + Missing, + /// A photo that can't move as it is: not in the library (Local, until it is added) or with no + /// file on disk (a demo photo); or a library photo of the same file as such a photo in the batch + /// (skipping is by file). It refuses a move unless it is skipped. Only `photo.checkMove` lists + /// it, as a problem. + Unmovable, + /// Only for a photo told to be skipped that has no problem (any more). + Asked, +} + +impl Kind { + fn word(self) -> &'static str { + match self { + Kind::Clash => "clash", + Kind::Missing => "missing", + Kind::Unmovable => "unmovable", + Kind::Asked => "asked", + } + } +} + +/// One photo that doesn't move: its problem, or that it was skipped. +#[derive(Clone, Debug)] +pub(crate) struct Left { + pub id: PhotoId, + pub file: String, + pub kind: Kind, + /// For a clash: the name is taken by another photo of the same move, not by a file in the folder. + pub twin: bool, +} + +impl Left { + pub(crate) fn json(&self) -> Value { + json!({"id": self.id.0, "name": self.file, "kind": self.kind.word()}) + } + + /// [`Left::json`] for `photo.checkMove`: a clash with another photo of the same move says so + /// (`twin`), since the fix differs from a name taken in the folder. + fn check_json(&self) -> Value { + let mut v = self.json(); + if self.twin { + v["twin"] = json!(true); + } + v + } +} + +/// How the photos of a move sort out. +#[derive(Debug, Default)] +pub(crate) struct Sorted { + /// One per file that moves (a master and its virtual copies move once). + pub plans: Vec, + /// Photos that go (virtual copies counted, as the person sees them). + pub movable: usize, + /// Photos already in the folder. + pub here: usize, + /// Photos that can't go and weren't asked to be skipped: they refuse the move. + pub problems: Vec, + /// Photos the caller asked to leave out, with the problem each has (or [`Kind::Asked`]). + pub skipped: Vec, +} + +#[derive(Clone, Copy)] +enum Fate { + Move, + Here, + /// A file of that name is in the folder. + Clash, + /// Another photo of the same move has the name. + Twin, + Missing, +} + +/// Sort `ids` for a move into `dir`. A photo that isn't in the library or has no file refuses the +/// move as a whole, unless it is in `skip`; with `lenient` (the check) it is listed in `problems` +/// instead of refusing. A name clash or a missing file goes to `problems`, or to +/// `skipped` when its photo is in `skip`. A photo skipped never holds a name in the folder. +pub(crate) fn sort(s: &Session, dir: &Path, ids: &[PhotoId], skip: &HashSet, lenient: bool) -> Result { + // skipping is by file: a virtual copy goes where its master goes + let skip_paths: HashSet = skip + .iter() + .filter_map(|id| match s.catalog.photo(PhotoId(*id)).map(|p| &p.source) { + Some(Source::File { path }) => Some(path.clone()), + _ => None, + }) + .collect(); + let mut out = Sorted::default(); + let mut fates: HashMap = HashMap::new(); + let mut taken: HashSet = HashSet::new(); + // skipped photos that would have moved: their names are checked against the moving ones at the end + let mut pending: Vec<(usize, String)> = Vec::new(); + // the check (which skips nothing yet): the files of the Local photos listed as problems; a + // library photo of the same file is listed as `unmovable` too, because skipping is by file and + // the move would leave it out with them + let local_files: HashSet = if lenient { + ids.iter() + .filter_map(|id| s.catalog.photo(*id)) + .filter(|p| p.local) + .filter_map(|p| match &p.source { + Source::File { path } => Some(path.clone()), + _ => None, + }) + .collect() + } else { + HashSet::new() + }; + for &id in ids { + // (no command named: `execute` puts in the one that was asked for) + let ph = s.catalog.photo(id).ok_or_else(|| bad("", format!("no photo {}", id.0)))?; + let asked = skip.contains(&id.0); + // a photo that can't move as it is (Local, or no file) is refused, or left out when it was told to be skipped + let unmovable = if ph.local { + Some(format!("{} is not in the library (Local): add it to the library first", ph.file_name)) + } else if !matches!(ph.source, Source::File { .. }) { + Some(format!("{} has no file on disk, so it can't be moved", ph.file_name)) + } else { + None + }; + if let Some(why) = unmovable { + let left = Left { id, file: ph.file_name.clone(), kind: if asked { Kind::Asked } else { Kind::Unmovable }, twin: false }; + if asked { + out.skipped.push(left); + } else if lenient { + out.problems.push(left); + } else { + return Err(EngineError::Other(why)); + } + continue; + } + let Source::File { path } = &ph.source else { continue }; + if local_files.contains(path) { + out.problems.push(Left { id, file: ph.file_name.clone(), kind: Kind::Unmovable, twin: false }); + continue; + } + let left_out = asked || skip_paths.contains(path); + let fate = match fates.get(path) { + Some(f) => *f, + None => { + let src = Path::new(path); + let file = src.file_name().ok_or_else(|| EngineError::Other(format!("{path} has no file name")))?; + let to = dir.join(file); + let to_s = to.to_string_lossy().to_string(); + let fate = if !src.is_file() { + Fate::Missing + } else if src.parent() == Some(dir) { + Fate::Here + } else if to.exists() { + Fate::Clash + } else if !left_out && !taken.insert(to_s.to_lowercase()) { + Fate::Twin + } else { + Fate::Move + }; + if matches!(fate, Fate::Move) && !left_out { + let name = ph.file_name.clone(); + out.plans.push(RenamePlan { id: id.0, from: name.clone(), to: name, from_path: Some(path.clone()), to_path: Some(to_s) }); + } + fates.insert(path.clone(), fate); + fate + } + }; + let kind = match fate { + Fate::Clash | Fate::Twin => Kind::Clash, + Fate::Missing => Kind::Missing, + Fate::Move | Fate::Here => Kind::Asked, + }; + let left = Left { id, file: ph.file_name.clone(), kind, twin: matches!(fate, Fate::Twin) }; + match (left_out, fate) { + (true, _) => { + if matches!(fate, Fate::Move) { + pending.push(( + out.skipped.len(), + Path::new(path).file_name().map(|f| dir.join(f).to_string_lossy().to_lowercase()).unwrap_or_default(), + )); + } + out.skipped.push(left); + } + (false, Fate::Move) => out.movable += 1, + (false, Fate::Here) => out.here += 1, + (false, Fate::Clash | Fate::Twin | Fate::Missing) => out.problems.push(left), + } + } + // a skipped photo whose name a moving photo takes is a clash, whichever of the two came first + for (i, name) in pending { + if taken.contains(&name) { + out.skipped[i].kind = Kind::Clash; + out.skipped[i].twin = true; + } + } + Ok(out) +} + +/// The `skip` parameter: photo ids to leave out of the move. +pub(crate) fn skip_param(p: &Value) -> Result> { + match p.get("skip") { + None | Some(Value::Null) => Ok(HashSet::new()), + Some(Value::Array(a)) => a.iter().map(|v| v.as_u64().ok_or_else(|| bad(C, "`skip` must be photo ids (whole numbers)"))).collect(), + Some(_) => Err(bad(C, "`skip` must be photo ids (whole numbers)")), + } +} + +/// The folder as a person names it: its last part. +pub(crate) fn folder_name(folder: &str) -> String { + Path::new(folder).file_name().map_or_else(|| folder.to_string(), |f| f.to_string_lossy().to_string()) +} + +/// The file names of `of`, each once, in order. +fn unique_names(of: &[&Left]) -> Vec { + let mut seen = HashSet::new(); + of.iter().filter(|l| seen.insert(l.file.as_str())).map(|l| l.file.clone()).collect() +} + +/// Up to three names, then "and N more". +fn names(of: &[String]) -> String { + let shown = &of[..of.len().min(3)]; + match of.len() - shown.len() { + 0 => shown.join(", "), + more => format!("{} and {more} more", shown.join(", ")), + } +} + +/// Why a move with `problems` was refused, in plain words with what to do about it. +pub(crate) fn refusal(folder: &str, problems: &[Left]) -> String { + let of = + |kind: Kind, twin: bool| -> Vec { unique_names(&problems.iter().filter(|l| l.kind == kind && l.twin == twin).collect::>()) }; + let (clashes, twins, missing) = (of(Kind::Clash, false), of(Kind::Clash, true), of(Kind::Missing, false)); + let verb = |n: usize| if n == 1 { "is" } else { "are" }; + let dest = folder_name(folder); + let mut text = String::from("Nothing was moved. "); + if !clashes.is_empty() { + text += &format!("{} {} already in “{dest}”. ", names(&clashes), verb(clashes.len())); + } + if !twins.is_empty() { + text += &format!("More than one photo being moved is named {}, and only one of each name can go into “{dest}”. ", names(&twins)); + } + if !missing.is_empty() { + text += &format!("{} {} missing or offline. ", names(&missing), verb(missing.len())); + } + let mut fixes = Vec::new(); + if !clashes.is_empty() || !twins.is_empty() { + fixes.push("rename the clashing photos"); + } + if !missing.is_empty() { + fixes.push("reconnect the disk or use File → Find Missing Photos…"); + } + text += &format!("To go on: {}, or leave these photos out of the move.", fixes.join(", ")); + text +} + +/// `photo.checkMove`: how a move of the photos (default: the selection) into `folder` would go, +/// without moving anything. +pub(crate) fn check_command(s: &Session, p: &Value) -> Result { + let folder = crate::cmd::browse::folder_param(p, "folder").ok_or_else(|| bad("photo.checkMove", "missing folder"))?; + let dir = Path::new(folder); + if !dir.is_dir() { + return Err(EngineError::Other(format!("“{}” is not a folder (offline, moved or deleted?)", folder_name(folder)))); + } + let ids = s.targets(p).map_err(|e| match e { + EngineError::BadParams { cmd, msg } if cmd.is_empty() => bad("photo.checkMove", msg), + e => e, + })?; + let sorted = sort(s, dir, &ids, &HashSet::new(), true)?; + Ok(json!({ + "folder": folder, + "photos": ids.len(), + "movable": sorted.movable, + "here": sorted.here, + "problems": sorted.problems.iter().map(Left::check_json).collect::>(), + })) +} diff --git a/crates/engine/src/tests/folders.rs b/crates/engine/src/tests/folders.rs index 34017fc9776..270c9af7fbc 100644 --- a/crates/engine/src/tests/folders.rs +++ b/crates/engine/src/tests/folders.rs @@ -650,6 +650,23 @@ fn photos_move_to_another_folder_with_their_sidecars_and_back_on_undo() { assert_eq!(file_of(&s, b), dir.path("out/b.jpg")); } +#[test] +fn a_move_counts_photos_as_the_person_sees_them_not_files() { + let dir = Scratch::new("move-count"); + std::fs::create_dir_all(dir.0.join("in")).unwrap(); + std::fs::create_dir_all(dir.0.join("out")).unwrap(); + let mut s = Session::new(); + let a = add_file(&mut s, &dir.path("in/a.jpg"), "A"); + let b = add_file(&mut s, &dir.path("in/b.jpg"), "B"); + // a virtual copy shares its master's file: two photos, one file + let vc = s.catalog.alloc_photo_id(); + let p = Photo::new(vc, Source::File { path: dir.path("in/a.jpg") }, "a.jpg", "JPEG", 60, 40, "2026-01-01T10:00:00"); + s.catalog.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap(); + let r = s.execute("photo.moveToFolder", &json!({"ids": [a.0, vc.0, b.0], "folder": dir.path("out")})).unwrap(); + assert_eq!(r["moved"], 3, "{r}"); + assert_eq!(file_of(&s, vc), dir.path("out/a.jpg")); +} + #[test] fn a_name_taken_in_the_destination_refuses_the_move_and_overwrites_nothing() { let dir = Scratch::new("move-clash"); @@ -660,7 +677,9 @@ fn a_name_taken_in_the_destination_refuses_the_move_and_overwrites_nothing() { let b = add_file(&mut s, &dir.path("in/b.jpg"), "B"); std::fs::write(dir.path("out/b.jpg"), "OTHER").unwrap(); let e = s.execute("photo.moveToFolder", &json!({"ids": [a.0, b.0], "folder": dir.path("out")})).unwrap_err().to_string(); - assert!(e.contains("b.jpg already in") && e.contains("nothing was moved"), "{e}"); + assert!(e.contains("b.jpg is already in") && e.contains("Nothing was moved"), "{e}"); + assert!(!e.contains("invalid parameters") && !e.contains('`'), "plain words for the person: {e}"); + assert!(e.contains("leave these photos out of the move"), "it says what can be done: {e}"); assert_eq!(std::fs::read_to_string(dir.path("out/b.jpg")).unwrap(), "OTHER"); assert!(dir.0.join("in/a.jpg").is_file() && !dir.0.join("out/a.jpg").exists(), "all or nothing"); assert_eq!(file_of(&s, a), dir.path("in/a.jpg")); @@ -673,12 +692,241 @@ fn moving_to_a_missing_folder_or_a_missing_original_is_refused() { let mut s = Session::new(); let a = add_file(&mut s, &dir.path("in/a.jpg"), "A"); let e = s.execute("photo.moveToFolder", &json!({"ids": [a.0], "folder": dir.path("nope")})).unwrap_err().to_string(); - assert!(e.contains("not a folder"), "{e}"); + assert!(e.contains("not a folder") && !e.contains("invalid parameters") && !e.contains('`'), "{e}"); + assert!(e.contains("“nope”") && !e.contains(&dir.path("nope")), "the folder is named, not shown as a path: {e}"); std::fs::create_dir_all(dir.0.join("out")).unwrap(); std::fs::remove_file(dir.path("in/a.jpg")).unwrap(); let e = s.execute("photo.moveToFolder", &json!({"ids": [a.0], "folder": dir.path("out")})).unwrap_err().to_string(); - assert!(e.contains("missing or offline"), "{e}"); + assert!(e.contains("a.jpg is missing or offline"), "{e}"); + assert!(e.contains("use File → Find Missing Photos…") && !e.contains('▸'), "the menu path uses → (no UI font has ▸, which draws as a box): {e}"); + assert!(!e.contains("invalid parameters") && !e.contains('`'), "plain words for the person: {e}"); + assert_eq!(file_of(&s, a), dir.path("in/a.jpg")); +} + +/// in/{a,b,c}.jpg, out/b.jpg already taken; ids a, b, c. +fn clash_setup(name: &str) -> (Scratch, Session, [lightcraft_catalog::PhotoId; 3]) { + let dir = Scratch::new(name); + std::fs::create_dir_all(dir.0.join("in")).unwrap(); + std::fs::create_dir_all(dir.0.join("out")).unwrap(); + let mut s = Session::new(); + let a = add_file(&mut s, &dir.path("in/a.jpg"), "A"); + let b = add_file(&mut s, &dir.path("in/b.jpg"), "B"); + let c = add_file(&mut s, &dir.path("in/c.jpg"), "C"); + std::fs::write(dir.path("out/b.jpg"), "OTHER").unwrap(); + (dir, s, [a, b, c]) +} + +#[test] +fn the_photos_told_to_skip_stay_and_the_rest_move_in_one_undo_step() { + let (dir, mut s, [a, b, c]) = clash_setup("move-skip"); + let r = s.execute("photo.moveToFolder", &json!({"ids": [a.0, b.0, c.0], "skip": [b.0], "folder": dir.path("out")})).unwrap(); + assert_eq!(r["moved"], 2); + assert_eq!(r["skipped"], json!([{"id": b.0, "name": "b.jpg", "kind": "clash"}])); + assert_eq!(file_of(&s, a), dir.path("out/a.jpg")); + assert_eq!(file_of(&s, c), dir.path("out/c.jpg")); + assert_eq!(file_of(&s, b), dir.path("in/b.jpg"), "the skipped photo stays"); + assert_eq!(std::fs::read_to_string(dir.path("out/b.jpg")).unwrap(), "OTHER"); + assert!(dir.0.join("in/b.jpg").is_file()); + s.execute("edit.undo", &json!({})).unwrap(); + assert!(dir.0.join("in/a.jpg").is_file() && dir.0.join("in/c.jpg").is_file() && !dir.0.join("out/a.jpg").exists()); +} + +#[test] +fn a_problem_that_was_not_skipped_still_refuses_the_whole_move() { + let (dir, mut s, [a, b, c]) = clash_setup("move-skip-other"); + std::fs::remove_file(dir.path("in/c.jpg")).unwrap(); + // b is skipped; c went missing since the check, and nobody said to skip it + let e = s.execute("photo.moveToFolder", &json!({"ids": [a.0, b.0, c.0], "skip": [b.0], "folder": dir.path("out")})).unwrap_err().to_string(); + assert!(e.contains("c.jpg is missing or offline") && !e.contains("b.jpg"), "{e}"); + assert!(dir.0.join("in/a.jpg").is_file() && !dir.0.join("out/a.jpg").exists(), "all or nothing for the rest"); +} + +#[test] +fn a_missing_file_is_skipped_like_a_clash_and_skipping_everything_moves_nothing() { + let (dir, mut s, [a, b, c]) = clash_setup("move-skip-missing"); + std::fs::remove_file(dir.path("in/c.jpg")).unwrap(); + let r = s.execute("photo.moveToFolder", &json!({"ids": [a.0, b.0, c.0], "skip": [c.0, b.0], "folder": dir.path("out")})).unwrap(); + assert_eq!(r["moved"], 1); + let kinds: Vec<_> = r["skipped"].as_array().unwrap().iter().map(|x| (x["name"].as_str().unwrap(), x["kind"].as_str().unwrap())).collect(); + assert_eq!(kinds, [("b.jpg", "clash"), ("c.jpg", "missing")]); + // nothing left to move: no undo step, no activity row + let (undo, journal) = (s.undo.len(), s.journal.len()); + let r = s.execute("photo.moveToFolder", &json!({"ids": [b.0, c.0], "skip": [c.0, b.0], "folder": dir.path("out")})).unwrap(); + assert_eq!(r["moved"], 0); + assert_eq!(r["skipped"].as_array().unwrap().len(), 2); + assert_eq!(s.undo.len(), undo, "no undo step for a move of nothing"); + assert!(s.activity.list().is_empty()); + assert_eq!(file_of(&s, a), dir.path("out/a.jpg")); + assert_eq!(s.journal.len(), journal + 1, "the move is journaled, as a command that changed something"); + assert!(s.execute("photo.moveToFolder", &json!({"ids": [a.0], "skip": "a", "folder": dir.path("out")})).is_err(), "skip is a list of ids"); +} + +#[test] +fn skipping_one_of_two_photos_with_the_same_name_lets_the_other_go() { + let dir = Scratch::new("move-skip-batch-clash"); + for d in ["x", "y", "out"] { + std::fs::create_dir_all(dir.0.join(d)).unwrap(); + } + let mut s = Session::new(); + let first = add_file(&mut s, &dir.path("x/a.jpg"), "X"); + let second = add_file(&mut s, &dir.path("y/a.jpg"), "Y"); + let ids = json!([first.0, second.0]); + let e = s.execute("photo.moveToFolder", &json!({"ids": ids, "folder": dir.path("out")})).unwrap_err().to_string(); + assert!(e.contains("More than one photo being moved is named a.jpg") && !e.contains("already in"), "{e}"); + let r = s.execute("photo.moveToFolder", &json!({"ids": ids, "skip": [first.0], "folder": dir.path("out")})).unwrap(); + assert_eq!(r["moved"], 1, "a skipped photo doesn't keep its name taken"); + assert_eq!(r["skipped"], json!([{"id": first.0, "name": "a.jpg", "kind": "clash"}]), "a clash whichever of the two is skipped"); + assert_eq!(std::fs::read_to_string(dir.path("out/a.jpg")).unwrap(), "Y"); + assert_eq!(file_of(&s, first), dir.path("x/a.jpg")); +} + +#[test] +fn a_local_photo_refuses_the_move_unless_it_is_skipped() { + let (dir, mut s, [a, b, _]) = clash_setup("move-skip-local"); + std::fs::write(dir.path("in/l.jpg"), "L").unwrap(); + let local = s.catalog.alloc_photo_id(); + let mut p = Photo::new(local, Source::File { path: dir.path("in/l.jpg") }, "l.jpg", "JPEG", 60, 40, "2026-01-01T10:00:00"); + p.local = true; + s.catalog.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap(); + let mv = |s: &mut Session, skip: Vec| { + s.execute("photo.moveToFolder", &json!({"ids": [a.0, b.0, local.0], "skip": skip, "folder": dir.path("out")})) + }; + let e = mv(&mut s, vec![b.0]).unwrap_err().to_string(); + assert!(e.contains("l.jpg is not in the library"), "{e}"); + // left out like any other photo that was told to be skipped + let r = mv(&mut s, vec![b.0, local.0]).unwrap(); + assert_eq!(r["moved"], 1); + let kinds: Vec<_> = + r["skipped"].as_array().unwrap().iter().map(|x| (x["name"].as_str().unwrap().to_string(), x["kind"].as_str().unwrap().to_string())).collect(); + assert_eq!(kinds, [("b.jpg".to_string(), "clash".to_string()), ("l.jpg".to_string(), "asked".to_string())]); + assert!(dir.0.join("in/l.jpg").is_file() && dir.0.join("out/a.jpg").is_file()); +} + +#[test] +fn skipping_a_local_photo_leaves_out_a_library_photo_of_the_same_file_and_a_photo_without_a_file_can_be_skipped() { + let (dir, mut s, [a, _, _]) = clash_setup("move-skip-shared"); + let lib = add_file(&mut s, &dir.path("in/l.jpg"), "L"); + let local = s.catalog.alloc_photo_id(); + let mut p = Photo::new(local, Source::File { path: dir.path("in/l.jpg") }, "l.jpg", "JPEG", 60, 40, "2026-01-01T10:00:00"); + p.local = true; + s.catalog.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap(); + // the check says up front what skipping the Local photo will do to the library photo of the same file + let c = s.execute("photo.checkMove", &json!({"ids": [lib.0, local.0], "folder": dir.path("out")})).unwrap(); + let listed: Vec<_> = c["problems"].as_array().unwrap().iter().map(|x| (x["id"].as_u64().unwrap(), x["kind"].as_str().unwrap())).collect(); + assert_eq!((c["movable"].as_u64(), listed), (Some(0), vec![(lib.0, "unmovable"), (local.0, "unmovable")]), "{c}"); + let r = s.execute("photo.moveToFolder", &json!({"ids": [lib.0, local.0], "skip": [local.0], "folder": dir.path("out")})).unwrap(); + // the file is one: leaving the Local photo out leaves the library photo of it out too, so it can't move unreported + assert_eq!(r["moved"], 0); + assert_eq!(r["skipped"].as_array().unwrap().len(), 2); + assert!(dir.0.join("in/l.jpg").is_file() && !dir.0.join("out/l.jpg").exists()); + assert_eq!(file_of(&s, lib), dir.path("in/l.jpg")); + // a photo with no file (a demo scene) can't move: it refuses the move unless it is skipped + let demo = s.catalog.alloc_photo_id(); + let p = Photo::new(demo, Source::Demo { scene: 0 }, "d.jpg", "JPEG", 60, 40, "2026-01-01T10:00:00"); + s.catalog.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap(); + let e = s.execute("photo.moveToFolder", &json!({"ids": [a.0, demo.0], "folder": dir.path("out")})).unwrap_err().to_string(); + assert!(e.contains("d.jpg has no file on disk"), "{e}"); + let r = s.execute("photo.moveToFolder", &json!({"ids": [a.0, demo.0], "skip": [demo.0], "folder": dir.path("out")})).unwrap(); + assert_eq!(r["moved"], 1); + assert_eq!(r["skipped"], json!([{"id": demo.0, "name": "d.jpg", "kind": "asked"}])); +} + +#[test] +fn a_photo_skipped_for_sharing_a_name_with_another_of_the_move_is_reported_as_a_clash() { + let dir = Scratch::new("move-skip-twin"); + for d in ["x", "y", "out"] { + std::fs::create_dir_all(dir.0.join(d)).unwrap(); + } + let mut s = Session::new(); + let first = add_file(&mut s, &dir.path("x/a.jpg"), "X"); + let second = add_file(&mut s, &dir.path("y/a.jpg"), "Y"); + let r = s.execute("photo.moveToFolder", &json!({"ids": [first.0, second.0], "skip": [second.0], "folder": dir.path("out")})).unwrap(); + assert_eq!(r["moved"], 1); + assert_eq!(r["skipped"], json!([{"id": second.0, "name": "a.jpg", "kind": "clash"}])); + assert_eq!(std::fs::read_to_string(dir.path("out/a.jpg")).unwrap(), "X"); +} + +#[test] +fn checking_a_move_marks_two_photos_of_one_name_as_twins_and_a_name_taken_in_the_folder_as_not() { + let dir = Scratch::new("move-check-twin"); + for d in ["x", "y", "out"] { + std::fs::create_dir_all(dir.0.join(d)).unwrap(); + } + let mut s = Session::new(); + let first = add_file(&mut s, &dir.path("x/a.jpg"), "X"); + let second = add_file(&mut s, &dir.path("y/a.jpg"), "Y"); + let taken = add_file(&mut s, &dir.path("x/t.jpg"), "T"); + std::fs::write(dir.path("out/t.jpg"), "other").unwrap(); + let r = s.execute("photo.checkMove", &json!({"ids": [first.0, second.0, taken.0], "folder": dir.path("out")})).unwrap(); + assert_eq!( + r["problems"], + json!([{"id": second.0, "name": "a.jpg", "kind": "clash", "twin": true}, {"id": taken.0, "name": "t.jpg", "kind": "clash"}]), + "{r}" + ); +} + +#[test] +fn the_refusal_names_a_file_once_even_when_a_virtual_copy_shares_it() { + let (dir, mut s, [_, _, c]) = clash_setup("move-refusal-names"); + let vc = s.catalog.alloc_photo_id(); + let p = Photo::new(vc, Source::File { path: dir.path("in/c.jpg") }, "c.jpg", "JPEG", 60, 40, "2026-01-01T10:00:00"); + s.catalog.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap(); + std::fs::remove_file(dir.path("in/c.jpg")).unwrap(); + let e = s.execute("photo.moveToFolder", &json!({"ids": [c.0, vc.0], "folder": dir.path("out")})).unwrap_err().to_string(); + assert!(e.contains("c.jpg is missing or offline") && !e.contains("c.jpg, c.jpg") && !e.contains("are missing"), "{e}"); +} + +#[test] +fn checking_a_move_lists_a_local_photo_and_one_without_a_file_so_they_can_be_skipped() { + let (dir, mut s, [a, _, _]) = clash_setup("move-check-unmovable"); + std::fs::write(dir.path("in/l.jpg"), "L").unwrap(); + let local = s.catalog.alloc_photo_id(); + let mut p = Photo::new(local, Source::File { path: dir.path("in/l.jpg") }, "l.jpg", "JPEG", 60, 40, "2026-01-01T10:00:00"); + p.local = true; + s.catalog.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap(); + let demo = s.catalog.alloc_photo_id(); + let p = Photo::new(demo, Source::Demo { scene: 0 }, "d.jpg", "JPEG", 60, 40, "2026-01-01T10:00:00"); + s.catalog.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap(); + let ids = json!([a.0, local.0, demo.0]); + // the check lists them, it doesn't fail: that is how the person (or an agent) learns what to skip + let r = s.execute("photo.checkMove", &json!({"ids": ids, "folder": dir.path("out")})).unwrap(); + assert_eq!((r["photos"].as_u64(), r["movable"].as_u64()), (Some(3), Some(1)), "{r}"); + let problems: Vec<_> = r["problems"].as_array().unwrap().iter().map(|x| (x["id"].as_u64().unwrap(), x["kind"].as_str().unwrap())).collect(); + assert_eq!(problems, [(local.0, "unmovable"), (demo.0, "unmovable")]); + // the move without a skip still refuses, and with exactly those skipped it goes + assert!(s.execute("photo.moveToFolder", &json!({"ids": ids, "folder": dir.path("out")})).is_err()); + let r = s.execute("photo.moveToFolder", &json!({"ids": ids, "skip": [local.0, demo.0], "folder": dir.path("out")})).unwrap(); + assert_eq!(r["moved"], 1); +} + +#[test] +fn checking_a_move_lists_the_problems_and_touches_nothing() { + let (dir, mut s, [a, b, c]) = clash_setup("move-check"); + let d = add_file(&mut s, &dir.path("out/d.jpg"), "D"); // in the folder already + // a virtual copy of the clashing photo has the same problem + let vc = s.catalog.alloc_photo_id(); + let p = Photo::new(vc, Source::File { path: dir.path("in/b.jpg") }, "b.jpg", "JPEG", 60, 40, "2026-01-01T10:00:00"); + s.catalog.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap(); + std::fs::remove_file(dir.path("in/c.jpg")).unwrap(); + let r = s.execute("photo.checkMove", &json!({"ids": [a.0, b.0, c.0, d.0, vc.0], "folder": dir.path("out")})).unwrap(); + assert_eq!((r["photos"].as_u64(), r["movable"].as_u64(), r["here"].as_u64()), (Some(5), Some(1), Some(1)), "{r}"); + let problems: Vec<_> = r["problems"].as_array().unwrap().iter().map(|x| (x["id"].as_u64().unwrap(), x["kind"].as_str().unwrap())).collect(); + assert_eq!(problems, [(b.0, "clash"), (c.0, "missing"), (vc.0, "clash")]); + assert!(dir.0.join("in/a.jpg").is_file() && !dir.0.join("out/a.jpg").exists(), "nothing moved"); assert_eq!(file_of(&s, a), dir.path("in/a.jpg")); + assert!(s.activity.list().is_empty(), "no activity row for a look"); + assert!(s.journal.is_empty(), "a look isn't a recorded command"); + // an id the library doesn't have names the command that was asked for + let e = s.execute("photo.checkMove", &json!({"ids": [999_999], "folder": dir.path("out")})).unwrap_err().to_string(); + assert!(e.contains("photo.checkMove") && e.contains("no photo 999999"), "{e}"); + // the move with exactly those skipped goes through + let r = + s.execute("photo.moveToFolder", &json!({"ids": [a.0, b.0, c.0, d.0, vc.0], "skip": [b.0, c.0, vc.0], "folder": dir.path("out")})).unwrap(); + assert_eq!(r["moved"], 1); + assert_eq!(r["skipped"].as_array().unwrap().len(), 3); + // a folder that isn't there is said in plain words too + let e = s.execute("photo.checkMove", &json!({"ids": [a.0], "folder": dir.path("nope")})).unwrap_err().to_string(); + assert!(e.contains("not a folder") && !e.contains('`'), "{e}"); } #[cfg(unix)] diff --git a/crates/ui-egui/locales/cs-formats.json b/crates/ui-egui/locales/cs-formats.json index 1eb882f09d4..256ebd81f22 100644 --- a/crates/ui-egui/locales/cs-formats.json +++ b/crates/ui-egui/locales/cs-formats.json @@ -305,5 +305,13 @@ "Could not read {name}: {e}": "Soubor {name} se nepodařilo přečíst: {e}", "Added {n} photo{}": "Přidáno fotografií: {n}{:.0}", "Where should the Lightroom catalog “{catalog}” go?": "Kam má jít katalog Lightroomu „{catalog}“?", - "Merge into the open library “{library}” ({count} photo{})": "Sloučit s otevřenou knihovnou „{library}“ (fotografie: {count}{:.0})" + "Merge into the open library “{library}” ({count} photo{})": "Sloučit s otevřenou knihovnou „{library}“ (fotografie: {count}{:.0})", + "These can't be moved to “{}”:": "Do „{0}“ nelze přesunout:", + "{} is already in “{}”": "{0} už je ve složce „{1}“", + "{} is missing or offline": "{0} chybí nebo je offline", + "and {n} more": "a dalších: {n}", + "Move {n}, skip {m}": "Přesunout {n}, přeskočit {m}", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "Do „{1}“ přesunuto fotografií: {n}{0:.0}, přeskočeno: {skipped}. Úpravy → Zpět je vrátí.", + "{} can't be moved": "{0} nelze přesunout", + "{} has the same name as another photo being moved": "{0} má stejný název jako jiná přesouvaná fotografie" } diff --git a/crates/ui-egui/locales/cs.json b/crates/ui-egui/locales/cs.json index 52ca94a524d..6a211cc12f8 100644 --- a/crates/ui-egui/locales/cs.json +++ b/crates/ui-egui/locales/cs.json @@ -2408,5 +2408,8 @@ "Import dropped files without review": "Importovat přetažené soubory bez kontroly", "An import is running": "Import už běží", "An import is running. Drop photos when it has finished": "Import už běží. Fotky přetáhněte, až skončí", - "Finish Lightroom catalog import before adding photos": "Dokončete import katalogu Lightroom, než přidáte fotky" + "Finish Lightroom catalog import before adding photos": "Dokončete import katalogu Lightroom, než přidáte fotky", + "Rename a clashing photo, or choose another folder, to move it too.": "Kolidující fotografii přejmenujte nebo zvolte jinou složku, a půjde přesunout.", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "Znovu připojte disk nebo použijte Soubor → Najít chybějící fotografie… a zkuste to znovu.", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "Fotografii bez souboru nelze přesunout. Místní fotografii lze, jakmile použijete Přidat do mých fotografií." } diff --git a/crates/ui-egui/locales/de-formats.json b/crates/ui-egui/locales/de-formats.json index 79390f13647..ab4501490d7 100644 --- a/crates/ui-egui/locales/de-formats.json +++ b/crates/ui-egui/locales/de-formats.json @@ -305,5 +305,13 @@ "Could not read {name}: {e}": "{name} konnte nicht gelesen werden: {e}", "Added {n} photo{}": "{n} Foto{} hinzugefügt", "Where should the Lightroom catalog “{catalog}” go?": "Wohin soll der Lightroom-Katalog „{catalog}“?", - "Merge into the open library “{library}” ({count} photo{})": "Mit der geöffneten Bibliothek „{library}“ zusammenführen ({count} Foto{})" + "Merge into the open library “{library}” ({count} photo{})": "Mit der geöffneten Bibliothek „{library}“ zusammenführen ({count} Foto{})", + "These can't be moved to “{}”:": "Diese lassen sich nicht nach „{0}“ verschieben:", + "{} is already in “{}”": "{0} ist bereits in „{1}“", + "{} is missing or offline": "{0} fehlt oder ist offline", + "and {n} more": "und {n} weitere", + "Move {n}, skip {m}": "{n} verschieben, {m} überspringen", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "{n} Foto{0} nach „{1}“ verschoben, {skipped} übersprungen. Bearbeiten → Rückgängig holt sie zurück.", + "{} can't be moved": "{0} lässt sich nicht verschieben", + "{} has the same name as another photo being moved": "{0} hat denselben Namen wie ein anderes Foto, das verschoben wird" } diff --git a/crates/ui-egui/locales/de.json b/crates/ui-egui/locales/de.json index e2205db782f..a6c5db8fd38 100644 --- a/crates/ui-egui/locales/de.json +++ b/crates/ui-egui/locales/de.json @@ -3440,5 +3440,8 @@ "Import dropped files without review": "Abgelegte Dateien ohne Prüfung importieren", "An import is running": "Ein Import läuft", "An import is running. Drop photos when it has finished": "Ein Import läuft. Lege die Fotos ab, wenn er fertig ist", - "Finish Lightroom catalog import before adding photos": "Schließe den Import des Lightroom-Katalogs ab, bevor du Fotos hinzufügst" + "Finish Lightroom catalog import before adding photos": "Schließe den Import des Lightroom-Katalogs ab, bevor du Fotos hinzufügst", + "Rename a clashing photo, or choose another folder, to move it too.": "Benenne das Foto mit dem gleichen Namen um oder wähle einen anderen Ordner, dann kann es mitkommen.", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "Verbinde den Datenträger wieder oder nutze Datei → Fehlende Fotos suchen… und versuche es dann erneut.", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "Ein Foto ohne Datei lässt sich nicht verschieben. Ein lokales Foto schon, sobald du Zu „Meine Fotos“ hinzufügen verwendest." } diff --git a/crates/ui-egui/locales/es-formats.json b/crates/ui-egui/locales/es-formats.json index 33e5f52fc6e..45d414ef832 100644 --- a/crates/ui-egui/locales/es-formats.json +++ b/crates/ui-egui/locales/es-formats.json @@ -305,5 +305,13 @@ "Could not read {name}: {e}": "No se pudo leer {name}: {e}", "Added {n} photo{}": "{n} foto{0} añadida{0}", "Where should the Lightroom catalog “{catalog}” go?": "¿Dónde debe ir el catálogo de Lightroom “{catalog}”?", - "Merge into the open library “{library}” ({count} photo{})": "Combinar con la biblioteca abierta “{library}” ({count} foto{})" + "Merge into the open library “{library}” ({count} photo{})": "Combinar con la biblioteca abierta “{library}” ({count} foto{})", + "These can't be moved to “{}”:": "No se pueden mover a “{0}”:", + "{} is already in “{}”": "{0} ya está en “{1}”", + "{} is missing or offline": "{0} falta o está sin conexión", + "and {n} more": "y {n} más", + "Move {n}, skip {m}": "Mover {n}, omitir {m}", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "{n} foto{0} movida{0} a “{1}”; omitidas: {skipped}. Editar → Deshacer las devuelve.", + "{} can't be moved": "{0} no se puede mover", + "{} has the same name as another photo being moved": "{0} tiene el mismo nombre que otra foto que se está moviendo" } diff --git a/crates/ui-egui/locales/es.json b/crates/ui-egui/locales/es.json index 888af077ff2..9c7720a8954 100644 --- a/crates/ui-egui/locales/es.json +++ b/crates/ui-egui/locales/es.json @@ -2358,5 +2358,8 @@ "Import dropped files without review": "Importar los archivos soltados sin revisión", "An import is running": "Hay una importación en curso", "An import is running. Drop photos when it has finished": "Hay una importación en curso. Suelta las fotos cuando termine", - "Finish Lightroom catalog import before adding photos": "Termina la importación del catálogo de Lightroom antes de añadir fotos" + "Finish Lightroom catalog import before adding photos": "Termina la importación del catálogo de Lightroom antes de añadir fotos", + "Rename a clashing photo, or choose another folder, to move it too.": "Cambia el nombre de la foto repetida o elige otra carpeta para poder moverla.", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "Vuelve a conectar el disco o usa Archivo → Buscar fotos que faltan… y vuelve a intentarlo.", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "Una foto sin archivo no se puede mover. Una foto local sí, una vez que uses Añadir a Mis fotos." } diff --git a/crates/ui-egui/locales/fi-formats.json b/crates/ui-egui/locales/fi-formats.json index 1daab3dab9f..6f719e90c4f 100644 --- a/crates/ui-egui/locales/fi-formats.json +++ b/crates/ui-egui/locales/fi-formats.json @@ -305,5 +305,13 @@ "Drop to import {n} preset{}": "Pudota tuodaksesi esiasetuksia: {n}{:.0}", "Drop to review {n} item{} for import": "Pudota tarkistaaksesi ennen tuontia (kohteita: {n}){:.0}", "Where should the Lightroom catalog “{catalog}” go?": "Minne Lightroom-luettelo ”{catalog}” tuodaan?", - "Merge into the open library “{library}” ({count} photo{})": "Yhdistä avoimeen kirjastoon ”{library}” (kuvia: {count}{:.0})" + "Merge into the open library “{library}” ({count} photo{})": "Yhdistä avoimeen kirjastoon ”{library}” (kuvia: {count}{:.0})", + "These can't be moved to “{}”:": "Näitä ei voi siirtää kohteeseen ”{0}”:", + "{} is already in “{}”": "{0} on jo kohteessa ”{1}”", + "{} is missing or offline": "{0} puuttuu tai on offline-tilassa", + "and {n} more": "ja {n} lisää", + "Move {n}, skip {m}": "Siirrä {n}, ohita {m}", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "Siirretty kuvia kohteeseen ”{1}”: {n}{0:.0}, ohitettu: {skipped}. Muokkaa → Kumoa siirtää ne takaisin.", + "{} can't be moved": "Kohdetta {0} ei voi siirtää", + "{} has the same name as another photo being moved": "{0} on samanniminen kuin toinen siirrettävä kuva" } diff --git a/crates/ui-egui/locales/fi.json b/crates/ui-egui/locales/fi.json index e0a8c622a36..f002522cadc 100644 --- a/crates/ui-egui/locales/fi.json +++ b/crates/ui-egui/locales/fi.json @@ -2327,5 +2327,8 @@ "Drop to open the face model": "Pudota avataksesi kasvomallin", "Dropped Files": "Pudotetut tiedostot", "Finish Lightroom catalog import before adding photos": "Viimeistele Lightroom-luettelon tuonti ennen kuvien lisäämistä", - "Import dropped files without review": "Tuo pudotetut tiedostot ilman tarkistusta" + "Import dropped files without review": "Tuo pudotetut tiedostot ilman tarkistusta", + "Rename a clashing photo, or choose another folder, to move it too.": "Nimeä samannimisen kuvan uudelleen tai valitse toinen kansio, jotta se voidaan siirtää.", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "Yhdistä levy uudelleen tai käytä toimintoa Tiedosto → Etsi puuttuvat kuvat… ja yritä uudelleen.", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "Kuvaa ilman tiedostoa ei voi siirtää. Paikallisen kuvan voi, kun käytät toimintoa Lisää Omiin kuviin." } diff --git a/crates/ui-egui/locales/fr-formats.json b/crates/ui-egui/locales/fr-formats.json index 294273781e0..0fad7fc674e 100644 --- a/crates/ui-egui/locales/fr-formats.json +++ b/crates/ui-egui/locales/fr-formats.json @@ -305,5 +305,13 @@ "Could not read {name}: {e}": "Impossible de lire {name} : {e}", "Added {n} photo{}": "{n} photo{} ajoutée(s)", "Where should the Lightroom catalog “{catalog}” go?": "Où importer le catalogue Lightroom « {catalog} » ?", - "Merge into the open library “{library}” ({count} photo{})": "Fusionner avec la bibliothèque ouverte « {library} » ({count} photo{})" + "Merge into the open library “{library}” ({count} photo{})": "Fusionner avec la bibliothèque ouverte « {library} » ({count} photo{})", + "These can't be moved to “{}”:": "Ces photos ne peuvent pas être déplacées vers « {0} » :", + "{} is already in “{}”": "{0} est déjà dans « {1} »", + "{} is missing or offline": "{0} est introuvable ou hors ligne", + "and {n} more": "et {n} autre(s)", + "Move {n}, skip {m}": "Déplacer {n}, ignorer {m}", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "{n} photo{0} déplacée(s) vers « {1} », {skipped} ignorée(s). Modifier → Annuler les remet en place.", + "{} can't be moved": "{0} ne peut pas être déplacé", + "{} has the same name as another photo being moved": "{0} porte le même nom qu’une autre photo à déplacer" } diff --git a/crates/ui-egui/locales/fr.json b/crates/ui-egui/locales/fr.json index 3278d6ccda6..204a0a3b77a 100644 --- a/crates/ui-egui/locales/fr.json +++ b/crates/ui-egui/locales/fr.json @@ -2390,5 +2390,8 @@ "Checking recent libraries": "Vérification des bibliothèques récentes", "The photos are imported once a library is open": "Les photos seront importées dès qu'une bibliothèque sera ouverte", "Open a library first, then drop the presets again": "Ouvrez d'abord une bibliothèque, puis déposez à nouveau les préréglages", - "This library couldn't be checked:": "Impossible de vérifier cette bibliothèque :" + "This library couldn't be checked:": "Impossible de vérifier cette bibliothèque :", + "Rename a clashing photo, or choose another folder, to move it too.": "Renommez la photo en conflit ou choisissez un autre dossier pour pouvoir la déplacer.", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "Reconnectez le disque ou utilisez Fichier → Rechercher les photos manquantes…, puis réessayez.", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "Une photo sans fichier ne peut pas être déplacée. Une photo locale le peut après Ajouter à Mes photos." } diff --git a/crates/ui-egui/locales/id-formats.json b/crates/ui-egui/locales/id-formats.json index 7fc3255221e..9e00275c17a 100644 --- a/crates/ui-egui/locales/id-formats.json +++ b/crates/ui-egui/locales/id-formats.json @@ -305,5 +305,13 @@ "Drop to review {n} item{} for import": "Jatuhkan untuk meninjau {n} item sebelum impor{:.0}", "Inside: {names}": "Di dalam: {names}", "Where should the Lightroom catalog “{catalog}” go?": "Ke mana katalog Lightroom “{catalog}” diimpor?", - "Merge into the open library “{library}” ({count} photo{})": "Gabungkan ke pustaka yang terbuka “{library}” ({count} foto{:.0})" + "Merge into the open library “{library}” ({count} photo{})": "Gabungkan ke pustaka yang terbuka “{library}” ({count} foto{:.0})", + "These can't be moved to “{}”:": "Tidak dapat dipindahkan ke “{0}”:", + "{} is already in “{}”": "{0} sudah ada di “{1}”", + "{} is missing or offline": "{0} hilang atau offline", + "and {n} more": "dan {n} lainnya", + "Move {n}, skip {m}": "Pindahkan {n}, lewati {m}", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "{n} foto dipindahkan ke “{1}”{0:.0}, {skipped} dilewati. Pilih Edit → Urungkan untuk mengembalikannya.", + "{} can't be moved": "{0} tidak dapat dipindahkan", + "{} has the same name as another photo being moved": "{0} memiliki nama yang sama dengan foto lain yang dipindahkan" } diff --git a/crates/ui-egui/locales/id.json b/crates/ui-egui/locales/id.json index 0d6da9b8fb8..865728d4f93 100644 --- a/crates/ui-egui/locales/id.json +++ b/crates/ui-egui/locales/id.json @@ -2339,5 +2339,8 @@ "Drop to open the face model": "Jatuhkan untuk membuka model wajah", "Dropped Files": "File yang dijatuhkan", "Finish Lightroom catalog import before adding photos": "Selesaikan impor katalog Lightroom sebelum menambahkan foto", - "Import dropped files without review": "Impor file yang dijatuhkan tanpa tinjauan" + "Import dropped files without review": "Impor file yang dijatuhkan tanpa tinjauan", + "Rename a clashing photo, or choose another folder, to move it too.": "Ganti nama foto yang bentrok atau pilih folder lain agar bisa dipindahkan.", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "Sambungkan kembali disk atau gunakan File → Cari foto hilang…, lalu coba lagi.", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "Foto tanpa file tidak dapat dipindahkan. Foto lokal bisa, setelah memakai Tambahkan ke Foto saya." } diff --git a/crates/ui-egui/locales/it-formats.json b/crates/ui-egui/locales/it-formats.json index 7efae90e945..4d9c7307bca 100644 --- a/crates/ui-egui/locales/it-formats.json +++ b/crates/ui-egui/locales/it-formats.json @@ -305,5 +305,13 @@ "Could not read {name}: {e}": "Impossibile leggere {name}: {e}", "Added {n} photo{}": "Foto aggiunte: {n}{:.0}", "Where should the Lightroom catalog “{catalog}” go?": "Dove importare il catalogo Lightroom “{catalog}”?", - "Merge into the open library “{library}” ({count} photo{})": "Unisci alla libreria aperta “{library}” (foto: {count}{:.0})" + "Merge into the open library “{library}” ({count} photo{})": "Unisci alla libreria aperta “{library}” (foto: {count}{:.0})", + "These can't be moved to “{}”:": "Queste non possono essere spostate in “{0}”:", + "{} is already in “{}”": "{0} è già in “{1}”", + "{} is missing or offline": "{0} manca o è offline", + "and {n} more": "e altre {n}", + "Move {n}, skip {m}": "Sposta {n}, salta {m}", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "Foto spostate in “{1}”: {n}{0:.0}, saltate: {skipped}. Modifica → Annulla le riporta indietro.", + "{} can't be moved": "{0} non può essere spostato", + "{} has the same name as another photo being moved": "{0} ha lo stesso nome di un’altra foto da spostare" } diff --git a/crates/ui-egui/locales/it.json b/crates/ui-egui/locales/it.json index e159fd47d15..78c1a00b283 100644 --- a/crates/ui-egui/locales/it.json +++ b/crates/ui-egui/locales/it.json @@ -2361,5 +2361,8 @@ "Import dropped files without review": "Importa i file rilasciati senza revisione", "An import is running": "Un'importazione è in corso", "An import is running. Drop photos when it has finished": "Un'importazione è in corso. Trascina le foto quando è finita", - "Finish Lightroom catalog import before adding photos": "Termina l'importazione del catalogo Lightroom prima di aggiungere foto" + "Finish Lightroom catalog import before adding photos": "Termina l'importazione del catalogo Lightroom prima di aggiungere foto", + "Rename a clashing photo, or choose another folder, to move it too.": "Rinomina la foto in conflitto o scegli un'altra cartella per spostarla.", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "Ricollega il disco o usa File → Trova foto mancanti…, poi riprova.", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "Una foto senza file non può essere spostata. Una foto locale sì, dopo aver usato Aggiungi a Le mie foto." } diff --git a/crates/ui-egui/locales/ja-formats.json b/crates/ui-egui/locales/ja-formats.json index 99c14bf16dc..96e76a6bb06 100644 --- a/crates/ui-egui/locales/ja-formats.json +++ b/crates/ui-egui/locales/ja-formats.json @@ -305,5 +305,13 @@ "Could not read {name}: {e}": "{name} を読み取れませんでした: {e}", "Added {n} photo{}": "{n}枚を追加しました{:.0}", "Where should the Lightroom catalog “{catalog}” go?": "Lightroom カタログ「{catalog}」をどこに読み込みますか?", - "Merge into the open library “{library}” ({count} photo{})": "開いているライブラリ「{library}」に統合(写真{count}枚){:.0}" + "Merge into the open library “{library}” ({count} photo{})": "開いているライブラリ「{library}」に統合(写真{count}枚){:.0}", + "These can't be moved to “{}”:": "「{0}」に移動できない写真:", + "{} is already in “{}”": "{0} はすでに「{1}」にあります", + "{} is missing or offline": "{0} が見つからないか、オフラインです", + "and {n} more": "ほか{n}枚", + "Move {n}, skip {m}": "{n}枚を移動、{m}枚をスキップ", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "{n}枚を「{1}」に移動し、{skipped}枚をスキップしました。編集 → 取り消す で元に戻せます。{0:.0}", + "{} can't be moved": "{0} は移動できません", + "{} has the same name as another photo being moved": "{0} は、移動する別の写真と名前が同じです" } diff --git a/crates/ui-egui/locales/ja.json b/crates/ui-egui/locales/ja.json index e1834555bd7..42205f44af4 100644 --- a/crates/ui-egui/locales/ja.json +++ b/crates/ui-egui/locales/ja.json @@ -2356,5 +2356,8 @@ "Import dropped files without review": "ドロップしたファイルを確認せずに読み込む", "An import is running": "読み込み中です", "An import is running. Drop photos when it has finished": "読み込み中です。完了してから写真をドロップしてください", - "Finish Lightroom catalog import before adding photos": "写真を追加する前に Lightroom カタログの読み込みを完了してください" + "Finish Lightroom catalog import before adding photos": "写真を追加する前に Lightroom カタログの読み込みを完了してください", + "Rename a clashing photo, or choose another folder, to move it too.": "名前が重複している写真の名前を変えるか、別のフォルダを選ぶと移動できます。", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "ディスクを接続し直すか、ファイル → 見つからない写真を検索… を使ってからもう一度お試しください。", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "ファイルのない写真は移動できません。ローカルの写真は、マイフォトに追加すると移動できます。" } diff --git a/crates/ui-egui/locales/ka-formats.json b/crates/ui-egui/locales/ka-formats.json index 46036826186..0f314e6c274 100644 --- a/crates/ui-egui/locales/ka-formats.json +++ b/crates/ui-egui/locales/ka-formats.json @@ -305,5 +305,13 @@ "Could not read {name}: {e}": "ვერ წაიკითხა {name}: {e}", "Added {n} photo{}": "დაემატა ფოტო: {n}{:.0}", "Where should the Lightroom catalog “{catalog}” go?": "სად გადავიტანოთ Lightroom-ის კატალოგი „{catalog}“?", - "Merge into the open library “{library}” ({count} photo{})": "გაერთიანება ღია ბიბლიოთეკასთან „{library}“ (ფოტოები: {count}){:.0}" + "Merge into the open library “{library}” ({count} photo{})": "გაერთიანება ღია ბიბლიოთეკასთან „{library}“ (ფოტოები: {count}){:.0}", + "These can't be moved to “{}”:": "„{0}“-ში ვერ გადაიტანება:", + "{} is already in “{}”": "{0} უკვე არის „{1}“-ში", + "{} is missing or offline": "{0} არ არის ან ოფლაინშია", + "and {n} more": "და კიდევ {n}", + "Move {n}, skip {m}": "გადატანა: {n}, გამოტოვება: {m}", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "„{1}“-ში გადატანილია ფოტო: {n}{0:.0}, გამოტოვებულია: {skipped}. რედაქტირება → დაბრუნება დააბრუნებს მათ.", + "{} can't be moved": "{0} ვერ გადაიტანება", + "{} has the same name as another photo being moved": "{0}-ს იგივე სახელი აქვს, რაც გადასატან სხვა ფოტოს" } diff --git a/crates/ui-egui/locales/ka.json b/crates/ui-egui/locales/ka.json index 32c40770018..1e986ac5a1a 100644 --- a/crates/ui-egui/locales/ka.json +++ b/crates/ui-egui/locales/ka.json @@ -2734,5 +2734,8 @@ "Import dropped files without review": "ჩაგდებული ფაილების იმპორტი გადახედვის გარეშე", "An import is running": "იმპორტი მიმდინარეობს", "An import is running. Drop photos when it has finished": "იმპორტი მიმდინარეობს. ფოტოები ჩააგდეთ, როცა დასრულდება", - "Finish Lightroom catalog import before adding photos": "ფოტოების დამატებამდე დაასრულეთ Lightroom-ის კატალოგის იმპორტი" + "Finish Lightroom catalog import before adding photos": "ფოტოების დამატებამდე დაასრულეთ Lightroom-ის კატალოგის იმპორტი", + "Rename a clashing photo, or choose another folder, to move it too.": "გადაარქვით სახელი დუბლირებულ ფოტოს ან აირჩიეთ სხვა საქაღალდე, რომ გადავიდეს.", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "ხელახლა შეაერთეთ დისკი ან გამოიყენეთ ფაილი → დაკარგული ფოტოების მოძებნა… და სცადეთ თავიდან.", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "ფაილის გარეშე ფოტო ვერ გადაიტანება. ლოკალური ფოტო გადაიტანება, თუ გამოიყენებთ: ჩემს ფოტოებში დამატება." } diff --git a/crates/ui-egui/locales/pl-formats.json b/crates/ui-egui/locales/pl-formats.json index 20c7f840d6e..2f3c66d6ac9 100644 --- a/crates/ui-egui/locales/pl-formats.json +++ b/crates/ui-egui/locales/pl-formats.json @@ -305,5 +305,13 @@ "Added {n} photo{}": "Dodano zdjęcia: {n}{:.0}", "Inside: {names}": "Wewnątrz: {names}", "Where should the Lightroom catalog “{catalog}” go?": "Dokąd zaimportować katalog Lightroom „{catalog}”?", - "Merge into the open library “{library}” ({count} photo{})": "Scal z otwartą biblioteką „{library}” (zdjęcia: {count}){:.0}" + "Merge into the open library “{library}” ({count} photo{})": "Scal z otwartą biblioteką „{library}” (zdjęcia: {count}){:.0}", + "These can't be moved to “{}”:": "Nie można ich przenieść do „{0}”:", + "{} is already in “{}”": "{0} jest już w „{1}”", + "{} is missing or offline": "Brakuje {0} lub jest niedostępny", + "and {n} more": "i {n} więcej", + "Move {n}, skip {m}": "Przenieś: {n}, pomiń: {m}", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "Przeniesiono do „{1}” — zdjęcia: {n}{0:.0}, pominięto: {skipped}. Edytuj → Cofnij przywróci je.", + "{} can't be moved": "{0} nie można przenieść", + "{} has the same name as another photo being moved": "{0} ma tę samą nazwę co inne przenoszone zdjęcie" } diff --git a/crates/ui-egui/locales/pl.json b/crates/ui-egui/locales/pl.json index adac22e62ad..562b1f7a9c2 100644 --- a/crates/ui-egui/locales/pl.json +++ b/crates/ui-egui/locales/pl.json @@ -2283,5 +2283,8 @@ "Import dropped files without review": "Importuj upuszczone pliki bez przeglądu", "An import is running": "Import jest w toku", "An import is running. Drop photos when it has finished": "Import jest w toku. Upuść zdjęcia, gdy się zakończy", - "Finish Lightroom catalog import before adding photos": "Zakończ import katalogu Lightrooma, zanim dodasz zdjęcia" + "Finish Lightroom catalog import before adding photos": "Zakończ import katalogu Lightrooma, zanim dodasz zdjęcia", + "Rename a clashing photo, or choose another folder, to move it too.": "Zmień nazwę zdjęcia o tej samej nazwie albo wybierz inny folder, aby je przenieść.", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "Podłącz dysk ponownie albo użyj Plik → Znajdź brakujące zdjęcia…, a potem spróbuj jeszcze raz.", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "Zdjęcia bez pliku nie można przenieść. Zdjęcie lokalne można, po użyciu Dodaj do Moich zdjęć." } diff --git a/crates/ui-egui/locales/pt-br-formats.json b/crates/ui-egui/locales/pt-br-formats.json index f17f2c0fd4b..504632d70f6 100644 --- a/crates/ui-egui/locales/pt-br-formats.json +++ b/crates/ui-egui/locales/pt-br-formats.json @@ -305,5 +305,13 @@ "Could not read {name}: {e}": "Não foi possível ler {name}: {e}", "Added {n} photo{}": "{n} foto{0} adicionada{0}", "Where should the Lightroom catalog “{catalog}” go?": "Para onde vai o catálogo do Lightroom “{catalog}”?", - "Merge into the open library “{library}” ({count} photo{})": "Mesclar na biblioteca aberta “{library}” ({count} foto{})" + "Merge into the open library “{library}” ({count} photo{})": "Mesclar na biblioteca aberta “{library}” ({count} foto{})", + "These can't be moved to “{}”:": "Não é possível mover para “{0}”:", + "{} is already in “{}”": "{0} já está em “{1}”", + "{} is missing or offline": "{0} está ausente ou offline", + "and {n} more": "e mais {n}", + "Move {n}, skip {m}": "Mover {n}, ignorar {m}", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "{n} foto{0} movida{0} para “{1}”, {skipped} ignorada(s). Editar → Desfazer as traz de volta.", + "{} can't be moved": "{0} não pode ser movido", + "{} has the same name as another photo being moved": "{0} tem o mesmo nome de outra foto que está sendo movida" } diff --git a/crates/ui-egui/locales/pt-br.json b/crates/ui-egui/locales/pt-br.json index e84fb7615b7..559a8405258 100644 --- a/crates/ui-egui/locales/pt-br.json +++ b/crates/ui-egui/locales/pt-br.json @@ -2202,5 +2202,8 @@ "Import dropped files without review": "Importar arquivos soltos sem revisão", "An import is running": "Uma importação está em andamento", "An import is running. Drop photos when it has finished": "Uma importação está em andamento. Solte as fotos quando ela terminar", - "Finish Lightroom catalog import before adding photos": "Conclua a importação do catálogo do Lightroom antes de adicionar fotos" + "Finish Lightroom catalog import before adding photos": "Conclua a importação do catálogo do Lightroom antes de adicionar fotos", + "Rename a clashing photo, or choose another folder, to move it too.": "Renomeie a foto com nome repetido ou escolha outra pasta para movê-la.", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "Reconecte o disco ou use Arquivo → Localizar fotos ausentes… e tente de novo.", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "Uma foto sem arquivo não pode ser movida. Uma foto local pode, depois de usar Adicionar às Minhas fotos." } diff --git a/crates/ui-egui/locales/ru-formats.json b/crates/ui-egui/locales/ru-formats.json index 76b7af42764..8d3c7dd0134 100644 --- a/crates/ui-egui/locales/ru-formats.json +++ b/crates/ui-egui/locales/ru-formats.json @@ -305,5 +305,13 @@ "Could not read {name}: {e}": "Не удалось прочитать {name}: {e}", "Added {n} photo{}": "Добавлено фото: {n}{:.0}", "Where should the Lightroom catalog “{catalog}” go?": "Куда импортировать каталог Lightroom «{catalog}»?", - "Merge into the open library “{library}” ({count} photo{})": "Объединить с открытой библиотекой «{library}» (фото: {count}){:.0}" + "Merge into the open library “{library}” ({count} photo{})": "Объединить с открытой библиотекой «{library}» (фото: {count}){:.0}", + "These can't be moved to “{}”:": "Эти фото нельзя переместить в «{0}»:", + "{} is already in “{}”": "{0} уже в «{1}»", + "{} is missing or offline": "{0} отсутствует или недоступен", + "and {n} more": "и ещё {n}", + "Move {n}, skip {m}": "Переместить {n}, пропустить {m}", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "В «{1}» перемещено фото: {n}{0:.0}, пропущено: {skipped}. Правка → Отменить вернёт их.", + "{} can't be moved": "{0} нельзя переместить", + "{} has the same name as another photo being moved": "{0} имеет то же имя, что и другое перемещаемое фото" } diff --git a/crates/ui-egui/locales/ru.json b/crates/ui-egui/locales/ru.json index 306804df045..4d5ab358413 100644 --- a/crates/ui-egui/locales/ru.json +++ b/crates/ui-egui/locales/ru.json @@ -2349,5 +2349,8 @@ "Import dropped files without review": "Импортировать перетащенные файлы без проверки", "An import is running": "Импорт уже выполняется", "An import is running. Drop photos when it has finished": "Импорт уже выполняется. Перетащите фото, когда он закончится", - "Finish Lightroom catalog import before adding photos": "Завершите импорт каталога Lightroom, прежде чем добавлять фото" + "Finish Lightroom catalog import before adding photos": "Завершите импорт каталога Lightroom, прежде чем добавлять фото", + "Rename a clashing photo, or choose another folder, to move it too.": "Переименуйте фото с таким же именем или выберите другую папку, чтобы переместить его.", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "Подключите диск снова или выберите Файл → Найти отсутствующие фото…, затем повторите.", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "Фото без файла нельзя переместить. Локальное фото можно переместить после команды Добавить в «Мои фото»." } diff --git a/crates/ui-egui/locales/sv-formats.json b/crates/ui-egui/locales/sv-formats.json index 9a71a0288c4..a2cf78b2d50 100644 --- a/crates/ui-egui/locales/sv-formats.json +++ b/crates/ui-egui/locales/sv-formats.json @@ -305,5 +305,13 @@ "Drop to review {n} item{} for import": "Släpp för att granska {n} objekt före import{:.0}", "Inside: {names}": "Inuti: {names}", "Where should the Lightroom catalog “{catalog}” go?": "Vart ska Lightroom-katalogen ”{catalog}” importeras?", - "Merge into the open library “{library}” ({count} photo{})": "Slå samman med det öppna biblioteket ”{library}” ({count} foto{:.0})" + "Merge into the open library “{library}” ({count} photo{})": "Slå samman med det öppna biblioteket ”{library}” ({count} foto{:.0})", + "These can't be moved to “{}”:": "Dessa kan inte flyttas till ”{0}”:", + "{} is already in “{}”": "{0} finns redan i ”{1}”", + "{} is missing or offline": "{0} saknas eller är offline", + "and {n} more": "och {n} till", + "Move {n}, skip {m}": "Flytta {n}, hoppa över {m}", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "Flyttade till ”{1}”: {n}{0:.0}, överhoppade: {skipped}. Redigera → Ångra flyttar tillbaka dem.", + "{} can't be moved": "{0} kan inte flyttas", + "{} has the same name as another photo being moved": "{0} har samma namn som ett annat foto som flyttas" } diff --git a/crates/ui-egui/locales/sv.json b/crates/ui-egui/locales/sv.json index 66e69b7ba5d..aefa2096a4f 100644 --- a/crates/ui-egui/locales/sv.json +++ b/crates/ui-egui/locales/sv.json @@ -2429,5 +2429,8 @@ "Drop to open the face model": "Släpp för att öppna ansiktsmodellen", "Dropped Files": "Släppta filer", "Finish Lightroom catalog import before adding photos": "Slutför importen av Lightroom-katalogen innan du lägger till foton", - "Import dropped files without review": "Importera släppta filer utan granskning" + "Import dropped files without review": "Importera släppta filer utan granskning", + "Rename a clashing photo, or choose another folder, to move it too.": "Byt namn på fotot med samma namn eller välj en annan mapp så kan det flyttas.", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "Anslut disken igen eller använd Fil → Sök efter saknade foton… och försök igen.", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "Ett foto utan fil kan inte flyttas. Ett lokalt foto kan det, när du har använt Lägg till i Mina foton." } diff --git a/crates/ui-egui/locales/uk-formats.json b/crates/ui-egui/locales/uk-formats.json index 36022ac1a25..bc066eec907 100644 --- a/crates/ui-egui/locales/uk-formats.json +++ b/crates/ui-egui/locales/uk-formats.json @@ -305,5 +305,13 @@ "Could not read {name}: {e}": "Не вдалося прочитати {name}: {e}", "Added {n} photo{}": "Додано фото: {n}{:.0}", "Where should the Lightroom catalog “{catalog}” go?": "Куди імпортувати каталог Lightroom «{catalog}»?", - "Merge into the open library “{library}” ({count} photo{})": "Об’єднати з відкритою бібліотекою «{library}» (фото: {count}){:.0}" + "Merge into the open library “{library}” ({count} photo{})": "Об’єднати з відкритою бібліотекою «{library}» (фото: {count}){:.0}", + "These can't be moved to “{}”:": "Ці фото не можна перемістити до «{0}»:", + "{} is already in “{}”": "{0} уже в «{1}»", + "{} is missing or offline": "{0} відсутній або недоступний", + "and {n} more": "і ще {n}", + "Move {n}, skip {m}": "Перемістити {n}, пропустити {m}", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "До «{1}» переміщено фото: {n}{0:.0}, пропущено: {skipped}. Редагування → Скасувати поверне їх.", + "{} can't be moved": "{0} не можна перемістити", + "{} has the same name as another photo being moved": "{0} має таку саму назву, як інше фото, що переміщується" } diff --git a/crates/ui-egui/locales/uk.json b/crates/ui-egui/locales/uk.json index ee694ed4fe0..0b5ccfb25a5 100644 --- a/crates/ui-egui/locales/uk.json +++ b/crates/ui-egui/locales/uk.json @@ -2354,5 +2354,8 @@ "Import dropped files without review": "Імпортувати перетягнуті файли без перегляду", "An import is running": "Імпорт уже виконується", "An import is running. Drop photos when it has finished": "Імпорт уже виконується. Перетягніть фото, коли він завершиться", - "Finish Lightroom catalog import before adding photos": "Завершіть імпорт каталогу Lightroom, перш ніж додавати фото" + "Finish Lightroom catalog import before adding photos": "Завершіть імпорт каталогу Lightroom, перш ніж додавати фото", + "Rename a clashing photo, or choose another folder, to move it too.": "Перейменуйте фото з такою самою назвою або виберіть іншу теку, щоб його перемістити.", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "Підключіть диск знову або скористайтеся Файл → Знайти відсутні фото…, а потім повторіть спробу.", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "Фото без файлу не можна перемістити. Локальне фото можна після команди Додати до моїх фото." } diff --git a/crates/ui-egui/locales/vi-formats.json b/crates/ui-egui/locales/vi-formats.json index d5e28bff060..563a96611a9 100644 --- a/crates/ui-egui/locales/vi-formats.json +++ b/crates/ui-egui/locales/vi-formats.json @@ -305,5 +305,13 @@ "Drop to import {n} preset{}": "Thả để nhập {n} thiết lập sẵn{:.0}", "Drop to review {n} item{} for import": "Thả để xem lại {n} mục trước khi nhập{:.0}", "Where should the Lightroom catalog “{catalog}” go?": "Nhập danh mục Lightroom «{catalog}» vào đâu?", - "Merge into the open library “{library}” ({count} photo{})": "Gộp vào thư viện đang mở «{library}» ({count} ảnh{:.0})" + "Merge into the open library “{library}” ({count} photo{})": "Gộp vào thư viện đang mở «{library}» ({count} ảnh{:.0})", + "These can't be moved to “{}”:": "Không thể chuyển các ảnh này vào “{0}”:", + "{} is already in “{}”": "{0} đã có trong “{1}”", + "{} is missing or offline": "{0} bị thiếu hoặc đang ngoại tuyến", + "and {n} more": "và {n} mục khác", + "Move {n}, skip {m}": "Chuyển {n}, bỏ qua {m}", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "Đã chuyển vào “{1}” — ảnh: {n}{0:.0}, bỏ qua: {skipped}. Chỉnh sửa → Hoàn tác sẽ chuyển chúng lại.", + "{} can't be moved": "{0} không thể được chuyển", + "{} has the same name as another photo being moved": "{0} trùng tên với một ảnh khác đang được chuyển" } diff --git a/crates/ui-egui/locales/vi.json b/crates/ui-egui/locales/vi.json index e4fb8feb81c..5663e67f6ff 100644 --- a/crates/ui-egui/locales/vi.json +++ b/crates/ui-egui/locales/vi.json @@ -2235,5 +2235,8 @@ "Drop to open the face model": "Thả để mở mô hình khuôn mặt", "Dropped Files": "Tệp đã thả", "Finish Lightroom catalog import before adding photos": "Hoàn tất nhập danh mục Lightroom trước khi thêm ảnh", - "Import dropped files without review": "Nhập các tệp đã thả mà không xem lại" + "Import dropped files without review": "Nhập các tệp đã thả mà không xem lại", + "Rename a clashing photo, or choose another folder, to move it too.": "Đổi tên ảnh bị trùng tên hoặc chọn thư mục khác để chuyển được.", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "Kết nối lại ổ đĩa hoặc dùng Tệp → Tìm ảnh bị thiếu… rồi thử lại.", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "Ảnh không có tệp thì không thể chuyển. Ảnh cục bộ thì được, sau khi dùng Thêm vào Ảnh của tôi." } diff --git a/crates/ui-egui/locales/zh-hans-formats.json b/crates/ui-egui/locales/zh-hans-formats.json index 7406c39b866..c9f6def93db 100644 --- a/crates/ui-egui/locales/zh-hans-formats.json +++ b/crates/ui-egui/locales/zh-hans-formats.json @@ -305,5 +305,13 @@ "Could not read {name}: {e}": "无法读取 {name}:{e}", "Added {n} photo{}": "已添加 {n} 张照片{:.0}", "Where should the Lightroom catalog “{catalog}” go?": "Lightroom 目录“{catalog}”要导入到哪里?", - "Merge into the open library “{library}” ({count} photo{})": "合并到当前打开的图库“{library}”({count} 张照片){:.0}" + "Merge into the open library “{library}” ({count} photo{})": "合并到当前打开的图库“{library}”({count} 张照片){:.0}", + "These can't be moved to “{}”:": "以下照片无法移到“{0}”:", + "{} is already in “{}”": "{0} 已在“{1}”中", + "{} is missing or offline": "{0} 丢失或处于离线状态", + "and {n} more": "另有 {n} 张", + "Move {n}, skip {m}": "移动 {n} 张,跳过 {m} 张", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "已将 {n} 张照片移到“{1}”{0:.0},跳过 {skipped} 张。编辑 → 撤销 可移回。", + "{} can't be moved": "{0} 无法移动", + "{} has the same name as another photo being moved": "{0} 与另一张要移动的照片同名" } diff --git a/crates/ui-egui/locales/zh-hans.json b/crates/ui-egui/locales/zh-hans.json index 270af8a6251..87968e2f755 100644 --- a/crates/ui-egui/locales/zh-hans.json +++ b/crates/ui-egui/locales/zh-hans.json @@ -2200,5 +2200,8 @@ "Import dropped files without review": "不经检查直接导入拖入的文件", "An import is running": "正在导入", "An import is running. Drop photos when it has finished": "正在导入。导入完成后再拖放照片", - "Finish Lightroom catalog import before adding photos": "添加照片前,请先完成 Lightroom 目录的导入" + "Finish Lightroom catalog import before adding photos": "添加照片前,请先完成 Lightroom 目录的导入", + "Rename a clashing photo, or choose another folder, to move it too.": "请重命名重名的照片,或选择其他文件夹,才能移动。", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "请重新连接磁盘,或使用 文件 → 查找丢失的照片…,然后重试。", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "没有文件的照片无法移动。本地照片在使用“添加到我的照片”后即可移动。" } diff --git a/crates/ui-egui/locales/zh-hant-formats.json b/crates/ui-egui/locales/zh-hant-formats.json index d5c4eb279a2..974eb2e7eb4 100644 --- a/crates/ui-egui/locales/zh-hant-formats.json +++ b/crates/ui-egui/locales/zh-hant-formats.json @@ -305,5 +305,13 @@ "Could not read {name}: {e}": "無法讀取 {name}:{e}", "Added {n} photo{}": "已加入 {n} 張照片{:.0}", "Where should the Lightroom catalog “{catalog}” go?": "Lightroom 目錄「{catalog}」要匯入到哪裡?", - "Merge into the open library “{library}” ({count} photo{})": "合併到目前開啟的照片庫「{library}」({count} 張照片){:.0}" + "Merge into the open library “{library}” ({count} photo{})": "合併到目前開啟的照片庫「{library}」({count} 張照片){:.0}", + "These can't be moved to “{}”:": "以下照片無法移到「{0}」:", + "{} is already in “{}”": "{0} 已在「{1}」中", + "{} is missing or offline": "{0} 遺失或處於離線狀態", + "and {n} more": "另有 {n} 張", + "Move {n}, skip {m}": "移動 {n} 張,略過 {m} 張", + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.": "已將 {n} 張照片移到「{1}」{0:.0},略過 {skipped} 張。編輯 → 復原 可移回。", + "{} can't be moved": "{0} 無法移動", + "{} has the same name as another photo being moved": "{0} 與另一張要移動的照片同名" } diff --git a/crates/ui-egui/locales/zh-hant.json b/crates/ui-egui/locales/zh-hant.json index 0408e23ec87..2843af59830 100644 --- a/crates/ui-egui/locales/zh-hant.json +++ b/crates/ui-egui/locales/zh-hant.json @@ -2157,5 +2157,8 @@ "Import dropped files without review": "不經檢查直接匯入拖放的檔案", "An import is running": "正在匯入", "An import is running. Drop photos when it has finished": "正在匯入。匯入完成後再拖放照片", - "Finish Lightroom catalog import before adding photos": "新增照片前,請先完成 Lightroom 目錄的匯入" + "Finish Lightroom catalog import before adding photos": "新增照片前,請先完成 Lightroom 目錄的匯入", + "Rename a clashing photo, or choose another folder, to move it too.": "請重新命名重名的照片,或選擇其他資料夾,才能移動。", + "Reconnect the disk or use File → Find Missing Photos…, then try again.": "請重新連接磁碟,或使用 檔案 → 尋找遺失的照片…,然後重試。", + "A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.": "沒有檔案的照片無法移動。本機照片在使用「加入我的照片」後即可移動。" } diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index 772303ffbf9..8fbf8eb3a0a 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -21,10 +21,12 @@ use export::{ LIMIT_KB, QUALITY, START_NUMBER, WM_IMAGE_WIDTH, WM_INSET_X, WM_INSET_Y, WM_OPACITY, WM_POSITIONS, WM_SIZE, export_dialog_params, export_size, group_checklist, watermark_preview, }; +#[cfg(test)] +pub(crate) use frame::move_problem_line; pub use frame::{ConfirmStyle, confirm_style, list_height, prompt}; use frame::{ - DIALOG_CHROME_GUESS, DIALOG_MIN_BODY, DIALOG_SCREEN_MARGIN, choices, clicked_backdrop, dialog_body, dialog_field, field, just_opened, num, - only_shows, return_confirms, trailing_button_row, + DIALOG_CHROME_GUESS, DIALOG_MIN_BODY, DIALOG_SCREEN_MARGIN, choices, clicked_backdrop, dialog_body, dialog_field, field, just_opened, + move_problems_body, num, only_shows, return_confirms, trailing_button_row, }; pub(crate) use rename::rename_preview; use rename::{RENAME_PREVIEW_ROWS, person_rename_plan}; @@ -1171,6 +1173,7 @@ pub fn show(app: &mut LightcraftApp, ctx: &egui::Context, blocked: bool) { ui.label(crate::i18n::tr_format!("Move {what} to Recently Deleted?", what = what)); ui.label(egui::RichText::new(crate::i18n::tr("They can be restored from Recently Deleted until it is emptied.")).color(t.text_dim)); } + Dialog::MovePhotos { name, problems, .. } if !problems.is_empty() => move_problems_body(ui, name, problems, &t), Dialog::MovePhotos { ids, name, dont_ask, .. } => { let n = ids.len(); ui.label(crate::i18n::tr_format!("Move {n} photo{} to “{}”?", if n == 1 { "" } else { "s" }, name, n = n)); @@ -1304,6 +1307,12 @@ pub fn show(app: &mut LightcraftApp, ctx: &egui::Context, blocked: bool) { Dialog::FaceModel { .. } if !informational => "Install", Dialog::ConfirmDelete { .. } | Dialog::DeleteKeyword { .. } | Dialog::DeleteEffects { .. } => "Delete", Dialog::SaveEffect { .. } => "Create", + // nothing that can go: only Cancel; some can: Move those, skip the others + Dialog::MovePhotos { problems, movable, .. } if !problems.is_empty() && *movable == 0 => "", + Dialog::MovePhotos { problems, movable, .. } if !problems.is_empty() => { + add_label = crate::i18n::tr_format!("Move {n}, skip {m}", n = movable, m = problems.len()); + add_label.as_str() + } Dialog::MovePhotos { .. } => "Move", // (not "Merge": that is photo merging, HDR / panorama, in some languages) Dialog::MoveKeyword { .. } => "Merge Keywords", @@ -1448,7 +1457,13 @@ pub fn show(app: &mut LightcraftApp, ctx: &egui::Context, blocked: bool) { // a move says how it went, or why nothing moved Ok(r) if matches!(dlg, Dialog::MovePhotos { .. }) => { if let Dialog::MovePhotos { name, .. } = &dlg { - let text = crate::panels::left::moved_text(r["moved"].as_u64().unwrap_or(0), name); + let (moved, skipped) = (r["moved"].as_u64().unwrap_or(0), r["skipped"].as_u64().unwrap_or(0)); + // (nothing moved, as those that could go had reached the folder meanwhile: no undo step to point at) + let text = if moved > 0 && skipped > 0 { + crate::panels::left::moved_skipping_text(moved, skipped, name) + } else { + crate::panels::left::moved_text(moved, name) + }; app.toast(ctx, text); } close = true; diff --git a/crates/ui-egui/src/dialogs/confirm.rs b/crates/ui-egui/src/dialogs/confirm.rs index 196018e5518..6dc4518c937 100644 --- a/crates/ui-egui/src/dialogs/confirm.rs +++ b/crates/ui-egui/src/dialogs/confirm.rs @@ -206,7 +206,7 @@ pub fn confirm_dialog(app: &mut LightcraftApp, dlg: &Dialog) -> Result crate::merge::start_final(app, opts), Dialog::Import { opts } => crate::import::start(app, opts), Dialog::ConfirmDelete { .. } => app.run("photo.delete", json!({})), - Dialog::MovePhotos { ids, folder, dont_ask, library, .. } => { + Dialog::MovePhotos { ids, folder, dont_ask, library, problems, .. } => { // another library opened meanwhile (from the menu bar, an agent): these numbers are // other photos there if *library != app.session.library_generation() { @@ -215,7 +215,10 @@ pub fn confirm_dialog(app: &mut LightcraftApp, dlg: &Dialog) -> Result = problems.iter().map(|p| p.id).collect(); + crate::panels::left::move_photos_skipping(app, Some(ids), folder, &skip) + .map(|(moved, skipped)| json!({"moved": moved, "skipped": skipped})) } // the catalog found: no file dialog; none: File ▸ Import Lightroom Catalog… asks for it Dialog::LightroomCatalog { catalog, .. } => { diff --git a/crates/ui-egui/src/dialogs/frame.rs b/crates/ui-egui/src/dialogs/frame.rs index 3d8eb4ef885..af6136c9b75 100644 --- a/crates/ui-egui/src/dialogs/frame.rs +++ b/crates/ui-egui/src/dialogs/frame.rs @@ -1,5 +1,6 @@ use super::export::LABEL_W; use super::*; +use crate::state::MoveProblemKind; /// A click on the dimmed backdrop around the dialog: it closes the dialog like Esc. Pressed and /// released outside the window, so a slider dragged past its edge doesn't close it; a press while a @@ -47,6 +48,42 @@ pub(super) const DIALOG_MIN_BODY: f32 = 80.0; /// A list that scrolls on its own never gets shorter than this to make its dialog fit. const DIALOG_MIN_LIST: f32 = 120.0; +/// How many problem photos a question lists by name. +const MOVE_PROBLEMS_SHOWN: usize = 5; + +/// What the Move Photos question says about one photo that can't go into the folder `name`. +pub(crate) fn move_problem_line(p: &crate::state::MoveProblem, name: &str) -> String { + match p.kind { + MoveProblemKind::Clash => crate::i18n::tr_format!("{} is already in “{}”", p.name, name), + MoveProblemKind::Twin => crate::i18n::tr_format!("{} has the same name as another photo being moved", p.name), + MoveProblemKind::Missing => crate::i18n::tr_format!("{} is missing or offline", p.name), + MoveProblemKind::Unmovable => crate::i18n::tr_format!("{} can't be moved", p.name), + } +} + +/// The Move Photos question when some photos can't go into the folder `name`: each one named with +/// its problem, and what to do about it. +pub(super) fn move_problems_body(ui: &mut egui::Ui, name: &str, problems: &[crate::state::MoveProblem], t: &Tokens) { + ui.label(crate::i18n::tr_format!("These can't be moved to “{}”:", name)); + for p in problems.iter().take(MOVE_PROBLEMS_SHOWN) { + ui.label(egui::RichText::new(move_problem_line(p, name)).color(t.text_dim)); + } + if problems.len() > MOVE_PROBLEMS_SHOWN { + ui.label(egui::RichText::new(crate::i18n::tr_format!("and {n} more", n = problems.len() - MOVE_PROBLEMS_SHOWN)).color(t.text_dim)); + } + ui.add_space(4.0); + let any = |kinds: &[MoveProblemKind]| problems.iter().any(|p| kinds.contains(&p.kind)); + if any(&[MoveProblemKind::Clash, MoveProblemKind::Twin]) { + ui.label(crate::i18n::tr("Rename a clashing photo, or choose another folder, to move it too.")); + } + if any(&[MoveProblemKind::Missing]) { + ui.label(crate::i18n::tr("Reconnect the disk or use File → Find Missing Photos…, then try again.")); + } + if any(&[MoveProblemKind::Unmovable]) { + ui.label(crate::i18n::tr("A photo with no file can't be moved. A Local photo can, once you use Add to My Photos.")); + } +} + fn list_shrink_id() -> egui::Id { egui::Id::unique("dialog-list-shrink") } diff --git a/crates/ui-egui/src/panels/left.rs b/crates/ui-egui/src/panels/left.rs index 522afe08400..6b7e036e65c 100644 --- a/crates/ui-egui/src/panels/left.rs +++ b/crates/ui-egui/src/panels/left.rs @@ -23,7 +23,7 @@ pub use albums::{album_drag_feedback, auto_scroll_speed}; use albums::{albums_rows, drag_auto_scroll}; pub(crate) use dates::browse_all_photos; use dates::date_rows; -pub(crate) use folders::{folder_row_of, move_photos, moved_text}; +pub(crate) use folders::{folder_row_of, move_photos_skipping, moved_skipping_text, moved_text}; use folders::{folder_rows, reveal_chosen}; use keywords::keyword_rows; pub(crate) use local::{fs_cached, fs_cached_running, same_folder}; diff --git a/crates/ui-egui/src/panels/left/folders.rs b/crates/ui-egui/src/panels/left/folders.rs index 95915b74070..2a6fc33dfdd 100644 --- a/crates/ui-egui/src/panels/left/folders.rs +++ b/crates/ui-egui/src/panels/left/folders.rs @@ -420,11 +420,21 @@ fn folder_drop_target(app: &mut LightcraftApp, ui: &mut egui::Ui, resp: &egui::R ui.painter().rect_stroke(resp.rect.shrink2(vec2(8.0, 1.0)), 4.0, egui::Stroke::new(1.5, t.accent), egui::StrokeKind::Inside); if released { app.ui.dragging_photos = None; + // problems the move would stop at (a name taken there, a file offline) are found now and + // shown in the question, so they aren't met after Move + let (problems, movable) = match app.run("photo.checkMove", json!({"folder": n.path, "ids": ids})) { + Ok(r) => move_problems(&r), + Err(e) => { + app.toast(ui.ctx(), e); + return; + } + }; // a drop moves files on disk: asked first (as Lightroom Classic does), unless the person - // said not to; the menu's Move Selected Photos Here is asked for by name and goes at once - if app.ui.settings.ask_before_move { + // said not to (a move with problems asks anyway: it needs a decision); the menu's Move + // Selected Photos Here is asked for by name and goes at once + if app.ui.settings.ask_before_move || !problems.is_empty() { let library = app.session.library_generation(); - app.ui.dialog = Some(crate::state::Dialog::MovePhotos { ids, folder: n.path.clone(), name, dont_ask: false, library }); + app.ui.dialog = Some(crate::state::Dialog::MovePhotos { ids, folder: n.path.clone(), name, dont_ask: false, library, problems, movable }); } else { move_photos_here(app, ui.ctx(), Some(&ids), &n.path, &name); } @@ -456,14 +466,39 @@ fn spring_open(ui: &egui::Ui, n: &FolderNode, open_id: egui::Id, open: &mut bool } } +/// The problems and the number of photos that can go in a `photo.checkMove` answer. +fn move_problems(r: &serde_json::Value) -> (Vec, usize) { + let problems = r["problems"] + .as_array() + .into_iter() + .flatten() + .filter_map(|p| { + Some(crate::state::MoveProblem { + id: p["id"].as_u64()?, + name: p["name"].as_str()?.to_string(), + kind: crate::state::MoveProblemKind::from_check(p), + }) + }) + .collect(); + (problems, r["movable"].as_u64().unwrap_or(0) as usize) +} + /// Move photos (`ids`, else the selection) into the folder `path` on disk (`photo.moveToFolder`). /// Photos that leave the view leave the selection, so nothing done next (Delete, an edit) reaches /// photos no longer on screen. How many moved, or why none did. pub(crate) fn move_photos(app: &mut LightcraftApp, ids: Option<&[u64]>, path: &str) -> Result { + move_photos_skipping(app, ids, path, &[]).map(|(moved, _)| moved) +} + +/// [`move_photos`] leaving out the photos `skip`: how many moved and how many were left out. +pub(crate) fn move_photos_skipping(app: &mut LightcraftApp, ids: Option<&[u64]>, path: &str, skip: &[u64]) -> Result<(u64, u64), String> { let mut params = json!({"folder": path}); if let Some(ids) = ids { params["ids"] = json!(ids); } + if !skip.is_empty() { + params["skip"] = json!(skip); + } let r = app.run("photo.moveToFolder", params)?; let visible: std::collections::HashSet = app.session.visible_cloned().into_iter().collect(); let sel = &mut app.session.selection; @@ -471,7 +506,7 @@ pub(crate) fn move_photos(app: &mut LightcraftApp, ids: Option<&[u64]>, path: &s if sel.active.is_some_and(|a| !visible.contains(&a)) { sel.active = sel.ids.first().copied(); } - Ok(r["moved"].as_u64().unwrap_or(0)) + Ok((r["moved"].as_u64().unwrap_or(0), r["skipped"].as_array().map_or(0, |s| s.len() as u64))) } /// What a move of `n` photos into the folder `name` says: how many moved and that Undo moves them @@ -484,6 +519,17 @@ pub(crate) fn moved_text(n: u64, name: &str) -> String { } } +/// [`moved_text`] for a move that left `skipped` photos out. +pub(crate) fn moved_skipping_text(n: u64, skipped: u64, name: &str) -> String { + crate::i18n::tr_format!( + "Moved {n} photo{} to “{}”, skipped {skipped}. Edit → Undo moves them back.", + if n == 1 { "" } else { "s" }, + name, + n = n, + skipped = skipped + ) +} + /// [`move_photos`], saying how it went in a toast. fn move_photos_here(app: &mut LightcraftApp, ctx: &egui::Context, ids: Option<&[u64]>, path: &str, name: &str) { match move_photos(app, ids, path) { diff --git a/crates/ui-egui/src/state.rs b/crates/ui-egui/src/state.rs index 38b50902c50..1715c1962b5 100644 --- a/crates/ui-egui/src/state.rs +++ b/crates/ui-egui/src/state.rs @@ -6,7 +6,7 @@ mod dialog; mod settings; mod view; -pub use dialog::{Dialog, NameEdit, SyncCounts, default_preset_groups}; +pub use dialog::{Dialog, MoveProblem, MoveProblemKind, NameEdit, SyncCounts, default_preset_groups}; pub use settings::{ AppSettings, AppearanceMode, DarkTheme, EditFile, EditFormat, EditSpace, GridBadges, KeywordChips, LOUPE_EDGE_CEILING, LOUPE_EDGE_STEP, LaunchLibrary, LightTheme, LightroomImport, MIN_TEXTURE_SIDE, PHOTOCRAFT, PREVIEW_LIMITS, RECENT_LIBRARIES, STANDARD_PREVIEW_EDGE, StartupView, diff --git a/crates/ui-egui/src/state/dialog.rs b/crates/ui-egui/src/state/dialog.rs index edc4946cd31..be16e0c61e8 100644 --- a/crates/ui-egui/src/state/dialog.rs +++ b/crates/ui-egui/src/state/dialog.rs @@ -23,6 +23,41 @@ pub struct NameEdit { pub fresh: bool, } +/// A photo that can't move into the folder it was dropped on (`photo.checkMove`). +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +pub struct MoveProblem { + pub id: u64, + pub name: String, + pub kind: MoveProblemKind, +} + +/// Why a photo can't move into the folder it was dropped on (`photo.checkMove`'s `kind`). +#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq)] +pub enum MoveProblemKind { + /// A file of that name is in the folder already. + Clash, + /// Another photo of the same move has the name: only one of them can go in. + Twin, + /// The photo's file is missing or offline. + Missing, + /// The photo can't move as it is: a Local photo (until it is added to the library), one with + /// no file, or a library photo of the same file as such a photo. + Unmovable, +} + +impl MoveProblemKind { + /// The kind of a `photo.checkMove` problem. A kind this build doesn't know is unmovable: it is + /// still listed, and still left out of the move. + pub fn from_check(problem: &serde_json::Value) -> Self { + match problem["kind"].as_str() { + Some("clash") if problem["twin"] == true => Self::Twin, + Some("clash") => Self::Clash, + Some("missing") => Self::Missing, + _ => Self::Unmovable, + } + } +} + #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[serde(tag = "kind", rename_all = "camelCase")] pub enum Dialog { @@ -303,7 +338,9 @@ pub enum Dialog { count: usize, }, /// Confirm moving photos dropped on a Folders row into that folder on disk - /// (`photo.moveToFolder`). `name`: the folder's name, as the question says it. + /// (`photo.moveToFolder`). `name`: the folder's name, as the question says it. `problems`: + /// the photos found (`photo.checkMove`, when the photos were dropped) that can't go, and why; + /// the move leaves them out when the person chooses to (`movable`: how many photos then go). MovePhotos { ids: Vec, folder: String, @@ -312,6 +349,10 @@ pub enum Dialog { /// The library the photos were dropped in (`Session::library_generation`): ids are /// numbered per library, so in another one they name other photos. library: u64, + #[serde(default)] + problems: Vec, + #[serde(default)] + movable: usize, }, /// Confirm taking a folder's photos out of the library (`library.removeFolder`). RemoveFolder { diff --git a/crates/ui-egui/src/tests/folder_drop.rs b/crates/ui-egui/src/tests/folder_drop.rs index b7a51513174..f5636fbd02b 100644 --- a/crates/ui-egui/src/tests/folder_drop.rs +++ b/crates/ui-egui/src/tests/folder_drop.rs @@ -9,6 +9,7 @@ use egui::{Pos2, Rect}; use serde_json::json; use crate::headless::Headless; +use crate::state::MoveProblemKind; use crate::{LightcraftApp, Services}; /// Folders `trip` and `home` in a fresh temporary folder, with a photo file in each. @@ -346,3 +347,177 @@ fn a_question_left_open_while_another_library_opens_moves_nothing() { assert!(trip.join("beach.png").is_file() && !home.join("beach.png").exists(), "nothing moved"); let _ = std::fs::remove_dir_all(&root); } + +/// `trip` holds beach.png and dunes.png (both selected, shown by folder), `home` holds garden.png +/// and the Home row to drop on; the photos are dragged by the beach. +fn trip_with_two(tag: &str) -> (PathBuf, PathBuf, PathBuf, Headless, u64, u64) { + let (root, trip, home) = folders(tag); + std::fs::copy(trip.join("beach.png"), trip.join("dunes.png")).unwrap(); + let mut h = app(&[(trip.join("beach.png"), false), (trip.join("dunes.png"), false), (home.join("garden.png"), false)]); + let r = h.request( + "engine.execute", + json!({"command": "library.source", "params": {"kind": "libraryFolder", "path": trip.to_string_lossy()}}), + std::time::Duration::from_secs(10), + ); + assert_eq!(r["ok"], true, "{r}"); + let (beach, dunes) = (id_of(&h, "beach.png"), id_of(&h, "dunes.png")); + let both = [lightcraft_catalog::PhotoId(beach), lightcraft_catalog::PhotoId(dunes)]; + h.app.session.selection = lightcraft_engine::Selection { ids: both.to_vec(), active: Some(both[0]) }; + for _ in 0..4 { + h.step(); + } + (root, trip, home, h, beach, dunes) +} + +/// Drag the selection by the beach onto the Home row and let go. +fn drop_both(h: &mut Headless, beach: u64, home: &Path) { + let target = folder_row(h, home).expect("the Home row"); + drop_beach(h, beach, target); +} + +#[test] +fn the_question_lists_a_name_clash_and_moves_the_rest_when_told_to_skip() { + let (root, trip, home, mut h, beach, dunes) = trip_with_two("clash"); + std::fs::copy(trip.join("dunes.png"), home.join("dunes.png")).unwrap(); + drop_both(&mut h, beach, &home); + // the problem is known before Move: the question names it and offers to skip it + let Some(crate::state::Dialog::MovePhotos { problems, movable, .. }) = &h.app.ui.dialog else { panic!("{:?}", h.app.ui.dialog) }; + assert_eq!( + (problems.clone(), *movable), + (vec![crate::state::MoveProblem { id: dunes, name: "dunes.png".into(), kind: MoveProblemKind::Clash }], 1) + ); + assert!(trip.join("beach.png").is_file(), "nothing moved before the click"); + click(&mut h, "button:dialogOk"); + assert!(home.join("beach.png").is_file() && !trip.join("beach.png").exists(), "the others moved"); + assert!(trip.join("dunes.png").is_file(), "the clashing one stayed"); + assert_eq!(toast(&h), "Moved 1 photo to “home”, skipped 1. Edit → Undo moves them back."); + assert!(h.app.ui.dialog.is_none()); + let _ = std::fs::remove_dir_all(&root); +} + +#[test] +fn with_nothing_that_can_move_the_question_offers_only_cancel() { + let (root, trip, home, mut h, beach, _) = trip_with_two("all-problems"); + for f in ["beach.png", "dunes.png"] { + std::fs::copy(trip.join(f), home.join(f)).unwrap(); + } + drop_both(&mut h, beach, &home); + let Some(crate::state::Dialog::MovePhotos { problems, movable, .. }) = &h.app.ui.dialog else { panic!("{:?}", h.app.ui.dialog) }; + assert_eq!((problems.len(), *movable), (2, 0)); + h.step(); + assert!(widget(&h, "button:dialogOk").is_none(), "no Move button"); + assert!(widget(&h, "button:dialogCancel").is_some()); + click(&mut h, "button:dialogCancel"); + assert!(h.app.ui.dialog.is_none() && trip.join("beach.png").is_file() && trip.join("dunes.png").is_file()); + let _ = std::fs::remove_dir_all(&root); +} + +#[test] +fn a_file_that_is_offline_is_found_before_the_move_and_asks_even_when_not_asking() { + let (root, trip, home, mut h, beach, dunes) = trip_with_two("offline"); + h.app.ui.settings.ask_before_move = false; + std::fs::remove_file(trip.join("dunes.png")).unwrap(); + drop_both(&mut h, beach, &home); + // a move with a problem is a decision, so it asks although the person said not to + let Some(crate::state::Dialog::MovePhotos { problems, .. }) = &h.app.ui.dialog else { panic!("{:?}", h.app.ui.dialog) }; + assert_eq!(problems.iter().map(|p| (p.id, p.kind)).collect::>(), [(dunes, MoveProblemKind::Missing)]); + assert!(trip.join("beach.png").is_file(), "nothing moved yet"); + click(&mut h, "button:dialogOk"); + assert!(home.join("beach.png").is_file()); + assert!(toast(&h).starts_with("Moved 1 photo to “home”, skipped 1."), "{}", toast(&h)); + let _ = std::fs::remove_dir_all(&root); +} + +#[test] +fn the_offline_question_names_the_menu_with_an_arrow_the_fonts_can_draw() { + let (root, trip, home, mut h, beach, _) = trip_with_two("offline-arrow"); + std::fs::remove_file(trip.join("dunes.png")).unwrap(); + drop_both(&mut h, beach, &home); + h.step(); + let shown = h.painted_text().join("\n"); + let line = crate::i18n::tr("Reconnect the disk or use File → Find Missing Photos…, then try again."); + assert!(shown.contains(line), "the dialog shows the line through tr: {shown}"); + assert!(line.contains('→') && !line.contains('▸'), "no UI font has ▸, which draws as a box: {line}"); + let _ = std::fs::remove_dir_all(&root); +} + +#[test] +fn a_folder_that_is_gone_says_so_in_plain_words_at_the_drop() { + let (root, _trip, home, mut h, beach, _) = trip_with_two("gone"); + let target = folder_row(&h, &home).expect("the Home row"); + std::fs::remove_dir_all(&home).unwrap(); + drop_beach(&mut h, beach, target); + assert!(h.app.ui.dialog.is_none(), "{:?}", h.app.ui.dialog); + let said = toast(&h); + assert!(said.contains("is not a folder"), "{said}"); + assert!(!said.contains('`') && !said.contains("invalid parameters"), "no command names: {said}"); + let _ = std::fs::remove_dir_all(&root); +} + +#[test] +fn a_photo_with_no_file_is_listed_as_one_that_cannot_be_moved_and_the_rest_go() { + // (a Local photo never gets this far: the drop is refused on the row, with its own reason) + let (root, trip, home, mut h, beach, _) = trip_with_two("no-file"); + let demo = { + use lightcraft_catalog::{Op, Photo, Source}; + let id = h.app.session.catalog.alloc_photo_id(); + let p = Photo::new(id, Source::Demo { scene: 0 }, "demo.jpg", "JPEG", 8, 8, "2026-01-01T10:00:00"); + h.app.session.catalog.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap(); + h.app.session.selection.ids.push(id); + id.0 + }; + drop_both(&mut h, beach, &home); + let Some(crate::state::Dialog::MovePhotos { problems, movable, .. }) = &h.app.ui.dialog else { panic!("{:?}", h.app.ui.dialog) }; + assert_eq!( + (problems.clone(), *movable), + (vec![crate::state::MoveProblem { id: demo, name: "demo.jpg".into(), kind: MoveProblemKind::Unmovable }], 2) + ); + click(&mut h, "button:dialogOk"); + assert!(home.join("beach.png").is_file() && home.join("dunes.png").is_file() && !trip.join("beach.png").exists(), "the others moved"); + let _ = std::fs::remove_dir_all(&root); +} + +#[test] +fn two_photos_of_one_name_in_the_move_are_listed_as_twins() { + let (root, trip, home, mut h, beach, _) = trip_with_two("twins"); + // a second photo named beach.png, from another folder, joins the move + let other = root.join("other"); + std::fs::create_dir_all(&other).unwrap(); + std::fs::copy(trip.join("beach.png"), other.join("beach.png")).unwrap(); + { + use lightcraft_catalog::{Op, Photo, Source}; + let id = h.app.session.catalog.alloc_photo_id(); + let p = + Photo::new(id, Source::File { path: other.join("beach.png").to_string_lossy().into() }, "beach.png", "PNG", 8, 8, "2026-01-01T10:00:00"); + h.app.session.catalog.apply(Op::AddPhoto { photo: Box::new(p) }).unwrap(); + h.app.session.selection.ids.push(id); + } + drop_both(&mut h, beach, &home); + let Some(crate::state::Dialog::MovePhotos { problems, movable, .. }) = &h.app.ui.dialog else { panic!("{:?}", h.app.ui.dialog) }; + assert_eq!(problems.iter().map(|p| (p.name.as_str(), p.kind)).collect::>(), [("beach.png", MoveProblemKind::Twin)]); + assert_eq!(*movable, 2, "one of the pair and the other photo go"); + let _ = std::fs::remove_dir_all(&root); +} + +#[test] +fn each_kind_of_problem_has_its_own_line() { + let line = |kind| crate::panels::dialogs::move_problem_line(&crate::state::MoveProblem { id: 1, name: "a.png".into(), kind }, "home"); + let kinds = [MoveProblemKind::Clash, MoveProblemKind::Twin, MoveProblemKind::Missing, MoveProblemKind::Unmovable]; + let lines: Vec = kinds.into_iter().map(line).collect(); + assert!(lines.iter().all(|l| l.contains("a.png")), "each line names its photo: {lines:?}"); + assert!(lines[0].contains("home"), "a clash names the folder: {lines:?}"); + let mut distinct = lines.clone(); + distinct.sort(); + distinct.dedup(); + assert_eq!(distinct.len(), kinds.len(), "each kind says its own thing: {lines:?}"); +} + +#[test] +fn a_check_answer_maps_to_a_kind_and_an_unknown_kind_is_unmovable() { + let kind = |v: serde_json::Value| MoveProblemKind::from_check(&v); + assert_eq!(kind(json!({"kind": "clash"})), MoveProblemKind::Clash); + assert_eq!(kind(json!({"kind": "clash", "twin": true})), MoveProblemKind::Twin); + assert_eq!(kind(json!({"kind": "missing"})), MoveProblemKind::Missing); + assert_eq!(kind(json!({"kind": "unmovable"})), MoveProblemKind::Unmovable); + assert_eq!(kind(json!({"kind": "something new"})), MoveProblemKind::Unmovable); +} diff --git a/docs/parity-checklist.md b/docs/parity-checklist.md index 90cfc248f60..aef5a96a454 100644 --- a/docs/parity-checklist.md +++ b/docs/parity-checklist.md @@ -1,6 +1,6 @@ # Lightroom parity checklist -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-25 · **Change:** minor (LR-BEHAV-TITLEBAR: a double-click follows the system setting, and a panel over the bar keeps the window still; KEYC-METADATA, LRC-LIB-KEYWORDS: ⌥0 / ⌥⇧0 go to the next / previous keyword set; LRC-DEV-HISTOGRAM-DRAG: the histogram's five tonal zones — hover for the value, drag to adjust the Basic control the press locked, double-click to reset; LR-VIEW-HISTOGRAM note updated; MENU-BAR: on macOS a menu item that yields its key to a focused text field or to shortcut recording really lets it go; LR-MERGE-HDR / LR-MERGE-PANO: Lanczos-3 warps; LR-IMP-LOCAL: browsing from the sidebar records the folder; LR-VIEW-ZOOM: only a full-size drag within 20 ms clears a slow-drag verdict; LR-IMP-ADD-DIALOG: hierarchical import album destination reconciled with main, #2362; KEY-SLIDER-NUDGE: vertical wheel nudges need a click or drag in the row; leaving it disarms them; LR-EDIT-OPTICS-PROFILE: Fujifilm nine-knot lens tables read at the plain radius; LR-VIEW-ZOOM: only a full-size drag within 20 ms clears a slow-drag verdict; LRC-LIB-LIBFOLDERS, LR-BEHAV-BG-TASKS: Synchronize Folder's scan shows its folder listing and stops it on ✕; LRC-LIB-LIBFOLDERS: Synchronize Folder says a folder is up to date; LR-LIB-STACK: filmstrip stack badge click; LRC-LIB-REFVIEW / CATALOG-SWITCH: Escape preserves edits; catalog-local pins; deleted and malformed references refused; LRC-LIB-COMPARE: the Info panel labels the active photo while culling, #2398; KEYC-RATING: `\` shows / hides the Filter Bar in the grids; LR-VIEW-PHOTOGRID: the grid reads only the photos an import batch or an edit touched, not the whole list; earlier: LRC-PRINT-PAGE: Print Page Options; LR-META-XMP: fewer false unimported-XMP warnings; KEYC-METADATA: ⌘K / Ctrl+K Add Keywords; LRC-DEV-HISTOGRAM-DRAG: the histogram's five tonal zones — hover for the value, drag to adjust the Basic control the press locked, double-click to reset; LR-VIEW-HISTOGRAM note updated; MENU-BAR: on macOS a menu item that yields its key to a focused text field or to shortcut recording really lets it go; LR-MERGE-HDR / LR-MERGE-PANO: Lanczos-3 warps; LR-IMP-LOCAL: browsing from the sidebar records the folder; LR-VIEW-ZOOM: only a full-size drag within 20 ms clears a slow-drag verdict; LR-IMP-ADD-DIALOG: hierarchical import album destination reconciled with main, #2362; KEY-SLIDER-NUDGE: vertical wheel nudges need a click or drag in the row; leaving it disarms them; LR-EDIT-OPTICS-PROFILE: Fujifilm nine-knot lens tables read at the plain radius; LR-VIEW-ZOOM: only a full-size drag within 20 ms clears a slow-drag verdict; LRC-LIB-LIBFOLDERS, LR-BEHAV-BG-TASKS: Synchronize Folder's scan shows its folder listing and stops it on ✕; LRC-LIB-LIBFOLDERS: Synchronize Folder says a folder is up to date; LR-LIB-STACK: filmstrip stack badge click; LRC-LIB-REFVIEW / CATALOG-SWITCH: Escape preserves edits; catalog-local pins; deleted and malformed references refused; LRC-LIB-COMPARE: the Info panel labels the active photo while culling, #2398; KEYC-RATING: `\` shows / hides the Filter Bar in the grids; LR-VIEW-PHOTOGRID: the grid reads only the photos an import batch or an edit touched, not the whole list; earlier: LRC-PRINT-PAGE: Print Page Options; LR-META-XMP: fewer false unimported-XMP warnings) · **Target:** Adobe Lightroom Classic 15.5 / Lightroom 9.6 +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-25 · **Change:** minor (LRC-LIB-LIBFOLDERS: a refused move to another folder says what is wrong in plain words and what to do, and `photo.checkMove` / `skip` find and leave out the photos that can't go; dropping photos on a Folders row checks the move first and the question lists what can't go and offers Move N, skip M; LR-BEHAV-TITLEBAR: a double-click follows the system setting, and a panel over the bar keeps the window still; KEYC-METADATA, LRC-LIB-KEYWORDS: ⌥0 / ⌥⇧0 go to the next / previous keyword set; LRC-DEV-HISTOGRAM-DRAG: the histogram's five tonal zones — hover for the value, drag to adjust the Basic control the press locked, double-click to reset; LR-VIEW-HISTOGRAM note updated; MENU-BAR: on macOS a menu item that yields its key to a focused text field or to shortcut recording really lets it go; LR-MERGE-HDR / LR-MERGE-PANO: Lanczos-3 warps; LR-IMP-LOCAL: browsing from the sidebar records the folder; LR-VIEW-ZOOM: only a full-size drag within 20 ms clears a slow-drag verdict; LR-IMP-ADD-DIALOG: hierarchical import album destination reconciled with main, #2362; KEY-SLIDER-NUDGE: vertical wheel nudges need a click or drag in the row; leaving it disarms them; LR-EDIT-OPTICS-PROFILE: Fujifilm nine-knot lens tables read at the plain radius; LR-VIEW-ZOOM: only a full-size drag within 20 ms clears a slow-drag verdict; LRC-LIB-LIBFOLDERS, LR-BEHAV-BG-TASKS: Synchronize Folder's scan shows its folder listing and stops it on ✕; LRC-LIB-LIBFOLDERS: Synchronize Folder says a folder is up to date; LR-LIB-STACK: filmstrip stack badge click; LRC-LIB-REFVIEW / CATALOG-SWITCH: Escape preserves edits; catalog-local pins; deleted and malformed references refused; LRC-LIB-COMPARE: the Info panel labels the active photo while culling, #2398; KEYC-RATING: `\` shows / hides the Filter Bar in the grids; LR-VIEW-PHOTOGRID: the grid reads only the photos an import batch or an edit touched, not the whole list; earlier: LRC-PRINT-PAGE: Print Page Options; LR-META-XMP: fewer false unimported-XMP warnings; KEYC-METADATA: ⌘K / Ctrl+K Add Keywords; LRC-DEV-HISTOGRAM-DRAG: the histogram's five tonal zones — hover for the value, drag to adjust the Basic control the press locked, double-click to reset; LR-VIEW-HISTOGRAM note updated; MENU-BAR: on macOS a menu item that yields its key to a focused text field or to shortcut recording really lets it go; LR-MERGE-HDR / LR-MERGE-PANO: Lanczos-3 warps; LR-IMP-LOCAL: browsing from the sidebar records the folder; LR-VIEW-ZOOM: only a full-size drag within 20 ms clears a slow-drag verdict; LR-IMP-ADD-DIALOG: hierarchical import album destination reconciled with main, #2362; KEY-SLIDER-NUDGE: vertical wheel nudges need a click or drag in the row; leaving it disarms them; LR-EDIT-OPTICS-PROFILE: Fujifilm nine-knot lens tables read at the plain radius; LR-VIEW-ZOOM: only a full-size drag within 20 ms clears a slow-drag verdict; LRC-LIB-LIBFOLDERS, LR-BEHAV-BG-TASKS: Synchronize Folder's scan shows its folder listing and stops it on ✕; LRC-LIB-LIBFOLDERS: Synchronize Folder says a folder is up to date; LR-LIB-STACK: filmstrip stack badge click; LRC-LIB-REFVIEW / CATALOG-SWITCH: Escape preserves edits; catalog-local pins; deleted and malformed references refused; LRC-LIB-COMPARE: the Info panel labels the active photo while culling, #2398; KEYC-RATING: `\` shows / hides the Filter Bar in the grids; LR-VIEW-PHOTOGRID: the grid reads only the photos an import batch or an edit touched, not the whole list; earlier: LRC-PRINT-PAGE: Print Page Options; LR-META-XMP: fewer false unimported-XMP warnings) · **Target:** Adobe Lightroom Classic 15.5 / Lightroom 9.6 The measured, row-by-row checklist: one row per Lightroom feature, menu item and shortcut, what we have and what is missing. It answers *does the feature exist?* (feature breadth). Whether it is good @@ -703,7 +703,7 @@ From `08-lightroom-classic-extras.md` (Classic-only features) and part 2 of `06- | LRC-LIB-CATALOG-LOCK | Catalog open in one program at a time | P1 | ✅ | `cmd:app.openLibrary`, `crates/catalog/src/lock.rs`, `crates/engine/src/library.rs` (`open_library`) | exclusive OS lock on `catalog.lock` for the session (app and `lightcraft-cli --library`); a second opener is refused with who has it (`catalog.lock.owner`: program, process, computer); released by the OS on a crash, so never stale; file systems without locks open unprotected with a warning (the app's notices, `library.info` → `settingsWarnings`, and the CLI's stderr; issue #171); no read-only mode; the browser build (OPFS) has no guard across tabs yet. A library that can't be opened at launch (locked, unreadable, newer format, drive missing) shows a window — Try Again, Choose Another Library…, Continue Without Saving (then a banner; nothing written), Quit — instead of a silent demo session (`crates/ui-egui/src/panels/library_problem.rs`); the lock is released explicitly when the library closes, not by letting its file handle close, so a program another thread is starting at that moment (which holds a copy of every file handle until it is launched) cannot keep the library "already open" for a moment (issue #680) | | LRC-LIB-CATALOG-SWITCH | New / Open Recent catalog, catalog name shown | P1 | ✅ | `cmd:app.newLibrary`, `cmd:app.openLibrary`, `cmd:app.recentLibraries`, `cmd:app.clearRecentLibraries`, `crates/ui-egui/src/dialogs/settings.rs`, `crates/ui-egui/src/panels/left.rs`, `crates/ui-egui/src/panels/library_problem.rs` (`launch_plan`, `show_chooser`), `crates/ui-egui/src/tests/launch_library.rs` | File ▸ New Library… (name, then location), File ▸ Open Recent Library (last 8; missing ones greyed out, dropped when opened; Remove from List ▸ one entry, or `app.recentLibraries {remove}`, which forgets only the path; Clear), the open library's name under My Photos and in the window title (issue #902); Open/New refused during imports and their folder scans; a library that can't be opened leaves the current one and its reference pin intact; a successful switch clears the catalog-local reference pin; ⌘O (Ctrl+O on Windows and Linux) runs Open Library… and asks for a folder once (`crates/ui-egui/src/tests/keymap.rs`: `cmd_o_opens_the_library_picker_once`); a dialog or a text field with the focus keeps the key; Settings ▸ General ▸ At launch: Open the last library (default) or Ask me, a window listing the recent libraries (name, folder, when last opened; missing, unreadable or no-longer-library ones greyed out with the reason, checked read-only — nothing is locked or written, so a library another program has open is reported, with who has it, when Open is pressed; the last one selected; Open, Open Another…, New Library…, Remove from List, Quit; ↑ ↓ Return Esc), also shown once when Alt/Option is held in the first 2 s after the window appears (macOS reports an Option key held since before launch only once it changes); `--library` and `LIGHTCRAFT_LIBRARY` come first and `lightcraft-cli` never asks (issue #1290) | | LRC-LIB-FOLDERS | Disk folder tree | P1 | ✅ | `cmd:library.browse`, `cmd:folder.rename`, `cmd:folder.move`, `crates/ui-egui/src/panels/left.rs` (`local_section`, `folder_tree`) | standard places + the browsed folder + Browse Folder…, each an expandable tree of subfolders, breadcrumb navigation; context menu: Rename Folder…, Move Folder To…, Show in Finder (on disk, photos relinked; one undo step each: undo / redo move the folder back and forth, refused when the destination is taken) | -| LRC-LIB-LIBFOLDERS | Library folders | P1 | ✅ | `cmd:library.folders`, `cmd:library.source` (`libraryFolder`), `cmd:library.filter` (`libraryFolder`), `cmd:library.removeFolder`, `cmd:folder.rename`, `cmd:folder.move`, `cmd:folder.label`, `cmd:folder.create`, `cmd:photo.moveToFolder`, `cmd:folder.scanChanges`, `cmd:folder.synchronize`, `crates/catalog/src/folders.rs`, `crates/engine/src/sync.rs`, `crates/ui-egui/src/sync.rs`, `crates/ui-egui/src/panels/left.rs` (`folders_section`, `folder_menu_for_library`, `row_menu`), `crates/ui-egui/src/tests/panels.rs` | sidebar Folders: the folders the library's photos were imported from, with photo counts (subfolders included), as another way to explore the library next to By Date and Keywords; Local stays the way to browse any folder on disk. Each disk is a row of its own and starts open: a drive letter, a Windows share (`\\server\share`, `\\?\UNC\…`, `\\wsl$\…`), a macOS share or disk (`/Volumes/tokyo`), a Linux mount (`/media`, `/run/media`, `/mnt`, gvfs `smb-share:…`, `/net/`), NFS (`/Network/Servers/`), else “This Computer” — told apart from the stored paths alone, so an offline share lists like a mounted one and the sidebar never waits on a network. Only folders that hold imported photos are listed (browsed, deleted and demo photos don't count); every folder is a row of its own (`Users` → `me` → `Pictures`), and a folder that holds nothing itself and leads to one folder starts open; every level indents one step more than its parent however deep it goes (16 pt while the deepest open row of any sidebar tree fits the panel with room for its name and count; narrower in bands of 14, 12, 10 and 8 pt when it would not, the same for every tree, chosen from the last frame; issue #2298): past 8 pt the whole sidebar (Albums, Local, By Date, Folders, Keywords) scrolls sideways when its widest row is wider than the panel (rows are measured one frame behind; Create Album and the counts stay at the visible edge); a name that does not fit ends in an ellipsis at the count (the full name on hover; a row asks for room for at most 140 pt of its name, so depth, not one long name, makes the sidebar scroll), as does the grid title; selection and hover bars end at the panel's edge; click makes the folder the source, like an album or a Local folder (its photos and those of the folders inside it fill the grid, titled “photos/travel”; the filter bar narrows it further; `library.source` `libraryFolder` + `path`; kept with the library's view), and its row is always opened into view; the shown folder follows a rename or move and their undo (engine-tested; the sidebar test covers rename), is dropped back to All Photos when it is removed or no longer holds a photo, and a smart album made from the view keeps it, also when its rules are edited (the editor has no folder field). Only a folder that shows exactly its own photos can be shown (not the startup disk, not `/Volumes`-like folders above disks, not an empty one). A row that would cover other disks' photos too (the startup disk, `/Volumes`, `/mnt`…) only opens. Right-click (row or triangle): Rename Folder…, Move Folder To…, New Folder on Disk… (`folder.create`; one undo step, undo removes it while empty), Move Selected Photos Here (`photo.moveToFolder`, also *Move to Folder…* in the photo context menu, and photos dragged from the grid onto a Folders row: the row lights up, the dragged label says “Move 3 photos to “Trip””, a closed folder held under the pointer opens, a row covering several disks and Local photos are refused with the reason, photos already there say so; a drop asks first (“Move 2 photos to “Porto”?”, Don't ask again, Settings → Confirm before moving photos to another folder on disk), and photos that leave the view leave the selection; files and XMP sidecars move, virtual copies follow, across volumes copied (streamed) and verified before the source goes, a name taken in the destination refuses the whole move, one undo step; an undo with the share offline or read-only is refused with the reason and kept until it can run, nothing deleted), Show in Finder (on disk, photos relinked, as in Local), Set Color Label ▸ (the five colours with their custom names, None, Edit Label Names…; `folder.label`, one undo step; the row shows the label's dot before its count and says it with its name; kept in the catalog as a folder record under the folder's identity, so it follows Rename / Move and their undo and redo, the folders inside going along), Synchronize Folder… (the dialog opens at once and scans the folder and the folders inside it on a worker thread — the look for new files beside parallel checks of the library's photos — then offers Import new photos (checked; files only browsed in Local count as new), Relink photos whose file was renamed or moved within the folder (checked; matched by content — a Duplicate's too — or, for a photo with no hash on record such as one from a Lightroom catalog, by file size and dimensions when exactly one file agrees), Remove missing photos from the library (to Recently Deleted) and Read metadata updates from XMP sidecars (saved after the photo came in or was last edited here, and saying something the library doesn't; the sidecar wins), with counts and skipped duplicates / unreadable files; a folder with none of these changes only says the library is up to date with it, with one Close and no choices, and closing it starts no job; `folder.scanChanges` / `folder.synchronize`, which acts on exactly the scan shown — a scan whose folder's photos changed meanwhile is refused and made again in the background — and is one undo step, also with a full history; a folder that isn't there (an unplugged disk) is reported as such, not as every photo missing; a whole disk or a folder holding disks needs `disk: true`; Esc stops the scan; Synchronize hands everything to a worker thread — the import, the checks that moved and missing files are still as found, the sidecar reads — and commits its steps between frames, shown in the activity stack with ✕ to stop, so no file is touched on the UI thread) and Remove from Library… (asks; moves the folder's photos to Recently Deleted, one undo step, no file touched); a disk row (not the startup disk) offers Set Color Label ▸, Synchronize Folder… and Remove Disk from Library… (the command needs `disk: true` for a whole disk or a folder spanning several). Limits: names are compared as written (macOS `/Volumes/tokyo` vs `/Volumes/TOKYO` are two disks; `/Volumes/Macintosh HD/…` and `/…` two rows); no disk capacity / online status; no “include subfolders” switch (a folder always includes the ones inside it); photos can't yet be dragged onto a folder row (use the menus); a name clash on moving photos is refused rather than renamed -1, -2; folders can't be filtered or sorted by label, and a label stays with the old path when the folder is moved outside LightCraft (Find Missing relinks photos, not folder records); Synchronize has no “show import dialog first” or “show missing photos” option, and only knows when a photo came in or was last developed here: a rating, label or metadata change made here (auto-write off) after another app saved the sidecar is listed as an update, and reading it restores the sidecar's older value (reading is never the default); the walk for new files stops when the scan is cancelled, and its depth/entry limits are only logged | +| LRC-LIB-LIBFOLDERS | Library folders | P1 | ✅ | `cmd:library.folders`, `cmd:library.source` (`libraryFolder`), `cmd:library.filter` (`libraryFolder`), `cmd:library.removeFolder`, `cmd:folder.rename`, `cmd:folder.move`, `cmd:folder.label`, `cmd:folder.create`, `cmd:photo.moveToFolder`, `cmd:photo.checkMove`, `cmd:folder.scanChanges`, `cmd:folder.synchronize`, `crates/catalog/src/folders.rs`, `crates/engine/src/sync.rs`, `crates/ui-egui/src/sync.rs`, `crates/ui-egui/src/panels/left.rs` (`folders_section`, `folder_menu_for_library`, `row_menu`), `crates/ui-egui/src/tests/panels.rs` | sidebar Folders: the folders the library's photos were imported from, with photo counts (subfolders included), as another way to explore the library next to By Date and Keywords; Local stays the way to browse any folder on disk. Each disk is a row of its own and starts open: a drive letter, a Windows share (`\\server\share`, `\\?\UNC\…`, `\\wsl$\…`), a macOS share or disk (`/Volumes/tokyo`), a Linux mount (`/media`, `/run/media`, `/mnt`, gvfs `smb-share:…`, `/net/`), NFS (`/Network/Servers/`), else “This Computer” — told apart from the stored paths alone, so an offline share lists like a mounted one and the sidebar never waits on a network. Only folders that hold imported photos are listed (browsed, deleted and demo photos don't count); every folder is a row of its own (`Users` → `me` → `Pictures`), and a folder that holds nothing itself and leads to one folder starts open; every level indents one step more than its parent however deep it goes (16 pt while the deepest open row of any sidebar tree fits the panel with room for its name and count; narrower in bands of 14, 12, 10 and 8 pt when it would not, the same for every tree, chosen from the last frame; issue #2298): past 8 pt the whole sidebar (Albums, Local, By Date, Folders, Keywords) scrolls sideways when its widest row is wider than the panel (rows are measured one frame behind; Create Album and the counts stay at the visible edge); a name that does not fit ends in an ellipsis at the count (the full name on hover; a row asks for room for at most 140 pt of its name, so depth, not one long name, makes the sidebar scroll), as does the grid title; selection and hover bars end at the panel's edge; click makes the folder the source, like an album or a Local folder (its photos and those of the folders inside it fill the grid, titled “photos/travel”; the filter bar narrows it further; `library.source` `libraryFolder` + `path`; kept with the library's view), and its row is always opened into view; the shown folder follows a rename or move and their undo (engine-tested; the sidebar test covers rename), is dropped back to All Photos when it is removed or no longer holds a photo, and a smart album made from the view keeps it, also when its rules are edited (the editor has no folder field). Only a folder that shows exactly its own photos can be shown (not the startup disk, not `/Volumes`-like folders above disks, not an empty one). A row that would cover other disks' photos too (the startup disk, `/Volumes`, `/mnt`…) only opens. Right-click (row or triangle): Rename Folder…, Move Folder To…, New Folder on Disk… (`folder.create`; one undo step, undo removes it while empty), Move Selected Photos Here (`photo.moveToFolder`, also *Move to Folder…* in the photo context menu, and photos dragged from the grid onto a Folders row: the row lights up, the dragged label says “Move 3 photos to “Trip””, a closed folder held under the pointer opens, a row covering several disks and Local photos are refused with the reason, photos already there say so; a drop asks first (“Move 2 photos to “Porto”?”, Don't ask again, Settings → Confirm before moving photos to another folder on disk), a drop whose check (`photo.checkMove`) finds problems lists the photos that can't go, each with its reason (a name taken in the folder, two photos of the move with one name, a file missing or offline, a photo with no file), offers Move N, skip M and asks even when set not to, and photos that leave the view leave the selection; files and XMP sidecars move, virtual copies follow, across volumes copied (streamed) and verified before the source goes, a name taken in the destination refuses the whole move, one undo step; an undo with the share offline or read-only is refused with the reason and kept until it can run, nothing deleted), Show in Finder (on disk, photos relinked, as in Local), Set Color Label ▸ (the five colours with their custom names, None, Edit Label Names…; `folder.label`, one undo step; the row shows the label's dot before its count and says it with its name; kept in the catalog as a folder record under the folder's identity, so it follows Rename / Move and their undo and redo, the folders inside going along), Synchronize Folder… (the dialog opens at once and scans the folder and the folders inside it on a worker thread — the look for new files beside parallel checks of the library's photos — then offers Import new photos (checked; files only browsed in Local count as new), Relink photos whose file was renamed or moved within the folder (checked; matched by content — a Duplicate's too — or, for a photo with no hash on record such as one from a Lightroom catalog, by file size and dimensions when exactly one file agrees), Remove missing photos from the library (to Recently Deleted) and Read metadata updates from XMP sidecars (saved after the photo came in or was last edited here, and saying something the library doesn't; the sidecar wins), with counts and skipped duplicates / unreadable files; a folder with none of these changes only says the library is up to date with it, with one Close and no choices, and closing it starts no job; `folder.scanChanges` / `folder.synchronize`, which acts on exactly the scan shown — a scan whose folder's photos changed meanwhile is refused and made again in the background — and is one undo step, also with a full history; a folder that isn't there (an unplugged disk) is reported as such, not as every photo missing; a whole disk or a folder holding disks needs `disk: true`; Esc stops the scan; Synchronize hands everything to a worker thread — the import, the checks that moved and missing files are still as found, the sidecar reads — and commits its steps between frames, shown in the activity stack with ✕ to stop, so no file is touched on the UI thread) and Remove from Library… (asks; moves the folder's photos to Recently Deleted, one undo step, no file touched); a disk row (not the startup disk) offers Set Color Label ▸, Synchronize Folder… and Remove Disk from Library… (the command needs `disk: true` for a whole disk or a folder spanning several). Limits: names are compared as written (macOS `/Volumes/tokyo` vs `/Volumes/TOKYO` are two disks; `/Volumes/Macintosh HD/…` and `/…` two rows); no disk capacity / online status; no “include subfolders” switch (a folder always includes the ones inside it); a name clash or an offline file on moving photos refuses the move in plain words naming the photos (`photo.checkMove` lists them beforehand and `skip` moves the rest) rather than renaming -1, -2; folders can't be filtered or sorted by label, and a label stays with the old path when the folder is moved outside LightCraft (Find Missing relinks photos, not folder records); Synchronize has no “show import dialog first” or “show missing photos” option, and only knows when a photo came in or was last developed here: a rating, label or metadata change made here (auto-write off) after another app saved the sidecar is listed as an update, and reading it restores the sidecar's older value (reading is never the default); the walk for new files stops when the scan is cancelled, and its depth/entry limits are only logged | | LRC-LIB-COLLECTIONS | Collections & sets | P1 | ✅ | `cmd:album.create`, `cmd:album.createSmart`, `cmd:album.toggleTarget`, `cmd:album.setTarget`, `cmd:album.clearQuick` | albums + folders (sets), smart albums (rule editor; rules incl. File Path — the whole string, either separator, case-insensitive), Quick Collection and target album (B in the grids adds / removes the selection; album menu ▸ Set as Target Album; the target is marked +) | | LRC-LIB-SMARTCOLL | Smart-collection rules | P1 | ✅ | `cmd:album.createSmart`, `cmd:album.setRules`, `cmd:album.ruleFields`, `cmd:dialog.smartAlbum`, `crates/catalog/src/rules.rs`, `crates/ui-egui/src/dialogs/rules_editor.rs` | rule editor: match all / any / none, nested groups (⌥+ or + Group), 47 fields. The field menu shows Rating, Pick Flag, Color Label and Any Searchable Text, then one submenu per group (`FIELD_GROUPS`; `album.ruleFields` reports each field's `group`): Source (album — a plain or a smart album, so one smart album can include or exclude another; a rule that would make an album include itself, directly or through others, is refused, and a loop saved anyway can't recurse: inside it, the album being evaluated counts as holding no photos, so an "isn't" rule on it matches every photo, and the sidebar marks it ⚠ —, virtual copy, copy name, in a stack), File (filename, extension, file path, type, format, video duration), Date (capture / import / edit), Keywords & People (keywords, keyword count, people on named faces, people count), Description (title, caption, alt text, creator, copyright, copyright status), Camera Info (camera, lens, focal length, aperture, shutter speed as 1/250, ISO), Location (any, city, state / province, country, GPS), Size (long / short edge, aspect ratio and megapixels, all of the photo as shown: oriented and cropped), Develop (has edits, cropped, treatment), Assisted Culling (focus, best of similar shots); text / number / date / in-the-last operators; live match count; also usable as a library filter (`ruleSet`). Missing vs Classic: develop preset, flash, exposure bias, camera serial, colour profile / bit depth, IPTC Job, smart-preview status. Choice values read as words in every language (Public Domain, Black & White; `album.ruleFields` gives `choiceLabels`), while rules store the ids; yes/no fields read Yes / No and take `true`/`false`, `"yes"`/`"no"`, `"true"`/`"false"` or 1/0. Every value is checked against its field (`RuleSet::check`): numbers (rating 0–5), shutter speeds, dates (`2026`, `2026-08`, `2026-08-14`, then `T10`, `T10:00` or `T10:00:00`, a space working as the `T`, and after whole seconds a fraction and a time zone as imported capture times carry them (`.250+02:00`); no 30 February; `rules::rule_date` is the one reading for the check and the matcher; each date field has a calendar picker, `crates/ui-egui/src/widgets/date_picker.rs`, that picks a year, a month or a day and keeps a "between" in order), between = two bounds in order, in the last = more than 0 of a known unit, choices (ids, the flag's picked / rejected, a colour label's custom name), text with something to look for, an existing album (plain or smart, not a folder), no empty groups; each problem names its rule (`rule 2.1: no rating 0–5 is 9`), and album.createSmart / setRules / library.filter refuse them. The editor marks each bad rule under its row (inside groups too), keeps OK disabled until they are fixed (and its confirm refuses them before renaming anything), picks an Album rule's album with an album picker (`crates/ui-egui/src/widgets/album_picker.rs`: the sidebar's tree with folders, or type part of a name or folder; ↑ / ↓ / Enter; albums that can't be picked shown greyed with the reason) (is / isn't; a folder can't be tested), and drawing it never changes a rule: a rating of 9, "in the last 0 days" or 20,000 days, a "between" that isn't a pair all stay as stored (and are marked where they can't match) until edited. Album rules saved with an old operator (≥, between) are read as the "isn't" they always meant (`RuleSet::upgrade`). Saved smart albums whose rules no longer check are marked ⚠ in the sidebar (tooltip: what to fix; `albums.list` `problems`, `Catalog::smart_album_problems`); the name and rules of an album are saved as one undo step (`album.setRules` `name`). Problems read as the field's name and the issue in the editor's language (“Titel: braucht einen Suchbegriff”; `Problem::issue` / `field`, `Issue::text`, translated in every locale), while commands keep the English `rule 2.1: …` message for agents | | LRC-LIB-PUBLISH | Publish services | P2 | ⬜ | | | @@ -959,3 +959,5 @@ Latin stays upright. Advanced Japanese composition remains open. Regression cove | 2026-10-23 | patch | LR-BEHAV-ACCESS: the name field of New Album, New Smart Album, Rename and the other one-field dialogs takes the keyboard focus once when the dialog opens instead of every frame, so Tab and Shift+Tab reach the check box, Cancel and OK; status unchanged (🟡) | | 2026-10-22 | minor | LR-CROP-AUTO: Auto straighten turns by at most 10° and only on at least 3 agreeing lines, and says when it finds nothing to level by; measured on 68 photos straightened by hand and 300 left as shot, unwanted turns of more than 1° fell from 79 to 19 of the 300. Downgraded ✅ → 🟡: it still leaves most tilted photos alone | | 2026-10-23 | patch | LRC-LIB-FILTERBAR: showing an album (`library.source`) while the filter holds an album drops the filter's album, as showing a library folder already dropped its folder filter; before, the old album stayed in the filter unseen (the filter bar has no album chip) and narrowed the next source such as All Photos; the row's note says so; status unchanged (✅) | +| 2026-10-23 | minor | LRC-LIB-LIBFOLDERS: `photo.moveToFolder` refuses in plain words (the photos named, what to do) with no command name, takes `skip` (photo ids left where they are while the rest move, each reported with its reason), and `photo.checkMove` sorts the photos beforehand (movable, already there, name taken, file missing or offline, Local or without a file) without touching anything; status unchanged (✅) | +| 2026-10-23 | minor | LRC-LIB-LIBFOLDERS: dropping photos on a Folders row checks the move first (`photo.checkMove`, which now marks `twin`) and the question lists the photos that can't go with a line for each reason, offers Move N, skip M, and asks even when set not to; status unchanged (✅) | diff --git a/docs/whats-new.md b/docs/whats-new.md index c6c25920034..655283810b1 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -50,6 +50,21 @@ stay available in All Metadata; PSD edit copies keep their capture date. Original exports with Remove Location Info enabled are refused when a PSD or PSB embeds GPS, since LightCraft cannot strip metadata from a byte-for-byte original copy. +### A refused move to another folder says what is wrong +- When photos can't be moved into another folder, the message now names the photos and what to do (rename them, + reconnect the disk, or leave them out of the move), in plain words, instead of an "invalid parameters" error that + named an internal command. Moving the photos you chose with Move Selected Photos Here still stops as a whole when one + of them can't go, and then nothing is moved. +- Agents get the same details: `photo.checkMove` lists, without moving anything, the photos that can go, the ones + already in the folder, and those that can't go: a name taken there, a file that is missing or offline, or a photo + that can't move as it is (a Local photo, until it is added to the library, or one with no file). + `photo.moveToFolder` takes `skip`, the ids of photos to leave where they are while the rest move (a Local photo + can be skipped too), and reports each skipped photo with the reason. +- Dropping photos on a folder in the sidebar now checks the move first. The question names the photos that can't go + (up to five, then a count) and why: the name is taken in the folder, two photos being moved share a name, the file is + missing or offline, or the photo has no file. It says what to do and offers to move the rest, and it asks even when + you turned off the confirmation. Dropping a Local photo is still refused on the row, with its own reason. + ### Choose where a Lightroom catalog goes - File ▸ Import Lightroom Catalog… now asks first: merge the catalog's photos, collections and edits into the library open now, or create a new library for them, named after the catalog and placed next to the open library