i18n: Japanese for the whole interface (panels, dialogs, tooltips, hints)
Closes #217. The Japanese catalog now covers every menu string and every tl! literal, so `complete_menus` is on for `ja` and the tests keep it complete. - ja.tsv: about 2,300 rows added after the existing menu rows, which are unchanged: panels, dialogs, tooltips, the hint bar, document tabs, status messages and the strings built at run time (section lists, counts, `@plural` rows). Written from the meaning of the English labels in the vocabulary Japanese users of vector illustration software know; product and format names stay in Latin letters, the trailing "…" is kept, and placeholders appear in both columns. - Kept in English, as before: the product name, OpenType, the built-in workspace names and the bracketed perspective preset names. - tests: the languages that keep those names in English (`cs`, `ja`) are listed once (`KEEPS_MENU_NAMES`), and the completeness test skips the kept names for them, so a language can keep them and still be complete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a26aa5b203
commit
ef167a1345
|
|
@ -120,7 +120,7 @@ grade by behaviour against `plan/illustrator/`, not by whether a menu item exist
|
|||
- Pathfinder (10 exact curve booleans), Offset, Outline Stroke, Simplify, Clean Up, Split Into Grid, Divide Objects Below.
|
||||
- Live effects with previewing dialogs: Distort & Transform, Path, Convert to Shape, 15 Warp styles, Round Corners, Scribble, Effect → Pathfinder (all 10 operations, live on groups; several loose objects are grouped first, in one undo step), Color Adjustments (Brightness/Contrast, Curves, Levels, Hue/Saturation, Shift to Color, Temperature/Tint, on vectors, live type and embedded images), and raster drop shadow, glows and feather. SVG and PDF export keep live effects (geometry baked; SVG raster effects as filters).
|
||||
- **Type:** Text Wrap, Type on a Path effects (Rainbow/Skew/3D Ribbon/Stair Step/Gravity), Character and Paragraph Styles (override-preserving redefine), Area Type Options (rows/columns/inset/first baseline), threaded text across any closed shapes, Fit Headline. Area type resizes like Illustrator's type areas: a bounding-box handle drag (Selection tool) or Area Type Options Width/Height size the frame and the text reflows at its size (threads too); Direct Selection drags a frame corner or edge (`text.reshapeArea`). Point type still scales.
|
||||
- **Interface languages, vertical type:** VectorCraft ▸ Language (or Preferences ▸ User Interface) picks Automatic (the system locale) or a registered language, persisted as `interfaceLanguage`. Translations come from per-language catalogs (`i18n/*.tsv`): Traditional Chinese covers the whole interface, Czech and Japanese every menu label (tested); untranslated text stays English. Japanese and Chinese glyphs come from the craft-fonts build input (release builds) or the installed fonts, Czech ones from the bundled UI fonts. Vertical Type, Vertical Area Type and Vertical Type on a Path create vertical text (columns right to left, upright CJK glyphs and marks with `vert` alternates, Latin and longer numbers on their side, two- and three-digit numbers set as tate-chu-yoko in one em of the column (kept whole when justified), upright glyphs centred on the column (tracked or justified too), point type's anchor on the first column's centre line); kinsoku (the strict set) applies to horizontal and vertical Japanese; Type ▸ Type Orientation switches existing text; caret, selection, hit testing and arrow keys follow the writing direction. Vertical text exports to PDF as real text and to SVG as outlines.
|
||||
- **Interface languages, vertical type:** VectorCraft ▸ Language (or Preferences ▸ User Interface) picks Automatic (the system locale) or a registered language, persisted as `interfaceLanguage`. Translations come from per-language catalogs (`i18n/*.tsv`): Traditional Chinese and Japanese cover the whole interface, Czech every menu label (tested); untranslated text stays English. Japanese and Chinese glyphs come from the craft-fonts build input (release builds) or the installed fonts, Czech ones from the bundled UI fonts. Vertical Type, Vertical Area Type and Vertical Type on a Path create vertical text (columns right to left, upright CJK glyphs and marks with `vert` alternates, Latin and longer numbers on their side, two- and three-digit numbers set as tate-chu-yoko in one em of the column (kept whole when justified), upright glyphs centred on the column (tracked or justified too), point type's anchor on the first column's centre line); kinsoku (the strict set) applies to horizontal and vertical Japanese; Type ▸ Type Orientation switches existing text; caret, selection, hit testing and arrow keys follow the writing direction. Vertical text exports to PDF as real text and to SVG as outlines.
|
||||
- **Transparency:** opacity masks (clip/invert/disable/link), exported as SVG `<mask>` and PDF soft masks.
|
||||
- **Advanced art:** live Blends (steps/distance/smooth colour, editable spine, anchor-targeted Blend tool, faithful interpolation, knockout), Envelope Distort (warp/mesh/top object, Reset, full Envelope Options, mesh handles, Edit Contents; type, images, symbols, gradients, patterns and appearance distorted everywhere), Liquify tools with options and pen pressure, Puppet Warp with rotating pins, Perspective Grid with presets, movable planes and projected type, Gradient Mesh, Shape Builder, Live Paint (every path an edge, open lines included), Image Trace (12 presets), pattern swatches with pattern editing mode, live Repeat (radial/grid/mirror).
|
||||
- **Paint and appearance (M3):**
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -62,9 +62,9 @@ fn plural_czech(n: u64) -> usize {
|
|||
/// The registry. English first: it is the fallback and the source language.
|
||||
pub static LANGUAGES: [LangInfo; 4] = [
|
||||
LangInfo { code: "en", name: "English", source: "", plural: plural_one_other, complete_menus: false, catalog: OnceLock::new() },
|
||||
// Japanese: every menu label (`menu_catalogs_translate_every_menu_label`); panels and dialogs
|
||||
// not yet. `complete_menus` once the catalog covers every menu string and `tl!` literal.
|
||||
LangInfo { code: "ja", name: "日本語", source: include_str!("ja.tsv"), plural: plural_none, complete_menus: false, catalog: OnceLock::new() },
|
||||
// Japanese: the whole interface (every menu string and `tl!` literal), keeping the product,
|
||||
// workspace and perspective preset names in English (`MENU_KEEP_AS_IS`).
|
||||
LangInfo { code: "ja", name: "日本語", source: include_str!("ja.tsv"), plural: plural_none, complete_menus: true, catalog: OnceLock::new() },
|
||||
// Czech: every menu label (`menu_catalogs_translate_every_menu_label`); panels and dialogs not yet.
|
||||
LangInfo { code: "cs", name: "Čeština", source: include_str!("cs.tsv"), plural: plural_czech, complete_menus: false, catalog: OnceLock::new() },
|
||||
// Traditional Chinese in the vocabulary used in Taiwan; `zh-TW`, `zh-HK`, `zh-MO` and `zh-Hant-*`
|
||||
|
|
|
|||
|
|
@ -254,7 +254,9 @@ fn complete_languages_translate_every_menu_string() {
|
|||
assert!(strings.len() > 500, "menu scan found only {} strings", strings.len());
|
||||
for l in LANGUAGES.iter().filter(|l| l.complete_menus) {
|
||||
let cat = l.catalog();
|
||||
let missing: Vec<_> = strings.iter().filter(|s| cat.plain(s).is_none()).collect();
|
||||
// Languages that keep the product, workspace and perspective preset names in English.
|
||||
let kept = |s: &str| KEEPS_MENU_NAMES.contains(&l.code) && MENU_KEEP_AS_IS.contains(&s);
|
||||
let missing: Vec<_> = strings.iter().filter(|s| !kept(s) && cat.plain(s).is_none()).collect();
|
||||
assert!(missing.is_empty(), "{}: {} untranslated menu strings: {missing:#?}", l.code, missing.len());
|
||||
}
|
||||
}
|
||||
|
|
@ -325,6 +327,9 @@ fn cs() -> Lang {
|
|||
/// Menu labels the menu-complete catalogs (Czech, Japanese) show as they are: the product name, a format name, the built-in workspace
|
||||
/// names and the perspective grid presets (names, shown untranslated wherever else they appear).
|
||||
/// Each language's own name in the Language menu is left alone too.
|
||||
/// Languages whose catalogs leave [`MENU_KEEP_AS_IS`] in English.
|
||||
const KEEPS_MENU_NAMES: [&str; 2] = ["cs", "ja"];
|
||||
|
||||
const MENU_KEEP_AS_IS: &[&str] = &[
|
||||
"VectorCraft",
|
||||
"OpenType",
|
||||
|
|
@ -430,7 +435,7 @@ fn menu_catalogs_translate_every_menu_label() {
|
|||
all.extend(crate::menus::CONTEXT_LABELS.iter().map(|l| l.to_string()));
|
||||
all.sort();
|
||||
all.dedup();
|
||||
for code in ["cs", "ja"] {
|
||||
for code in KEEPS_MENU_NAMES {
|
||||
let lang = Lang::from_code(code).expect("registered");
|
||||
let missing: Vec<&String> = all.iter().filter(|l| !has(lang, l)).collect();
|
||||
assert!(missing.is_empty(), "{code}: untranslated menu labels: {missing:?}");
|
||||
|
|
|
|||
Loading…
Reference in New Issue