You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking at https://www.sanity.io/docs/localization and thinking, that it would be nice to restructure the shopifyProduct schema (e.g. instead of transferring the shopify title into shopifyProduct.title transfer it into shopifyProduct.title.en), or rename it (e.g. instead of transferring the shopify title into shopifyProduct.title transfer it into shopifyProduct.shopifyTitle) so you can have a clean localized title attribute.
PS.: Thanks for building this toolset!
The text was updated successfully, but these errors were encountered:
Hiya, thanks for taking a look and for opening the issue!
This is a good idea -- I've renamed the issue. I'll add something like a transformDocument option to the API that allows users to customize how the document is prepared before being patched. This probably won't make it into 1.0, though.
So for now, an alternative option would be:
Setting the title field to hidden
Add your own customTitle field with localization
Override the preview prop for the document type to get the title from customTitle instead of the original field.
But, you'll still have the issue of the english title not being automatically populated. To fix this, you could set up a document action that populates the field based on title if it is empty.
good-idea
changed the title
Allow renaming/restructuring shopify data on sync
Allow users to customize document preparation via the API
Dec 16, 2020
I am looking at https://www.sanity.io/docs/localization and thinking, that it would be nice to restructure the
shopifyProduct
schema (e.g. instead of transferring the shopify title intoshopifyProduct.title
transfer it intoshopifyProduct.title.en
), or rename it (e.g. instead of transferring the shopify title intoshopifyProduct.title
transfer it intoshopifyProduct.shopifyTitle
) so you can have a clean localized title attribute.PS.: Thanks for building this toolset!
The text was updated successfully, but these errors were encountered: