Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/ui-egui/locales/cs-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"Moved; {} photo(s) relinked": "Přesunuto; znovu propojeno fotografií: {}",
"Named ({named_n})": "Pojmenované ({named_n})",
"New Folder in “{name}”": "Nová složka v „{name}“",
"Created folder “{name}” in “{parent}”": "Vytvořena složka „{name}“ v „{parent}“",
"On {have} of {of} selected photos": "Na {have} z {of} vybraných fotografií",
"Painting “{k}”: click photos to add or remove it · Esc stops": "Nanášení „{k}“: kliknutím na fotografie přidáte nebo odeberete slovo · Esc ukončí režim",
"Paste into {n} photo{} — only settings that were copied are pasted": "Vložit do fotografií: {n}{:.0} — vloží se pouze zkopírovaná nastavení",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/de-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@
"{what} merge cancelled": "{what}-Zusammenfügung abgebrochen",
"{n} Local photo{} skipped: albums hold library photos (Add to My Photos first)": "Übersprungen: {n} lokale Fotos{0:.0} – Alben enthalten Bibliotheksfotos (zuerst zu „Meine Fotos“ hinzufügen)",
"New Folder in “{name}”": "Neuer Ordner in „{name}“",
"Created folder “{name}” in “{parent}”": "Ordner „{name}“ in „{parent}“ erstellt",
"Moved {} photo(s)": "{} Foto(s) verschoben",
"not added to Apple Photos: {e}": "nicht zu Apple Fotos hinzugefügt: {e}",
"{n} added to Apple Photos album “{album}”": "{n} zum Apple-Fotos-Album „{album}“ hinzugefügt",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/es-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@
"{what} merge cancelled": "Combinación {what} cancelada",
"{n} Local photo{} skipped: albums hold library photos (Add to My Photos first)": "Fotos locales omitidas: {n}{0:.0} — los álbumes contienen fotos de la biblioteca (añádelas primero a Mis fotos)",
"New Folder in “{name}”": "Nueva carpeta en «{name}»",
"Created folder “{name}” in “{parent}”": "Carpeta «{name}» creada en «{parent}»",
"Moved {} photo(s)": "{} foto(s) movida(s)",
"not added to Apple Photos: {e}": "no se añadieron a Fotos de Apple: {e}",
"{n} added to Apple Photos album “{album}”": "{n} añadidas al álbum “{album}” de Fotos de Apple",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/fi-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
"Moved; {} photo(s) relinked": "Siirretty; yhdistetty uudelleen kuvia: {}",
"Named ({named_n})": "Nimetyt ({named_n})",
"New Folder in “{name}”": "Uusi kansio kohteessa ”{name}”",
"Created folder “{name}” in “{parent}”": "Kansio ”{name}” luotu kohteeseen ”{parent}”",
"On {have} of {of} selected photos": "{have} / {of} valitulla kuvalla",
"Painting “{k}”: click photos to add or remove it · Esc stops": "Maalataan ”{k}”: napsauta kuvia lisätäksesi tai poistaaksesi sen · Esc lopettaa",
"Paste into {n} photo{} — only settings that were copied are pasted": "Liitä kuviin: {n}{:.0} — vain kopioidut asetukset liitetään",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/fr-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@
"{what} merge cancelled": "Fusion {what} annulée",
"{n} Local photo{} skipped: albums hold library photos (Add to My Photos first)": "Photos locales ignorées : {n}{0:.0} — les albums contiennent des photos de la bibliothèque (ajoutez-les d’abord à Mes photos)",
"New Folder in “{name}”": "Nouveau dossier dans « {name} »",
"Created folder “{name}” in “{parent}”": "Dossier « {name} » créé dans « {parent} »",
"Moved {} photo(s)": "{} photo(s) déplacée(s)",
"not added to Apple Photos: {e}": "non ajouté à Apple Photos : {e}",
"{n} added to Apple Photos album “{album}”": "{n} ajouté(s) à l'album Apple Photos « {album} »",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/id-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@
"{what} merge cancelled": "Penggabungan {what} dibatalkan",
"{n} Local photo{} skipped: albums hold library photos (Add to My Photos first)": "{n} foto Lokal{:.0} dilewati: album hanya dapat berisi foto pustaka (tambahkan ke Foto saya terlebih dahulu)",
"New Folder in “{name}”": "Folder baru di “{name}”",
"Created folder “{name}” in “{parent}”": "Folder “{name}” dibuat di “{parent}”",
"Moved {} photo(s)": "{} foto dipindahkan",
"not added to Apple Photos: {e}": "tidak ditambahkan ke Apple Photos: {e}",
"{n} added to Apple Photos album “{album}”": "{n} ditambahkan ke album Apple Photos “{album}”",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/it-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@
"{what} merge cancelled": "Unione {what} annullata",
"{n} Local photo{} skipped: albums hold library photos (Add to My Photos first)": "Foto locali saltate: {n}{0:.0}; gli album contengono foto della libreria (prima aggiungile a Le mie foto)",
"New Folder in “{name}”": "Nuova cartella in “{name}”",
"Created folder “{name}” in “{parent}”": "Cartella “{name}” creata in “{parent}”",
"Moved {} photo(s)": "Foto spostate: {}",
"not added to Apple Photos: {e}": "non aggiunte a Foto di Apple: {e}",
"{n} added to Apple Photos album “{album}”": "Aggiunte all'album “{album}” di Foto di Apple: {n}",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/ja-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
"{what} merge cancelled": "{what}合成をキャンセルしました",
"{n} Local photo{} skipped: albums hold library photos (Add to My Photos first)": "ローカル写真{n}枚をスキップしました{0:.0}:アルバムに入れられるのはライブラリの写真です(先にマイフォトに追加してください)",
"New Folder in “{name}”": "「{name}」に新規フォルダ",
"Created folder “{name}” in “{parent}”": "「{parent}」にフォルダ「{name}」を作成しました",
"Moved {} photo(s)": "{} 枚の写真を移動しました",
"not added to Apple Photos: {e}": "Appleの写真に追加されませんでした:{e}",
"{n} added to Apple Photos album “{album}”": "{n}件をAppleの写真のアルバム「{album}」に追加しました",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/ka-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"Moved; {} photo(s) relinked": "გადატანილია; ხელახლა დაკავშირდა ფოტო: {}",
"Named ({named_n})": "სახელიანი ({named_n})",
"New Folder in “{name}”": "ახალი საქაღალდე „{name}“-ში",
"Created folder “{name}” in “{parent}”": "საქაღალდე „{name}“ შეიქმნა „{parent}“-ში",
"On {have} of {of} selected photos": "{of} მონიშნული ფოტოდან {have}-ზე",
"Painting “{k}”: click photos to add or remove it · Esc stops": "„{k}“-ის მინიჭება: დაწკაპეთ ფოტოებზე მის დასამატებლად ან მოსახსნელად · Esc ასრულებს",
"Paste into {n} photo{} — only settings that were copied are pasted": "ჩასმა ფოტოებში: {n}{:.0} — ჩაისმება მხოლოდ კოპირებული პარამეტრები",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/pl-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@
"Lightroom geometry was not preserved for {path}; {mode} will be recalculated.": "Geometria z Lightrooma dla {path} nie została zachowana; tryb {mode} zostanie obliczony ponownie.",
"Moved {} photo(s)": "Przeniesione zdjęcia: {}",
"New Folder in “{name}”": "Nowy folder w „{name}”",
"Created folder “{name}” in “{parent}”": "Utworzono folder „{name}” w „{parent}”",
"Restored {} photo{} from Recently Deleted": "Przywrócone z Ostatnio usuniętych zdjęcia: {}{:.0}",
"XMP adjustments were not imported for {path}: {fields}.": "Korekty XMP dla {path} nie zostały zaimportowane: {fields}.",
"XMP profile \"{profile}\" was not applied for {path}; colors may differ from Lightroom.": "Profil XMP „{profile}” nie został zastosowany do {path}; kolory mogą się różnić od Lightrooma.",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/pt-br-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
"{what} merge cancelled": "{what} mesclagem cancelada",
"{n} Local photo{} skipped: albums hold library photos (Add to My Photos first)": "Fotos locais ignoradas: {n}{0:.0} — álbuns contêm fotos da biblioteca (adicione-as às Minhas fotos primeiro)",
"New Folder in “{name}”": "Nova pasta em “{name}”",
"Created folder “{name}” in “{parent}”": "Pasta “{name}” criada em “{parent}”",
"Moved {} photo(s)": "{} foto(s) movida(s)",
"not added to Apple Photos: {e}": "não adicionadas ao Fotos da Apple: {e}",
"{n} added to Apple Photos album “{album}”": "{n} adicionadas ao álbum “{album}” do Fotos da Apple",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/ru-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@
"{what} merge cancelled": "{what}: слияние отменено",
"{n} Local photo{} skipped: albums hold library photos (Add to My Photos first)": "Пропущено локальных фото: {n}{0:.0} — в альбомах только фото из библиотеки (сначала добавьте их в «Мои фото»)",
"New Folder in “{name}”": "Новая папка в «{name}»",
"Created folder “{name}” in “{parent}”": "Папка «{name}» создана в «{parent}»",
"Moved {} photo(s)": "Перемещено фото: {}",
"not added to Apple Photos: {e}": "не добавлено в Apple Фото: {e}",
"{n} added to Apple Photos album “{album}”": "Добавлено в альбом «{album}» Apple Фото: {n}",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/sv-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
"Moved; {} photo(s) relinked": "Flyttat; {} foto(n) har länkats om",
"Named ({named_n})": "Namngivna ({named_n})",
"New Folder in “{name}”": "Ny mapp i ”{name}”",
"Created folder “{name}” in “{parent}”": "Mappen ”{name}” skapad i ”{parent}”",
"new, inside {parent}": "ny, inuti {parent}",
"none (CPU rendering): {why}": "ingen (CPU-rendering): {why}",
"not added to Apple Photos: {e}": "inte tillagt i Apple Photos: {e}",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/uk-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@
"{what} merge cancelled": "Об’єднання {what} скасовано",
"{n} Local photo{} skipped: albums hold library photos (Add to My Photos first)": "Пропущено локальних фото: {n}{0:.0} — в альбомах лише фото з бібліотеки (спершу додайте їх до моїх фото)",
"New Folder in “{name}”": "Нова тека в «{name}»",
"Created folder “{name}” in “{parent}”": "Теку «{name}» створено в «{parent}»",
"Moved {} photo(s)": "Переміщено фото: {}",
"not added to Apple Photos: {e}": "не додано до Apple Фото: {e}",
"{n} added to Apple Photos album “{album}”": "Додано до альбому Apple Фото «{album}»: {n}",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/vi-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
"Moved; {} photo(s) relinked": "Đã di chuyển; liên kết lại {} ảnh",
"Named ({named_n})": "Có tên ({named_n})",
"New Folder in “{name}”": "Thư mục mới trong «{name}»",
"Created folder “{name}” in “{parent}”": "Đã tạo thư mục «{name}» trong «{parent}»",
"On {have} of {of} selected photos": "Trên {have} / {of} ảnh đã chọn",
"Painting “{k}”: click photos to add or remove it · Esc stops": "Gán «{k}»: nhấp ảnh để thêm hoặc gỡ · Esc dừng",
"Paste into {n} photo{} — only settings that were copied are pasted": "Dán vào {n} ảnh{:.0} — chỉ dán các thiết lập đã sao chép",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/zh-hans-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
"{what} merge cancelled": "已取消 {what} 合并",
"{n} Local photo{} skipped: albums hold library photos (Add to My Photos first)": "已跳过 {n} 张本地照片{0:.0}:相册只能收录图库中的照片(请先添加到我的照片)",
"New Folder in “{name}”": "在“{name}”中新建文件夹",
"Created folder “{name}” in “{parent}”": "已在“{parent}”中创建文件夹“{name}”",
"Moved {} photo(s)": "已移动 {} 张照片",
"not added to Apple Photos: {e}": "未添加到 Apple 照片:{e}",
"{n} added to Apple Photos album “{album}”": "已将 {n} 个添加到 Apple 照片相册“{album}”",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/locales/zh-hant-formats.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
"{what} merge cancelled": "已取消{what}合併",
"{n} Local photo{} skipped: albums hold library photos (Add to My Photos first)": "已略過 {n} 張本機照片{0:.0}:相簿只能收錄照片庫中的照片(請先加入我的照片)",
"New Folder in “{name}”": "在「{name}」中新增資料夾",
"Created folder “{name}” in “{parent}”": "已在「{parent}」中建立資料夾「{name}」",
"Moved {} photo(s)": "已移動 {} 張照片",
"not added to Apple Photos: {e}": "未加入 Apple 照片:{e}",
"{n} added to Apple Photos album “{album}”": "已將 {n} 個加入 Apple 照片相簿「{album}」",
Expand Down
3 changes: 2 additions & 1 deletion crates/ui-egui/src/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ pub fn handle(app: &mut LightcraftApp, ctx: &egui::Context, req: &ControlRequest
"ui.dialog.confirm" => match app.ui.dialog.take() {
Some(d) => {
let r = crate::panels::dialogs::confirm_dialog(app, &d);
// the import review and the rule editor stay open on an error, as with their buttons
// the import review, the rule editor and the one-line prompts stay open on an error, as with their buttons
if (r.is_err()
&& matches!(
d,
Expand All @@ -423,6 +423,7 @@ pub fn handle(app: &mut LightcraftApp, ctx: &egui::Context, req: &ControlRequest
| crate::state::Dialog::SmartRules { .. }
| crate::state::Dialog::SaveEffect { .. }
| crate::state::Dialog::CaptureTime { .. }
| crate::state::Dialog::TextPrompt { .. }
))
|| (r.is_ok() && crate::panels::dialogs::keeps_open(app, &d))
|| (r.is_err() && crate::lightroom_destination::keeps_open_on_error(app, &d))
Expand Down
10 changes: 10 additions & 0 deletions crates/ui-egui/src/dialogs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,16 @@ fn confirmed(app: &mut LightcraftApp, ctx: &egui::Context, dlg: &mut Dialog) ->
*error = Some(e);
}
}
// a one-line prompt that is refused stays open with its text, so the name can be fixed
Err(e) if matches!(dlg, Dialog::TextPrompt { .. }) => app.toast_error(ctx, e),
// a folder made on disk says so (the new folder holds no photos yet)
Ok(r) if matches!(&dlg, Dialog::TextPrompt { command, .. } if command == "folder.create") => {
if let Dialog::TextPrompt { params, .. } = &dlg {
let (path, parent) = (r["path"].as_str().unwrap_or_default(), params["parent"].as_str().unwrap_or_default());
app.toast(ctx, crate::panels::left::created_text(path, parent));
}
closed = true;
}
Ok(r) if matches!(dlg, Dialog::NewAlbum { .. }) && r.get("skipped").and_then(serde_json::Value::as_u64).is_some_and(|n| n > 0) => {
// albums hold library photos (issue #684): say which part of the selection stayed out
crate::panels::grid::toast_skipped(app, ctx, &r);
Expand Down
9 changes: 9 additions & 0 deletions crates/ui-egui/src/dialogs/confirm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ pub fn confirm_dialog(app: &mut LightcraftApp, dlg: &Dialog) -> Result<serde_jso
}
Dialog::RenameAlbum { id, name } => app.run("album.rename", json!({"id": id, "name": name})),
Dialog::TextPrompt { value, command, params, key, .. } => {
// Rename Folder opens with the folder's own name typed: confirming it unchanged renames nothing, as it always has
// (the engine would refuse it as a name that "already exists")
let kept = command == "folder.rename"
&& params["path"].as_str().is_some_and(|path| {
std::path::Path::new(path.trim_end_matches(['/', '\\'])).file_name().is_some_and(|f| f.to_string_lossy() == value.trim())
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
});
if kept {
return Ok(serde_json::Value::Null);
}
let mut p = params.clone();
p[key.as_str()] = json!(value.trim());
app.run(command, p)
Expand Down
2 changes: 1 addition & 1 deletion crates/ui-egui/src/panels/left.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{created_text, folder_row_of, move_photos, moved_text};
use folders::{folder_rows, reveal_chosen};
use keywords::keyword_rows;
pub(crate) use local::{fs_cached, fs_cached_running, same_folder};
Expand Down
7 changes: 7 additions & 0 deletions crates/ui-egui/src/panels/left/folders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,13 @@ pub(crate) fn moved_text(n: u64, name: &str) -> String {
}
}

/// What `folder.create` of the folder at `path` inside `parent` says when it succeeds: the folder
/// is on disk now, but it has no photos, so the Folders list may not show it yet.
pub(crate) fn created_text(path: &str, parent: &str) -> String {
let name = std::path::Path::new(path).file_name().map_or_else(|| path.to_string(), |f| f.to_string_lossy().to_string());
crate::i18n::tr_format!("Created folder “{name}” in “{parent}”", name = name, parent = lightcraft_catalog::folders::folder_label(parent))
}

/// [`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) {
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ mod switch_library;
mod sync;
mod tallies;
mod temp_slider;
mod text_prompt;
mod titlebar;
mod tool_overlay;
mod unsaved;
Expand Down
Loading
Loading