Skip to content

fix(muya): add missing image i18n keys ('Click to add an image' / 'Load image failed') - #4427

Merged
Jocs merged 1 commit into
developfrom
fix/muya-i18n-missing-image-keys
Jun 9, 2026
Merged

Jocs merged 1 commit into
developfrom
fix/muya-i18n-missing-image-keys

Conversation

@Jocs

@Jocs Jocs commented Jun 9, 2026

Copy link
Copy Markdown
Member

Follow-up audit after the #4424 #-typing crash: scanned every i18n.t('…') literal key in the muya engine against the locale resources and found 2 more missing — 'Click to add an image' and 'Load image failed'. Pre-#4424 these would crash in a non-en locale; post-#4424 they render the raw English key. Added both to all 9 locales (en/zh-CN/zh-TW/de/es/fr/ja/ko/pt). Re-audit: 0 missing. lint/lint:types/test (581) green.

…i18n keys

An i18n-key audit (prompted by the #4424 heading-copy-link crash) found two
more keys used via i18n.t() but absent from the locale resources. Before
#4424's crash-safety fix these threw in a non-en locale; after it they
displayed the raw English key. Added both to all 9 locales.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@Jocs
Jocs merged commit 34a62ba into develop Jun 9, 2026
7 checks passed
Jocs added a commit that referenced this pull request Jun 10, 2026
…4434)

Fill the highest-value missing automated tests from the @muyajs/core
migration regression audit — the recently-fixed bugs and data-loss-adjacent
paths that had no engine coverage.

- headingLocaleCrash.spec.ts (#4424/#4427 TOP priority): boots Muya under a
  non-en (zh-CN) locale and types `#` to create a heading, exercising the
  HeadingCopyLink `i18n.t` path that used to crash. Asserts no throw, the
  translated copy-anchor label resolves per-locale, the affordance still emits
  `heading-copy-link`, and `I18n.t` stays crash-safe (raw-key fall-through)
  for a key missing from a non-en locale.
- formatToggle.spec.ts: the public `Format.format()` toggle-OFF and `clear`
  paths over a real boot (strong/em/del/u/mark/link/inline-code) — only the
  apply-side `_addFormat` was previously covered.
- backspaceUnwrap.spec.ts (data-loss): Backspace-at-offset-0 cross-block
  surgery — paragraph merge + caret join point, and block-quote / list unwrap
  across all four branches (only/first/middle), asserting no item is dropped.
- tableCell backspaceSafety.spec.ts (data-loss): empty-table Backspace →
  paragraph replacement, and previous-cell caret jump without destructive merge.
- table insertRowColumn.spec.ts: insertRow/insertColumn shape, per-column
  alignment inheritance, delimiter round-trip, and returned caret cell — only
  the removal paths were previously unit-tested.

All assert already-correct behavior (coverage gaps, not failing-first) and pass
on current develop. Gates: lint, lint:types, check-circular, test, test:spec.

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
@Jocs
Jocs deleted the fix/muya-i18n-missing-image-keys branch June 10, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant