chore(i18n): add docs and scripts folders, update readme links#866
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
There was a problem hiding this comment.
Pull request overview
This PR adds in-repo migration scripts and advanced documentation for @sanity/document-internationalization, while updating README links so the plugin’s guidance lives alongside the code in the monorepo.
Changes:
- Add reusable migration/setup scripts for upgrading metadata, renaming the language field, and creating translated singleton documents.
- Add a new
docs/section covering upgrade paths, singleton patterns, importing, deletion, custom component usage, slug behavior, template filtering, and duplication. - Update README documentation links to point at the new in-repo docs location.
Reviewed changes
Copilot reviewed 12 out of 17 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
plugins/@sanity/document-internationalization/scripts/renameLanguageField.ts |
Adds a CLI migration script for renaming the legacy language field. |
plugins/@sanity/document-internationalization/scripts/createSingletons.ts |
Adds a helper script for creating translated singleton documents and metadata. |
plugins/@sanity/document-internationalization/scripts/createMetadata.ts |
Adds a migration script to create translation.metadata documents from v1-style refs. |
plugins/@sanity/document-internationalization/docs/img/singletons-list.png |
Screenshot for singleton-document docs. |
plugins/@sanity/document-internationalization/docs/img/new-document-filtered.png |
Screenshot for filtered new-document template docs. |
plugins/@sanity/document-internationalization/docs/img/new-document-default.png |
Screenshot for default new-document template docs. |
plugins/@sanity/document-internationalization/docs/img/duplicate-document-action.png |
Screenshot for duplicate-with-translations docs. |
plugins/@sanity/document-internationalization/docs/07-duplicating-translated-documents.md |
Documents duplicating translated documents. |
plugins/@sanity/document-internationalization/docs/06-remove-default-new-document-template.md |
Documents how to filter out the default template entry. |
plugins/@sanity/document-internationalization/docs/05-allowing-the-same-slug-for-translations.md |
Documents slug uniqueness behavior for translated docs. |
plugins/@sanity/document-internationalization/docs/04-importing-plugin-components.md |
Documents exported hooks/components for custom Studio integrations. |
plugins/@sanity/document-internationalization/docs/03-deleting-translated-documents.md |
Documents deletion flows for translated docs and metadata. |
plugins/@sanity/document-internationalization/docs/02-importing-and-creating-documents.md |
Documents the expected document shape and an import script example. |
plugins/@sanity/document-internationalization/docs/01-singleton-documents.md |
Documents the singleton translation pattern and desk structure example. |
plugins/@sanity/document-internationalization/docs/00-upgrade-from-v1.md |
Adds a migration guide from the legacy v1 plugin. |
plugins/@sanity/document-internationalization/README.md |
Updates README links to point at the new docs/scripts in this repo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/sanity-io/plugins/sessions/c7b9f05e-258b-4596-a01f-b54fe83ba320 Co-authored-by: pedrobonamin <46196328+pedrobonamin@users.noreply.github.com>
All review feedback has been applied in commit a513c90:
|
|
@copilot in the examples we are still using |
Agent-Logs-Url: https://github.com/sanity-io/plugins/sessions/56b37754-b801-4c77-b6d7-917953e81718 Co-authored-by: pedrobonamin <46196328+pedrobonamin@users.noreply.github.com>
Done in commit 4aa57cf. All
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 17 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/sanity-io/plugins/sessions/0243a13b-ff0a-4d56-b1be-671109508b08 Co-authored-by: pedrobonamin <46196328+pedrobonamin@users.noreply.github.com>
Fixed in commit 042b5e2. All 18 lint errors addressed:
|
|
@copilot lint keeps failing |
Fixed in commit af39fbb. Two remaining issues addressed:
|
af39fbb to
52a7e12
Compare
Description
Add docs and scripts folders, update readme links
What to review
Testing