feat(translation,fulfillment,customer,product,region,tax,core-flows,medusa,types): Implement dynamic translation settings management (#14536)
* Add is_active field to translation_settings model * Types * Workflows * Api layer * Tests * Add changeset * Add comment * Hook to create or deactivate translatable entities on startup * Cleanup old code * Configure translatable option for core entities * Validation step and snake case correction * Cleanup * Tests * Comment in PR * Update changeset * Mock DmlEntity.getTranslatableEntities * Move validation to module service layer * Remove validation from remaining workflow * Return object directly * Type improvements * Remove .only from tests * Apply snakeCase * Fix tests * Fix tests * Remove unnecessary map and use set instead * Fix tests * Comments * Include translatable product properties * Avoid race condition in translations tests * Update test
This commit is contained in:
@@ -4,8 +4,8 @@ import { ShippingOption } from "./shipping-option"
|
||||
|
||||
export const ShippingOptionType = model.define("shipping_option_type", {
|
||||
id: model.id({ prefix: "sotype" }).primaryKey(),
|
||||
label: model.text().searchable(),
|
||||
description: model.text().searchable().nullable(),
|
||||
label: model.text().searchable().translatable(),
|
||||
description: model.text().searchable().translatable().nullable(),
|
||||
code: model.text().searchable(),
|
||||
shipping_options: model.hasMany(() => ShippingOption, {
|
||||
mappedBy: "type",
|
||||
|
||||
@@ -10,7 +10,7 @@ import { ShippingProfile } from "./shipping-profile"
|
||||
export const ShippingOption = model
|
||||
.define("shipping_option", {
|
||||
id: model.id({ prefix: "so" }).primaryKey(),
|
||||
name: model.text().searchable(),
|
||||
name: model.text().searchable().translatable(),
|
||||
price_type: model
|
||||
.enum(ShippingOptionPriceType)
|
||||
.default(ShippingOptionPriceType.FLAT),
|
||||
|
||||
Reference in New Issue
Block a user