feat(): Add more translatable core entity (#14311)

* feat(): Add product type and collection translation support

* Create sharp-poets-give.md

* feat(): Add product type and collection translation support

* feat(): Add product type and collection translation support

* options

* options

* shipping options/type

* return reason

* fix

* leave out shipping and return reason

* leave out shipping and return reason

* leave out shipping and return reason
This commit is contained in:
Adrien de Peretti
2025-12-15 17:13:32 +01:00
committed by GitHub
parent ba6ed8d9dd
commit e94e1a4676
18 changed files with 143 additions and 70 deletions
@@ -5,5 +5,35 @@ export const PRODUCT_TRANSLATABLE_FIELDS = [
"subtitle",
"status",
]
export const PRODUCT_VARIANT_TRANSLATABLE_FIELDS = ["title", "material"]
export const PRODUCT_TYPE_TRANSLATABLE_FIELDS = ["value"]
export const PRODUCT_COLLECTION_TRANSLATABLE_FIELDS = ["title"]
export const PRODUCT_CATEGORY_TRANSLATABLE_FIELDS = ["name", "description"]
export const PRODUCT_TAG_TRANSLATABLE_FIELDS = ["value"]
export const PRODUCT_OPTION_TRANSLATABLE_FIELDS = ["title"]
export const PRODUCT_OPTION_VALUE_TRANSLATABLE_FIELDS = ["value"]
// export const SHIPPING_OPTION_TRANSLATABLE_FIELDS = ["name"]
// export const SHIPPING_OPTION_TYPE_TRANSLATABLE_FIELDS = ["label", "description"]
// export const RETURN_REASON_TRANSLATABLE_FIELDS = [
// "value",
// "label",
// "description",
// ]
export const translatableFieldsConfig = {
product: PRODUCT_TRANSLATABLE_FIELDS,
product_variant: PRODUCT_VARIANT_TRANSLATABLE_FIELDS,
product_type: PRODUCT_TYPE_TRANSLATABLE_FIELDS,
product_collection: PRODUCT_COLLECTION_TRANSLATABLE_FIELDS,
product_category: PRODUCT_CATEGORY_TRANSLATABLE_FIELDS,
product_tag: PRODUCT_TAG_TRANSLATABLE_FIELDS,
product_option: PRODUCT_OPTION_TRANSLATABLE_FIELDS,
product_option_value: PRODUCT_OPTION_VALUE_TRANSLATABLE_FIELDS,
// shipping_option: SHIPPING_OPTION_TRANSLATABLE_FIELDS,
// shipping_option_type: SHIPPING_OPTION_TYPE_TRANSLATABLE_FIELDS,
// return_reason: RETURN_REASON_TRANSLATABLE_FIELDS,
}