Conversation
Compact translation JSON omits attributes; translate currently falls through to DEFAULT_ATTRIBUTES instead of the resource. Refs #64 Co-authored-by: Cursor <cursoragent@cursor.com>
Reuse add() so compact translation messages pick up the translated resource lang, dir, and dnt while still preserving format. Refs #64 Co-authored-by: Cursor <cursoragent@cursor.com>
Point README and GETTING_STARTED at the same merge create, add, translate, and getTranslation now share. Refs #64 Co-authored-by: Cursor <cursoragent@cursor.com>
jsahleen
marked this pull request as ready for review
August 16, 2026 01:48
|
🎉 This PR is included in version 0.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Summary
translate()(and thereforegetTranslation()) now merges unspecified messagelang,dir, anddntfrom the translated resource, matching the mergeadd()/create()already performed.attributes(or lists only overrides) no longer falls through toDEFAULT_ATTRIBUTES(und/auto/false).formatpreservation is unchanged. README and GETTING_STARTED document the inheritance next toformat.Closes #64.
Test plan
createwith omitted attributes and partial{ dnt }/{ lang }overridestranslatewith omitted attributes and partial overridesgetTranslationwith a compact loader payload and with on-disk zh JSONnpm test,npx tsc --noEmit,npm run build,npm run coverage(> 90%)Made with Cursor