Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

Merge #1457: Properties: ••• expands Character and Paragraph in place, as in InDesign

aiongg48ff7aa03e21
diff --cc crates/ui-egui/src/i18n.rs
index 3e47a19c2,fe7f730cc..cb473be0e
--- a/crates/ui-egui/src/i18n.rs
+++ b/crates/ui-egui/src/i18n.rs
@@@ -34,18 -34,52 +34,62 @@@ pub const LANGUAGES: &[(&str, &str)] =
("ka", "ქართული"),
];
+/// The interface languages in the order the Preferences picker lists them: English first (the
+/// source language), then the rest by their own name with accents folded, so Čeština sits under
+/// C. Names in other scripts follow the Latin ones in code point order: Cyrillic, Arabic,
+/// Georgian, then the CJK languages.
+pub fn picker_languages() -> Vec<(&'static str, &'static str)> {
+ let mut rest: Vec<(&str, &str)> = LANGUAGES.iter().copied().filter(|(code, _)| !code.is_empty()).collect();
+ rest.sort_by_cached_key(|(_, name)| name_sort_key(name));
+ std::iter::once(LANGUAGES[0]).chain(rest).collect()
+}
+
/// English → [German, French, Spanish, Japanese, Simplified Chinese].
const TABLE: &[(&str, [&str; 5])] = &[
+ ("Vertical Scale", ["Vertikal skalieren", "Échelle verticale", "Escala vertical", "垂直比率", "垂直缩放"]),
+ ("Horizontal Scale", ["Horizontal skalieren", "Échelle horizontale", "Escala horizontal", "水平比率", "水平缩放"]),
+ ("Baseline Shift", ["Grundlinienversatz", "Décalage vertical", "Desplazamiento vertical", "ベースラインシフト", "基线偏移"]),
+ (
+ "Skew (False Italic)",
+ ["Verzerren (falscher Kursivstil)", "Inclinaison (faux italique)", "Sesgar (cursiva falsa)", "歪み(斜体)", "倾斜(伪斜体)"],
+ ),
+ ("Left Indent", ["Einzug links", "Retrait gauche", "Sangría izquierda", "左インデント", "左缩进"]),
+ ("Right Indent", ["Einzug rechts", "Retrait droit", "Sangría derecha", "右インデント", "右缩进"]),
+ (
+ "First Line Left Indent",
+ ["Einzug links in erster Zeile", "Retrait gauche de première ligne", "Sangría izquierda en primera línea", "1行目左インデント", "首行左缩进"],
+ ),
+ (
+ "Last Line Right Indent",
+ ["Einzug rechts in letzter Zeile", "Retrait droit de dernière ligne", "Sangría derecha en última línea", "最終行右インデント", "末行右缩进"],
+ ),
+ (
+ "Drop Cap Number of Lines",
+ ["Initiale: Anzahl der Zeilen", "Lettrine (nombre de lignes)", "Capitular: número de líneas", "ドロップキャップの行数", "首字下沉行数"],
+ ),
+ (
+ "Drop Cap One or More Characters",
+ [
+ "Initiale: ein oder mehrere Zeichen",
+ "Lettrine (un ou plusieurs caractères)",
+ "Capitular: uno o más caracteres",
+ "ドロップキャップの文字数",
+ "首字下沉一个或多个字符",
+ ],
+ ),
+ (
+ "Align to Baseline Grid",
+ [
+ "An Grundlinienraster ausrichten",
+ "Aligner sur la grille de ligne de base",
+ "Alinear con cuadrícula base",
+ "ベースライングリッドに揃える",
+ "对齐基线网格",
+ ],
+ ),
+ // Properties › Paragraph (•••).
+ ("Space Before", ["Abstand davor", "Espace avant", "Espacio anterior", "段落前の間隔", "段前间距"]),
+ ("Space After", ["Abstand danach", "Espace après", "Espacio posterior", "段落後の間隔", "段后间距"]),
// Menus.
("File", ["Datei", "Fichier", "Archivo", "ファイル", "文件"]),
("Edit", ["Bearbeiten", "Édition", "Edición", "編集", "编辑"]),
diff --cc crates/ui-egui/src/i18n/ar.rs
index c7145d909,6535165f6..137c74791
--- a/crates/ui-egui/src/i18n/ar.rs
+++ b/crates/ui-egui/src/i18n/ar.rs
@@@ -30,15 -30,17 +30,26 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "قص"),
("Copy", "نسخ"),
("Paste", "لصق"),
+ ("Hyphenation…", "الواصلة…"),
+ ("Hyphenation Settings", "إعدادات الواصلة"),
+ ("hyphens", "واصلات"),
+ ("Hyphenation Zone:", "منطقة الواصلة:"),
+ ("Better Spacing", "تباعد أفضل"),
+ ("Fewer Hyphens", "واصلات أقل"),
+ ("Hyphenate Capitalized Words", "وصل الكلمات ذات الأحرف الكبيرة"),
+ ("Hyphenate Last Word", "وصل الكلمة الأخيرة"),
+ ("Hyphenate Across Column", "الوصل عبر الأعمدة"),
+ ("Vertical Scale", "المقياس الرأسي"),
+ ("Horizontal Scale", "المقياس الأفقي"),
+ ("Baseline Shift", "إزاحة خط الأساس"),
+ ("Skew (False Italic)", "إمالة (مائل زائف)"),
+ ("Left Indent", "مسافة بادئة يسرى"),
+ ("Right Indent", "مسافة بادئة يمنى"),
+ ("First Line Left Indent", "مسافة بادئة يسرى للسطر الأول"),
+ ("Last Line Right Indent", "مسافة بادئة يمنى للسطر الأخير"),
+ ("Drop Cap Number of Lines", "عدد أسطر الحرف الاستهلالي"),
+ ("Drop Cap One or More Characters", "حرف استهلالي واحد أو أكثر"),
+ ("Align to Baseline Grid", "محاذاة إلى شبكة خط الأساس"),
("Paste Vector Art", "لصق رسم متجه"),
("Baseline Options", "خيارات خط الأساس"),
("Fixed Number", "عدد ثابت"),
diff --cc crates/ui-egui/src/i18n/cs.rs
index 50af0c218,8f8c146f2..fbd874d2c
--- a/crates/ui-egui/src/i18n/cs.rs
+++ b/crates/ui-egui/src/i18n/cs.rs
@@@ -31,15 -31,17 +31,26 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "Vyjmout"),
("Copy", "Kopírovat"),
("Paste", "Vložit"),
+ ("Hyphenation…", "Dělení slov…"),
+ ("Hyphenation Settings", "Nastavení dělení slov"),
+ ("hyphens", "spojovníky"),
+ ("Hyphenation Zone:", "Zóna dělení:"),
+ ("Better Spacing", "Lepší mezery"),
+ ("Fewer Hyphens", "Méně spojovníků"),
+ ("Hyphenate Capitalized Words", "Dělit slova s velkým počátečním písmenem"),
+ ("Hyphenate Last Word", "Dělit poslední slovo"),
+ ("Hyphenate Across Column", "Dělit přes sloupce"),
+ ("Vertical Scale", "Svislá změna velikosti"),
+ ("Horizontal Scale", "Vodorovná změna velikosti"),
+ ("Baseline Shift", "Posun účaří"),
+ ("Skew (False Italic)", "Zkosení (nepravá kurzíva)"),
+ ("Left Indent", "Odsazení zleva"),
+ ("Right Indent", "Odsazení zprava"),
+ ("First Line Left Indent", "Odsazení prvního řádku zleva"),
+ ("Last Line Right Indent", "Odsazení posledního řádku zprava"),
+ ("Drop Cap Number of Lines", "Počet řádků iniciály"),
+ ("Drop Cap One or More Characters", "Iniciála: jeden nebo více znaků"),
+ ("Align to Baseline Grid", "Zarovnat na mřížku účaří"),
("Reverse Path", "Obrátit cestu"),
("Set Anchor", "Nastavit kotvu"),
("Clear", "Vymazat"),
diff --cc crates/ui-egui/src/i18n/it.rs
index 125f6013d,052dfd2b2..2ec371480
--- a/crates/ui-egui/src/i18n/it.rs
+++ b/crates/ui-egui/src/i18n/it.rs
@@@ -28,15 -28,17 +28,26 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "Taglia"),
("Copy", "Copia"),
("Paste", "Incolla"),
+ ("Hyphenation…", "Sillabazione…"),
+ ("Hyphenation Settings", "Impostazioni sillabazione"),
+ ("hyphens", "trattini"),
+ ("Hyphenation Zone:", "Area di sillabazione:"),
+ ("Better Spacing", "Spaziatura migliore"),
+ ("Fewer Hyphens", "Meno trattini"),
+ ("Hyphenate Capitalized Words", "Sillaba parole con iniziale maiuscola"),
+ ("Hyphenate Last Word", "Sillaba ultima parola"),
+ ("Hyphenate Across Column", "Sillaba tra colonne"),
+ ("Vertical Scale", "Scala verticale"),
+ ("Horizontal Scale", "Scala orizzontale"),
+ ("Baseline Shift", "Spostamento linea di base"),
+ ("Skew (False Italic)", "Inclinazione (falso corsivo)"),
+ ("Left Indent", "Rientro sinistro"),
+ ("Right Indent", "Rientro destro"),
+ ("First Line Left Indent", "Rientro sinistro prima riga"),
+ ("Last Line Right Indent", "Rientro destro ultima riga"),
+ ("Drop Cap Number of Lines", "Capolettera: numero di righe"),
+ ("Drop Cap One or More Characters", "Capolettera: uno o più caratteri"),
+ ("Align to Baseline Grid", "Allinea alla griglia di base"),
("Paste Vector Art", "Incolla grafica vettoriale"),
("Baseline Options", "Opzioni linea di base"),
("Fixed Number", "Numero fisso"),
diff --cc crates/ui-egui/src/i18n/ka.rs
index 40abcf9ad,774157fe9..c51bfede5
--- a/crates/ui-egui/src/i18n/ka.rs
+++ b/crates/ui-egui/src/i18n/ka.rs
@@@ -31,15 -31,17 +31,26 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "ამოჭრა"),
("Copy", "კოპირება"),
("Paste", "ჩასმა"),
+ ("Hyphenation…", "დამარცვლა…"),
+ ("Hyphenation Settings", "დამარცვლის პარამეტრები"),
+ ("hyphens", "დეფისი"),
+ ("Hyphenation Zone:", "დამარცვლის ზონა:"),
+ ("Better Spacing", "უკეთესი დაშორება"),
+ ("Fewer Hyphens", "ნაკლები დეფისი"),
+ ("Hyphenate Capitalized Words", "მთავრული სიტყვების დამარცვლა"),
+ ("Hyphenate Last Word", "ბოლო სიტყვის დამარცვლა"),
+ ("Hyphenate Across Column", "სვეტებს შორის დამარცვლა"),
+ ("Vertical Scale", "ვერტიკალური მასშტაბი"),
+ ("Horizontal Scale", "ჰორიზონტალური მასშტაბი"),
+ ("Baseline Shift", "საბაზო ხაზის წანაცვლება"),
+ ("Skew (False Italic)", "დახრა (ცრუ კურსივი)"),
+ ("Left Indent", "მარცხენა შეწევა"),
+ ("Right Indent", "მარჯვენა შეწევა"),
+ ("First Line Left Indent", "პირველი სტრიქონის მარცხენა შეწევა"),
+ ("Last Line Right Indent", "ბოლო სტრიქონის მარჯვენა შეწევა"),
+ ("Drop Cap Number of Lines", "ინიციალის სტრიქონების რაოდენობა"),
+ ("Drop Cap One or More Characters", "ინიციალი: ერთი ან მეტი სიმბოლო"),
+ ("Align to Baseline Grid", "საბაზო ბადეზე სწორება"),
("Inches Decimal", "ინჩები (ათობითი)"),
("Back", "უკან"),
("Warning", "გაფრთხილება"),
diff --cc crates/ui-egui/src/i18n/pl.rs
index 5429ccb67,dfb1492cf..50f361864
--- a/crates/ui-egui/src/i18n/pl.rs
+++ b/crates/ui-egui/src/i18n/pl.rs
@@@ -29,15 -29,17 +29,26 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "Wytnij"),
("Copy", "Kopiuj"),
("Paste", "Wklej"),
+ ("Hyphenation…", "Dzielenie wyrazów…"),
+ ("Hyphenation Settings", "Ustawienia dzielenia wyrazów"),
+ ("hyphens", "dywizy"),
+ ("Hyphenation Zone:", "Strefa dzielenia:"),
+ ("Better Spacing", "Lepsze odstępy"),
+ ("Fewer Hyphens", "Mniej dywizów"),
+ ("Hyphenate Capitalized Words", "Dziel wyrazy pisane wielką literą"),
+ ("Hyphenate Last Word", "Dziel ostatni wyraz"),
+ ("Hyphenate Across Column", "Dziel między łamami"),
+ ("Vertical Scale", "Skala pionowa"),
+ ("Horizontal Scale", "Skala pozioma"),
+ ("Baseline Shift", "Przesunięcie linii bazowej"),
+ ("Skew (False Italic)", "Pochylenie (fałszywa kursywa)"),
+ ("Left Indent", "Wcięcie z lewej"),
+ ("Right Indent", "Wcięcie z prawej"),
+ ("First Line Left Indent", "Wcięcie pierwszego wiersza z lewej"),
+ ("Last Line Right Indent", "Wcięcie ostatniego wiersza z prawej"),
+ ("Drop Cap Number of Lines", "Inicjał: liczba wierszy"),
+ ("Drop Cap One or More Characters", "Inicjał: jeden lub więcej znaków"),
+ ("Align to Baseline Grid", "Wyrównaj do siatki linii bazowych"),
("Clear", "Wyczyść"),
("Duplicate", "Powiel"),
("Select All", "Zaznacz wszystko"),
diff --cc crates/ui-egui/src/i18n/pt_br.rs
index 5fa35b6b8,12f47288b..cbe86d915
--- a/crates/ui-egui/src/i18n/pt_br.rs
+++ b/crates/ui-egui/src/i18n/pt_br.rs
@@@ -31,15 -31,17 +31,26 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "Recortar"),
("Copy", "Copiar"),
("Paste", "Colar"),
+ ("Hyphenation…", "Hifenização…"),
+ ("Hyphenation Settings", "Configurações de hifenização"),
+ ("hyphens", "hifens"),
+ ("Hyphenation Zone:", "Zona de hifenização:"),
+ ("Better Spacing", "Melhor espaçamento"),
+ ("Fewer Hyphens", "Menos hifens"),
+ ("Hyphenate Capitalized Words", "Hifenizar palavras iniciadas por maiúscula"),
+ ("Hyphenate Last Word", "Hifenizar última palavra"),
+ ("Hyphenate Across Column", "Hifenizar entre colunas"),
+ ("Vertical Scale", "Escala vertical"),
+ ("Horizontal Scale", "Escala horizontal"),
+ ("Baseline Shift", "Deslocamento da linha de base"),
+ ("Skew (False Italic)", "Inclinação (falso itálico)"),
+ ("Left Indent", "Recuo à esquerda"),
+ ("Right Indent", "Recuo à direita"),
+ ("First Line Left Indent", "Recuo à esquerda da primeira linha"),
+ ("Last Line Right Indent", "Recuo à direita da última linha"),
+ ("Drop Cap Number of Lines", "Capitular: número de linhas"),
+ ("Drop Cap One or More Characters", "Capitular: um ou mais caracteres"),
+ ("Align to Baseline Grid", "Alinhar à grade de linha de base"),
("Paste Vector Art", "Colar arte vetorial"),
("Baseline Options", "Opções de linha de base"),
("Fixed Number", "Número fixo"),
diff --cc crates/ui-egui/src/i18n/ru.rs
index 599537cac,8575572f6..f99f23b88
--- a/crates/ui-egui/src/i18n/ru.rs
+++ b/crates/ui-egui/src/i18n/ru.rs
@@@ -33,15 -33,17 +33,26 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "Вырезать"),
("Copy", "Копировать"),
("Paste", "Вставить"),
+ ("Hyphenation…", "Расстановка переносов…"),
+ ("Hyphenation Settings", "Параметры расстановки переносов"),
+ ("hyphens", "дефисов"),
+ ("Hyphenation Zone:", "Зона переносов:"),
+ ("Better Spacing", "Лучшие интервалы"),
+ ("Fewer Hyphens", "Меньше переносов"),
+ ("Hyphenate Capitalized Words", "Переносить слова с прописной буквы"),
+ ("Hyphenate Last Word", "Переносить последнее слово"),
+ ("Hyphenate Across Column", "Переносить между колонками"),
+ ("Vertical Scale", "Масштаб по вертикали"),
+ ("Horizontal Scale", "Масштаб по горизонтали"),
+ ("Baseline Shift", "Смещение базовой линии"),
+ ("Skew (False Italic)", "Наклон (ложный курсив)"),
+ ("Left Indent", "Отступ слева"),
+ ("Right Indent", "Отступ справа"),
+ ("First Line Left Indent", "Отступ первой строки слева"),
+ ("Last Line Right Indent", "Отступ последней строки справа"),
+ ("Drop Cap Number of Lines", "Буквица: число строк"),
+ ("Drop Cap One or More Characters", "Буквица: один или несколько символов"),
+ ("Align to Baseline Grid", "Выровнять по сетке базовых линий"),
("Clear", "Очистить"),
("Duplicate", "Дублировать"),
("Select All", "Выделить все"),
diff --cc crates/ui-egui/src/i18n/uk.rs
index 060a7d43b,98486f2a5..e6455ccca
--- a/crates/ui-egui/src/i18n/uk.rs
+++ b/crates/ui-egui/src/i18n/uk.rs
@@@ -29,15 -29,17 +29,26 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "Вирізати"),
("Copy", "Копіювати"),
("Paste", "Вставити"),
+ ("Hyphenation…", "Перенесення…"),
+ ("Hyphenation Settings", "Параметри перенесення"),
+ ("hyphens", "дефісів"),
+ ("Hyphenation Zone:", "Зона перенесення:"),
+ ("Better Spacing", "Кращі інтервали"),
+ ("Fewer Hyphens", "Менше перенесень"),
+ ("Hyphenate Capitalized Words", "Переносити слова з великої літери"),
+ ("Hyphenate Last Word", "Переносити останнє слово"),
+ ("Hyphenate Across Column", "Переносити між колонками"),
+ ("Vertical Scale", "Масштаб по вертикалі"),
+ ("Horizontal Scale", "Масштаб по горизонталі"),
+ ("Baseline Shift", "Зсув базової лінії"),
+ ("Skew (False Italic)", "Нахил (несправжній курсив)"),
+ ("Left Indent", "Відступ ліворуч"),
+ ("Right Indent", "Відступ праворуч"),
+ ("First Line Left Indent", "Відступ першого рядка ліворуч"),
+ ("Last Line Right Indent", "Відступ останнього рядка праворуч"),
+ ("Drop Cap Number of Lines", "Буквиця: кількість рядків"),
+ ("Drop Cap One or More Characters", "Буквиця: один або кілька символів"),
+ ("Align to Baseline Grid", "Вирівняти за сіткою базових ліній"),
("Paste Vector Art", "Вставити векторну графіку"),
("Baseline Options", "Параметри базової лінії"),
("Fixed Number", "Фіксована кількість"),