From 7b537870493746a7e5776708cff3867577011595 Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Wed, 21 Oct 2026 13:07:31 -0400 Subject: [PATCH 1/9] LR-PREF-GENERAL: what Settings says can be read in every theme, and in every language it has MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Tokens::legible gives a colour as it is where it stands the ratio asked for against the surface it is on, and moves it toward the text colour until it does where a theme's value is too close. Settings uses it for its explanations (4.20:1 in Charcoal, 4.33:1 in Silver), "In Use" and the outline of the theme card in use (2.9:1 in Charcoal), the reject colour as text, and the dim text, cautions and accent of the AI Denoise page. - settings::legible_controls does the same for what says where a control is: the borders of text boxes, checkboxes, radio buttons and buttons (1.6 to 1.7:1), a text box in use, and placeholder text (under 4.3:1 in every theme). - A colour that read already is unchanged, and the tokens keep their values for the rest of the app. - The hint under External Editing had a menu path with an arrow the fonts lack, which drew as empty boxes; it uses ">". - 23 names and sentences of Settings (with the three menu items that hint names) are in all 17 catalogs; "(library default)" and "starting…" go through translation. Co-Authored-By: Claude --- crates/ui-egui/locales/cs.json | 6 +- crates/ui-egui/locales/de.json | 25 +- crates/ui-egui/locales/es.json | 23 +- crates/ui-egui/locales/fi.json | 6 +- crates/ui-egui/locales/fr.json | 40 +-- crates/ui-egui/locales/id.json | 8 +- crates/ui-egui/locales/it.json | 4 +- crates/ui-egui/locales/ja.json | 23 +- crates/ui-egui/locales/ka.json | 6 +- crates/ui-egui/locales/pl.json | 19 ++ crates/ui-egui/locales/pt-br.json | 23 +- crates/ui-egui/locales/ru.json | 20 +- crates/ui-egui/locales/sv.json | 7 +- crates/ui-egui/locales/uk.json | 23 +- crates/ui-egui/locales/vi.json | 8 +- crates/ui-egui/locales/zh-hans.json | 23 +- crates/ui-egui/locales/zh-hant.json | 25 +- crates/ui-egui/src/dialogs/faces.rs | 2 +- crates/ui-egui/src/dialogs/settings.rs | 10 + .../src/dialogs/settings/appearance.rs | 12 +- .../ui-egui/src/dialogs/settings/display.rs | 6 +- .../ui-egui/src/dialogs/settings/general.rs | 2 +- .../src/dialogs/settings/performance.rs | 25 +- .../ui-egui/src/dialogs/settings/widgets.rs | 17 +- crates/ui-egui/src/panels/denoise.rs | 63 ++-- crates/ui-egui/src/tests.rs | 1 + .../src/tests/dialog_settings_contrast.rs | 291 ++++++++++++++++++ crates/ui-egui/src/theme.rs | 26 ++ docs/whats-new.md | 15 + 29 files changed, 664 insertions(+), 95 deletions(-) create mode 100644 crates/ui-egui/src/tests/dialog_settings_contrast.rs diff --git a/crates/ui-egui/locales/cs.json b/crates/ui-egui/locales/cs.json index ea102192177..adee6ebb1d2 100644 --- a/crates/ui-egui/locales/cs.json +++ b/crates/ui-egui/locales/cs.json @@ -598,7 +598,7 @@ "Download Place Names (GeoNames)": "Stáhnout názvy míst (GeoNames)", "Download the SAM 3 Model?": "Stáhnout model SAM 3?", "Downloaded and checked. Installing…": "Staženo a ověřeno. Probíhá instalace…", - "The download failed": "Stažení se nezdařilo", + "The download failed": "Stahování se nezdařilo", "Downloading model": "Stahování modelu", "Downloading place names": "Stahování názvů míst", "Downloads": "Stažené soubory", @@ -1363,7 +1363,6 @@ "Photo Grid": "Mřížka fotografií", "Photo Grid (G)": "Mřížka fotografií (G)", "Photo Merge": "Sloučení fotografií", - "Photo ▸ Edit In ▸ Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Fotografie → Upravit v → Upravit v PhotoCraft (⇧⌘E nebo pravé tlačítko na fotografii) vykreslí kopii s vašimi úpravami, přidá ji do sady s originálem a otevře v PhotoCraft. Po uložení se kopie zde aktualizuje. Do PSD ukládá PhotoCraft přímo. Umístění ponechte prázdné, pokud nepoužíváte přenosnou kopii.", "Photo ▸ Edit in External Editor (⇧⌘E) renders a 16-bit TIFF copy, stacks it with the original and opens it here (an app name on macOS, a program path elsewhere).": "Fotografie → Upravit v externím editoru (⇧⌘E) vykreslí 16bitovou kopii TIFF, přidá ji do sady s originálem a otevře v této aplikaci (název aplikace v macOS, jinde cesta k programu).", "PhotoCraft": "PhotoCraft", "Photos": "Fotografie", @@ -2252,6 +2251,9 @@ "Display profile not used": "Profil displeje nebyl použit", "Drag to set hue and saturation. Hold Shift to keep the hue, Cmd/Ctrl to keep the saturation, Alt/Option to fine-adjust. Double-click to reset.": "Tažením nastavíte odstín a sytost. Podržením Shift zachováte odstín, Cmd/Ctrl zachováte sytost, Alt/Option umožní jemné doladění. Dvojitým kliknutím obnovíte výchozí hodnoty.", "Edit In": "Upravit v", + "Model installation failed": "Instalace modelu se nezdařila", + "starting…": "spouštění…", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Fotografie > Upravit v > Upravit v PhotoCraft (⇧⌘E nebo pravé tlačítko na fotografii) vykreslí kopii s vašimi úpravami, přidá ji do sady s originálem a otevře v PhotoCraft. Po uložení se kopie zde aktualizuje. Do PSD ukládá PhotoCraft přímo. Umístění ponechte prázdné, pokud nepoužíváte přenosnou kopii.", "Face models (ONNX)": "Modely rozpoznávání obličejů (ONNX)", "ICC Profiles": "Profily ICC", "Next History Step": "Další krok historie", diff --git a/crates/ui-egui/locales/de.json b/crates/ui-egui/locales/de.json index bc67606eb61..d27785cc328 100644 --- a/crates/ui-egui/locales/de.json +++ b/crates/ui-egui/locales/de.json @@ -2187,6 +2187,20 @@ "Face detector": "Gesichtsdetektor", "Face recognition": "Gesichtserkennung", "Faces": "Gesichter", + "LUT-based": "LUT-basiert", + "Matrix/TRC": "Matrix/TRC", + "Model installation failed": "Modellinstallation fehlgeschlagen", + "Monitor profile": "Monitorprofil", + "Other editor": "Anderer Editor", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Foto > Bearbeiten in > In PhotoCraft bearbeiten (⇧⌘E oder Rechtsklick auf ein Foto) rendert eine Kopie mit deinen Bearbeitungen, stapelt sie mit dem Original und öffnet sie in PhotoCraft. Speichere dort, und die Kopie wird hier aktualisiert. Ist die Kopie eine PSD, speichert PhotoCraft direkt in sie zurück. Lass den Speicherort leer, sofern du keine portable Version verwendest.", + "Primaries (x, y)": "Primärfarben (x, y)", + "Use Screen Profile": "Bildschirmprofil verwenden", + "Use sRGB": "sRGB verwenden", + "starting…": "wird gestartet…", + "this screen's profile": "Profil dieses Bildschirms", + "Edit In": "Bearbeiten in", + "Edit in PhotoCraft": "In PhotoCraft bearbeiten", + "Edit in Other Editor": "In anderem Editor bearbeiten", "Faces of a Person": "Gesichter einer Person", "Go back to listing them by name": "Wieder nach Namen auflisten", "Index Faces": "Gesichter indizieren", @@ -2439,8 +2453,6 @@ "Previous Slide": "Vorheriges Dia", "End Slideshow": "Diashow beenden", "Contact Sheet PDF…": "Kontaktabzug-PDF…", - "Edit in PhotoCraft": "In PhotoCraft bearbeiten", - "Edit in Other Editor": "In anderem Editor bearbeiten", "Open Original in Other Editor (RAW, no copy)": "Original in anderem Editor öffnen (RAW, keine Kopie)", "Save Current Settings as New Effect Preset…": "Aktuelle Einstellungen als neue Effektvorgabe speichern…", "Manage Effect Presets…": "Effektvorgaben verwalten…", @@ -2524,18 +2536,10 @@ "External Editing": "Externe Bearbeitung", "PhotoCraft": "PhotoCraft", "Found automatically": "Automatisch gefunden", - "Other editor": "Anderer Editor", "Edit in Other Editor (⌥⌘E) opens the copy in this application (an app name on macOS, a program path elsewhere).": "„In anderem Editor bearbeiten“ (⌥⌘E) öffnet die Kopie in dieser Anwendung (unter macOS ein App-Name, sonst ein Programmpfad).", "To hand this editor the original file itself instead (the raw, without a copy: DxO PhotoLab, for example), right-click a photo → Edit In → Open Original in Other Editor (RAW, no copy).": "Um diesem Editor stattdessen die Originaldatei selbst zu übergeben (die RAW-Datei, ohne Kopie, etwa für DxO PhotoLab), klicke mit der rechten Maustaste auf ein Foto → Bearbeiten in → Original in anderem Editor öffnen (RAW, keine Kopie).", - "Monitor profile": "Monitorprofil", "None (the display is treated as sRGB)": "Keins (der Bildschirm wird als sRGB behandelt)", - "this screen's profile": "Profil dieses Bildschirms", "Choose Profile…": "Profil auswählen…", - "Use Screen Profile": "Bildschirmprofil verwenden", - "Use sRGB": "sRGB verwenden", - "Matrix/TRC": "Matrix/TRC", - "LUT-based": "LUT-basiert", - "Primaries (x, y)": "Primärfarben (x, y)", "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.": "Fotos werden über das ICC-Profil deines Monitors angezeigt, sodass die Farben auf Wide-Gamut- und kalibrierten Bildschirmen stimmen und die Detailansicht den ganzen Farbraum des Bildschirms nutzt. Histogramm, Vorschau-Caches und Exporte sind davon nicht betroffen.", "Profiles assigned in your desktop's colour settings are usually in ~/.local/share/icc.": "Die in den Farbeinstellungen deines Desktops zugewiesenen Profile liegen meist in ~/.local/share/icc.", "Slide duration": "Dia-Dauer", @@ -2566,7 +2570,6 @@ "Choose Monitor Profile": "Monitorprofil auswählen", "Display": "Bildschirm", "Display profile not used": "Bildschirmprofil nicht verwendet", - "Edit In": "Bearbeiten in", "Face models (ONNX)": "Gesichtsmodelle (ONNX)", "ICC Profiles": "ICC-Profile", "Remove Folder Color Label": "Ordner-Farbmarkierung entfernen", diff --git a/crates/ui-egui/locales/es.json b/crates/ui-egui/locales/es.json index c34057bdfe5..200fa01ac39 100644 --- a/crates/ui-egui/locales/es.json +++ b/crates/ui-egui/locales/es.json @@ -1896,7 +1896,7 @@ "Denoise Settings": "Ajustes de reducción de ruido", "Denoise all photos with an Amount": "Reducir el ruido de todas las fotos con una cantidad", "Downloaded and checked. Installing…": "Descargado y comprobado. Instalando…", - "The download failed": "La descarga ha fallado", + "The download failed": "Error en la descarga", "Failed its last test": "Falló en su última prueba", "Graphics card": "Tarjeta gráfica", "I have read these terms and accept them for my own use": "He leído estas condiciones y las acepto para mi propio uso", @@ -2119,6 +2119,27 @@ "Not saved": "Sin guardar", "A folder is being synchronized": "Se está sincronizando una carpeta", "Wait for the import to finish": "Esperar a que termine la importación", + "Choose Profile…": "Elegir perfil…", + "Edit in Other Editor (⌥⌘E) opens the copy in this application (an app name on macOS, a program path elsewhere).": "Editar en otro editor (⌥⌘E) abre la copia en esta aplicación (un nombre de aplicación en macOS, una ruta de programa en otros sistemas).", + "External Editing": "Edición externa", + "Found automatically": "Se encuentra automáticamente", + "LUT-based": "Basado en LUT", + "Matrix/TRC": "Matriz/TRC", + "Model installation failed": "Error al instalar el modelo", + "Monitor profile": "Perfil del monitor", + "None (the display is treated as sRGB)": "Ninguno (la pantalla se trata como sRGB)", + "Other editor": "Otro editor", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Foto > Editar en > Editar en PhotoCraft (⇧⌘E, o clic derecho en una foto) renderiza una copia con las ediciones, la apila con el original y la abre en PhotoCraft. Al guardar allí, la copia se actualiza aquí. Si es un PSD, PhotoCraft guarda directamente en ella. Dejar la ubicación vacía salvo que se use una copia portátil.", + "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.": "Las fotos se muestran a través del perfil ICC del monitor, para que los colores sean correctos en pantallas calibradas y de gama amplia, y la vista Detalle usa toda la gama de la pantalla. El histograma, las cachés de vistas previas y las exportaciones no se ven afectados.", + "Primaries (x, y)": "Primarios (x, y)", + "Profiles assigned in your desktop's colour settings are usually in ~/.local/share/icc.": "Los perfiles asignados en los ajustes de color del escritorio suelen estar en ~/.local/share/icc.", + "Use Screen Profile": "Usar perfil de la pantalla", + "Use sRGB": "Usar sRGB", + "starting…": "iniciando…", + "this screen's profile": "perfil de esta pantalla", + "Edit In": "Editar en", + "Edit in PhotoCraft": "Editar en PhotoCraft", + "Edit in Other Editor": "Editar en otro editor", "Appearance": "Apariencia", "Appearance Mode": "Modo de apariencia", "Sync with System": "Sincronizar con el sistema", diff --git a/crates/ui-egui/locales/fi.json b/crates/ui-egui/locales/fi.json index 59cc611cd61..c7971c63ecf 100644 --- a/crates/ui-egui/locales/fi.json +++ b/crates/ui-egui/locales/fi.json @@ -1418,7 +1418,6 @@ "Photo Grid": "Kuvaruudukko", "Photo Grid (G)": "Kuvaruudukko (G)", "Photo Merge": "Kuvien yhdistäminen", - "Photo ▸ Edit In ▸ Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Kuva → Muokkaa ohjelmassa → Muokkaa PhotoCraftissa (⇧⌘E tai napsauta kuvaa hiiren kakkospainikkeella) renderöi kopion muokkauksineen, pinoaa sen alkuperäisen kanssa ja avaa sen PhotoCraftissa. Tallenna siellä, niin kopio päivittyy täällä. PSD-muodossa PhotoCraft tallentaa suoraan siihen. Jätä sijainti tyhjäksi, ellet käytä kannettavaa kopiota.", "Photo ▸ Edit in External Editor (⇧⌘E) renders a 16-bit TIFF copy, stacks it with the original and opens it here (an app name on macOS, a program path elsewhere).": "Kuva → Muokkaa ulkoisessa muokkausohjelmassa (⇧⌘E) renderöi 16-bittisen TIFF-kopion, pinoaa sen alkuperäisen kanssa ja avaa sen täällä (macOS:ssä sovelluksen nimi, muualla ohjelman polku).", "PhotoCraft": "PhotoCraft", "Photos": "Kuvat", @@ -2383,5 +2382,8 @@ "Top bar": "Yläpalkki", "Tool strip": "Työkalupalkki", "Bottom bar": "Alapalkki", - "Stopped at the scan limit: there may be more photos": "Skannauksen raja saavutettiin: valokuvia voi olla lisää" + "Stopped at the scan limit: there may be more photos": "Skannauksen raja saavutettiin: valokuvia voi olla lisää", + "Model installation failed": "Mallin asennus epäonnistui", + "starting…": "käynnistyy…", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Kuva > Muokkaa ohjelmassa > Muokkaa PhotoCraftissa (⇧⌘E tai napsauta kuvaa hiiren kakkospainikkeella) renderöi kopion muokkauksineen, pinoaa sen alkuperäisen kanssa ja avaa sen PhotoCraftissa. Tallenna siellä, niin kopio päivittyy täällä. PSD-muodossa PhotoCraft tallentaa suoraan siihen. Jätä sijainti tyhjäksi, ellet käytä kannettavaa kopiota." } diff --git a/crates/ui-egui/locales/fr.json b/crates/ui-egui/locales/fr.json index 31e6814b6d5..8d86c9c2f0e 100644 --- a/crates/ui-egui/locales/fr.json +++ b/crates/ui-egui/locales/fr.json @@ -1994,6 +1994,9 @@ "Appearance Settings…": "Réglages d’apparence…", "Add to favorites": "Ajouter aux favoris", "Remove from favorites": "Retirer des favoris", + "Choose Profile…": "Choisir un profil…", + "Edit in Other Editor (⌥⌘E) opens the copy in this application (an app name on macOS, a program path elsewhere).": "Modifier dans un autre éditeur (⌥⌘E) ouvre la copie dans cette application (un nom d'application sur macOS, un chemin de programme ailleurs).", + "External Editing": "Édition externe", "Appearance": "Apparence", "Appearance Mode": "Mode d’apparence", "Sync with System": "Synchroniser avec le système", @@ -2060,6 +2063,24 @@ "Face detector": "Détecteur de visages", "Face recognition": "Reconnaissance des visages", "Faces": "Visages", + "Found automatically": "Détecté automatiquement", + "LUT-based": "À base de LUT", + "Matrix/TRC": "Matrice/TRC", + "Model installation failed": "Échec de l'installation du modèle", + "Monitor profile": "Profil du moniteur", + "None (the display is treated as sRGB)": "Aucun (l'écran est traité comme sRGB)", + "Other editor": "Autre éditeur", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Photo > Modifier dans > Modifier dans PhotoCraft (⇧⌘E, ou clic droit sur une photo) génère une copie avec vos retouches, l'empile avec l'original et l'ouvre dans PhotoCraft. Enregistrez-la là-bas et la copie se met à jour ici. En PSD, PhotoCraft enregistre directement dans la copie. Laissez l'emplacement vide, sauf si vous utilisez une version portable.", + "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.": "Les photos sont affichées à travers le profil ICC de votre moniteur : les couleurs sont justes sur les écrans à large gamut et calibrés, et la vue Détail exploite tout le gamut de l'écran. L'histogramme, les caches d'aperçus et les exportations ne sont pas concernés.", + "Primaries (x, y)": "Primaires (x, y)", + "Profiles assigned in your desktop's colour settings are usually in ~/.local/share/icc.": "Les profils attribués dans les réglages de couleur de votre bureau se trouvent généralement dans ~/.local/share/icc.", + "Use Screen Profile": "Utiliser le profil de l'écran", + "Use sRGB": "Utiliser sRGB", + "starting…": "démarrage…", + "this screen's profile": "profil de cet écran", + "Edit In": "Modifier dans", + "Edit in PhotoCraft": "Modifier dans PhotoCraft", + "Edit in Other Editor": "Modifier dans un autre éditeur", "Faces of a Person": "Visages d'une personne", "Faster exports and card imports, with the same protection for what can't be recreated (issue #134): exports,": "Exports et importations depuis une carte plus rapides, avec la même protection pour ce qui ne peut pas être recréé (ticket #134) : les exports,", "Go back to listing them by name": "Revenir au tri par nom", @@ -2452,7 +2473,6 @@ "Cancel Background Task": "Annuler la tâche d'arrière-plan", "Choose Layout Image…": "Choisir l'image de mise en page…", "Choose Monitor Profile": "Choisir le profil du moniteur", - "Choose Profile…": "Choisir un profil…", "Choose a group": "Choisir un groupe", "Choose at least one setting to include": "Choisissez au moins un réglage à inclure", "Clear Print Layout": "Effacer la mise en page d'impression", @@ -2485,18 +2505,14 @@ "Display profile not used": "Profil d'écran non utilisé", "Drag to set hue and saturation. Hold Shift to keep the hue, Cmd/Ctrl to keep the saturation, Alt/Option to fine-adjust. Double-click to reset.": "Faites glisser pour régler la teinte et la saturation. Maintenez Maj pour conserver la teinte, Cmd/Ctrl pour conserver la saturation, Alt/Option pour un réglage fin. Double-cliquez pour réinitialiser.", "Duplicate Mask Effect": "Dupliquer l'effet de masque", - "Edit In": "Modifier dans", "Edit Keyword": "Modifier le mot-clé", "Edit in HDR: highlights above SDR white, for HDR exports and displays": "Retoucher en HDR : hautes lumières au-delà du blanc SDR, pour les exportations et les écrans HDR", - "Edit in Other Editor": "Modifier dans un autre éditeur", - "Edit in Other Editor (⌥⌘E) opens the copy in this application (an app name on macOS, a program path elsewhere).": "Modifier dans un autre éditeur (⌥⌘E) ouvre la copie dans cette application (un nom d'application sous macOS, un chemin de programme ailleurs).", "End Slideshow": "Terminer le diaporama", "Enter to confirm, Esc to cancel": "Entrée pour confirmer, Échap pour annuler", "Export Contact Sheet PDF": "Exporter le PDF de planche contact", "Export Effect Presets": "Exporter les préréglages d'effets", "Export Effect Presets…": "Exporter les préréglages d'effets…", "Export Mask Effects": "Exporter les effets de masque", - "External Editing": "Retouche externe", "Face Models on the GPU": "Modèles de visages sur le GPU", "Face models (ONNX)": "Modèles de visages (ONNX)", "Fade": "Fondu", @@ -2504,7 +2520,6 @@ "Favorite Mask Effect": "Effet de masque favori", "Filters": "Filtres", "Find Blemishes": "Rechercher les imperfections", - "Found automatically": "Trouvé automatiquement", "Grid: add the next photo to the selection": "Grille : ajouter la photo suivante à la sélection", "Grid: add the previous photo to the selection": "Grille : ajouter la photo précédente à la sélection", "Grid: first photo of the view": "Grille : première photo de la vue", @@ -2526,7 +2541,6 @@ "Increase Grid Thumbnail Size": "Augmenter la taille des miniatures de la grille", "It is not a denoise model LightCraft understands": "Ce n'est pas un modèle de réduction du bruit pris en charge par LightCraft", "Keyword Info": "Infos sur le mot-clé", - "LUT-based": "Basé sur LUT", "Layout Image Matte": "Mat de l'image de mise en page", "Layout Image Opacity": "Opacité de l'image de mise en page", "Left: the standard (SDR) range up to SDR white. Right: the HDR range, one band per stop above SDR white (the orange line: the HDR headroom). With Visualize HDR range on, the bands take its colours.": "Gauche : la plage standard (SDR) jusqu'au blanc SDR. Droite : la plage HDR, une bande par diaphragme au-dessus du blanc SDR (la ligne orange : la marge HDR). Quand Visualiser la plage HDR est activé, les bandes en prennent les couleurs.", @@ -2544,8 +2558,6 @@ "Mask": "Masque", "Mask Effect Presets": "Préréglages d'effets de masque", "Masks keep their sliders. Export presets first to keep a copy.": "Les masques conservent leurs curseurs. Exportez d'abord les préréglages pour en garder une copie.", - "Matrix/TRC": "Matrice/TRC", - "Monitor profile": "Profil du moniteur", "Move Keyword": "Déplacer le mot-clé", "Move Mask Effect to Group": "Déplacer l'effet de masque vers un groupe", "Move Print Cell": "Déplacer la cellule d'impression", @@ -2571,29 +2583,23 @@ "No people yet": "Aucune personne pour l'instant", "No person by that name": "Aucune personne de ce nom", "No unnamed faces. Faces found in your photos appear here until you name them.": "Aucun visage sans nom. Les visages trouvés dans vos photos apparaissent ici tant que vous ne les avez pas nommés.", - "None (the display is treated as sRGB)": "Aucun (l'écran est traité comme sRGB)", "One photo fills each page inside the margins.": "Une photo remplit chaque page à l'intérieur des marges.", "Open Original in Other Editor (RAW, no copy)": "Ouvrir l'original dans un autre éditeur (RAW, sans copie)", "Open Settings": "Ouvrir les réglages", - "Other editor": "Autre éditeur", "Overlay color": "Couleur de l'incrustation", "Page": "Page", "Page Options": "Options de page", "Pause / Resume Slideshow": "Mettre en pause / reprendre le diaporama", "Photo Above": "Photo au-dessus", "Photo Below": "Photo en dessous", - "Photo ▸ Edit In ▸ Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Photo → Modifier dans → Modifier dans PhotoCraft (⇧⌘E, ou clic droit sur une photo) calcule une copie avec vos retouches, l'empile avec l'original et l'ouvre dans PhotoCraft. Enregistrez-y votre travail : la copie se met à jour ici. Au format PSD, PhotoCraft enregistre directement dans ce fichier. Laissez l'emplacement vide, sauf si vous utilisez une copie portable.", "PhotoCraft": "PhotoCraft", - "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.": "Les photos sont affichées à travers le profil ICC de votre moniteur : les couleurs sont donc justes sur les écrans à large gamme de couleurs et calibrés, et la vue Détail utilise toute la gamme de couleurs de l'écran. L'histogramme, les caches d'aperçus et les exportations ne sont pas affectés.", "Photos stay in All Photos. Deleting a folder also deletes its albums. You can undo this.": "Les photos restent dans Toutes les photos. Supprimer un dossier supprime aussi ses albums. Vous pouvez annuler cette action.", "Previous History Step": "Étape d'historique précédente", "Previous Slide": "Diapositive précédente", "Previous page": "Page précédente", - "Primaries (x, y)": "Primaires (x, y)", "Print Settings": "Réglages d'impression", "Print Templates": "Modèles d'impression", "Print to PDF": "Imprimer en PDF", - "Profiles assigned in your desktop's colour settings are usually in ~/.local/share/icc.": "Les profils attribués dans les réglages de couleur de votre bureau se trouvent généralement dans ~/.local/share/icc.", "Progressive": "Progressif", "Put New Keywords Inside": "Placer les nouveaux mots-clés à l'intérieur", "Read Focus Points in the Background": "Lire les points de mise au point en arrière-plan", @@ -2670,8 +2676,6 @@ "Update Slideshow Template": "Mettre à jour le modèle de diaporama", "Update to Current Process": "Mettre à jour vers le traitement actuel", "Use Defaults": "Utiliser les valeurs par défaut", - "Use Screen Profile": "Utiliser le profil de l'écran", - "Use sRGB": "Utiliser sRGB", "View Options": "Options d'affichage", "View Options…": "Options d'affichage…", "View → View Options chooses the lines Info 1 and Info 2 show.": "Affichage → Options d'affichage choisit les lignes que montrent Infos 1 et Infos 2.", @@ -2686,7 +2690,6 @@ "or drop a .onnx file on the window": "ou déposez un fichier .onnx sur la fenêtre", "size": "taille", "source": "source", - "this screen's profile": "le profil de cet écran", "★ Favorites": "★ Favoris", "\"24.0-70.0 mm f/2.8\". Those cameras don't write a lens name, so the lens field was empty and you couldn't filter or": "« 24.0-70.0 mm f/2.8 ». Ces appareils n'écrivent pas de nom d'objectif : le champ était vide et il était impossible de filtrer ou de", "\"Albums\" header takes it back to the top level; Esc cancels; holding a dragged album or photos near the top or bottom edge of the sidebar scrolls it). Drop on the top or bottom half of another album,": "en-tête « Albums » le remet au premier niveau ; Échap annule ; maintenir un album ou des photos glissés près du bord haut ou bas de la barre latérale la fait défiler). Déposez sur la moitié haute ou basse d'un autre album,", @@ -2864,7 +2867,6 @@ "Each sits at one of nine anchors of the slide or of the photo, moved by an offset, and never leaves the slide.": "Chacune se place à l'un des neuf points d'ancrage de la diapositive ou de la photo, déplacée par un décalage, et ne quitte jamais la diapositive.", "Each such bug used to take one of the render threads with it, so after a few of them no photo rendered until": "Chaque bogue de ce type emportait auparavant l'un des fils de rendu, si bien qu'après quelques-uns, aucune photo ne s'affichait avant que", "Edge, Short Edge, Aspect Ratio (landscape / portrait / square), Cropped and Treatment (in color / black & white).": "côté, Petit côté, Ratio de format (paysage / portrait / carré), Recadrée et Traitement (en couleur / noir et blanc).", - "Edit in PhotoCraft": "Modifier dans PhotoCraft", "Editing a smart album's name and rules is one step: both or neither, and one undo takes both back": "Modifier le nom et les règles d'un album intelligent forme une seule étape : les deux ou aucun, et une annulation annule les deux", "Edits keep up in a large library": "Les retouches suivent le rythme dans une grande bibliothèque", "Existing smart previews are refreshed when their originals are online, and cached renders are redrawn.": "Les aperçus dynamiques existants sont actualisés quand leurs originaux sont en ligne, et les rendus en cache sont recalculés.", diff --git a/crates/ui-egui/locales/id.json b/crates/ui-egui/locales/id.json index 52705328cc7..3eb7983d517 100644 --- a/crates/ui-egui/locales/id.json +++ b/crates/ui-egui/locales/id.json @@ -557,7 +557,7 @@ "Download Place Names (GeoNames)": "Unduh nama tempat (GeoNames)", "Download the SAM 3 Model?": "Unduh model SAM 3?", "Downloaded and checked. Installing…": "Sudah diunduh dan diverifikasi. Menginstal…", - "The download failed": "Pengunduhan gagal", + "The download failed": "Unduhan gagal", "Downloading model": "Mengunduh model", "Downloading place names": "Mengunduh nama tempat", "Downloads": "Unduhan", @@ -1402,7 +1402,6 @@ "Photo Grid": "Grid foto", "Photo Grid (G)": "Grid foto (G)", "Photo Merge": "Gabung foto", - "Photo ▸ Edit In ▸ Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Foto → Edit di → Edit di PhotoCraft (⇧⌘E, atau klik kanan foto) merender salinan beserta hasil edit Anda, menumpuknya dengan foto asli, lalu membukanya di PhotoCraft. Simpan di sana, dan salinan di sini ikut diperbarui. Jika berformat PSD, PhotoCraft menyimpan langsung ke file tersebut. Kosongkan lokasi kecuali Anda menggunakan salinan portabel.", "Photo ▸ Edit in External Editor (⇧⌘E) renders a 16-bit TIFF copy, stacks it with the original and opens it here (an app name on macOS, a program path elsewhere).": "Foto → Edit di editor eksternal (⇧⌘E) membuat salinan TIFF 16-bit, menumpuknya dengan file asli, lalu membukanya dengan program yang diisi di sini (nama aplikasi di macOS, jalur program di sistem lain).", "PhotoCraft": "PhotoCraft", "Photos": "Foto", @@ -2397,5 +2396,8 @@ "Top bar": "Bilah atas", "Tool strip": "Bilah alat", "Bottom bar": "Bilah bawah", - "Stopped at the scan limit: there may be more photos": "Berhenti pada batas pemindaian: mungkin masih ada foto" + "Stopped at the scan limit: there may be more photos": "Berhenti pada batas pemindaian: mungkin masih ada foto", + "Model installation failed": "Instalasi model gagal", + "starting…": "memulai…", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Foto > Edit di > Edit di PhotoCraft (⇧⌘E, atau klik kanan foto) merender salinan beserta hasil edit Anda, menumpuknya dengan foto asli, lalu membukanya di PhotoCraft. Simpan di sana, dan salinan di sini ikut diperbarui. Jika berformat PSD, PhotoCraft menyimpan langsung ke file tersebut. Kosongkan lokasi kecuali Anda menggunakan salinan portabel." } diff --git a/crates/ui-egui/locales/it.json b/crates/ui-egui/locales/it.json index 5b0ccc0cee0..a37a5414c68 100644 --- a/crates/ui-egui/locales/it.json +++ b/crates/ui-egui/locales/it.json @@ -1837,10 +1837,11 @@ "LUT-based": "Basato su LUT", "Left: the standard (SDR) range up to SDR white. Right: the HDR range, one band per stop above SDR white (the orange line: the HDR headroom). With Visualize HDR range on, the bands take its colours.": "A sinistra: la gamma standard (SDR) fino al bianco SDR. A destra: la gamma HDR, una fascia per ogni stop sopra il bianco SDR (la linea arancione: il margine HDR). Con Visualizza gamma HDR attivo, le fasce ne prendono i colori.", "Matrix/TRC": "Matrice/TRC", + "Model installation failed": "Installazione del modello non riuscita", "Monitor profile": "Profilo monitor", "None (the display is treated as sRGB)": "Nessuno (lo schermo viene trattato come sRGB)", "Other editor": "Altro editor", - "Photo ▸ Edit In ▸ Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Foto → Modifica in → Modifica in PhotoCraft (⇧⌘E, o clic destro su una foto) esegue il rendering di una copia con le tue modifiche, la impila con l'originale e la apre in PhotoCraft. Salva lì e la copia si aggiorna qui. Come PSD, PhotoCraft salva direttamente su di essa. Lascia vuota la posizione a meno che tu non usi una copia portatile.", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Foto > Modifica in > Modifica in PhotoCraft (⇧⌘E, o clic con il tasto destro su una foto) genera una copia con le tue modifiche, la mette in pila con l'originale e la apre in PhotoCraft. Salva lì e la copia si aggiorna qui. Come PSD, PhotoCraft salva direttamente al suo interno. Lascia vuota la posizione, a meno che tu non usi una copia portatile.", "PhotoCraft": "PhotoCraft", "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.": "Le foto vengono mostrate attraverso il profilo ICC del monitor, così i colori sono corretti su schermi calibrati e a gamut esteso, e la vista Dettaglio usa tutto il gamut dello schermo. Istogramma, cache delle anteprime ed esportazioni non cambiano.", "Photos stay in All Photos. Deleting a folder also deletes its albums. You can undo this.": "Le foto restano in Tutte le foto. Eliminando una cartella si eliminano anche i suoi album. Puoi annullare l'operazione.", @@ -1850,6 +1851,7 @@ "SDR": "SDR", "Use Screen Profile": "Usa profilo dello schermo", "Use sRGB": "Usa sRGB", + "starting…": "avvio…", "this screen's profile": "il profilo di questo schermo", "Show photos": "Mostra foto", "Their photos in the grid": "Le loro foto nella griglia", diff --git a/crates/ui-egui/locales/ja.json b/crates/ui-egui/locales/ja.json index 97c15dd0191..8689c8136ea 100644 --- a/crates/ui-egui/locales/ja.json +++ b/crates/ui-egui/locales/ja.json @@ -1729,7 +1729,7 @@ "Denoise Settings": "ノイズ除去の設定", "Denoise all photos with an Amount": "適用量のあるすべての写真のノイズを除去", "Downloaded and checked. Installing…": "ダウンロードして確認しました。インストール中…", - "The download failed": "ダウンロードに失敗しました。", + "The download failed": "ダウンロードに失敗しました", "Failed its last test": "前回のテストに失敗", "Graphics card": "グラフィックカード", "I have read these terms and accept them for my own use": "この条件を読み、自分の使用のために同意します", @@ -1940,6 +1940,9 @@ "Not saved": "保存されていません", "A folder is being synchronized": "フォルダを同期中です", "Wait for the import to finish": "読み込みが終わるまでお待ちください", + "Choose Profile…": "プロファイルを選択…", + "Edit in Other Editor (⌥⌘E) opens the copy in this application (an app name on macOS, a program path elsewhere).": "「他のエディターで編集」(⌥⌘E)は、コピーをこのアプリケーションで開きます(macOSではアプリ名、それ以外ではプログラムのパス)", + "External Editing": "外部編集", "Appearance": "外観", "Appearance Mode": "外観モード", "Sync with System": "システムと同期", @@ -2065,6 +2068,24 @@ "Face detector": "顔検出器", "Face recognition": "顔認識", "Faces": "顔", + "Found automatically": "自動検出", + "LUT-based": "LUTベース", + "Matrix/TRC": "マトリックス/TRC", + "Model installation failed": "モデルのインストールに失敗しました", + "Monitor profile": "モニタープロファイル", + "None (the display is treated as sRGB)": "なし(ディスプレイをsRGBとして扱います)", + "Other editor": "他のエディター", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "「写真 > アプリで編集 > PhotoCraftで編集」(⇧⌘E、または写真を右クリック)は、編集内容を反映したコピーを作成し、元画像とスタックにまとめてPhotoCraftで開きます。PhotoCraftで保存すると、こちらのコピーも更新されます。PSDの場合、PhotoCraftはそのファイルに直接保存します。ポータブル版を使わない場合は、場所を空欄のままにしてください", + "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.": "写真はモニターのICCプロファイルを通して表示されるため、広色域ディスプレイやキャリブレーション済みのディスプレイでも正しい色になり、詳細表示ではディスプレイの色域全体を使用します。ヒストグラム、プレビューキャッシュ、書き出しには影響しません", + "Primaries (x, y)": "原色(x, y)", + "Profiles assigned in your desktop's colour settings are usually in ~/.local/share/icc.": "デスクトップのカラー設定で割り当てたプロファイルは、通常 ~/.local/share/icc にあります", + "Use Screen Profile": "画面のプロファイルを使用", + "Use sRGB": "sRGBを使用", + "starting…": "起動中…", + "this screen's profile": "この画面のプロファイル", + "Edit In": "アプリで編集", + "Edit in PhotoCraft": "PhotoCraftで編集", + "Edit in Other Editor": "他のエディターで編集", "Faces of a Person": "人物の顔", "Faster exports and card imports, with the same protection for what can't be recreated (issue #134): exports,": "書き出しとカードからの読み込みが速くなり、作り直せないものは同じように保護されます(issue #134):書き出し、", "Go back to listing them by name": "名前順の一覧に戻る", diff --git a/crates/ui-egui/locales/ka.json b/crates/ui-egui/locales/ka.json index 30769b60fa1..1b2ffcaa1fb 100644 --- a/crates/ui-egui/locales/ka.json +++ b/crates/ui-egui/locales/ka.json @@ -1501,7 +1501,6 @@ "Photo Merge of Canon CR2 (and other raws whose colour LightCraft fits from the camera's own JPEG, such as NEF and": "Canon CR2-ის (და სხვა RAW ფაილების, რომელთა ფერსაც LightCraft კამერის საკუთარი JPEG-იდან არგებს, როგორიცაა NEF და", "Photo menu. The filmstrip has the photo context menu too. Adding a file again that is in Recently Deleted no": "„ფოტო“ მენიუში. კადრების ზოლსაც აქვს ფოტოს კონტექსტური მენიუ. ახლახან წაშლილში მყოფი ფაილის ხელახლა დამატება აღარ", "Photo › Assisted Culling…": "ფოტო › დამხმარე გადარჩევა…", - "Photo ▸ Edit In ▸ Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "ფოტო → რედაქტირება სხვა პროგრამაში → რედაქტირება PhotoCraft-ში (⇧⌘E, ან მარჯვენა დაწკაპუნება ფოტოზე) არენდერებს ასლს თქვენი ცვლილებებით, ორიგინალთან ერთ დასტაში აერთიანებს და PhotoCraft-ში ხსნის. იქ შენახვისას ასლი აქაც განახლდება. PSD-ის შემთხვევაში PhotoCraft პირდაპირ მასში ინახავს. მდებარეობა ცარიელი დატოვეთ, თუ პორტატულ ასლს არ იყენებთ.", "Photo ▸ Edit in External Editor (⇧⌘E) renders a 16-bit TIFF copy, stacks it with the original and opens it here (an app name on macOS, a program path elsewhere).": "ფოტო → რედაქტირება გარე რედაქტორში (⇧⌘E) ქმნის 16-ბიტიან TIFF ასლს, ორიგინალთან ერთად დასტაში აერთიანებს და აქ ხსნის (macOS-ზე აპის სახელი, სხვაგან — პროგრამის მისამართი).", "Photos": "ფოტოები", "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.": "ფოტოები თქვენი მონიტორის ICC პროფილით ნაჩვენებია, ამიტომ ფერები სწორია ფართო ფერთა გამისა და დაკალიბრებულ ეკრანებზე, ხოლო დეტალური ხედი ეკრანის მთელ ფერთა გამას იყენებს. ჰისტოგრამაზე, წინასწარი ხედების ქეშებსა და ექსპორტზე ეს გავლენას არ ახდენს.", @@ -3692,5 +3691,8 @@ "Tool strip": "ხელსაწყოების ზოლი", "Bottom bar": "ქვედა ზოლი", "Prevent G-SYNC/FreeSync flicker (applies at next launch)": "G-SYNC/FreeSync-ის ციმციმის თავიდან აცილება (ამოქმედდება შემდეგი გაშვებისას)", - "Stopped at the scan limit: there may be more photos": "სკანირების ლიმიტზე გაჩერდა: შესაძლოა სხვა ფოტოებიც არის" + "Stopped at the scan limit: there may be more photos": "სკანირების ლიმიტზე გაჩერდა: შესაძლოა სხვა ფოტოებიც არის", + "Model installation failed": "მოდელის ინსტალაცია ვერ მოხერხდა", + "starting…": "იწყება…", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "ფოტო > რედაქტირება სხვა პროგრამაში > რედაქტირება PhotoCraft-ში (⇧⌘E, ან მარჯვენა დაწკაპუნება ფოტოზე) არენდერებს ასლს თქვენი ცვლილებებით, ორიგინალთან ერთ დასტაში აერთიანებს და PhotoCraft-ში ხსნის. იქ შენახვისას ასლი აქაც განახლდება. PSD-ის შემთხვევაში PhotoCraft პირდაპირ მასში ინახავს. მდებარეობა ცარიელი დატოვეთ, თუ პორტატულ ასლს არ იყენებთ." } diff --git a/crates/ui-egui/locales/pl.json b/crates/ui-egui/locales/pl.json index dbc29a19417..7422c2f4e48 100644 --- a/crates/ui-egui/locales/pl.json +++ b/crates/ui-egui/locales/pl.json @@ -2166,6 +2166,8 @@ "Vertical inset (% of short edge)": "Margines pionowy (% krótszego boku)", "not added to Apple Photos (cancelled)": "nie dodano do aplikacji Zdjęcia (anulowano)", "Prevent G-SYNC/FreeSync flicker (applies at next launch)": "Zapobiegaj migotaniu G-SYNC/FreeSync (po ponownym uruchomieniu)", + "Choose Profile…": "Wybierz profil…", + "Edit In": "Edytuj w", "Set Folder Color Label": "Ustaw etykietę kolorystyczną folderu", "Refresh View": "Odśwież widok", "Hold View Until Refreshed": "Wstrzymaj widok do odświeżenia", @@ -2261,7 +2263,24 @@ "End Slideshow": "Zakończ pokaz slajdów", "Contact Sheet PDF…": "Arkusz stykowy PDF…", "Edit in PhotoCraft": "Edytuj w PhotoCraft", + "External Editing": "Edycja zewnętrzna", + "Found automatically": "Znajdowany automatycznie", + "LUT-based": "Oparty na LUT", + "Matrix/TRC": "Macierz/TRC", + "Model installation failed": "Instalacja modelu nie powiodła się", + "Monitor profile": "Profil monitora", + "None (the display is treated as sRGB)": "Brak (ekran jest traktowany jako sRGB)", + "Other editor": "Inny edytor", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Zdjęcie > Edytuj w > Edytuj w PhotoCraft (⇧⌘E lub kliknięcie zdjęcia prawym przyciskiem) tworzy kopię z Twoimi edycjami, grupuje ją z oryginałem i otwiera w PhotoCraft. Zapisz tam, a kopia zaktualizuje się tutaj. W przypadku PSD PhotoCraft zapisuje bezpośrednio do niego. Zostaw lokalizację pustą, chyba że używasz kopii przenośnej.", + "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.": "Zdjęcia są wyświetlane przez profil ICC monitora, dzięki czemu kolory są poprawne na ekranach o szerokiej gamie i skalibrowanych, a widok Szczegóły wykorzystuje całą gamę ekranu. Histogram, pamięci podręczne podglądów i eksporty pozostają bez zmian.", + "Primaries (x, y)": "Barwy podstawowe (x, y)", + "Profiles assigned in your desktop's colour settings are usually in ~/.local/share/icc.": "Profile przypisane w ustawieniach kolorów pulpitu zwykle znajdują się w ~/.local/share/icc.", + "Use Screen Profile": "Użyj profilu ekranu", + "Use sRGB": "Użyj sRGB", + "starting…": "uruchamianie…", + "this screen's profile": "profil tego ekranu", "Edit in Other Editor": "Edytuj w innym edytorze", + "Edit in Other Editor (⌥⌘E) opens the copy in this application (an app name on macOS, a program path elsewhere).": "Edytuj w innym edytorze (⌥⌘E) otwiera kopię w tej aplikacji (nazwa aplikacji w macOS, ścieżka programu w pozostałych systemach).", "Open Original in Other Editor (RAW, no copy)": "Otwórz oryginał w innym edytorze (RAW, bez kopii)", "Save Current Settings as New Effect Preset…": "Zapisz bieżące ustawienia jako nowe ustawienie wstępne efektu…", "Manage Effect Presets…": "Zarządzaj ustawieniami wstępnymi efektów…", diff --git a/crates/ui-egui/locales/pt-br.json b/crates/ui-egui/locales/pt-br.json index 3aedd829064..40c6a8ed26a 100644 --- a/crates/ui-egui/locales/pt-br.json +++ b/crates/ui-egui/locales/pt-br.json @@ -1729,7 +1729,7 @@ "Denoise Settings": "Configurações de redução de ruído", "Denoise all photos with an Amount": "Reduzir o ruído de todas as fotos com uma Quantidade", "Downloaded and checked. Installing…": "Baixado e verificado. Instalando…", - "The download failed": "Falha ao baixar", + "The download failed": "Falha no download", "Failed its last test": "Falhou no último teste", "Graphics card": "Placa de vídeo", "I have read these terms and accept them for my own use": "Li estes termos e os aceito para meu uso pessoal", @@ -1938,6 +1938,9 @@ "Not saved": "Não salvo", "A folder is being synchronized": "Uma pasta está sendo sincronizada", "Wait for the import to finish": "Aguarde a importação terminar", + "Choose Profile…": "Escolher perfil…", + "Edit in Other Editor (⌥⌘E) opens the copy in this application (an app name on macOS, a program path elsewhere).": "Editar em outro editor (⌥⌘E) abre a cópia neste aplicativo (um nome de aplicativo no macOS, um caminho de programa em outros sistemas).", + "External Editing": "Edição externa", "Appearance": "Aparência", "Appearance Mode": "Modo de aparência", "Sync with System": "Sincronizar com o sistema", @@ -2044,6 +2047,24 @@ "Test Face Model": "Testar modelo de rostos", "Unnamed Faces": "Rostos sem nome", "Faces": "Rostos", + "Found automatically": "Encontrado automaticamente", + "LUT-based": "Baseado em LUT", + "Matrix/TRC": "Matriz/TRC", + "Model installation failed": "Falha na instalação do modelo", + "Monitor profile": "Perfil do monitor", + "None (the display is treated as sRGB)": "Nenhum (a tela é tratada como sRGB)", + "Other editor": "Outro editor", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Foto > Editar em > Editar no PhotoCraft (⇧⌘E, ou clique com o botão direito em uma foto) renderiza uma cópia com suas edições, empilha-a com o original e a abre no PhotoCraft. Salve lá e a cópia é atualizada aqui. Se for um PSD, o PhotoCraft salva diretamente nela. Deixe o local vazio, a menos que você use uma cópia portátil.", + "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.": "As fotos são exibidas por meio do perfil ICC do seu monitor, para que as cores fiquem corretas em telas calibradas e de gamut amplo, e a exibição Detalhe usa todo o gamut da tela. O histograma, os caches de pré-visualização e as exportações não são afetados.", + "Primaries (x, y)": "Primárias (x, y)", + "Profiles assigned in your desktop's colour settings are usually in ~/.local/share/icc.": "Os perfis atribuídos nas configurações de cor da sua área de trabalho geralmente ficam em ~/.local/share/icc.", + "Use Screen Profile": "Usar perfil da tela", + "Use sRGB": "Usar sRGB", + "starting…": "iniciando…", + "this screen's profile": "perfil desta tela", + "Edit In": "Editar em", + "Edit in PhotoCraft": "Editar no PhotoCraft", + "Edit in Other Editor": "Editar em outro editor", "Face recognition": "Reconhecimento facial", "This build has nowhere to keep face models, so the model list is not available. (The desktop app has.)": "Esta versão não tem onde guardar modelos de rostos, então a lista de modelos não está disponível. (O aplicativo para desktop tem.)", "Recognise faces (experimental)": "Reconhecer rostos (experimental)", diff --git a/crates/ui-egui/locales/ru.json b/crates/ui-egui/locales/ru.json index b3df02470e3..6354d06d954 100644 --- a/crates/ui-egui/locales/ru.json +++ b/crates/ui-egui/locales/ru.json @@ -75,11 +75,11 @@ "Display profile not used": "Профиль дисплея не используется", "Drag to set hue and saturation. Hold Shift to keep the hue, Cmd/Ctrl to keep the saturation, Alt/Option to fine-adjust. Double-click to reset.": "Перетащите, чтобы задать тон и насыщенность. Удерживайте Shift, чтобы сохранить тон, Cmd/Ctrl, чтобы сохранить насыщенность, Alt/Option для точной настройки. Двойной щелчок сбрасывает.", "Duplicate Mask Effect": "Дублировать эффект маски", - "Edit In": "Редактировать в", + "Edit In": "Править в", "Edit Keyword": "Изменить ключевое слово", "Edit in HDR: highlights above SDR white, for HDR exports and displays": "Правка в HDR: света выше белого SDR, для экспорта и дисплеев HDR", - "Edit in Other Editor": "Редактировать в другом редакторе", - "Edit in Other Editor (⌥⌘E) opens the copy in this application (an app name on macOS, a program path elsewhere).": "«Редактировать в другом редакторе» (⌥⌘E) открывает копию в этом приложении (на macOS это имя приложения, в других системах путь к программе).", + "Edit in Other Editor": "Править в другом редакторе", + "Edit in Other Editor (⌥⌘E) opens the copy in this application (an app name on macOS, a program path elsewhere).": "Править в другом редакторе (⌥⌘E) открывает копию в этом приложении (имя приложения в macOS, путь к программе в других системах).", "End Slideshow": "Завершить слайд-шоу", "Enter to confirm, Esc to cancel": "Enter подтверждает, Esc отменяет", "Export Contact Sheet PDF": "Экспорт контактного листа PDF", @@ -95,7 +95,7 @@ "Favorite Mask Effect": "Избранный эффект маски", "Filters": "Фильтры", "Find Blemishes": "Найти дефекты", - "Found automatically": "Найдено автоматически", + "Found automatically": "Определяется автоматически", "Group (optional)": "Группа (необязательно)", "HDR Headroom": "Запас HDR", "Hide this wheel's effect": "Скрыть эффект этого круга", @@ -151,8 +151,7 @@ "Pause / Resume Slideshow": "Пауза / продолжение слайд-шоу", "Photo Above": "Фото выше", "Photo Below": "Фото ниже", - "Photo ▸ Edit In ▸ Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Фото › Редактировать в › Редактировать в PhotoCraft (⇧⌘E или щелчок правой кнопкой по фото) создаёт копию с вашими правками, объединяет её в стопку с оригиналом и открывает в PhotoCraft. Сохраните там, и копия обновится здесь. Если копия в формате PSD, PhotoCraft сохраняет прямо в неё. Оставьте расположение пустым, если не пользуетесь переносной копией.", - "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.": "Фото показываются через ICC-профиль монитора, поэтому цвета верны на дисплеях с широким охватом и на откалиброванных дисплеях, а режим «Детализация» использует весь цветовой охват дисплея. Гистограмму, кэши просмотров и экспорт это не затрагивает.", + "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.": "Фото отображаются через ICC-профиль вашего монитора, поэтому цвета верны на калиброванных дисплеях и дисплеях с широким цветовым охватом, а режим «Детализация» использует весь охват дисплея. На гистограмму, кэши просмотров и экспорт это не влияет.", "Photos stay in All Photos. Deleting a folder also deletes its albums. You can undo this.": "Фото останутся во «Всех фото». При удалении папки удаляются и её альбомы. Это действие можно отменить.", "Previous History Step": "Предыдущий шаг истории", "Previous Slide": "Предыдущий слайд", @@ -161,7 +160,7 @@ "Print Settings": "Параметры печати", "Print Templates": "Шаблоны печати", "Print to PDF": "Печать в PDF", - "Profiles assigned in your desktop's colour settings are usually in ~/.local/share/icc.": "Профили, назначенные в настройках цвета рабочего стола, обычно лежат в ~/.local/share/icc.", + "Profiles assigned in your desktop's colour settings are usually in ~/.local/share/icc.": "Профили, назначенные в настройках цвета рабочего стола, обычно находятся в ~/.local/share/icc.", "Progressive": "Прогрессивный", "Put New Keywords Inside": "Добавлять новые ключевые слова внутрь", "Read Focus Points in the Background": "Читать точки фокусировки в фоне", @@ -1617,7 +1616,7 @@ "Denoise Settings": "Настройки шумоподавления", "Denoise all photos with an Amount": "Подавить шум на всех фото с заданным количеством", "Downloaded and checked. Installing…": "Загружено и проверено. Установка…", - "The download failed": "Не удалось загрузить", + "The download failed": "Загрузка не удалась", "Failed its last test": "Последняя проверка не пройдена", "Graphics card": "Видеокарта", "I have read these terms and accept them for my own use": "Я прочитал эти условия и принимаю их для собственного использования", @@ -1867,6 +1866,11 @@ "Not saved": "Не сохранено", "A folder is being synchronized": "Папка синхронизируется", "Wait for the import to finish": "Дождитесь завершения импорта", + "Matrix/TRC": "Матрица/TRC", + "Model installation failed": "Не удалось установить модель", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Фото > Править в > Править в PhotoCraft (⇧⌘E или щелчок правой кнопкой по фото) создаёт копию с вашими правками, помещает её в стопку с оригиналом и открывает в PhotoCraft. Сохраните её там, и копия обновится здесь. Если это PSD, PhotoCraft сохраняет прямо в неё. Оставьте расположение пустым, если не используете портативную версию.", + "starting…": "запуск…", + "Edit in PhotoCraft": "Править в PhotoCraft", "Appearance": "Оформление", "Appearance Mode": "Режим оформления", "Sync with System": "Как в системе", diff --git a/crates/ui-egui/locales/sv.json b/crates/ui-egui/locales/sv.json index 94b9e303338..a0091cd9930 100644 --- a/crates/ui-egui/locales/sv.json +++ b/crates/ui-egui/locales/sv.json @@ -1546,7 +1546,6 @@ "Photo Merge": "Fotosammanfogning", "photo waiting": "foto väntar", "Photo ▸ Edit in External Editor (⇧⌘E) renders a 16-bit TIFF copy, stacks it with the original and opens it here (an app name on macOS, a program path elsewhere).": "Foto → Redigera i externt program (⇧⌘E) renderar en 16-bitars TIFF-kopia, staplar den med originalet och öppnar den här (ett appnamn på macOS, en programsökväg på andra system).", - "Photo ▸ Edit In ▸ Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Foto → Redigera i → Redigera i PhotoCraft (⇧⌘E, eller högerklicka på ett foto) renderar en kopia med dina ändringar, staplar den med originalet och öppnar den i PhotoCraft. Spara där så uppdateras kopian här. Som PSD sparar PhotoCraft direkt tillbaka till den. Lämna platsen tom om du inte använder en portabel kopia.", "PhotoCraft": "PhotoCraft", "Photos": "Foton", "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.": "Foton visas genom bildskärmens ICC-profil, så att färgerna blir rätt på kalibrerade skärmar och skärmar med brett färgomfång, och vyn Detalj använder skärmens hela färgomfång. Histogrammet, förhandsgranskningscacharna och exporter påverkas inte.", @@ -2486,5 +2485,9 @@ "Top bar": "Övre fältet", "Tool strip": "Verktygsfält", "Bottom bar": "Nedre fältet", - "Stopped at the scan limit: there may be more photos": "Stoppade vid skanningsgränsen: det kan finnas fler foton" + "Stopped at the scan limit: there may be more photos": "Stoppade vid skanningsgränsen: det kan finnas fler foton", + "Model installation failed": "Modellinstallationen misslyckades", + "starting…": "startar…", + "Edit In": "Redigera i", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Foto > Redigera i > Redigera i PhotoCraft (⇧⌘E, eller högerklicka på ett foto) renderar en kopia med dina ändringar, staplar den med originalet och öppnar den i PhotoCraft. Spara där så uppdateras kopian här. Som PSD sparar PhotoCraft direkt tillbaka till den. Lämna platsen tom om du inte använder en portabel kopia." } diff --git a/crates/ui-egui/locales/uk.json b/crates/ui-egui/locales/uk.json index 09b78fab1e3..6da55716c45 100644 --- a/crates/ui-egui/locales/uk.json +++ b/crates/ui-egui/locales/uk.json @@ -1720,7 +1720,7 @@ "Denoise Settings": "Налаштування усунення шуму", "Denoise all photos with an Amount": "Обробити всі фото зі значенням усунення шуму", "Downloaded and checked. Installing…": "Завантажено й перевірено. Установлення…", - "The download failed": "Не вдалося завантажити", + "The download failed": "Завантаження не вдалося", "Failed its last test": "Останню перевірку не пройдено", "Graphics card": "Відеокарта", "I have read these terms and accept them for my own use": "Я прочитав ці умови й приймаю їх для власного використання", @@ -2188,6 +2188,27 @@ "Appearance Settings…": "Налаштування вигляду…", "Add to favorites": "Додати до вибраного", "Remove from favorites": "Видалити з вибраного", + "Choose Profile…": "Вибрати профіль…", + "Edit in Other Editor (⌥⌘E) opens the copy in this application (an app name on macOS, a program path elsewhere).": "Редагувати в іншому редакторі (⌥⌘E) відкриває копію в цьому застосунку (назва застосунку в macOS, шлях до програми в інших системах).", + "External Editing": "Зовнішнє редагування", + "Found automatically": "Визначається автоматично", + "LUT-based": "На основі LUT", + "Matrix/TRC": "Матриця/TRC", + "Model installation failed": "Не вдалося встановити модель", + "Monitor profile": "Профіль монітора", + "None (the display is treated as sRGB)": "Немає (дисплей вважається sRGB)", + "Other editor": "Інший редактор", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Фото > Редагувати в > Редагувати в PhotoCraft (⇧⌘E або клацання фото правою кнопкою) створює копію з вашими редагуваннями, додає її до стосу з оригіналом і відкриває в PhotoCraft. Збережіть її там, і копія оновиться тут. Якщо це PSD, PhotoCraft зберігає безпосередньо в неї. Залиште розташування порожнім, якщо не використовуєте портативну версію.", + "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.": "Фото відображаються через ICC-профіль вашого монітора, тому кольори правильні на каліброваних дисплеях і дисплеях із широким колірним охопленням, а подання «Деталі» використовує все охоплення дисплея. На гістограму, кеші переглядів і експорт це не впливає.", + "Primaries (x, y)": "Основні кольори (x, y)", + "Profiles assigned in your desktop's colour settings are usually in ~/.local/share/icc.": "Профілі, призначені в налаштуваннях кольору робочого столу, зазвичай містяться в ~/.local/share/icc.", + "Use Screen Profile": "Використовувати профіль екрана", + "Use sRGB": "Використовувати sRGB", + "starting…": "запуск…", + "this screen's profile": "профіль цього екрана", + "Edit In": "Редагувати в", + "Edit in PhotoCraft": "Редагувати в PhotoCraft", + "Edit in Other Editor": "Редагувати в іншому редакторі", "Appearance": "Вигляд", "Appearance Mode": "Режим вигляду", "Sync with System": "Як у системі", diff --git a/crates/ui-egui/locales/vi.json b/crates/ui-egui/locales/vi.json index af27e9aa0ab..6cd00ac46fe 100644 --- a/crates/ui-egui/locales/vi.json +++ b/crates/ui-egui/locales/vi.json @@ -515,7 +515,7 @@ "Download Place Names (GeoNames)": "Tải tên địa điểm (GeoNames)", "Download the SAM 3 Model?": "Tải mô hình SAM 3?", "Downloaded and checked. Installing…": "Đã tải và kiểm tra. Đang cài…", - "The download failed": "Tải xuống không thành công", + "The download failed": "Tải xuống thất bại", "Downloading model": "Đang tải mô hình", "Downloading place names": "Đang tải tên địa điểm", "Downloads": "Tải xuống", @@ -1294,7 +1294,6 @@ "Photo Grid (G)": "Lưới ảnh (G)", "Photo Merge": "Ghép ảnh", "Photo menu. The filmstrip has the photo context menu too. Adding a file again that is in Recently Deleted no": "Menu Ảnh. Dải phim cũng có menu ngữ cảnh ảnh. Thêm lại tệp đang ở Đã xóa gần đây không", - "Photo ▸ Edit In ▸ Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Ảnh → Chỉnh trong → Chỉnh trong PhotoCraft (⇧⌘E, hoặc nhấp phải ảnh) kết xuất bản sao kèm chỉnh sửa, xếp chồng với bản gốc và mở trong PhotoCraft. Lưu ở đó thì bản sao cập nhật tại đây. Dạng PSD, PhotoCraft lưu thẳng lại. Để trống vị trí trừ khi dùng bản portable.", "Photo ▸ Edit in External Editor (⇧⌘E) renders a 16-bit TIFF copy, stacks it with the original and opens it here (an app name on macOS, a program path elsewhere).": "Ảnh → Chỉnh trong trình soạn ngoài (⇧⌘E) kết xuất bản sao TIFF 16 bit, xếp chồng với bản gốc và mở tại đây (tên app trên macOS, đường dẫn chương trình ở nơi khác).", "PhotoCraft": "PhotoCraft", "Photos": "Ảnh", @@ -2711,5 +2710,8 @@ "Top bar": "Thanh trên cùng", "Tool strip": "Thanh công cụ", "Bottom bar": "Thanh dưới cùng", - "Stopped at the scan limit: there may be more photos": "Đã dừng ở giới hạn quét: có thể còn ảnh khác" + "Stopped at the scan limit: there may be more photos": "Đã dừng ở giới hạn quét: có thể còn ảnh khác", + "Model installation failed": "Cài đặt mô hình thất bại", + "starting…": "đang khởi động…", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "Ảnh > Chỉnh trong > Chỉnh trong PhotoCraft (⇧⌘E, hoặc nhấp phải ảnh) kết xuất bản sao kèm chỉnh sửa, xếp chồng với bản gốc và mở trong PhotoCraft. Lưu ở đó thì bản sao cập nhật tại đây. Dạng PSD, PhotoCraft lưu thẳng lại. Để trống vị trí trừ khi dùng bản portable." } diff --git a/crates/ui-egui/locales/zh-hans.json b/crates/ui-egui/locales/zh-hans.json index ca13d782a5e..2a63e8b75bd 100644 --- a/crates/ui-egui/locales/zh-hans.json +++ b/crates/ui-egui/locales/zh-hans.json @@ -1723,7 +1723,7 @@ "Denoise Settings": "降噪设置", "Denoise all photos with an Amount": "对所有设置了数量的照片进行降噪", "Downloaded and checked. Installing…": "已下载并校验完成。正在安装…", - "The download failed": "下载失败。", + "The download failed": "下载失败", "Failed its last test": "上次检测未通过", "Graphics card": "显卡", "I have read these terms and accept them for my own use": "我已阅读这些条款,并为个人使用表示接受", @@ -1932,6 +1932,27 @@ "Not saved": "未保存", "A folder is being synchronized": "正在同步文件夹", "Wait for the import to finish": "请等待导入完成", + "Choose Profile…": "选择配置文件…", + "Edit in Other Editor (⌥⌘E) opens the copy in this application (an app name on macOS, a program path elsewhere).": "“在其他编辑器中编辑”(⌥⌘E)会在此应用程序中打开副本(macOS 上填应用名称,其他平台填程序路径)。", + "External Editing": "外部编辑", + "Found automatically": "自动查找", + "LUT-based": "基于 LUT", + "Matrix/TRC": "矩阵/TRC", + "Model installation failed": "模型安装失败", + "Monitor profile": "显示器配置文件", + "None (the display is treated as sRGB)": "无(将显示器视为 sRGB)", + "Other editor": "其他编辑器", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "“照片 > 在应用中编辑 > 在 PhotoCraft 中编辑”(⇧⌘E,或右键单击照片)会渲染一份包含编辑效果的副本,与原图堆叠并在 PhotoCraft 中打开。在 PhotoCraft 中保存后,此处的副本会随之更新。如果副本为 PSD,PhotoCraft 会直接保存回该文件。除非使用便携版,否则请将位置留空。", + "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.": "照片会通过显示器的 ICC 配置文件显示,因此在广色域和已校准的显示器上颜色准确,细节视图也会使用显示器的全部色域。直方图、预览缓存和导出不受影响。", + "Primaries (x, y)": "基色(x, y)", + "Profiles assigned in your desktop's colour settings are usually in ~/.local/share/icc.": "在桌面颜色设置中指定的配置文件通常位于 ~/.local/share/icc。", + "Use Screen Profile": "使用屏幕配置文件", + "Use sRGB": "使用 sRGB", + "starting…": "正在启动…", + "this screen's profile": "此屏幕的配置文件", + "Edit In": "在应用中编辑", + "Edit in PhotoCraft": "在 PhotoCraft 中编辑", + "Edit in Other Editor": "在其他编辑器中编辑", "Appearance": "外观", "Appearance Mode": "外观模式", "Sync with System": "与系统同步", diff --git a/crates/ui-egui/locales/zh-hant.json b/crates/ui-egui/locales/zh-hant.json index f3dfc422ec3..248b8db7fd6 100644 --- a/crates/ui-egui/locales/zh-hant.json +++ b/crates/ui-egui/locales/zh-hant.json @@ -1729,7 +1729,7 @@ "Denoise Settings": "Denoise Settings", "Denoise all photos with an Amount": "Denoise all photos with an Amount", "Downloaded and checked. Installing…": "Downloaded and checked. Installing…", - "The download failed": "下載失敗。", + "The download failed": "下載失敗", "Failed its last test": "Failed its last test", "Graphics card": "Graphics card", "I have read these terms and accept them for my own use": "I have read these terms and accept them for my own use", @@ -1938,6 +1938,28 @@ "Not saved": "未儲存", "A folder is being synchronized": "正在同步資料夾", "Wait for the import to finish": "請等待匯入完成", + "Choose Profile…": "選擇描述檔…", + "Edit in Other Editor (⌥⌘E) opens the copy in this application (an app name on macOS, a program path elsewhere).": "「在其他編輯器中編輯」(⌥⌘E)會在此應用程式中開啟副本(macOS 填應用程式名稱,其他平台填程式路徑)。", + "External Editing": "外部編輯", + "Faces": "臉部", + "Found automatically": "自動尋找", + "LUT-based": "以 LUT 為基礎", + "Matrix/TRC": "矩陣/TRC", + "Model installation failed": "模型安裝失敗", + "Monitor profile": "顯示器描述檔", + "None (the display is treated as sRGB)": "無(將螢幕視為 sRGB)", + "Other editor": "其他編輯器", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.": "「照片 > 在應用程式中編輯 > 在 PhotoCraft 中編輯」(⇧⌘E,或在照片上按右鍵)會算繪一份包含編輯效果的副本,與原始照片堆疊後在 PhotoCraft 中開啟。在 PhotoCraft 中儲存後,此處的副本會隨之更新。若副本為 PSD,PhotoCraft 會直接存回該檔案。除非使用可攜版,否則請將位置留空。", + "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.": "照片會透過顯示器的 ICC 描述檔顯示,因此在廣色域及已校正的螢幕上色彩正確,詳細檢視也會使用螢幕的完整色域。色階分佈圖、預覽快取與匯出不受影響。", + "Primaries (x, y)": "原色(x, y)", + "Profiles assigned in your desktop's colour settings are usually in ~/.local/share/icc.": "在桌面色彩設定中指定的描述檔通常位於 ~/.local/share/icc。", + "Use Screen Profile": "使用螢幕描述檔", + "Use sRGB": "使用 sRGB", + "starting…": "正在啟動…", + "this screen's profile": "此螢幕的描述檔", + "Edit In": "在應用程式中編輯", + "Edit in PhotoCraft": "在 PhotoCraft 中編輯", + "Edit in Other Editor": "在其他編輯器中編輯", "Appearance": "外觀", "Appearance Mode": "外觀模式", "Sync with System": "與系統同步", @@ -2266,7 +2288,6 @@ "Face Models": "人臉模型", "Face recognition": "人臉辨識", "Face Recognition On/Off": "人臉辨識 開啟/關閉", - "Faces": "人臉", "Faces of a Person": "某人的臉孔", "Faster exports and card imports, with the same protection for what can't be recreated (issue #134): exports,": "更快的匯出和記憶卡匯入,對無法重建的內容提供同等保護(問題 #134):匯出、", "fields in and keeps the rest — e.g. that application's develop settings and edit history — byte for byte. A": "欄位合入其中,其餘部分(如該應用程式的顯影設定和編輯歷史)則逐位元組保留。", diff --git a/crates/ui-egui/src/dialogs/faces.rs b/crates/ui-egui/src/dialogs/faces.rs index 032e6f08275..9345b899910 100644 --- a/crates/ui-egui/src/dialogs/faces.rs +++ b/crates/ui-egui/src/dialogs/faces.rs @@ -299,7 +299,7 @@ pub fn settings_tab(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens) { }); // what is wrong with the user's own catalog (catalog.json in the models folder), if anything for e in list["catalog"]["errors"].as_array().into_iter().flatten().filter_map(Value::as_str).take(3) { - ui.add(egui::Label::new(RichText::new(format!("catalog.json: {e}")).font(t.font(11.5)).color(t.caution)).wrap()); + ui.add(egui::Label::new(RichText::new(format!("catalog.json: {e}")).font(t.font(11.5)).color(t.legible(t.caution, t.chrome, 4.5))).wrap()); } if let Some(d) = all.iter().find(|m| m["role"] == "detector") { ui.add_space(4.0); diff --git a/crates/ui-egui/src/dialogs/settings.rs b/crates/ui-egui/src/dialogs/settings.rs index 900ee796ca5..849ebdce967 100644 --- a/crates/ui-egui/src/dialogs/settings.rs +++ b/crates/ui-egui/src/dialogs/settings.rs @@ -29,6 +29,8 @@ mod performance; mod slideshow; mod widgets; +#[cfg(test)] +pub(crate) use appearance::favorite_star_colour; pub use display::display_profile; pub(super) use display::view_options; use display::{display_tab, interface_tab}; @@ -37,7 +39,10 @@ use import::import_tab; pub(crate) use libraries::{can_switch_library, free_name}; pub use libraries::{forget_library, library_name, new_library, open_library, open_library_name, recent_libraries, remember_library}; use performance::performance_tab; +#[cfg(test)] +pub(crate) use performance::{gpu_line, smart_folder_default}; use slideshow::slideshow_tab; +use widgets::legible_controls; pub(crate) use widgets::{check, choices, heading, hint, row}; pub mod slide_layout; @@ -106,6 +111,11 @@ const PREVIEW_CHROME: f32 = 82.0; pub fn window(app: &mut LightcraftApp, ui: &mut egui::Ui, tab: &mut String, max_height: f32) { ui.set_width((ui.ctx().content_rect().width() - 64.0).clamp(240.0, PAGE_SIZE.x)); let top = ui.cursor().top(); + let t = Tokens::get(ui.ctx()); + // What says where a control is, and what a text box says while it is empty, are made legible + // here for everything in the window: a theme's border is 1.6 to 1.7:1 against the window and + // its weak text under 4.3:1 in a box (the tokens keep their values for the rest of the app). + legible_controls(ui, &t); // The page drawn is the one that was open when the frame began: a tab clicked now opens on // the next frame, so a text box on the page being left is drawn once more and saves what was // typed in it (the click took the focus from it). diff --git a/crates/ui-egui/src/dialogs/settings/appearance.rs b/crates/ui-egui/src/dialogs/settings/appearance.rs index 5f8f428d451..4e289305a27 100644 --- a/crates/ui-egui/src/dialogs/settings/appearance.rs +++ b/crates/ui-egui/src/dialogs/settings/appearance.rs @@ -50,7 +50,7 @@ fn theme_card(ui: &mut egui::Ui, t: &Tokens, card: ThemeCar let ThemeCard { title, active, options, width } = card; egui::Frame::new() .fill(t.inset) - .stroke(egui::Stroke::new(1.0, if active { t.accent } else { t.field_border })) + .stroke(egui::Stroke::new(1.0, if active { t.legible(t.accent, t.chrome, 3.0) } else { t.field_border })) .corner_radius(6) .inner_margin(8) .show(ui, |ui| { @@ -60,7 +60,7 @@ fn theme_card(ui: &mut egui::Ui, t: &Tokens, card: ThemeCar ui.horizontal(|ui| { ui.label(RichText::new(crate::i18n::tr(title)).font(t.semibold(12.0)).color(t.text)); if active { - ui.label(RichText::new(crate::i18n::tr("In Use")).size(11.0).color(t.accent)); + ui.label(RichText::new(crate::i18n::tr("In Use")).size(11.0).color(t.legible(t.accent, t.inset, 4.5))); } }); let shown = options.iter().find(|(v, _)| v == value).or(options.first()).map(|(_, k)| *k).unwrap_or_default(); @@ -89,7 +89,7 @@ fn theme_card(ui: &mut egui::Ui, t: &Tokens, card: ThemeCar }); register(ui, format!("button:themeFavorite-{}", kind.id()), r.rect); if favorite || hovered { - crate::rating::paint_star(ui.painter(), r.rect.shrink(4.0), favorite, if favorite { t.accent } else { t.text_dim }); + crate::rating::paint_star(ui.painter(), r.rect.shrink(4.0), favorite, favorite_star_colour(t, favorite)); } if r.clicked() { if favorite { @@ -105,6 +105,12 @@ fn theme_card(ui: &mut egui::Ui, t: &Tokens, card: ThemeCar }); } +/// The star that marks a favourite theme (or offers to), a mark that says what a click does: it +/// stands 3:1 against the card it is on. +pub(crate) fn favorite_star_colour(t: &Tokens, favorite: bool) -> egui::Color32 { + t.legible(if favorite { t.accent } else { t.text_dim }, t.inset, 3.0) +} + /// A small LightCraft window painted with `kind`'s tokens: the top bar with its search field, the /// photo with the filmstrip under it, the Edit panel (histogram and sliders), the tool strip and /// the bottom bar. diff --git a/crates/ui-egui/src/dialogs/settings/display.rs b/crates/ui-egui/src/dialogs/settings/display.rs index a5b1974d21c..6e5db726753 100644 --- a/crates/ui-egui/src/dialogs/settings/display.rs +++ b/crates/ui-egui/src/dialogs/settings/display.rs @@ -41,13 +41,13 @@ pub(super) fn display_tab(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens } }); if let Some(e) = &app.display_error { - ui.label(RichText::new(e).size(11.0).color(t.reject)); + ui.label(RichText::new(e).size(11.0).color(t.legible(t.reject, t.chrome, 4.5))); } if let Some(d) = ¤t { let info = d.describe(); if !screen { row(ui, t, crate::i18n::tr("File"), |ui| { - path_label(ui, "settingsDisplayFile", &d.path, egui::FontId::proportional(11.0), t.text_dim, 0.0); + path_label(ui, "settingsDisplayFile", &d.path, egui::FontId::proportional(11.0), t.legible(t.text_dim, t.chrome, 4.5), 0.0); }); } row(ui, t, crate::i18n::tr("Type"), |ui| { @@ -61,7 +61,7 @@ pub(super) fn display_tab(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens let p = &info["primaries"]; let xy = |(k, l): (&str, &str)| format!("{l} {:.3}, {:.3}", p[k][0].as_f64().unwrap_or(0.0), p[k][1].as_f64().unwrap_or(0.0)); let text = [("red", "R"), ("green", "G"), ("blue", "B")].map(xy).join(" "); - ui.label(RichText::new(text).size(11.0).color(t.text_dim)); + ui.label(RichText::new(text).size(11.0).color(t.legible(t.text_dim, t.chrome, 4.5))); }); } hint( diff --git a/crates/ui-egui/src/dialogs/settings/general.rs b/crates/ui-egui/src/dialogs/settings/general.rs index 1231e9d3b75..76c20c2fac5 100644 --- a/crates/ui-egui/src/dialogs/settings/general.rs +++ b/crates/ui-egui/src/dialogs/settings/general.rs @@ -89,7 +89,7 @@ pub(super) fn general_tab(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens ui, t, crate::i18n::tr( - "Photo ▸ Edit In ▸ Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.", ), ); row(ui, t, crate::i18n::tr("Other editor"), |ui| { diff --git a/crates/ui-egui/src/dialogs/settings/performance.rs b/crates/ui-egui/src/dialogs/settings/performance.rs index 4fe223f696d..4850871552a 100644 --- a/crates/ui-egui/src/dialogs/settings/performance.rs +++ b/crates/ui-egui/src/dialogs/settings/performance.rs @@ -7,6 +7,11 @@ use super::{ // --------------------------------------------------------------------------------- Performance +/// "GPU: ", or "GPU: starting…" (in the language shown) while the adapter is not known yet. +pub(crate) fn gpu_line(adapter: Option) -> String { + format!("GPU: {}", adapter.unwrap_or_else(|| crate::i18n::tr("starting…").to_string())) +} + pub(super) fn performance_tab(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens) { use lightcraft_engine::gpu; heading(ui, t, crate::i18n::tr("Rendering")); @@ -27,12 +32,13 @@ pub(super) fn performance_tab(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &To None => "No usable GPU found: rendering on the CPU".to_string(), } } else { - format!("GPU: {}", gpu::adapter_name().unwrap_or_else(|| "starting…".into())) + gpu_line(gpu::adapter_name()) }; // One line, the whole text on hover: the reason can be a long driver message (no adapter // among the backends …), and the GPU state is process-wide, so it may change between frames; // a hint that wrapped would move every control below it under the pointer. - ui.add(egui::Label::new(RichText::new(crate::i18n::tr(&status)).size(11.0).color(t.text_dim)).truncate()).on_hover_text(&status); + ui.add(egui::Label::new(RichText::new(crate::i18n::tr(&status)).size(11.0).color(t.legible(t.text_dim, t.chrome, 4.5))).truncate()) + .on_hover_text(&status); row(ui, t, crate::i18n::tr("Preview size"), |ui| { let opts: Vec<(u32, String)> = PREVIEW_LIMITS.iter().map(|e| (*e, if *e == 0 { crate::i18n::tr("Automatic").to_string() } else { format!("{e} px") })).collect(); @@ -208,6 +214,14 @@ fn background_prep(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens) { } } +/// What the smart previews row says after the path of a folder the library was not given: "(library +/// default)", in the language shown. (The catalogs have that message with the two spaces that +/// follow a path.) +#[cfg(not(target_arch = "wasm32"))] +pub(crate) fn smart_folder_default() -> String { + crate::i18n::tr(" (library default)").trim().to_string() +} + /// Where this library keeps its smart previews (the offline-editing proxies, which can be large): /// the effective folder, what is in it, and choosing another one. #[cfg(not(target_arch = "wasm32"))] @@ -231,16 +245,17 @@ fn smart_previews(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens) { let available = loc["available"].as_bool().unwrap_or(true); let custom = loc["custom"].as_bool().unwrap_or(false); row(ui, t, crate::i18n::tr("Folder"), |ui| { + let default = smart_folder_default(); path_label( ui, "settingsSmartFolder", &path, egui::TextStyle::Body.resolve(ui.style()), - if available { t.text } else { t.reject }, - if custom { 0.0 } else { label_width(ui, "(library default)", egui::TextStyle::Body) }, + if available { t.text } else { t.legible(t.reject, t.chrome, 4.5) }, + if custom { 0.0 } else { label_width(ui, &default, egui::TextStyle::Body) }, ); if !custom { - let r = ui.label(RichText::new("(library default)").color(t.text)); + let r = ui.label(RichText::new(default).color(t.text)); register(ui, "text:settingsSmartDefault", r.rect); } }); diff --git a/crates/ui-egui/src/dialogs/settings/widgets.rs b/crates/ui-egui/src/dialogs/settings/widgets.rs index afd66068ea5..4d1965f8ff5 100644 --- a/crates/ui-egui/src/dialogs/settings/widgets.rs +++ b/crates/ui-egui/src/dialogs/settings/widgets.rs @@ -83,8 +83,23 @@ pub(crate) fn row(ui: &mut egui::Ui, t: &Tokens, label: &str, add: impl FnOnc .inner } +/// What says where a control is, and what a text box says while it is empty, made legible for +/// everything drawn in `ui` from here on: the border of a button, checkbox, radio button, list or +/// text box stands 3:1 against the window and against a theme card's fill, a text box in use is +/// outlined in an accent that does too, and placeholder text stands 4.5:1 in its box. +pub(super) fn legible_controls(ui: &mut egui::Ui, t: &Tokens) { + // (a little over 3:1 as a colour: a radio button's ring is one antialiased pixel wide, and + // what is drawn of it is fainter than the colour it is drawn in) + let border = t.legible(t.legible(t.button_border, t.chrome, 3.0), t.inset, 3.6); + let visuals = ui.visuals_mut(); + visuals.widgets.inactive.bg_stroke.color = border; + visuals.selection.stroke.color = t.legible(t.accent, t.chrome, 3.0); + visuals.weak_text_color = Some(t.legible(t.text_dim, t.field, 4.5)); +} + pub(crate) fn hint(ui: &mut egui::Ui, t: &Tokens, text: &str) { - ui.label(RichText::new(crate::i18n::tr(text)).size(11.0).color(t.text_dim)); + // (an explanation is small text: the dim colour where it reads, else as near it as reads) + ui.label(RichText::new(crate::i18n::tr(text)).size(11.0).color(t.legible(t.text_dim, t.chrome, 4.5))); } /// A checkbox addressable as `check:{id}`; true when toggled. diff --git a/crates/ui-egui/src/panels/denoise.rs b/crates/ui-egui/src/panels/denoise.rs index c9eb0bfa5d2..128c6190500 100644 --- a/crates/ui-egui/src/panels/denoise.rs +++ b/crates/ui-egui/src/panels/denoise.rs @@ -460,25 +460,23 @@ fn model_row(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens, m: &Value, ui.label(RichText::new(m["name"].as_str().unwrap_or("")).color(t.text)); let size = mb(m["sizeBytes"].as_u64()); if !size.is_empty() { - ui.label(RichText::new(size).color(t.text_dim)); + ui.label(RichText::new(size).color(t.legible(t.text_dim, t.chrome, 4.5))); } if selected { - ui.label(RichText::new(tr("in use")).color(t.accent)); + ui.label(RichText::new(tr("in use")).color(t.legible(t.accent, t.chrome, 4.5))); } else if installed { - ui.label(RichText::new(tr("installed")).color(t.text_dim)); + ui.label(RichText::new(tr("installed")).color(t.legible(t.text_dim, t.chrome, 4.5))); } }); - ui.label(RichText::new(licence_line(m)).font(t.font(11.5)).color(if m["licence"]["commercial"] == "yes" { - t.text_dim - } else { - t.caution - })); + ui.label(RichText::new(licence_line(m)).font(t.font(11.5)).color(licence_colour(t, m, t.text_dim))); match m["accepted"]["selfTest"].as_object() { Some(test) if test.get("ok").and_then(Value::as_bool) == Some(true) => { - ui.label(RichText::new(tr("Tested and works on this computer")).font(t.font(11.5)).color(t.text_dim)); + ui.label( + RichText::new(tr("Tested and works on this computer")).font(t.font(11.5)).color(t.legible(t.text_dim, t.chrome, 4.5)), + ); } Some(_) => { - ui.label(RichText::new(tr("Failed its last test")).font(t.font(11.5)).color(t.caution)); + ui.label(RichText::new(tr("Failed its last test")).font(t.font(11.5)).color(t.legible(t.caution, t.chrome, 4.5))); } None => {} } @@ -499,12 +497,16 @@ fn model_row(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens, m: &Value, (Some("done" | "installing"), _) => { ui.horizontal(|ui| { crate::progress::spinner(ui, 12.0); - ui.label(RichText::new(tr("Downloaded and checked. Installing…")).font(t.font(11.5)).color(t.text_dim)); + ui.label( + RichText::new(tr("Downloaded and checked. Installing…")) + .font(t.font(11.5)) + .color(t.legible(t.text_dim, t.chrome, 4.5)), + ); }); } (Some("failed"), Some(d)) => { let why = download_failure(d); - ui.add(egui::Label::new(RichText::new(why).font(t.font(11.5)).color(t.caution)).wrap()); + ui.add(egui::Label::new(RichText::new(why).font(t.font(11.5)).color(t.legible(t.caution, t.chrome, 4.5))).wrap()); } _ => {} } @@ -673,6 +675,13 @@ pub(super) fn sentence(s: &str) -> String { out } +/// The colour of a model's licence line, made legible on the window's surface: `plain` when +/// commercial use is allowed, the caution colour when it is not or unknown. +pub(crate) fn licence_colour(t: &Tokens, m: &Value, plain: egui::Color32) -> egui::Color32 { + let colour = if m["licence"]["commercial"].as_str() == Some("yes") { plain } else { t.caution }; + t.legible(colour, t.chrome, 4.5) +} + pub(super) fn licence_line(m: &Value) -> String { let name = m["licence"]["name"].as_str().filter(|s| !s.is_empty()).unwrap_or("Unknown licence"); let terms = match m["licence"]["commercial"].as_str() { @@ -697,7 +706,7 @@ pub fn model_dialog(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens, info let kind = info["kind"].as_str().unwrap_or("unsupported"); let file = info["fileName"].as_str().unwrap_or(""); if kind == "unsupported" { - ui.label(RichText::new(tr("This file cannot be used yet")).font(t.semibold(13.5)).color(t.caution)); + ui.label(RichText::new(tr("This file cannot be used yet")).font(t.semibold(13.5)).color(t.legible(t.caution, t.chrome, 4.5))); ui.add( egui::Label::new( RichText::new(sentence(tr(info["reason"].as_str().unwrap_or("It is not a denoise model LightCraft understands")))) @@ -705,16 +714,19 @@ pub fn model_dialog(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens, info ) .wrap(), ); - ui.label(RichText::new(tr_format!("{file} · {size}", file = file, size = mb(info["sizeBytes"].as_u64()))).color(t.text_dim)); + ui.label( + RichText::new(tr_format!("{file} · {size}", file = file, size = mb(info["sizeBytes"].as_u64()))) + .color(t.legible(t.text_dim, t.chrome, 4.5)), + ); return; } let m = &info["model"]; ui.horizontal(|ui| { ui.label(RichText::new(m["name"].as_str().unwrap_or(file)).font(t.semibold(14.0)).color(t.text)); - ui.label(RichText::new(mb(info["sizeBytes"].as_u64())).color(t.text_dim)); + ui.label(RichText::new(mb(info["sizeBytes"].as_u64())).color(t.legible(t.text_dim, t.chrome, 4.5))); }); if info["alreadyInstalled"] == true { - ui.label(RichText::new(tr("Already installed. Remove it before installing a replacement.")).color(t.text_dim)); + ui.label(RichText::new(tr("Already installed. Remove it before installing a replacement.")).color(t.legible(t.text_dim, t.chrome, 4.5))); } let download = info["download"].is_string(); if download { @@ -732,21 +744,30 @@ pub fn model_dialog(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens, info .wrap(), ); } - let commercial = m["licence"]["commercial"].as_str().unwrap_or("unknown"); - ui.label(RichText::new(licence_line(m)).font(t.semibold(12.5)).color(if commercial == "yes" { t.text } else { t.caution })); + ui.label(RichText::new(licence_line(m)).font(t.semibold(12.5)).color(licence_colour(t, m, t.text))); let notice = m["licence"]["notice"].as_str().unwrap_or(""); if !notice.is_empty() { ui.add(egui::Label::new(RichText::new(notice).color(t.text_label)).wrap()); } let provenance = m["provenance"].as_str().unwrap_or(""); if !provenance.is_empty() { - ui.add(egui::Label::new(RichText::new(tr_format!("Trained on: {provenance}", provenance = provenance)).color(t.text_dim)).wrap()); + ui.add( + egui::Label::new( + RichText::new(tr_format!("Trained on: {provenance}", provenance = provenance)).color(t.legible(t.text_dim, t.chrome, 4.5)), + ) + .wrap(), + ); } if kind == "draft" { ui.add_space(2.0); ui.label(RichText::new(tr("LightCraft does not know this model, so it assumed:")).color(t.text_label)); for a in info["assumptions"].as_array().into_iter().flatten().filter_map(Value::as_str) { - ui.add(egui::Label::new(RichText::new(tr_format!("• {assumption}", assumption = tr(a))).font(t.font(12.0)).color(t.text_dim)).wrap()); + ui.add( + egui::Label::new( + RichText::new(tr_format!("• {assumption}", assumption = tr(a))).font(t.font(12.0)).color(t.legible(t.text_dim, t.chrome, 4.5)), + ) + .wrap(), + ); } } if let Some(url) = m["source"].as_str().or(m["licence"]["url"].as_str()) { @@ -763,7 +784,7 @@ pub fn model_dialog(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens, info } else { "The model is kept on this computer only. LightCraft never uploads or shares it." }; - ui.label(RichText::new(tr(closing)).font(t.font(11.5)).color(t.text_dim)); + ui.label(RichText::new(tr(closing)).font(t.font(11.5)).color(t.legible(t.text_dim, t.chrome, 4.5))); } #[cfg(test)] diff --git a/crates/ui-egui/src/tests.rs b/crates/ui-egui/src/tests.rs index f801ee843f2..eb95de14d99 100644 --- a/crates/ui-egui/src/tests.rs +++ b/crates/ui-egui/src/tests.rs @@ -21,6 +21,7 @@ mod dialog_copy; mod dialog_fit; mod dialog_primary; mod dialog_settings; +mod dialog_settings_contrast; mod dialog_settings_text; mod dialog_tab; mod dialogs; diff --git a/crates/ui-egui/src/tests/dialog_settings_contrast.rs b/crates/ui-egui/src/tests/dialog_settings_contrast.rs new file mode 100644 index 00000000000..17c7f33ed4f --- /dev/null +++ b/crates/ui-egui/src/tests/dialog_settings_contrast.rs @@ -0,0 +1,291 @@ +//! What Settings says and marks can be read in every theme: its explanations, placeholders, +//! cautions and the accent used as text stand 4.5:1 against what they are on, and the lines that +//! say where a control is stand 3:1. No text in it uses a character the interface +//! font lacks. +//! +//! Before: explanations were 4.20:1 in Charcoal and 4.33:1 in Silver, "In Use" 2.9:1 in Charcoal, +//! placeholders under 4.3:1 in every theme, the borders of text boxes and checkboxes 1.6 to 1.7:1; +//! and the hint under External Editing drew two empty +//! boxes where its menu path had arrows. + +use std::time::Duration; + +use egui::Color32; +use serde_json::json; + +use crate::dialogs::settings::TABS; +use crate::headless::Headless; +use crate::theme::{ThemeKind, Tokens}; +use crate::{LightcraftApp, Services}; + +const T: Duration = Duration::from_secs(20); + +fn demo(kind: ThemeKind) -> Headless { + let mut h = Headless::new(LightcraftApp::new(lightcraft_engine::Session::with_demo(), Services::default()), [1200.0, 1000.0], 1.0); + // let the first renders finish (a render still running at exit can crash in GPU teardown) + h.settle(T); + let r = h.request("engine.execute", json!({"command": "view.theme", "params": {"theme": kind.id()}}), T); + assert_eq!(r["ok"], true, "{r}"); + h +} + +fn show(h: &mut Headless, tab: &str) { + let r = h.request("engine.execute", json!({"command": "app.settings", "params": {"tab": tab}}), T); + assert_eq!(r["ok"], true, "app.settings {tab}: {r}"); + h.settle(T); + for _ in 0..4 { + h.step(); + } + // (the pointer away from the window: nothing is hovered) + h.request("ui.move", json!({"x": 3.0, "y": 3.0}), T); + h.step(); + h.step(); +} + +fn rect(h: &Headless, id: &str) -> egui::Rect { + h.app.widgets.iter().find(|(w, _)| w == id).map(|(_, r)| *r).unwrap_or_else(|| panic!("no widget {id}")) +} + +/// WCAG contrast of two opaque colours. +fn contrast(a: Color32, b: Color32) -> f32 { + let lum = |c: Color32| { + let lin = |v: u8| { + let v = f32::from(v) / 255.0; + if v <= 0.04045 { v / 12.92 } else { ((v + 0.055) / 1.055).powf(2.4) } + }; + 0.2126 * lin(c.r()) + 0.7152 * lin(c.g()) + 0.0722 * lin(c.b()) + }; + let (a, b) = (lum(a), lum(b)); + (a.max(b) + 0.05) / (a.min(b) + 0.05) +} + +/// The colour a piece of text is drawn in: the first text shape that has `part`. +fn text_colour(h: &Headless, part: &str) -> Color32 { + fn find(shape: &egui::Shape, part: &str) -> Option { + match shape { + egui::Shape::Text(text) if text.galley.job.text.contains(part) => { + let own = text.galley.job.sections.first().map(|s| s.format.color).filter(|c| *c != Color32::PLACEHOLDER); + Some(text.override_text_color.or(own).unwrap_or(text.fallback_color)) + } + egui::Shape::Vec(shapes) => shapes.iter().find_map(|shape| find(shape, part)), + _ => None, + } + } + h.view.painted_shapes().iter().find_map(|shape| find(shape, part)).unwrap_or_else(|| panic!("no text with {part:?} is drawn")) +} + +/// The most any pixel of `rect` stands out from `ground` (one pixel per point here). +fn strongest(image: &egui::ColorImage, rect: egui::Rect, ground: Color32) -> f32 { + let [w, h] = image.size; + let (x0, x1) = (rect.left().floor().max(0.0) as usize, (rect.right().ceil().max(0.0) as usize).min(w)); + let (y0, y1) = (rect.top().floor().max(0.0) as usize, (rect.bottom().ceil().max(0.0) as usize).min(h)); + (y0..y1).flat_map(|y| (x0..x1).map(move |x| (x, y))).map(|(x, y)| contrast(image.pixels[y * w + x], ground)).fold(1.0, f32::max) +} + +#[test] +fn a_colour_is_made_legible_only_where_it_is_not() { + for kind in ThemeKind::ALL { + let t = Tokens::for_kind(kind); + // Given the colours Settings writes and marks in, on the surfaces it puts them on + for (what, colour, on, ratio) in [ + ("an explanation", t.text_dim, t.chrome, 4.5), + ("a caution", t.caution, t.chrome, 4.5), + ("a refusal", t.reject, t.chrome, 4.5), + ("the accent as text on a card", t.accent, t.inset, 4.5), + ("a placeholder", t.text_dim, t.field, 4.5), + ("a control's border", t.button_border, t.chrome, 3.0), + ] { + // Then the legible one stands the ratio asked for + let legible = t.legible(colour, on, ratio); + assert!(contrast(legible, on) >= ratio, "{kind:?}: {what} is {:.2}:1, wants {ratio}", contrast(legible, on)); + // And a colour that stood it already is left as it is + if contrast(colour, on) >= ratio { + assert_eq!(legible, colour, "{kind:?}: {what} was legible and is unchanged"); + } + } + // And even the surface's own colour is brought to stand on it + assert!(contrast(t.legible(t.chrome, t.chrome, 4.5), t.chrome) >= 4.5); + } + // (a ratio nothing can reach, or one that is not a number, ends at the text colour too) + let t = Tokens::for_kind(ThemeKind::Charcoal); + assert_eq!(t.legible(t.text_dim, t.chrome, 99.0), t.text); + assert_eq!(t.legible(t.text_dim, t.chrome, f32::NAN), t.text); +} + +#[test] +fn explanations_placeholders_and_the_accent_as_text_can_be_read_in_every_theme() { + for kind in ThemeKind::ALL { + let mut h = demo(kind); + let t = Tokens::for_kind(kind); + // An explanation under a setting + show(&mut h, "performance"); + let hint = text_colour(&h, "Choose a size to cap"); + assert!(contrast(hint, t.chrome) >= 4.5, "{kind:?}: an explanation is {:.2}:1", contrast(hint, t.chrome)); + // A text box's placeholder, on the box it is in (General, PhotoCraft's location) + show(&mut h, "general"); + let placeholder = text_colour(&h, "Found automatically"); + assert!(contrast(placeholder, t.field) >= 4.5, "{kind:?}: a placeholder is {:.2}:1", contrast(placeholder, t.field)); + // The line that says which GPU renders, under the Rendering setting + show(&mut h, "performance"); + let gpu = h.painted_text().into_iter().find(|text| text.starts_with("GPU:") || text.contains("CPU")).expect("a GPU status line"); + let gpu = text_colour(&h, &gpu); + assert!(contrast(gpu, t.chrome) >= 4.5, "{kind:?}: the GPU line is {:.2}:1", contrast(gpu, t.chrome)); + // "In Use" on the card of the theme that is shown + show(&mut h, "interface"); + let in_use = text_colour(&h, "In Use"); + assert!(contrast(in_use, t.inset) >= 4.5, "{kind:?}: In Use is {:.2}:1", contrast(in_use, t.inset)); + } +} + +#[test] +fn the_lines_that_say_where_a_control_is_stand_out_in_every_theme() { + for kind in ThemeKind::ALL { + let mut h = demo(kind); + let t = Tokens::for_kind(kind); + // A text box's border: the top edge of General's "Other editor" + show(&mut h, "general"); + let image = h.paint(); + let field = rect(&h, "field:externalEditor"); + let edge = + egui::Rect::from_min_max(egui::pos2(field.center().x - 20.0, field.top() - 1.0), egui::pos2(field.center().x + 20.0, field.top() + 2.0)); + assert!(strongest(&image, edge, t.chrome) >= 3.0, "{kind:?}: a text box's border is {:.2}:1", strongest(&image, edge, t.chrome)); + // A button's border: the top edge of Performance's "Clear Cache" + show(&mut h, "performance"); + let image = h.paint(); + let button = rect(&h, "button:settingsClearCache"); + let edge = egui::Rect::from_min_max( + egui::pos2(button.center().x - 20.0, button.top() - 1.0), + egui::pos2(button.center().x + 20.0, button.top() + 2.0), + ); + assert!(strongest(&image, edge, t.chrome) >= 3.0, "{kind:?}: a button's border is {:.2}:1", strongest(&image, edge, t.chrome)); + // A checkbox's border: the left edge of its box (unticked: the GPU is off here) + show(&mut h, "performance"); + let image = h.paint(); + let check = rect(&h, "check:settings.gpu"); + let side = + egui::Rect::from_min_max(egui::pos2(check.left() - 1.0, check.center().y - 2.0), egui::pos2(check.left() + 5.0, check.center().y + 2.0)); + assert!(strongest(&image, side, t.chrome) >= 3.0, "{kind:?}: a checkbox's border is {:.2}:1", strongest(&image, side, t.chrome)); + // A radio button on a theme's card, which is on the card's own fill: the one not chosen + show(&mut h, "interface"); + let image = h.paint(); + let other = if kind == ThemeKind::Midnight { "radio:theme-charcoal" } else { "radio:theme-midnight" }; + let radio = rect(&h, other); + let ring = + egui::Rect::from_min_max(egui::pos2(radio.left() - 1.0, radio.center().y - 2.0), egui::pos2(radio.left() + 4.0, radio.center().y + 2.0)); + assert!(strongest(&image, ring, t.inset) >= 3.0, "{kind:?}: a radio button on a card is {:.2}:1", strongest(&image, ring, t.inset)); + } +} + +#[test] +fn no_text_in_settings_uses_a_character_the_font_lacks() { + let mut h = demo(ThemeKind::Charcoal); + for (tab, _) in TABS { + show(&mut h, tab); + // (▸ has no glyph in the interface's fonts: it draws as an empty box) + for text in h.painted_text() { + assert!(!text.contains('▸'), "{tab}: {text:?} has an arrow the font cannot draw"); + } + } +} + +/// What Settings says that no language had a word for: every catalog has each of these now (these +/// 20, and the three menu items the hint names, which the last test below checks). +const ONCE_UNTRANSLATED: [&str; 20] = [ + "Choose Profile…", + "Edit in Other Editor (⌥⌘E) opens the copy in this application (an app name on macOS, a program path elsewhere).", + "External Editing", + "Found automatically", + "LUT-based", + "Matrix/TRC", + "Model installation failed", + "Monitor profile", + "None (the display is treated as sRGB)", + "Other editor", + "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.", + "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.", + "Primaries (x, y)", + "Profiles assigned in your desktop's colour settings are usually in ~/.local/share/icc.", + "The download failed", + "Use Screen Profile", + "Use sRGB", + "starting…", + "this screen's profile", + "Faces", +]; + +#[test] +fn every_language_has_the_sentences_settings_was_missing() { + use crate::i18n::Locale; + for language in Locale::ALL.iter().copied().filter(|language| *language != Locale::En) { + for source in ONCE_UNTRANSLATED { + let said = language.tr(source); + // (German, Georgian, Indonesian and Vietnamese say Matrix as English does, and TRC is TRC everywhere) + let same_word = source == "Matrix/TRC" && matches!(language, Locale::De | Locale::Id | Locale::Ka | Locale::Vi); + assert!(said != source || same_word, "{}: {source:?} is still in English", language.code()); + assert!(!said.trim().is_empty() && !said.contains('▸'), "{}: {source:?} -> {said:?}", language.code()); + } + } +} + +#[test] +fn the_sentences_settings_was_missing_are_the_ones_it_says() { + // (a sentence reworded in the code and not here would leave its translations orphaned) + let sources = [include_str!("panels/settings.rs"), include_str!("panels/denoise.rs"), include_str!("panels/faces.rs")].concat(); + for source in ONCE_UNTRANSLATED { + let literal = format!("{source:?}"); + assert!(sources.contains(&literal), "{source:?} is no longer said by Settings as written here"); + } +} + +#[test] +fn the_menu_path_a_hint_gives_is_the_one_the_menus_show() { + use crate::i18n::Locale; + // (the hint under External Editing says where the command is: in each language it names the + // menu items as that language's menus do) + let hint = ONCE_UNTRANSLATED.iter().find(|source| source.starts_with("Photo > Edit In > Edit in PhotoCraft")).unwrap(); + for language in Locale::ALL.iter().copied().filter(|language| *language != Locale::En) { + let said = language.tr(hint); + for item in ["Edit In", "Edit in PhotoCraft"] { + let name = language.tr(item); + assert!(name != item, "{}: the menu item {item:?} has no translation", language.code()); + assert!(said.contains(name), "{}: the hint does not name {name:?}: {said:?}", language.code()); + } + } +} + +#[test] +fn a_models_licence_line_and_a_favourite_star_can_be_read_in_every_theme() { + use crate::dialogs::settings::favorite_star_colour; + use crate::panels::denoise::licence_colour; + for kind in ThemeKind::ALL { + let t = Tokens::for_kind(kind); + // A licence that forbids commercial use, or says nothing, is cautioned; one that allows it is plain + for (commercial, plain) in [("no", t.text_dim), ("unknown", t.text_dim), ("yes", t.text_dim), ("yes", t.text)] { + let colour = licence_colour(&t, &json!({"licence": {"commercial": commercial}}), plain); + assert!(contrast(colour, t.chrome) >= 4.5, "{kind:?}: a {commercial} licence line is {:.2}:1", contrast(colour, t.chrome)); + } + // The star on a theme card, filled or offered, is a mark that stands 3:1 against the card + for favorite in [true, false] { + let star = favorite_star_colour(&t, favorite); + assert!(contrast(star, t.inset) >= 3.0, "{kind:?}: a star (favourite: {favorite}) is {:.2}:1", contrast(star, t.inset)); + } + } +} + +#[test] +fn the_gpu_line_and_the_smart_previews_folder_go_through_translation() { + use crate::dialogs::settings::{gpu_line, smart_folder_default}; + use crate::i18n::{Locale, set_language}; + for language in Locale::ALL.iter().copied().filter(|language| *language != Locale::En) { + set_language(language); + let starting = gpu_line(None); + assert_eq!(starting, format!("GPU: {}", language.tr("starting…")), "{}", language.code()); + assert_ne!(starting, "GPU: starting…", "{}: still English", language.code()); + let shown = smart_folder_default(); + assert_eq!(shown, language.tr(" (library default)").trim(), "{}", language.code()); + assert_ne!(shown, "(library default)", "{}: still English", language.code()); + } + set_language(Locale::En); + assert_eq!(gpu_line(Some("Apple M2".into())), "GPU: Apple M2"); + assert_eq!(smart_folder_default(), "(library default)"); +} diff --git a/crates/ui-egui/src/theme.rs b/crates/ui-egui/src/theme.rs index de2be96a6c1..e43c22d884a 100644 --- a/crates/ui-egui/src/theme.rs +++ b/crates/ui-egui/src/theme.rs @@ -407,6 +407,32 @@ fn theme_id() -> egui::Id { egui::Id::unique("lightcraft-theme") } +impl Tokens { + /// `color` as it is where it stands `ratio`:1 or more against `on`, as WCAG measures it (4.5 + /// for text, 3 for a line or a mark that says where something is); else moved toward the text + /// colour, which stands furthest from every surface, in small steps until it does, and the + /// text colour itself when nothing on the way does (or `ratio` is no number). + /// + /// For text and marks drawn in a token chosen for its hue or its quietness (the dim text, the + /// accent, the caution and reject colours, a border) on a surface where a theme's value for it + /// is too close to read: the token keeps its value for everything else that uses it. + pub fn legible(&self, color: Color32, on: Color32, ratio: f32) -> Color32 { + fn luminance(c: Color32) -> f32 { + let linear = |v: u8| { + let v = f32::from(v) / 255.0; + if v <= 0.04045 { v / 12.92 } else { ((v + 0.055) / 1.055).powf(2.4) } + }; + 0.2126 * linear(c.r()) + 0.7152 * linear(c.g()) + 0.0722 * linear(c.b()) + } + let stands = |c: Color32| { + let (a, b) = (luminance(c), luminance(on)); + (a.max(b) + 0.05) / (a.min(b) + 0.05) >= ratio + }; + const STEPS: u8 = 32; + (0..STEPS).map(|step| color.lerp_to_gamma(self.text, f32::from(step) / f32::from(STEPS))).find(|c| stands(*c)).unwrap_or(self.text) + } +} + /// The theme `ctx` is styled with (none before the first [`apply_kind`]). pub fn current(ctx: &egui::Context) -> Option { ctx.data(|d| d.get_temp::(theme_id())) diff --git a/docs/whats-new.md b/docs/whats-new.md index c0b75f74c62..e7a704c3452 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -514,6 +514,21 @@ are redrawn; the camera's own embedded preview, shown for an unedited raw until its render is ready, is unchanged. +### Settings text can be read in every theme + +- What Settings says can be read in every theme. Its explanations, the text a box shows while it is empty, "In Use" + on a theme's card and the lines that warn or refuse now stand at least 4.5:1 against what they are on (the + explanations were 4.2:1 in Charcoal and 4.3:1 in Silver, "In Use" 2.9:1 in Charcoal); the borders of text boxes, + checkboxes, radio buttons and buttons stand 3:1, where they were 1.6 to 1.7:1. The AI Denoise page's own lines, + the GPU line under Rendering and the star that marks a favourite theme are read the same way. The colours of the rest of + LightCraft are as they were. +- The hint under External Editing drew two empty boxes where its menu path had arrows; it reads "Photo > Edit In > + Edit in PhotoCraft" now. +- Photo ▸ Edit In, Edit in PhotoCraft and Edit in Other Editor have names in all seventeen languages, the ones the + hint under External Editing gives. +- Sentences and names in Settings that some languages had no word for (External Editing and its hints, the + Monitor tab, the model installation messages) are in every language now. "(library default)" and "starting…" are + translated too. ### Tab leaves the name field in New Album, New Smart Album and the name prompts - In New Album, New Smart Album, Save Metadata Preset and the other dialogs with one name field, the field has the keyboard focus when the dialog opens, and Tab now moves on to the check box, Cancel and OK (Shift+Tab goes back). From 13760fee57c19dead0fbfad69d7b0efe208cb69a Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Thu, 22 Oct 2026 02:34:31 -0400 Subject: [PATCH 2/9] LR-PREF-GENERAL: a text box in use is outlined test reaches the fix --- .../src/tests/dialog_settings_contrast.rs | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/crates/ui-egui/src/tests/dialog_settings_contrast.rs b/crates/ui-egui/src/tests/dialog_settings_contrast.rs index 17c7f33ed4f..6b4d17acdc7 100644 --- a/crates/ui-egui/src/tests/dialog_settings_contrast.rs +++ b/crates/ui-egui/src/tests/dialog_settings_contrast.rs @@ -176,6 +176,28 @@ fn the_lines_that_say_where_a_control_is_stand_out_in_every_theme() { } } +#[test] +fn a_text_box_in_use_is_outlined_so_it_stands_out_in_every_theme() { + for kind in ThemeKind::ALL { + let mut h = demo(kind); + let t = Tokens::for_kind(kind); + show(&mut h, "general"); + // Given the text box has the keyboard (a click in it), and the pointer has gone away + let r = h.request("ui.clickWidget", json!({"id": "field:externalEditor"}), T); + assert_eq!(r["ok"], true, "{r}"); + h.request("ui.move", json!({"x": 3.0, "y": 3.0}), T); + for _ in 0..4 { + h.step(); + } + // Then its top edge stands 3:1 against the window + let image = h.paint(); + let field = rect(&h, "field:externalEditor"); + let edge = + egui::Rect::from_min_max(egui::pos2(field.center().x - 20.0, field.top() - 1.0), egui::pos2(field.center().x + 20.0, field.top() + 2.0)); + assert!(strongest(&image, edge, t.chrome) >= 3.0, "{kind:?}: a text box in use is outlined {:.2}:1", strongest(&image, edge, t.chrome)); + } +} + #[test] fn no_text_in_settings_uses_a_character_the_font_lacks() { let mut h = demo(ThemeKind::Charcoal); From 6e33113ddc4ea3819fbca5c8278fc6c6a6af12dc Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Thu, 22 Oct 2026 07:15:53 -0400 Subject: [PATCH 3/9] LR-PREF-GENERAL: the focus-outline test measures what focus adds; the third menu label is checked too --- .../src/tests/dialog_settings_contrast.rs | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/crates/ui-egui/src/tests/dialog_settings_contrast.rs b/crates/ui-egui/src/tests/dialog_settings_contrast.rs index 6b4d17acdc7..fb89e848410 100644 --- a/crates/ui-egui/src/tests/dialog_settings_contrast.rs +++ b/crates/ui-egui/src/tests/dialog_settings_contrast.rs @@ -182,22 +182,36 @@ fn a_text_box_in_use_is_outlined_so_it_stands_out_in_every_theme() { let mut h = demo(kind); let t = Tokens::for_kind(kind); show(&mut h, "general"); - // Given the text box has the keyboard (a click in it), and the pointer has gone away + // Given the text box as it is without the keyboard, then with it (a click in it), the pointer away + let unfocused = h.paint(); let r = h.request("ui.clickWidget", json!({"id": "field:externalEditor"}), T); assert_eq!(r["ok"], true, "{r}"); h.request("ui.move", json!({"x": 3.0, "y": 3.0}), T); for _ in 0..4 { h.step(); } - // Then its top edge stands 3:1 against the window - let image = h.paint(); + // Then what the keyboard focus adds to the edge stands 3:1 against the window: the border + // a text box has without it (also 3:1) must not be what passes + let focused = h.paint(); let field = rect(&h, "field:externalEditor"); let edge = egui::Rect::from_min_max(egui::pos2(field.center().x - 20.0, field.top() - 1.0), egui::pos2(field.center().x + 20.0, field.top() + 2.0)); - assert!(strongest(&image, edge, t.chrome) >= 3.0, "{kind:?}: a text box in use is outlined {:.2}:1", strongest(&image, edge, t.chrome)); + let outline = added_by_focus(&unfocused, &focused, edge); + assert!(!outline.is_empty(), "{kind:?}: the text box in use looks the same as when it is not"); + let best = outline.iter().map(|c| contrast(*c, t.chrome)).fold(1.0, f32::max); + assert!(best >= 3.0, "{kind:?}: a text box in use is outlined {best:.2}:1"); } } +/// The colours of the pixels of `rect` that differ between `before` and `after`. +fn added_by_focus(before: &egui::ColorImage, after: &egui::ColorImage, rect: egui::Rect) -> Vec { + let [w, h] = after.size; + assert_eq!(before.size, after.size); + let (x0, x1) = (rect.left().floor().max(0.0) as usize, (rect.right().ceil().max(0.0) as usize).min(w)); + let (y0, y1) = (rect.top().floor().max(0.0) as usize, (rect.bottom().ceil().max(0.0) as usize).min(h)); + (y0..y1).flat_map(|y| (x0..x1).map(move |x| y * w + x)).filter(|i| before.pixels[*i] != after.pixels[*i]).map(|i| after.pixels[i]).collect() +} + #[test] fn no_text_in_settings_uses_a_character_the_font_lacks() { let mut h = demo(ThemeKind::Charcoal); @@ -211,7 +225,8 @@ fn no_text_in_settings_uses_a_character_the_font_lacks() { } /// What Settings says that no language had a word for: every catalog has each of these now (these -/// 20, and the three menu items the hint names, which the last test below checks). +/// 20, and the menu items the hint names, with Edit in Other Editor, which +/// `the_menu_path_a_hint_gives_is_the_one_the_menus_show` checks). const ONCE_UNTRANSLATED: [&str; 20] = [ "Choose Profile…", "Edit in Other Editor (⌥⌘E) opens the copy in this application (an app name on macOS, a program path elsewhere).", @@ -272,6 +287,9 @@ fn the_menu_path_a_hint_gives_is_the_one_the_menus_show() { assert!(name != item, "{}: the menu item {item:?} has no translation", language.code()); assert!(said.contains(name), "{}: the hint does not name {name:?}: {said:?}", language.code()); } + // (Edit in Other Editor is a third item of the same menus; the hint does not name it) + let item = "Edit in Other Editor"; + assert!(language.tr(item) != item, "{}: the menu item {item:?} has no translation", language.code()); } } From b15e20bdf3c3cb69ebac17273932f00ddc1f5977 Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Fri, 23 Oct 2026 17:43:20 -0400 Subject: [PATCH 4/9] LR-PREF-GENERAL: no test asserts what a catalog says; the legibility tests keep the colours and the glyph check --- .../src/tests/dialog_settings_contrast.rs | 83 +------------------ 1 file changed, 2 insertions(+), 81 deletions(-) diff --git a/crates/ui-egui/src/tests/dialog_settings_contrast.rs b/crates/ui-egui/src/tests/dialog_settings_contrast.rs index fb89e848410..1a5e59b81dc 100644 --- a/crates/ui-egui/src/tests/dialog_settings_contrast.rs +++ b/crates/ui-egui/src/tests/dialog_settings_contrast.rs @@ -224,75 +224,6 @@ fn no_text_in_settings_uses_a_character_the_font_lacks() { } } -/// What Settings says that no language had a word for: every catalog has each of these now (these -/// 20, and the menu items the hint names, with Edit in Other Editor, which -/// `the_menu_path_a_hint_gives_is_the_one_the_menus_show` checks). -const ONCE_UNTRANSLATED: [&str; 20] = [ - "Choose Profile…", - "Edit in Other Editor (⌥⌘E) opens the copy in this application (an app name on macOS, a program path elsewhere).", - "External Editing", - "Found automatically", - "LUT-based", - "Matrix/TRC", - "Model installation failed", - "Monitor profile", - "None (the display is treated as sRGB)", - "Other editor", - "Photo > Edit In > Edit in PhotoCraft (⇧⌘E, or right-click a photo) renders a copy with your edits, stacks it with the original and opens it in PhotoCraft. Save there and the copy updates here. As PSD, PhotoCraft saves straight back to it. Leave the location empty unless you use a portable copy.", - "Photos are shown through your monitor's ICC profile, so colours are right on wide-gamut and calibrated displays, and the Detail view uses the display's whole gamut. The histogram, the preview caches and exports are not affected.", - "Primaries (x, y)", - "Profiles assigned in your desktop's colour settings are usually in ~/.local/share/icc.", - "The download failed", - "Use Screen Profile", - "Use sRGB", - "starting…", - "this screen's profile", - "Faces", -]; - -#[test] -fn every_language_has_the_sentences_settings_was_missing() { - use crate::i18n::Locale; - for language in Locale::ALL.iter().copied().filter(|language| *language != Locale::En) { - for source in ONCE_UNTRANSLATED { - let said = language.tr(source); - // (German, Georgian, Indonesian and Vietnamese say Matrix as English does, and TRC is TRC everywhere) - let same_word = source == "Matrix/TRC" && matches!(language, Locale::De | Locale::Id | Locale::Ka | Locale::Vi); - assert!(said != source || same_word, "{}: {source:?} is still in English", language.code()); - assert!(!said.trim().is_empty() && !said.contains('▸'), "{}: {source:?} -> {said:?}", language.code()); - } - } -} - -#[test] -fn the_sentences_settings_was_missing_are_the_ones_it_says() { - // (a sentence reworded in the code and not here would leave its translations orphaned) - let sources = [include_str!("panels/settings.rs"), include_str!("panels/denoise.rs"), include_str!("panels/faces.rs")].concat(); - for source in ONCE_UNTRANSLATED { - let literal = format!("{source:?}"); - assert!(sources.contains(&literal), "{source:?} is no longer said by Settings as written here"); - } -} - -#[test] -fn the_menu_path_a_hint_gives_is_the_one_the_menus_show() { - use crate::i18n::Locale; - // (the hint under External Editing says where the command is: in each language it names the - // menu items as that language's menus do) - let hint = ONCE_UNTRANSLATED.iter().find(|source| source.starts_with("Photo > Edit In > Edit in PhotoCraft")).unwrap(); - for language in Locale::ALL.iter().copied().filter(|language| *language != Locale::En) { - let said = language.tr(hint); - for item in ["Edit In", "Edit in PhotoCraft"] { - let name = language.tr(item); - assert!(name != item, "{}: the menu item {item:?} has no translation", language.code()); - assert!(said.contains(name), "{}: the hint does not name {name:?}: {said:?}", language.code()); - } - // (Edit in Other Editor is a third item of the same menus; the hint does not name it) - let item = "Edit in Other Editor"; - assert!(language.tr(item) != item, "{}: the menu item {item:?} has no translation", language.code()); - } -} - #[test] fn a_models_licence_line_and_a_favourite_star_can_be_read_in_every_theme() { use crate::dialogs::settings::favorite_star_colour; @@ -313,19 +244,9 @@ fn a_models_licence_line_and_a_favourite_star_can_be_read_in_every_theme() { } #[test] -fn the_gpu_line_and_the_smart_previews_folder_go_through_translation() { +fn the_gpu_line_and_the_smart_previews_folder_read_as_they_did_in_english() { use crate::dialogs::settings::{gpu_line, smart_folder_default}; - use crate::i18n::{Locale, set_language}; - for language in Locale::ALL.iter().copied().filter(|language| *language != Locale::En) { - set_language(language); - let starting = gpu_line(None); - assert_eq!(starting, format!("GPU: {}", language.tr("starting…")), "{}", language.code()); - assert_ne!(starting, "GPU: starting…", "{}: still English", language.code()); - let shown = smart_folder_default(); - assert_eq!(shown, language.tr(" (library default)").trim(), "{}", language.code()); - assert_ne!(shown, "(library default)", "{}: still English", language.code()); - } - set_language(Locale::En); + assert_eq!(gpu_line(Some("Apple M2".into())), "GPU: Apple M2"); assert_eq!(smart_folder_default(), "(library default)"); } From b8e4bbc21610b4ec9a2f33825f8bdd9e6762ac71 Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Fri, 23 Oct 2026 20:31:40 -0400 Subject: [PATCH 5/9] LR-PREF-GENERAL: the border tests measure how much of an edge stands 3:1, not the one brightest pixel --- .../src/tests/dialog_settings_contrast.rs | 75 +++++++++++++++---- 1 file changed, 60 insertions(+), 15 deletions(-) diff --git a/crates/ui-egui/src/tests/dialog_settings_contrast.rs b/crates/ui-egui/src/tests/dialog_settings_contrast.rs index 1a5e59b81dc..a20fb1da37e 100644 --- a/crates/ui-egui/src/tests/dialog_settings_contrast.rs +++ b/crates/ui-egui/src/tests/dialog_settings_contrast.rs @@ -42,6 +42,15 @@ fn show(h: &mut Headless, tab: &str) { h.step(); } +/// Scroll the open Settings page to its end (General's External Editing is far below the top). +fn scroll_to_end(h: &mut Headless) { + assert_eq!(h.request("ui.hoverWidget", json!({"id": "settings:pageRoom"}), T)["ok"], true); + h.request("ui.scroll", json!({"dy": -3000.0}), T); + for _ in 0..4 { + h.step(); + } +} + fn rect(h: &Headless, id: &str) -> egui::Rect { h.app.widgets.iter().find(|(w, _)| w == id).map(|(_, r)| *r).unwrap_or_else(|| panic!("no widget {id}")) } @@ -74,14 +83,25 @@ fn text_colour(h: &Headless, part: &str) -> Color32 { h.view.painted_shapes().iter().find_map(|shape| find(shape, part)).unwrap_or_else(|| panic!("no text with {part:?} is drawn")) } -/// The most any pixel of `rect` stands out from `ground` (one pixel per point here). -fn strongest(image: &egui::ColorImage, rect: egui::Rect, ground: Color32) -> f32 { +/// How much of an edge stands `ratio` against `ground`: the largest share, over the rows of `rect` (or its +/// columns, when `horizontal` is false), of that line's pixels that do. One bright antialiased pixel does not +/// make a border; a line that is mostly at the ratio does (one pixel per point here). +fn edge_share(image: &egui::ColorImage, rect: egui::Rect, ground: Color32, ratio: f32, horizontal: bool) -> f32 { let [w, h] = image.size; let (x0, x1) = (rect.left().floor().max(0.0) as usize, (rect.right().ceil().max(0.0) as usize).min(w)); let (y0, y1) = (rect.top().floor().max(0.0) as usize, (rect.bottom().ceil().max(0.0) as usize).min(h)); - (y0..y1).flat_map(|y| (x0..x1).map(move |x| (x, y))).map(|(x, y)| contrast(image.pixels[y * w + x], ground)).fold(1.0, f32::max) + let stands = |x: usize, y: usize| contrast(image.pixels[y * w + x], ground) >= ratio; + if horizontal { + (y0..y1).map(|y| (x0..x1).filter(|x| stands(*x, y)).count() as f32 / (x1 - x0).max(1) as f32).fold(0.0, f32::max) + } else { + (x0..x1).map(|x| (y0..y1).filter(|y| stands(x, *y)).count() as f32 / (y1 - y0).max(1) as f32).fold(0.0, f32::max) + } } +/// Share of a straight edge that must stand the ratio; a radio button's ring is a curve, so it gets half. +const STRAIGHT: f32 = 0.75; +const CURVED: f32 = 0.5; + #[test] fn a_colour_is_made_legible_only_where_it_is_not() { for kind in ThemeKind::ALL { @@ -144,11 +164,13 @@ fn the_lines_that_say_where_a_control_is_stand_out_in_every_theme() { let t = Tokens::for_kind(kind); // A text box's border: the top edge of General's "Other editor" show(&mut h, "general"); + scroll_to_end(&mut h); let image = h.paint(); let field = rect(&h, "field:externalEditor"); let edge = egui::Rect::from_min_max(egui::pos2(field.center().x - 20.0, field.top() - 1.0), egui::pos2(field.center().x + 20.0, field.top() + 2.0)); - assert!(strongest(&image, edge, t.chrome) >= 3.0, "{kind:?}: a text box's border is {:.2}:1", strongest(&image, edge, t.chrome)); + let share = edge_share(&image, edge, t.chrome, 3.0, true); + assert!(share >= STRAIGHT, "{kind:?}: only {share:.2} of a text box's border stands 3:1"); // A button's border: the top edge of Performance's "Clear Cache" show(&mut h, "performance"); let image = h.paint(); @@ -157,14 +179,16 @@ fn the_lines_that_say_where_a_control_is_stand_out_in_every_theme() { egui::pos2(button.center().x - 20.0, button.top() - 1.0), egui::pos2(button.center().x + 20.0, button.top() + 2.0), ); - assert!(strongest(&image, edge, t.chrome) >= 3.0, "{kind:?}: a button's border is {:.2}:1", strongest(&image, edge, t.chrome)); + let share = edge_share(&image, edge, t.chrome, 3.0, true); + assert!(share >= STRAIGHT, "{kind:?}: only {share:.2} of a button's border stands 3:1"); // A checkbox's border: the left edge of its box (unticked: the GPU is off here) show(&mut h, "performance"); let image = h.paint(); let check = rect(&h, "check:settings.gpu"); let side = egui::Rect::from_min_max(egui::pos2(check.left() - 1.0, check.center().y - 2.0), egui::pos2(check.left() + 5.0, check.center().y + 2.0)); - assert!(strongest(&image, side, t.chrome) >= 3.0, "{kind:?}: a checkbox's border is {:.2}:1", strongest(&image, side, t.chrome)); + let share = edge_share(&image, side, t.chrome, 3.0, false); + assert!(share >= STRAIGHT, "{kind:?}: only {share:.2} of a checkbox's border stands 3:1"); // A radio button on a theme's card, which is on the card's own fill: the one not chosen show(&mut h, "interface"); let image = h.paint(); @@ -172,7 +196,8 @@ fn the_lines_that_say_where_a_control_is_stand_out_in_every_theme() { let radio = rect(&h, other); let ring = egui::Rect::from_min_max(egui::pos2(radio.left() - 1.0, radio.center().y - 2.0), egui::pos2(radio.left() + 4.0, radio.center().y + 2.0)); - assert!(strongest(&image, ring, t.inset) >= 3.0, "{kind:?}: a radio button on a card is {:.2}:1", strongest(&image, ring, t.inset)); + let share = edge_share(&image, ring, t.inset, 3.0, false); + assert!(share >= CURVED, "{kind:?}: only {share:.2} of a radio button's ring on a card stands 3:1"); } } @@ -182,6 +207,7 @@ fn a_text_box_in_use_is_outlined_so_it_stands_out_in_every_theme() { let mut h = demo(kind); let t = Tokens::for_kind(kind); show(&mut h, "general"); + scroll_to_end(&mut h); // Given the text box as it is without the keyboard, then with it (a click in it), the pointer away let unfocused = h.paint(); let r = h.request("ui.clickWidget", json!({"id": "field:externalEditor"}), T); @@ -198,18 +224,31 @@ fn a_text_box_in_use_is_outlined_so_it_stands_out_in_every_theme() { egui::Rect::from_min_max(egui::pos2(field.center().x - 20.0, field.top() - 1.0), egui::pos2(field.center().x + 20.0, field.top() + 2.0)); let outline = added_by_focus(&unfocused, &focused, edge); assert!(!outline.is_empty(), "{kind:?}: the text box in use looks the same as when it is not"); - let best = outline.iter().map(|c| contrast(*c, t.chrome)).fold(1.0, f32::max); - assert!(best >= 3.0, "{kind:?}: a text box in use is outlined {best:.2}:1"); + // (along the edge's busiest row, most of its pixels are ones focus added at 3:1) + let columns = (edge.right().ceil() - edge.left().floor()).max(1.0); + let share = outline.iter().filter(|(_, c)| contrast(*c, t.chrome) >= 3.0).fold( + std::collections::HashMap::::new(), + |mut rows, (y, _)| { + *rows.entry(*y).or_default() += 1; + rows + }, + ); + let best = share.values().copied().max().unwrap_or(0) as f32 / columns; + assert!(best >= STRAIGHT, "{kind:?}: only {best:.2} of a text box's edge in use is outlined at 3:1"); } } -/// The colours of the pixels of `rect` that differ between `before` and `after`. -fn added_by_focus(before: &egui::ColorImage, after: &egui::ColorImage, rect: egui::Rect) -> Vec { +/// The row and colour of the pixels of `rect` that differ between `before` and `after`. +fn added_by_focus(before: &egui::ColorImage, after: &egui::ColorImage, rect: egui::Rect) -> Vec<(usize, Color32)> { let [w, h] = after.size; assert_eq!(before.size, after.size); let (x0, x1) = (rect.left().floor().max(0.0) as usize, (rect.right().ceil().max(0.0) as usize).min(w)); let (y0, y1) = (rect.top().floor().max(0.0) as usize, (rect.bottom().ceil().max(0.0) as usize).min(h)); - (y0..y1).flat_map(|y| (x0..x1).map(move |x| y * w + x)).filter(|i| before.pixels[*i] != after.pixels[*i]).map(|i| after.pixels[i]).collect() + (y0..y1) + .flat_map(|y| (x0..x1).map(move |x| y * w + x)) + .filter(|i| before.pixels[*i] != after.pixels[*i]) + .map(|i| (i / w, after.pixels[i])) + .collect() } #[test] @@ -217,9 +256,15 @@ fn no_text_in_settings_uses_a_character_the_font_lacks() { let mut h = demo(ThemeKind::Charcoal); for (tab, _) in TABS { show(&mut h, tab); - // (▸ has no glyph in the interface's fonts: it draws as an empty box) - for text in h.painted_text() { - assert!(!text.contains('▸'), "{tab}: {text:?} has an arrow the font cannot draw"); + // (▸ has no glyph in the interface's fonts: it draws as an empty box; a page is read at its + // top and again scrolled to its foot, since what is below the fold is not painted) + for scrolled in [false, true] { + if scrolled { + scroll_to_end(&mut h); + } + for text in h.painted_text() { + assert!(!text.contains('▸'), "{tab}: {text:?} has an arrow the font cannot draw"); + } } } } From 06a5fce87530983c856cad3a3e574eefffeb2cd1 Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Thu, 29 Oct 2026 11:21:42 -0400 Subject: [PATCH 6/9] LR-PREF-GENERAL: text buttons and choice rows take Settings' legible border; the Faces tab reads in every theme text_button and segmented draw the border their ui gives plain buttons (the theme's unless a window made it more legible). Faces' processor labels, hint, model marks, license and failure lines go through legible(), the download-failed fallback is translated, and the wasm test build no longer needs smart_folder_default. --- crates/ui-egui/src/dialogs/faces.rs | 24 ++++---- crates/ui-egui/src/dialogs/settings.rs | 4 +- .../src/tests/dialog_settings_contrast.rs | 56 ++++++++++++++++++- crates/ui-egui/src/widgets.rs | 13 ++++- docs/whats-new.md | 6 +- 5 files changed, 81 insertions(+), 22 deletions(-) diff --git a/crates/ui-egui/src/dialogs/faces.rs b/crates/ui-egui/src/dialogs/faces.rs index 9345b899910..9831859cc6e 100644 --- a/crates/ui-egui/src/dialogs/faces.rs +++ b/crates/ui-egui/src/dialogs/faces.rs @@ -189,7 +189,7 @@ fn gpu_section(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens, gpu: &Val (crate::i18n::tr("CPU").to_string(), st["why"].as_str()) }; ui.horizontal(|ui| { - ui.label(RichText::new(crate::i18n::tr(label)).color(t.text_dim)); + ui.label(RichText::new(crate::i18n::tr(label)).color(t.legible(t.text_dim, t.chrome, 4.5))); if st["checking"] == true { crate::progress::spinner(ui, 12.0); } @@ -295,7 +295,7 @@ pub fn settings_tab(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens) { if r.clicked() { let _ = app.run("dialog.faceModel", json!({})); } - ui.label(RichText::new(crate::i18n::tr("or drop a .onnx file on the window")).color(t.text_dim)); + ui.label(RichText::new(crate::i18n::tr("or drop a .onnx file on the window")).color(t.legible(t.text_dim, t.chrome, 4.5))); }); // what is wrong with the user's own catalog (catalog.json in the models folder), if anything for e in list["catalog"]["errors"].as_array().into_iter().flatten().filter_map(Value::as_str).take(3) { @@ -322,6 +322,8 @@ fn model_row(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens, m: &Value, let id = m["id"].as_str().unwrap_or("").to_string(); let detector = m["role"] == "detector"; let (installed, selected) = (m["installed"].as_bool() == Some(true), m["selected"].as_bool() == Some(true)); + // (the quiet and the warning colors, brought to read on the Settings window, as its other tabs do) + let (dim, caution) = (t.legible(t.text_dim, t.chrome, 4.5), t.legible(t.caution, t.chrome, 4.5)); let dl_state = if installed { None } else { dl.and_then(|d| d["state"].as_str()) }; // a build that cannot run recognition models has no use for a download let host = if can_run { m["downloadHost"].as_str().unwrap_or("").to_string() } else { String::new() }; @@ -332,19 +334,15 @@ fn model_row(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens, m: &Value, ui.label(RichText::new(m["name"].as_str().unwrap_or("")).color(t.text)); let size = mb(m["sizeBytes"].as_u64()); if !size.is_empty() { - ui.label(RichText::new(size).color(t.text_dim)); + ui.label(RichText::new(size).color(dim)); } if selected { - ui.label(RichText::new(crate::i18n::tr("in use")).color(t.accent)); + ui.label(RichText::new(crate::i18n::tr("in use")).color(t.legible(t.accent, t.chrome, 4.5))); } else if installed { - ui.label(RichText::new(crate::i18n::tr("installed")).color(t.text_dim)); + ui.label(RichText::new(crate::i18n::tr("installed")).color(dim)); } }); - ui.label(RichText::new(licence_line(m)).font(t.font(11.5)).color(if m["licence"]["commercial"] == "yes" { - t.text_dim - } else { - t.caution - })); + ui.label(RichText::new(licence_line(m)).font(t.font(11.5)).color(if m["licence"]["commercial"] == "yes" { dim } else { caution })); // how fast it is, as times faster than a ResNet-100 model (milliseconds would depend on the computer), // with whether it passed its test when it has been installed let speed = m["speedText"].as_str().filter(|s| !s.is_empty()); @@ -356,7 +354,7 @@ fn model_row(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens, m: &Value, None => (speed.map(str::to_string), true), }; if let Some(line) = line { - ui.label(RichText::new(line).font(t.font(11.5)).color(if ok { t.text_dim } else { t.caution })); + ui.label(RichText::new(line).font(t.font(11.5)).color(if ok { dim } else { caution })); } match (dl_state, dl) { (Some("running"), Some(d)) => { @@ -375,12 +373,12 @@ fn model_row(app: &mut LightcraftApp, ui: &mut egui::Ui, t: &Tokens, m: &Value, (Some("done"), _) => { ui.horizontal(|ui| { crate::progress::spinner(ui, 12.0); - ui.label(RichText::new(crate::i18n::tr("Downloaded and checked. Installing…")).font(t.font(11.5)).color(t.text_dim)); + ui.label(RichText::new(crate::i18n::tr("Downloaded and checked. Installing…")).font(t.font(11.5)).color(dim)); }); } (Some("failed"), Some(d)) => { let why = crate::panels::denoise::download_failure(d); - ui.add(egui::Label::new(RichText::new(why).font(t.font(11.5)).color(t.caution)).wrap()); + ui.add(egui::Label::new(RichText::new(why).font(t.font(11.5)).color(caution)).wrap()); } _ => {} } diff --git a/crates/ui-egui/src/dialogs/settings.rs b/crates/ui-egui/src/dialogs/settings.rs index 849ebdce967..bbb41860ec4 100644 --- a/crates/ui-egui/src/dialogs/settings.rs +++ b/crates/ui-egui/src/dialogs/settings.rs @@ -40,7 +40,9 @@ pub(crate) use libraries::{can_switch_library, free_name}; pub use libraries::{forget_library, library_name, new_library, open_library, open_library_name, recent_libraries, remember_library}; use performance::performance_tab; #[cfg(test)] -pub(crate) use performance::{gpu_line, smart_folder_default}; +pub(crate) use performance::gpu_line; +#[cfg(all(test, not(target_arch = "wasm32")))] +pub(crate) use performance::smart_folder_default; use slideshow::slideshow_tab; use widgets::legible_controls; pub(crate) use widgets::{check, choices, heading, hint, row}; diff --git a/crates/ui-egui/src/tests/dialog_settings_contrast.rs b/crates/ui-egui/src/tests/dialog_settings_contrast.rs index a20fb1da37e..24001737337 100644 --- a/crates/ui-egui/src/tests/dialog_settings_contrast.rs +++ b/crates/ui-egui/src/tests/dialog_settings_contrast.rs @@ -154,6 +154,32 @@ fn explanations_placeholders_and_the_accent_as_text_can_be_read_in_every_theme() show(&mut h, "interface"); let in_use = text_colour(&h, "In Use"); assert!(contrast(in_use, t.inset) >= 4.5, "{kind:?}: In Use is {:.2}:1", contrast(in_use, t.inset)); + // The Faces tab (with a folder for the models, or it only says it has none): the hint beside "Add a model + // file…", and the marks on a model's row + let models = std::env::temp_dir().join(format!("lc-settings-contrast-faces-{}", std::process::id())); + std::fs::create_dir_all(&models).unwrap(); + h.app.session.face_models_dir = Some(models.clone()); + // (an installed model is the one in use, and has a size) + let file = models.join("m.onnx"); + std::fs::write(&file, lightcraft_faces::synthetic::tiny_embedder_model(64)).unwrap(); + h.app.session.execute("faces.models.install", &json!({"path": file.to_string_lossy(), "acknowledged": true})).unwrap(); + h.app.caches.faces_epoch += 1; + show(&mut h, "faces"); + let drop = text_colour(&h, "or drop a .onnx file"); + assert!(contrast(drop, t.chrome) >= 4.5, "{kind:?}: the Faces hint is {:.2}:1", contrast(drop, t.chrome)); + // the Processor section's labels and the license line of the model (its terms are unclear: the warning color) + for part in ["Detection", "Recognition", "terms unclear"] { + let colour = text_colour(&h, part); + assert!(contrast(colour, t.chrome) >= 4.5, "{kind:?}: \"{part}\" is {:.2}:1", contrast(colour, t.chrome)); + } + let painted = h.painted_text(); + let marks: Vec<&str> = ["in use", "installed"].into_iter().filter(|m| painted.iter().any(|text| text.as_str() == *m)).collect(); + assert!(!marks.is_empty(), "{kind:?}: no model is marked in use or installed"); + for mark in marks { + let colour = text_colour(&h, mark); + assert!(contrast(colour, t.chrome) >= 4.5, "{kind:?}: \"{mark}\" is {:.2}:1", contrast(colour, t.chrome)); + } + let _ = std::fs::remove_dir_all(&models); } } @@ -181,6 +207,19 @@ fn the_lines_that_say_where_a_control_is_stand_out_in_every_theme() { ); let share = edge_share(&image, edge, t.chrome, 3.0, true); assert!(share >= STRAIGHT, "{kind:?}: only {share:.2} of a button's border stands 3:1"); + // A text button's border (the tab bar's, and a row of choices: Preview size), which are drawn by + // `widgets::text_button`, not by egui's button: the top edge of one that is not chosen + for (what, id) in [("a tab", "button:settingsTab-general"), ("a choice", "button:settingsPreview-1")] { + show(&mut h, "performance"); + let image = h.paint(); + let button = rect(&h, id); + let edge = egui::Rect::from_min_max( + egui::pos2(button.center().x - 12.0, button.top() - 1.0), + egui::pos2(button.center().x + 12.0, button.top() + 2.0), + ); + let share = edge_share(&image, edge, t.chrome, 3.0, true); + assert!(share >= STRAIGHT, "{kind:?}: only {share:.2} of {what}'s border stands 3:1"); + } // A checkbox's border: the left edge of its box (unticked: the GPU is off here) show(&mut h, "performance"); let image = h.paint(); @@ -289,9 +328,20 @@ fn a_models_licence_line_and_a_favourite_star_can_be_read_in_every_theme() { } #[test] -fn the_gpu_line_and_the_smart_previews_folder_read_as_they_did_in_english() { - use crate::dialogs::settings::{gpu_line, smart_folder_default}; +fn the_gpu_line_reads_as_it_did_in_english_and_in_the_language_shown() { + use crate::dialogs::settings::gpu_line; assert_eq!(gpu_line(Some("Apple M2".into())), "GPU: Apple M2"); - assert_eq!(smart_folder_default(), "(library default)"); + // (no adapter known yet: the word is the language's, not English) + crate::i18n::set_language(crate::i18n::Locale::De); + let line = gpu_line(None); + crate::i18n::set_language(crate::i18n::Locale::En); + assert_eq!(line, format!("GPU: {}", crate::i18n::Locale::De.tr("starting…"))); + assert_eq!(gpu_line(None), "GPU: starting…"); +} + +#[cfg(not(target_arch = "wasm32"))] +#[test] +fn the_smart_previews_folder_reads_as_it_did_in_english() { + assert_eq!(crate::dialogs::settings::smart_folder_default(), "(library default)"); } diff --git a/crates/ui-egui/src/widgets.rs b/crates/ui-egui/src/widgets.rs index 3101a93dc99..89712cbed57 100644 --- a/crates/ui-egui/src/widgets.rs +++ b/crates/ui-egui/src/widgets.rs @@ -918,6 +918,13 @@ pub fn flyout_row(ui: &mut Ui, id: &str, title: &str, icon: Icon, open: bool) -> resp } +/// The border of a text button or a segment: what `ui` draws a plain button's border in (the theme's `button_border` +/// unless a window made it more legible, as Settings does), or the theme's where the ui draws plain buttons without one. +fn button_border(ui: &Ui, t: &Tokens) -> egui::Color32 { + let drawn = ui.visuals().widgets.inactive.bg_stroke.color; + if drawn.a() == 0 { t.button_border } else { drawn } +} + /// A small bordered text button (Auto, B&W, HDR…). pub fn text_button(ui: &mut Ui, id: &str, label: &str, active: bool) -> Response { let label = if id.starts_with("labelSet-") { label } else { crate::i18n::tr(label) }; @@ -935,8 +942,9 @@ pub fn text_button(ui: &mut Ui, id: &str, label: &str, active: bool) -> Response } else { t.button }; + let border = button_border(ui, &t); let p = ui.painter(); - p.rect(r, CornerRadius::same(4), fill, Stroke::new(1.0, t.button_border), StrokeKind::Inside); + p.rect(r, CornerRadius::same(4), fill, Stroke::new(1.0, border), StrokeKind::Inside); p.galley(r.center() - galley.size() / 2.0, galley, t.text); resp } @@ -978,8 +986,9 @@ pub fn segmented(ui: &mut Ui, id: &str, items: &[(&str, &str)], active: Option Edit In > Edit in PhotoCraft" now. - Photo ▸ Edit In, Edit in PhotoCraft and Edit in Other Editor have names in all seventeen languages, the ones the From 118a8043f3822c0502e8a7104d7e1dcae6caee4e Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Thu, 29 Oct 2026 12:16:47 -0400 Subject: [PATCH 7/9] LR-PREF-GENERAL: the Faces test selects its model without turning recognition on; the docs say what is covered; rustfmt's use order --- crates/ui-egui/src/dialogs/settings.rs | 2 +- .../ui-egui/src/tests/dialog_settings_contrast.rs | 5 ++++- docs/whats-new.md | 13 +++++++------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/crates/ui-egui/src/dialogs/settings.rs b/crates/ui-egui/src/dialogs/settings.rs index bbb41860ec4..ba20187f8c2 100644 --- a/crates/ui-egui/src/dialogs/settings.rs +++ b/crates/ui-egui/src/dialogs/settings.rs @@ -38,9 +38,9 @@ use general::general_tab; use import::import_tab; pub(crate) use libraries::{can_switch_library, free_name}; pub use libraries::{forget_library, library_name, new_library, open_library, open_library_name, recent_libraries, remember_library}; -use performance::performance_tab; #[cfg(test)] pub(crate) use performance::gpu_line; +use performance::performance_tab; #[cfg(all(test, not(target_arch = "wasm32")))] pub(crate) use performance::smart_folder_default; use slideshow::slideshow_tab; diff --git a/crates/ui-egui/src/tests/dialog_settings_contrast.rs b/crates/ui-egui/src/tests/dialog_settings_contrast.rs index 24001737337..f3b0738eb87 100644 --- a/crates/ui-egui/src/tests/dialog_settings_contrast.rs +++ b/crates/ui-egui/src/tests/dialog_settings_contrast.rs @@ -162,7 +162,10 @@ fn explanations_placeholders_and_the_accent_as_text_can_be_read_in_every_theme() // (an installed model is the one in use, and has a size) let file = models.join("m.onnx"); std::fs::write(&file, lightcraft_faces::synthetic::tiny_embedder_model(64)).unwrap(); - h.app.session.execute("faces.models.install", &json!({"path": file.to_string_lossy(), "acknowledged": true})).unwrap(); + let installed = + h.app.session.execute("faces.models.install", &json!({"path": file.to_string_lossy(), "acknowledged": true, "activate": false})).unwrap(); + // (selected, not switched on: an active recognition model would start a GPU check and a scan in the background) + h.app.session.execute("faces.models.select", &json!({"id": installed["installed"]["id"]})).unwrap(); h.app.caches.faces_epoch += 1; show(&mut h, "faces"); let drop = text_colour(&h, "or drop a .onnx file"); diff --git a/docs/whats-new.md b/docs/whats-new.md index 35561bb455c..eda1671f554 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -516,12 +516,13 @@ ### Settings text can be read in every theme -- What Settings says can be read in every theme. Its explanations, the text a box shows while it is empty, "In Use" - on a theme's card and the lines that warn or refuse now stand at least 4.5:1 against what they are on (the - explanations were 4.2:1 in Charcoal and 4.3:1 in Silver, "In Use" 2.9:1 in Charcoal); the borders of text boxes, - checkboxes, radio buttons, buttons, the tabs and the rows of choices stand 3:1, where they were 1.6 to 1.7:1. The AI - Denoise and Faces pages' own lines, the GPU line under Rendering and the star that marks a favorite theme are read - the same way. The colors of the rest of LightCraft are as they were. +- What Settings says can be read in more themes. Its explanations, the text a box shows while it is empty, "In Use" + on a theme's card and the warnings and refusals on the AI Denoise and Faces tabs now stand at least 4.5:1 against + what they are on (the explanations were 4.2:1 in Charcoal and 4.3:1 in Silver, "In Use" 2.9:1 in Charcoal); the + borders of text boxes, checkboxes, radio buttons, buttons, the tabs and the rows of choices stand 3:1, where they + were 1.6 to 1.7:1. The AI Denoise and Faces tabs' own lines, the GPU line under Rendering and the star that marks a + favorite theme are read the same way. The warnings and group labels on the Slideshow tab, the dialogs that add a + face model and the colors of the rest of LightCraft are as they were. - The hint under External Editing drew two empty boxes where its menu path had arrows; it reads "Photo > Edit In > Edit in PhotoCraft" now. - Photo ▸ Edit In, Edit in PhotoCraft and Edit in Other Editor have names in all seventeen languages, the ones the From 521a709ef0585470cd5ee7ce7f06dfea08d944f1 Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Thu, 29 Oct 2026 12:36:56 -0400 Subject: [PATCH 8/9] LR-PREF-GENERAL: the What's New heading says what its entry says --- docs/whats-new.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/whats-new.md b/docs/whats-new.md index eda1671f554..83350580de2 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -513,8 +513,7 @@ noise looks like grain. Edges are as sharp as before. Thumbnails and previews that LightCraft rendered from a raw are redrawn; the camera's own embedded preview, shown for an unedited raw until its render is ready, is unchanged. - -### Settings text can be read in every theme +### Settings text can be read in more themes - What Settings says can be read in more themes. Its explanations, the text a box shows while it is empty, "In Use" on a theme's card and the warnings and refusals on the AI Denoise and Faces tabs now stand at least 4.5:1 against @@ -530,6 +529,7 @@ - Sentences and names in Settings that some languages had no word for (External Editing and its hints, the Monitor tab, the model installation messages) are in every language now. "(library default)" and "starting…" are translated too. + ### Tab leaves the name field in New Album, New Smart Album and the name prompts - In New Album, New Smart Album, Save Metadata Preset and the other dialogs with one name field, the field has the keyboard focus when the dialog opens, and Tab now moves on to the check box, Cancel and OK (Shift+Tab goes back). From 8ab9c2e0ff6b2876fb95b87db28d2f0aeca47a3f Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Thu, 5 Nov 2026 21:18:46 -0500 Subject: [PATCH 9/9] LR-PREF-GENERAL: the border test scrolls Performance to its top, which the taller page hides after General --- crates/ui-egui/src/tests/dialog_settings_contrast.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/ui-egui/src/tests/dialog_settings_contrast.rs b/crates/ui-egui/src/tests/dialog_settings_contrast.rs index f3b0738eb87..295cb2716ba 100644 --- a/crates/ui-egui/src/tests/dialog_settings_contrast.rs +++ b/crates/ui-egui/src/tests/dialog_settings_contrast.rs @@ -51,6 +51,16 @@ fn scroll_to_end(h: &mut Headless) { } } +/// Scroll the open Settings page back to its top (the scroll offset of the page before stays when a tab is shown, +/// and Performance is tall enough for it to hide the rows at the top). +fn scroll_to_start(h: &mut Headless) { + assert_eq!(h.request("ui.hoverWidget", json!({"id": "settings:pageRoom"}), T)["ok"], true); + h.request("ui.scroll", json!({"dy": 3000.0}), T); + for _ in 0..4 { + h.step(); + } +} + fn rect(h: &Headless, id: &str) -> egui::Rect { h.app.widgets.iter().find(|(w, _)| w == id).map(|(_, r)| *r).unwrap_or_else(|| panic!("no widget {id}")) } @@ -214,6 +224,7 @@ fn the_lines_that_say_where_a_control_is_stand_out_in_every_theme() { // `widgets::text_button`, not by egui's button: the top edge of one that is not chosen for (what, id) in [("a tab", "button:settingsTab-general"), ("a choice", "button:settingsPreview-1")] { show(&mut h, "performance"); + scroll_to_start(&mut h); let image = h.paint(); let button = rect(&h, id); let edge = egui::Rect::from_min_max(