fix(i18n-array): update the migration script to match v5 using langague field#761
Merged
jjburbridge merged 3 commits intomainfrom Apr 20, 2026
Merged
fix(i18n-array): update the migration script to match v5 using langague field#761jjburbridge merged 3 commits intomainfrom
jjburbridge merged 3 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 7c3fdff The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the object-to-array migration example for sanity-plugin-internationalized-array to align with the v5 data model where the language identifier is stored in a dedicated language field (instead of using _key as the language).
Changes:
- Generate a random
_keyfor each migrated array item. - Store the original object key (language id) in a new
languagefield. - Update the inline example in the script comments to reflect the new output shape.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
juice49
approved these changes
Mar 19, 2026
Contributor
juice49
left a comment
There was a problem hiding this comment.
Thanks, Jon! Looks good to me.
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
Tweak to migration script from objects to array to use the dedicated language field rather than key. This keeps the migration script up to date with the current implementation of the plugin
What to review
Confirm that migration output matches the new v5 version
Testing
I tested the migration on a object of:
and it converted it to:
and this displayed correctly in a studio with the v5 plugin