chore(): Apply translation feature flag broaderly (#14319)
* chore(): Apply translation feature flag broaderly * chore(): Apply translation feature flag broaderly * Create rich-oranges-report.md
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/medusa": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
chore(): Apply translation feature flag broaderly
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
import {
|
import {
|
||||||
ContainerRegistrationKeys,
|
ContainerRegistrationKeys,
|
||||||
|
defineFileConfig,
|
||||||
|
FeatureFlag,
|
||||||
MedusaError,
|
MedusaError,
|
||||||
} from "@medusajs/framework/utils"
|
} from "@medusajs/framework/utils"
|
||||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||||
import { HttpTypes } from "@medusajs/framework/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
import TranslationFeatureFlag from "../../../../feature-flags/translation"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 2.12.3
|
* @since 2.12.3
|
||||||
@@ -39,3 +42,7 @@ export const GET = async (
|
|||||||
|
|
||||||
res.status(200).json({ locale })
|
res.status(200).json({ locale })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineFileConfig({
|
||||||
|
isDisabled: () => !FeatureFlag.isFeatureEnabled(TranslationFeatureFlag.key),
|
||||||
|
})
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import { ContainerRegistrationKeys } from "@medusajs/framework/utils"
|
import {
|
||||||
|
ContainerRegistrationKeys,
|
||||||
|
defineFileConfig,
|
||||||
|
FeatureFlag,
|
||||||
|
} from "@medusajs/framework/utils"
|
||||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||||
import { HttpTypes } from "@medusajs/framework/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
import TranslationFeatureFlag from "../../../feature-flags/translation"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 2.12.3
|
* @since 2.12.3
|
||||||
@@ -31,3 +36,7 @@ export const GET = async (
|
|||||||
limit: metadata?.take ?? 0,
|
limit: metadata?.take ?? 0,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineFileConfig({
|
||||||
|
isDisabled: () => !FeatureFlag.isFeatureEnabled(TranslationFeatureFlag.key),
|
||||||
|
})
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
|
import { FeatureFlag } from "@medusajs/framework/utils"
|
||||||
|
import TranslationFeatureFlag from "../../../feature-flags/translation"
|
||||||
|
|
||||||
export const defaultAdminStoreFields = [
|
export const defaultAdminStoreFields = [
|
||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
"*supported_currencies",
|
"*supported_currencies",
|
||||||
"*supported_currencies.currency",
|
"*supported_currencies.currency",
|
||||||
"*supported_locales",
|
...(FeatureFlag.isFeatureEnabled(TranslationFeatureFlag.key)
|
||||||
"*supported_locales.locale_code",
|
? ["*supported_locales", "*supported_locales.locale"]
|
||||||
|
: []),
|
||||||
"default_sales_channel_id",
|
"default_sales_channel_id",
|
||||||
"default_region_id",
|
"default_region_id",
|
||||||
"default_location_id",
|
"default_location_id",
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
import { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
|
||||||
import { ContainerRegistrationKeys } from "@medusajs/framework/utils"
|
import {
|
||||||
|
ContainerRegistrationKeys,
|
||||||
|
defineFileConfig,
|
||||||
|
FeatureFlag,
|
||||||
|
} from "@medusajs/framework/utils"
|
||||||
import { HttpTypes } from "@medusajs/framework/types"
|
import { HttpTypes } from "@medusajs/framework/types"
|
||||||
|
import TranslationFeatureFlag from "../../../feature-flags/translation"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 2.12.3
|
* @since 2.12.3
|
||||||
@@ -34,3 +39,7 @@ export const GET = async (
|
|||||||
locales,
|
locales,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineFileConfig({
|
||||||
|
isDisabled: () => !FeatureFlag.isFeatureEnabled(TranslationFeatureFlag.key),
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user