Repository navigation
fix(crowdin): preserve whitespace within translation pipeline - #382
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #382 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 196 153 -43
Branches 52 41 -11
=========================================
- Hits 196 153 -43
Continue to review full report in Codecov by Harness.
|
|
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.



Description
Multiline text around links and inline code loses its boundary spaces when Crowdin renders missing translations. The repair observer then competes with the renderer until the freeze-prevention guard stops repairing the text. In the announcement preview, this produces
theLizardByte organization,ThemerrDB/are, andandKokoStreamTV.Preserve the source boundary whitespace inside the translation pipeline, before i18nextify caches and renders the result. Register a postprocessor for translated strings and wrap the missing-key parser, which i18next calls after postprocessing. Preserve existing handlers, processors, arguments, return values, and initialization context.
Remove the whitespace repair observer and detached-node snapshots. Retain the deferred script loading from #359 and the code-block exclusions from #366; the fix no longer introduces a competing observer that can starve the Doxygen event loop.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Testing
MutationObserveris installed, processing does not rewrite the DOM, and platform retries terminate. Existing deferred-loading, script-failure, and code-block exclusion tests remain.npm run test:unit -- --runInBand: 74 tests across 7 suites passed, with 100% statements, branches, functions, and lines.npm run test:lint,npm run build, andgit diff --check: passed..fragmentmarkup; DOM mutations settled and timer heartbeats ran.Type of Change
Checklist
AI Usage
See our AI usage policy.