Skip to content

Commit

Permalink
Merge pull request #43 from sanity-io/facelift
Browse files Browse the repository at this point in the history
add translation command
  • Loading branch information
SimeonGriggs committed Jan 19, 2024
2 parents 52fc0e0 + df41465 commit 4845a26
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 13 deletions.
21 changes: 11 additions & 10 deletions studio/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"sanity"
],
"dependencies": {
"@sanity/assist": "^1.2.9",
"@sanity/assist": "^1.2.15-lang.7",
"@sanity/code-input": "^4.0.0",
"@sanity/dashboard": "^3.1.4",
"@sanity/document-internationalization": "^2.0.1",
Expand All @@ -39,7 +39,7 @@
"sanity-plugin-documents-pane": "^2.0.0",
"sanity-plugin-google-translate": "^3.0.0",
"sanity-plugin-iframe-pane": "^2.0.0",
"sanity-plugin-internationalized-array": "^1.7.0",
"sanity-plugin-internationalized-array": "^1.10.5",
"sanity-plugin-schema-visualizer": "^1.0.0",
"sanity-plugin-transifex": "^3.0.0",
"styled-components": "^5.2.0"
Expand Down
9 changes: 8 additions & 1 deletion studio/sanity.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,14 @@ export default defineConfig({
defaultSchemaTypes: ['course', 'lesson', 'presenter'],
hiddenSchemaTypes: ['translation.metadata'],
}),
assist(),
assist({
translate: {
field: {
documentTypes: ['presenter'],
languages: i18n.languages,
},
},
}),
],
schema: {
types: schemaTypes,
Expand Down
5 changes: 5 additions & 0 deletions studio/schemas/documents/presenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ export default defineType({
type: 'internationalizedArrayString',
group: 'localized',
hidden: (context) => context?.document?.name === undefined,
options: {
aiWritingAssistance: {
translateAction: true,
},
},
}),
defineField({
name: 'biography',
Expand Down

2 comments on commit 4845a26

@vercel
Copy link

@vercel vercel bot commented on 4845a26 Jan 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

demo-course-platform – ./web

demo-course-platform.sanity.build
demo-course-platform-git-main.sanity.build

@vercel
Copy link

@vercel vercel bot commented on 4845a26 Jan 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

demo-course-platform-studio – ./studio

demo-course-platform-studio.sanity.build
demo-course-platform-studio-git-main.sanity.build

Please sign in to comment.