mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-22 02:15:24 +01:00
i18n: add Gujarati (gu) interface catalog
Adds a Gujarati interface catalog modelled on the Hindi catalog. Registers gu in LANGUAGES, adds Gujarati script font fallback, and updates the localization parity doc and ROADMAP languages table. Translations are written from the English meaning (clean-room). Common English technology terms are transliterated. About 30 terms are flagged for native review; 2,607 messages remain in English. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f242b0752f
commit
0ea7ab9294
6 files changed
+4292
-3
No files matched your search
+3
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
**Stage: alpha** · next: beta, ~13 points (ready for real work ~62% → ~75%, and reliable `.ai` exchange) and ~170–270 h away
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-10 · **Change:** minor (docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: Raster effects 85% → 88%, gallery thumbnails and in-dialog preview in; headline numbers unchanged; Symbols area ~87% → ~88%: dynamic instance parts take opacity, blend, gradient and pattern on the canvas; G5 docs sync for Overlap and Pattern auto corners; previously minor: Tools stays beside the canvas with left-side panels; Hindi catalog draft complete under the translation tests; contributor loanword terminology reviewed; wider proofreading welcome; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; new gradients follow document color mode; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x)
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-11 · **Change:** minor (Gujarati (`gu`): 4,235-row machine-assisted interface catalog, desktop font fallback; messages and native review pending; docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: Raster effects 85% → 88%, gallery thumbnails and in-dialog preview in; headline numbers unchanged; Symbols area ~87% → ~88%: dynamic instance parts take opacity, blend, gradient and pattern on the canvas; G5 docs sync for Overlap and Pattern auto corners; previously minor: Tools stays beside the canvas with left-side panels; Hindi catalog draft complete under the translation tests; contributor loanword terminology reviewed; wider proofreading welcome; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; new gradients follow document color mode; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x)
|
||||
|
||||
VectorCraft is a clean-room, open-source, pure-Rust reimplementation of the Adobe Illustrator workflow. It runs
|
||||
on macOS, Windows, Linux, FreeBSD and the web (WASM), and agents can drive all of it over MCP, the CLI and a JSON
|
||||
@@ -96,6 +96,7 @@ Weights, evidence and the missing items per area: [target-app-parity.md](docs/ta
|
||||
| Simplified Chinese | `zh-hans` | partial (messages in English) | 85% |
|
||||
| Spanish | `es` | full | 100% |
|
||||
| Hindi | `hi` | catalog complete; machine-assisted draft, native review pending | complete under the scanner |
|
||||
| Gujarati | `gu` | catalog of 4,235 interface strings; machine-assisted draft, native review pending | menus and dialogs; status messages not yet |
|
||||
| Arabic | `ar` | none (no right-to-left interface) | 0% |
|
||||
| French | `fr` | full | 100% |
|
||||
| Portuguese (Brazil) | `pt-br` | full | 100% |
|
||||
@@ -219,6 +220,7 @@ The full earlier record of what landed is kept in [docs/roadmap.md](docs/roadmap
|
||||
| 2026-11-03 | minor | UI: Window → Help Bar toggles the tool-help strip separately from the status bar and saves visibility with workspaces. Scores and estimates unchanged. |
|
||||
| 2026-11-03 | minor | Docked Tools stays between left-side panels and the canvas; redocking accepts canvas and window edges. Requested layout choice; scores and estimates unchanged. |
|
||||
| 2026-11-02 | minor | Selection QoL: saved marquee modes, screen drag direction with a 3 px dead zone, and translated mode/E feedback (#5313); VectorCraft addition, scores and estimates unchanged. |
|
||||
| 2026-11-11 | minor | Gujarati (`gu`): 4,235-row machine-assisted interface catalog, one/other plurals, desktop Gujarati font fallback; messages not yet translated; native review pending |
|
||||
| 2026-11-06 | minor | Hindi (`hi`): 7,877-row machine-assisted catalog, zero/one singular plurals, desktop font fallback and optional Devanagari craft-fonts fallback; all 55 translation tests pass; native review and a web font remain; scores and estimates unchanged |
|
||||
| 2026-11-05 | minor | Progress log row for the Type Tools add-on's Release Type on a Path (#5532); headline numbers unchanged. |
|
||||
| 2026-11-03 | minor | Progress log row for the Type Tools add-on's Text Tweaker (#4924); headline numbers unchanged. |
|
||||
|
||||
@@ -44,6 +44,7 @@ pub(super) fn script_families(c: char) -> &'static [&'static str] {
|
||||
"Lohit Devanagari",
|
||||
"Mangal",
|
||||
],
|
||||
Script::Gujarati => &["Gujarati Sangam MN", "GujaratiMT", "Nirmala UI", "Shruti", "Noto Sans Gujarati", "Noto Sans Gujarati UI"],
|
||||
_ => &[],
|
||||
}
|
||||
}
|
||||
@@ -155,6 +156,13 @@ mod tests {
|
||||
assert!(script_families('a').is_empty());
|
||||
}
|
||||
|
||||
/// Gujarati takes a font that draws it (macOS Gujarati Sangam MN, Windows Nirmala UI or Shruti).
|
||||
#[test]
|
||||
fn gujarati_prefers_fonts_made_for_it() {
|
||||
assert_eq!(script_families('ગ').first(), Some(&"Gujarati Sangam MN"));
|
||||
assert!(script_families('ગ').contains(&"Nirmala UI"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_name_table_of_many_records_is_cut_short() {
|
||||
let many: Vec<(u16, &str)> = (0..2000).map(|_| (1, "Short")).collect();
|
||||
|
||||
@@ -97,7 +97,7 @@ fn plural_polish(n: u64) -> usize {
|
||||
}
|
||||
|
||||
/// The registry. English first: it is the fallback and the source language.
|
||||
pub static LANGUAGES: [LangInfo; 28] = [
|
||||
pub static LANGUAGES: [LangInfo; 29] = [
|
||||
LangInfo { code: "en", name: "English", source: "", plural: plural_one_other, complete_menus: false, catalog: OnceLock::new() },
|
||||
// Hindi shares the integer zero/one rule with French. Desktop UI fonts are loaded lazily
|
||||
// from installed faces by ui_fonts; the web needs a Devanagari font in its font set.
|
||||
@@ -109,6 +109,17 @@ pub static LANGUAGES: [LangInfo; 28] = [
|
||||
complete_menus: true,
|
||||
catalog: OnceLock::new(),
|
||||
},
|
||||
// Gujarati: the whole interface and the status and error messages, with loanwords transliterated into
|
||||
// Gujarati script; one/other plurals. Gujarati text is drawn with an installed system font
|
||||
// (Gujarati Sangam MN, Nirmala UI, Shruti) or a craft-fonts face tagged `Gujr`; every `gu-*` locale resolves here.
|
||||
LangInfo {
|
||||
code: "gu",
|
||||
name: "ગુજરાતી",
|
||||
source: include_str!("i18n/gu.tsv"),
|
||||
plural: plural_one_other,
|
||||
complete_menus: true,
|
||||
catalog: OnceLock::new(),
|
||||
},
|
||||
// Greek: the whole interface and the status and error messages, keeping the same names in
|
||||
// English as Spanish; every `el-*` locale (including `el-GR` and `el-CY`) resolves here.
|
||||
LangInfo {
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -3,6 +3,17 @@ use super::*;
|
||||
|
||||
const ZH: fn() -> Lang = || Lang::from_code("zh-hant").expect("zh-hant registered");
|
||||
|
||||
#[test]
|
||||
fn gujarati_resolves_locales_and_uses_one_other_plurals() {
|
||||
let gu = Lang::from_code("gu").expect("gu registered");
|
||||
for tag in ["gu", "gu-IN", "gu_IN.UTF-8", "GU-in", "gu-Gujr-IN"] {
|
||||
assert_eq!(lang_from_tag(tag), Some(gu), "{tag}");
|
||||
}
|
||||
assert_eq!(gu.name(), "ગુજરાતી");
|
||||
assert_eq!([0, 1, 2, 21].map(gu.0.plural), [1, 0, 1, 1]);
|
||||
assert_eq!(tr(gu, "Save"), "સાચવો");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hindi_resolves_locales_and_uses_zero_one_plurals() {
|
||||
let hi = Lang::from_code("hi").expect("hi registered");
|
||||
@@ -461,6 +472,10 @@ fn is_devanagari(c: char) -> bool {
|
||||
matches!(c as u32, 0x0900..=0x097F | 0x1CD0..=0x1CFF | 0xA8E0..=0xA8FF)
|
||||
}
|
||||
|
||||
fn is_gujarati(c: char) -> bool {
|
||||
matches!(c as u32, 0x0A80..=0x0AFF)
|
||||
}
|
||||
|
||||
/// The UI fonts draw every character the catalogs use, in every family the UI draws text with
|
||||
/// (the web build has no system fonts to fall back to). Chinese and Japanese characters come from
|
||||
/// the craft-fonts build input, which is optional: without it they are left to the installed
|
||||
@@ -474,6 +489,7 @@ fn bundled_fonts_cover_the_catalogs() {
|
||||
let japanese_ui_font = vectorcraft_text::CRAFT_FONTS.iter().any(|f| f.is_japanese());
|
||||
let georgian_ui_font = vectorcraft_text::CRAFT_FONTS.iter().any(|f| f.is_georgian());
|
||||
let devanagari_ui_font = vectorcraft_text::CRAFT_FONTS.iter().any(|f| f.scripts.contains(&"Deva"));
|
||||
let gujarati_ui_font = vectorcraft_text::CRAFT_FONTS.iter().any(|f| f.scripts.contains(&"Gujr"));
|
||||
let ctx = egui::Context::default();
|
||||
crate::theme::install_fonts(&ctx);
|
||||
let mut output = ctx.run_ui(egui::RawInput::default(), |_| {});
|
||||
@@ -497,6 +513,7 @@ fn bundled_fonts_cover_the_catalogs() {
|
||||
&& (cjk_checked || !is_cjk(*c))
|
||||
&& (georgian_ui_font || !is_georgian(*c))
|
||||
&& (devanagari_ui_font || !is_devanagari(*c))
|
||||
&& (gujarati_ui_font || !is_gujarati(*c))
|
||||
})
|
||||
.collect();
|
||||
for family in &families {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Localization parity
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-06 · **Change:** minor (Hindi catalog draft complete under the translation tests; contributor loanword terminology reviewed; wider proofreading welcome; Brazilian Portuguese: 154 rows for the strings the sibling catalogs translate — smart-filter and print presets, dimension lines, swatches, canvas messages; previously minor: Bosnian (`bs`): complete catalog; previously minor: Vietnamese text: stacked diacritics tested and attach in every form, #4491; previously: Catalan (`ca`) catalog added, complete under the tests)
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-11 · **Change:** minor (Gujarati (`gu`) catalog: 4,235 machine-assisted interface rows, one/other plurals, desktop font fallback; Hindi catalog draft complete under the translation tests; contributor loanword terminology reviewed; wider proofreading welcome; Brazilian Portuguese: 154 rows for the strings the sibling catalogs translate — smart-filter and print presets, dimension lines, swatches, canvas messages; previously minor: Bosnian (`bs`): complete catalog; previously minor: Vietnamese text: stacked diacritics tested and attach in every form, #4491; previously: Catalan (`ca`) catalog added, complete under the tests)
|
||||
|
||||
Per-language status of VectorCraft's interface. How the catalogs work and how to add a language:
|
||||
[`development.md` › Localisation](development.md#localisation). Part of
|
||||
@@ -30,6 +30,7 @@ Chinese by `imachus`). Only Georgian is recorded as reviewed by a native speaker
|
||||
| Simplified Chinese (Mandarin) | `zh-hans` | 5,102 rows, 791 of them `@msg` (counted 2026-10-21): menus, `tl!` literals and messages complete when counted | all | CJK UI font from craft-fonts (BIZ UDPGothic) when embedded, else a system font; IME with marked text at the caret; vertical type partial ([type-parity.md](type-parity.md)) | no | full | — (review) |
|
||||
| Spanish | `es` | 4,009 / 4,020 (99.7%) | all (604 messages) | Latin | no | full | — (review) |
|
||||
| Hindi | `hi` | 7,877 rows (2026-11-06): 2,537 `@msg`, 45 `@msgplural`, 38 `@plural`; no gaps in the untranslated report | menus, dialogs, tooltips and scanned messages; contributor-approved loanword terminology; agent wording pass | UI and document text shape with HarfRust; installed desktop Devanagari fallback, or a `Deva` craft-fonts face; web font still needed | contributor terminology review; wider proofread welcome | complete catalog, machine-assisted draft | native review, layout and web font |
|
||||
| Gujarati | `gu` | 4,235 rows (2026-11-11): every menu string, `tl!` literal and fragment in the source dump; status and error messages not yet translated (2,607 in the dump) | menus and dialogs; messages partial | Gujarati script: installed Gujarati Sangam MN, Nirmala UI or Shruti on desktop; a craft-fonts `Gujr` face on the web is still to come | no | machine-assisted draft, native review pending | menus and dialogs done; messages and review remain |
|
||||
| Arabic | `ar` | 0 | none | document text: bidi layout and Paragraph Direction; interface: no right-to-left layout, no Arabic shaping in egui | no | none | 25–40 |
|
||||
| French | `fr` | 4,020 / 4,020 (100%) | all | Latin | no | full | — (review) |
|
||||
| Portuguese | `pt-br` | 6,106 catalog entries (counted 2026-10-31 on `main` at `d26dd933a`): menus, `tl!` literals and messages complete when counted; one/other plurals | all | Latin | contributor is a Brazilian Portuguese speaker; further native review welcome | full | — (review) |
|
||||
@@ -97,6 +98,7 @@ font for the web build.
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-11-11 | minor | Gujarati (`gu`): 4,235-row machine-assisted interface catalog, one/other plurals, desktop Gujarati font fallback and a glyph-coverage filter; status and error messages not yet translated; native review pending |
|
||||
| 2026-11-06 | minor | Hindi (`hi`): 7,877-row machine-assisted catalog, zero/one singular plurals, desktop font fallback and optional Devanagari craft-fonts fallback; all 55 translation tests pass; native review and a web font remain; scores and estimates unchanged |
|
||||
| 2026-10-30 | minor | Bosnian (`bs`, Latin, Ijekavian): complete catalog of 5,841 rows, every `bs-*` locale, one/few/other plurals; AI-assisted, not yet native-reviewed |
|
||||
| 2026-10-29 | minor | Vietnamese text: letters with two marks (Ể, Ứ, Ự) attach in precomposed, decomposed and keyboard forms, and a font lacking the marks falls back for the whole letter (#4491); scores unchanged |
|
||||
|
||||
Reference in new issue
Block a user