i18n: Create Gradient Mesh dialog shows its labels translated

Object › Create Gradient Mesh… opens the generic parameter dialog with
rows, cols, appearance and highlight. The labels look up the strings
"Rows" and "Cols", which no catalog had, so they stayed in English.
The "cols" key is now labeled Columns, and every complete catalog gets
plain "Rows" and "Columns" entries with the wording of its existing
"Rows:" and "Columns:" entries. The heading is translated through the
heading lookup this branch builds on.

The "cols" label is shared by every generic parameter dialog, so Repeat
Options for a grid repeat and plug-in parameters named "cols" without a
label of their own now read Columns too. Repeat Options also labels
"flipCols" Flip Columns, to match.

Part of #7991.
This commit is contained in:
dotCooCoo committed 2026-11-16 16:44:16 -08:00
1 parent 9467e66b5b
commit 56d58735f7
30 files changed
+108

No files matched your search

+50
View File
@@ -505,6 +505,56 @@ mod tests {
assert_eq!(cols(&app), 2, "one Undo takes the whole change back");
}
/// Grid Repeat Options labels its column fields Columns and Flip Columns, as the Rows and Flip
/// Rows fields beside them are spelled out.
#[test]
fn grid_repeat_options_spell_out_columns() {
let mut app = grid_options_app();
let shown = crate::tests_labels::painted_text(&mut app, |app, ui| crate::dialogs::show(app, ui.ctx()));
for s in ["Rows:", "Columns:", "Flip Rows:", "Flip Columns:"] {
assert!(shown.contains(s), "{s} in {shown}");
}
assert!(!shown.contains("Cols"), "no Cols label: {shown}");
}
/// Object › Create Gradient Mesh… opens this dialog with the menu's rows, cols, appearance and
/// highlight. In French the heading and the four labels are translated, and "cols" is labeled
/// Columns (#7991).
#[test]
fn create_gradient_mesh_dialog_is_drawn_in_the_ui_language() {
let mut app = VectorcraftApp::new(Session::new(), Default::default());
app.run("file.new", json!({"width": 200, "height": 200})).unwrap();
app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 50, "height": 50})).unwrap();
let entries = crate::menus::menu_entries(&app);
let item = entries.iter().find(|e| e.path == ["Object"] && e.label == "Create Gradient Mesh…").expect("listed");
let (cmd, p) = crate::menus::click_target(&item.label, item.command.as_deref().unwrap(), &item.params);
crate::menus::invoke(&mut app, &cmd, p);
assert_eq!(app.ui.dialog.as_ref().unwrap().str("__label"), "Create Gradient Mesh");
assert_eq!(form::humanize("cols"), "Columns:");
crate::i18n::set_current(crate::i18n::Lang::from_code("fr").unwrap());
let shown = crate::tests_labels::painted_text(&mut app, |app, ui| crate::dialogs::show(app, ui.ctx()));
let heading = heading_label(app.ui.dialog.as_ref().unwrap());
crate::i18n::set_current(crate::i18n::Lang::EN);
assert_eq!(heading, "Créer un filet de dégradé");
for s in ["Créer un filet de dégradé", "Lignes", "Colonnes", "Aspect"] {
assert!(shown.contains(s), "{s} in {shown}");
}
for s in ["Create Gradient Mesh", "Rows", "Cols", "Columns", "Appearance", "Highlight"] {
assert!(!shown.contains(s), "{s} left in English: {shown}");
}
// Every language with complete menus heads the dialog as the menu item reads and has the
// four labels.
for lang in crate::i18n::Lang::all().filter(|l| l.complete_menus()) {
let menu = crate::i18n::tr(lang, &item.label);
assert_ne!(menu, item.label, "{}: menu item", lang.code());
assert_eq!(heading_in(lang, "Create Gradient Mesh"), menu.trim_end_matches('…').trim_end(), "{}: heading", lang.code());
for key in ["rows", "cols", "appearance", "highlight"] {
let label = form::humanize(key);
assert!(crate::i18n::has(lang, label.trim_end_matches(':')), "{}: {label}", lang.code());
}
}
}
/// Radial and Mirror Repeat Options have no Preview (their public pages list none): their
/// fields apply on OK only, and the dialog takes no `preview`.
#[test]
+2
View File
@@ -828,6 +828,8 @@ pub(crate) fn humanize(k: &str) -> String {
"Create" => "Create New Fields by:".into(),
"Height Width" => "Height/Width:".into(),
"Traps With Process Color" => "Traps with Process Color:".into(),
"Cols" => "Columns:".into(),
"Flip Cols" => "Flip Columns:".into(),
_ => format!("{s}:"),
}
}
+2
View File
@@ -565,6 +565,7 @@ font-technology Variable Променливи
Colors Цветове
Colors: Цветове:
Column Graph Tool Инструмент „Колонна диаграма“
Columns Колони
Columns: Колони:
Column… Колона…
Combine Slices Обединяване на парчетата
@@ -3030,6 +3031,7 @@ digits Malayalam Малаялам
Rounded Rectangle Tool Инструмент „Закръглен правоъгълник“
Rounded Rectangle… Закръглен правоъгълник…
Row Size: Размер на реда:
Rows Ленти
Rows: Ленти:
Rule: Линия:
Rulers Линийки
Can't render this file because it is too large.
+2
View File
@@ -2733,6 +2733,7 @@ digits Malayalam Malajalam
BLANK DOCUMENT PRESETS PREDLOŠCI PRAZNIH DOKUMENATA
Bleed Napust
Change to Right-to-Left Layout Prebaci na raspored s desna nalijevo
Columns Kolone
Columns: Kolone:
Documents you create appear here. Dokumenti koje kreirate pojavljuju se ovdje.
More Settings Više postavki
@@ -2919,6 +2920,7 @@ digits Malayalam Malajalam
Layout Order: Redoslijed rasporeda:
Change to Left-to-Right Layout Prebaci na raspored s lijeva nadesno
Artboards: {n} Radne ploče: {n}
Rows Redovi
Rows: Redovi:
Assign Dodijeli
Color Group: Grupa boja:
Can't render this file because it contains an unexpected character in line 2 and column 73.
+2
View File
@@ -840,6 +840,7 @@ antiAlias Sharp Nítid
Column Graph Tool Eina de gràfic de columnes
Column Type: Tipus de columna:
Column Width: Amplada de columna:
Columns Columnes
Columns: Columnes:
Column… Columna…
Combine Slices Combina els talls
@@ -3888,6 +3889,7 @@ digits Malayalam Malaiàlam
Rounded Rectangle… Rectangle arrodonit…
Roundness: Arrodoniment:
Row Size: Mida de la fila:
Rows Files
Rows: Files:
Ruby Rubí
Ruby… Rubí…
Can't render this file because it contains an unexpected character in line 2 and column 73.
+2
View File
@@ -2817,6 +2817,7 @@ digits Malayalam Malajálamské
BLANK DOCUMENT PRESETS PŘEDNASTAVENÍ PRÁZDNÝCH DOKUMENTŮ
Bleed Spadávka
Change to Right-to-Left Layout Změnit na rozvržení zprava doleva
Columns Sloupce
Columns: Sloupce:
Documents you create appear here. Zde se zobrazí dokumenty, které vytvoříte.
More Settings Další nastavení
@@ -3004,6 +3005,7 @@ digits Malayalam Malajálamské
Layout Order: Pořadí rozvržení:
Change to Left-to-Right Layout Změnit na rozvržení zleva doprava
Artboards: {n} Pracovní plochy: {n}
Rows Řádky
Rows: Řádky:
Assign Přiřadit
Color Group: Skupina barev:
Can't render this file because it is too large.
+2
View File
@@ -5284,6 +5284,7 @@ digits Malayalam Malayalam
BLANK DOCUMENT PRESETS TOMME DOKUMENTFORUDINDSTILLINGER
Bleed Beskæring
Change to Right-to-Left Layout Skift til højre-til-venstre-layout
Columns Kolonner
Columns: Kolonner:
Documents you create appear here. Dokumenter, du opretter, vises her.
More Settings Flere indstillinger
@@ -5471,6 +5472,7 @@ digits Malayalam Malayalam
Layout Order: Layoutrækkefølge:
Change to Left-to-Right Layout Skift til venstre-til-højre-layout
Artboards: {n} Tegnebrætter: {n}
Rows Rækker
Rows: Rækker:
Assign Tildel
Color Group: Farvegruppe:
Can't render this file because it is too large.
+2
View File
@@ -558,6 +558,7 @@ font-technology Variable Variabel
Colors Farben
Colors: Farben:
Column Graph Tool Säulendiagramm-Werkzeug
Columns Spalten
Columns: Spalten:
Column… Säule…
Combine Slices Slices kombinieren
@@ -3080,6 +3081,7 @@ digits Malayalam Malayalam
Rounded Rectangle Tool Abgerundetes-Rechteck-Werkzeug
Rounded Rectangle… Abgerundetes Rechteck…
Row Size: Zeilengröße:
Rows Zeilen
Rows: Zeilen:
Rule: Regel:
Rulers Lineale
Can't render this file because it is too large.
+2
View File
@@ -540,6 +540,7 @@ font-technology Variable Μεταβλητές
Colors Χρώματα
Colors: Χρώματα:
Column Graph Tool Γράφημα στηλών (Column Graph Tool)
Columns Στήλες
Columns: Στήλες:
Column… Στήλη…
Combine Slices Συνδυασμός τομών
@@ -2109,6 +2110,7 @@ font-technology Variable Μεταβλητές
Show Bounding Box While Moving and Drawing Εμφάνιση πλαισίου οριοθέτησης κατά τη μετακίνηση και τη σχεδίαση
Rotate… Περιστροφή…
Rotation Περιστροφή
Rows Γραμμές
Rows: Γραμμές:
Rulers Χάρακες
Rulers & Grids Χάρακες και πλέγματα
Can't render this file because it is too large.
+2
View File
@@ -580,6 +580,7 @@ font-technology Variable Variables
Colors Colores
Colors: Colores:
Column Graph Tool Herramienta Gráfico de columnas
Columns Columnas
Columns: Columnas:
Column… Columna…
Combine Slices Combinar sectores
@@ -3120,6 +3121,7 @@ digits Malayalam Malayálam
Rounded Rectangle Tool Herramienta Rectángulo redondeado
Rounded Rectangle… Rectángulo redondeado…
Row Size: Tamaño de fila:
Rows Filas
Rows: Filas:
Rule: Filete:
Rulers Reglas
Can't render this file because it contains an unexpected character in line 2 and column 73.
+2
View File
@@ -2761,6 +2761,7 @@ digits Malayalam Malajalam
BLANK DOCUMENT PRESETS TYHJÄN ASIAKIRJAN ESIASETUKSET
Bleed Leikkuuvara
Change to Right-to-Left Layout Vaihda oikealta vasemmalle -asetteluun
Columns Sarakkeet
Columns: Sarakkeet:
Documents you create appear here. Luomasi asiakirjat näkyvät tässä.
More Settings Lisää asetuksia
@@ -2948,6 +2949,7 @@ digits Malayalam Malajalam
Layout Order: Asettelujärjestys:
Change to Left-to-Right Layout Vaihda vasemmalta oikealle -asetteluun
Artboards: {n} Piirtoalustat: {n}
Rows Rivit
Rows: Rivit:
Assign Määritä
Color Group: Väriryhmä:
Can't render this file because it contains an unexpected character in line 2 and column 73.
+2
View File
@@ -581,6 +581,7 @@ font-technology Variable Variables
Colors Couleurs
Colors: Couleurs :
Column Graph Tool Outil Graphe à barres verticales
Columns Colonnes
Columns: Colonnes :
Column… Colonne…
Combine Slices Combiner les tranches
@@ -3108,6 +3109,7 @@ digits Malayalam Malayalam
Rounded Rectangle Tool Outil Rectangle arrondi
Rounded Rectangle… Rectangle arrondi…
Row Size: Taille des lignes :
Rows Lignes
Rows: Lignes :
Rule: Règle :
Rulers Règles
Can't render this file because it is too large.
+2
View File
@@ -665,6 +665,7 @@
Column Graph Tool કૉલમ ગ્રાફ ટૂલ
Column Type: કૉલમ પ્રકાર:
Column Width: કૉલમ પહોળાઈ:
Columns કૉલમ
Columns: કૉલમ:
Column… કૉલમ…
Combine Point Text પોઇન્ટ ટેક્સ્ટ જોડો
@@ -3191,6 +3192,7 @@
Rounded Rectangle… ગોળાકાર લંબચોરસ…
Roundness: ગોળાઈ:
Row Size: પંક્તિનું માપ:
Rows પંક્તિઓ
Rows: પંક્તિઓ:
Ruby રૂબી
Ruby… રૂબી…
Can't render this file because it contains an unexpected character in line 72 and column 5.
+2
View File
@@ -973,6 +973,7 @@ antiAlias Sharp शार्प
Column Type: स्तंभ प्रकार:
Column Width: कॉलम चौड़ाई:
Column… स्तंभ…
Columns कॉलम
Columns: कॉलम:
Combine Point Text पॉइंट टेक्स्ट को मिलाएं
Combine Slices संयोजन स्लाइस
@@ -4263,6 +4264,7 @@ antiAlias Sharp शार्प
Rounded Rectangle… गोल आयत…
Roundness: राउंडनेस:
Row Size: पंक्ति का आकार:
Rows पंक्तियाँ
Rows: पंक्तियाँ:
Ruby रूबी
Ruby… रूबी…
Can't render this file because it is too large.
+2
View File
@@ -762,6 +762,7 @@ font-technology Variable Változó
Colors Színek
Colors: Színek:
Column Graph Tool Oszlopdiagram
Columns Oszlopok
Columns: Oszlopok:
Column… Oszlop…
Combine Slices Szeletek egyesítése
@@ -3725,6 +3726,7 @@ mark-style Japanese Japán
Rounded Rectangle… Lekerekített téglalap…
Roundness: Kerekség:
Row Size: Sorméret:
Rows Sorok
Rows: Sorok:
Rule: Szabály:
Ruler Origin Vonalzók origója
Can't render this file because it is too large.
+2
View File
@@ -2542,6 +2542,7 @@ digits Malayalam Malayalam
BLANK DOCUMENT PRESETS PRESET DOKUMEN KOSONG
Bleed Bleed
Change to Right-to-Left Layout Ubah ke tata letak kanan ke kiri
Columns Kolom
Columns: Kolom:
Documents you create appear here. Dokumen yang Anda buat muncul di sini.
More Settings Pengaturan lainnya
@@ -2729,6 +2730,7 @@ digits Malayalam Malayalam
Layout Order: Urutan tata letak:
Change to Left-to-Right Layout Ubah ke tata letak kiri ke kanan
Artboards: {n} Artboard: {n}
Rows Baris
Rows: Baris:
Assign Tetapkan
Color Group: Grup warna:
Can't render this file because it contains an unexpected character in line 2495 and column 5.
+2
View File
@@ -580,6 +580,7 @@ font-technology Variable Variabili
Colors Colori
Colors: Colori:
Column Graph Tool Strumento Grafico a colonne
Columns Colonne
Columns: Colonne:
Column… Colonna…
Combine Slices Combina sezioni
@@ -3161,6 +3162,7 @@ digits Malayalam Malayalam
Rounded Rectangle Tool Strumento Rettangolo arrotondato
Rounded Rectangle… Rettangolo arrotondato…
Row Size: Dimensione riga:
Rows Righe
Rows: Righe:
Rule: Regola:
Rulers Righelli
Can't render this file because it is too large.
+2
View File
@@ -1351,6 +1351,7 @@ antiAlias Sharp シャープ
Colors カラー
Colors: カラー数:
Column Graph Tool 集合縦棒グラフツール
Columns 列数
Columns: 列数:
Coming soon — tracked in the parity plan 近日対応予定
Command Click to Select Objects Behind Command+クリックで背面のオブジェクトを選択
@@ -3119,6 +3120,7 @@ mark-style Japanese 日本式
Rounded Rectangle 角丸長方形
Rounded Rectangle Tool 角丸長方形ツール
Row Size: 行のサイズ:
Rows 行数
Rows: 行数:
Rule: ルール:
Rulers & Grids 定規とグリッド
Can't render this file because it is too large.
+2
View File
@@ -4599,6 +4599,7 @@ digits Malayalam მალაიალამური
BLANK DOCUMENT PRESETS ცარიელი დოკუმენტის პრესეტები
Bleed ჭრისპირა არე
Change to Right-to-Left Layout მარჯვნიდან მარცხნივ განლაგებაზე გადასვლა
Columns სვეტები
Columns: სვეტები:
Documents you create appear here. თქვენ მიერ შექმნილი დოკუმენტები აქ გამოჩნდება.
More Settings მეტი პარამეტრი
@@ -4782,6 +4783,7 @@ digits Malayalam მალაიალამური
Layout Order: განლაგების რიგი:
Change to Left-to-Right Layout მარცხნიდან მარჯვნივ განლაგებაზე გადასვლა
Artboards: {n} სამუშაო დაფა: {n}
Rows სტრიქონები
Rows: სტრიქონები:
Assign მინიჭება
Color Group: ფერთა ჯგუფი:
Can't render this file because it is too large.
+2
View File
@@ -1341,6 +1341,7 @@ antiAlias Sharp 날카롭게
Colors 색상
Colors: 색상:
Column Graph Tool 세로 막대 그래프 도구
Columns 열
Columns: 열:
Coming soon — tracked in the parity plan 곧 제공 예정 — 기능 동등성 계획에서 관리 중
Command Click to Select Objects Behind Command-클릭으로 뒤쪽 개체 선택
@@ -3108,6 +3109,7 @@ mark-style Japanese 일본식
Rounded Rectangle 둥근 사각형
Rounded Rectangle Tool 둥근 사각형 도구
Row Size: 행 크기:
Rows 행
Rows: 행:
Rule: 규칙:
Rulers & Grids 눈금자 및 격자
Can't render this file because it is too large.
+2
View File
@@ -3159,6 +3159,7 @@ digits Malayalam Malayalam
BLANK DOCUMENT PRESETS LEGE DOCUMENTVOORINSTELLINGEN
Bleed Afrulling
Change to Right-to-Left Layout Omschakelen naar lay-out van rechts naar links
Columns Kolommen
Columns: Kolommen:
Documents you create appear here. Documenten die je maakt, verschijnen hier.
More Settings Meer instellingen
@@ -3346,6 +3347,7 @@ digits Malayalam Malayalam
Layout Order: Indelingsvolgorde:
Change to Left-to-Right Layout Omschakelen naar lay-out van links naar rechts
Artboards: {n} Tekenborden: {n}
Rows Rijen
Rows: Rijen:
Assign Toewijzen
Color Group: Kleurgroep:
Can't render this file because it is too large.
+2
View File
@@ -2731,6 +2731,7 @@ digits Malayalam Malajalam
BLANK DOCUMENT PRESETS USTAWIENIA PUSTEGO DOKUMENTU
Bleed Spad
Change to Right-to-Left Layout Zmień na układ od prawej do lewej
Columns Kolumny
Columns: Kolumny:
Documents you create appear here. Tu pojawią się utworzone dokumenty.
More Settings Więcej ustawień
@@ -2916,6 +2917,7 @@ digits Malayalam Malajalam
Layout Order: Kolejność układu:
Change to Left-to-Right Layout Zmień na układ od lewej do prawej
Artboards: {n} Obszary kompozycji: {n}
Rows Wiersze
Rows: Wiersze:
Assign Przypisz
Color Group: Grupa kolorów:
Can't render this file because it is too large.
+2
View File
@@ -529,6 +529,7 @@ antiAlias Sharp Nítido
Colors Cores
Colors: Cores:
Column Graph Tool Ferramenta Gráfico de Colunas
Columns Colunas
Columns: Colunas:
Column… Coluna…
Combine Slices Combinar Fatias
@@ -2604,6 +2605,7 @@ digits Malayalam Malaiala
Rounded Rectangle Retângulo Arredondado
Rounded Rectangle Tool Ferramenta Retângulo Arredondado
Rounded Rectangle… Retângulo Arredondado…
Rows Linhas
Rows: Linhas:
Rule: Regra:
Rulers Réguas
Can't render this file because it is too large.
+2
View File
@@ -578,6 +578,7 @@ font-technology Variable Вариативные
Colors Цвета
Colors: Цвета:
Column Graph Tool Инструмент «Гистограмма»
Columns Столбцы
Columns: Столбцы:
Column… Столбец…
Combine Slices Объединить фрагменты
@@ -3150,6 +3151,7 @@ digits Malayalam Малаялам
Rounded Rectangle Tool Инструмент «Скруглённый прямоугольник»
Rounded Rectangle… Скруглённый прямоугольник…
Row Size: Размер строки:
Rows Строки
Rows: Строки:
Rule: Линейка:
Rulers Линейки
Can't render this file because it is too large.
+2
View File
@@ -567,6 +567,7 @@ font-technology Variable Variabla
Colors Färger
Colors: Färger:
Column Graph Tool Stapeldiagramverktyg
Columns Kolumner
Columns: Kolumner:
Column… Kolumn…
Combine Slices Kombinera skivor
@@ -3050,6 +3051,7 @@ digits Malayalam Malayalam
Rounded Rectangle Tool Verktyg för rundad rektangel
Rounded Rectangle… Rundad rektangel…
Row Size: Radstorlek:
Rows Rader
Rows: Rader:
Rule: Regel:
Rulers Linjaler
Can't render this file because it is too large.
+2
View File
@@ -561,6 +561,7 @@ font-technology Variable Değişken
Colors Renkler
Colors: Renkler:
Column Graph Tool Sütun Grafiği Aracı
Columns Sütunlar
Columns: Sütunlar:
Column… Sütun…
Combine Slices Dilimleri Birleştir
@@ -2882,6 +2883,7 @@ digits Malayalam Malayalam
Rounded Rectangle Tool Yuvarlak Köşeli Dikdörtgen Aracı
Rounded Rectangle… Yuvarlatılmış Dikdörtgen…
Row Size: Satır Boyutu:
Rows Satırlar
Rows: Satırlar:
Rule: Kural:
Rulers Cetveller
Can't render this file because it is too large.
+2
View File
@@ -574,6 +574,7 @@ font-technology Variable Варіативні
Colors Кольори
Colors: Кольори:
Column Graph Tool Інструмент «Гістограма»
Columns Стовпці
Columns: Стовпці:
Column… Стовпець…
Combine Slices Об’єднати фрагменти
@@ -3153,6 +3154,7 @@ digits Malayalam Малаялам
Rounded Rectangle Tool Інструмент «Округлений прямокутник»
Rounded Rectangle… Округлений прямокутник…
Row Size: Розмір рядка:
Rows Рядки
Rows: Рядки:
Rule: Лінійка:
Rulers Лінійки
Can't render this file because it is too large.
+2
View File
@@ -674,6 +674,7 @@ font-technology Variable Biến thiên
Colors: Màu sắc:
Column Graph Tool Công cụ Biểu đồ cột
Column Width: Chiều rộng cột:
Columns Cột
Columns: Cột:
Column… Cột…
Combine Slices Kết hợp lát cắt
@@ -3486,6 +3487,7 @@ mark-style Japanese Kiểu Nhật
Rounded Rectangle… Hình chữ nhật bo góc…
Roundness: Độ tròn:
Row Size: Kích thước hàng:
Rows Hàng
Rows: Hàng:
Rule: Quy tắc:
Ruler Origin Gốc thước
Can't render this file because it contains an unexpected character in line 205 and column 5.
+2
View File
@@ -525,6 +525,7 @@ antiAlias Sharp 锐利
Colors 颜色数
Colors: 颜色:
Column Graph Tool 柱形图工具
Columns 列数
Columns: 列数:
Column… 列…
Combine Slices 组合切片
@@ -3009,6 +3010,7 @@ digits Malayalam 马拉雅拉姆数字
Rounded Rectangle 圆角矩形
Rounded Rectangle Tool 圆角矩形工具
Rounded Rectangle… 圆角矩形…
Rows 行数
Rows: 行数:
Rule: 规则:
Rulers 标尺
Can't render this file because it is too large.
+2
View File
@@ -542,6 +542,7 @@ font-technology Variable 可變
Colors 顏色
Colors: 顏色:
Column Graph Tool 長條圖工具
Columns 欄數
Columns: 欄數:
Column… 欄…
Combine Slices 合併切片
@@ -4288,6 +4289,7 @@ digits Malayalam 馬來亞拉姆數字
Rounded Rectangle Tool 圓角矩形工具
Rounded Rectangle… 圓角矩形…
Row Size: 列尺寸:
Rows 列數
Rows: 列數:
Rule: 規則線:
Rulers 尺標
Can't render this file because it is too large.