Merge pull request #78 from ShaoWenbinSaleh/multi-language-fix

Complete Arabic translations, refine Chinese terminology, and cache RTL label layouts
This commit is contained in:
Brandon Thomas authored and GitHub committed 2026-10-07 22:46:52 -04:00
commit b05fe0aed4
4 files changed
+826 -175

No files matched your search

+2 -2
View File
@@ -103,7 +103,7 @@ DesignCraft aims at full Adobe InDesign parity — and to be better: faster, ope
- Transparency flattener (`file.exportPdf {flatten: high|medium|low|ppi}`, Edit ▸ Transparency Flattener Presets): each object involving transparency becomes an opaque image of its area over what's beneath it, so everything else stays vector (spreads with transparent parent items are rasterised whole).
- Video and sound (place .mp4/.mov/.webm/.mp3/.wav…, `media.options/get`, Media panel): media frames show a poster or placeholder on screen, in print and in PDF, and export as HTML5 `<video>`/`<audio>` in EPUB. Interactive PDF export (`file.exportPdf {media: true}`, File ▸ Export PDF (Interactive)) embeds each file and plays it in a Screen annotation through a rendition action (controls, loop, play on page load). No in-app playback.
- Right-to-left text (World-Ready basics): right-to-left runs are shaped right to left, lines are reordered by the Unicode Bidirectional Algorithm (matched against the reference implementation), Paragraph Direction (`type.para {direction}`, Paragraph panel, IDML ParagraphDirection, EPUB `dir`). Digits (`digits`: Default, Arabic, Hindi, Farsi, Native by language; Character panel for right-to-left text; IDML DigitsType) draw 0–9 in another script. Kashidas (`kashidas` paragraph attribute, on by default): justified Arabic lines stretch at one join per word (after seen/sad when possible, never inside lam–alef) with a drawn tatweel before word spaces widen. Carets follow the drawing: the caret before a right-to-left glyph sits at its right edge, arrow keys move as drawn (by words in the line's direction), clicks find the nearest drawn caret position and selections highlight the selected glyphs. Binding: Right to Left (Document Setup, `layout.documentSetup {binding}`, IDML PageBinding) makes page 1 a left page and lays spreads out right to left.
- Interface language (Edit ▸ Interface Language, `app.language`): German, French, Spanish, Japanese, Simplified Chinese and Arabic menu titles, common menu items and panel names (our own translations). Common dialog, panel and tooltip labels are also localized, with English fallback for untranslated strings. The Type menu's Story Direction, Horizontal/Vertical, Tate-Chu-Yoko, Ruby… and Kenten are translated too. Arabic labels use Unicode bidi run ordering and contextual shaping; welcome and new-document form layouts follow RTL direction independently of document binding. CJK and Arabic glyphs come from [craft-fonts](https://github.com/storytold/craft-fonts) when built with `CRAFT_FONTS_DIR` (all releases): BIZ UDPGothic and Noto Sans CJK SC for the UI (Chinese forms first in the Chinese interface), Noto Sans Arabic, and Mincho for Japanese documents (the web build embeds BIZ UDPGothic only); otherwise from system fonts.
- Interface language (Edit ▸ Interface Language, `app.language`): German, French, Spanish, Japanese, Simplified Chinese and Arabic menu titles, common menu items and panel names (our own translations). Common dialog, panel and tooltip labels are also localized, with English fallback for untranslated strings. Arabic translations cover every key in the shared interface translation table, including menu commands and utility labels. The Type menu's Story Direction, Horizontal/Vertical, Tate-Chu-Yoko, Ruby… and Kenten are translated too. Arabic labels use Unicode bidi run ordering and contextual shaping; welcome and new-document form layouts follow RTL direction independently of document binding. CJK and Arabic glyphs come from [craft-fonts](https://github.com/storytold/craft-fonts) when built with `CRAFT_FONTS_DIR` (all releases): BIZ UDPGothic and Noto Sans CJK SC for the UI (Chinese forms first in the Chinese interface), Noto Sans Arabic, and Mincho for Japanese documents (the web build embeds BIZ UDPGothic only); otherwise from system fonts.
- Page transitions (`page.transition/transitions`, Page Transitions panel): twelve transition types with speed and direction per spread, written into exported PDFs as `/Trans` entries through an incremental update.
- PDF/X-4 export (`file.exportPdf {standard: "x4"}`): an output intent with our own Generic CMYK ICC profile (lut16 tables generated from the parametric press model), GTS_PDFXVersion in Info and XMP, and built-in PDF/X-4 checks reported as warnings. qpdf finds no errors in the result.
- EPS place: placed at its (high-resolution) bounding box and shown, printed and exported through its TIFF preview, or a placeholder when it has none. PostScript itself isn't interpreted.
@@ -213,7 +213,7 @@ same references), and from the app's JSON control channel. See [docs/agents.md](
| M6 | Files & export (native, IDML, PDF, PNG/JPEG) | in progress (IDML ✅, PDF export) |
| M7 | Long documents (sections, TOC, index, footnotes, books) | in progress (sections, TOC, text variables/running heads, hyperlinks, bookmarks, footnotes, cross-references, index) |
| M8 | Tables | ✅ core (table/cell styles, rotation, diagonal lines pending) |
| M9 | Performance (MT composition, tiles) | in progress (glyph path cache, culling, parallel compose 6.7× faster, perf harness) |
| M9 | Performance (MT composition, tiles) | in progress (glyph path cache, bounded RTL label layout cache, culling, parallel compose 6.7× faster, perf harness) |
| M10 | Find/Change, spelling, Preflight | in progress (Find/Change ✅, spelling ✅, Preflight) |
| M11 | Layout power features (liquid/alternate layouts, data merge) | started (data merge, step & repeat, snippets) |
| M12 | Interactive & digital (EPUB, HTML, interactive PDF) | started (EPUB, PDF links/bookmarks) |
+97 -81
View File
@@ -1,6 +1,8 @@
//! Interface language (Edit › Interface Language): translations of menu titles, the most used
//! menu items and panel names. Untranslated strings stay English. The translations are our own.
use std::{collections::HashMap, sync::OnceLock};
mod ar;
mod pt_br;
@@ -36,14 +38,14 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Save", ["Speichern", "Enregistrer", "Guardar", "保存", "保存"]),
("Save As…", ["Speichern unter …", "Enregistrer sous…", "Guardar como…", "別名で保存…", "另存为…"]),
("Save a Copy…", ["Kopie speichern …", "Enregistrer une copie…", "Guardar una copia…", "コピーを保存…", "保存副本…"]),
("Revert", ["Zurück zur letzten Version", "Version précédente", "Volver a la versión guardada", "復帰", "恢复"]),
("Revert", ["Zurück zur letzten Version", "Version précédente", "Volver a la versión guardada", "復帰", "恢复到上次保存"]),
("Place…", ["Platzieren …", "Importer…", "Colocar…", "配置…", "置入…"]),
("Export PDF…", ["PDF exportieren …", "Exporter en PDF…", "Exportar PDF…", "PDF を書き出し…", "导出PDF…"]),
("Print…", ["Drucken …", "Imprimer…", "Imprimir…", "プリント…", "打印…"]),
("Document Setup…", ["Dokument einrichten …", "Format de document…", "Ajustar documento…", "ドキュメント設定…", "文档设置…"]),
("Package…", ["Verpacken …", "Assembler…", "Empaquetar…", "パッケージ…", "打包…"]),
// Edit.
("Undo", ["Rückgängig", "Annuler", "Deshacer", "取り消し", "撤销"]),
("Undo", ["Rückgängig", "Annuler", "Deshacer", "取り消し", "还原"]),
("Redo", ["Wiederholen", "Rétablir", "Rehacer", "やり直し", "重做"]),
("Cut", ["Ausschneiden", "Couper", "Cortar", "カット", "剪切"]),
("Copy", ["Kopieren", "Copier", "Copiar", "コピー", "复制"]),
@@ -71,16 +73,16 @@ const TABLE: &[(&str, [&str; 5])] = &[
"Options de numérotation et de section…",
"Opciones de numeración y sección…",
"ノンブルとセクション設定…",
"编号和章节选项…",
"页码和章节选项…",
],
),
// Type.
("Story Direction", ["Textrichtung", "Sens du texte", "Dirección del texto", "組み方向", "文章方向"]),
("Horizontal", ["Horizontal", "Horizontal", "Horizontal", "横書き", "水平"]),
("Vertical", ["Vertikal", "Vertical", "Vertical", "縦書き", "垂直"]),
("Tate-Chu-Yoko", ["Tate-Chu-Yoko", "Tate-Chu-Yoko", "Tate-Chu-Yoko", "縦中横", "直排内横排"]),
("Ruby…", ["Ruby …", "Ruby…", "Ruby…", "ルビ…", "注音…"]),
("Kenten", ["Kenten", "Kenten", "Kenten", "圏点", "着重号"]),
("Tate-Chu-Yoko", ["Tate-Chu-Yoko", "Tate-Chu-Yoko", "Tate-Chu-Yoko", "縦中横", "纵中横"]),
("Ruby…", ["Ruby …", "Ruby…", "Ruby…", "ルビ…", "旁注…"]),
("Kenten", ["Kenten", "Kenten", "Kenten", "圏点", "圈点"]),
("Font", ["Schriftart", "Police", "Fuente", "フォント", "字体"]),
("Size", ["Schriftgrad", "Corps", "Tamaño", "サイズ", "大小"]),
("Character", ["Zeichen", "Caractère", "Carácter", "文字", "字符"]),
@@ -123,7 +125,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Screen Mode", ["Bildschirmmodus", "Mode d'affichage", "Modo de pantalla", "スクリーンモード", "屏幕模式"]),
("Grids & Guides", ["Raster und Hilfslinien", "Grilles et repères", "Cuadrículas y guías", "グリッドとガイド", "网格和参考线"]),
("Show Rulers", ["Lineale einblenden", "Afficher les règles", "Mostrar reglas", "定規を表示", "显示标尺"]),
("Snap to Guides", ["An Hilfslinien ausrichten", "Coller aux repères", "Ajustar a las guías", "ガイドにスナップ", "对齐参考线"]),
("Snap to Guides", ["An Hilfslinien ausrichten", "Coller aux repères", "Ajustar a las guías", "ガイドにスナップ", "靠齐参考线"]),
(
"Snap to Document Grid",
[
@@ -131,7 +133,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
"Coller à la grille du document",
"Ajustar a la cuadrícula del documento",
"ドキュメントグリッドにスナップ",
"对齐文档网格",
"靠齐文档网格",
],
),
("Smart Guides", ["Smarte Hilfslinien", "Repères intelligents", "Guías inteligentes", "スマートガイド", "智能参考线"]),
@@ -157,7 +159,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
),
("Smart Dimensions", ["Smarte Maße", "Mesures intelligentes", "Dimensiones inteligentes", "スマートサイズ", "智能尺寸"]),
("Smart Spacing", ["Smarte Abstände", "Espacements intelligents", "Espaciado inteligente", "スマート間隔", "智能间距"]),
("Snap to Zone", ["Fangzone", "Zone de magnétisme", "Zona de ajuste", "スナップゾーン", "吸附范围"]),
("Snap to Zone", ["Fangzone", "Zone de magnétisme", "Zona de ajuste", "スナップゾーン", "靠齐区域"]),
// Window and panels.
("Properties", ["Eigenschaften", "Propriétés", "Propiedades", "プロパティ", "属性"]),
("Layers", ["Ebenen", "Calques", "Capas", "レイヤー", "图层"]),
@@ -168,7 +170,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Gradient", ["Verlauf", "Dégradé", "Degradado", "グラデーション", "渐变"]),
("Align", ["Ausrichten", "Alignement", "Alinear", "整列", "对齐"]),
("Pathfinder", ["Pathfinder", "Pathfinder", "Buscatrazos", "パスファインダー", "路径查找器"]),
("Info", ["Info", "Informations", "Información", "情報", "Info"]),
("Info", ["Info", "Informations", "Información", "情報", "信息"]),
("Library", ["Bibliothek", "Bibliothèque", "Biblioteca", "ライブラリ", "库"]),
("Book", ["Buch", "Livre", "Libro", "ブック", "书籍"]),
("Index", ["Index", "Index", "Índice", "索引", "索引"]),
@@ -179,7 +181,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Media", ["Medien", "Média", "Medios", "メディア", "媒体"]),
("Object States", ["Objektstatus", "États d'objet", "Estados de objeto", "オブジェクトステート", "对象状态"]),
("Buttons and Forms", ["Schaltflächen und Formulare", "Boutons et formulaires", "Botones y formularios", "ボタンとフォーム", "按钮和表单"]),
("Liquid Layout", ["Flüssiges Layout", "Mise en page liquide", "Maquetación líquida", "リキッドレイアウト", "液态版面"]),
("Liquid Layout", ["Flüssiges Layout", "Mise en page liquide", "Maquetación líquida", "リキッドレイアウト", "自适应版面"]),
("Workspace", ["Arbeitsbereich", "Espace de travail", "Espacio de trabajo", "ワークスペース", "工作区"]),
("Split Window", ["Fenster teilen", "Fractionner la fenêtre", "Dividir ventana", "ウィンドウを分割", "拆分窗口"]),
("New Window", ["Neues Fenster", "Nouvelle fenêtre", "Nueva ventana", "新規ウィンドウ", "新建窗口"]),
@@ -200,10 +202,10 @@ const TABLE: &[(&str, [&str; 5])] = &[
"Add to Previous Spread",
["Add to Previous Spread", "Add to Previous Spread", "Add to Previous Spread", "Add to Previous Spread", "添加到上一个跨页"],
),
("Align From:", ["Align From:", "Align From:", "Align From:", "Align From:", "对齐基准:"]),
("Align From:", ["Align From:", "Align From:", "Align From:", "Align From:", "对齐自:"]),
(
"Align to baseline grid",
["Align to baseline grid", "Align to baseline grid", "Align to baseline grid", "Align to baseline grid", "对齐到基线网格"],
["Align to baseline grid", "Align to baseline grid", "Align to baseline grid", "Align to baseline grid", "对齐基线网格"],
),
("Alignment:", ["Alignment:", "Alignment:", "Alignment:", "Alignment:", "对齐:"]),
("All Spots to Process", ["All Spots to Process", "All Spots to Process", "All Spots to Process", "All Spots to Process", "所有专色转四色"]),
@@ -221,7 +223,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Art", ["Art", "Art", "Art", "Art", "画板"]),
("Based On:", ["Based On:", "Based On:", "Based On:", "Based On:", "基于:"]),
("Bleed", ["Bleed", "Bleed", "Bleed", "Bleed", "出血"]),
("Body Rows", ["Body Rows", "Body Rows", "Body Rows", "Body Rows", "正文行"]),
("Body Rows", ["Body Rows", "Body Rows", "Body Rows", "Body Rows", "表体行"]),
("Bottom", ["Bottom", "Bottom", "Bottom", "Bottom", "底部"]),
("Break Link to Style", ["Break Link to Style", "Break Link to Style", "Break Link to Style", "Break Link to Style", "断开与样式的链接"]),
("Bullets and Numbering", ["Bullets and Numbering", "Bullets and Numbering", "Bullets and Numbering", "Bullets and Numbering", "项目符号和编号"]),
@@ -279,7 +281,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Find/Replace Font", ["Find/Replace Font", "Find/Replace Font", "Find/Replace Font", "Find/Replace Font", "查找/替换字体"]),
(
"Fit Content Proportionally",
["Fit Content Proportionally", "Fit Content Proportionally", "Fit Content Proportionally", "Fit Content Proportionally", "按比例调整内容"],
["Fit Content Proportionally", "Fit Content Proportionally", "Fit Content Proportionally", "Fit Content Proportionally", "按比例适合内容"],
),
("Fit Content to Frame", ["Fit Content to Frame", "Fit Content to Frame", "Fit Content to Frame", "Fit Content to Frame", "内容适合框架"]),
("Fitting:", ["Fitting:", "Fitting:", "Fitting:", "Fitting:", "适合:"]),
@@ -299,7 +301,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Header Rows", ["Header Rows", "Header Rows", "Header Rows", "Header Rows", "表头行"]),
("Height", ["Height", "Height", "Height", "Height", "高度"]),
("Height:", ["Height:", "Height:", "Height:", "Height:", "高度:"]),
("High Quality", ["High Quality", "High Quality", "High Quality", "High Quality", "高质量"]),
("High Quality", ["High Quality", "High Quality", "High Quality", "High Quality", "高品质"]),
(
"Horizontal Gridline Every:",
["Horizontal Gridline Every:", "Horizontal Gridline Every:", "Horizontal Gridline Every:", "Horizontal Gridline Every:", "水平网格线间隔:"],
@@ -355,7 +357,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
"拼写错误的单词 → 更正(每行一个):",
],
),
("Mobile", ["Mobile", "Mobile", "Mobile", "Mobile", "移动版"]),
("Mobile", ["Mobile", "Mobile", "Mobile", "Mobile", "移动设备"]),
("Move Selection Here", ["Move Selection Here", "Move Selection Here", "Move Selection Here", "Move Selection Here", "将所选内容移至此处"]),
("Move to Color Group", ["Move to Color Group", "Move to Color Group", "Move to Color Group", "Move to Color Group", "移动到颜色组"]),
("Move to Group", ["Move to Group", "Move to Group", "Move to Group", "Move to Group", "移动到组"]),
@@ -474,9 +476,9 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Separator:", ["Separator:", "Separator:", "Separator:", "Separator:", "分隔符:"]),
(
"Show Prefix/Suffix in:",
["Show Prefix/Suffix in:", "Show Prefix/Suffix in:", "Show Prefix/Suffix in:", "Show Prefix/Suffix in:", "显示前缀/后缀于:"],
["Show Prefix/Suffix in:", "Show Prefix/Suffix in:", "Show Prefix/Suffix in:", "Show Prefix/Suffix in:", "显示前缀/后缀位置:"],
),
("Show Tag Markers", ["Show Tag Markers", "Show Tag Markers", "Show Tag Markers", "Show Tag Markers", "显示标记的框架"]),
("Show Tag Markers", ["Show Tag Markers", "Show Tag Markers", "Show Tag Markers", "Show Tag Markers", "显示标签标志符"]),
("Single-line", ["Single-line", "Single-line", "Single-line", "Single-line", "单行"]),
("Single-line Composer", ["Single-line Composer", "Single-line Composer", "Single-line Composer", "Single-line Composer", "单行排版器"]),
("Size:", ["Size:", "Size:", "Size:", "Size:", "大小:"]),
@@ -487,7 +489,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Speed", ["Speed", "Speed", "Speed", "Speed", "速度"]),
("Star Inset:", ["Star Inset:", "Star Inset:", "Star Inset:", "Star Inset:", "星形内边距:"]),
("Start Page #:", ["Start Page #:", "Start Page #:", "Start Page #:", "Start Page #:", "起始页码:"]),
("Start at:", ["Start at:", "Start at:", "Start at:", "Start at:", "起始于:"]),
("Start at:", ["Start at:", "Start at:", "Start at:", "Start at:", "起始编号:"]),
("Start:", ["Start:", "Start:", "Start:", "Start:", "开始:"]),
("Style Name:", ["Style Name:", "Style Name:", "Style Name:", "Style Name:", "样式名称:"]),
("Style:", ["Style:", "Style:", "Style:", "Style:", "样式:"]),
@@ -545,7 +547,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Polygon", ["Polygon", "Polygon", "Polygon", "Polygon", "多边形"]),
("Characters", ["Characters", "Characters", "Characters", "Characters", "字符"]),
("Image", ["Image", "Image", "Image", "Image", "图像"]),
("Line", ["Line", "Line", "Line", "Line", "线条"]),
("Line", ["Line", "Line", "Line", "Line", "直线"]),
("Path", ["Path", "Path", "Path", "Path", "路径"]),
("No Selection", ["No Selection", "No Selection", "No Selection", "No Selection", "未选择"]),
("Adjust Layout", ["Adjust Layout", "Adjust Layout", "Adjust Layout", "Adjust Layout", "调整版面"]),
@@ -659,7 +661,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
"Allow Selected Spread to Shuffle",
"Allow Selected Spread to Shuffle",
"Allow Selected Spread to Shuffle",
"允许选中的跨页重排",
"允许所选跨页随机排布",
],
),
(
@@ -847,7 +849,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Edit Story", ["Edit Story", "Edit Story", "Edit Story", "Edit Story", "编辑文章"]),
("Edit in Story Editor", ["Edit in Story Editor", "Edit in Story Editor", "Edit in Story Editor", "Edit in Story Editor", "在文章编辑器中编辑"]),
("Endnotes", ["Endnotes", "Endnotes", "Endnotes", "Endnotes", "尾注"]),
("Entire Pasteboard", ["Entire Pasteboard", "Entire Pasteboard", "Entire Pasteboard", "Entire Pasteboard", "整个粘贴板"]),
("Entire Pasteboard", ["Entire Pasteboard", "Entire Pasteboard", "Entire Pasteboard", "Entire Pasteboard", "完整粘贴板"]),
("Erase", ["Erase", "Erase", "Erase", "Erase", "擦除"]),
("Export Book to PDF…", ["Export Book to PDF…", "Export Book to PDF…", "Export Book to PDF…", "Export Book to PDF…", "将书籍导出为 PDF…"]),
(
@@ -890,7 +892,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Find Object", ["Find Object", "Find Object", "Find Object", "Find Object", "查找对象"]),
("Find by Script Label", ["Find by Script Label", "Find by Script Label", "Find by Script Label", "Find by Script Label", "按脚本标签查找"]),
("Find/Replace Font…", ["Find/Replace Font…", "Find/Replace Font…", "Find/Replace Font…", "Find/Replace Font…", "查找/替换字体…"]),
("First Object Above", ["First Object Above", "First Object Above", "First Object Above", "First Object Above", "上方的第一个对象"]),
("First Object Above", ["First Object Above", "First Object Above", "First Object Above", "First Object Above", "上方第一个对象"]),
(
"Fit Selection in Window",
["Fit Selection in Window", "Fit Selection in Window", "Fit Selection in Window", "Fit Selection in Window", "窗口大小适应所选内容"],
@@ -908,7 +910,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Generate QR Code…", ["Generate QR Code…", "Generate QR Code…", "Generate QR Code…", "Generate QR Code…", "生成二维码…"]),
(
"Generate Static Caption",
["Generate Static Caption", "Generate Static Caption", "Generate Static Caption", "Generate Static Caption", "生成静态标题"],
["Generate Static Caption", "Generate Static Caption", "Generate Static Caption", "Generate Static Caption", "生成静态题注"],
),
("Get Story", ["Get Story", "Get Story", "Get Story", "Get Story", "获取文章"]),
("Get Table", ["Get Table", "Get Table", "Get Table", "Get Table", "获取表格"]),
@@ -926,7 +928,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Guides", ["Guides", "Guides", "Guides", "Guides", "参考线"]),
("Hide Menu Item", ["Hide Menu Item", "Hide Menu Item", "Hide Menu Item", "Hide Menu Item", "隐藏菜单项"]),
("Hide/Lock Others", ["Hide/Lock Others", "Hide/Lock Others", "Hide/Lock Others", "Hide/Lock Others", "隐藏/锁定其他"]),
("High Quality Display", ["High Quality Display", "High Quality Display", "High Quality Display", "High Quality Display", "高质量显示"]),
("High Quality Display", ["High Quality Display", "High Quality Display", "High Quality Display", "High Quality Display", "高品质显示"]),
("History", ["History", "History", "History", "History", "历史记录"]),
("Hyphenation Exceptions", ["Hyphenation Exceptions", "Hyphenation Exceptions", "Hyphenation Exceptions", "Hyphenation Exceptions", "断字例外"]),
(
@@ -968,7 +970,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Library Contents", ["Library Contents", "Library Contents", "Library Contents", "Library Contents", "库内容"]),
("Library Items", ["Library Items", "Library Items", "Library Items", "Library Items", "库项目"]),
("Linked Stories", ["Linked Stories", "Linked Stories", "Linked Stories", "Linked Stories", "链接的文章"]),
("Liquid Page Rule", ["Liquid Page Rule", "Liquid Page Rule", "Liquid Page Rule", "Liquid Page Rule", "流动页面规则"]),
("Liquid Page Rule", ["Liquid Page Rule", "Liquid Page Rule", "Liquid Page Rule", "Liquid Page Rule", "自适应页面规则"]),
("List Documents", ["List Documents", "List Documents", "List Documents", "List Documents", "列出文档"]),
("List Styles", ["List Styles", "List Styles", "List Styles", "List Styles", "列表样式"]),
("List Tools", ["List Tools", "List Tools", "List Tools", "List Tools", "列出工具"]),
@@ -993,14 +995,14 @@ const TABLE: &[(&str, [&str; 5])] = &[
),
("New Hyperlink…", ["New Hyperlink…", "New Hyperlink…", "New Hyperlink…", "New Hyperlink…", "新建超链接…"]),
("New Library", ["New Library", "New Library", "New Library", "New Library", "新建库"]),
("New Page Reference…", ["New Page Reference…", "New Page Reference…", "New Page Reference…", "New Page Reference…", "新建页引用…"]),
("New Page Reference…", ["New Page Reference…", "New Page Reference…", "New Page Reference…", "New Page Reference…", "新建页面引用…"]),
("New Paragraph Style…", ["New Paragraph Style…", "New Paragraph Style…", "New Paragraph Style…", "New Paragraph Style…", "新建段落样式…"]),
("New Stroke Style…", ["New Stroke Style…", "New Stroke Style…", "New Stroke Style…", "New Stroke Style…", "新建描边样式…"]),
("New Table Style…", ["New Table Style…", "New Table Style…", "New Table Style…", "New Table Style…", "新建表格样式…"]),
("New Table Style…", ["New Table Style…", "New Table Style…", "New Table Style…", "New Table Style…", "新建表样式…"]),
("Next Cell", ["Next Cell", "Next Cell", "Next Cell", "Next Cell", "下一个单元格"]),
("Next Document", ["Next Document", "Next Document", "Next Document", "Next Document", "下一个文档"]),
("Next Object Above", ["Next Object Above", "Next Object Above", "Next Object Above", "Next Object Above", "上方的下一个对象"]),
("Next Object Below", ["Next Object Below", "Next Object Below", "Next Object Below", "Next Object Below", "下方的下一个对象"]),
("Next Object Above", ["Next Object Above", "Next Object Above", "Next Object Above", "Next Object Above", "上方下一个对象"]),
("Next Object Below", ["Next Object Below", "Next Object Below", "Next Object Below", "Next Object Below", "下方下一个对象"]),
("Next Object in Group", ["Next Object in Group", "Next Object in Group", "Next Object in Group", "Next Object in Group", "组中的下一个对象"]),
("Notes", ["Notes", "Notes", "Notes", "Notes", "注释"]),
("Object Export Options", ["Object Export Options", "Object Export Options", "Object Export Options", "Object Export Options", "对象导出选项"]),
@@ -1012,7 +1014,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Object Layers", ["Object Layers", "Object Layers", "Object Layers", "Object Layers", "对象图层"]),
(
"Object Liquid Settings",
["Object Liquid Settings", "Object Liquid Settings", "Object Liquid Settings", "Object Liquid Settings", "对象流动设置"],
["Object Liquid Settings", "Object Liquid Settings", "Object Liquid Settings", "Object Liquid Settings", "对象自适应设置"],
),
("Open Book", ["Open Book", "Open Book", "Open Book", "Open Book", "打开书籍"]),
("Open Bytes", ["Open Bytes", "Open Bytes", "Open Bytes", "Open Bytes", "打开字节"]),
@@ -1041,7 +1043,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Paste Into", ["Paste Into", "Paste Into", "Paste Into", "Paste Into", "贴入内部"]),
(
"Paste without Formatting",
["Paste without Formatting", "Paste without Formatting", "Paste without Formatting", "Paste without Formatting", "不带格式粘贴"],
["Paste without Formatting", "Paste without Formatting", "Paste without Formatting", "Paste without Formatting", "粘贴时不包含格式"],
),
("Place", ["Place", "Place", "Place", "Place", "置入"]),
("Place Caret", ["Place Caret", "Place Caret", "Place Caret", "Place Caret", "放置光标"]),
@@ -1156,9 +1158,9 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Structure", ["Structure", "Structure", "Structure", "Structure", "结构"]),
("Style Source", ["Style Source", "Style Source", "Style Source", "Style Source", "样式源"]),
("Synchronize Book", ["Synchronize Book", "Synchronize Book", "Synchronize Book", "Synchronize Book", "同步书籍"]),
("Table Options", ["Table Options", "Table Options", "Table Options", "Table Options", "表格选项"]),
("Table Options", ["Table Options", "Table Options", "Table Options", "Table Options", "表选项"]),
("Table Panel", ["Table Panel", "Table Panel", "Table Panel", "Table Panel", "表格面板"]),
("Table Style Options…", ["Table Style Options…", "Table Style Options…", "Table Style Options…", "Table Style Options…", "表格样式选项…"]),
("Table Style Options…", ["Table Style Options…", "Table Style Options…", "Table Style Options…", "Table Style Options…", "表样式选项…"]),
(
"Table of Contents Entries",
["Table of Contents Entries", "Table of Contents Entries", "Table of Contents Entries", "Table of Contents Entries", "目录条目"],
@@ -1183,7 +1185,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
"Transparency Flattener Presets",
"Transparency Flattener Presets",
"Transparency Flattener Presets",
"透明度拼合预设",
"透明度拼合器预设",
],
),
("Type on a Path", ["Type on a Path", "Type on a Path", "Type on a Path", "Type on a Path", "路径文字"]),
@@ -1215,11 +1217,11 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Apply Character Style", ["Apply Character Style", "Apply Character Style", "Apply Character Style", "Apply Character Style", "应用字符样式"]),
("Apply Object Style", ["Apply Object Style", "Apply Object Style", "Apply Object Style", "Apply Object Style", "应用对象样式"]),
("Apply Paragraph Style", ["Apply Paragraph Style", "Apply Paragraph Style", "Apply Paragraph Style", "Apply Paragraph Style", "应用段落样式"]),
("Apply Table Style", ["Apply Table Style", "Apply Table Style", "Apply Table Style", "Apply Table Style", "应用表格样式"]),
("Apply Table Style", ["Apply Table Style", "Apply Table Style", "Apply Table Style", "Apply Table Style", "应用表样式"]),
("Article Options", ["Article Options", "Article Options", "Article Options", "Article Options", "文章选项"]),
("Basic Feather", ["Basic Feather", "Basic Feather", "Basic Feather", "Basic Feather", "基本羽化"]),
("Bold", ["Bold", "Bold", "Bold", "Bold", "加粗"]),
("Bring Forward", ["Bring Forward", "Bring Forward", "Bring Forward", "Bring Forward", "前移一层"]),
("Bring Forward", ["Bring Forward", "Bring Forward", "Bring Forward", "Bring Forward", "向前移动"]),
("Bring to Front", ["Bring to Front", "Bring to Front", "Bring to Front", "Bring to Front", "置于顶层"]),
("Change", ["Change", "Change", "Change", "Change", "更改"]),
(
@@ -1232,7 +1234,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Condition Options…", ["Condition Options…", "Condition Options…", "Condition Options…", "Condition Options…", "条件选项…"]),
(
"Convert to Liquid Guide",
["Convert to Liquid Guide", "Convert to Liquid Guide", "Convert to Liquid Guide", "Convert to Liquid Guide", "转换为流动参考线"],
["Convert to Liquid Guide", "Convert to Liquid Guide", "Convert to Liquid Guide", "Convert to Liquid Guide", "转换为自适应参考线"],
),
("Convert to Object", ["Convert to Object", "Convert to Object", "Convert to Object", "Convert to Object", "转换为对象"]),
("Create Line", ["Create Line", "Create Line", "Create Line", "Create Line", "创建线条"]),
@@ -1265,13 +1267,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Fill", ["Fill", "Fill", "Fill", "Fill", "填色"]),
(
"Fill with Placeholder Text",
[
"Fill with Placeholder Text",
"Fill with Placeholder Text",
"Fill with Placeholder Text",
"Fill with Placeholder Text",
"使用占位符文本填充",
],
["Fill with Placeholder Text", "Fill with Placeholder Text", "Fill with Placeholder Text", "Fill with Placeholder Text", "用占位符文本填充"],
),
("Flip", ["Flip", "Flip", "Flip", "Flip", "翻转"]),
("Hyperlink Options…", ["Hyperlink Options…", "Hyperlink Options…", "Hyperlink Options…", "Hyperlink Options…", "超链接选项…"]),
@@ -1322,7 +1318,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Rotate", ["Rotate", "Rotate", "Rotate", "Rotate", "旋转"]),
("Row Height", ["Row Height", "Row Height", "Row Height", "Row Height", "行高"]),
("Scale", ["Scale", "Scale", "Scale", "Scale", "缩放"]),
("Send Backward", ["Send Backward", "Send Backward", "Send Backward", "Send Backward", "后移一层"]),
("Send Backward", ["Send Backward", "Send Backward", "Send Backward", "Send Backward", "向后移动"]),
("Send to Back", ["Send to Back", "Send to Back", "Send to Back", "Send to Back", "置于底层"]),
(
"Set Cross-Reference Format",
@@ -1331,12 +1327,12 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Set Footnote Text", ["Set Footnote Text", "Set Footnote Text", "Set Footnote Text", "Set Footnote Text", "设置脚注文本"]),
("Set Story Text", ["Set Story Text", "Set Story Text", "Set Story Text", "Set Story Text", "设置文章文本"]),
("Shear", ["Shear", "Shear", "Shear", "Shear", "切变"]),
("Show All on Spread", ["Show All on Spread", "Show All on Spread", "Show All on Spread", "Show All on Spread", "显示跨页上的所有内容"]),
("Show All on Spread", ["Show All on Spread", "Show All on Spread", "Show All on Spread", "Show All on Spread", "在跨页上全部显示"]),
("Show State", ["Show State", "Show State", "Show State", "Show State", "显示状态"]),
("State Options", ["State Options", "State Options", "State Options", "State Options", "状态选项"]),
("Tag Frame", ["Tag Frame", "Tag Frame", "Tag Frame", "Tag Frame", "标记框架"]),
("Tag Text", ["Tag Text", "Tag Text", "Tag Text", "Tag Text", "标记文本"]),
("Track Changes", ["Track Changes", "Track Changes", "Track Changes", "Track Changes", "跟踪更改"]),
("Track Changes", ["Track Changes", "Track Changes", "Track Changes", "Track Changes", "修订"]),
("Unlink", ["Unlink", "Unlink", "Unlink", "Unlink", "取消链接"]),
(
"Unlock All on Spread",
@@ -1419,7 +1415,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
"按钮在交互式 PDF 导出中起作用。",
],
),
("Captions", ["Captions", "Captions", "Captions", "Captions", "标题"]),
("Captions", ["Captions", "Captions", "Captions", "Captions", "题注"]),
("Change All (Object", ["Change All (Object", "Change All (Object", "Change All (Object", "Change All (Object", "全部更改 (对象"]),
("Character Settings", ["Character Settings", "Character Settings", "Character Settings", "Character Settings", "字符设置"]),
("Choose a link.", ["Choose a link.", "Choose a link.", "Choose a link.", "Choose a link.", "选择一个链接。"]),
@@ -1488,7 +1484,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
],
),
("Hyphens and Dashes", ["Hyphens and Dashes", "Hyphens and Dashes", "Hyphens and Dashes", "Hyphens and Dashes", "连字符和破折号"]),
("Interactive", ["Interactive", "Interactive", "Interactive", "Interactive", "交互"]),
("Interactive", ["Interactive", "Interactive", "Interactive", "Interactive", "交互式"]),
("Invert", ["Invert", "Invert", "Invert", "Invert", "反相"]),
(
"Join the ArtCraft community",
@@ -1501,7 +1497,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
],
),
("Keyboard Increments", ["Keyboard Increments", "Keyboard Increments", "Keyboard Increments", "Keyboard Increments", "键盘增量"]),
("Liquid guides", ["Liquid guides", "Liquid guides", "Liquid guides", "Liquid guides", "流动参考线"]),
("Liquid guides", ["Liquid guides", "Liquid guides", "Liquid guides", "Liquid guides", "自适应参考线"]),
("Markers", ["Markers", "Markers", "Markers", "Markers", "标记"]),
("More ArtCraft apps", ["More ArtCraft apps", "More ArtCraft apps", "More ArtCraft apps", "More ArtCraft apps", "更多 ArtCraft 应用"]),
("Nested Line Styles", ["Nested Line Styles", "Nested Line Styles", "Nested Line Styles", "Nested Line Styles", "嵌套行样式"]),
@@ -1867,11 +1863,11 @@ const TABLE: &[(&str, [&str; 5])] = &[
"Span Footnotes Across Columns",
"Span Footnotes Across Columns",
"Span Footnotes Across Columns",
"脚注跨栏",
"跨栏分布脚注",
],
),
("Rule On", ["Rule On", "Rule On", "Rule On", "Rule On", "启用横线"]),
("Ascent", ["Ascent", "Ascent", "Ascent", "Ascent", "升部"]),
("Ascent", ["Ascent", "Ascent", "Ascent", "Ascent", "上升高度"]),
("Cap Height", ["Cap Height", "Cap Height", "Cap Height", "Cap Height", "大写字母高度"]),
("Leading", ["Leading", "Leading", "Leading", "Leading", "行距"]),
("x Height", ["x Height", "x Height", "x Height", "x Height", "x 字高"]),
@@ -1902,18 +1898,18 @@ const TABLE: &[(&str, [&str; 5])] = &[
("enSpace", ["enSpace", "enSpace", "enSpace", "enSpace", "半角空格"]),
("chars", ["chars", "chars", "chars", "chars", "指定字符"]),
("[Automatic]", ["[Automatic]", "[Automatic]", "[Automatic]", "[Automatic]", "[自动]"]),
("Tracking:", ["Tracking:", "Tracking:", "Tracking:", "Tracking:", "字距:"]),
("Tracking:", ["Tracking:", "Tracking:", "Tracking:", "Tracking:", "字距调整:"]),
("Right Indent:", ["Right Indent:", "Right Indent:", "Right Indent:", "Right Indent:", "右缩进:"]),
("First Line Indent:", ["First Line Indent:", "First Line Indent:", "First Line Indent:", "First Line Indent:", "首行缩进:"]),
("Space Before:", ["Space Before:", "Space Before:", "Space Before:", "Space Before:", "段前间距:"]),
("Space After:", ["Space After:", "Space After:", "Space After:", "Space After:", "段后间距:"]),
("Words with at Least:", ["Words with at Least:", "Words with at Least:", "Words with at Least:", "Words with at Least:", "最少单词长度:"]),
("After First:", ["After First:", "After First:", "After First:", "After First:", "前部最少保留:"]),
("Before Last:", ["Before Last:", "Before Last:", "Before Last:", "Before Last:", "后部最少保留:"]),
("Hyphen Limit:", ["Hyphen Limit:", "Hyphen Limit:", "Hyphen Limit:", "Hyphen Limit:", "连续断字上限:"]),
("Words with at Least:", ["Words with at Least:", "Words with at Least:", "Words with at Least:", "Words with at Least:", "单词最少字符数:"]),
("After First:", ["After First:", "After First:", "After First:", "After First:", "连字符前最少字符数:"]),
("Before Last:", ["Before Last:", "Before Last:", "Before Last:", "Before Last:", "连字符后最少字符数:"]),
("Hyphen Limit:", ["Hyphen Limit:", "Hyphen Limit:", "Hyphen Limit:", "Hyphen Limit:", "连字符限制:"]),
("Word Spacing:", ["Word Spacing:", "Word Spacing:", "Word Spacing:", "Word Spacing:", "单词间距:"]),
("Letter Spacing:", ["Letter Spacing:", "Letter Spacing:", "Letter Spacing:", "Letter Spacing:", "字母间距:"]),
("Glyph Scaling:", ["Glyph Scaling:", "Glyph Scaling:", "Glyph Scaling:", "Glyph Scaling:", "字形缩放:"]),
("Glyph Scaling:", ["Glyph Scaling:", "Glyph Scaling:", "Glyph Scaling:", "Glyph Scaling:", "字形缩放比例:"]),
("Insert Kashidas:", ["Insert Kashidas:", "Insert Kashidas:", "Insert Kashidas:", "Insert Kashidas:", "插入延长线:"]),
(
"In justified Arabic text",
@@ -1937,7 +1933,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
],
),
("Binding:", ["Binding:", "Binding:", "Binding:", "Binding:", "装订方向:"]),
("Ruby:", ["Ruby:", "Ruby:", "Ruby:", "Ruby:", "注音:"]),
("Ruby:", ["Ruby:", "Ruby:", "Ruby:", "Ruby:", "旁注:"]),
(
"Set over the selected text; empty removes it.",
[
@@ -2163,7 +2159,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Show Baseline Grid", ["Show Baseline Grid", "Show Baseline Grid", "Show Baseline Grid", "Show Baseline Grid", "显示基线网格"]),
("Show Document Grid", ["Show Document Grid", "Show Document Grid", "Show Document Grid", "Show Document Grid", "显示文档网格"]),
("Show Guides", ["Show Guides", "Show Guides", "Show Guides", "Show Guides", "显示参考线"]),
("Stop Color:", ["Stop Color:", "Stop Color:", "Stop Color:", "Stop Color:", "色标颜色:"]),
("Stop Color:", ["Stop Color:", "Stop Color:", "Stop Color:", "Stop Color:", "停止点颜色:"]),
("Style", ["Style", "Style", "Style", "Style", "样式"]),
("Styles panel", ["Styles panel", "Styles panel", "Styles panel", "Styles panel", "样式面板"]),
("Text", ["Text", "Text", "Text", "Text", "文本"]),
@@ -2172,7 +2168,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
["The structure is valid.", "The structure is valid.", "The structure is valid.", "The structure is valid.", "结构有效。"],
),
("Toggle double column", ["Toggle double column", "Toggle double column", "Toggle double column", "Toggle double column", "切换双列布局"]),
("Tracking", ["Tracking", "Tracking", "Tracking", "Tracking", "字距"]),
("Tracking", ["Tracking", "Tracking", "Tracking", "Tracking", "字距调整"]),
("Untag Selection", ["Untag Selection", "Untag Selection", "Untag Selection", "Untag Selection", "移除所选内容的标签"]),
("Validate", ["Validate", "Validate", "Validate", "Validate", "验证"]),
("Weight", ["Weight", "Weight", "Weight", "Weight", "粗细"]),
@@ -2231,7 +2227,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Overprint Fill", ["Overprint Fill", "Overprint Fill", "Overprint Fill", "Overprint Fill", "叠印填色"]),
("Overprint Stroke", ["Overprint Stroke", "Overprint Stroke", "Overprint Stroke", "Overprint Stroke", "叠印描边"]),
("Overprint Gap", ["Overprint Gap", "Overprint Gap", "Overprint Gap", "Overprint Gap", "叠印间隙"]),
("Nonprinting", ["Nonprinting", "Nonprinting", "Nonprinting", "Nonprinting", "不打印"]),
("Nonprinting", ["Nonprinting", "Nonprinting", "Nonprinting", "Nonprinting", "非打印"]),
("At Least", ["At Least", "At Least", "At Least", "At Least", "至少"]),
("Exactly", ["Exactly", "Exactly", "Exactly", "Exactly", "固定"]),
("Justify", ["Justify", "Justify", "Justify", "Justify", "两端对齐"]),
@@ -2239,7 +2235,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Strikethrough Options", ["Strikethrough Options", "Strikethrough Options", "Strikethrough Options", "Strikethrough Options", "删除线选项"]),
(
"Discretionary Ligatures",
["Discretionary Ligatures", "Discretionary Ligatures", "Discretionary Ligatures", "Discretionary Ligatures", "任意连字"],
["Discretionary Ligatures", "Discretionary Ligatures", "Discretionary Ligatures", "Discretionary Ligatures", "自由连字"],
),
("Fractions", ["Fractions", "Fractions", "Fractions", "Fractions", "分数"]),
("Ordinal", ["Ordinal", "Ordinal", "Ordinal", "Ordinal", "序数"]),
@@ -2306,7 +2302,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("English: USA", ["English: USA", "English: USA", "English: USA", "English: USA", "英语:美国"]),
("Farsi", ["Farsi", "Farsi", "Farsi", "Farsi", "波斯语"]),
("Finnish", ["Finnish", "Finnish", "Finnish", "Finnish", "芬兰语"]),
("Fit Frame to Content", ["Fit Frame to Content", "Fit Frame to Content", "Fit Frame to Content", "Fit Frame to Content", "框架适合内容"]),
("Fit Frame to Content", ["Fit Frame to Content", "Fit Frame to Content", "Fit Frame to Content", "Fit Frame to Content", "使框架适合内容"]),
("French", ["French", "French", "French", "French", "法语"]),
("French: Canadian", ["French: Canadian", "French: Canadian", "French: Canadian", "French: Canadian", "法语:加拿大"]),
("German: 2006 Reform", ["German: 2006 Reform", "German: 2006 Reform", "German: 2006 Reform", "German: 2006 Reform", "德语:2006 年拼写改革"]),
@@ -2360,7 +2356,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Turkish", ["Turkish", "Turkish", "Turkish", "Turkish", "土耳其语"]),
("Ukrainian", ["Ukrainian", "Ukrainian", "Ukrainian", "Ukrainian", "乌克兰语"]),
("Cell Style", ["Cell Style", "Cell Style", "Cell Style", "Cell Style", "单元格样式"]),
("Table Style", ["Table Style", "Table Style", "Table Style", "Table Style", "表格样式"]),
("Table Style", ["Table Style", "Table Style", "Table Style", "Table Style", "表样式"]),
("Col ←", ["Col ←", "Col ←", "Col ←", "Col ←", "左侧插入列"]),
("Col →", ["Col →", "Col →", "Col →", "Col →", "右侧插入列"]),
("Row ↑", ["Row ↑", "Row ↑", "Row ↑", "Row ↑", "上方插入行"]),
@@ -2483,7 +2479,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
("Case sensitive", ["Case sensitive", "Case sensitive", "Case sensitive", "Case sensitive", "区分大小写"]),
(
"Custom Tracking/Kerning",
["Custom Tracking/Kerning", "Custom Tracking/Kerning", "Custom Tracking/Kerning", "Custom Tracking/Kerning", "自定义字距/字偶距"],
["Custom Tracking/Kerning", "Custom Tracking/Kerning", "Custom Tracking/Kerning", "Custom Tracking/Kerning", "自定义字距调整/字距微调"],
),
(
"Dimensions Include Stroke Weight",
@@ -2492,7 +2488,7 @@ const TABLE: &[(&str, [&str; 5])] = &[
"Dimensions Include Stroke Weight",
"Dimensions Include Stroke Weight",
"Dimensions Include Stroke Weight",
"尺寸包含描边粗细",
"尺寸包括描边粗细",
],
),
("Enable Autocorrect", ["Enable Autocorrect", "Enable Autocorrect", "Enable Autocorrect", "Enable Autocorrect", "启用自动更正"]),
@@ -2530,10 +2526,10 @@ const TABLE: &[(&str, [&str; 5])] = &[
"Remove Styles and Formatting from Text and Tables",
"Remove Styles and Formatting from Text and Tables",
"Remove Styles and Formatting from Text and Tables",
"移除文本和表格中的样式与格式",
"从文本和表格中删除样式和格式",
],
),
("Ruby", ["Ruby", "Ruby", "Ruby", "Ruby", "注音"]),
("Ruby", ["Ruby", "Ruby", "Ruby", "Ruby", "旁注"]),
(
"Show Note Anchors in Layout View",
[
@@ -2545,10 +2541,10 @@ const TABLE: &[(&str, [&str; 5])] = &[
],
),
("Spreads", ["Spreads", "Spreads", "Spreads", "Spreads", "跨页"]),
("Substituted Fonts", ["Substituted Fonts", "Substituted Fonts", "Substituted Fonts", "Substituted Fonts", "替换的字体"]),
("Substituted Fonts", ["Substituted Fonts", "Substituted Fonts", "Substituted Fonts", "Substituted Fonts", "替换字体"]),
(
"Transformations are Totals",
["Transformations are Totals", "Transformations are Totals", "Transformations are Totals", "Transformations are Totals", "显示累计变换值"],
["Transformations are Totals", "Transformations are Totals", "Transformations are Totals", "Transformations are Totals", "变换为总计"],
),
(
"Use Black Point Compensation",
@@ -2589,9 +2585,9 @@ const TABLE: &[(&str, [&str; 5])] = &[
"用后备字体绘制缺失字形",
],
),
("Units & Increments", ["Units & Increments", "Units & Increments", "Units & Increments", "Units & Increments", "单位与增量"]),
("Units & Increments", ["Units & Increments", "Units & Increments", "Units & Increments", "Units & Increments", "单位和增量"]),
("Grids", ["Grids", "Grids", "Grids", "Grids", "网格"]),
("Guides & Pasteboard", ["Guides & Pasteboard", "Guides & Pasteboard", "Guides & Pasteboard", "Guides & Pasteboard", "参考线与粘贴板"]),
("Guides & Pasteboard", ["Guides & Pasteboard", "Guides & Pasteboard", "Guides & Pasteboard", "Guides & Pasteboard", "参考线和粘贴板"]),
("Dictionary", ["Dictionary", "Dictionary", "Dictionary", "Dictionary", "词典"]),
("Autocorrect", ["Autocorrect", "Autocorrect", "Autocorrect", "Autocorrect", "自动更正"]),
("Story Editor Display", ["Story Editor Display", "Story Editor Display", "Story Editor Display", "Story Editor Display", "文章编辑器显示"]),
@@ -2680,17 +2676,17 @@ fn column(lang: &str) -> Option<usize> {
/// `s` in `lang` (English, or the string itself, when there's no translation).
pub fn tr<'a>(lang: &str, s: &'a str) -> &'a str {
static TRANSLATIONS: OnceLock<HashMap<&'static str, [&'static str; 5]>> = OnceLock::new();
static ARABIC: OnceLock<HashMap<&'static str, &'static str>> = OnceLock::new();
static PORTUGUESE_BR: OnceLock<HashMap<&'static str, &'static str>> = OnceLock::new();
if lang == "ar" {
return ar::TABLE.iter().find(|(en, _)| *en == s).map_or(s, |(_, t)| *t);
return ARABIC.get_or_init(|| ar::TABLE.iter().copied().collect()).get(s).copied().unwrap_or(s);
}
if lang == "pt-br" {
return pt_br::TABLE.iter().find(|(en, _)| *en == s).map_or(s, |(_, t)| *t);
return PORTUGUESE_BR.get_or_init(|| pt_br::TABLE.iter().copied().collect()).get(s).copied().unwrap_or(s);
}
let Some(c) = column(lang) else { return s };
match TABLE.iter().find(|(en, _)| *en == s) {
Some((_, t)) => t[c],
None => s,
}
TRANSLATIONS.get_or_init(|| TABLE.iter().copied().collect()).get(s).and_then(|row| row.get(c)).copied().unwrap_or(s)
}
/// Localize reserved built-in style names only; user-defined names are document data.
@@ -2713,6 +2709,26 @@ pub fn workspace_name<'a>(lang: &str, name: &'a str) -> &'a str {
mod tests {
use super::*;
#[test]
fn cached_lookup_preserves_every_translation_across_language_switches() {
for (key, translations) in TABLE {
for (lang, expected) in ["de", "fr", "es", "ja", "zh"].into_iter().zip(translations) {
assert_eq!(tr(lang, key), *expected, "{lang}: {key}");
}
assert_eq!(tr("", key), *key);
}
for (key, expected) in ar::TABLE {
assert_eq!(tr("ar", key), *expected, "ar: {key}");
}
for (key, expected) in pt_br::TABLE {
assert_eq!(tr("pt-br", key), *expected, "pt-br: {key}");
}
let unknown = String::from("A user-defined untranslated label");
for lang in ["ar", "pt-br", "zh", "ja", "de", "fr", "es", "", "unknown"] {
assert!(std::ptr::eq(tr(lang, &unknown), unknown.as_str()));
}
}
#[test]
fn translates_known_strings_and_keeps_the_rest() {
assert_eq!(tr("de", "File"), "Datei");
+486 -86
View File
@@ -18,7 +18,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Save As…", "حفظ باسم…"),
("Save a Copy…", "حفظ نسخة…"),
("Revert", "استعادة"),
("Place…", "إدراج…"),
("Place…", "وضع…"),
("Export PDF…", "تصدير PDF…"),
("Print…", "طباعة…"),
("Print", "طباعة"),
@@ -35,8 +35,8 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Duplicate", "تكرار"),
("Select All", "تحديد الكل"),
("Deselect All", "إلغاء تحديد الكل"),
("Find/Change…", "بحث واستبدال…"),
("Find/Change", "بحث واستبدال"),
("Find/Change…", "البحث/التغيير…"),
("Find/Change", "البحث/التغيير"),
("Check Spelling…", "تدقيق إملائي…"),
("Preferences…", "تفضيلات…"),
("Preferences", "تفضيلات"),
@@ -44,8 +44,9 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Keyboard Shortcuts", "اختصارات لوحة المفاتيح"),
("Interface Language", "لغة الواجهة"),
("Pages", "صفحات"),
("Panels", "لوحات"),
("Page", "صفحة"),
("Margins and Columns…", "هوامش وأعمدة…"),
("Margins and Columns…", "الهوامش والأعمدة…"),
("Create Guides…", "إنشاء أدلة…"),
("Numbering & Section Options…", "خيارات الترقيم والأقسام…"),
("Go to Page…", "انتقال إلى صفحة…"),
@@ -55,7 +56,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("First Page", "الصفحة الأولى"),
("Last Page", "الصفحة الأخيرة"),
("Font", "خط"),
("Size", "حجم"),
("Size", "الحجم"),
("Character", "حرف"),
("Paragraph", "فقرة"),
("Paragraph Styles", "أنماط الفقرات"),
@@ -63,14 +64,14 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Paragraph Style Options", "خيارات نمط الفقرة"),
("Object Styles", "أنماط الكائنات"),
("Glyphs", "محارف"),
("Find/Replace Font…", "بحث واستبدال الخط…"),
("Find/Replace Font", "بحث واستبدال الخط"),
("Story Editor", "محرر النص"),
("Edit in Story Editor", "تحرير في محرر النص"),
("Find/Replace Font…", "البحث عن الخط/استبداله…"),
("Find/Replace Font", "البحث عن الخط/استبداله"),
("Story Editor", "محرر القصة"),
("Edit in Story Editor", "تحرير في محرر القصة"),
("Insert Special Character", "إدراج حرف خاص"),
("Insert White Space", "إدراج مسافة"),
("Insert White Space", "إدراج مسافة بيضاء"),
("Insert Break Character", "إدراج فاصل"),
("Change Case", "تغيير حالة الأحرف"),
("Change Case", "تغيير الحالة"),
("Text Frame Options…", "خيارات إطار النص…"),
("Text Frame Options", "خيارات إطار النص"),
("Footnote Options", "خيارات الحواشي"),
@@ -86,10 +87,10 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Bring Forward", "إحضار إلى الأمام"),
("Send Backward", "إرسال إلى الخلف خطوة"),
("Fitting", "ملاءمة"),
("Fit Frame to Content", "ملاءمة الإطار للمحتوى"),
("Fit Content to Frame", "ملاءمة المحتوى للإطار"),
("Fill Frame Proportionally", "ملء الإطار تناسبياً"),
("Fit Content Proportionally", "ملاءمة المحتوى تناسبياً"),
("Fit Frame to Content", "ملاءمة الإطار مع المحتوى"),
("Fit Content to Frame", "ملاءمة المحتوى مع الإطار"),
("Fill Frame Proportionally", "ملء الإطار بشكل متناسب"),
("Fit Content Proportionally", "ملاءمة المحتوى بشكل متناسب"),
("Center Content", "توسيط المحتوى"),
("Frame Fitting Options", "خيارات ملاءمة الإطار"),
("Generate QR Code", "إنشاء رمز QR"),
@@ -97,7 +98,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Insert Table…", "إدراج جدول…"),
("Insert", "إدراج"),
("Rows", "صفوف"),
("Columns", "أعمدة"),
("Columns", "الأعمدة"),
("Row", "صف"),
("Column", "عمود"),
("Merge Cells", "دمج الخلايا"),
@@ -109,8 +110,8 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Footer Rows", "صفوف التذييل"),
("Zoom In", "تكبير"),
("Zoom Out", "تصغير"),
("Fit Page in Window", "ملاءمة الصفحة للنافذة"),
("Fit Spread in Window", "ملاءمة الحيز للنافذة"),
("Fit Page in Window", "ملاءمة الصفحة في النافذة"),
("Fit Spread in Window", "ملاءمة الصفحة المزدوجة في النافذة"),
("Actual Size", "الحجم الفعلي"),
("Screen Mode", "وضع الشاشة"),
("Normal", "عادي"),
@@ -125,13 +126,13 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Workspace", "مساحة العمل"),
("New Workspace", "مساحة عمل جديدة"),
("Properties", "خصائص"),
("Layers", "طبقات"),
("Layers", "الطبقات"),
("Swatches", "عينات الألوان"),
("Colour", "لون"),
("Color", "لون"),
("Stroke", "حد"),
("Fill", "تعبئة"),
("Gradient", "تدرج"),
("Gradient", "التدرج اللوني"),
("Transparency", "شفافية"),
("Effects", "تأثيرات"),
("Links", "روابط"),
@@ -171,9 +172,9 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Reset", "إعادة ضبط"),
("Add", "إضافة"),
("Remove", "إزالة"),
("Name", "اسم"),
("Width", "عرض"),
("Height", "ارتفاع"),
("Name", "الاسم"),
("Width", "العرض"),
("Height", "الارتفاع"),
("Portrait", "عمودي"),
("Landscape", "أفقي"),
("Orientation", "اتجاه الصفحة"),
@@ -205,40 +206,40 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Text", "نص"),
("Image", "صورة"),
("Line", "خط مستقيم"),
("Position", "موضع"),
("Position", "الموضع"),
("Appearance", "مظهر"),
("Opacity", "عتامة"),
("Opacity", "العتامة"),
("Corner", "زاوية"),
("Rotation", "دوران"),
("Rulers & Grids", "مساطر وشبكات"),
("Guides", "أدلة"),
("Flex Layout", "تخطيط مرن"),
("Auto Size", "حجم تلقائي"),
("Tracking", "تباعد الحروف"),
("Leading", "تباعد الأسطر"),
("Kerning", "تقارب الحروف"),
("Tracking", "التتبع"),
("Leading", "المسافة بين الأسطر"),
("Kerning", "التقنين"),
("Language", "لغة"),
("Hyphenation", "وصل الكلمات"),
("Alignment", "محاذاة"),
("Alignment", "المحاذاة"),
("Indent", "مسافة بادئة"),
("Space Before", "مسافة قبل"),
("Space After", "مسافة بعد"),
("Space Before", "المسافة قبل"),
("Space After", "المسافة بعد"),
("New Layer", "طبقة جديدة"),
("New Swatch", "عينة لون جديدة"),
("Object Layer Options", "خيارات طبقات الكائن"),
("Colour Picker", "منتقي الألوان"),
("Color Picker", "منتقي الألوان"),
("Color Picker", "أداة اختيار الألوان"),
("Color Settings", "إعدادات الألوان"),
("User Dictionary", "قاموس المستخدم"),
("Menu Customization", "تخصيص القوائم"),
("Import Options", "خيارات الاستيراد"),
("Place PDF", "إدراج PDF"),
("Place PDF", "وضع PDF"),
("Find", "بحث"),
("Change", "استبدال"),
("Find What", "نص البحث"),
("Change To", "استبدال بـ"),
("Find Next", "بحث عن التالي"),
("Change All", "استبدال الكل"),
("Change", "تغيير"),
("Find What", "البحث عن"),
("Change To", "تغيير إلى"),
("Find Next", "البحث عن التالي"),
("Change All", "تغيير الكل"),
("Search", "بحث"),
("Document", "مستند"),
("Selection", "تحديد"),
@@ -250,7 +251,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Off", "إيقاف"),
("None", "بدون"),
("[None]", "[بدون]"),
("Place with Import Options…", "إدراج مع خيارات الاستيراد…"),
("Place with Import Options…", "وضع مع خيارات الاستيراد…"),
("Print Booklet…", "طباعة كتيب…"),
("Export", "تصدير"),
("Export Page as PNG…", "تصدير الصفحة بصيغة PNG…"),
@@ -261,7 +262,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Export HTML…", "تصدير HTML…"),
("Export XML…", "تصدير XML…"),
("Export Text…", "تصدير النص…"),
("Quick Actions", "إجراءات سريعة"),
("Quick Actions", "الإجراءات السريعة"),
("Import File", "استيراد ملف"),
("Insert Page", "إدراج صفحة"),
("Edit Page", "تحرير الصفحة"),
@@ -271,7 +272,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Show Document Grid", "إظهار شبكة المستند"),
("Show Baseline Grid", "إظهار شبكة خطوط الأساس"),
("Options", "خيارات"),
("More Options", "خيارات إضافية"),
("More Options", "خيارات أكثر"),
("Dialog", "مربع حوار"),
("General", "عام"),
("Basic Character Formats", "تنسيقات الأحرف الأساسية"),
@@ -290,9 +291,9 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Footnote Formatting", "تنسيق الحواشي"),
("Span Footnotes Across Columns", "امتداد الحواشي عبر الأعمدة"),
("Rule On", "إظهار الخط"),
("Ascent", "ارتفاع الحروف الصاعدة"),
("Ascent", "الصعود"),
("Cap Height", "ارتفاع الأحرف الكبيرة"),
("x Height", "ارتفاع حرف x"),
("x Height", "ارتفاع x"),
("Fixed", "ثابت"),
("Never (continuous)", "أبدًا (ترقيم متصل)"),
("Spread", "صفحتان متقابلتان"),
@@ -320,19 +321,19 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("chars", "محارف محددة"),
("[Automatic]", "[تلقائي]"),
("Size:", "الحجم:"),
("Tracking:", "التباعد:"),
("Tracking:", "التتبع:"),
("Left Indent:", "المسافة البادئة اليسرى:"),
("Right Indent:", "المسافة البادئة اليمنى:"),
("First Line Indent:", "المسافة البادئة للسطر الأول:"),
("Space Before:", "المسافة قبل الفقرة:"),
("Space After:", "المسافة بعد الفقرة:"),
("Space Before:", "المسافة قبل:"),
("Space After:", "المسافة بعد:"),
("Words with at Least:", "الحد الأدنى لطول الكلمة:"),
("After First:", "الأحرف قبل الواصلة:"),
("Before Last:", "الأحرف بعد الواصلة:"),
("Hyphen Limit:", "حد الأسطر المتتالية بواصلة:"),
("Hyphen Limit:", "الحد الأقصى للواصلات:"),
("Word Spacing:", "تباعد الكلمات:"),
("Letter Spacing:", "تباعد الحروف:"),
("Glyph Scaling:", "تحجيم الحروف:"),
("Glyph Scaling:", "قياس الحروف الرسومية:"),
("Insert Kashidas:", "إدراج الكشيدة:"),
("In justified Arabic text", "في النص العربي المضبوط"),
("Korean Line Breaks:", "فواصل الأسطر الكورية:"),
@@ -351,7 +352,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Prefix:", "البادئة:"),
("Suffix:", "اللاحقة:"),
("Position:", "الموضع:"),
("Character Style:", "نمط الأحرف:"),
("Character Style:", "نمط الحروف:"),
("Paragraph Style:", "نمط الفقرة:"),
("Separator:", "الفاصل:"),
("EPUB and HTML", "EPUB وHTML"),
@@ -367,17 +368,17 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("New GREP Style", "نمط GREP جديد"),
("Font Family:", "عائلة الخط:"),
("Font Style:", "نمط الخط:"),
("Leading:", "تباعد الأسطر:"),
("Leading:", "المسافة بين الأسطر:"),
("Alignment:", "المحاذاة:"),
("Hyphenate", "إضافة واصلات"),
("Minimum", "الحد الأدنى"),
("Desired", "المطلوب"),
("Desired", "المرغوب"),
("Maximum", "الحد الأقصى"),
("Composer:", "منضّد النص:"),
("Paragraph Composer", "منضّد الفقرات"),
("Single-line Composer", "منضّد السطر الواحد"),
("Style Name:", "اسم النمط:"),
("Based On:", "استنادًا إلى:"),
("Based On:", "مبني على:"),
("for", "لعدد"),
("Hyphenation Exceptions", "استثناءات الواصلة"),
("Binding:", "اتجاه التجليد:"),
@@ -429,9 +430,9 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Reject", "رفض"),
("Add Selection", "إضافة التحديد"),
("Add the selection", "إضافة التحديد"),
("Add to Swatches", "إضافة إلى الحوامل"),
("Add to Swatches", "إضافة إلى عينات الألوان"),
("Align Stroke:", "محاذاة الحد:"),
("All Caps", "أحرف كبيرة"),
("All Caps", "جميع الأحرف كبيرة"),
("Angle", "الزاوية"),
("Angle:", "الزاوية:"),
("Baseline", "خط الأساس"),
@@ -451,7 +452,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Distance", "المسافة"),
("Distribute ↔", "توزيع أفقي"),
("Distribute ↕", "توزيع عمودي"),
("Drop Shadow", "ظل ساقط"),
("Drop Shadow", "إسقاط الظل"),
("Effects: Drop Shadow", "التأثيرات: ظل ساقط"),
("Favorites", "المفضلة"),
("First Spread", "أول صفحتين متقابلتين"),
@@ -466,7 +467,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Last Spread", "آخر صفحتين متقابلتين"),
("Linked Stories", "النصوص المرتبطة"),
("Load DTD…", "تحميل DTD…"),
("Location:", "الموضع:"),
("Location:", "الموقع:"),
("Miter Limit:", "حد الوصلة الحادة:"),
("Move", "نقل"),
("New Article from Selection", "مقال جديد من التحديد"),
@@ -481,7 +482,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Open", "فتح"),
("Paragraph alignment", "محاذاة الفقرة"),
("Pick a file in the folder holding the moved graphics", "اختر ملفًا من المجلد الذي يحتوي على الرسومات المنقولة"),
("Place", "إدراج"),
("Place", "وضع"),
("Previous Spread", "الصفحتان السابقتان"),
("Release to Objects", "تحرير إلى كائنات"),
("Reverse the gradient", "عكس التدرج"),
@@ -502,13 +503,13 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Show Favorites Only", "إظهار المفضلة فقط"),
("Show in the text", "إظهار في النص"),
("Spreads of up to 10 pages", "مجموعات تصل إلى 10 صفحات"),
("Stop Color:", "لون نقطة التدرج:"),
("Stop Color:", "لون الإيقاف:"),
("Strikethrough", "يتوسطه خط"),
("Structure", "البنية"),
("Style", "النمط"),
("Style source", "مصدر الأنماط"),
("Styles panel", "لوحة الأنماط"),
("Superscript", "مرتفع"),
("Superscript", "النص المرتفع"),
("Tag the selection", "إضافة وسم للتحديد"),
("The structure is valid.", "البنية صالحة."),
("Toggle double column", "تبديل التخطيط بعمودين"),
@@ -544,7 +545,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Bulleted List", "قائمة نقطية"),
("Numbered List", "قائمة مرقمة"),
("UPPERCASE", "أحرف كبيرة"),
("Small Caps", "أحرف كبيرة صغيرة الحجم"),
("Small Caps", "الأحرف الكبيرة المصغّرة"),
("Butt", "مسطحة"),
("Round", "مستديرة"),
("Projecting", "بارزة"),
@@ -556,10 +557,10 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Last", "الأخير"),
("Before", "قبل"),
("After", "بعد"),
("Shading", "تظليل"),
("Shading", "التظليل"),
("Border", "إطار"),
("Overprint Fill", "طباعة التعبئة فوقيًا"),
("Overprint Stroke", "طباعة الحد فوقيًا"),
("Overprint Fill", "طباعة فوقية للتعبئة"),
("Overprint Stroke", "طباعة فوقية للحد"),
("Overprint Gap", "طباعة الفجوة فوقيًا"),
("Nonprinting", "غير قابل للطباعة"),
("At Least", "على الأقل"),
@@ -600,7 +601,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Pin left", "تثبيت اليسار"),
("Pin right", "تثبيت اليمين"),
("Inward", "إلى الداخل"),
("Metrics", "مقاييس"),
("Metrics", "المقاييس"),
("Optical", "بصري"),
("Applies to fill", "يُطبّق على التعبئة"),
("Applies to text", "يُطبّق على النص"),
@@ -720,25 +721,25 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("(Text Color)", "(لون النص)"),
("{count} glyphs — click to insert at the text cursor", "عدد المحارف: {count} — انقر للإدراج عند مؤشر النص"),
("{pages} Pages in {spreads} Spreads", "عدد الصفحات: {pages}، المجموعات: {spreads}"),
("Text Frame", "إطار نص"),
("Text Frame", "إطار النص"),
("Text Style", "نمط النص"),
(" (auto)", " (تلقائي)"),
("Absolute Numbering (instead of Section Numbering)", "ترقيم مطلق بدلًا من ترقيم الأقسام"),
("Add and remove pages as the primary text frame's story grows and shrinks", "إضافة الصفحات وحذفها مع زيادة نص الإطار الرئيسي أو نقصانه"),
("Added Text (highlighted)", "النص المضاف (مميز)"),
("Adjust Layout (objects follow the new page size)", "ضبط التخطيط وفق حجم الصفحة الجديد"),
("Auto-Fit", "ملاءمة تلقائية"),
("Auto-Fit", "الملاءمة التلقائية"),
("Case sensitive", "مراعاة حالة الأحرف"),
("Custom Tracking/Kerning", "تباعد أحرف وأزواج مخصص"),
("Custom Tracking/Kerning", "التتبع/التقنين المخصص"),
("Dimensions Include Stroke Weight", "تضمين سماكة الحد في الأبعاد"),
("Enable Autocorrect", "تمكين التصحيح التلقائي"),
("Enable Dynamic Spelling (underline misspelled words)", "تمكين التدقيق الإملائي التلقائي (تسطير الأخطاء)"),
("Grids in Back", "الشبكات في الخلف"),
("H&J Violations", "مخالفات الواصلة والضبط"),
("H&J Violations", "انتهاكات H&J"),
("Include Bleed", "تضمين النزف"),
("Include Stroke Weight", "تضمين سماكة الحد"),
("Keep Violations", "مخالفات خيارات إبقاء النص"),
("Overprint [Black] Swatch at 100%", "طباعة حامل الأسود بنسبة 100% فوقيًا"),
("Overprint [Black] Swatch at 100%", "طباعة عينة اللون [الأسود] بنسبة 100% فوقيًا"),
("Printer's Marks", "علامات الطباعة"),
("Remove Styles and Formatting from Text and Tables", "إزالة الأنماط والتنسيق من النص والجداول"),
("Ruby", "روبي"),
@@ -755,12 +756,12 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Accept All", "قبول الكل"),
("Add Document…", "إضافة مستند…"),
("Add to Previous Spread", "إضافة إلى الصفحات المتقابلة السابقة"),
("Align From:", "المحاذاة من:"),
("Align From:", "محاذاة من:"),
("Align to baseline grid", "محاذاة إلى شبكة خطوط الأساس"),
("All Spots to Process", "تحويل كل الألوان الموضعية إلى ألوان معالجة"),
("Allow Spread to Shuffle", "السماح بإعادة ترتيب الصفحات المتقابلة"),
("Alternating Row Fills", "تعبئة الصفوف بالتناوب"),
("Apply Gradient", "تطبيق تدرج"),
("Apply Gradient", "تطبيق التدرج اللوني"),
("Apply None (/)", "تطبيق بلا لون (/)"),
("Apply Parent", "تطبيق الصفحة الأصلية"),
("Apply to All Spreads", "تطبيق على كل الصفحات المتقابلة"),
@@ -773,9 +774,9 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Bullets and Numbering", "التعداد النقطي والرقمي"),
("Business Card", "بطاقة عمل"),
("Buttons act in interactive PDF export.", "تعمل الأزرار عند التصدير إلى PDF تفاعلي."),
("Change to:", "التغيير إلى:"),
("Change to:", "تغيير إلى:"),
("Character Settings", "إعدادات الأحرف"),
("Characters", "أحرف"),
("Characters", "الأحرف"),
("Checked by default", "محدد افتراضيًا"),
("Choices", "الخيارات"),
("Choose Image…", "اختيار صورة…"),
@@ -797,7 +798,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Delete Column", "حذف العمود"),
("Delete Condition", "حذف الشرط"),
("Delete Row", "حذف الصف"),
("Delete Swatch", "حذف حامل اللون"),
("Delete Swatch", "حذف عينة الألوان"),
("Delete Unused Layers", "حذف الطبقات غير المستخدمة"),
("Delete Workspace", "حذف مساحة العمل"),
("Document Grid", "شبكة المستند"),
@@ -820,7 +821,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Height:", "الارتفاع:"),
("Hide Bar", "إخفاء الشريط"),
("High Quality", "جودة عالية"),
("Highlight", "تمييز"),
("Highlight", "الإبراز"),
("Horizontal Gridline Every:", "تباعد خطوط الشبكة الأفقية:"),
("Horizontal Margins:", "الهوامش الأفقية:"),
("Import XML…", "استيراد XML…"),
@@ -837,12 +838,12 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Link To:", "الربط إلى:"),
("Liquid guides", "أدلة التخطيط المرن"),
("Load Profile…", "تحميل ملف تعريف…"),
("Load Swatches…", "تحميل حوامل الألوان…"),
("Load Swatches…", "تحميل عينات الألوان…"),
("Load…", "تحميل…"),
("Media", "وسائط"),
("Merge into Active Layer", "دمج في الطبقة النشطة"),
("Misspelled word → Correction (one per line):", "كلمة خاطئة ← تصحيح (واحد في كل سطر):"),
("Mobile", "جهاز محمول"),
("Mobile", "جوال"),
("More ArtCraft apps", "المزيد من تطبيقات ArtCraft"),
("Move Selection Here", "نقل التحديد إلى هنا"),
("Move to Color Group", "نقل إلى مجموعة ألوان"),
@@ -853,7 +854,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("New Bookmark for This Page", "إشارة مرجعية جديدة لهذه الصفحة"),
("New Book…", "كتاب جديد…"),
("New Color Group", "مجموعة ألوان جديدة"),
("New Color Group with Swatch", "مجموعة ألوان جديدة من الحامل"),
("New Color Group with Swatch", "مجموعة ألوان جديدة من عينة اللون"),
("New Library…", "مكتبة جديدة…"),
("New Workspace…", "مساحة عمل جديدة…"),
("No articles: exports follow page order.", "لا توجد مقالات؛ يتبع التصدير ترتيب الصفحات."),
@@ -899,14 +900,14 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Relink…", "إعادة الربط…"),
("Remove Conditions from Selection", "إزالة الشروط عن التحديد"),
("Repeat Header Rows", "تكرار صفوف الرأس"),
("Replace With", "استبدال بـ"),
("Replace With", "الاستبدال بـ"),
("Required", "مطلوب"),
("Reset All to Defaults", "إعادة تعيين الكل إلى الافتراضي"),
("Reverse", "عكس"),
("Right-click: stroke, groups", "نقرة يمنى: الحد والمجموعات"),
("Rotate 90° Clockwise", "تدوير 90° مع عقارب الساعة"),
("Ruler Units", "وحدات المسطرة"),
("Save Swatches for Exchange…", "حفظ الحوامل للتبادل…"),
("Save Swatches for Exchange…", "حفظ عينات الألوان للتبادل…"),
("Save recovery data every:", "حفظ بيانات الاسترداد كل:"),
("Saves which bars show and where the panels are.", "يحفظ الأشرطة الظاهرة ومواضع اللوحات."),
("Search:", "البحث:"),
@@ -922,14 +923,14 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Select two or more objects (or a group) to make a multi-state object.", "حدد كائنين أو أكثر (أو مجموعة) لإنشاء كائن متعدد الحالات."),
("Show Tag Markers", "إظهار علامات الوسوم"),
("Single-line", "سطر واحد"),
("Smart Text Reflow", "إعادة تدفق النص الذكية"),
("Smart Text Reflow", "التدفق الذكي للنص"),
("Speed", "السرعة"),
("Star Inset:", "تقعر النجمة:"),
("Start Page #:", "رقم صفحة البداية:"),
("Start:", "البداية:"),
("Status", "الحالة"),
("Stroke (X)", "حد (X)"),
("Style Mapping", "مطابقة الأنماط"),
("Style Mapping", "ربط الأنماط"),
("Style Name Conflicts", "تعارض أسماء الأنماط"),
("Stylistic Sets", "المجموعات الأسلوبية"),
("Subdivisions:", "التقسيمات الفرعية:"),
@@ -969,8 +970,8 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("⌥-click clears overrides", "النقر مع ⌥ يمسح التجاوزات"),
("⚠ out of date", "⚠ غير محدّث"),
("Interface", "الواجهة"),
("Advanced Type", "إعدادات النص المتقدمة"),
("Composition", "تنضيد النص"),
("Advanced Type", "كتابة متقدمة"),
("Composition", "التركيب"),
("Show Font Names in English", "إظهار أسماء الخطوط بالإنجليزية"),
("Missing Glyphs", "الحروف الناقصة"),
("Draw Missing Glyphs from Fallback Fonts", "رسم الحروف الناقصة بخطوط بديلة"),
@@ -981,7 +982,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Spelling", "التدقيق الإملائي"),
("Autocorrect", "التصحيح التلقائي"),
("Track Changes", "تعقب التغييرات"),
("Story Editor Display", "عرض محرر النص"),
("Story Editor Display", "عرض محرر القصة"),
("Display Performance", "أداء العرض"),
("Appearance of Black", "مظهر الأسود"),
("File Handling", "معالجة الملفات"),
@@ -998,7 +999,7 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("Version", "الإصدار"),
("{count} characters don't fit", "عدد الأحرف الزائدة: {count}"),
("document", "المستند"),
("story", "النص"),
("story", "القصة"),
("selection", "التحديد"),
("top", "أعلى"),
("center", "وسط"),
@@ -1014,4 +1015,403 @@ pub(super) const TABLE: &[(&str, &str)] = &[
("No conflicts", "لا توجد تعارضات"),
("Page (1–{count}):", "الصفحة (1–{count}):"),
("Fonts in Document: {count} Missing: {missing}", "الخطوط في المستند: {count} المفقودة: {missing}"),
// Complete coverage of the shared interface translation table.
("Story Direction", "اتجاه القصة"),
("Tate-Chu-Yoko", "نص أفقي داخل النص العمودي"),
("Ruby…", "روبي…"),
("Kenten", "علامات توكيد"),
("Tabs", "علامات الجدولة"),
("Story", "القصة"),
("Create Outlines", "إنشاء حدود خارجية"),
("Show Hidden Characters", "إظهار الأحرف المخفية"),
("Unmerge Cells", "إلغاء دمج الخلايا"),
("Snap to Guides", "محاذاة إلى الأدلة"),
("Snap to Document Grid", "محاذاة إلى شبكة المستند"),
("Align to Object Edges", "محاذاة إلى حواف الكائنات"),
("Align to Object Centers", "محاذاة إلى مراكز الكائنات"),
("Smart Dimensions", "الأبعاد الذكية"),
("Smart Spacing", "التباعد الذكي"),
("Snap to Zone", "نطاق المحاذاة"),
("Info", "معلومات"),
("Index", "فهرس"),
("Articles", "مقالات"),
("Tags", "وسوم"),
("Object States", "حالات الكائن"),
("Liquid Layout", "التخطيط المرن"),
("Split Window", "تقسيم النافذة"),
("New Window", "نافذة جديدة"),
("CMYK", "CMYK"),
("Lab", "Lab"),
("OpenType", "OpenType"),
("RGB", "RGB"),
("Accept All Changes", "قبول جميع التغييرات"),
("Activate Document", "تنشيط المستند"),
("Add Anchor Point", "إضافة نقطة ارتساء"),
("Add Document", "إضافة مستند"),
("Add Hyphenation Exception", "إضافة استثناء لتقسيم الكلمات"),
("Add Item", "إضافة عنصر"),
("Add Page to Spread", "إضافة صفحة إلى الصفحات المتقابلة"),
("Allow Selected Spread to Shuffle", "السماح بإعادة ترتيب الصفحات المتقابلة المحددة"),
("Anchored Object Options…", "خيارات الكائن المثبت…"),
("Anchored Objects", "الكائنات المثبتة"),
("Apply Attributes (Eyedropper)", "تطبيق السمات (القطارة)"),
("Apply Cell Style", "تطبيق نمط الخلية"),
("Apply Condition", "تطبيق شرط"),
("Apply Parent to Pages…", "تطبيق الصفحة الأصلية على الصفحات…"),
("ArtCraft App Page…", "صفحة تطبيق ArtCraft…"),
("ArtCraft Website…", "موقع ArtCraft…"),
("Attributes", "السمات"),
("Bevel and Emboss", "القطع المشطوف والنقش البارز"),
("Buttons", "أزرار"),
("Cell Style Options…", "خيارات نمط الخلية…"),
("Change All (Object)", "تغيير الكل (الكائن)"),
("Changes", "تغييرات"),
("Character Formatting", "تنسيق الأحرف"),
("Clear Conveyor", "إفراغ ناقل المحتوى"),
("Clear Transformations", "مسح التحويلات"),
("Clipping Path…", "مسار القص…"),
("Close Book", "إغلاق الكتاب"),
("Close Library", "إغلاق المكتبة"),
("Collect", "تجميع"),
("Color Settings…", "إعدادات الألوان…"),
("Community & Project Links", "روابط المجتمع والمشروع"),
("Container", "حاوية"),
("Content", "محتوى"),
("Contextual Task Bar", "شريط المهام السياقي"),
("Control", "التحكم"),
("Convert Cell to Graphic Cell", "تحويل الخلية إلى خلية رسومية"),
("Convert Cell to Graphic Cell…", "تحويل الخلية إلى خلية رسومية…"),
("Convert Cell to Text Cell", "تحويل الخلية إلى خلية نصية"),
("Convert Color", "تحويل اللون"),
("Convert Direction Point", "تحويل نقطة الاتجاه"),
("Convert Note to Text", "تحويل الملاحظة إلى نص"),
("Convert Table to Text", "تحويل الجدول إلى نص"),
("Convert Text to Table", "تحويل النص إلى جدول"),
("Convert to Button", "تحويل إلى زر"),
("Convert to Form Field", "تحويل إلى حقل نموذج"),
("Copy Link(s) To…", "نسخ الروابط إلى…"),
("Corner Options…", "خيارات الزوايا…"),
("Create Alternate Layout…", "إنشاء تخطيط بديل…"),
("Create Frame", "إنشاء إطار"),
("Create Merged Document…", "إنشاء مستند مدمج…"),
("Cross-Reference Formats", "تنسيقات المراجع المتقاطعة"),
("Cross-References", "مراجع متقاطعة"),
("Data Merge Fields", "حقول دمج البيانات"),
("Define Cross-Reference Format…", "تعريف تنسيق المرجع المتقاطع…"),
("Define Lists…", "تعريف القوائم…"),
("Define Text Variable…", "تعريف متغير نصي…"),
("Delete All Guides on Spread", "حذف جميع الأدلة على الصفحات المتقابلة"),
("Delete Anchor Point", "حذف نقطة ارتساء"),
("Delete Item", "حذف عنصر"),
("Delete Text Variable", "حذف متغير نصي"),
("Delete Workspace…", "حذف مساحة العمل…"),
("DesignCraft Website…", "موقع DesignCraft…"),
("DesignCraft on GitHub…", "DesignCraft على GitHub…"),
("Detach All Objects from Parent", "فصل جميع الكائنات عن الصفحة الأصلية"),
("Directional Feather", "الحواف المنعمة الاتجاهية"),
("Distribute", "توزيع"),
("Dock Panel", "إرساء اللوحة"),
("Document Endnote Options…", "خيارات الحواشي الختامية للمستند…"),
("Document Preferences", "تفضيلات المستند"),
("Document Presets", "الإعدادات المسبقة للمستند"),
("Document…", "مستند…"),
("Edit Parents", "تحرير الصفحات الأصلية"),
("Edit Story", "تحرير القصة"),
("Endnotes", "حواشٍ ختامية"),
("Entire Pasteboard", "لوحة اللصق بأكملها"),
("Erase", "محو"),
("Export Book to PDF…", "تصدير الكتاب إلى PDF…"),
("Export EPUB (Reflowable)…", "تصدير EPUB (قابل لإعادة التدفق)…"),
("Export Selection as Snippet", "تصدير التحديد كمقتطف"),
("Extend Text Selection", "توسيع تحديد النص"),
("Fast Display", "العرض السريع"),
("Find Object", "بحث عن كائن"),
("Find by Script Label", "بحث حسب تسمية البرنامج النصي"),
("First Object Above", "أول كائن أعلى"),
("Fit Selection in Window", "ملاءمة التحديد في النافذة"),
("Flattener Preview", "معاينة التسطيح"),
("Float Panel", "تعويم اللوحة"),
("Fonts in Document", "الخطوط في المستند"),
("Form Fields", "حقول النماذج"),
("Frame Fitting Options…", "خيارات ملاءمة الإطار…"),
("Generate Index…", "إنشاء فهرس…"),
("Generate QR Code…", "إنشاء رمز QR…"),
("Generate Static Caption", "إنشاء تعليق توضيحي ثابت"),
("Get Story", "جلب القصة"),
("Get Table", "جلب الجدول"),
("Global Light…", "الإضاءة العامة…"),
("Go To Link", "انتقال إلى الرابط"),
("Go To Source", "انتقال إلى المصدر"),
("Gradient Feather", "الحواف المنعمة المتدرجة"),
("Gridify", "تقسيم إلى شبكة"),
("Group Transparency", "شفافية المجموعة"),
("Hide Menu Item", "إخفاء عنصر القائمة"),
("Hide/Lock Others", "إخفاء/قفل العناصر الأخرى"),
("High Quality Display", "عرض عالي الجودة"),
("History", "سجل الإجراءات"),
("Import Options: Styles", "خيارات الاستيراد: الأنماط"),
("Index Page References", "مراجع صفحات الفهرس"),
("Inner Glow", "التوهج الداخلي"),
("Inner Shadow", "الظل الداخلي"),
("Insert Anchored Object…", "إدراج كائن مثبت…"),
("Insert Cross-Reference…", "إدراج مرجع متقاطع…"),
("Insert Endnote", "إدراج حاشية ختامية"),
("Insert Math Expression…", "إدراج تعبير رياضي…"),
("Insert Pages…", "إدراج صفحات…"),
("Insert Variable", "إدراج متغير"),
("Inspect Document", "فحص المستند"),
("Interface Color Theme", "نسق ألوان الواجهة"),
("Join the ArtCraft Discord…", "الانضمام إلى Discord الخاص بـ ArtCraft…"),
("Last Object Below", "آخر كائن أسفل"),
("Library Contents", "محتويات المكتبة"),
("Library Items", "عناصر المكتبة"),
("Liquid Page Rule", "قاعدة الصفحة المرنة"),
("List Documents", "سرد المستندات"),
("List Styles", "سرد الأنماط"),
("List Tools", "سرد الأدوات"),
("Load Place Cursor", "تحميل مؤشر الإدراج"),
("Make Compound Path", "إنشاء مسار مركب"),
("Map Styles to Tags", "ربط الأنماط بالوسوم"),
("Math Expression SVG", "تعبير رياضي بصيغة SVG"),
("Media Options", "خيارات الوسائط"),
("Menus…", "القوائم…"),
("Merge Layers", "دمج الطبقات"),
("Move Caret", "تحريك مؤشر النص"),
("Move Gap", "تحريك الفجوة"),
("Move Row", "نقل صف"),
("New Book", "كتاب جديد"),
("New Cell Style…", "نمط خلية جديد…"),
("New Color Swatch…", "عينة لون جديدة…"),
("New Condition…", "شرط جديد…"),
("New Guide", "دليل جديد"),
("New Hyperlink Destination…", "وجهة ارتباط تشعبي جديدة…"),
("New Hyperlink…", "ارتباط تشعبي جديد…"),
("New Library", "مكتبة جديدة"),
("New Page Reference…", "مرجع صفحة جديد…"),
("New Stroke Style…", "نمط حد جديد…"),
("New Table Style…", "نمط جدول جديد…"),
("Next Cell", "الخلية التالية"),
("Next Document", "المستند التالي"),
("Next Object Above", "الكائن التالي أعلى"),
("Next Object Below", "الكائن التالي أسفل"),
("Next Object in Group", "الكائن التالي في المجموعة"),
("Object Export Options", "خيارات تصدير الكائن"),
("Object Export Options…", "خيارات تصدير الكائن…"),
("Object Layer Options…", "خيارات طبقات الكائن…"),
("Object Layers", "طبقات الكائن"),
("Object Liquid Settings", "إعدادات الكائن المرن"),
("Open Book", "فتح كتاب"),
("Open Bytes", "فتح بيانات بايت"),
("Open IDML", "فتح IDML"),
("Open Library", "فتح مكتبة"),
("Outer Glow", "التوهج الخارجي"),
("Overprint Preview", "معاينة الطباعة الفوقية"),
("Override All Parent Page Items", "تجاوز جميع عناصر الصفحة الأصلية"),
("Page Transition", "انتقال الصفحة"),
("Page Transitions", "انتقالات الصفحات"),
("Paragraph Formatting", "تنسيق الفقرات"),
("Paste Into", "لصق داخل"),
("Paste without Formatting", "لصق دون تنسيق"),
("Place Caret", "وضع مؤشر النص"),
("Place Item", "إدراج عنصر"),
("Place Snippet", "وضع مقتطف"),
("Place and Link", "وضع وربط"),
("Polygon Settings…", "إعدادات المضلع…"),
("Preflight Document", "فحص المستند قبل الطباعة"),
("Previous Cell", "الخلية السابقة"),
("Previous Document", "المستند السابق"),
("Previous Object in Group", "الكائن السابق في المجموعة"),
("Printers", "طابعات"),
("Proof Colors", "ألوان المعاينة الطباعية"),
("Proof Setup", "إعداد المعاينة الطباعية"),
("Quick Apply…", "تطبيق سريع…"),
("Recover Documents", "استعادة المستندات"),
("Recovery Data", "بيانات الاستعادة"),
("Reject All Changes", "رفض جميع التغييرات"),
("Release Compound Path", "فك المسار المركب"),
("Remove All Local Overrides", "إزالة جميع التجاوزات المحلية"),
("Remove Document", "إزالة المستند"),
("Report an Issue…", "الإبلاغ عن مشكلة…"),
("Reset Shortcuts", "إعادة تعيين الاختصارات"),
("Reset Workspace", "إعادة تعيين مساحة العمل"),
("Resize", "تغيير الحجم"),
("Rotate Spread", "تدوير الصفحات المتقابلة"),
("Run Script", "تشغيل برنامج نصي"),
("Sample Document", "مستند نموذجي"),
("Satin", "الساتان"),
("Save Recovery Data", "حفظ بيانات الاستعادة"),
("Script Label", "تسمية البرنامج النصي"),
("Select All on Layer", "تحديد الكل في الطبقة"),
("Select Cells", "تحديد خلايا"),
("Select Column", "تحديد عمود"),
("Select Frame", "تحديد إطار"),
("Select Row", "تحديد صف"),
("Select Table", "تحديد جدول"),
("Select Text", "تحديد نص"),
("Select Tool", "اختيار أداة"),
("Select Word", "تحديد كلمة"),
("Selection Attributes", "سمات التحديد"),
("Separations Preview", "معاينة فصل الألوان"),
("Serialize", "تحويل إلى صيغة متسلسلة"),
("Set Active Layer", "تعيين الطبقة النشطة"),
("Set Shortcut", "تعيين اختصار"),
("Set Visibility / Lock", "تعيين الظهور / القفل"),
("Show Panel", "إظهار اللوحة"),
("Show/Hide Baseline Grid", "إظهار/إخفاء شبكة خط الأساس"),
("Show/Hide Frame Edges", "إظهار/إخفاء حواف الإطارات"),
("Show/Hide Guides", "إظهار/إخفاء الأدلة"),
("Show/Hide Hidden Characters", "إظهار/إخفاء الأحرف المخفية"),
("Show/Hide Panels", "إظهار/إخفاء اللوحات"),
("Show/Hide Panels Except Tools", "إظهار/إخفاء اللوحات باستثناء الأدوات"),
("Show/Hide Rulers", "إظهار/إخفاء المساطر"),
("Show/Hide Tagged Frames", "إظهار/إخفاء الإطارات الموسومة"),
("Show/Hide Text Threads", "إظهار/إخفاء روابط الإطارات النصية"),
("Smooth", "تنعيم"),
("Sort", "فرز"),
("Split Path", "تقسيم المسار"),
("Step and Repeat…", "خطوة وتكرار…"),
("Stroke Styles", "أنماط الحدود"),
("Style Source", "مصدر الأنماط"),
("Synchronize Book", "مزامنة الكتاب"),
("Table Panel", "لوحة الجدول"),
("Table Style Options…", "خيارات نمط الجدول…"),
("Table of Contents Entries", "مدخلات جدول المحتويات"),
("Table of Contents…", "جدول المحتويات…"),
("Text Anchors", "نقاط ارتساء النص"),
("Text Variables", "متغيرات النص"),
("Toggle Normal/Preview", "تبديل العرض العادي/المعاينة"),
("Toggle Selection", "تبديل التحديد"),
("Tools: Double Column", "الأدوات: عمودان"),
("Transform Panel", "لوحة التحويل"),
("Transform Values", "قيم التحويل"),
("Transparency Blend Space", "مساحة مزج الشفافية"),
("Transparency Flattener Presets", "إعدادات تسطيح الشفافية المسبقة"),
("Type on a Path", "الكتابة على مسار"),
("Type on a Path Options…", "خيارات الكتابة على مسار…"),
("Typical Display", "عرض قياسي"),
("Update Link", "تحديث الرابط"),
("User Dictionary Words", "كلمات قاموس المستخدم"),
("User Dictionary…", "قاموس المستخدم…"),
("Zoom To", "تكبير إلى"),
("⇧", "⇧"),
("⌃", "⌃"),
("⌘", "⌘"),
("⌥", "⌥"),
("Accept Change", "قبول التغيير"),
("Add Anchor", "إضافة نقطة ارتساء"),
("Add Selection to Article", "إضافة التحديد إلى المقالة"),
("Add Unnamed Colors", "إضافة ألوان غير مُسماة"),
("Add to Dictionary", "إضافة إلى القاموس"),
("Align Center", "محاذاة إلى الوسط"),
("Align Left", "محاذاة إلى اليسار"),
("Align Right", "محاذاة إلى اليمين"),
("Apply Character Style", "تطبيق نمط الحروف"),
("Apply Object Style", "تطبيق نمط الكائن"),
("Apply Paragraph Style", "تطبيق نمط الفقرة"),
("Apply Table Style", "تطبيق نمط الجدول"),
("Article Options", "خيارات المقالة"),
("Basic Feather", "الحواف المنعمة الأساسية"),
("Bold", "عريض"),
("Character Style Options…", "خيارات نمط الأحرف…"),
("Close Path", "إغلاق المسار"),
("Color Group Options", "خيارات مجموعة الألوان"),
("Condition Options…", "خيارات الشرط…"),
("Convert to Liquid Guide", "تحويل إلى دليل مرن"),
("Convert to Object", "تحويل إلى كائن"),
("Create Line", "إنشاء خط"),
("Create Path", "إنشاء مسار"),
("Decrease Point Size", "تقليل حجم الخط"),
("Delete Article", "حذف مقالة"),
("Delete Bookmark", "حذف إشارة مرجعية"),
("Delete Endnote", "حذف حاشية ختامية"),
("Delete Footnote", "حذف حاشية سفلية"),
("Delete Guide", "حذف دليل"),
("Delete Hyperlink", "حذف ارتباط تشعبي"),
("Delete List", "حذف قائمة"),
("Delete Note", "حذف ملاحظة"),
("Delete Pages", "حذف صفحات"),
("Delete Paragraph Style", "حذف نمط فقرة"),
("Delete Stroke Style", "حذف نمط حد"),
("Delete Table", "حذف جدول"),
("Delete Tag", "حذف وسم"),
("Delete Text", "حذف نص"),
("Distribute Columns Evenly", "توزيع الأعمدة بالتساوي"),
("Edit Endnote", "تحرير الحاشية الختامية"),
("Edit Note", "تحرير الملاحظة"),
("Embed Link", "تضمين الرابط"),
("Flip", "قلب"),
("Hyperlink Options…", "خيارات الارتباط التشعبي…"),
("Increase Point Size", "زيادة حجم الخط"),
("Insert Column Left", "إدراج عمود إلى اليسار"),
("Insert Column Right", "إدراج عمود إلى اليمين"),
("Insert Row Above", "إدراج صف أعلى"),
("Insert Row Below", "إدراج صف أسفل"),
("Italic", "مائل"),
("Justify Left", "ضبط مع محاذاة السطر الأخير إلى اليسار"),
("Layer Options…", "خيارات الطبقة…"),
("Move Anchors", "تحريك نقاط الارتساء"),
("Move Column", "نقل عمود"),
("Move Guide", "تحريك دليل"),
("Move Layer", "نقل طبقة"),
("Move Pages…", "نقل صفحات…"),
("Move to Layer", "نقل إلى طبقة"),
("New Article", "مقالة جديدة"),
("New Bookmark", "إشارة مرجعية جديدة"),
("New Layer…", "طبقة جديدة…"),
("New Note", "ملاحظة جديدة"),
("New Object Style…", "نمط كائن جديد…"),
("New Parent…", "صفحة أصلية جديدة…"),
("New Tag", "وسم جديد"),
("Paste in Place", "لصق في الموضع نفسه"),
("Place Loaded Graphic", "وضع الرسم المحمل"),
("Reject Change", "رفض التغيير"),
("Release State to Objects", "تحويل الحالة إلى كائنات"),
("Remove Hyphenation Exception", "إزالة استثناء لتقسيم الكلمات"),
("Remove from Article", "إزالة من المقالة"),
("Rename", "إعادة تسمية"),
("Rename Bookmark", "إعادة تسمية الإشارة المرجعية"),
("Rotate", "تدوير"),
("Scale", "تحجيم"),
("Set Cross-Reference Format", "تعيين تنسيق المرجع المتقاطع"),
("Set Footnote Text", "تعيين نص الحاشية السفلية"),
("Set Story Text", "تعيين نص القصة"),
("Shear", "إمالة"),
("Show All on Spread", "إظهار الكل على الصفحات المتقابلة"),
("Show State", "إظهار الحالة"),
("State Options", "خيارات الحالة"),
("Tag Frame", "وسم الإطار"),
("Tag Text", "وسم النص"),
("Unlink", "فك الارتباط"),
("Update Index", "تحديث الفهرس"),
("Update Table of Contents", "تحديث جدول المحتويات"),
("Bulleted and Numbered Lists", "قوائم نقطية ومرقمة"),
("Hyperlinks Cross-References", "الارتباطات التشعبية والمراجع المتقاطعة"),
("Document Footnote Options...", "خيارات الحواشي السفلية للمستند..."),
("Anchored Object", "كائن مثبت"),
("Apply Attributes (Eyedropper", "تطبيق السمات (القطارة"),
("Captions", "تعليقات توضيحية"),
("Change All (Object", "تغيير الكل (الكائن"),
("Clipping Path", "مسار القص"),
(
"Collect objects with the Content Collector (B); place them with the Content Placer.",
"اجمع الكائنات بأداة تجميع المحتوى (B)؛ ثم أدرجها بأداة إدراج المحتوى.",
),
("Convert Cell Type", "تحويل نوع الخلية"),
("Copy Link(s", "نسخ الروابط"),
("DesignCraft", "DesignCraft"),
("Export EPUB (Fixed Layout", "تصدير EPUB (تخطيط ثابت"),
("Export EPUB (Reflowable", "تصدير EPUB (قابل لإعادة التدفق"),
("Hyperlinks & Cross-References", "الارتباطات التشعبية والمراجع المتقاطعة"),
("Hyphens and Dashes", "الواصلات والشرطات"),
("Markers", "علامات"),
("Other", "أخرى"),
("Output", "الإخراج"),
("Quotation Marks", "علامات الاقتباس"),
("Symbols", "رموز"),
("Type & Tables", "النص والجداول"),
(
"Type a word with ~ at each allowed break (ex~am~ple); without ~ the word is never hyphenated.",
"اكتب كلمة وضع ~ عند كل موضع مسموح لتقسيمها (ex~am~ple)؛ دون ~ لن تُقسّم الكلمة أبدًا.",
),
("Utilities", "أدوات مساعدة"),
];
+241 -6
View File
@@ -2,14 +2,41 @@
//! Source strings stay logical. Never use these galleys for editable text/caret mapping.
use egui::text::{LayoutJob, TextWrapping};
use egui::{Align, Align2, Color32, FontFamily, FontId, Galley, Pos2, Rect, WidgetText};
use std::{ops::Range, sync::Arc};
use unicode_bidi::BidiInfo;
use std::{collections::HashMap, ops::Range, sync::Arc};
use unicode_bidi::{BidiClass, BidiInfo, bidi_class};
use unicode_segmentation::UnicodeSegmentation;
/// Allocation-free preflight: ordinary Latin, CJK and emoji labels need no bidi analysis.
/// Include directional controls so explicit embeddings/overrides keep their existing behavior.
fn may_have_rtl(text: &str) -> bool {
!text.is_ascii()
&& text.chars().any(|c| {
matches!(
bidi_class(c),
BidiClass::R
| BidiClass::AL
| BidiClass::AN
| BidiClass::LRE
| BidiClass::RLE
| BidiClass::LRO
| BidiClass::RLO
| BidiClass::PDF
| BidiClass::LRI
| BidiClass::RLI
| BidiClass::FSI
| BidiClass::PDI
)
})
}
fn has_rtl(text: &str) -> bool {
may_have_rtl(text) && BidiInfo::new(text, None).has_rtl()
}
/// Resolve translated labels through bidi, without changing IDs, commands or stored text.
pub fn widget(ui: &egui::Ui, text: impl Into<WidgetText>) -> WidgetText {
let text = text.into();
if text.text().is_ascii() || !BidiInfo::new(text.text(), None).has_rtl() {
if !has_rtl(text.text()) {
return text;
}
let mut job = (*text.into_layout_job(ui.style(), egui::FontSelection::Default, Align::Center)).clone();
@@ -21,7 +48,7 @@ pub fn widget(ui: &egui::Ui, text: impl Into<WidgetText>) -> WidgetText {
/// Accessibility still receives the original logical string through Galley::job.
pub fn label(ui: &mut egui::Ui, text: impl Into<WidgetText>) -> egui::Response {
let text = text.into();
let rtl = !text.text().is_ascii() && BidiInfo::new(text.text(), None).has_rtl();
let rtl = has_rtl(text.text());
if !rtl {
return ui.label(text);
}
@@ -111,8 +138,73 @@ fn visual_line(job: &LayoutJob, bidi: &BidiInfo<'_>, line: Range<usize>) -> Layo
visual
}
fn layout(ctx: &egui::Context, mut job: LayoutJob) -> Arc<Galley> {
if job.text.is_ascii() || !BidiInfo::new(&job.text, None).has_rtl() {
const MAX_CACHED_LABELS: usize = 256;
const MAX_CACHED_TEXT_BYTES: usize = 4096;
#[derive(Clone)]
struct CachedLayout {
galley: Arc<Galley>,
last_used: u64,
}
#[derive(Clone, Default)]
struct LayoutCache {
// A tiny galley owned by egui's font cache acts as a lifetime token. Font changes,
// DPI changes, atlas rebuilds and eviction replace it. Holding the old Arc prevents
// address reuse. Unlike a font-definition hash, this also detects atlas resets.
font_token: Option<Arc<Galley>>,
entries: HashMap<u64, CachedLayout>,
clock: u64,
}
impl LayoutCache {
fn lookup(&mut self, token: Arc<Galley>, key: u64, job: &LayoutJob) -> Option<Arc<Galley>> {
if self.font_token.as_ref().is_none_or(|old| !Arc::ptr_eq(old, &token)) {
self.entries.clear();
self.font_token = Some(token);
}
self.clock = self.clock.saturating_add(1);
let entry = self.entries.get_mut(&key)?;
// Check equality as well as the hash: collisions must never display another label.
if *entry.galley.job != *job {
return None;
}
entry.last_used = self.clock;
Some(Arc::clone(&entry.galley))
}
fn insert(&mut self, key: u64, galley: Arc<Galley>) {
if self.entries.len() >= MAX_CACHED_LABELS
&& let Some(oldest) = self.entries.iter().min_by_key(|(_, entry)| entry.last_used).map(|(key, _)| *key)
{
self.entries.remove(&oldest);
}
self.entries.insert(key, CachedLayout { galley, last_used: self.clock });
}
}
fn layout(ctx: &egui::Context, job: LayoutJob) -> Arc<Galley> {
if !may_have_rtl(&job.text) {
return ctx.fonts_mut(|fonts| fonts.layout_job(job));
}
// Keep unusually large/dynamic content from filling a UI-label cache.
if job.text.len() > MAX_CACHED_TEXT_BYTES || job.sections.len() > 256 {
return layout_uncached(ctx, job);
}
let token = ctx.fonts_mut(|fonts| fonts.layout_no_wrap(String::new(), FontId::default(), Color32::TRANSPARENT));
let id = egui::Id::new("designcraft.rtl.layout-cache");
let key = egui::util::hash(&job);
let cached = ctx.data_mut(|data| data.get_temp_mut_or_default::<LayoutCache>(id).lookup(token, key, &job));
if let Some(galley) = cached {
return galley;
}
let galley = layout_uncached(ctx, job);
ctx.data_mut(|data| data.get_temp_mut_or_default::<LayoutCache>(id).insert(key, Arc::clone(&galley)));
galley
}
fn layout_uncached(ctx: &egui::Context, mut job: LayoutJob) -> Arc<Galley> {
if !has_rtl(&job.text) {
return ctx.fonts_mut(|fonts| fonts.layout_job(job));
}
let original = Arc::new(job.clone());
@@ -219,6 +311,149 @@ mod tests {
galley.rows.iter().flat_map(|row| row.glyphs.iter().filter(|g| g.advance_width > 0.0).map(|g| g.chr)).collect()
}
fn cache_job() -> LayoutJob {
LayoutJob::simple("ملف (PDF 123) جديد للنشر والطباعة".repeat(4), FontId::proportional(15.0), Color32::WHITE, 150.0)
}
#[test]
fn cache_reuses_final_layout_across_frames_and_matches_uncached_output() {
with_fonts(|ctx| {
let job = cache_job();
let first = layout(ctx, job.clone());
let reference = layout_uncached(ctx, job.clone());
assert_eq!(displayed(&first), displayed(&reference));
assert_eq!(first.rect, reference.rect);
assert_eq!(first.rows.len(), reference.rows.len());
assert!(Arc::ptr_eq(&first, &layout(ctx, job.clone())));
ctx.end_pass().textures_delta.clear();
ctx.begin_pass(egui::RawInput { max_texture_side: Some(8192), ..Default::default() });
assert!(Arc::ptr_eq(&first, &layout(ctx, job)));
});
}
#[test]
fn cache_respects_text_formatting_wrapping_and_elision() {
with_fonts(|ctx| {
let job = cache_job();
let first = layout(ctx, job.clone());
let mut variants = Vec::new();
let mut changed = job.clone();
changed.wrap.max_width = 80.0;
variants.push(changed);
let mut changed = job.clone();
changed.wrap.max_rows = 1;
variants.push(changed);
let mut changed = job.clone();
changed.sections[0].format.font_id.size = 24.0;
variants.push(changed);
let mut changed = job.clone();
changed.sections[0].format.color = Color32::RED;
variants.push(changed);
variants.push(LayoutJob::simple_singleline("עברית 123".into(), FontId::default(), Color32::WHITE));
for changed in variants {
let cached = layout(ctx, changed.clone());
let reference = layout_uncached(ctx, changed);
assert!(!Arc::ptr_eq(&first, &cached));
assert_eq!(cached.job, reference.job);
assert_eq!(cached.rect, reference.rect);
assert_eq!(cached.elided, reference.elided);
assert_eq!(displayed(&cached), displayed(&reference));
}
});
}
#[test]
fn cache_invalidates_when_fonts_or_scale_change() {
with_fonts(|ctx| {
let job = cache_job();
let first = layout(ctx, job.clone());
ctx.end_pass().textures_delta.clear();
ctx.set_pixels_per_point(2.0);
ctx.begin_pass(egui::RawInput { max_texture_side: Some(8192), ..Default::default() });
let scaled = layout(ctx, job.clone());
assert!(!Arc::ptr_eq(&first, &scaled));
ctx.end_pass().textures_delta.clear();
let mut fonts = ctx.fonts(|fonts| fonts.definitions().clone());
fonts.families.insert(FontFamily::Name("cache-test".into()), Vec::new());
ctx.set_fonts(fonts);
ctx.begin_pass(egui::RawInput { max_texture_side: Some(8192), ..Default::default() });
let new_fonts = layout(ctx, job.clone());
assert!(!Arc::ptr_eq(&scaled, &new_fonts));
ctx.end_pass().textures_delta.clear();
// Changing atlas options recreates the atlas without changing font definitions.
ctx.begin_pass(egui::RawInput { max_texture_side: Some(4096), ..Default::default() });
let new_atlas = layout(ctx, job.clone());
assert!(!Arc::ptr_eq(&new_fonts, &new_atlas));
assert_eq!(displayed(&new_atlas), displayed(&layout_uncached(ctx, job)));
});
}
#[test]
fn cache_is_bounded_and_font_token_replacement_invalidates_entries() {
with_fonts(|ctx| {
let job = cache_job();
let galley = layout_uncached(ctx, job.clone());
let token = ctx.fonts_mut(|fonts| fonts.layout_no_wrap(String::new(), FontId::default(), Color32::TRANSPARENT));
let mut cache = LayoutCache::default();
cache.lookup(token, 0, &job);
for key in 0..=MAX_CACHED_LABELS as u64 {
cache.clock += 1;
cache.insert(key, Arc::clone(&galley));
}
assert_eq!(cache.entries.len(), MAX_CACHED_LABELS);
assert!(!cache.entries.contains_key(&0));
// Replacing the font-cache token models atlas recreation, even with identical fonts.
let replacement = Arc::new((*galley).clone());
assert!(cache.lookup(replacement, 1, &job).is_none());
assert!(cache.entries.is_empty());
});
}
#[test]
#[ignore = "manual timing comparison, no machine-dependent pass threshold"]
fn benchmark_cached_wrapping() {
with_fonts(|ctx| {
let job = cache_job();
let _ = layout(ctx, job.clone());
let start = std::time::Instant::now();
for _ in 0..200 {
std::hint::black_box(layout_uncached(ctx, job.clone()));
}
let uncached = start.elapsed();
let start = std::time::Instant::now();
for _ in 0..200 {
std::hint::black_box(layout(ctx, job.clone()));
}
eprintln!("200 wrapped labels: uncached={uncached:?}, cached={:?}", start.elapsed());
});
}
#[test]
fn ordinary_multilingual_labels_skip_bidi_analysis() {
for text in ["", "File (123)", "Édition", "中文排版", "スウォッチ", "e\u{301}", "🎨 🙂"] {
assert!(!may_have_rtl(text), "{text:?}");
assert!(!BidiInfo::new(text, None).has_rtl(), "{text:?}");
}
for text in ["ملف", "עברית", "PDF ملف 123", "\u{1e900}", "\u{200f}", "\u{202e}abc\u{202c}", "\u{2067}abc\u{2069}", "١٢٣"] {
assert!(may_have_rtl(text), "{text:?}");
assert_eq!(has_rtl(text), BidiInfo::new(text, None).has_rtl(), "{text:?}");
}
}
#[test]
fn non_rtl_widgets_keep_native_text_and_formatting() {
with_fonts(|ctx| {
egui::Area::new(egui::Id::new("rtl-fast-path-test")).show(ctx, |ui| {
for text in ["中文", "日本語", "Édition", "🎨"] {
let rendered = widget(ui, egui::RichText::new(text).strong());
assert!(matches!(rendered, WidgetText::RichText(_)));
assert_eq!(rendered.text(), text);
assert!(label(ui, text).rect.is_finite());
}
});
});
}
#[test]
fn mixed_arabic_latin_digits_and_brackets_preserve_logical_source() {
with_fonts(|ctx| {