Repository navigation
Break Japanese and Chinese store-hero headlines between phrases - #7
Merged
Merged
Conversation
ICU word segmentation let a line start with a particle or split a verb from its ending ("すべてのプリンター / とプロジェクトを、", "選 / んで"). For ja and zh, a break between two CJK words is now allowed only where Google's BudouX phrase model also puts a boundary, so breaks can only be removed, never added; if no size fits that way, fitText falls back to the old word breaks so a headline that fitted never starts failing. Latin-script output is byte-identical (5,186 listing and manifest strings across the app repos compared old against new).
budoux is pinned exactly at 0.10.4, devkit's first runtime dependency: heroes are checked pixel for pixel by devkit-store-hero --check, so a model update must be a deliberate bump that re-renders and re-approves the affected heroes, not a silent drift. It is used as a package rather than vendored so its licence (Apache-2.0) and updates stay traceable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Japanese and Chinese store-hero headlines could start a line with a particle or split a verb from its ending, for example "すべてのプリンター / とプロジェクトを、" and "プリンターを選 / んで造形を送信". This change keeps those breaks between phrases.
fitTextfalls back to the old word breaks, so a headline that fitted before never starts failing.wrapTextandfitTextkeep their signatures and stay synchronous.budoux0.10.4 (Apache-2.0) is pinned exactly. It is devkit's first runtime dependency and is loaded only bydevkit-store-heroandtext.mjs. The exact pin is deliberate: heroes are checked pixel for pixel, so a model update must be a deliberate bump that re-renders and re-approves the affected heroes.Tests:
npm run validatepasses (336 tests, 335 pass, 1 skipped as before).AI disclosure: this comment and the related code were written with the assistance of AI.