Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
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
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@
"Effects": "Efekty",
"Empty Recently Deleted": "Vyprázdnit nedávno odstraněné",
"Enable Lens Corrections": "Zapnout korekce objektivu",
"Enable Painting": "Zapnout nanášení",
"Enable Profile Corrections": "Zapnout korekce podle profilu",
"End Interaction": "Ukončit interakci",
"English": "English",
Expand Down Expand Up @@ -975,6 +976,7 @@
"Keyword Suggestions": "Návrhy klíčových slov",
"Keyword Tag Options": "Možnosti značky klíčového slova",
"Keyword to paint": "Klíčové slovo k nanášení",
"Type a keyword to paint in the Keywords panel": "Zadejte klíčové slovo k nanášení v panelu Klíčová slova",
"Keywords": "Klíčová slova",
"Keywords & People": "Klíčová slova a lidé",
"Keywords (K)": "Klíčová slova (K)",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@
"Effects": "Effekte",
"Empty Recently Deleted": "„Zuletzt gelöscht“ leeren",
"Enable Lens Corrections": "Objektivkorrekturen aktivieren",
"Enable Painting": "Auftragen aktivieren",
"Enable Profile Corrections": "Profilkorrekturen aktivieren",
"End Interaction": "Interaktion beenden",
"English": "English",
Expand Down Expand Up @@ -765,6 +766,7 @@
"Keyword Sets": "Stichwortsätze",
"Keyword Suggestions": "Stichwortvorschläge",
"Keyword to paint": "Stichwort zum Auftragen",
"Type a keyword to paint in the Keywords panel": "Stichwort zum Auftragen im Bedienfeld Stichwörter eingeben",
"Keywords": "Stichwörter",
"Keywords (K)": "Stichwörter (K)",
"Keywords you add appear here; ⌥1–⌥9 apply them.": "Hinzugefügte Stichwörter erscheinen hier; ⌥1–⌥9 wendet sie an.",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@
"Effects": "Efectos",
"Empty Recently Deleted": "Vaciar Eliminadas recientemente",
"Enable Lens Corrections": "Activar correcciones de lente",
"Enable Painting": "Activar pintura",
"Enable Profile Corrections": "Activar correcciones de perfil",
"End Interaction": "Finalizar interacción",
"English": "Inglés",
Expand Down Expand Up @@ -766,6 +767,7 @@
"Keyword Sets": "Conjuntos de palabras clave",
"Keyword Suggestions": "Sugerencias de palabras clave",
"Keyword to paint": "Palabra clave para pintar",
"Type a keyword to paint in the Keywords panel": "Escribir una palabra clave para pintar en el panel Palabras clave",
"Keywords": "Palabras clave",
"Keywords (K)": "Palabras clave (K)",
"Keywords you add appear here; ⌥1–⌥9 apply them.": "Las palabras clave añadidas aparecen aquí; ⌥1–⌥9 las aplican.",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@
"Effects": "Tehosteet",
"Empty Recently Deleted": "Tyhjennä Äskettäin poistetut",
"Enable Lens Corrections": "Ota objektiivikorjaukset käyttöön",
"Enable Painting": "Ota maalaus käyttöön",
"Enable Profile Corrections": "Ota profiilikorjaukset käyttöön",
"End": "Loppu",
"End Interaction": "Lopeta vuorovaikutus",
Expand Down Expand Up @@ -988,6 +989,7 @@
"Keyword Suggestions": "Avainsanaehdotukset",
"Keyword Tag Options": "Avainsanatunnisteen asetukset",
"Keyword to paint": "Maalattava avainsana",
"Type a keyword to paint in the Keywords panel": "Kirjoita maalattava avainsana Avainsanat-paneeliin",
"Keywords": "Avainsanat",
"Keywords & People": "Avainsanat ja henkilöt",
"Keywords (K)": "Avainsanat (K)",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@
"Effects": "Effets",
"Empty Recently Deleted": "Vider Supprimées récemment",
"Enable Lens Corrections": "Activer les corrections d'objectif",
"Enable Painting": "Activer le pinceau",
"Enable Profile Corrections": "Activer les corrections de profil",
"End Interaction": "Terminer l'interaction",
"English": "Anglais",
Expand Down Expand Up @@ -724,6 +725,7 @@
"Keyword Sets": "Jeux de mots-clés",
"Keyword Suggestions": "Suggestions de mots-clés",
"Keyword to paint": "Mot-clé à appliquer",
"Type a keyword to paint in the Keywords panel": "Saisissez un mot-clé à appliquer dans le panneau Mots-clés",
"Keywords": "Mots-clés",
"Keywords (K)": "Mots-clés (K)",
"Keywords you add appear here; ⌥1–⌥9 apply them.": "Les mots-clés que vous ajoutez apparaissent ici ; ⌥1–⌥9 les appliquent.",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@
"Effects": "Efek",
"Empty Recently Deleted": "Kosongkan Baru dihapus",
"Enable Lens Corrections": "Aktifkan koreksi lensa",
"Enable Painting": "Aktifkan kuas",
"Enable Profile Corrections": "Aktifkan koreksi profil",
"End": "Akhir",
"End Interaction": "Akhiri interaksi",
Expand Down Expand Up @@ -991,6 +992,7 @@
"Keyword Suggestions": "Saran kata kunci",
"Keyword Tag Options": "Opsi tag kata kunci",
"Keyword to paint": "Kata kunci yang akan diterapkan",
"Type a keyword to paint in the Keywords panel": "Ketik kata kunci yang akan diterapkan di panel Kata kunci",
"Keywords": "Kata kunci",
"Keywords & People": "Kata kunci & orang",
"Keywords (K)": "Kata kunci (K)",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@
"Effects": "Effetti",
"Empty Recently Deleted": "Svuota Eliminate di recente",
"Enable Lens Corrections": "Attiva correzioni obiettivo",
"Enable Painting": "Attiva pennello",
"Enable Profile Corrections": "Attiva correzioni del profilo",
"End Interaction": "Termina interazione",
"English": "Inglese",
Expand Down Expand Up @@ -726,6 +727,7 @@
"Keyword Sets": "Set di parole chiave",
"Keyword Suggestions": "Suggerimenti di parole chiave",
"Keyword to paint": "Parola chiave da applicare",
"Type a keyword to paint in the Keywords panel": "Digita una parola chiave da applicare nel pannello Parole chiave",
"Keywords": "Parole chiave",
"Keywords (K)": "Parole chiave (K)",
"Keywords you add appear here; ⌥1–⌥9 apply them.": "Le parole chiave che aggiungi compaiono qui; ⌥1-⌥9 le applicano.",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@
"Effects": "効果",
"Empty Recently Deleted": "最近削除した写真を空にする",
"Enable Lens Corrections": "レンズ補正を有効にする",
"Enable Painting": "キーワード付けを有効にする",
"Enable Profile Corrections": "プロファイル補正を使用",
"End Interaction": "操作を終了",
"English": "English",
Expand Down Expand Up @@ -863,6 +864,7 @@
"Keyword Sets": "キーワードセット",
"Keyword Suggestions": "キーワード候補",
"Keyword to paint": "写真に付けるキーワード",
"Type a keyword to paint in the Keywords panel": "キーワードパネルで写真に付けるキーワードを入力してください",
"Keywords": "キーワード",
"Keywords you add appear here; ⌥1–⌥9 apply them.": "追加したキーワードはここに表示されます(⌥1〜⌥9で適用)",
"Landscape": "風景",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/ka.json
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,7 @@
"Effects": "ეფექტები",
"Empty Recently Deleted": "ახლახან წაშლილის გასუფთავება",
"Enable Lens Corrections": "ობიექტივის კორექციების ჩართვა",
"Enable Painting": "ფუნჯის ჩართვა",
"Enable Profile Corrections": "პროფილის კორექციების ჩართვა",
"End Interaction": "ურთიერთქმედების დასრულება",
"English": "English",
Expand Down Expand Up @@ -1066,6 +1067,7 @@
"Keyword sets": "საკვანძო სიტყვების ნაკრებები",
"Keyword tag options decide what exported files carry: Include on Export, Export Containing Keywords, Export": "საკვანძო სიტყვის პარამეტრები განსაზღვრავს, რას შეიცავს ექსპორტირებული ფაილები: ექსპორტში ჩართვა, მშობელი საკვანძო სიტყვების ექსპორტი,",
"Keyword to paint": "მისანიჭებელი საკვანძო სიტყვა",
"Type a keyword to paint in the Keywords panel": "აკრიფეთ მისანიჭებელი საკვანძო სიტყვა პანელში „საკვანძო სიტყვები“",
"Keywording box": "საკვანძო სიტყვების ველი",
"Keywords": "საკვანძო სიტყვები",
"Keywords & People": "საკვანძო სიტყვები და ადამიანები",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@
"Effects": "Efekty",
"Empty Recently Deleted": "Opróżnij ostatnio usunięte",
"Enable Lens Corrections": "Włącz korekcję obiektywu",
"Enable Painting": "Włącz pędzel",
"Enable Profile Corrections": "Włącz korekcje profilu",
"End Interaction": "Zakończ interakcję",
"English": "Angielski",
Expand Down Expand Up @@ -707,6 +708,7 @@
"Keyword Sets": "Zestawy słów kluczowych",
"Keyword Suggestions": "Sugestie słów kluczowych",
"Keyword to paint": "Słowo kluczowe do nanoszenia",
"Type a keyword to paint in the Keywords panel": "Wpisz słowo kluczowe do nanoszenia w panelu Słowa kluczowe",
"Keywords": "Słowa kluczowe",
"Keywords (K)": "Słowa kluczowe (K)",
"Keywords you add appear here; ⌥1–⌥9 apply them.": "Dodane słowa kluczowe pojawiają się tutaj; skróty ⌥1–⌥9 przypisują je do zdjęć.",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@
"Effects": "Efeitos",
"Empty Recently Deleted": "Esvaziar Excluídos recentemente",
"Enable Lens Corrections": "Ativar correções de lente",
"Enable Painting": "Ativar pincel",
"Enable Profile Corrections": "Ativar correções de perfil",
"End Interaction": "Encerrar interação",
"English": "Inglês",
Expand Down Expand Up @@ -733,6 +734,7 @@
"Keyword Sets": "Conjuntos de palavras-chave",
"Keyword Suggestions": "Sugestões de palavras-chave",
"Keyword to paint": "Palavra-chave a pintar",
"Type a keyword to paint in the Keywords panel": "Digite uma palavra-chave a pintar no painel Palavras-chave",
"Keywords": "Palavras-chave",
"Keywords (K)": "Palavras-chave (K)",
"Keywords you add appear here; ⌥1–⌥9 apply them.": "As palavras-chave que você adiciona aparecem aqui; ⌥1–⌥9 as aplicam.",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@
"Effect": "Эффект",
"Effects": "Эффекты",
"Enable Lens Corrections": "Включить коррекцию объектива",
"Enable Painting": "Включить кисть",
"End Interaction": "Завершить взаимодействие",
"English": "Английский",
"Enter Full Screen": "Полноэкранный режим",
Expand Down Expand Up @@ -611,6 +612,7 @@
"Keyword Sets": "Наборы ключевых слов",
"Keyword Suggestions": "Подсказки ключевых слов",
"Keyword to paint": "Ключевое слово для нанесения",
"Type a keyword to paint in the Keywords panel": "Введите ключевое слово для нанесения на панели «Ключевые слова»",
"Keywords": "Ключевые слова",
"Keywords (K)": "Ключевые слова (K)",
"Keywords you add appear here; ⌥1–⌥9 apply them.": "Добавленные вами ключевые слова появятся здесь; ⌥1–⌥9 применяют их.",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@
"Effects": "Effekter",
"Empty Recently Deleted": "Töm Nyligen raderade",
"Enable Lens Corrections": "Aktivera linskorrigeringar",
"Enable Painting": "Aktivera målning",
"Enable Profile Corrections": "Aktivera profilkorrigeringar",
"End": "Slut",
"End Interaction": "Avsluta interaktion",
Expand Down Expand Up @@ -1089,6 +1090,7 @@
"Keyword Suggestions": "Nyckelordsförslag",
"Keyword Tag Options": "Alternativ för nyckelordstaggar",
"Keyword to paint": "Nyckelord att måla",
"Type a keyword to paint in the Keywords panel": "Skriv ett nyckelord att måla i panelen Nyckelord",
"Keywords": "Nyckelord",
"Keywords & People": "Nyckelord och människor",
"Keywords (K)": "Nyckelord (K)",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@
"Edited or not": "Відредаговано чи ні",
"Empty Recently Deleted": "Очистити нещодавно видалені",
"Enable Lens Corrections": "Увімкнути корекцію об’єктива",
"Enable Painting": "Увімкнути призначення",
"Enable Profile Corrections": "Увімкнути корекцію профілю",
"End Interaction": "Завершити взаємодію",
"Enter Full Screen": "Увійти в повноекранний режим",
Expand Down Expand Up @@ -1034,6 +1035,7 @@
"Keyword Sets": "Набори ключових слів",
"Keyword Suggestions": "Пропозиції ключових слів",
"Keyword to paint": "Ключове слово для призначення",
"Type a keyword to paint in the Keywords panel": "Введіть ключове слово для призначення на панелі «Ключові слова»",
"Keywords you add appear here; ⌥1–⌥9 apply them.": "Додані ключові слова з’являються тут; ⌥1–⌥9 застосовують їх.",
"Automatic renders the Detail view at the size it is shown, up to the photo's own pixels. Choose a size to cap it: smaller is faster.": "Автоматичний режим відтворює подання «Деталі» у відображуваному розмірі, до власних пікселів фото. Виберіть розмір для обмеження: менший працює швидше.",
"Last view": "Останнє подання",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@
"Effects": "Hiệu ứng",
"Empty Recently Deleted": "Dọn Đã xóa gần đây",
"Enable Lens Corrections": "Bật hiệu chỉnh ống kính",
"Enable Painting": "Bật cọ",
"Enable Profile Corrections": "Bật hiệu chỉnh theo hồ sơ",
"End Interaction": "Kết thúc tương tác",
"English": "English",
Expand Down Expand Up @@ -912,6 +913,7 @@
"Keyword Suggestions": "Gợi ý từ khóa",
"Keyword Tag Options": "Tùy chọn thẻ từ khóa",
"Keyword to paint": "Từ khóa để tô",
"Type a keyword to paint in the Keywords panel": "Nhập từ khóa để tô trong bảng Từ khóa",
"Keywords": "Từ khóa",
"Keywords & People": "Từ khóa và Người",
"Keywords (K)": "Từ khóa (K)",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/zh-hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@
"Effects": "效果",
"Empty Recently Deleted": "清空“最近删除”",
"Enable Lens Corrections": "启用镜头校正",
"Enable Painting": "启用画笔",
"Enable Profile Corrections": "启用配置文件校正",
"End Interaction": "结束交互",
"English": "English",
Expand Down Expand Up @@ -839,6 +840,7 @@
"Keyword Sets": "关键字集",
"Keyword Suggestions": "关键字建议",
"Keyword to paint": "要涂抹的关键字",
"Type a keyword to paint in the Keywords panel": "请在“关键字”面板中输入要涂抹的关键字",
"Keywords": "关键字",
"Keywords (K)": "关键字 (K)",
"Keywords you add appear here; ⌥1–⌥9 apply them.": "您添加的关键字会显示在此处;按 ⌥1–⌥9 即可应用。",
Expand Down
2 changes: 2 additions & 0 deletions crates/ui-egui/locales/zh-hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@
"Effects": "效果",
"Empty Recently Deleted": "清空「最近刪除」",
"Enable Lens Corrections": "啟用鏡頭校正",
"Enable Painting": "啟用筆刷",
"Enable Profile Corrections": "啟用描述檔校正",
"End Interaction": "結束互動",
"English": "English",
Expand Down Expand Up @@ -840,6 +841,7 @@
"Keyword Sets": "關鍵字集",
"Keyword Suggestions": "關鍵字建議",
"Keyword to paint": "要塗上的關鍵字",
"Type a keyword to paint in the Keywords panel": "請在「關鍵字」面板中輸入要塗上的關鍵字",
"Keywords": "關鍵字",
"Keywords (K)": "關鍵字(K)",
"Keywords you add appear here; ⌥1–⌥9 apply them.": "新增的關鍵字會顯示於此;⌥1–⌥9 可套用。",
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/src/menus/menubar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ const LAYOUT: &[(&str, &[&str])] = &[
"dialog.rename",
"dialog.captureTime",
"photo.tagFromTracklog",
"tool.enablePainting",
"---",
"album.removePhotos",
"photo.delete",
Expand Down
17 changes: 17 additions & 0 deletions crates/ui-egui/src/menus/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,27 @@ fn ui_commands_1(app: &mut LightcraftApp, ctx: &egui::Context, id: &str, p: &Val
app.ui.view = ViewMode::PhotoGrid;
}
if let Some(k) = app.ui.keyword_painter.clone() {
app.ui.keyword_painter_text = k.clone();
app.toast(ctx, crate::i18n::tr_format!("Painting “{k}”: click photos to add or remove it · Esc stops", k = k));
}
Ok(json!({"keyword": app.ui.keyword_painter}))
}
"tool.enablePainting" => {
Comment thread
dotCooCoo marked this conversation as resolved.
Resolved
let k = app.ui.keyword_painter_text.trim().to_string();
if app.ui.keyword_painter.is_some() {
app.ui.keyword_painter = None;
Ok(json!({"keyword": null}))
} else if k.is_empty() {
app.ui.right = RightPanel::Keywords;
Comment thread
dotCooCoo marked this conversation as resolved.
Resolved
if app.ui.section_folded("keywording") {
app.ui.toggle_folded("keywording");
}
app.toast(ctx, crate::i18n::tr("Type a keyword to paint in the Keywords panel"));
Ok(json!({"keyword": null}))
} else {
run_ui_command(app, "tool.keywordPainter", &json!({"keyword": k})).unwrap_or(Ok(Value::Null))
}
}
"view.secondWindow" => {
app.ui.second_window = p.get("show").and_then(Value::as_bool).unwrap_or(!app.ui.second_window);
Ok(json!({"show": app.ui.second_window}))
Expand Down
1 change: 1 addition & 0 deletions crates/ui-egui/src/menus/ui_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ pub const UI_COMMANDS: &[UiCommand] = &[
("slideshow.end", "End Slideshow", None, ""),
("view.secondWindow", "Second Window", Some("Cmd+F11"), "Window"),
("tool.keywordPainter", "Keyword Painter", None, ""),
("tool.enablePainting", "Enable Painting", Some("Cmd+Alt+K"), "Photo"),
("view.gridInfo", "Grid Info", None, ""),
// {mode?: auto | light | dark}: Appearance Mode (cycles Auto, Light, Dark when omitted; the
// top bar's appearance button). View ▸ Appearance lists the modes.
Expand Down
5 changes: 2 additions & 3 deletions crates/ui-egui/src/panels/right/keywords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,8 @@ fn keywording(app: &mut LightcraftApp, ui: &mut egui::Ui) {
ui.add_space(8.0);
// the painter: click photos in the grid to give them (or take away) a keyword
ui.horizontal(|ui| {
let pid = egui::Id::unique("kw-painter");
let painting = app.ui.keyword_painter.clone();
let mut k: String = ui.data(|d| d.get_temp(pid)).unwrap_or_else(|| painting.clone().unwrap_or_default());
let mut k = app.ui.keyword_painter_text.clone();
// (fixed while painting: Stop first)
let field = ui
.add_enabled_ui(painting.is_none(), |ui| {
Expand All @@ -160,7 +159,7 @@ fn keywording(app: &mut LightcraftApp, ui: &mut egui::Ui) {
.show(ui)
})
.inner;
ui.data_mut(|d| d.insert_temp(pid, k.clone()));
app.ui.keyword_painter_text = k.clone();
let label = if painting.is_some() { "Stop" } else { "Paint" };
let returned = field.ending == Some(crate::text_field::Ending::Return) && painting.is_none() && !k.trim().is_empty();
if text_button(ui, "keywordPaint", label, painting.is_some())
Expand Down
4 changes: 4 additions & 0 deletions crates/ui-egui/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ pub struct UiState {
/// The keyword painter: clicking a photo in the grid toggles this keyword on it.
#[serde(skip)]
pub keyword_painter: Option<String>,
/// The text of the Keywords panel's painter box: the keyword Enable Painting paints.
#[serde(skip)]
pub keyword_painter_text: String,
/// What the Keywording box shows (Lightroom Classic's Keyword Tags views).
pub keywording_view: KeywordingView,
/// The Keywording box, grouped: every keyword of this selection (its hash) is shown, however
Expand Down Expand Up @@ -467,6 +470,7 @@ impl Default for UiState {
slideshow: None,
second_window: false,
keyword_painter: None,
keyword_painter_text: String::new(),
keywording_view: KeywordingView::default(),
keyword_chips_all: None,
folded_sections: Vec::new(),
Expand Down
Loading
Loading