diff --git a/.github/api-extractor-action/src/api-extractor.ts b/.github/api-extractor-action/src/api-extractor.ts index c6e7e957081..e0d116d54fd 100644 --- a/.github/api-extractor-action/src/api-extractor.ts +++ b/.github/api-extractor-action/src/api-extractor.ts @@ -134,9 +134,10 @@ async function copyApiExtractorConfig(targetDir: string): Promise { * * @returns object with name and the newName */ -function updateNameInPackageJson( - path: string -): { name: string; newName: string } { +function updateNameInPackageJson(path: string): { + name: string; + newName: string; +} { const packageContent = JSON.parse(fs.readFileSync(path, 'utf-8')); const name: string = packageContent.name; const newName = name.replace(/\//g, '_').replace(/\_/, '/'); diff --git a/feature-libs/asm/assets/public_api.ts b/feature-libs/asm/assets/public_api.ts index 0784e372a0d..7be51e946f6 100644 --- a/feature-libs/asm/assets/public_api.ts +++ b/feature-libs/asm/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { asmTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: asmTranslations + * + resources: { en: asmTranslationsEn } + * } + * ``` + */ +export const asmTranslations = { + en: asmTranslationsEn, +}; diff --git a/feature-libs/asm/assets/translations/cs/index.ts b/feature-libs/asm/assets/translations/cs/index.ts new file mode 100644 index 00000000000..bf2777d582e --- /dev/null +++ b/feature-libs/asm/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asm from './asm.json'; +export const cs = { + asm, +}; diff --git a/feature-libs/asm/assets/translations/de/index.ts b/feature-libs/asm/assets/translations/de/index.ts index 92253eebd44..ba83f157994 100644 --- a/feature-libs/asm/assets/translations/de/index.ts +++ b/feature-libs/asm/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import asm from './asm.json'; - export const de = { asm, }; diff --git a/feature-libs/asm/assets/translations/en/index.ts b/feature-libs/asm/assets/translations/en/index.ts index 705af75f207..2239ed2a3db 100644 --- a/feature-libs/asm/assets/translations/en/index.ts +++ b/feature-libs/asm/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import asm from './asm.json'; - export const en = { asm, }; diff --git a/feature-libs/asm/assets/translations/es/index.ts b/feature-libs/asm/assets/translations/es/index.ts new file mode 100644 index 00000000000..54c8d8b51b6 --- /dev/null +++ b/feature-libs/asm/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asm from './asm.json'; +export const es = { + asm, +}; diff --git a/feature-libs/asm/assets/translations/es_CO/index.ts b/feature-libs/asm/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..ef02b144090 --- /dev/null +++ b/feature-libs/asm/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asm from './asm.json'; +export const es_CO = { + asm, +}; diff --git a/feature-libs/asm/assets/translations/fr/index.ts b/feature-libs/asm/assets/translations/fr/index.ts new file mode 100644 index 00000000000..f1a21efd6e8 --- /dev/null +++ b/feature-libs/asm/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asm from './asm.json'; +export const fr = { + asm, +}; diff --git a/feature-libs/asm/assets/translations/hi/index.ts b/feature-libs/asm/assets/translations/hi/index.ts new file mode 100644 index 00000000000..1a3ca360591 --- /dev/null +++ b/feature-libs/asm/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asm from './asm.json'; +export const hi = { + asm, +}; diff --git a/feature-libs/asm/assets/translations/hu/index.ts b/feature-libs/asm/assets/translations/hu/index.ts new file mode 100644 index 00000000000..8fe0568ea60 --- /dev/null +++ b/feature-libs/asm/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asm from './asm.json'; +export const hu = { + asm, +}; diff --git a/feature-libs/asm/assets/translations/id/index.ts b/feature-libs/asm/assets/translations/id/index.ts new file mode 100644 index 00000000000..a537abaddd4 --- /dev/null +++ b/feature-libs/asm/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asm from './asm.json'; +export const id = { + asm, +}; diff --git a/feature-libs/asm/assets/translations/it/index.ts b/feature-libs/asm/assets/translations/it/index.ts new file mode 100644 index 00000000000..d3aa3c61f66 --- /dev/null +++ b/feature-libs/asm/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asm from './asm.json'; +export const it = { + asm, +}; diff --git a/feature-libs/asm/assets/translations/ja/index.ts b/feature-libs/asm/assets/translations/ja/index.ts index 17bec81b549..9d184681fbe 100644 --- a/feature-libs/asm/assets/translations/ja/index.ts +++ b/feature-libs/asm/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import asm from './asm.json'; - export const ja = { asm, }; diff --git a/feature-libs/asm/assets/translations/ko/index.ts b/feature-libs/asm/assets/translations/ko/index.ts new file mode 100644 index 00000000000..a2284a29c4c --- /dev/null +++ b/feature-libs/asm/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asm from './asm.json'; +export const ko = { + asm, +}; diff --git a/feature-libs/asm/assets/translations/pl/index.ts b/feature-libs/asm/assets/translations/pl/index.ts new file mode 100644 index 00000000000..7e5aff4de09 --- /dev/null +++ b/feature-libs/asm/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asm from './asm.json'; +export const pl = { + asm, +}; diff --git a/feature-libs/asm/assets/translations/pt/index.ts b/feature-libs/asm/assets/translations/pt/index.ts new file mode 100644 index 00000000000..6441cee3fb3 --- /dev/null +++ b/feature-libs/asm/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asm from './asm.json'; +export const pt = { + asm, +}; diff --git a/feature-libs/asm/assets/translations/ru/index.ts b/feature-libs/asm/assets/translations/ru/index.ts new file mode 100644 index 00000000000..e80b481d883 --- /dev/null +++ b/feature-libs/asm/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asm from './asm.json'; +export const ru = { + asm, +}; diff --git a/feature-libs/asm/assets/translations/translations.ts b/feature-libs/asm/assets/translations/translations.ts index dc52c805e10..64d9de4f0b0 100644 --- a/feature-libs/asm/assets/translations/translations.ts +++ b/feature-libs/asm/assets/translations/translations.ts @@ -4,19 +4,24 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const asmTranslationChunksConfig = extractTranslationChunksConfig(en); -export const asmTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const asmTranslationChunksConfig: TranslationChunksConfig = { - asm: ['asm'], -}; +export { cs as asmTranslationsCs } from './cs/index'; +export { de as asmTranslationsDe } from './de/index'; +export { en as asmTranslationsEn } from './en/index'; +export { es as asmTranslationsEs } from './es/index'; +export { es_CO as asmTranslationsEs_CO } from './es_CO/index'; +export { fr as asmTranslationsFr } from './fr/index'; +export { hi as asmTranslationsHi } from './hi/index'; +export { hu as asmTranslationsHu } from './hu/index'; +export { id as asmTranslationsId } from './id/index'; +export { it as asmTranslationsIt } from './it/index'; +export { ja as asmTranslationsJa } from './ja/index'; +export { ko as asmTranslationsKo } from './ko/index'; +export { pl as asmTranslationsPl } from './pl/index'; +export { pt as asmTranslationsPt } from './pt/index'; +export { ru as asmTranslationsRu } from './ru/index'; +export { zh as asmTranslationsZh } from './zh/index'; +export { zh_TW as asmTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/asm/assets/translations/zh/index.ts b/feature-libs/asm/assets/translations/zh/index.ts index 38b0504e835..95ea4076697 100644 --- a/feature-libs/asm/assets/translations/zh/index.ts +++ b/feature-libs/asm/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import asm from './asm.json'; - export const zh = { asm, }; diff --git a/feature-libs/asm/assets/translations/zh_TW/index.ts b/feature-libs/asm/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..61bf7e631f8 --- /dev/null +++ b/feature-libs/asm/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asm from './asm.json'; +export const zh_TW = { + asm, +}; diff --git a/feature-libs/asm/customer-360/assets/public_api.ts b/feature-libs/asm/customer-360/assets/public_api.ts index 0784e372a0d..b85fff90c30 100644 --- a/feature-libs/asm/customer-360/assets/public_api.ts +++ b/feature-libs/asm/customer-360/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { asmCustomer360TranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: asmCustomer360Translations + * + resources: { en: asmCustomer360TranslationsEn } + * } + * ``` + */ +export const asmCustomer360Translations = { + en: asmCustomer360TranslationsEn, +}; diff --git a/feature-libs/asm/customer-360/assets/translations/cs/index.ts b/feature-libs/asm/customer-360/assets/translations/cs/index.ts new file mode 100644 index 00000000000..8bc1b757344 --- /dev/null +++ b/feature-libs/asm/customer-360/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asmCustomer360 from './asmCustomer360.json'; +export const cs = { + asmCustomer360, +}; diff --git a/feature-libs/asm/customer-360/assets/translations/de/index.ts b/feature-libs/asm/customer-360/assets/translations/de/index.ts index 664e89a7040..bbcfcca9aee 100644 --- a/feature-libs/asm/customer-360/assets/translations/de/index.ts +++ b/feature-libs/asm/customer-360/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import asmCustomer360 from './asmCustomer360.json'; - export const de = { asmCustomer360, }; diff --git a/feature-libs/asm/customer-360/assets/translations/en/index.ts b/feature-libs/asm/customer-360/assets/translations/en/index.ts index 45be01e66db..feaa6d5c79a 100644 --- a/feature-libs/asm/customer-360/assets/translations/en/index.ts +++ b/feature-libs/asm/customer-360/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import asmCustomer360 from './asmCustomer360.json'; - export const en = { asmCustomer360, }; diff --git a/feature-libs/asm/customer-360/assets/translations/es/index.ts b/feature-libs/asm/customer-360/assets/translations/es/index.ts new file mode 100644 index 00000000000..6a33547b630 --- /dev/null +++ b/feature-libs/asm/customer-360/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asmCustomer360 from './asmCustomer360.json'; +export const es = { + asmCustomer360, +}; diff --git a/feature-libs/asm/customer-360/assets/translations/es_CO/index.ts b/feature-libs/asm/customer-360/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..afab3308509 --- /dev/null +++ b/feature-libs/asm/customer-360/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asmCustomer360 from './asmCustomer360.json'; +export const es_CO = { + asmCustomer360, +}; diff --git a/feature-libs/asm/customer-360/assets/translations/fr/index.ts b/feature-libs/asm/customer-360/assets/translations/fr/index.ts new file mode 100644 index 00000000000..66ca7e155cf --- /dev/null +++ b/feature-libs/asm/customer-360/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asmCustomer360 from './asmCustomer360.json'; +export const fr = { + asmCustomer360, +}; diff --git a/feature-libs/asm/customer-360/assets/translations/hi/index.ts b/feature-libs/asm/customer-360/assets/translations/hi/index.ts new file mode 100644 index 00000000000..e081942bbf2 --- /dev/null +++ b/feature-libs/asm/customer-360/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asmCustomer360 from './asmCustomer360.json'; +export const hi = { + asmCustomer360, +}; diff --git a/feature-libs/asm/customer-360/assets/translations/hu/index.ts b/feature-libs/asm/customer-360/assets/translations/hu/index.ts new file mode 100644 index 00000000000..762932c46bd --- /dev/null +++ b/feature-libs/asm/customer-360/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asmCustomer360 from './asmCustomer360.json'; +export const hu = { + asmCustomer360, +}; diff --git a/feature-libs/asm/customer-360/assets/translations/id/index.ts b/feature-libs/asm/customer-360/assets/translations/id/index.ts new file mode 100644 index 00000000000..fff02f408b9 --- /dev/null +++ b/feature-libs/asm/customer-360/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asmCustomer360 from './asmCustomer360.json'; +export const id = { + asmCustomer360, +}; diff --git a/feature-libs/asm/customer-360/assets/translations/it/index.ts b/feature-libs/asm/customer-360/assets/translations/it/index.ts new file mode 100644 index 00000000000..c2c0b81de08 --- /dev/null +++ b/feature-libs/asm/customer-360/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asmCustomer360 from './asmCustomer360.json'; +export const it = { + asmCustomer360, +}; diff --git a/feature-libs/asm/customer-360/assets/translations/ja/index.ts b/feature-libs/asm/customer-360/assets/translations/ja/index.ts index be9f34a84d1..79db74c447e 100644 --- a/feature-libs/asm/customer-360/assets/translations/ja/index.ts +++ b/feature-libs/asm/customer-360/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import asmCustomer360 from './asmCustomer360.json'; - export const ja = { asmCustomer360, }; diff --git a/feature-libs/asm/customer-360/assets/translations/ko/index.ts b/feature-libs/asm/customer-360/assets/translations/ko/index.ts new file mode 100644 index 00000000000..f315355737d --- /dev/null +++ b/feature-libs/asm/customer-360/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asmCustomer360 from './asmCustomer360.json'; +export const ko = { + asmCustomer360, +}; diff --git a/feature-libs/asm/customer-360/assets/translations/pl/index.ts b/feature-libs/asm/customer-360/assets/translations/pl/index.ts new file mode 100644 index 00000000000..9827797d05d --- /dev/null +++ b/feature-libs/asm/customer-360/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asmCustomer360 from './asmCustomer360.json'; +export const pl = { + asmCustomer360, +}; diff --git a/feature-libs/asm/customer-360/assets/translations/pt/index.ts b/feature-libs/asm/customer-360/assets/translations/pt/index.ts new file mode 100644 index 00000000000..6e092adc291 --- /dev/null +++ b/feature-libs/asm/customer-360/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asmCustomer360 from './asmCustomer360.json'; +export const pt = { + asmCustomer360, +}; diff --git a/feature-libs/asm/customer-360/assets/translations/ru/index.ts b/feature-libs/asm/customer-360/assets/translations/ru/index.ts new file mode 100644 index 00000000000..f9e4f1e2494 --- /dev/null +++ b/feature-libs/asm/customer-360/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asmCustomer360 from './asmCustomer360.json'; +export const ru = { + asmCustomer360, +}; diff --git a/feature-libs/asm/customer-360/assets/translations/translations.ts b/feature-libs/asm/customer-360/assets/translations/translations.ts index 251e56fb102..f85f218c791 100644 --- a/feature-libs/asm/customer-360/assets/translations/translations.ts +++ b/feature-libs/asm/customer-360/assets/translations/translations.ts @@ -4,19 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const asmCustomer360TranslationChunksConfig = + extractTranslationChunksConfig(en); -export const asmCustomer360Translations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const asmCustomer360TranslationChunksConfig: TranslationChunksConfig = { - asmCustomer360: ['asmCustomer360'], -}; +export { cs as asmCustomer360TranslationsCs } from './cs/index'; +export { de as asmCustomer360TranslationsDe } from './de/index'; +export { en as asmCustomer360TranslationsEn } from './en/index'; +export { es as asmCustomer360TranslationsEs } from './es/index'; +export { es_CO as asmCustomer360TranslationsEs_CO } from './es_CO/index'; +export { fr as asmCustomer360TranslationsFr } from './fr/index'; +export { hi as asmCustomer360TranslationsHi } from './hi/index'; +export { hu as asmCustomer360TranslationsHu } from './hu/index'; +export { id as asmCustomer360TranslationsId } from './id/index'; +export { it as asmCustomer360TranslationsIt } from './it/index'; +export { ja as asmCustomer360TranslationsJa } from './ja/index'; +export { ko as asmCustomer360TranslationsKo } from './ko/index'; +export { pl as asmCustomer360TranslationsPl } from './pl/index'; +export { pt as asmCustomer360TranslationsPt } from './pt/index'; +export { ru as asmCustomer360TranslationsRu } from './ru/index'; +export { zh as asmCustomer360TranslationsZh } from './zh/index'; +export { zh_TW as asmCustomer360TranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/asm/customer-360/assets/translations/zh/index.ts b/feature-libs/asm/customer-360/assets/translations/zh/index.ts index 011076b0ea1..df31c0d199e 100644 --- a/feature-libs/asm/customer-360/assets/translations/zh/index.ts +++ b/feature-libs/asm/customer-360/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import asmCustomer360 from './asmCustomer360.json'; - export const zh = { asmCustomer360, }; diff --git a/feature-libs/asm/customer-360/assets/translations/zh_TW/index.ts b/feature-libs/asm/customer-360/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..1443e3b18e5 --- /dev/null +++ b/feature-libs/asm/customer-360/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import asmCustomer360 from './asmCustomer360.json'; +export const zh_TW = { + asmCustomer360, +}; diff --git a/feature-libs/asm/schematics/add-asm/__snapshots__/index_spec.ts.snap b/feature-libs/asm/schematics/add-asm/__snapshots__/index_spec.ts.snap index 0f744602c76..3ad8bad30a3 100644 --- a/feature-libs/asm/schematics/add-asm/__snapshots__/index_spec.ts.snap +++ b/feature-libs/asm/schematics/add-asm/__snapshots__/index_spec.ts.snap @@ -3,7 +3,7 @@ exports[`Spartacus Asm schematics: ng-add Asm feature eager loading should import appropriate modules 1`] = ` "import { NgModule } from '@angular/core'; import { AsmModule } from "@spartacus/asm"; -import { asmTranslationChunksConfig, asmTranslations } from "@spartacus/asm/assets"; +import { asmTranslationChunksConfig, asmTranslationsEn } from "@spartacus/asm/assets"; import { AsmRootModule } from "@spartacus/asm/root"; import { I18nConfig, provideConfig } from "@spartacus/core"; @@ -15,7 +15,7 @@ import { I18nConfig, provideConfig } from "@spartacus/core"; ], providers: [provideConfig({ i18n: { - resources: asmTranslations, + resources: { en: asmTranslationsEn }, chunks: asmTranslationChunksConfig, }, })] @@ -26,7 +26,7 @@ export class AsmFeatureModule { } exports[`Spartacus Asm schematics: ng-add Asm feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; -import { asmTranslationChunksConfig, asmTranslations } from "@spartacus/asm/assets"; +import { asmTranslationChunksConfig, asmTranslationsEn } from "@spartacus/asm/assets"; import { ASM_FEATURE, AsmRootModule } from "@spartacus/asm/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @@ -45,7 +45,7 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: asmTranslations, + resources: { en: asmTranslationsEn }, chunks: asmTranslationChunksConfig, }, }) diff --git a/feature-libs/cart/base/assets/public_api.ts b/feature-libs/cart/base/assets/public_api.ts index 0784e372a0d..87ccbcccbc3 100644 --- a/feature-libs/cart/base/assets/public_api.ts +++ b/feature-libs/cart/base/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { cartBaseTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: cartBaseTranslations + * + resources: { en: cartBaseTranslationsEn } + * } + * ``` + */ +export const cartBaseTranslations = { + en: cartBaseTranslationsEn, +}; diff --git a/feature-libs/cart/base/assets/translations/cs/index.ts b/feature-libs/cart/base/assets/translations/cs/index.ts new file mode 100644 index 00000000000..f28f39fc097 --- /dev/null +++ b/feature-libs/cart/base/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cart from './cart.json'; +export const cs = { + cart, +}; diff --git a/feature-libs/cart/base/assets/translations/de/index.ts b/feature-libs/cart/base/assets/translations/de/index.ts index 3ec9ffa01e2..5609d80e0f8 100644 --- a/feature-libs/cart/base/assets/translations/de/index.ts +++ b/feature-libs/cart/base/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import cart from './cart.json'; - export const de = { cart, }; diff --git a/feature-libs/cart/base/assets/translations/en/index.ts b/feature-libs/cart/base/assets/translations/en/index.ts index 83cd9429162..50c42150461 100644 --- a/feature-libs/cart/base/assets/translations/en/index.ts +++ b/feature-libs/cart/base/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import cart from './cart.json'; - export const en = { cart, }; diff --git a/feature-libs/cart/base/assets/translations/es/index.ts b/feature-libs/cart/base/assets/translations/es/index.ts new file mode 100644 index 00000000000..ba26fc06eff --- /dev/null +++ b/feature-libs/cart/base/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cart from './cart.json'; +export const es = { + cart, +}; diff --git a/feature-libs/cart/base/assets/translations/es_CO/index.ts b/feature-libs/cart/base/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..9c416c016ba --- /dev/null +++ b/feature-libs/cart/base/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cart from './cart.json'; +export const es_CO = { + cart, +}; diff --git a/feature-libs/cart/base/assets/translations/fr/index.ts b/feature-libs/cart/base/assets/translations/fr/index.ts new file mode 100644 index 00000000000..cc250796bcb --- /dev/null +++ b/feature-libs/cart/base/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cart from './cart.json'; +export const fr = { + cart, +}; diff --git a/feature-libs/cart/base/assets/translations/hi/index.ts b/feature-libs/cart/base/assets/translations/hi/index.ts new file mode 100644 index 00000000000..04ffededf28 --- /dev/null +++ b/feature-libs/cart/base/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cart from './cart.json'; +export const hi = { + cart, +}; diff --git a/feature-libs/cart/base/assets/translations/hu/index.ts b/feature-libs/cart/base/assets/translations/hu/index.ts new file mode 100644 index 00000000000..d464e5575dc --- /dev/null +++ b/feature-libs/cart/base/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cart from './cart.json'; +export const hu = { + cart, +}; diff --git a/feature-libs/cart/base/assets/translations/id/index.ts b/feature-libs/cart/base/assets/translations/id/index.ts new file mode 100644 index 00000000000..567808dfaf9 --- /dev/null +++ b/feature-libs/cart/base/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cart from './cart.json'; +export const id = { + cart, +}; diff --git a/feature-libs/cart/base/assets/translations/it/index.ts b/feature-libs/cart/base/assets/translations/it/index.ts new file mode 100644 index 00000000000..baaac10795f --- /dev/null +++ b/feature-libs/cart/base/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cart from './cart.json'; +export const it = { + cart, +}; diff --git a/feature-libs/cart/base/assets/translations/ja/index.ts b/feature-libs/cart/base/assets/translations/ja/index.ts index e33f3e6bfae..9b2f0932429 100644 --- a/feature-libs/cart/base/assets/translations/ja/index.ts +++ b/feature-libs/cart/base/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import cart from './cart.json'; - export const ja = { cart, }; diff --git a/feature-libs/cart/base/assets/translations/ko/index.ts b/feature-libs/cart/base/assets/translations/ko/index.ts new file mode 100644 index 00000000000..668b888c6a5 --- /dev/null +++ b/feature-libs/cart/base/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cart from './cart.json'; +export const ko = { + cart, +}; diff --git a/feature-libs/cart/base/assets/translations/pl/index.ts b/feature-libs/cart/base/assets/translations/pl/index.ts new file mode 100644 index 00000000000..2cdc99c8334 --- /dev/null +++ b/feature-libs/cart/base/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cart from './cart.json'; +export const pl = { + cart, +}; diff --git a/feature-libs/cart/base/assets/translations/pt/index.ts b/feature-libs/cart/base/assets/translations/pt/index.ts new file mode 100644 index 00000000000..4a242f073ba --- /dev/null +++ b/feature-libs/cart/base/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cart from './cart.json'; +export const pt = { + cart, +}; diff --git a/feature-libs/cart/base/assets/translations/ru/index.ts b/feature-libs/cart/base/assets/translations/ru/index.ts new file mode 100644 index 00000000000..6663d8a5ea1 --- /dev/null +++ b/feature-libs/cart/base/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cart from './cart.json'; +export const ru = { + cart, +}; diff --git a/feature-libs/cart/base/assets/translations/translations.ts b/feature-libs/cart/base/assets/translations/translations.ts index fcf2dd7208a..ebde6f143c7 100644 --- a/feature-libs/cart/base/assets/translations/translations.ts +++ b/feature-libs/cart/base/assets/translations/translations.ts @@ -4,27 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const cartBaseTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const cartBaseTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const cartBaseTranslationChunksConfig: TranslationChunksConfig = { - cart: [ - 'cartDetails', - 'cartItems', - 'orderCost', - 'voucher', - 'saveForLaterItems', - 'clearCart', - 'validation', - ], -}; +export { cs as cartBaseTranslationsCs } from './cs/index'; +export { de as cartBaseTranslationsDe } from './de/index'; +export { en as cartBaseTranslationsEn } from './en/index'; +export { es as cartBaseTranslationsEs } from './es/index'; +export { es_CO as cartBaseTranslationsEs_CO } from './es_CO/index'; +export { fr as cartBaseTranslationsFr } from './fr/index'; +export { hi as cartBaseTranslationsHi } from './hi/index'; +export { hu as cartBaseTranslationsHu } from './hu/index'; +export { id as cartBaseTranslationsId } from './id/index'; +export { it as cartBaseTranslationsIt } from './it/index'; +export { ja as cartBaseTranslationsJa } from './ja/index'; +export { ko as cartBaseTranslationsKo } from './ko/index'; +export { pl as cartBaseTranslationsPl } from './pl/index'; +export { pt as cartBaseTranslationsPt } from './pt/index'; +export { ru as cartBaseTranslationsRu } from './ru/index'; +export { zh as cartBaseTranslationsZh } from './zh/index'; +export { zh_TW as cartBaseTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/cart/base/assets/translations/zh/index.ts b/feature-libs/cart/base/assets/translations/zh/index.ts index 3abe9c4d854..85230fede6e 100644 --- a/feature-libs/cart/base/assets/translations/zh/index.ts +++ b/feature-libs/cart/base/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import cart from './cart.json'; - export const zh = { cart, }; diff --git a/feature-libs/cart/base/assets/translations/zh_TW/index.ts b/feature-libs/cart/base/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..3c73e408c76 --- /dev/null +++ b/feature-libs/cart/base/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cart from './cart.json'; +export const zh_TW = { + cart, +}; diff --git a/feature-libs/cart/import-export/assets/public_api.ts b/feature-libs/cart/import-export/assets/public_api.ts index 0784e372a0d..10ac8fbb231 100644 --- a/feature-libs/cart/import-export/assets/public_api.ts +++ b/feature-libs/cart/import-export/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { importExportTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: importExportTranslations + * + resources: { en: importExportTranslationsEn } + * } + * ``` + */ +export const importExportTranslations = { + en: importExportTranslationsEn, +}; diff --git a/feature-libs/cart/import-export/assets/translations/cs/index.ts b/feature-libs/cart/import-export/assets/translations/cs/index.ts new file mode 100644 index 00000000000..e59b08a73f7 --- /dev/null +++ b/feature-libs/cart/import-export/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import importExport from './importExport.json'; +export const cs = { + importExport, +}; diff --git a/feature-libs/cart/import-export/assets/translations/de/index.ts b/feature-libs/cart/import-export/assets/translations/de/index.ts index d374c0ee9fe..649ba4cd570 100644 --- a/feature-libs/cart/import-export/assets/translations/de/index.ts +++ b/feature-libs/cart/import-export/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import importExport from './importExport.json'; - export const de = { importExport, }; diff --git a/feature-libs/cart/import-export/assets/translations/en/index.ts b/feature-libs/cart/import-export/assets/translations/en/index.ts index da767aaadff..054a744917e 100644 --- a/feature-libs/cart/import-export/assets/translations/en/index.ts +++ b/feature-libs/cart/import-export/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import importExport from './importExport.json'; - export const en = { importExport, }; diff --git a/feature-libs/cart/import-export/assets/translations/es/index.ts b/feature-libs/cart/import-export/assets/translations/es/index.ts new file mode 100644 index 00000000000..8af8311d0a8 --- /dev/null +++ b/feature-libs/cart/import-export/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import importExport from './importExport.json'; +export const es = { + importExport, +}; diff --git a/feature-libs/cart/import-export/assets/translations/es_CO/index.ts b/feature-libs/cart/import-export/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..ecf5043dd37 --- /dev/null +++ b/feature-libs/cart/import-export/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import importExport from './importExport.json'; +export const es_CO = { + importExport, +}; diff --git a/feature-libs/cart/import-export/assets/translations/fr/index.ts b/feature-libs/cart/import-export/assets/translations/fr/index.ts new file mode 100644 index 00000000000..620c32ce106 --- /dev/null +++ b/feature-libs/cart/import-export/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import importExport from './importExport.json'; +export const fr = { + importExport, +}; diff --git a/feature-libs/cart/import-export/assets/translations/hi/index.ts b/feature-libs/cart/import-export/assets/translations/hi/index.ts new file mode 100644 index 00000000000..caa3461eff8 --- /dev/null +++ b/feature-libs/cart/import-export/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import importExport from './importExport.json'; +export const hi = { + importExport, +}; diff --git a/feature-libs/cart/import-export/assets/translations/hu/index.ts b/feature-libs/cart/import-export/assets/translations/hu/index.ts new file mode 100644 index 00000000000..5634143aea1 --- /dev/null +++ b/feature-libs/cart/import-export/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import importExport from './importExport.json'; +export const hu = { + importExport, +}; diff --git a/feature-libs/cart/import-export/assets/translations/id/index.ts b/feature-libs/cart/import-export/assets/translations/id/index.ts new file mode 100644 index 00000000000..135dfac7c37 --- /dev/null +++ b/feature-libs/cart/import-export/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import importExport from './importExport.json'; +export const id = { + importExport, +}; diff --git a/feature-libs/cart/import-export/assets/translations/it/index.ts b/feature-libs/cart/import-export/assets/translations/it/index.ts new file mode 100644 index 00000000000..a2caf1eba6b --- /dev/null +++ b/feature-libs/cart/import-export/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import importExport from './importExport.json'; +export const it = { + importExport, +}; diff --git a/feature-libs/cart/import-export/assets/translations/ja/index.ts b/feature-libs/cart/import-export/assets/translations/ja/index.ts index 6fc61fee43d..e6d174882b3 100644 --- a/feature-libs/cart/import-export/assets/translations/ja/index.ts +++ b/feature-libs/cart/import-export/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import importExport from './importExport.json'; - export const ja = { importExport, }; diff --git a/feature-libs/cart/import-export/assets/translations/ko/index.ts b/feature-libs/cart/import-export/assets/translations/ko/index.ts new file mode 100644 index 00000000000..962a44653d3 --- /dev/null +++ b/feature-libs/cart/import-export/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import importExport from './importExport.json'; +export const ko = { + importExport, +}; diff --git a/feature-libs/cart/import-export/assets/translations/pl/index.ts b/feature-libs/cart/import-export/assets/translations/pl/index.ts new file mode 100644 index 00000000000..77e868929cb --- /dev/null +++ b/feature-libs/cart/import-export/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import importExport from './importExport.json'; +export const pl = { + importExport, +}; diff --git a/feature-libs/cart/import-export/assets/translations/pt/index.ts b/feature-libs/cart/import-export/assets/translations/pt/index.ts new file mode 100644 index 00000000000..6e6031346ae --- /dev/null +++ b/feature-libs/cart/import-export/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import importExport from './importExport.json'; +export const pt = { + importExport, +}; diff --git a/feature-libs/cart/import-export/assets/translations/ru/index.ts b/feature-libs/cart/import-export/assets/translations/ru/index.ts new file mode 100644 index 00000000000..7f73b19c293 --- /dev/null +++ b/feature-libs/cart/import-export/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import importExport from './importExport.json'; +export const ru = { + importExport, +}; diff --git a/feature-libs/cart/import-export/assets/translations/translations.ts b/feature-libs/cart/import-export/assets/translations/translations.ts index d65ef371c81..cbfee394965 100644 --- a/feature-libs/cart/import-export/assets/translations/translations.ts +++ b/feature-libs/cart/import-export/assets/translations/translations.ts @@ -4,19 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const importExportTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const importExportTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const importExportTranslationChunksConfig: TranslationChunksConfig = { - importExport: ['exportEntries', 'importEntries', 'importEntriesDialog'], -}; +export { cs as importExportTranslationsCs } from './cs/index'; +export { de as importExportTranslationsDe } from './de/index'; +export { en as importExportTranslationsEn } from './en/index'; +export { es as importExportTranslationsEs } from './es/index'; +export { es_CO as importExportTranslationsEs_CO } from './es_CO/index'; +export { fr as importExportTranslationsFr } from './fr/index'; +export { hi as importExportTranslationsHi } from './hi/index'; +export { hu as importExportTranslationsHu } from './hu/index'; +export { id as importExportTranslationsId } from './id/index'; +export { it as importExportTranslationsIt } from './it/index'; +export { ja as importExportTranslationsJa } from './ja/index'; +export { ko as importExportTranslationsKo } from './ko/index'; +export { pl as importExportTranslationsPl } from './pl/index'; +export { pt as importExportTranslationsPt } from './pt/index'; +export { ru as importExportTranslationsRu } from './ru/index'; +export { zh as importExportTranslationsZh } from './zh/index'; +export { zh_TW as importExportTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/cart/import-export/assets/translations/zh/index.ts b/feature-libs/cart/import-export/assets/translations/zh/index.ts index b690f50dfcd..062629a602a 100644 --- a/feature-libs/cart/import-export/assets/translations/zh/index.ts +++ b/feature-libs/cart/import-export/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import importExport from './importExport.json'; - export const zh = { importExport, }; diff --git a/feature-libs/cart/import-export/assets/translations/zh_TW/index.ts b/feature-libs/cart/import-export/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..339f26ff8cc --- /dev/null +++ b/feature-libs/cart/import-export/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import importExport from './importExport.json'; +export const zh_TW = { + importExport, +}; diff --git a/feature-libs/cart/quick-order/assets/public_api.ts b/feature-libs/cart/quick-order/assets/public_api.ts index 0784e372a0d..602f34f00d3 100644 --- a/feature-libs/cart/quick-order/assets/public_api.ts +++ b/feature-libs/cart/quick-order/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { quickOrderTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: quickOrderTranslations + * + resources: { en: quickOrderTranslationsEn } + * } + * ``` + */ +export const quickOrderTranslations = { + en: quickOrderTranslationsEn, +}; diff --git a/feature-libs/cart/quick-order/assets/translations/cs/index.ts b/feature-libs/cart/quick-order/assets/translations/cs/index.ts new file mode 100644 index 00000000000..f99a2864a8b --- /dev/null +++ b/feature-libs/cart/quick-order/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quickOrder from './quickOrder.json'; +export const cs = { + quickOrder, +}; diff --git a/feature-libs/cart/quick-order/assets/translations/de/index.ts b/feature-libs/cart/quick-order/assets/translations/de/index.ts index 187f0befc83..065fbdbd939 100644 --- a/feature-libs/cart/quick-order/assets/translations/de/index.ts +++ b/feature-libs/cart/quick-order/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import quickOrder from './quickOrder.json'; - export const de = { quickOrder, }; diff --git a/feature-libs/cart/quick-order/assets/translations/en/index.ts b/feature-libs/cart/quick-order/assets/translations/en/index.ts index f68b0854fd7..a883db57bc6 100644 --- a/feature-libs/cart/quick-order/assets/translations/en/index.ts +++ b/feature-libs/cart/quick-order/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import quickOrder from './quickOrder.json'; - export const en = { quickOrder, }; diff --git a/feature-libs/cart/quick-order/assets/translations/es/index.ts b/feature-libs/cart/quick-order/assets/translations/es/index.ts new file mode 100644 index 00000000000..914331999ac --- /dev/null +++ b/feature-libs/cart/quick-order/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quickOrder from './quickOrder.json'; +export const es = { + quickOrder, +}; diff --git a/feature-libs/cart/quick-order/assets/translations/es_CO/index.ts b/feature-libs/cart/quick-order/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..c9b4dc58c51 --- /dev/null +++ b/feature-libs/cart/quick-order/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quickOrder from './quickOrder.json'; +export const es_CO = { + quickOrder, +}; diff --git a/feature-libs/cart/quick-order/assets/translations/fr/index.ts b/feature-libs/cart/quick-order/assets/translations/fr/index.ts new file mode 100644 index 00000000000..3ab0058b2c3 --- /dev/null +++ b/feature-libs/cart/quick-order/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quickOrder from './quickOrder.json'; +export const fr = { + quickOrder, +}; diff --git a/feature-libs/cart/quick-order/assets/translations/hi/index.ts b/feature-libs/cart/quick-order/assets/translations/hi/index.ts new file mode 100644 index 00000000000..2c68803c391 --- /dev/null +++ b/feature-libs/cart/quick-order/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quickOrder from './quickOrder.json'; +export const hi = { + quickOrder, +}; diff --git a/feature-libs/cart/quick-order/assets/translations/hu/index.ts b/feature-libs/cart/quick-order/assets/translations/hu/index.ts new file mode 100644 index 00000000000..2b42882c9e9 --- /dev/null +++ b/feature-libs/cart/quick-order/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quickOrder from './quickOrder.json'; +export const hu = { + quickOrder, +}; diff --git a/feature-libs/cart/quick-order/assets/translations/id/index.ts b/feature-libs/cart/quick-order/assets/translations/id/index.ts new file mode 100644 index 00000000000..00432e80b2f --- /dev/null +++ b/feature-libs/cart/quick-order/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quickOrder from './quickOrder.json'; +export const id = { + quickOrder, +}; diff --git a/feature-libs/cart/quick-order/assets/translations/it/index.ts b/feature-libs/cart/quick-order/assets/translations/it/index.ts new file mode 100644 index 00000000000..c78c3e9aceb --- /dev/null +++ b/feature-libs/cart/quick-order/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quickOrder from './quickOrder.json'; +export const it = { + quickOrder, +}; diff --git a/feature-libs/cart/quick-order/assets/translations/ja/index.ts b/feature-libs/cart/quick-order/assets/translations/ja/index.ts index 48fec376b7e..adb9d052fa9 100644 --- a/feature-libs/cart/quick-order/assets/translations/ja/index.ts +++ b/feature-libs/cart/quick-order/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import quickOrder from './quickOrder.json'; - export const ja = { quickOrder, }; diff --git a/feature-libs/cart/quick-order/assets/translations/ko/index.ts b/feature-libs/cart/quick-order/assets/translations/ko/index.ts new file mode 100644 index 00000000000..e9d3f89e47c --- /dev/null +++ b/feature-libs/cart/quick-order/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quickOrder from './quickOrder.json'; +export const ko = { + quickOrder, +}; diff --git a/feature-libs/cart/quick-order/assets/translations/pl/index.ts b/feature-libs/cart/quick-order/assets/translations/pl/index.ts new file mode 100644 index 00000000000..93ebfa3573b --- /dev/null +++ b/feature-libs/cart/quick-order/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quickOrder from './quickOrder.json'; +export const pl = { + quickOrder, +}; diff --git a/feature-libs/cart/quick-order/assets/translations/pt/index.ts b/feature-libs/cart/quick-order/assets/translations/pt/index.ts new file mode 100644 index 00000000000..48623fcba6d --- /dev/null +++ b/feature-libs/cart/quick-order/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quickOrder from './quickOrder.json'; +export const pt = { + quickOrder, +}; diff --git a/feature-libs/cart/quick-order/assets/translations/ru/index.ts b/feature-libs/cart/quick-order/assets/translations/ru/index.ts new file mode 100644 index 00000000000..5e2765a6e76 --- /dev/null +++ b/feature-libs/cart/quick-order/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quickOrder from './quickOrder.json'; +export const ru = { + quickOrder, +}; diff --git a/feature-libs/cart/quick-order/assets/translations/translations.ts b/feature-libs/cart/quick-order/assets/translations/translations.ts index 10664ef089d..3ec92d61ce7 100644 --- a/feature-libs/cart/quick-order/assets/translations/translations.ts +++ b/feature-libs/cart/quick-order/assets/translations/translations.ts @@ -4,25 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const quickOrderTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const quickOrderTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -// expose all translation chunk mapping for quickOrder feature -export const quickOrderTranslationChunksConfig: TranslationChunksConfig = { - quickOrder: [ - 'quickOrderCartForm', - 'quickOrderForm', - 'quickOrderList', - 'quickOrderTable', - ], -}; +export { cs as quickOrderTranslationsCs } from './cs/index'; +export { de as quickOrderTranslationsDe } from './de/index'; +export { en as quickOrderTranslationsEn } from './en/index'; +export { es as quickOrderTranslationsEs } from './es/index'; +export { es_CO as quickOrderTranslationsEs_CO } from './es_CO/index'; +export { fr as quickOrderTranslationsFr } from './fr/index'; +export { hi as quickOrderTranslationsHi } from './hi/index'; +export { hu as quickOrderTranslationsHu } from './hu/index'; +export { id as quickOrderTranslationsId } from './id/index'; +export { it as quickOrderTranslationsIt } from './it/index'; +export { ja as quickOrderTranslationsJa } from './ja/index'; +export { ko as quickOrderTranslationsKo } from './ko/index'; +export { pl as quickOrderTranslationsPl } from './pl/index'; +export { pt as quickOrderTranslationsPt } from './pt/index'; +export { ru as quickOrderTranslationsRu } from './ru/index'; +export { zh as quickOrderTranslationsZh } from './zh/index'; +export { zh_TW as quickOrderTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/cart/quick-order/assets/translations/zh/index.ts b/feature-libs/cart/quick-order/assets/translations/zh/index.ts index 5e71cf66c8c..0ec8e5d1f1b 100644 --- a/feature-libs/cart/quick-order/assets/translations/zh/index.ts +++ b/feature-libs/cart/quick-order/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import quickOrder from './quickOrder.json'; - export const zh = { quickOrder, }; diff --git a/feature-libs/cart/quick-order/assets/translations/zh_TW/index.ts b/feature-libs/cart/quick-order/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..8c6b08cf439 --- /dev/null +++ b/feature-libs/cart/quick-order/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quickOrder from './quickOrder.json'; +export const zh_TW = { + quickOrder, +}; diff --git a/feature-libs/cart/saved-cart/assets/public_api.ts b/feature-libs/cart/saved-cart/assets/public_api.ts index 0784e372a0d..97dd93a46ea 100644 --- a/feature-libs/cart/saved-cart/assets/public_api.ts +++ b/feature-libs/cart/saved-cart/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { savedCartTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: savedCartTranslations + * + resources: { en: savedCartTranslationsEn } + * } + * ``` + */ +export const savedCartTranslations = { + en: savedCartTranslationsEn, +}; diff --git a/feature-libs/cart/saved-cart/assets/translations/cs/index.ts b/feature-libs/cart/saved-cart/assets/translations/cs/index.ts new file mode 100644 index 00000000000..37b6b2e6199 --- /dev/null +++ b/feature-libs/cart/saved-cart/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import savedCart from './savedCart.json'; +export const cs = { + savedCart, +}; diff --git a/feature-libs/cart/saved-cart/assets/translations/de/index.ts b/feature-libs/cart/saved-cart/assets/translations/de/index.ts index 0ae45caeb9d..d9fca9f5e86 100644 --- a/feature-libs/cart/saved-cart/assets/translations/de/index.ts +++ b/feature-libs/cart/saved-cart/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import savedCart from './savedCart.json'; - export const de = { savedCart, }; diff --git a/feature-libs/cart/saved-cart/assets/translations/en/index.ts b/feature-libs/cart/saved-cart/assets/translations/en/index.ts index cdb2571f567..26b3551745d 100644 --- a/feature-libs/cart/saved-cart/assets/translations/en/index.ts +++ b/feature-libs/cart/saved-cart/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import savedCart from './savedCart.json'; - export const en = { savedCart, }; diff --git a/feature-libs/cart/saved-cart/assets/translations/es/index.ts b/feature-libs/cart/saved-cart/assets/translations/es/index.ts new file mode 100644 index 00000000000..423110789fc --- /dev/null +++ b/feature-libs/cart/saved-cart/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import savedCart from './savedCart.json'; +export const es = { + savedCart, +}; diff --git a/feature-libs/cart/saved-cart/assets/translations/es_CO/index.ts b/feature-libs/cart/saved-cart/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..47aa410b305 --- /dev/null +++ b/feature-libs/cart/saved-cart/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import savedCart from './savedCart.json'; +export const es_CO = { + savedCart, +}; diff --git a/feature-libs/cart/saved-cart/assets/translations/fr/index.ts b/feature-libs/cart/saved-cart/assets/translations/fr/index.ts new file mode 100644 index 00000000000..e107daf8c72 --- /dev/null +++ b/feature-libs/cart/saved-cart/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import savedCart from './savedCart.json'; +export const fr = { + savedCart, +}; diff --git a/feature-libs/cart/saved-cart/assets/translations/hi/index.ts b/feature-libs/cart/saved-cart/assets/translations/hi/index.ts new file mode 100644 index 00000000000..d47a57ec2ad --- /dev/null +++ b/feature-libs/cart/saved-cart/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import savedCart from './savedCart.json'; +export const hi = { + savedCart, +}; diff --git a/feature-libs/cart/saved-cart/assets/translations/hu/index.ts b/feature-libs/cart/saved-cart/assets/translations/hu/index.ts new file mode 100644 index 00000000000..041a9e4c1de --- /dev/null +++ b/feature-libs/cart/saved-cart/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import savedCart from './savedCart.json'; +export const hu = { + savedCart, +}; diff --git a/feature-libs/cart/saved-cart/assets/translations/id/index.ts b/feature-libs/cart/saved-cart/assets/translations/id/index.ts new file mode 100644 index 00000000000..17a53f83ae0 --- /dev/null +++ b/feature-libs/cart/saved-cart/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import savedCart from './savedCart.json'; +export const id = { + savedCart, +}; diff --git a/feature-libs/cart/saved-cart/assets/translations/it/index.ts b/feature-libs/cart/saved-cart/assets/translations/it/index.ts new file mode 100644 index 00000000000..225b3bde5e9 --- /dev/null +++ b/feature-libs/cart/saved-cart/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import savedCart from './savedCart.json'; +export const it = { + savedCart, +}; diff --git a/feature-libs/cart/saved-cart/assets/translations/ja/index.ts b/feature-libs/cart/saved-cart/assets/translations/ja/index.ts index ee7e794be62..9c8fed459eb 100644 --- a/feature-libs/cart/saved-cart/assets/translations/ja/index.ts +++ b/feature-libs/cart/saved-cart/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import savedCart from './savedCart.json'; - export const ja = { savedCart, }; diff --git a/feature-libs/cart/saved-cart/assets/translations/ko/index.ts b/feature-libs/cart/saved-cart/assets/translations/ko/index.ts new file mode 100644 index 00000000000..e3afffe6e07 --- /dev/null +++ b/feature-libs/cart/saved-cart/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import savedCart from './savedCart.json'; +export const ko = { + savedCart, +}; diff --git a/feature-libs/cart/saved-cart/assets/translations/pl/index.ts b/feature-libs/cart/saved-cart/assets/translations/pl/index.ts new file mode 100644 index 00000000000..8ba0a415b58 --- /dev/null +++ b/feature-libs/cart/saved-cart/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import savedCart from './savedCart.json'; +export const pl = { + savedCart, +}; diff --git a/feature-libs/cart/saved-cart/assets/translations/pt/index.ts b/feature-libs/cart/saved-cart/assets/translations/pt/index.ts new file mode 100644 index 00000000000..78f7a0d9d67 --- /dev/null +++ b/feature-libs/cart/saved-cart/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import savedCart from './savedCart.json'; +export const pt = { + savedCart, +}; diff --git a/feature-libs/cart/saved-cart/assets/translations/ru/index.ts b/feature-libs/cart/saved-cart/assets/translations/ru/index.ts new file mode 100644 index 00000000000..cd16aa4b397 --- /dev/null +++ b/feature-libs/cart/saved-cart/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import savedCart from './savedCart.json'; +export const ru = { + savedCart, +}; diff --git a/feature-libs/cart/saved-cart/assets/translations/translations.ts b/feature-libs/cart/saved-cart/assets/translations/translations.ts index 679a9b33111..2ff6785026e 100644 --- a/feature-libs/cart/saved-cart/assets/translations/translations.ts +++ b/feature-libs/cart/saved-cart/assets/translations/translations.ts @@ -4,26 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const savedCartTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const savedCartTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -// expose all translation chunk mapping for savedCart feature -export const savedCartTranslationChunksConfig: TranslationChunksConfig = { - savedCart: [ - 'savedCartDetails', - 'savedCartList', - 'savedCartCartPage', - 'savedCartDialog', - 'addToSavedCart', - ], -}; +export { cs as savedCartTranslationsCs } from './cs/index'; +export { de as savedCartTranslationsDe } from './de/index'; +export { en as savedCartTranslationsEn } from './en/index'; +export { es as savedCartTranslationsEs } from './es/index'; +export { es_CO as savedCartTranslationsEs_CO } from './es_CO/index'; +export { fr as savedCartTranslationsFr } from './fr/index'; +export { hi as savedCartTranslationsHi } from './hi/index'; +export { hu as savedCartTranslationsHu } from './hu/index'; +export { id as savedCartTranslationsId } from './id/index'; +export { it as savedCartTranslationsIt } from './it/index'; +export { ja as savedCartTranslationsJa } from './ja/index'; +export { ko as savedCartTranslationsKo } from './ko/index'; +export { pl as savedCartTranslationsPl } from './pl/index'; +export { pt as savedCartTranslationsPt } from './pt/index'; +export { ru as savedCartTranslationsRu } from './ru/index'; +export { zh as savedCartTranslationsZh } from './zh/index'; +export { zh_TW as savedCartTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/cart/saved-cart/assets/translations/zh/index.ts b/feature-libs/cart/saved-cart/assets/translations/zh/index.ts index 955dac09da4..0a85f896957 100644 --- a/feature-libs/cart/saved-cart/assets/translations/zh/index.ts +++ b/feature-libs/cart/saved-cart/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import savedCart from './savedCart.json'; - export const zh = { savedCart, }; diff --git a/feature-libs/cart/saved-cart/assets/translations/zh_TW/index.ts b/feature-libs/cart/saved-cart/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..1642223efdb --- /dev/null +++ b/feature-libs/cart/saved-cart/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import savedCart from './savedCart.json'; +export const zh_TW = { + savedCart, +}; diff --git a/feature-libs/cart/schematics/add-cart/__snapshots__/index_spec.ts.snap b/feature-libs/cart/schematics/add-cart/__snapshots__/index_spec.ts.snap index c53eedef64e..4aa17bd65d6 100644 --- a/feature-libs/cart/schematics/add-cart/__snapshots__/index_spec.ts.snap +++ b/feature-libs/cart/schematics/add-cart/__snapshots__/index_spec.ts.snap @@ -3,7 +3,7 @@ exports[`Spartacus Cart schematics: ng-add Cart Base feature eager loading should import appropriate modules 1`] = ` "import { NgModule } from '@angular/core'; import { CartBaseModule } from "@spartacus/cart/base"; -import { cartBaseTranslationChunksConfig, cartBaseTranslations } from "@spartacus/cart/base/assets"; +import { cartBaseTranslationChunksConfig, cartBaseTranslationsEn } from "@spartacus/cart/base/assets"; import { AddToCartModule } from "@spartacus/cart/base/components/add-to-cart"; import { MiniCartModule } from "@spartacus/cart/base/components/mini-cart"; import { CartBaseRootModule } from "@spartacus/cart/base/root"; @@ -19,7 +19,7 @@ import { I18nConfig, provideConfig } from "@spartacus/core"; ], providers: [provideConfig({ i18n: { - resources: cartBaseTranslations, + resources: { en: cartBaseTranslationsEn }, chunks: cartBaseTranslationChunksConfig, }, })] @@ -30,7 +30,7 @@ export class CartBaseFeatureModule { } exports[`Spartacus Cart schematics: ng-add Cart Base feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; -import { cartBaseTranslationChunksConfig, cartBaseTranslations } from "@spartacus/cart/base/assets"; +import { cartBaseTranslationChunksConfig, cartBaseTranslationsEn } from "@spartacus/cart/base/assets"; import { ADD_TO_CART_FEATURE, CART_BASE_FEATURE, CartBaseRootModule, MINI_CART_FEATURE } from "@spartacus/cart/base/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @@ -65,7 +65,7 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: cartBaseTranslations, + resources: { en: cartBaseTranslationsEn }, chunks: cartBaseTranslationChunksConfig, }, }) @@ -208,7 +208,7 @@ exports[`Spartacus Cart schematics: ng-add Cart Base feature general setup styli exports[`Spartacus Cart schematics: ng-add Cart Import Export feature eager loading should import appropriate modules 1`] = ` "import { NgModule } from '@angular/core'; import { ImportExportModule } from "@spartacus/cart/import-export"; -import { importExportTranslationChunksConfig, importExportTranslations } from "@spartacus/cart/import-export/assets"; +import { importExportTranslationChunksConfig, importExportTranslationsEn } from "@spartacus/cart/import-export/assets"; import { ImportExportRootModule } from "@spartacus/cart/import-export/root"; import { I18nConfig, provideConfig } from "@spartacus/core"; @@ -220,7 +220,7 @@ import { I18nConfig, provideConfig } from "@spartacus/core"; ], providers: [provideConfig({ i18n: { - resources: importExportTranslations, + resources: { en: importExportTranslationsEn }, chunks: importExportTranslationChunksConfig, }, })] @@ -231,7 +231,7 @@ export class CartImportExportFeatureModule { } exports[`Spartacus Cart schematics: ng-add Cart Import Export feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; -import { importExportTranslationChunksConfig, importExportTranslations } from "@spartacus/cart/import-export/assets"; +import { importExportTranslationChunksConfig, importExportTranslationsEn } from "@spartacus/cart/import-export/assets"; import { CART_IMPORT_EXPORT_FEATURE, ImportExportRootModule } from "@spartacus/cart/import-export/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @@ -250,7 +250,7 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: importExportTranslations, + resources: { en: importExportTranslationsEn }, chunks: importExportTranslationChunksConfig, }, }) @@ -393,7 +393,7 @@ exports[`Spartacus Cart schematics: ng-add Cart Import Export feature general se exports[`Spartacus Cart schematics: ng-add Quick Order feature eager loading should import appropriate modules 1`] = ` "import { NgModule } from '@angular/core'; import { QuickOrderModule } from "@spartacus/cart/quick-order"; -import { quickOrderTranslationChunksConfig, quickOrderTranslations } from "@spartacus/cart/quick-order/assets"; +import { quickOrderTranslationChunksConfig, quickOrderTranslationsEn } from "@spartacus/cart/quick-order/assets"; import { QuickOrderRootModule } from "@spartacus/cart/quick-order/root"; import { I18nConfig, provideConfig } from "@spartacus/core"; @@ -405,7 +405,7 @@ import { I18nConfig, provideConfig } from "@spartacus/core"; ], providers: [provideConfig({ i18n: { - resources: quickOrderTranslations, + resources: { en: quickOrderTranslationsEn }, chunks: quickOrderTranslationChunksConfig, }, })] @@ -416,7 +416,7 @@ export class CartQuickOrderFeatureModule { } exports[`Spartacus Cart schematics: ng-add Quick Order feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; -import { quickOrderTranslationChunksConfig, quickOrderTranslations } from "@spartacus/cart/quick-order/assets"; +import { quickOrderTranslationChunksConfig, quickOrderTranslationsEn } from "@spartacus/cart/quick-order/assets"; import { CART_QUICK_ORDER_FEATURE, QuickOrderRootModule } from "@spartacus/cart/quick-order/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @@ -435,7 +435,7 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: quickOrderTranslations, + resources: { en: quickOrderTranslationsEn }, chunks: quickOrderTranslationChunksConfig, }, }) @@ -578,7 +578,7 @@ exports[`Spartacus Cart schematics: ng-add Quick Order feature general setup sty exports[`Spartacus Cart schematics: ng-add Saved Cart feature eager loading should import appropriate modules 1`] = ` "import { NgModule } from '@angular/core'; import { SavedCartModule } from "@spartacus/cart/saved-cart"; -import { savedCartTranslationChunksConfig, savedCartTranslations } from "@spartacus/cart/saved-cart/assets"; +import { savedCartTranslationChunksConfig, savedCartTranslationsEn } from "@spartacus/cart/saved-cart/assets"; import { SavedCartRootModule } from "@spartacus/cart/saved-cart/root"; import { I18nConfig, provideConfig } from "@spartacus/core"; @@ -590,7 +590,7 @@ import { I18nConfig, provideConfig } from "@spartacus/core"; ], providers: [provideConfig({ i18n: { - resources: savedCartTranslations, + resources: { en: savedCartTranslationsEn }, chunks: savedCartTranslationChunksConfig, }, })] @@ -601,7 +601,7 @@ export class CartSavedCartFeatureModule { } exports[`Spartacus Cart schematics: ng-add Saved Cart feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; -import { savedCartTranslationChunksConfig, savedCartTranslations } from "@spartacus/cart/saved-cart/assets"; +import { savedCartTranslationChunksConfig, savedCartTranslationsEn } from "@spartacus/cart/saved-cart/assets"; import { CART_SAVED_CART_FEATURE, SavedCartRootModule } from "@spartacus/cart/saved-cart/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @@ -620,7 +620,7 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: savedCartTranslations, + resources: { en: savedCartTranslationsEn }, chunks: savedCartTranslationChunksConfig, }, }) @@ -763,7 +763,7 @@ exports[`Spartacus Cart schematics: ng-add Saved Cart feature general setup styl exports[`Spartacus Cart schematics: ng-add Wish List feature eager loading should import appropriate modules 1`] = ` "import { NgModule } from '@angular/core'; import { WishListModule } from "@spartacus/cart/wish-list"; -import { wishListTranslationChunksConfig, wishListTranslations } from "@spartacus/cart/wish-list/assets"; +import { wishListTranslationChunksConfig, wishListTranslationsEn } from "@spartacus/cart/wish-list/assets"; import { AddToWishListModule } from "@spartacus/cart/wish-list/components/add-to-wishlist"; import { WishListRootModule } from "@spartacus/cart/wish-list/root"; import { I18nConfig, provideConfig } from "@spartacus/core"; @@ -777,7 +777,7 @@ import { I18nConfig, provideConfig } from "@spartacus/core"; ], providers: [provideConfig({ i18n: { - resources: wishListTranslations, + resources: { en: wishListTranslationsEn }, chunks: wishListTranslationChunksConfig, }, })] @@ -788,7 +788,7 @@ export class WishListFeatureModule { } exports[`Spartacus Cart schematics: ng-add Wish List feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; -import { wishListTranslationChunksConfig, wishListTranslations } from "@spartacus/cart/wish-list/assets"; +import { wishListTranslationChunksConfig, wishListTranslationsEn } from "@spartacus/cart/wish-list/assets"; import { ADD_TO_WISHLIST_FEATURE, CART_WISH_LIST_FEATURE, WishListRootModule } from "@spartacus/cart/wish-list/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @@ -815,7 +815,7 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: wishListTranslations, + resources: { en: wishListTranslationsEn }, chunks: wishListTranslationChunksConfig, }, }) diff --git a/feature-libs/cart/wish-list/assets/public_api.ts b/feature-libs/cart/wish-list/assets/public_api.ts index 0784e372a0d..a9ef5029abe 100644 --- a/feature-libs/cart/wish-list/assets/public_api.ts +++ b/feature-libs/cart/wish-list/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { wishListTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: wishListTranslations + * + resources: { en: wishListTranslationsEn } + * } + * ``` + */ +export const wishListTranslations = { + en: wishListTranslationsEn, +}; diff --git a/feature-libs/cart/wish-list/assets/translations/cs/index.ts b/feature-libs/cart/wish-list/assets/translations/cs/index.ts new file mode 100644 index 00000000000..b07baa88207 --- /dev/null +++ b/feature-libs/cart/wish-list/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import wishlist from './wishlist.json'; +export const cs = { + wishlist, +}; diff --git a/feature-libs/cart/wish-list/assets/translations/de/index.ts b/feature-libs/cart/wish-list/assets/translations/de/index.ts index a2b494956ea..4e6860a79d4 100644 --- a/feature-libs/cart/wish-list/assets/translations/de/index.ts +++ b/feature-libs/cart/wish-list/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import wishlist from './wishlist.json'; - export const de = { wishlist, }; diff --git a/feature-libs/cart/wish-list/assets/translations/en/index.ts b/feature-libs/cart/wish-list/assets/translations/en/index.ts index 66d7ccaad88..47ec6bc4dc9 100644 --- a/feature-libs/cart/wish-list/assets/translations/en/index.ts +++ b/feature-libs/cart/wish-list/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import wishlist from './wishlist.json'; - export const en = { wishlist, }; diff --git a/feature-libs/cart/wish-list/assets/translations/es/index.ts b/feature-libs/cart/wish-list/assets/translations/es/index.ts new file mode 100644 index 00000000000..24cdc285d30 --- /dev/null +++ b/feature-libs/cart/wish-list/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import wishlist from './wishlist.json'; +export const es = { + wishlist, +}; diff --git a/feature-libs/cart/wish-list/assets/translations/es_CO/index.ts b/feature-libs/cart/wish-list/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..feb48993f04 --- /dev/null +++ b/feature-libs/cart/wish-list/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import wishlist from './wishlist.json'; +export const es_CO = { + wishlist, +}; diff --git a/feature-libs/cart/wish-list/assets/translations/fr/index.ts b/feature-libs/cart/wish-list/assets/translations/fr/index.ts new file mode 100644 index 00000000000..22c86636979 --- /dev/null +++ b/feature-libs/cart/wish-list/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import wishlist from './wishlist.json'; +export const fr = { + wishlist, +}; diff --git a/feature-libs/cart/wish-list/assets/translations/hi/index.ts b/feature-libs/cart/wish-list/assets/translations/hi/index.ts new file mode 100644 index 00000000000..4250af0251a --- /dev/null +++ b/feature-libs/cart/wish-list/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import wishlist from './wishlist.json'; +export const hi = { + wishlist, +}; diff --git a/feature-libs/cart/wish-list/assets/translations/hu/index.ts b/feature-libs/cart/wish-list/assets/translations/hu/index.ts new file mode 100644 index 00000000000..3b5131c6b72 --- /dev/null +++ b/feature-libs/cart/wish-list/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import wishlist from './wishlist.json'; +export const hu = { + wishlist, +}; diff --git a/feature-libs/cart/wish-list/assets/translations/id/index.ts b/feature-libs/cart/wish-list/assets/translations/id/index.ts new file mode 100644 index 00000000000..bede3385630 --- /dev/null +++ b/feature-libs/cart/wish-list/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import wishlist from './wishlist.json'; +export const id = { + wishlist, +}; diff --git a/feature-libs/cart/wish-list/assets/translations/it/index.ts b/feature-libs/cart/wish-list/assets/translations/it/index.ts new file mode 100644 index 00000000000..24ee933eae7 --- /dev/null +++ b/feature-libs/cart/wish-list/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import wishlist from './wishlist.json'; +export const it = { + wishlist, +}; diff --git a/feature-libs/cart/wish-list/assets/translations/ja/index.ts b/feature-libs/cart/wish-list/assets/translations/ja/index.ts index 00a700a1044..0c1b833ecf3 100644 --- a/feature-libs/cart/wish-list/assets/translations/ja/index.ts +++ b/feature-libs/cart/wish-list/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import wishlist from './wishlist.json'; - export const ja = { wishlist, }; diff --git a/feature-libs/cart/wish-list/assets/translations/ko/index.ts b/feature-libs/cart/wish-list/assets/translations/ko/index.ts new file mode 100644 index 00000000000..e01385a5533 --- /dev/null +++ b/feature-libs/cart/wish-list/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import wishlist from './wishlist.json'; +export const ko = { + wishlist, +}; diff --git a/feature-libs/cart/wish-list/assets/translations/pl/index.ts b/feature-libs/cart/wish-list/assets/translations/pl/index.ts new file mode 100644 index 00000000000..f3689225de3 --- /dev/null +++ b/feature-libs/cart/wish-list/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import wishlist from './wishlist.json'; +export const pl = { + wishlist, +}; diff --git a/feature-libs/cart/wish-list/assets/translations/pt/index.ts b/feature-libs/cart/wish-list/assets/translations/pt/index.ts new file mode 100644 index 00000000000..5572328631b --- /dev/null +++ b/feature-libs/cart/wish-list/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import wishlist from './wishlist.json'; +export const pt = { + wishlist, +}; diff --git a/feature-libs/cart/wish-list/assets/translations/ru/index.ts b/feature-libs/cart/wish-list/assets/translations/ru/index.ts new file mode 100644 index 00000000000..b0c2127601f --- /dev/null +++ b/feature-libs/cart/wish-list/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import wishlist from './wishlist.json'; +export const ru = { + wishlist, +}; diff --git a/feature-libs/cart/wish-list/assets/translations/translations.ts b/feature-libs/cart/wish-list/assets/translations/translations.ts index 0adc884125e..e9127bf0bb1 100644 --- a/feature-libs/cart/wish-list/assets/translations/translations.ts +++ b/feature-libs/cart/wish-list/assets/translations/translations.ts @@ -4,19 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const wishListTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const wishListTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const wishListTranslationChunksConfig: TranslationChunksConfig = { - wishlist: ['wishlist'], -}; +export { cs as wishListTranslationsCs } from './cs/index'; +export { de as wishListTranslationsDe } from './de/index'; +export { en as wishListTranslationsEn } from './en/index'; +export { es as wishListTranslationsEs } from './es/index'; +export { es_CO as wishListTranslationsEs_CO } from './es_CO/index'; +export { fr as wishListTranslationsFr } from './fr/index'; +export { hi as wishListTranslationsHi } from './hi/index'; +export { hu as wishListTranslationsHu } from './hu/index'; +export { id as wishListTranslationsId } from './id/index'; +export { it as wishListTranslationsIt } from './it/index'; +export { ja as wishListTranslationsJa } from './ja/index'; +export { ko as wishListTranslationsKo } from './ko/index'; +export { pl as wishListTranslationsPl } from './pl/index'; +export { pt as wishListTranslationsPt } from './pt/index'; +export { ru as wishListTranslationsRu } from './ru/index'; +export { zh as wishListTranslationsZh } from './zh/index'; +export { zh_TW as wishListTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/cart/wish-list/assets/translations/zh/index.ts b/feature-libs/cart/wish-list/assets/translations/zh/index.ts index 223fca6e042..576bd6c5fd7 100644 --- a/feature-libs/cart/wish-list/assets/translations/zh/index.ts +++ b/feature-libs/cart/wish-list/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import wishlist from './wishlist.json'; - export const zh = { wishlist, }; diff --git a/feature-libs/cart/wish-list/assets/translations/zh_TW/index.ts b/feature-libs/cart/wish-list/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..5e0735f4546 --- /dev/null +++ b/feature-libs/cart/wish-list/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import wishlist from './wishlist.json'; +export const zh_TW = { + wishlist, +}; diff --git a/feature-libs/checkout/b2b/assets/public_api.ts b/feature-libs/checkout/b2b/assets/public_api.ts index 0784e372a0d..c6c2e3e36e8 100644 --- a/feature-libs/checkout/b2b/assets/public_api.ts +++ b/feature-libs/checkout/b2b/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { checkoutB2BTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: checkoutB2BTranslations + * + resources: { en: checkoutB2BTranslationsEn } + * } + * ``` + */ +export const checkoutB2BTranslations = { + en: checkoutB2BTranslationsEn, +}; diff --git a/feature-libs/checkout/b2b/assets/translations/cs/index.ts b/feature-libs/checkout/b2b/assets/translations/cs/index.ts new file mode 100644 index 00000000000..d1e9454f2d1 --- /dev/null +++ b/feature-libs/checkout/b2b/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutB2B from './checkoutB2B.json'; +export const cs = { + checkoutB2B, +}; diff --git a/feature-libs/checkout/b2b/assets/translations/de/index.ts b/feature-libs/checkout/b2b/assets/translations/de/index.ts index 745c1df502e..6608f043334 100644 --- a/feature-libs/checkout/b2b/assets/translations/de/index.ts +++ b/feature-libs/checkout/b2b/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import checkoutB2B from './checkoutB2B.json'; - export const de = { checkoutB2B, }; diff --git a/feature-libs/checkout/b2b/assets/translations/en/index.ts b/feature-libs/checkout/b2b/assets/translations/en/index.ts index bdd421f800a..272e8033d7e 100644 --- a/feature-libs/checkout/b2b/assets/translations/en/index.ts +++ b/feature-libs/checkout/b2b/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import checkoutB2B from './checkoutB2B.json'; - export const en = { checkoutB2B, }; diff --git a/feature-libs/checkout/b2b/assets/translations/es/index.ts b/feature-libs/checkout/b2b/assets/translations/es/index.ts new file mode 100644 index 00000000000..18722e886e5 --- /dev/null +++ b/feature-libs/checkout/b2b/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutB2B from './checkoutB2B.json'; +export const es = { + checkoutB2B, +}; diff --git a/feature-libs/checkout/b2b/assets/translations/es_CO/index.ts b/feature-libs/checkout/b2b/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..972957e9d73 --- /dev/null +++ b/feature-libs/checkout/b2b/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutB2B from './checkoutB2B.json'; +export const es_CO = { + checkoutB2B, +}; diff --git a/feature-libs/checkout/b2b/assets/translations/fr/index.ts b/feature-libs/checkout/b2b/assets/translations/fr/index.ts new file mode 100644 index 00000000000..1c13251843c --- /dev/null +++ b/feature-libs/checkout/b2b/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutB2B from './checkoutB2B.json'; +export const fr = { + checkoutB2B, +}; diff --git a/feature-libs/checkout/b2b/assets/translations/hi/index.ts b/feature-libs/checkout/b2b/assets/translations/hi/index.ts new file mode 100644 index 00000000000..afe43ba5f05 --- /dev/null +++ b/feature-libs/checkout/b2b/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutB2B from './checkoutB2B.json'; +export const hi = { + checkoutB2B, +}; diff --git a/feature-libs/checkout/b2b/assets/translations/hu/index.ts b/feature-libs/checkout/b2b/assets/translations/hu/index.ts new file mode 100644 index 00000000000..b1d0d0b3535 --- /dev/null +++ b/feature-libs/checkout/b2b/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutB2B from './checkoutB2B.json'; +export const hu = { + checkoutB2B, +}; diff --git a/feature-libs/checkout/b2b/assets/translations/id/index.ts b/feature-libs/checkout/b2b/assets/translations/id/index.ts new file mode 100644 index 00000000000..3fc80ffdf12 --- /dev/null +++ b/feature-libs/checkout/b2b/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutB2B from './checkoutB2B.json'; +export const id = { + checkoutB2B, +}; diff --git a/feature-libs/checkout/b2b/assets/translations/it/index.ts b/feature-libs/checkout/b2b/assets/translations/it/index.ts new file mode 100644 index 00000000000..e715e1fa8a9 --- /dev/null +++ b/feature-libs/checkout/b2b/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutB2B from './checkoutB2B.json'; +export const it = { + checkoutB2B, +}; diff --git a/feature-libs/checkout/b2b/assets/translations/ja/index.ts b/feature-libs/checkout/b2b/assets/translations/ja/index.ts index 417be13ad5c..e088afa7ce2 100644 --- a/feature-libs/checkout/b2b/assets/translations/ja/index.ts +++ b/feature-libs/checkout/b2b/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import checkoutB2B from './checkoutB2B.json'; - export const ja = { checkoutB2B, }; diff --git a/feature-libs/checkout/b2b/assets/translations/ko/index.ts b/feature-libs/checkout/b2b/assets/translations/ko/index.ts new file mode 100644 index 00000000000..ae97e8decac --- /dev/null +++ b/feature-libs/checkout/b2b/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutB2B from './checkoutB2B.json'; +export const ko = { + checkoutB2B, +}; diff --git a/feature-libs/checkout/b2b/assets/translations/pl/index.ts b/feature-libs/checkout/b2b/assets/translations/pl/index.ts new file mode 100644 index 00000000000..d44eaa9e924 --- /dev/null +++ b/feature-libs/checkout/b2b/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutB2B from './checkoutB2B.json'; +export const pl = { + checkoutB2B, +}; diff --git a/feature-libs/checkout/b2b/assets/translations/pt/index.ts b/feature-libs/checkout/b2b/assets/translations/pt/index.ts new file mode 100644 index 00000000000..8f5f3afedcf --- /dev/null +++ b/feature-libs/checkout/b2b/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutB2B from './checkoutB2B.json'; +export const pt = { + checkoutB2B, +}; diff --git a/feature-libs/checkout/b2b/assets/translations/ru/index.ts b/feature-libs/checkout/b2b/assets/translations/ru/index.ts new file mode 100644 index 00000000000..724594a36d1 --- /dev/null +++ b/feature-libs/checkout/b2b/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutB2B from './checkoutB2B.json'; +export const ru = { + checkoutB2B, +}; diff --git a/feature-libs/checkout/b2b/assets/translations/translations.ts b/feature-libs/checkout/b2b/assets/translations/translations.ts index 43216ef5a63..568b6216849 100644 --- a/feature-libs/checkout/b2b/assets/translations/translations.ts +++ b/feature-libs/checkout/b2b/assets/translations/translations.ts @@ -4,19 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const checkoutB2BTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const checkoutB2BTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const checkoutB2BTranslationChunksConfig: TranslationChunksConfig = { - checkoutB2B: ['checkoutB2B'], -}; +export { cs as checkoutB2BTranslationsCs } from './cs/index'; +export { de as checkoutB2BTranslationsDe } from './de/index'; +export { en as checkoutB2BTranslationsEn } from './en/index'; +export { es as checkoutB2BTranslationsEs } from './es/index'; +export { es_CO as checkoutB2BTranslationsEs_CO } from './es_CO/index'; +export { fr as checkoutB2BTranslationsFr } from './fr/index'; +export { hi as checkoutB2BTranslationsHi } from './hi/index'; +export { hu as checkoutB2BTranslationsHu } from './hu/index'; +export { id as checkoutB2BTranslationsId } from './id/index'; +export { it as checkoutB2BTranslationsIt } from './it/index'; +export { ja as checkoutB2BTranslationsJa } from './ja/index'; +export { ko as checkoutB2BTranslationsKo } from './ko/index'; +export { pl as checkoutB2BTranslationsPl } from './pl/index'; +export { pt as checkoutB2BTranslationsPt } from './pt/index'; +export { ru as checkoutB2BTranslationsRu } from './ru/index'; +export { zh as checkoutB2BTranslationsZh } from './zh/index'; +export { zh_TW as checkoutB2BTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/checkout/b2b/assets/translations/zh/index.ts b/feature-libs/checkout/b2b/assets/translations/zh/index.ts index 251a8441da0..615eb019c54 100644 --- a/feature-libs/checkout/b2b/assets/translations/zh/index.ts +++ b/feature-libs/checkout/b2b/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import checkoutB2B from './checkoutB2B.json'; - export const zh = { checkoutB2B, }; diff --git a/feature-libs/checkout/b2b/assets/translations/zh_TW/index.ts b/feature-libs/checkout/b2b/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..fc3cd2b2e06 --- /dev/null +++ b/feature-libs/checkout/b2b/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutB2B from './checkoutB2B.json'; +export const zh_TW = { + checkoutB2B, +}; diff --git a/feature-libs/checkout/base/assets/public_api.ts b/feature-libs/checkout/base/assets/public_api.ts index 0784e372a0d..624f205dca2 100644 --- a/feature-libs/checkout/base/assets/public_api.ts +++ b/feature-libs/checkout/base/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { checkoutTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: checkoutTranslations + * + resources: { en: checkoutTranslationsEn } + * } + * ``` + */ +export const checkoutTranslations = { + en: checkoutTranslationsEn, +}; diff --git a/feature-libs/checkout/base/assets/translations/cs/index.ts b/feature-libs/checkout/base/assets/translations/cs/index.ts new file mode 100644 index 00000000000..6ed108138ed --- /dev/null +++ b/feature-libs/checkout/base/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkout from './checkout.json'; +export const cs = { + checkout, +}; diff --git a/feature-libs/checkout/base/assets/translations/de/index.ts b/feature-libs/checkout/base/assets/translations/de/index.ts index cbc15d3ac47..08292a71807 100644 --- a/feature-libs/checkout/base/assets/translations/de/index.ts +++ b/feature-libs/checkout/base/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import checkout from './checkout.json'; - export const de = { checkout, }; diff --git a/feature-libs/checkout/base/assets/translations/en/index.ts b/feature-libs/checkout/base/assets/translations/en/index.ts index c44cc42d38a..5addcf97048 100644 --- a/feature-libs/checkout/base/assets/translations/en/index.ts +++ b/feature-libs/checkout/base/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import checkout from './checkout.json'; - export const en = { checkout, }; diff --git a/feature-libs/checkout/base/assets/translations/es/index.ts b/feature-libs/checkout/base/assets/translations/es/index.ts new file mode 100644 index 00000000000..62b71e1fae7 --- /dev/null +++ b/feature-libs/checkout/base/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkout from './checkout.json'; +export const es = { + checkout, +}; diff --git a/feature-libs/checkout/base/assets/translations/es_CO/index.ts b/feature-libs/checkout/base/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..9236698672e --- /dev/null +++ b/feature-libs/checkout/base/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkout from './checkout.json'; +export const es_CO = { + checkout, +}; diff --git a/feature-libs/checkout/base/assets/translations/fr/index.ts b/feature-libs/checkout/base/assets/translations/fr/index.ts new file mode 100644 index 00000000000..a8ee5770b08 --- /dev/null +++ b/feature-libs/checkout/base/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkout from './checkout.json'; +export const fr = { + checkout, +}; diff --git a/feature-libs/checkout/base/assets/translations/hi/index.ts b/feature-libs/checkout/base/assets/translations/hi/index.ts new file mode 100644 index 00000000000..7bfe56f4e38 --- /dev/null +++ b/feature-libs/checkout/base/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkout from './checkout.json'; +export const hi = { + checkout, +}; diff --git a/feature-libs/checkout/base/assets/translations/hu/index.ts b/feature-libs/checkout/base/assets/translations/hu/index.ts new file mode 100644 index 00000000000..222559ec567 --- /dev/null +++ b/feature-libs/checkout/base/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkout from './checkout.json'; +export const hu = { + checkout, +}; diff --git a/feature-libs/checkout/base/assets/translations/id/index.ts b/feature-libs/checkout/base/assets/translations/id/index.ts new file mode 100644 index 00000000000..18428454eb5 --- /dev/null +++ b/feature-libs/checkout/base/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkout from './checkout.json'; +export const id = { + checkout, +}; diff --git a/feature-libs/checkout/base/assets/translations/it/index.ts b/feature-libs/checkout/base/assets/translations/it/index.ts new file mode 100644 index 00000000000..c030d9a383d --- /dev/null +++ b/feature-libs/checkout/base/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkout from './checkout.json'; +export const it = { + checkout, +}; diff --git a/feature-libs/checkout/base/assets/translations/ja/index.ts b/feature-libs/checkout/base/assets/translations/ja/index.ts index cd397f840ed..a45c9be4a21 100644 --- a/feature-libs/checkout/base/assets/translations/ja/index.ts +++ b/feature-libs/checkout/base/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import checkout from './checkout.json'; - export const ja = { checkout, }; diff --git a/feature-libs/checkout/base/assets/translations/ko/index.ts b/feature-libs/checkout/base/assets/translations/ko/index.ts new file mode 100644 index 00000000000..918dace6eb0 --- /dev/null +++ b/feature-libs/checkout/base/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkout from './checkout.json'; +export const ko = { + checkout, +}; diff --git a/feature-libs/checkout/base/assets/translations/pl/index.ts b/feature-libs/checkout/base/assets/translations/pl/index.ts new file mode 100644 index 00000000000..b4e3293b11d --- /dev/null +++ b/feature-libs/checkout/base/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkout from './checkout.json'; +export const pl = { + checkout, +}; diff --git a/feature-libs/checkout/base/assets/translations/pt/index.ts b/feature-libs/checkout/base/assets/translations/pt/index.ts new file mode 100644 index 00000000000..ceb9d2c8930 --- /dev/null +++ b/feature-libs/checkout/base/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkout from './checkout.json'; +export const pt = { + checkout, +}; diff --git a/feature-libs/checkout/base/assets/translations/ru/index.ts b/feature-libs/checkout/base/assets/translations/ru/index.ts new file mode 100644 index 00000000000..b7ecd5d6b75 --- /dev/null +++ b/feature-libs/checkout/base/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkout from './checkout.json'; +export const ru = { + checkout, +}; diff --git a/feature-libs/checkout/base/assets/translations/translations.ts b/feature-libs/checkout/base/assets/translations/translations.ts index 2140a48bbc9..29503328417 100644 --- a/feature-libs/checkout/base/assets/translations/translations.ts +++ b/feature-libs/checkout/base/assets/translations/translations.ts @@ -4,26 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const checkoutTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const checkoutTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const checkoutTranslationChunksConfig: TranslationChunksConfig = { - checkout: [ - 'checkout', - 'checkoutProgress', - 'checkoutAddress', - 'checkoutMode', - 'checkoutReview', - 'checkoutOrderConfirmation', - ], -}; +export { cs as checkoutTranslationsCs } from './cs/index'; +export { de as checkoutTranslationsDe } from './de/index'; +export { en as checkoutTranslationsEn } from './en/index'; +export { es as checkoutTranslationsEs } from './es/index'; +export { es_CO as checkoutTranslationsEs_CO } from './es_CO/index'; +export { fr as checkoutTranslationsFr } from './fr/index'; +export { hi as checkoutTranslationsHi } from './hi/index'; +export { hu as checkoutTranslationsHu } from './hu/index'; +export { id as checkoutTranslationsId } from './id/index'; +export { it as checkoutTranslationsIt } from './it/index'; +export { ja as checkoutTranslationsJa } from './ja/index'; +export { ko as checkoutTranslationsKo } from './ko/index'; +export { pl as checkoutTranslationsPl } from './pl/index'; +export { pt as checkoutTranslationsPt } from './pt/index'; +export { ru as checkoutTranslationsRu } from './ru/index'; +export { zh as checkoutTranslationsZh } from './zh/index'; +export { zh_TW as checkoutTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/checkout/base/assets/translations/zh/index.ts b/feature-libs/checkout/base/assets/translations/zh/index.ts index 99d21d04072..979f6526aaf 100644 --- a/feature-libs/checkout/base/assets/translations/zh/index.ts +++ b/feature-libs/checkout/base/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import checkout from './checkout.json'; - export const zh = { checkout, }; diff --git a/feature-libs/checkout/base/assets/translations/zh_TW/index.ts b/feature-libs/checkout/base/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..e79aced3884 --- /dev/null +++ b/feature-libs/checkout/base/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkout from './checkout.json'; +export const zh_TW = { + checkout, +}; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/public_api.ts b/feature-libs/checkout/scheduled-replenishment/assets/public_api.ts index 0784e372a0d..7118faeac1f 100644 --- a/feature-libs/checkout/scheduled-replenishment/assets/public_api.ts +++ b/feature-libs/checkout/scheduled-replenishment/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { checkoutScheduledReplenishmentTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: checkoutScheduledReplenishmentTranslations + * + resources: { en: checkoutScheduledReplenishmentTranslationsEn } + * } + * ``` + */ +export const checkoutScheduledReplenishmentTranslations = { + en: checkoutScheduledReplenishmentTranslationsEn, +}; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/cs/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/cs/index.ts new file mode 100644 index 00000000000..d20d86ed9e0 --- /dev/null +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; +export const cs = { + checkoutScheduledReplenishment, +}; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/de/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/de/index.ts index 3b0e9556582..5238f047254 100644 --- a/feature-libs/checkout/scheduled-replenishment/assets/translations/de/index.ts +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; - export const de = { checkoutScheduledReplenishment, }; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/en/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/en/index.ts index fbcd65b1fde..5d98c6d1794 100644 --- a/feature-libs/checkout/scheduled-replenishment/assets/translations/en/index.ts +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; - export const en = { checkoutScheduledReplenishment, }; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/es/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/es/index.ts new file mode 100644 index 00000000000..a8e3cf5bfef --- /dev/null +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; +export const es = { + checkoutScheduledReplenishment, +}; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/es_CO/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..896c937c6b6 --- /dev/null +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; +export const es_CO = { + checkoutScheduledReplenishment, +}; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/fr/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/fr/index.ts new file mode 100644 index 00000000000..b6727682db1 --- /dev/null +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; +export const fr = { + checkoutScheduledReplenishment, +}; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/hi/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/hi/index.ts new file mode 100644 index 00000000000..c5d48a92780 --- /dev/null +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; +export const hi = { + checkoutScheduledReplenishment, +}; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/hu/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/hu/index.ts new file mode 100644 index 00000000000..7266d10788e --- /dev/null +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; +export const hu = { + checkoutScheduledReplenishment, +}; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/id/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/id/index.ts new file mode 100644 index 00000000000..94b7e5f1959 --- /dev/null +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; +export const id = { + checkoutScheduledReplenishment, +}; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/it/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/it/index.ts new file mode 100644 index 00000000000..4ee45a73474 --- /dev/null +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; +export const it = { + checkoutScheduledReplenishment, +}; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/ja/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/ja/index.ts index 53bbf656e7d..ac3a730a9e8 100644 --- a/feature-libs/checkout/scheduled-replenishment/assets/translations/ja/index.ts +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; - export const ja = { checkoutScheduledReplenishment, }; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/ko/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/ko/index.ts new file mode 100644 index 00000000000..480868ced20 --- /dev/null +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; +export const ko = { + checkoutScheduledReplenishment, +}; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/pl/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/pl/index.ts new file mode 100644 index 00000000000..95124d296a3 --- /dev/null +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; +export const pl = { + checkoutScheduledReplenishment, +}; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/pt/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/pt/index.ts new file mode 100644 index 00000000000..1efcbe84f7e --- /dev/null +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; +export const pt = { + checkoutScheduledReplenishment, +}; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/ru/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/ru/index.ts new file mode 100644 index 00000000000..0e5d3b4c1cb --- /dev/null +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; +export const ru = { + checkoutScheduledReplenishment, +}; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/translations.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/translations.ts index a21ee1cef6a..ca3a7429f03 100644 --- a/feature-libs/checkout/scheduled-replenishment/assets/translations/translations.ts +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/translations.ts @@ -4,21 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const checkoutScheduledReplenishmentTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const checkoutScheduledReplenishmentTranslations: TranslationResources = - { - en, - ja, - de, - zh, - }; - -export const checkoutScheduledReplenishmentTranslationChunksConfig: TranslationChunksConfig = - { - checkoutScheduledReplenishment: ['checkoutScheduledReplenishment'], - }; +export { cs as checkoutScheduledReplenishmentTranslationsCs } from './cs/index'; +export { de as checkoutScheduledReplenishmentTranslationsDe } from './de/index'; +export { en as checkoutScheduledReplenishmentTranslationsEn } from './en/index'; +export { es as checkoutScheduledReplenishmentTranslationsEs } from './es/index'; +export { es_CO as checkoutScheduledReplenishmentTranslationsEs_CO } from './es_CO/index'; +export { fr as checkoutScheduledReplenishmentTranslationsFr } from './fr/index'; +export { hi as checkoutScheduledReplenishmentTranslationsHi } from './hi/index'; +export { hu as checkoutScheduledReplenishmentTranslationsHu } from './hu/index'; +export { id as checkoutScheduledReplenishmentTranslationsId } from './id/index'; +export { it as checkoutScheduledReplenishmentTranslationsIt } from './it/index'; +export { ja as checkoutScheduledReplenishmentTranslationsJa } from './ja/index'; +export { ko as checkoutScheduledReplenishmentTranslationsKo } from './ko/index'; +export { pl as checkoutScheduledReplenishmentTranslationsPl } from './pl/index'; +export { pt as checkoutScheduledReplenishmentTranslationsPt } from './pt/index'; +export { ru as checkoutScheduledReplenishmentTranslationsRu } from './ru/index'; +export { zh as checkoutScheduledReplenishmentTranslationsZh } from './zh/index'; +export { zh_TW as checkoutScheduledReplenishmentTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/zh/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/zh/index.ts index a21b6a598a6..59b611a4e37 100644 --- a/feature-libs/checkout/scheduled-replenishment/assets/translations/zh/index.ts +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; - export const zh = { checkoutScheduledReplenishment, }; diff --git a/feature-libs/checkout/scheduled-replenishment/assets/translations/zh_TW/index.ts b/feature-libs/checkout/scheduled-replenishment/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..af015d4b36d --- /dev/null +++ b/feature-libs/checkout/scheduled-replenishment/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import checkoutScheduledReplenishment from './checkoutScheduledReplenishment.json'; +export const zh_TW = { + checkoutScheduledReplenishment, +}; diff --git a/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap b/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap index a40b5560557..05eb9078b7e 100644 --- a/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap +++ b/feature-libs/checkout/schematics/add-checkout/__snapshots__/index_spec.ts.snap @@ -3,10 +3,10 @@ exports[`Spartacus Checkout schematics: ng-add Checkout feature b2b eager loading should import appropriate modules 1`] = ` "import { NgModule } from '@angular/core'; import { CheckoutB2BModule } from "@spartacus/checkout/b2b"; -import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslations } from "@spartacus/checkout/b2b/assets"; +import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslationsEn } from "@spartacus/checkout/b2b/assets"; import { CheckoutB2BRootModule } from "@spartacus/checkout/b2b/root"; import { CheckoutModule } from "@spartacus/checkout/base"; -import { checkoutTranslationChunksConfig, checkoutTranslations } from "@spartacus/checkout/base/assets"; +import { checkoutTranslationChunksConfig, checkoutTranslationsEn } from "@spartacus/checkout/base/assets"; import { CheckoutRootModule } from "@spartacus/checkout/base/root"; import { I18nConfig, provideConfig } from "@spartacus/core"; @@ -20,13 +20,13 @@ import { I18nConfig, provideConfig } from "@spartacus/core"; ], providers: [provideConfig({ i18n: { - resources: checkoutTranslations, + resources: { en: checkoutTranslationsEn }, chunks: checkoutTranslationChunksConfig, }, }), provideConfig({ i18n: { - resources: checkoutB2BTranslations, + resources: { en: checkoutB2BTranslationsEn }, chunks: checkoutB2BTranslationChunksConfig, }, }) @@ -38,7 +38,7 @@ export class CheckoutFeatureModule { } exports[`Spartacus Checkout schematics: ng-add Checkout feature b2b general setup b2b features configuration should be added 1`] = ` "import { NgModule } from '@angular/core'; -import { translationChunksConfig, translations } from "@spartacus/assets"; +import { translationChunksConfig, translationsEn } from "@spartacus/assets"; import { FeaturesConfig, I18nConfig, OccConfig, provideConfig, SiteContextConfig } from "@spartacus/core"; import { defaultB2bOccConfig } from "@spartacus/setup"; import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacus/storefront"; @@ -57,7 +57,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu context: {}, }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunksConfig, fallbackLang: 'en' }, @@ -73,9 +73,9 @@ export class SpartacusConfigurationModule { } exports[`Spartacus Checkout schematics: ng-add Checkout feature b2b general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; -import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslations } from "@spartacus/checkout/b2b/assets"; +import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslationsEn } from "@spartacus/checkout/b2b/assets"; import { CheckoutB2BRootModule } from "@spartacus/checkout/b2b/root"; -import { checkoutTranslationChunksConfig, checkoutTranslations } from "@spartacus/checkout/base/assets"; +import { checkoutTranslationChunksConfig, checkoutTranslationsEn } from "@spartacus/checkout/base/assets"; import { CHECKOUT_FEATURE, CheckoutRootModule } from "@spartacus/checkout/base/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @@ -95,13 +95,13 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: checkoutTranslations, + resources: { en: checkoutTranslationsEn }, chunks: checkoutTranslationChunksConfig, }, }), provideConfig({ i18n: { - resources: checkoutB2BTranslations, + resources: { en: checkoutB2BTranslationsEn }, chunks: checkoutB2BTranslationChunksConfig, }, }) @@ -260,7 +260,7 @@ exports[`Spartacus Checkout schematics: ng-add Checkout feature b2b general setu exports[`Spartacus Checkout schematics: ng-add Checkout feature base eager loading should import appropriate modules 1`] = ` "import { NgModule } from '@angular/core'; import { CheckoutModule } from "@spartacus/checkout/base"; -import { checkoutTranslationChunksConfig, checkoutTranslations } from "@spartacus/checkout/base/assets"; +import { checkoutTranslationChunksConfig, checkoutTranslationsEn } from "@spartacus/checkout/base/assets"; import { CheckoutRootModule } from "@spartacus/checkout/base/root"; import { I18nConfig, provideConfig } from "@spartacus/core"; @@ -272,7 +272,7 @@ import { I18nConfig, provideConfig } from "@spartacus/core"; ], providers: [provideConfig({ i18n: { - resources: checkoutTranslations, + resources: { en: checkoutTranslationsEn }, chunks: checkoutTranslationChunksConfig, }, })] @@ -283,7 +283,7 @@ export class CheckoutFeatureModule { } exports[`Spartacus Checkout schematics: ng-add Checkout feature base general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; -import { checkoutTranslationChunksConfig, checkoutTranslations } from "@spartacus/checkout/base/assets"; +import { checkoutTranslationChunksConfig, checkoutTranslationsEn } from "@spartacus/checkout/base/assets"; import { CHECKOUT_FEATURE, CheckoutRootModule } from "@spartacus/checkout/base/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @@ -302,7 +302,7 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: checkoutTranslations, + resources: { en: checkoutTranslationsEn }, chunks: checkoutTranslationChunksConfig, }, }) @@ -445,13 +445,13 @@ exports[`Spartacus Checkout schematics: ng-add Checkout feature base general set exports[`Spartacus Checkout schematics: ng-add Checkout feature scheduled replenishment eager loading should import appropriate modules 1`] = ` "import { NgModule } from '@angular/core'; import { CheckoutB2BModule } from "@spartacus/checkout/b2b"; -import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslations } from "@spartacus/checkout/b2b/assets"; +import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslationsEn } from "@spartacus/checkout/b2b/assets"; import { CheckoutB2BRootModule } from "@spartacus/checkout/b2b/root"; import { CheckoutModule } from "@spartacus/checkout/base"; -import { checkoutTranslationChunksConfig, checkoutTranslations } from "@spartacus/checkout/base/assets"; +import { checkoutTranslationChunksConfig, checkoutTranslationsEn } from "@spartacus/checkout/base/assets"; import { CheckoutRootModule } from "@spartacus/checkout/base/root"; import { CheckoutScheduledReplenishmentModule } from "@spartacus/checkout/scheduled-replenishment"; -import { checkoutScheduledReplenishmentTranslationChunksConfig, checkoutScheduledReplenishmentTranslations } from "@spartacus/checkout/scheduled-replenishment/assets"; +import { checkoutScheduledReplenishmentTranslationChunksConfig, checkoutScheduledReplenishmentTranslationsEn } from "@spartacus/checkout/scheduled-replenishment/assets"; import { CheckoutScheduledReplenishmentRootModule } from "@spartacus/checkout/scheduled-replenishment/root"; import { I18nConfig, provideConfig } from "@spartacus/core"; @@ -467,19 +467,19 @@ import { I18nConfig, provideConfig } from "@spartacus/core"; ], providers: [provideConfig({ i18n: { - resources: checkoutTranslations, + resources: { en: checkoutTranslationsEn }, chunks: checkoutTranslationChunksConfig, }, }), provideConfig({ i18n: { - resources: checkoutB2BTranslations, + resources: { en: checkoutB2BTranslationsEn }, chunks: checkoutB2BTranslationChunksConfig, }, }), provideConfig({ i18n: { - resources: checkoutScheduledReplenishmentTranslations, + resources: { en: checkoutScheduledReplenishmentTranslationsEn }, chunks: checkoutScheduledReplenishmentTranslationChunksConfig, }, }) @@ -491,7 +491,7 @@ export class CheckoutFeatureModule { } exports[`Spartacus Checkout schematics: ng-add Checkout feature scheduled replenishment general setup b2b features configuration should be added 1`] = ` "import { NgModule } from '@angular/core'; -import { translationChunksConfig, translations } from "@spartacus/assets"; +import { translationChunksConfig, translationsEn } from "@spartacus/assets"; import { FeaturesConfig, I18nConfig, OccConfig, provideConfig, SiteContextConfig } from "@spartacus/core"; import { defaultB2bOccConfig } from "@spartacus/setup"; import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacus/storefront"; @@ -510,7 +510,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu context: {}, }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunksConfig, fallbackLang: 'en' }, @@ -526,11 +526,11 @@ export class SpartacusConfigurationModule { } exports[`Spartacus Checkout schematics: ng-add Checkout feature scheduled replenishment general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; -import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslations } from "@spartacus/checkout/b2b/assets"; +import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslationsEn } from "@spartacus/checkout/b2b/assets"; import { CheckoutB2BRootModule } from "@spartacus/checkout/b2b/root"; -import { checkoutTranslationChunksConfig, checkoutTranslations } from "@spartacus/checkout/base/assets"; +import { checkoutTranslationChunksConfig, checkoutTranslationsEn } from "@spartacus/checkout/base/assets"; import { CHECKOUT_FEATURE, CheckoutRootModule } from "@spartacus/checkout/base/root"; -import { checkoutScheduledReplenishmentTranslationChunksConfig, checkoutScheduledReplenishmentTranslations } from "@spartacus/checkout/scheduled-replenishment/assets"; +import { checkoutScheduledReplenishmentTranslationChunksConfig, checkoutScheduledReplenishmentTranslationsEn } from "@spartacus/checkout/scheduled-replenishment/assets"; import { CheckoutScheduledReplenishmentRootModule } from "@spartacus/checkout/scheduled-replenishment/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @@ -551,19 +551,19 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: checkoutTranslations, + resources: { en: checkoutTranslationsEn }, chunks: checkoutTranslationChunksConfig, }, }), provideConfig({ i18n: { - resources: checkoutB2BTranslations, + resources: { en: checkoutB2BTranslationsEn }, chunks: checkoutB2BTranslationChunksConfig, }, }), provideConfig({ i18n: { - resources: checkoutScheduledReplenishmentTranslations, + resources: { en: checkoutScheduledReplenishmentTranslationsEn }, chunks: checkoutScheduledReplenishmentTranslationChunksConfig, }, }) diff --git a/feature-libs/customer-ticketing/assets/public_api.ts b/feature-libs/customer-ticketing/assets/public_api.ts index 0784e372a0d..fe22f0eed6e 100644 --- a/feature-libs/customer-ticketing/assets/public_api.ts +++ b/feature-libs/customer-ticketing/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { customerTicketingTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: customerTicketingTranslations + * + resources: { en: customerTicketingTranslationsEn } + * } + * ``` + */ +export const customerTicketingTranslations = { + en: customerTicketingTranslationsEn, +}; diff --git a/feature-libs/customer-ticketing/assets/translations/cs/index.ts b/feature-libs/customer-ticketing/assets/translations/cs/index.ts new file mode 100644 index 00000000000..52cfcb7462a --- /dev/null +++ b/feature-libs/customer-ticketing/assets/translations/cs/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import customerTicketing from './customerTicketing.json'; +import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; +export const cs = { + customerTicketing, + myAccountV2CustomerTicketing, +}; diff --git a/feature-libs/customer-ticketing/assets/translations/de/index.ts b/feature-libs/customer-ticketing/assets/translations/de/index.ts index 3ad34698467..5e1578afdc7 100644 --- a/feature-libs/customer-ticketing/assets/translations/de/index.ts +++ b/feature-libs/customer-ticketing/assets/translations/de/index.ts @@ -6,7 +6,6 @@ import customerTicketing from './customerTicketing.json'; import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; - export const de = { customerTicketing, myAccountV2CustomerTicketing, diff --git a/feature-libs/customer-ticketing/assets/translations/en/index.ts b/feature-libs/customer-ticketing/assets/translations/en/index.ts index 612aee98628..53b67f67d46 100644 --- a/feature-libs/customer-ticketing/assets/translations/en/index.ts +++ b/feature-libs/customer-ticketing/assets/translations/en/index.ts @@ -6,7 +6,6 @@ import customerTicketing from './customerTicketing.json'; import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; - export const en = { customerTicketing, myAccountV2CustomerTicketing, diff --git a/feature-libs/customer-ticketing/assets/translations/es/index.ts b/feature-libs/customer-ticketing/assets/translations/es/index.ts new file mode 100644 index 00000000000..54cfb238167 --- /dev/null +++ b/feature-libs/customer-ticketing/assets/translations/es/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import customerTicketing from './customerTicketing.json'; +import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; +export const es = { + customerTicketing, + myAccountV2CustomerTicketing, +}; diff --git a/feature-libs/customer-ticketing/assets/translations/es_CO/index.ts b/feature-libs/customer-ticketing/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..567c2eb63f1 --- /dev/null +++ b/feature-libs/customer-ticketing/assets/translations/es_CO/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import customerTicketing from './customerTicketing.json'; +import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; +export const es_CO = { + customerTicketing, + myAccountV2CustomerTicketing, +}; diff --git a/feature-libs/customer-ticketing/assets/translations/fr/index.ts b/feature-libs/customer-ticketing/assets/translations/fr/index.ts new file mode 100644 index 00000000000..3fdfb26c38f --- /dev/null +++ b/feature-libs/customer-ticketing/assets/translations/fr/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import customerTicketing from './customerTicketing.json'; +import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; +export const fr = { + customerTicketing, + myAccountV2CustomerTicketing, +}; diff --git a/feature-libs/customer-ticketing/assets/translations/hi/index.ts b/feature-libs/customer-ticketing/assets/translations/hi/index.ts new file mode 100644 index 00000000000..3b124fb06e1 --- /dev/null +++ b/feature-libs/customer-ticketing/assets/translations/hi/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import customerTicketing from './customerTicketing.json'; +import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; +export const hi = { + customerTicketing, + myAccountV2CustomerTicketing, +}; diff --git a/feature-libs/customer-ticketing/assets/translations/hu/index.ts b/feature-libs/customer-ticketing/assets/translations/hu/index.ts new file mode 100644 index 00000000000..5c3062d4a0e --- /dev/null +++ b/feature-libs/customer-ticketing/assets/translations/hu/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import customerTicketing from './customerTicketing.json'; +import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; +export const hu = { + customerTicketing, + myAccountV2CustomerTicketing, +}; diff --git a/feature-libs/customer-ticketing/assets/translations/id/index.ts b/feature-libs/customer-ticketing/assets/translations/id/index.ts new file mode 100644 index 00000000000..16229c65ad9 --- /dev/null +++ b/feature-libs/customer-ticketing/assets/translations/id/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import customerTicketing from './customerTicketing.json'; +import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; +export const id = { + customerTicketing, + myAccountV2CustomerTicketing, +}; diff --git a/feature-libs/customer-ticketing/assets/translations/it/index.ts b/feature-libs/customer-ticketing/assets/translations/it/index.ts new file mode 100644 index 00000000000..74e3bff4763 --- /dev/null +++ b/feature-libs/customer-ticketing/assets/translations/it/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import customerTicketing from './customerTicketing.json'; +import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; +export const it = { + customerTicketing, + myAccountV2CustomerTicketing, +}; diff --git a/feature-libs/customer-ticketing/assets/translations/ja/index.ts b/feature-libs/customer-ticketing/assets/translations/ja/index.ts index 8b5ff7a4c0e..492ef2d5c84 100644 --- a/feature-libs/customer-ticketing/assets/translations/ja/index.ts +++ b/feature-libs/customer-ticketing/assets/translations/ja/index.ts @@ -6,7 +6,6 @@ import customerTicketing from './customerTicketing.json'; import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; - export const ja = { customerTicketing, myAccountV2CustomerTicketing, diff --git a/feature-libs/customer-ticketing/assets/translations/ko/index.ts b/feature-libs/customer-ticketing/assets/translations/ko/index.ts new file mode 100644 index 00000000000..d5158c2479a --- /dev/null +++ b/feature-libs/customer-ticketing/assets/translations/ko/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import customerTicketing from './customerTicketing.json'; +import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; +export const ko = { + customerTicketing, + myAccountV2CustomerTicketing, +}; diff --git a/feature-libs/customer-ticketing/assets/translations/pl/index.ts b/feature-libs/customer-ticketing/assets/translations/pl/index.ts new file mode 100644 index 00000000000..88acc0f9c28 --- /dev/null +++ b/feature-libs/customer-ticketing/assets/translations/pl/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import customerTicketing from './customerTicketing.json'; +import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; +export const pl = { + customerTicketing, + myAccountV2CustomerTicketing, +}; diff --git a/feature-libs/customer-ticketing/assets/translations/pt/index.ts b/feature-libs/customer-ticketing/assets/translations/pt/index.ts new file mode 100644 index 00000000000..ef2be39546d --- /dev/null +++ b/feature-libs/customer-ticketing/assets/translations/pt/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import customerTicketing from './customerTicketing.json'; +import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; +export const pt = { + customerTicketing, + myAccountV2CustomerTicketing, +}; diff --git a/feature-libs/customer-ticketing/assets/translations/ru/index.ts b/feature-libs/customer-ticketing/assets/translations/ru/index.ts new file mode 100644 index 00000000000..162702b4d97 --- /dev/null +++ b/feature-libs/customer-ticketing/assets/translations/ru/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import customerTicketing from './customerTicketing.json'; +import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; +export const ru = { + customerTicketing, + myAccountV2CustomerTicketing, +}; diff --git a/feature-libs/customer-ticketing/assets/translations/translations.ts b/feature-libs/customer-ticketing/assets/translations/translations.ts index 7e4eb676bd7..eac861d1769 100644 --- a/feature-libs/customer-ticketing/assets/translations/translations.ts +++ b/feature-libs/customer-ticketing/assets/translations/translations.ts @@ -4,26 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const customerTicketingTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const customerTicketingTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const customerTicketingTranslationChunksConfig: TranslationChunksConfig = - { - customerTicketing: [ - 'customerTicketing', - 'customerTicketingList', - 'createCustomerTicket', - 'customerTicketingDetails', - ], - myAccountV2CustomerTicketing: ['myAccountV2CustomerTicketing'], - }; +export { cs as customerTicketingTranslationsCs } from './cs/index'; +export { de as customerTicketingTranslationsDe } from './de/index'; +export { en as customerTicketingTranslationsEn } from './en/index'; +export { es as customerTicketingTranslationsEs } from './es/index'; +export { es_CO as customerTicketingTranslationsEs_CO } from './es_CO/index'; +export { fr as customerTicketingTranslationsFr } from './fr/index'; +export { hi as customerTicketingTranslationsHi } from './hi/index'; +export { hu as customerTicketingTranslationsHu } from './hu/index'; +export { id as customerTicketingTranslationsId } from './id/index'; +export { it as customerTicketingTranslationsIt } from './it/index'; +export { ja as customerTicketingTranslationsJa } from './ja/index'; +export { ko as customerTicketingTranslationsKo } from './ko/index'; +export { pl as customerTicketingTranslationsPl } from './pl/index'; +export { pt as customerTicketingTranslationsPt } from './pt/index'; +export { ru as customerTicketingTranslationsRu } from './ru/index'; +export { zh as customerTicketingTranslationsZh } from './zh/index'; +export { zh_TW as customerTicketingTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/customer-ticketing/assets/translations/zh/index.ts b/feature-libs/customer-ticketing/assets/translations/zh/index.ts index 8b94f474aa3..2964964753b 100644 --- a/feature-libs/customer-ticketing/assets/translations/zh/index.ts +++ b/feature-libs/customer-ticketing/assets/translations/zh/index.ts @@ -6,7 +6,6 @@ import customerTicketing from './customerTicketing.json'; import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; - export const zh = { customerTicketing, myAccountV2CustomerTicketing, diff --git a/feature-libs/customer-ticketing/assets/translations/zh_TW/index.ts b/feature-libs/customer-ticketing/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..0a9466e7f6e --- /dev/null +++ b/feature-libs/customer-ticketing/assets/translations/zh_TW/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import customerTicketing from './customerTicketing.json'; +import myAccountV2CustomerTicketing from './myAccountV2CustomerTicketing.json'; +export const zh_TW = { + customerTicketing, + myAccountV2CustomerTicketing, +}; diff --git a/feature-libs/customer-ticketing/schematics/add-customer-ticketing/__snapshots__/index_spec.ts.snap b/feature-libs/customer-ticketing/schematics/add-customer-ticketing/__snapshots__/index_spec.ts.snap index 2383acf1b7d..6f7bc9ac7b8 100644 --- a/feature-libs/customer-ticketing/schematics/add-customer-ticketing/__snapshots__/index_spec.ts.snap +++ b/feature-libs/customer-ticketing/schematics/add-customer-ticketing/__snapshots__/index_spec.ts.snap @@ -4,7 +4,7 @@ exports[`Spartacus Customer Ticketing schematics: ng-add Customer Ticketing feat "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { CustomerTicketingModule } from "@spartacus/customer-ticketing"; -import { customerTicketingTranslationChunksConfig, customerTicketingTranslations } from "@spartacus/customer-ticketing/assets"; +import { customerTicketingTranslationChunksConfig, customerTicketingTranslationsEn } from "@spartacus/customer-ticketing/assets"; import { CustomerTicketingRootModule } from "@spartacus/customer-ticketing/root"; @NgModule({ @@ -15,7 +15,7 @@ import { CustomerTicketingRootModule } from "@spartacus/customer-ticketing/root" ], providers: [provideConfig({ i18n: { - resources: customerTicketingTranslations, + resources: { en: customerTicketingTranslationsEn }, chunks: customerTicketingTranslationChunksConfig, }, })] @@ -27,7 +27,7 @@ export class CustomerTicketingFeatureModule { } exports[`Spartacus Customer Ticketing schematics: ng-add Customer Ticketing feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { customerTicketingTranslationChunksConfig, customerTicketingTranslations } from "@spartacus/customer-ticketing/assets"; +import { customerTicketingTranslationChunksConfig, customerTicketingTranslationsEn } from "@spartacus/customer-ticketing/assets"; import { CUSTOMER_TICKETING_FEATURE, CustomerTicketingRootModule } from "@spartacus/customer-ticketing/root"; @NgModule({ @@ -45,7 +45,7 @@ import { CUSTOMER_TICKETING_FEATURE, CustomerTicketingRootModule } from "@sparta }), provideConfig({ i18n: { - resources: customerTicketingTranslations, + resources: { en: customerTicketingTranslationsEn }, chunks: customerTicketingTranslationChunksConfig, }, }) diff --git a/feature-libs/estimated-delivery-date/assets/public_api.ts b/feature-libs/estimated-delivery-date/assets/public_api.ts index 0784e372a0d..0c73fdca2ce 100644 --- a/feature-libs/estimated-delivery-date/assets/public_api.ts +++ b/feature-libs/estimated-delivery-date/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { estimatedDeliveryDateTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: estimatedDeliveryDateTranslations + * + resources: { en: estimatedDeliveryDateTranslationsEn } + * } + * ``` + */ +export const estimatedDeliveryDateTranslations = { + en: estimatedDeliveryDateTranslationsEn, +}; diff --git a/feature-libs/estimated-delivery-date/assets/translations/cs/index.ts b/feature-libs/estimated-delivery-date/assets/translations/cs/index.ts new file mode 100644 index 00000000000..b1cb5fa4fc7 --- /dev/null +++ b/feature-libs/estimated-delivery-date/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import estimatedDeliveryDate from './estimatedDeliveryDate.json'; +export const cs = { + estimatedDeliveryDate, +}; diff --git a/feature-libs/estimated-delivery-date/assets/translations/de/index.ts b/feature-libs/estimated-delivery-date/assets/translations/de/index.ts index c8140b26611..2774225b047 100644 --- a/feature-libs/estimated-delivery-date/assets/translations/de/index.ts +++ b/feature-libs/estimated-delivery-date/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import estimatedDeliveryDate from './estimatedDeliveryDate.json'; - export const de = { estimatedDeliveryDate, }; diff --git a/feature-libs/estimated-delivery-date/assets/translations/en/index.ts b/feature-libs/estimated-delivery-date/assets/translations/en/index.ts index 420f9922d36..2784c30cc8e 100644 --- a/feature-libs/estimated-delivery-date/assets/translations/en/index.ts +++ b/feature-libs/estimated-delivery-date/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import estimatedDeliveryDate from './estimatedDeliveryDate.json'; - export const en = { estimatedDeliveryDate, }; diff --git a/feature-libs/estimated-delivery-date/assets/translations/es/index.ts b/feature-libs/estimated-delivery-date/assets/translations/es/index.ts new file mode 100644 index 00000000000..33a853744cb --- /dev/null +++ b/feature-libs/estimated-delivery-date/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import estimatedDeliveryDate from './estimatedDeliveryDate.json'; +export const es = { + estimatedDeliveryDate, +}; diff --git a/feature-libs/estimated-delivery-date/assets/translations/es_CO/index.ts b/feature-libs/estimated-delivery-date/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..480fdfa93c3 --- /dev/null +++ b/feature-libs/estimated-delivery-date/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import estimatedDeliveryDate from './estimatedDeliveryDate.json'; +export const es_CO = { + estimatedDeliveryDate, +}; diff --git a/feature-libs/estimated-delivery-date/assets/translations/fr/index.ts b/feature-libs/estimated-delivery-date/assets/translations/fr/index.ts new file mode 100644 index 00000000000..2bb880e14d6 --- /dev/null +++ b/feature-libs/estimated-delivery-date/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import estimatedDeliveryDate from './estimatedDeliveryDate.json'; +export const fr = { + estimatedDeliveryDate, +}; diff --git a/feature-libs/estimated-delivery-date/assets/translations/hi/index.ts b/feature-libs/estimated-delivery-date/assets/translations/hi/index.ts new file mode 100644 index 00000000000..aa69ac1d494 --- /dev/null +++ b/feature-libs/estimated-delivery-date/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import estimatedDeliveryDate from './estimatedDeliveryDate.json'; +export const hi = { + estimatedDeliveryDate, +}; diff --git a/feature-libs/estimated-delivery-date/assets/translations/hu/index.ts b/feature-libs/estimated-delivery-date/assets/translations/hu/index.ts new file mode 100644 index 00000000000..d5363449502 --- /dev/null +++ b/feature-libs/estimated-delivery-date/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import estimatedDeliveryDate from './estimatedDeliveryDate.json'; +export const hu = { + estimatedDeliveryDate, +}; diff --git a/feature-libs/estimated-delivery-date/assets/translations/id/index.ts b/feature-libs/estimated-delivery-date/assets/translations/id/index.ts new file mode 100644 index 00000000000..fc63fb54f75 --- /dev/null +++ b/feature-libs/estimated-delivery-date/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import estimatedDeliveryDate from './estimatedDeliveryDate.json'; +export const id = { + estimatedDeliveryDate, +}; diff --git a/feature-libs/estimated-delivery-date/assets/translations/it/index.ts b/feature-libs/estimated-delivery-date/assets/translations/it/index.ts new file mode 100644 index 00000000000..9472cf63f45 --- /dev/null +++ b/feature-libs/estimated-delivery-date/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import estimatedDeliveryDate from './estimatedDeliveryDate.json'; +export const it = { + estimatedDeliveryDate, +}; diff --git a/feature-libs/estimated-delivery-date/assets/translations/ja/index.ts b/feature-libs/estimated-delivery-date/assets/translations/ja/index.ts index 0c9aab68bef..570e5fe5831 100644 --- a/feature-libs/estimated-delivery-date/assets/translations/ja/index.ts +++ b/feature-libs/estimated-delivery-date/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import estimatedDeliveryDate from './estimatedDeliveryDate.json'; - export const ja = { estimatedDeliveryDate, }; diff --git a/feature-libs/estimated-delivery-date/assets/translations/ko/index.ts b/feature-libs/estimated-delivery-date/assets/translations/ko/index.ts new file mode 100644 index 00000000000..e0efdb57a37 --- /dev/null +++ b/feature-libs/estimated-delivery-date/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import estimatedDeliveryDate from './estimatedDeliveryDate.json'; +export const ko = { + estimatedDeliveryDate, +}; diff --git a/feature-libs/estimated-delivery-date/assets/translations/pl/index.ts b/feature-libs/estimated-delivery-date/assets/translations/pl/index.ts new file mode 100644 index 00000000000..1deffdabcd9 --- /dev/null +++ b/feature-libs/estimated-delivery-date/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import estimatedDeliveryDate from './estimatedDeliveryDate.json'; +export const pl = { + estimatedDeliveryDate, +}; diff --git a/feature-libs/estimated-delivery-date/assets/translations/pt/index.ts b/feature-libs/estimated-delivery-date/assets/translations/pt/index.ts new file mode 100644 index 00000000000..2b96b2ddbdb --- /dev/null +++ b/feature-libs/estimated-delivery-date/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import estimatedDeliveryDate from './estimatedDeliveryDate.json'; +export const pt = { + estimatedDeliveryDate, +}; diff --git a/feature-libs/estimated-delivery-date/assets/translations/ru/index.ts b/feature-libs/estimated-delivery-date/assets/translations/ru/index.ts new file mode 100644 index 00000000000..4cd64b5f48c --- /dev/null +++ b/feature-libs/estimated-delivery-date/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import estimatedDeliveryDate from './estimatedDeliveryDate.json'; +export const ru = { + estimatedDeliveryDate, +}; diff --git a/feature-libs/estimated-delivery-date/assets/translations/translations.ts b/feature-libs/estimated-delivery-date/assets/translations/translations.ts index 524f2fc8ae4..3d73d5bb1ac 100644 --- a/feature-libs/estimated-delivery-date/assets/translations/translations.ts +++ b/feature-libs/estimated-delivery-date/assets/translations/translations.ts @@ -4,20 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const estimatedDeliveryDateTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const estimatedDeliveryDateTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const estimatedDeliveryDateTranslationChunksConfig: TranslationChunksConfig = - { - estimatedDeliveryDate: ['estimatedDeliveryDate'], - }; +export { cs as estimatedDeliveryDateTranslationsCs } from './cs/index'; +export { de as estimatedDeliveryDateTranslationsDe } from './de/index'; +export { en as estimatedDeliveryDateTranslationsEn } from './en/index'; +export { es as estimatedDeliveryDateTranslationsEs } from './es/index'; +export { es_CO as estimatedDeliveryDateTranslationsEs_CO } from './es_CO/index'; +export { fr as estimatedDeliveryDateTranslationsFr } from './fr/index'; +export { hi as estimatedDeliveryDateTranslationsHi } from './hi/index'; +export { hu as estimatedDeliveryDateTranslationsHu } from './hu/index'; +export { id as estimatedDeliveryDateTranslationsId } from './id/index'; +export { it as estimatedDeliveryDateTranslationsIt } from './it/index'; +export { ja as estimatedDeliveryDateTranslationsJa } from './ja/index'; +export { ko as estimatedDeliveryDateTranslationsKo } from './ko/index'; +export { pl as estimatedDeliveryDateTranslationsPl } from './pl/index'; +export { pt as estimatedDeliveryDateTranslationsPt } from './pt/index'; +export { ru as estimatedDeliveryDateTranslationsRu } from './ru/index'; +export { zh as estimatedDeliveryDateTranslationsZh } from './zh/index'; +export { zh_TW as estimatedDeliveryDateTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/estimated-delivery-date/assets/translations/zh/index.ts b/feature-libs/estimated-delivery-date/assets/translations/zh/index.ts index e511af209f7..7ebd4803439 100644 --- a/feature-libs/estimated-delivery-date/assets/translations/zh/index.ts +++ b/feature-libs/estimated-delivery-date/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import estimatedDeliveryDate from './estimatedDeliveryDate.json'; - export const zh = { estimatedDeliveryDate, }; diff --git a/feature-libs/estimated-delivery-date/assets/translations/zh_TW/index.ts b/feature-libs/estimated-delivery-date/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..acc068e9b5d --- /dev/null +++ b/feature-libs/estimated-delivery-date/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import estimatedDeliveryDate from './estimatedDeliveryDate.json'; +export const zh_TW = { + estimatedDeliveryDate, +}; diff --git a/feature-libs/estimated-delivery-date/schematics/add-estimated-delivery-date/__snapshots__/index_spec.ts.snap b/feature-libs/estimated-delivery-date/schematics/add-estimated-delivery-date/__snapshots__/index_spec.ts.snap index d24f0558053..693450c53b8 100644 --- a/feature-libs/estimated-delivery-date/schematics/add-estimated-delivery-date/__snapshots__/index_spec.ts.snap +++ b/feature-libs/estimated-delivery-date/schematics/add-estimated-delivery-date/__snapshots__/index_spec.ts.snap @@ -3,7 +3,7 @@ exports[`Spartacus Estimated-Delivery-Date schematics: ng-add Estimated-Delivery-Date feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; -import { estimatedDeliveryDateTranslationChunksConfig, estimatedDeliveryDateTranslations } from "@spartacus/estimated-delivery-date/assets"; +import { estimatedDeliveryDateTranslationChunksConfig, estimatedDeliveryDateTranslationsEn } from "@spartacus/estimated-delivery-date/assets"; import { EstimatedDeliveryDateRootModule } from "@spartacus/estimated-delivery-date/root"; @NgModule({ @@ -13,7 +13,7 @@ import { EstimatedDeliveryDateRootModule } from "@spartacus/estimated-delivery-d ], providers: [provideConfig({ i18n: { - resources: estimatedDeliveryDateTranslations, + resources: { en: estimatedDeliveryDateTranslationsEn }, chunks: estimatedDeliveryDateTranslationChunksConfig, }, }) @@ -175,7 +175,7 @@ exports[`Spartacus Estimated-Delivery-Date schematics: ng-add eager loading shou "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { EstimatedDeliveryDateModule } from "@spartacus/estimated-delivery-date"; -import { estimatedDeliveryDateTranslationChunksConfig, estimatedDeliveryDateTranslations } from "@spartacus/estimated-delivery-date/assets"; +import { estimatedDeliveryDateTranslationChunksConfig, estimatedDeliveryDateTranslationsEn } from "@spartacus/estimated-delivery-date/assets"; import { EstimatedDeliveryDateRootModule } from "@spartacus/estimated-delivery-date/root"; @NgModule({ @@ -186,7 +186,7 @@ import { EstimatedDeliveryDateRootModule } from "@spartacus/estimated-delivery-d ], providers: [provideConfig({ i18n: { - resources: estimatedDeliveryDateTranslations, + resources: { en: estimatedDeliveryDateTranslationsEn }, chunks: estimatedDeliveryDateTranslationChunksConfig, }, })] diff --git a/feature-libs/order/assets/public_api.ts b/feature-libs/order/assets/public_api.ts index 0784e372a0d..37d5d5a38b7 100644 --- a/feature-libs/order/assets/public_api.ts +++ b/feature-libs/order/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { orderTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: orderTranslations + * + resources: { en: orderTranslationsEn } + * } + * ``` + */ +export const orderTranslations = { + en: orderTranslationsEn, +}; diff --git a/feature-libs/order/assets/translations/cs/index.ts b/feature-libs/order/assets/translations/cs/index.ts new file mode 100644 index 00000000000..a9250b63986 --- /dev/null +++ b/feature-libs/order/assets/translations/cs/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import myAccountV2Order from './myAccountV2Order.json'; +import order from './order.json'; +export const cs = { + myAccountV2Order, + order, +}; diff --git a/feature-libs/order/assets/translations/de/index.ts b/feature-libs/order/assets/translations/de/index.ts index 58de71b3282..602328342c4 100644 --- a/feature-libs/order/assets/translations/de/index.ts +++ b/feature-libs/order/assets/translations/de/index.ts @@ -6,8 +6,7 @@ import myAccountV2Order from './myAccountV2Order.json'; import order from './order.json'; - export const de = { - order, myAccountV2Order, + order, }; diff --git a/feature-libs/order/assets/translations/en/index.ts b/feature-libs/order/assets/translations/en/index.ts index cb4cd7d53bf..41a4f14fb32 100644 --- a/feature-libs/order/assets/translations/en/index.ts +++ b/feature-libs/order/assets/translations/en/index.ts @@ -6,8 +6,7 @@ import myAccountV2Order from './myAccountV2Order.json'; import order from './order.json'; - export const en = { - order, myAccountV2Order, + order, }; diff --git a/feature-libs/order/assets/translations/es/index.ts b/feature-libs/order/assets/translations/es/index.ts new file mode 100644 index 00000000000..f74206b98b6 --- /dev/null +++ b/feature-libs/order/assets/translations/es/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import myAccountV2Order from './myAccountV2Order.json'; +import order from './order.json'; +export const es = { + myAccountV2Order, + order, +}; diff --git a/feature-libs/order/assets/translations/es_CO/index.ts b/feature-libs/order/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..e4dbb737d33 --- /dev/null +++ b/feature-libs/order/assets/translations/es_CO/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import myAccountV2Order from './myAccountV2Order.json'; +import order from './order.json'; +export const es_CO = { + myAccountV2Order, + order, +}; diff --git a/feature-libs/order/assets/translations/fr/index.ts b/feature-libs/order/assets/translations/fr/index.ts new file mode 100644 index 00000000000..c3c61a36542 --- /dev/null +++ b/feature-libs/order/assets/translations/fr/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import myAccountV2Order from './myAccountV2Order.json'; +import order from './order.json'; +export const fr = { + myAccountV2Order, + order, +}; diff --git a/feature-libs/order/assets/translations/hi/index.ts b/feature-libs/order/assets/translations/hi/index.ts new file mode 100644 index 00000000000..4935347ddff --- /dev/null +++ b/feature-libs/order/assets/translations/hi/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import myAccountV2Order from './myAccountV2Order.json'; +import order from './order.json'; +export const hi = { + myAccountV2Order, + order, +}; diff --git a/feature-libs/order/assets/translations/hu/index.ts b/feature-libs/order/assets/translations/hu/index.ts new file mode 100644 index 00000000000..15a93828b8c --- /dev/null +++ b/feature-libs/order/assets/translations/hu/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import myAccountV2Order from './myAccountV2Order.json'; +import order from './order.json'; +export const hu = { + myAccountV2Order, + order, +}; diff --git a/feature-libs/order/assets/translations/id/index.ts b/feature-libs/order/assets/translations/id/index.ts new file mode 100644 index 00000000000..071afff75f8 --- /dev/null +++ b/feature-libs/order/assets/translations/id/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import myAccountV2Order from './myAccountV2Order.json'; +import order from './order.json'; +export const id = { + myAccountV2Order, + order, +}; diff --git a/feature-libs/order/assets/translations/it/index.ts b/feature-libs/order/assets/translations/it/index.ts new file mode 100644 index 00000000000..e2e51c04782 --- /dev/null +++ b/feature-libs/order/assets/translations/it/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import myAccountV2Order from './myAccountV2Order.json'; +import order from './order.json'; +export const it = { + myAccountV2Order, + order, +}; diff --git a/feature-libs/order/assets/translations/ja/index.ts b/feature-libs/order/assets/translations/ja/index.ts index 8df71003f09..38b66e39eb7 100644 --- a/feature-libs/order/assets/translations/ja/index.ts +++ b/feature-libs/order/assets/translations/ja/index.ts @@ -6,8 +6,7 @@ import myAccountV2Order from './myAccountV2Order.json'; import order from './order.json'; - export const ja = { - order, myAccountV2Order, + order, }; diff --git a/feature-libs/order/assets/translations/ko/index.ts b/feature-libs/order/assets/translations/ko/index.ts new file mode 100644 index 00000000000..c81fa694693 --- /dev/null +++ b/feature-libs/order/assets/translations/ko/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import myAccountV2Order from './myAccountV2Order.json'; +import order from './order.json'; +export const ko = { + myAccountV2Order, + order, +}; diff --git a/feature-libs/order/assets/translations/pl/index.ts b/feature-libs/order/assets/translations/pl/index.ts new file mode 100644 index 00000000000..6fe52309b7e --- /dev/null +++ b/feature-libs/order/assets/translations/pl/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import myAccountV2Order from './myAccountV2Order.json'; +import order from './order.json'; +export const pl = { + myAccountV2Order, + order, +}; diff --git a/feature-libs/order/assets/translations/pt/index.ts b/feature-libs/order/assets/translations/pt/index.ts new file mode 100644 index 00000000000..f7dcd898a22 --- /dev/null +++ b/feature-libs/order/assets/translations/pt/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import myAccountV2Order from './myAccountV2Order.json'; +import order from './order.json'; +export const pt = { + myAccountV2Order, + order, +}; diff --git a/feature-libs/order/assets/translations/ru/index.ts b/feature-libs/order/assets/translations/ru/index.ts new file mode 100644 index 00000000000..cf916cf6aa3 --- /dev/null +++ b/feature-libs/order/assets/translations/ru/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import myAccountV2Order from './myAccountV2Order.json'; +import order from './order.json'; +export const ru = { + myAccountV2Order, + order, +}; diff --git a/feature-libs/order/assets/translations/translations.ts b/feature-libs/order/assets/translations/translations.ts index 6594770f192..4e5cb482725 100644 --- a/feature-libs/order/assets/translations/translations.ts +++ b/feature-libs/order/assets/translations/translations.ts @@ -4,31 +4,24 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const orderTranslationChunksConfig = extractTranslationChunksConfig(en); -export const orderTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const orderTranslationChunksConfig: TranslationChunksConfig = { - order: [ - 'orderDetails', - 'orderHistory', - 'AccountOrderHistoryTabContainer', - 'returnRequestList', - 'returnRequest', - 'reorder', - ], - myAccountV2Order: [ - 'myAccountV2OrderHistory', - 'myAccountV2OrderDetails', - 'myAccountV2Orders', - ], -}; +export { cs as orderTranslationsCs } from './cs/index'; +export { de as orderTranslationsDe } from './de/index'; +export { en as orderTranslationsEn } from './en/index'; +export { es as orderTranslationsEs } from './es/index'; +export { es_CO as orderTranslationsEs_CO } from './es_CO/index'; +export { fr as orderTranslationsFr } from './fr/index'; +export { hi as orderTranslationsHi } from './hi/index'; +export { hu as orderTranslationsHu } from './hu/index'; +export { id as orderTranslationsId } from './id/index'; +export { it as orderTranslationsIt } from './it/index'; +export { ja as orderTranslationsJa } from './ja/index'; +export { ko as orderTranslationsKo } from './ko/index'; +export { pl as orderTranslationsPl } from './pl/index'; +export { pt as orderTranslationsPt } from './pt/index'; +export { ru as orderTranslationsRu } from './ru/index'; +export { zh as orderTranslationsZh } from './zh/index'; +export { zh_TW as orderTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/order/assets/translations/zh/index.ts b/feature-libs/order/assets/translations/zh/index.ts index 3a1895376a7..985cefc90fe 100644 --- a/feature-libs/order/assets/translations/zh/index.ts +++ b/feature-libs/order/assets/translations/zh/index.ts @@ -6,8 +6,7 @@ import myAccountV2Order from './myAccountV2Order.json'; import order from './order.json'; - export const zh = { - order, myAccountV2Order, + order, }; diff --git a/feature-libs/order/assets/translations/zh_TW/index.ts b/feature-libs/order/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..98663415ac7 --- /dev/null +++ b/feature-libs/order/assets/translations/zh_TW/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import myAccountV2Order from './myAccountV2Order.json'; +import order from './order.json'; +export const zh_TW = { + myAccountV2Order, + order, +}; diff --git a/feature-libs/order/schematics/add-order/__snapshots__/index_spec.ts.snap b/feature-libs/order/schematics/add-order/__snapshots__/index_spec.ts.snap index c2e1d0b9aa5..c5665a9371a 100644 --- a/feature-libs/order/schematics/add-order/__snapshots__/index_spec.ts.snap +++ b/feature-libs/order/schematics/add-order/__snapshots__/index_spec.ts.snap @@ -4,7 +4,7 @@ exports[`Spartacus Order schematics: ng-add Order feature eager loading should i "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { OrderModule } from "@spartacus/order"; -import { orderTranslationChunksConfig, orderTranslations } from "@spartacus/order/assets"; +import { orderTranslationChunksConfig, orderTranslationsEn } from "@spartacus/order/assets"; import { OrderRootModule } from "@spartacus/order/root"; @NgModule({ @@ -15,7 +15,7 @@ import { OrderRootModule } from "@spartacus/order/root"; ], providers: [provideConfig({ i18n: { - resources: orderTranslations, + resources: { en: orderTranslationsEn }, chunks: orderTranslationChunksConfig, }, })] @@ -27,7 +27,7 @@ export class OrderFeatureModule { } exports[`Spartacus Order schematics: ng-add Order feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { orderTranslationChunksConfig, orderTranslations } from "@spartacus/order/assets"; +import { orderTranslationChunksConfig, orderTranslationsEn } from "@spartacus/order/assets"; import { ORDER_FEATURE, OrderRootModule } from "@spartacus/order/root"; @NgModule({ @@ -45,7 +45,7 @@ import { ORDER_FEATURE, OrderRootModule } from "@spartacus/order/root"; }), provideConfig({ i18n: { - resources: orderTranslations, + resources: { en: orderTranslationsEn }, chunks: orderTranslationChunksConfig, }, }) diff --git a/feature-libs/organization/account-summary/assets/public_api.ts b/feature-libs/organization/account-summary/assets/public_api.ts index 0784e372a0d..5f7199b06b4 100644 --- a/feature-libs/organization/account-summary/assets/public_api.ts +++ b/feature-libs/organization/account-summary/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { accountSummaryTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: accountSummaryTranslations + * + resources: { en: accountSummaryTranslationsEn } + * } + * ``` + */ +export const accountSummaryTranslations = { + en: accountSummaryTranslationsEn, +}; diff --git a/feature-libs/organization/account-summary/assets/translations/cs/index.ts b/feature-libs/organization/account-summary/assets/translations/cs/index.ts new file mode 100644 index 00000000000..e488b77ef2c --- /dev/null +++ b/feature-libs/organization/account-summary/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import accountSummary from './accountSummary.json'; +export const cs = { + accountSummary, +}; diff --git a/feature-libs/organization/account-summary/assets/translations/de/index.ts b/feature-libs/organization/account-summary/assets/translations/de/index.ts index c933a863a98..4fd31ff20fd 100644 --- a/feature-libs/organization/account-summary/assets/translations/de/index.ts +++ b/feature-libs/organization/account-summary/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import accountSummary from './accountSummary.json'; - export const de = { accountSummary, }; diff --git a/feature-libs/organization/account-summary/assets/translations/en/index.ts b/feature-libs/organization/account-summary/assets/translations/en/index.ts index 5d29056f728..929d8d1f5d8 100644 --- a/feature-libs/organization/account-summary/assets/translations/en/index.ts +++ b/feature-libs/organization/account-summary/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import accountSummary from './accountSummary.json'; - export const en = { accountSummary, }; diff --git a/feature-libs/organization/account-summary/assets/translations/es/index.ts b/feature-libs/organization/account-summary/assets/translations/es/index.ts new file mode 100644 index 00000000000..422d776f3a4 --- /dev/null +++ b/feature-libs/organization/account-summary/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import accountSummary from './accountSummary.json'; +export const es = { + accountSummary, +}; diff --git a/feature-libs/organization/account-summary/assets/translations/es_CO/index.ts b/feature-libs/organization/account-summary/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..528107e1e82 --- /dev/null +++ b/feature-libs/organization/account-summary/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import accountSummary from './accountSummary.json'; +export const es_CO = { + accountSummary, +}; diff --git a/feature-libs/organization/account-summary/assets/translations/fr/index.ts b/feature-libs/organization/account-summary/assets/translations/fr/index.ts new file mode 100644 index 00000000000..5c392f290df --- /dev/null +++ b/feature-libs/organization/account-summary/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import accountSummary from './accountSummary.json'; +export const fr = { + accountSummary, +}; diff --git a/feature-libs/organization/account-summary/assets/translations/hi/index.ts b/feature-libs/organization/account-summary/assets/translations/hi/index.ts new file mode 100644 index 00000000000..6ed2d843783 --- /dev/null +++ b/feature-libs/organization/account-summary/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import accountSummary from './accountSummary.json'; +export const hi = { + accountSummary, +}; diff --git a/feature-libs/organization/account-summary/assets/translations/hu/index.ts b/feature-libs/organization/account-summary/assets/translations/hu/index.ts new file mode 100644 index 00000000000..636b162cd55 --- /dev/null +++ b/feature-libs/organization/account-summary/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import accountSummary from './accountSummary.json'; +export const hu = { + accountSummary, +}; diff --git a/feature-libs/organization/account-summary/assets/translations/id/index.ts b/feature-libs/organization/account-summary/assets/translations/id/index.ts new file mode 100644 index 00000000000..b8b8bdb4eee --- /dev/null +++ b/feature-libs/organization/account-summary/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import accountSummary from './accountSummary.json'; +export const id = { + accountSummary, +}; diff --git a/feature-libs/organization/account-summary/assets/translations/it/index.ts b/feature-libs/organization/account-summary/assets/translations/it/index.ts new file mode 100644 index 00000000000..0d75846c7f6 --- /dev/null +++ b/feature-libs/organization/account-summary/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import accountSummary from './accountSummary.json'; +export const it = { + accountSummary, +}; diff --git a/feature-libs/organization/account-summary/assets/translations/ja/index.ts b/feature-libs/organization/account-summary/assets/translations/ja/index.ts index 14ce1184107..d994d8b585f 100644 --- a/feature-libs/organization/account-summary/assets/translations/ja/index.ts +++ b/feature-libs/organization/account-summary/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import accountSummary from './accountSummary.json'; - export const ja = { accountSummary, }; diff --git a/feature-libs/organization/account-summary/assets/translations/ko/index.ts b/feature-libs/organization/account-summary/assets/translations/ko/index.ts new file mode 100644 index 00000000000..761186bc4e1 --- /dev/null +++ b/feature-libs/organization/account-summary/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import accountSummary from './accountSummary.json'; +export const ko = { + accountSummary, +}; diff --git a/feature-libs/organization/account-summary/assets/translations/pl/index.ts b/feature-libs/organization/account-summary/assets/translations/pl/index.ts new file mode 100644 index 00000000000..def5d109cca --- /dev/null +++ b/feature-libs/organization/account-summary/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import accountSummary from './accountSummary.json'; +export const pl = { + accountSummary, +}; diff --git a/feature-libs/organization/account-summary/assets/translations/pt/index.ts b/feature-libs/organization/account-summary/assets/translations/pt/index.ts new file mode 100644 index 00000000000..7358c4f08b9 --- /dev/null +++ b/feature-libs/organization/account-summary/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import accountSummary from './accountSummary.json'; +export const pt = { + accountSummary, +}; diff --git a/feature-libs/organization/account-summary/assets/translations/ru/index.ts b/feature-libs/organization/account-summary/assets/translations/ru/index.ts new file mode 100644 index 00000000000..5866cd279ce --- /dev/null +++ b/feature-libs/organization/account-summary/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import accountSummary from './accountSummary.json'; +export const ru = { + accountSummary, +}; diff --git a/feature-libs/organization/account-summary/assets/translations/translations.ts b/feature-libs/organization/account-summary/assets/translations/translations.ts index a2f30436e91..66bab9b8834 100644 --- a/feature-libs/organization/account-summary/assets/translations/translations.ts +++ b/feature-libs/organization/account-summary/assets/translations/translations.ts @@ -4,19 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; -import { en } from './en'; -import { ja } from './ja'; -import { de } from './de'; -import { zh } from './zh'; +import { en } from './en/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const accountSummaryTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const accountSummaryTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const accountSummaryTranslationChunksConfig: TranslationChunksConfig = { - accountSummary: ['orgAccountSummary', 'orgAccountSummaryList'], -}; +export { cs as accountSummaryTranslationsCs } from './cs/index'; +export { de as accountSummaryTranslationsDe } from './de/index'; +export { en as accountSummaryTranslationsEn } from './en/index'; +export { es as accountSummaryTranslationsEs } from './es/index'; +export { es_CO as accountSummaryTranslationsEs_CO } from './es_CO/index'; +export { fr as accountSummaryTranslationsFr } from './fr/index'; +export { hi as accountSummaryTranslationsHi } from './hi/index'; +export { hu as accountSummaryTranslationsHu } from './hu/index'; +export { id as accountSummaryTranslationsId } from './id/index'; +export { it as accountSummaryTranslationsIt } from './it/index'; +export { ja as accountSummaryTranslationsJa } from './ja/index'; +export { ko as accountSummaryTranslationsKo } from './ko/index'; +export { pl as accountSummaryTranslationsPl } from './pl/index'; +export { pt as accountSummaryTranslationsPt } from './pt/index'; +export { ru as accountSummaryTranslationsRu } from './ru/index'; +export { zh as accountSummaryTranslationsZh } from './zh/index'; +export { zh_TW as accountSummaryTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/organization/account-summary/assets/translations/zh/index.ts b/feature-libs/organization/account-summary/assets/translations/zh/index.ts index 51458edc70d..ebdff72ae1e 100644 --- a/feature-libs/organization/account-summary/assets/translations/zh/index.ts +++ b/feature-libs/organization/account-summary/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import accountSummary from './accountSummary.json'; - export const zh = { accountSummary, }; diff --git a/feature-libs/organization/account-summary/assets/translations/zh_TW/index.ts b/feature-libs/organization/account-summary/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..5f2043a4cc0 --- /dev/null +++ b/feature-libs/organization/account-summary/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import accountSummary from './accountSummary.json'; +export const zh_TW = { + accountSummary, +}; diff --git a/feature-libs/organization/administration/assets/public_api.ts b/feature-libs/organization/administration/assets/public_api.ts index 0784e372a0d..cddc3c681ec 100644 --- a/feature-libs/organization/administration/assets/public_api.ts +++ b/feature-libs/organization/administration/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { organizationTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: organizationTranslations + * + resources: { en: organizationTranslationsEn } + * } + * ``` + */ +export const organizationTranslations = { + en: organizationTranslationsEn, +}; diff --git a/feature-libs/organization/administration/assets/translations/cs/index.ts b/feature-libs/organization/administration/assets/translations/cs/index.ts new file mode 100644 index 00000000000..0c7e46012f5 --- /dev/null +++ b/feature-libs/organization/administration/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import organization from './organization.json'; +export const cs = { + organization, +}; diff --git a/feature-libs/organization/administration/assets/translations/de/index.ts b/feature-libs/organization/administration/assets/translations/de/index.ts index 8f57cee731c..ff804f12560 100644 --- a/feature-libs/organization/administration/assets/translations/de/index.ts +++ b/feature-libs/organization/administration/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import organization from './organization.json'; - export const de = { organization, }; diff --git a/feature-libs/organization/administration/assets/translations/en/index.ts b/feature-libs/organization/administration/assets/translations/en/index.ts index 6e516d22d62..121b54579de 100644 --- a/feature-libs/organization/administration/assets/translations/en/index.ts +++ b/feature-libs/organization/administration/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import organization from './organization.json'; - export const en = { organization, }; diff --git a/feature-libs/organization/administration/assets/translations/es/index.ts b/feature-libs/organization/administration/assets/translations/es/index.ts new file mode 100644 index 00000000000..d5da739cf88 --- /dev/null +++ b/feature-libs/organization/administration/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import organization from './organization.json'; +export const es = { + organization, +}; diff --git a/feature-libs/organization/administration/assets/translations/es_CO/index.ts b/feature-libs/organization/administration/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..7bd4dd91bfe --- /dev/null +++ b/feature-libs/organization/administration/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import organization from './organization.json'; +export const es_CO = { + organization, +}; diff --git a/feature-libs/organization/administration/assets/translations/fr/index.ts b/feature-libs/organization/administration/assets/translations/fr/index.ts new file mode 100644 index 00000000000..9150a577710 --- /dev/null +++ b/feature-libs/organization/administration/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import organization from './organization.json'; +export const fr = { + organization, +}; diff --git a/feature-libs/organization/administration/assets/translations/hi/index.ts b/feature-libs/organization/administration/assets/translations/hi/index.ts new file mode 100644 index 00000000000..da704448ae6 --- /dev/null +++ b/feature-libs/organization/administration/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import organization from './organization.json'; +export const hi = { + organization, +}; diff --git a/feature-libs/organization/administration/assets/translations/hu/index.ts b/feature-libs/organization/administration/assets/translations/hu/index.ts new file mode 100644 index 00000000000..335ec409f8d --- /dev/null +++ b/feature-libs/organization/administration/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import organization from './organization.json'; +export const hu = { + organization, +}; diff --git a/feature-libs/organization/administration/assets/translations/id/index.ts b/feature-libs/organization/administration/assets/translations/id/index.ts new file mode 100644 index 00000000000..748e7ecdb1b --- /dev/null +++ b/feature-libs/organization/administration/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import organization from './organization.json'; +export const id = { + organization, +}; diff --git a/feature-libs/organization/administration/assets/translations/it/index.ts b/feature-libs/organization/administration/assets/translations/it/index.ts new file mode 100644 index 00000000000..3cec6c3b2db --- /dev/null +++ b/feature-libs/organization/administration/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import organization from './organization.json'; +export const it = { + organization, +}; diff --git a/feature-libs/organization/administration/assets/translations/ja/index.ts b/feature-libs/organization/administration/assets/translations/ja/index.ts index 733c55a323b..0e68c7a85d9 100644 --- a/feature-libs/organization/administration/assets/translations/ja/index.ts +++ b/feature-libs/organization/administration/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import organization from './organization.json'; - export const ja = { organization, }; diff --git a/feature-libs/organization/administration/assets/translations/ko/index.ts b/feature-libs/organization/administration/assets/translations/ko/index.ts new file mode 100644 index 00000000000..585aa663e63 --- /dev/null +++ b/feature-libs/organization/administration/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import organization from './organization.json'; +export const ko = { + organization, +}; diff --git a/feature-libs/organization/administration/assets/translations/pl/index.ts b/feature-libs/organization/administration/assets/translations/pl/index.ts new file mode 100644 index 00000000000..05cafe9c451 --- /dev/null +++ b/feature-libs/organization/administration/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import organization from './organization.json'; +export const pl = { + organization, +}; diff --git a/feature-libs/organization/administration/assets/translations/pt/index.ts b/feature-libs/organization/administration/assets/translations/pt/index.ts new file mode 100644 index 00000000000..1e077f94da0 --- /dev/null +++ b/feature-libs/organization/administration/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import organization from './organization.json'; +export const pt = { + organization, +}; diff --git a/feature-libs/organization/administration/assets/translations/ru/index.ts b/feature-libs/organization/administration/assets/translations/ru/index.ts new file mode 100644 index 00000000000..6512187da6c --- /dev/null +++ b/feature-libs/organization/administration/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import organization from './organization.json'; +export const ru = { + organization, +}; diff --git a/feature-libs/organization/administration/assets/translations/translations.ts b/feature-libs/organization/administration/assets/translations/translations.ts index 153ec045e69..20be2e35ffc 100644 --- a/feature-libs/organization/administration/assets/translations/translations.ts +++ b/feature-libs/organization/administration/assets/translations/translations.ts @@ -4,50 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const organizationTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const organizationTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -// expose all translation chunk mapping for organization sub features -export const organizationTranslationChunksConfig: TranslationChunksConfig = { - organization: [ - 'orgBudget', - 'orgBudgetAssignedCostCenters', - 'orgCostCenter', - 'orgCostCenterBudgets', - 'orgCostCenterAssignedBudgets', - 'orgUnit', - 'orgUnitChildren', - 'orgUnitAssignedRoles', - 'orgUnitApprovers', - 'orgUnitAssignedApprovers', - 'orgUnitCostCenters', - 'orgUnitUsers', - 'orgUnitUserRoles', - 'orgUnitAssignedUsers', - 'orgUnitAddress', - - 'orgUserGroup', - 'orgUserGroupUsers', - 'orgUserGroupAssignedUsers', - 'orgUserGroupPermissions', - 'orgUserGroupAssignedPermissions', - 'orgUser', - 'orgUserApprovers', - 'orgUserAssignedApprovers', - 'orgUserPermissions', - 'orgUserAssignedPermissions', - 'orgUserUserGroups', - 'orgUserAssignedUserGroups', - 'orgPurchaseLimit', - ], -}; +export { cs as organizationTranslationsCs } from './cs/index'; +export { de as organizationTranslationsDe } from './de/index'; +export { en as organizationTranslationsEn } from './en/index'; +export { es as organizationTranslationsEs } from './es/index'; +export { es_CO as organizationTranslationsEs_CO } from './es_CO/index'; +export { fr as organizationTranslationsFr } from './fr/index'; +export { hi as organizationTranslationsHi } from './hi/index'; +export { hu as organizationTranslationsHu } from './hu/index'; +export { id as organizationTranslationsId } from './id/index'; +export { it as organizationTranslationsIt } from './it/index'; +export { ja as organizationTranslationsJa } from './ja/index'; +export { ko as organizationTranslationsKo } from './ko/index'; +export { pl as organizationTranslationsPl } from './pl/index'; +export { pt as organizationTranslationsPt } from './pt/index'; +export { ru as organizationTranslationsRu } from './ru/index'; +export { zh as organizationTranslationsZh } from './zh/index'; +export { zh_TW as organizationTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/organization/administration/assets/translations/zh/index.ts b/feature-libs/organization/administration/assets/translations/zh/index.ts index 5a2be0c5aaf..f493a20b232 100644 --- a/feature-libs/organization/administration/assets/translations/zh/index.ts +++ b/feature-libs/organization/administration/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import organization from './organization.json'; - export const zh = { organization, }; diff --git a/feature-libs/organization/administration/assets/translations/zh_TW/index.ts b/feature-libs/organization/administration/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..263e7bf1c4c --- /dev/null +++ b/feature-libs/organization/administration/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import organization from './organization.json'; +export const zh_TW = { + organization, +}; diff --git a/feature-libs/organization/order-approval/assets/public_api.ts b/feature-libs/organization/order-approval/assets/public_api.ts index 0784e372a0d..63475fbc4b9 100644 --- a/feature-libs/organization/order-approval/assets/public_api.ts +++ b/feature-libs/organization/order-approval/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { orderApprovalTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: orderApprovalTranslations + * + resources: { en: orderApprovalTranslationsEn } + * } + * ``` + */ +export const orderApprovalTranslations = { + en: orderApprovalTranslationsEn, +}; diff --git a/feature-libs/organization/order-approval/assets/translations/cs/index.ts b/feature-libs/organization/order-approval/assets/translations/cs/index.ts new file mode 100644 index 00000000000..764904267b2 --- /dev/null +++ b/feature-libs/organization/order-approval/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import orderApproval from './orderApproval.json'; +export const cs = { + orderApproval, +}; diff --git a/feature-libs/organization/order-approval/assets/translations/de/index.ts b/feature-libs/organization/order-approval/assets/translations/de/index.ts index 9e9292d4602..d454163a84a 100644 --- a/feature-libs/organization/order-approval/assets/translations/de/index.ts +++ b/feature-libs/organization/order-approval/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import orderApproval from './orderApproval.json'; - export const de = { orderApproval, }; diff --git a/feature-libs/organization/order-approval/assets/translations/en/index.ts b/feature-libs/organization/order-approval/assets/translations/en/index.ts index fbf91951465..6580b9ba60e 100644 --- a/feature-libs/organization/order-approval/assets/translations/en/index.ts +++ b/feature-libs/organization/order-approval/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import orderApproval from './orderApproval.json'; - export const en = { orderApproval, }; diff --git a/feature-libs/organization/order-approval/assets/translations/es/index.ts b/feature-libs/organization/order-approval/assets/translations/es/index.ts new file mode 100644 index 00000000000..9034dec64b8 --- /dev/null +++ b/feature-libs/organization/order-approval/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import orderApproval from './orderApproval.json'; +export const es = { + orderApproval, +}; diff --git a/feature-libs/organization/order-approval/assets/translations/es_CO/index.ts b/feature-libs/organization/order-approval/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..9b0bf5bc9c8 --- /dev/null +++ b/feature-libs/organization/order-approval/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import orderApproval from './orderApproval.json'; +export const es_CO = { + orderApproval, +}; diff --git a/feature-libs/organization/order-approval/assets/translations/fr/index.ts b/feature-libs/organization/order-approval/assets/translations/fr/index.ts new file mode 100644 index 00000000000..9de594e51ea --- /dev/null +++ b/feature-libs/organization/order-approval/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import orderApproval from './orderApproval.json'; +export const fr = { + orderApproval, +}; diff --git a/feature-libs/organization/order-approval/assets/translations/hi/index.ts b/feature-libs/organization/order-approval/assets/translations/hi/index.ts new file mode 100644 index 00000000000..ddefc89d7a5 --- /dev/null +++ b/feature-libs/organization/order-approval/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import orderApproval from './orderApproval.json'; +export const hi = { + orderApproval, +}; diff --git a/feature-libs/organization/order-approval/assets/translations/hu/index.ts b/feature-libs/organization/order-approval/assets/translations/hu/index.ts new file mode 100644 index 00000000000..5c0b8bbf5a2 --- /dev/null +++ b/feature-libs/organization/order-approval/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import orderApproval from './orderApproval.json'; +export const hu = { + orderApproval, +}; diff --git a/feature-libs/organization/order-approval/assets/translations/id/index.ts b/feature-libs/organization/order-approval/assets/translations/id/index.ts new file mode 100644 index 00000000000..40cd0e6b087 --- /dev/null +++ b/feature-libs/organization/order-approval/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import orderApproval from './orderApproval.json'; +export const id = { + orderApproval, +}; diff --git a/feature-libs/organization/order-approval/assets/translations/it/index.ts b/feature-libs/organization/order-approval/assets/translations/it/index.ts new file mode 100644 index 00000000000..1eb08893b6c --- /dev/null +++ b/feature-libs/organization/order-approval/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import orderApproval from './orderApproval.json'; +export const it = { + orderApproval, +}; diff --git a/feature-libs/organization/order-approval/assets/translations/ja/index.ts b/feature-libs/organization/order-approval/assets/translations/ja/index.ts index 74b6aa18e83..7dde64566e6 100644 --- a/feature-libs/organization/order-approval/assets/translations/ja/index.ts +++ b/feature-libs/organization/order-approval/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import orderApproval from './orderApproval.json'; - export const ja = { orderApproval, }; diff --git a/feature-libs/organization/order-approval/assets/translations/ko/index.ts b/feature-libs/organization/order-approval/assets/translations/ko/index.ts new file mode 100644 index 00000000000..264501740fa --- /dev/null +++ b/feature-libs/organization/order-approval/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import orderApproval from './orderApproval.json'; +export const ko = { + orderApproval, +}; diff --git a/feature-libs/organization/order-approval/assets/translations/pl/index.ts b/feature-libs/organization/order-approval/assets/translations/pl/index.ts new file mode 100644 index 00000000000..8310580d3ae --- /dev/null +++ b/feature-libs/organization/order-approval/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import orderApproval from './orderApproval.json'; +export const pl = { + orderApproval, +}; diff --git a/feature-libs/organization/order-approval/assets/translations/pt/index.ts b/feature-libs/organization/order-approval/assets/translations/pt/index.ts new file mode 100644 index 00000000000..c85e0f499cb --- /dev/null +++ b/feature-libs/organization/order-approval/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import orderApproval from './orderApproval.json'; +export const pt = { + orderApproval, +}; diff --git a/feature-libs/organization/order-approval/assets/translations/ru/index.ts b/feature-libs/organization/order-approval/assets/translations/ru/index.ts new file mode 100644 index 00000000000..f8d302a97f2 --- /dev/null +++ b/feature-libs/organization/order-approval/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import orderApproval from './orderApproval.json'; +export const ru = { + orderApproval, +}; diff --git a/feature-libs/organization/order-approval/assets/translations/translations.ts b/feature-libs/organization/order-approval/assets/translations/translations.ts index 72801feb932..12d1e9280b1 100644 --- a/feature-libs/organization/order-approval/assets/translations/translations.ts +++ b/feature-libs/organization/order-approval/assets/translations/translations.ts @@ -4,24 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const orderApprovalTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const orderApprovalTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -// expose all translation chunk mapping for orderApproval feature -export const orderApprovalTranslationChunksConfig: TranslationChunksConfig = { - orderApproval: [ - 'orderApprovalDetails', - 'orderApprovalList', - 'orderApprovalGlobal', - ], -}; +export { cs as orderApprovalTranslationsCs } from './cs/index'; +export { de as orderApprovalTranslationsDe } from './de/index'; +export { en as orderApprovalTranslationsEn } from './en/index'; +export { es as orderApprovalTranslationsEs } from './es/index'; +export { es_CO as orderApprovalTranslationsEs_CO } from './es_CO/index'; +export { fr as orderApprovalTranslationsFr } from './fr/index'; +export { hi as orderApprovalTranslationsHi } from './hi/index'; +export { hu as orderApprovalTranslationsHu } from './hu/index'; +export { id as orderApprovalTranslationsId } from './id/index'; +export { it as orderApprovalTranslationsIt } from './it/index'; +export { ja as orderApprovalTranslationsJa } from './ja/index'; +export { ko as orderApprovalTranslationsKo } from './ko/index'; +export { pl as orderApprovalTranslationsPl } from './pl/index'; +export { pt as orderApprovalTranslationsPt } from './pt/index'; +export { ru as orderApprovalTranslationsRu } from './ru/index'; +export { zh as orderApprovalTranslationsZh } from './zh/index'; +export { zh_TW as orderApprovalTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/organization/order-approval/assets/translations/zh/index.ts b/feature-libs/organization/order-approval/assets/translations/zh/index.ts index d8339f37785..1bea5bb8d4c 100644 --- a/feature-libs/organization/order-approval/assets/translations/zh/index.ts +++ b/feature-libs/organization/order-approval/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import orderApproval from './orderApproval.json'; - export const zh = { orderApproval, }; diff --git a/feature-libs/organization/order-approval/assets/translations/zh_TW/index.ts b/feature-libs/organization/order-approval/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..419bf746c32 --- /dev/null +++ b/feature-libs/organization/order-approval/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import orderApproval from './orderApproval.json'; +export const zh_TW = { + orderApproval, +}; diff --git a/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap b/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap index 6cdaf2a2d88..61080a3e307 100644 --- a/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap +++ b/feature-libs/organization/schematics/add-organization/__snapshots__/index_spec.ts.snap @@ -4,7 +4,7 @@ exports[`Spartacus Organization schematics: ng-add Account summary feature eager "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { AccountSummaryModule } from "@spartacus/organization/account-summary"; -import { accountSummaryTranslationChunksConfig, accountSummaryTranslations } from "@spartacus/organization/account-summary/assets"; +import { accountSummaryTranslationChunksConfig, accountSummaryTranslationsEn } from "@spartacus/organization/account-summary/assets"; import { AccountSummaryRootModule } from "@spartacus/organization/account-summary/root"; @NgModule({ @@ -15,7 +15,7 @@ import { AccountSummaryRootModule } from "@spartacus/organization/account-summar ], providers: [provideConfig({ i18n: { - resources: accountSummaryTranslations, + resources: { en: accountSummaryTranslationsEn }, chunks: accountSummaryTranslationChunksConfig, }, })] @@ -26,7 +26,7 @@ export class OrganizationAccountSummaryFeatureModule { } exports[`Spartacus Organization schematics: ng-add Account summary feature general setup b2b features configuration should be added 1`] = ` "import { NgModule } from '@angular/core'; -import { translationChunksConfig, translations } from "@spartacus/assets"; +import { translationChunksConfig, translationsEn } from "@spartacus/assets"; import { FeaturesConfig, I18nConfig, OccConfig, provideConfig, SiteContextConfig } from "@spartacus/core"; import { defaultB2bOccConfig } from "@spartacus/setup"; import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacus/storefront"; @@ -45,7 +45,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu context: {}, }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunksConfig, fallbackLang: 'en' }, @@ -62,7 +62,7 @@ export class SpartacusConfigurationModule { } exports[`Spartacus Organization schematics: ng-add Account summary feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { accountSummaryTranslationChunksConfig, accountSummaryTranslations } from "@spartacus/organization/account-summary/assets"; +import { accountSummaryTranslationChunksConfig, accountSummaryTranslationsEn } from "@spartacus/organization/account-summary/assets"; import { AccountSummaryRootModule, ORGANIZATION_ACCOUNT_SUMMARY_FEATURE } from "@spartacus/organization/account-summary/root"; @NgModule({ @@ -80,7 +80,7 @@ import { AccountSummaryRootModule, ORGANIZATION_ACCOUNT_SUMMARY_FEATURE } from " }), provideConfig({ i18n: { - resources: accountSummaryTranslations, + resources: { en: accountSummaryTranslationsEn }, chunks: accountSummaryTranslationChunksConfig, }, }) @@ -224,7 +224,7 @@ exports[`Spartacus Organization schematics: ng-add Administration feature eager "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { AdministrationModule } from "@spartacus/organization/administration"; -import { organizationTranslationChunksConfig, organizationTranslations } from "@spartacus/organization/administration/assets"; +import { organizationTranslationChunksConfig, organizationTranslationsEn } from "@spartacus/organization/administration/assets"; import { AdministrationRootModule } from "@spartacus/organization/administration/root"; @NgModule({ @@ -235,7 +235,7 @@ import { AdministrationRootModule } from "@spartacus/organization/administration ], providers: [provideConfig({ i18n: { - resources: organizationTranslations, + resources: { en: organizationTranslationsEn }, chunks: organizationTranslationChunksConfig, }, })] @@ -246,7 +246,7 @@ export class OrganizationAdministrationFeatureModule { } exports[`Spartacus Organization schematics: ng-add Administration feature general setup b2b features configuration should be added 1`] = ` "import { NgModule } from '@angular/core'; -import { translationChunksConfig, translations } from "@spartacus/assets"; +import { translationChunksConfig, translationsEn } from "@spartacus/assets"; import { FeaturesConfig, I18nConfig, OccConfig, provideConfig, SiteContextConfig } from "@spartacus/core"; import { defaultB2bOccConfig } from "@spartacus/setup"; import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacus/storefront"; @@ -265,7 +265,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu context: {}, }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunksConfig, fallbackLang: 'en' }, @@ -282,7 +282,7 @@ export class SpartacusConfigurationModule { } exports[`Spartacus Organization schematics: ng-add Administration feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { organizationTranslationChunksConfig, organizationTranslations } from "@spartacus/organization/administration/assets"; +import { organizationTranslationChunksConfig, organizationTranslationsEn } from "@spartacus/organization/administration/assets"; import { AdministrationRootModule, ORGANIZATION_ADMINISTRATION_FEATURE } from "@spartacus/organization/administration/root"; @NgModule({ @@ -300,7 +300,7 @@ import { AdministrationRootModule, ORGANIZATION_ADMINISTRATION_FEATURE } from "@ }), provideConfig({ i18n: { - resources: organizationTranslations, + resources: { en: organizationTranslationsEn }, chunks: organizationTranslationChunksConfig, }, }) @@ -444,7 +444,7 @@ exports[`Spartacus Organization schematics: ng-add Order approval feature eager "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { OrderApprovalModule } from "@spartacus/organization/order-approval"; -import { orderApprovalTranslationChunksConfig, orderApprovalTranslations } from "@spartacus/organization/order-approval/assets"; +import { orderApprovalTranslationChunksConfig, orderApprovalTranslationsEn } from "@spartacus/organization/order-approval/assets"; import { OrderApprovalRootModule } from "@spartacus/organization/order-approval/root"; @NgModule({ @@ -455,7 +455,7 @@ import { OrderApprovalRootModule } from "@spartacus/organization/order-approval/ ], providers: [provideConfig({ i18n: { - resources: orderApprovalTranslations, + resources: { en: orderApprovalTranslationsEn }, chunks: orderApprovalTranslationChunksConfig, }, })] @@ -466,7 +466,7 @@ export class OrganizationOrderApprovalFeatureModule { } exports[`Spartacus Organization schematics: ng-add Order approval feature general setup b2b features configuration should be added 1`] = ` "import { NgModule } from '@angular/core'; -import { translationChunksConfig, translations } from "@spartacus/assets"; +import { translationChunksConfig, translationsEn } from "@spartacus/assets"; import { FeaturesConfig, I18nConfig, OccConfig, provideConfig, SiteContextConfig } from "@spartacus/core"; import { defaultB2bOccConfig } from "@spartacus/setup"; import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacus/storefront"; @@ -485,7 +485,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu context: {}, }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunksConfig, fallbackLang: 'en' }, @@ -502,7 +502,7 @@ export class SpartacusConfigurationModule { } exports[`Spartacus Organization schematics: ng-add Order approval feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { orderApprovalTranslationChunksConfig, orderApprovalTranslations } from "@spartacus/organization/order-approval/assets"; +import { orderApprovalTranslationChunksConfig, orderApprovalTranslationsEn } from "@spartacus/organization/order-approval/assets"; import { OrderApprovalRootModule, ORGANIZATION_ORDER_APPROVAL_FEATURE } from "@spartacus/organization/order-approval/root"; @NgModule({ @@ -520,7 +520,7 @@ import { OrderApprovalRootModule, ORGANIZATION_ORDER_APPROVAL_FEATURE } from "@s }), provideConfig({ i18n: { - resources: orderApprovalTranslations, + resources: { en: orderApprovalTranslationsEn }, chunks: orderApprovalTranslationChunksConfig, }, }) @@ -664,7 +664,7 @@ exports[`Spartacus Organization schematics: ng-add Unit order feature eager load "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { UnitOrderModule } from "@spartacus/organization/unit-order"; -import { unitOrderTranslationChunksConfig, unitOrderTranslations } from "@spartacus/organization/unit-order/assets"; +import { unitOrderTranslationChunksConfig, unitOrderTranslationsEn } from "@spartacus/organization/unit-order/assets"; import { UnitOrderRootModule } from "@spartacus/organization/unit-order/root"; @NgModule({ @@ -675,7 +675,7 @@ import { UnitOrderRootModule } from "@spartacus/organization/unit-order/root"; ], providers: [provideConfig({ i18n: { - resources: unitOrderTranslations, + resources: { en: unitOrderTranslationsEn }, chunks: unitOrderTranslationChunksConfig, }, })] @@ -686,7 +686,7 @@ export class OrganizationUnitOrderFeatureModule { } exports[`Spartacus Organization schematics: ng-add Unit order feature general setup b2b features configuration should be added 1`] = ` "import { NgModule } from '@angular/core'; -import { translationChunksConfig, translations } from "@spartacus/assets"; +import { translationChunksConfig, translationsEn } from "@spartacus/assets"; import { FeaturesConfig, I18nConfig, OccConfig, provideConfig, SiteContextConfig } from "@spartacus/core"; import { defaultB2bOccConfig } from "@spartacus/setup"; import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacus/storefront"; @@ -705,7 +705,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu context: {}, }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunksConfig, fallbackLang: 'en' }, @@ -722,7 +722,7 @@ export class SpartacusConfigurationModule { } exports[`Spartacus Organization schematics: ng-add Unit order feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { unitOrderTranslationChunksConfig, unitOrderTranslations } from "@spartacus/organization/unit-order/assets"; +import { unitOrderTranslationChunksConfig, unitOrderTranslationsEn } from "@spartacus/organization/unit-order/assets"; import { ORGANIZATION_UNIT_ORDER_FEATURE, UnitOrderRootModule } from "@spartacus/organization/unit-order/root"; @NgModule({ @@ -740,7 +740,7 @@ import { ORGANIZATION_UNIT_ORDER_FEATURE, UnitOrderRootModule } from "@spartacus }), provideConfig({ i18n: { - resources: unitOrderTranslations, + resources: { en: unitOrderTranslationsEn }, chunks: unitOrderTranslationChunksConfig, }, }) @@ -884,7 +884,7 @@ exports[`Spartacus Organization schematics: ng-add User registration feature eag "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { OrganizationUserRegistrationModule } from "@spartacus/organization/user-registration"; -import { organizationUserRegistrationTranslationChunksConfig, organizationUserRegistrationTranslations } from "@spartacus/organization/user-registration/assets"; +import { organizationUserRegistrationTranslationChunksConfig, organizationUserRegistrationTranslationsEn } from "@spartacus/organization/user-registration/assets"; import { OrganizationUserRegistrationRootModule } from "@spartacus/organization/user-registration/root"; @NgModule({ @@ -895,7 +895,7 @@ import { OrganizationUserRegistrationRootModule } from "@spartacus/organization/ ], providers: [provideConfig({ i18n: { - resources: organizationUserRegistrationTranslations, + resources: { en: organizationUserRegistrationTranslationsEn }, chunks: organizationUserRegistrationTranslationChunksConfig, }, })] @@ -906,7 +906,7 @@ export class OrganizationUserRegistrationFeatureModule { } exports[`Spartacus Organization schematics: ng-add User registration feature general setup b2b features configuration should be added 1`] = ` "import { NgModule } from '@angular/core'; -import { translationChunksConfig, translations } from "@spartacus/assets"; +import { translationChunksConfig, translationsEn } from "@spartacus/assets"; import { FeaturesConfig, I18nConfig, OccConfig, provideConfig, SiteContextConfig } from "@spartacus/core"; import { defaultB2bOccConfig } from "@spartacus/setup"; import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacus/storefront"; @@ -925,7 +925,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu context: {}, }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunksConfig, fallbackLang: 'en' }, @@ -942,7 +942,7 @@ export class SpartacusConfigurationModule { } exports[`Spartacus Organization schematics: ng-add User registration feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { organizationUserRegistrationTranslationChunksConfig, organizationUserRegistrationTranslations } from "@spartacus/organization/user-registration/assets"; +import { organizationUserRegistrationTranslationChunksConfig, organizationUserRegistrationTranslationsEn } from "@spartacus/organization/user-registration/assets"; import { ORGANIZATION_USER_REGISTRATION_FEATURE, OrganizationUserRegistrationRootModule } from "@spartacus/organization/user-registration/root"; @NgModule({ @@ -960,7 +960,7 @@ import { ORGANIZATION_USER_REGISTRATION_FEATURE, OrganizationUserRegistrationRoo }), provideConfig({ i18n: { - resources: organizationUserRegistrationTranslations, + resources: { en: organizationUserRegistrationTranslationsEn }, chunks: organizationUserRegistrationTranslationChunksConfig, }, }) diff --git a/feature-libs/organization/unit-order/assets/public_api.ts b/feature-libs/organization/unit-order/assets/public_api.ts index 0784e372a0d..ca93cf5ebfb 100644 --- a/feature-libs/organization/unit-order/assets/public_api.ts +++ b/feature-libs/organization/unit-order/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { unitOrderTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: unitOrderTranslations + * + resources: { en: unitOrderTranslationsEn } + * } + * ``` + */ +export const unitOrderTranslations = { + en: unitOrderTranslationsEn, +}; diff --git a/feature-libs/organization/unit-order/assets/translations/cs/index.ts b/feature-libs/organization/unit-order/assets/translations/cs/index.ts new file mode 100644 index 00000000000..130c7b4894f --- /dev/null +++ b/feature-libs/organization/unit-order/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import unitOrder from './unitOrder.json'; +export const cs = { + unitOrder, +}; diff --git a/feature-libs/organization/unit-order/assets/translations/de/index.ts b/feature-libs/organization/unit-order/assets/translations/de/index.ts index ac023be881c..af50e3e6e8e 100644 --- a/feature-libs/organization/unit-order/assets/translations/de/index.ts +++ b/feature-libs/organization/unit-order/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import unitOrder from './unitOrder.json'; - export const de = { unitOrder, }; diff --git a/feature-libs/organization/unit-order/assets/translations/en/index.ts b/feature-libs/organization/unit-order/assets/translations/en/index.ts index 6cfc6285dc9..78af41b65a8 100644 --- a/feature-libs/organization/unit-order/assets/translations/en/index.ts +++ b/feature-libs/organization/unit-order/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import unitOrder from './unitOrder.json'; - export const en = { unitOrder, }; diff --git a/feature-libs/organization/unit-order/assets/translations/es/index.ts b/feature-libs/organization/unit-order/assets/translations/es/index.ts new file mode 100644 index 00000000000..d19acabd58f --- /dev/null +++ b/feature-libs/organization/unit-order/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import unitOrder from './unitOrder.json'; +export const es = { + unitOrder, +}; diff --git a/feature-libs/organization/unit-order/assets/translations/es_CO/index.ts b/feature-libs/organization/unit-order/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..f5c1f6f4c89 --- /dev/null +++ b/feature-libs/organization/unit-order/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import unitOrder from './unitOrder.json'; +export const es_CO = { + unitOrder, +}; diff --git a/feature-libs/organization/unit-order/assets/translations/fr/index.ts b/feature-libs/organization/unit-order/assets/translations/fr/index.ts new file mode 100644 index 00000000000..331e53c2f95 --- /dev/null +++ b/feature-libs/organization/unit-order/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import unitOrder from './unitOrder.json'; +export const fr = { + unitOrder, +}; diff --git a/feature-libs/organization/unit-order/assets/translations/hi/index.ts b/feature-libs/organization/unit-order/assets/translations/hi/index.ts new file mode 100644 index 00000000000..318e25bdcf9 --- /dev/null +++ b/feature-libs/organization/unit-order/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import unitOrder from './unitOrder.json'; +export const hi = { + unitOrder, +}; diff --git a/feature-libs/organization/unit-order/assets/translations/hu/index.ts b/feature-libs/organization/unit-order/assets/translations/hu/index.ts new file mode 100644 index 00000000000..7f725203a8a --- /dev/null +++ b/feature-libs/organization/unit-order/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import unitOrder from './unitOrder.json'; +export const hu = { + unitOrder, +}; diff --git a/feature-libs/organization/unit-order/assets/translations/id/index.ts b/feature-libs/organization/unit-order/assets/translations/id/index.ts new file mode 100644 index 00000000000..f7e3fb73688 --- /dev/null +++ b/feature-libs/organization/unit-order/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import unitOrder from './unitOrder.json'; +export const id = { + unitOrder, +}; diff --git a/feature-libs/organization/unit-order/assets/translations/it/index.ts b/feature-libs/organization/unit-order/assets/translations/it/index.ts new file mode 100644 index 00000000000..794aa17fb19 --- /dev/null +++ b/feature-libs/organization/unit-order/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import unitOrder from './unitOrder.json'; +export const it = { + unitOrder, +}; diff --git a/feature-libs/organization/unit-order/assets/translations/ja/index.ts b/feature-libs/organization/unit-order/assets/translations/ja/index.ts index 7a2eaa175b1..50f46cab3bb 100644 --- a/feature-libs/organization/unit-order/assets/translations/ja/index.ts +++ b/feature-libs/organization/unit-order/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import unitOrder from './unitOrder.json'; - export const ja = { unitOrder, }; diff --git a/feature-libs/organization/unit-order/assets/translations/ko/index.ts b/feature-libs/organization/unit-order/assets/translations/ko/index.ts new file mode 100644 index 00000000000..9c6b6b51214 --- /dev/null +++ b/feature-libs/organization/unit-order/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import unitOrder from './unitOrder.json'; +export const ko = { + unitOrder, +}; diff --git a/feature-libs/organization/unit-order/assets/translations/pl/index.ts b/feature-libs/organization/unit-order/assets/translations/pl/index.ts new file mode 100644 index 00000000000..1dae3bcdfb7 --- /dev/null +++ b/feature-libs/organization/unit-order/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import unitOrder from './unitOrder.json'; +export const pl = { + unitOrder, +}; diff --git a/feature-libs/organization/unit-order/assets/translations/pt/index.ts b/feature-libs/organization/unit-order/assets/translations/pt/index.ts new file mode 100644 index 00000000000..63dc3efb200 --- /dev/null +++ b/feature-libs/organization/unit-order/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import unitOrder from './unitOrder.json'; +export const pt = { + unitOrder, +}; diff --git a/feature-libs/organization/unit-order/assets/translations/ru/index.ts b/feature-libs/organization/unit-order/assets/translations/ru/index.ts new file mode 100644 index 00000000000..1fcc8613aa6 --- /dev/null +++ b/feature-libs/organization/unit-order/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import unitOrder from './unitOrder.json'; +export const ru = { + unitOrder, +}; diff --git a/feature-libs/organization/unit-order/assets/translations/translations.ts b/feature-libs/organization/unit-order/assets/translations/translations.ts index 025feba2aa9..14a389b29aa 100644 --- a/feature-libs/organization/unit-order/assets/translations/translations.ts +++ b/feature-libs/organization/unit-order/assets/translations/translations.ts @@ -4,24 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const unitOrderTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const unitOrderTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -// expose all translation chunk mapping for Unit-Level Order feature -export const unitOrderTranslationChunksConfig: TranslationChunksConfig = { - unitOrder: [ - 'unitLevelOrderHistory', - 'unitLevelOrderHistorySorting', - 'unitLevelOrderDetails', - ], -}; +export { cs as unitOrderTranslationsCs } from './cs/index'; +export { de as unitOrderTranslationsDe } from './de/index'; +export { en as unitOrderTranslationsEn } from './en/index'; +export { es as unitOrderTranslationsEs } from './es/index'; +export { es_CO as unitOrderTranslationsEs_CO } from './es_CO/index'; +export { fr as unitOrderTranslationsFr } from './fr/index'; +export { hi as unitOrderTranslationsHi } from './hi/index'; +export { hu as unitOrderTranslationsHu } from './hu/index'; +export { id as unitOrderTranslationsId } from './id/index'; +export { it as unitOrderTranslationsIt } from './it/index'; +export { ja as unitOrderTranslationsJa } from './ja/index'; +export { ko as unitOrderTranslationsKo } from './ko/index'; +export { pl as unitOrderTranslationsPl } from './pl/index'; +export { pt as unitOrderTranslationsPt } from './pt/index'; +export { ru as unitOrderTranslationsRu } from './ru/index'; +export { zh as unitOrderTranslationsZh } from './zh/index'; +export { zh_TW as unitOrderTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/organization/unit-order/assets/translations/zh/index.ts b/feature-libs/organization/unit-order/assets/translations/zh/index.ts index b2fe727a789..2db8241183d 100644 --- a/feature-libs/organization/unit-order/assets/translations/zh/index.ts +++ b/feature-libs/organization/unit-order/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import unitOrder from './unitOrder.json'; - export const zh = { unitOrder, }; diff --git a/feature-libs/organization/unit-order/assets/translations/zh_TW/index.ts b/feature-libs/organization/unit-order/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..62d60be5b60 --- /dev/null +++ b/feature-libs/organization/unit-order/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import unitOrder from './unitOrder.json'; +export const zh_TW = { + unitOrder, +}; diff --git a/feature-libs/organization/user-registration/assets/public_api.ts b/feature-libs/organization/user-registration/assets/public_api.ts index 0784e372a0d..2ff03fef2ce 100644 --- a/feature-libs/organization/user-registration/assets/public_api.ts +++ b/feature-libs/organization/user-registration/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { organizationUserRegistrationTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: organizationUserRegistrationTranslations + * + resources: { en: organizationUserRegistrationTranslationsEn } + * } + * ``` + */ +export const organizationUserRegistrationTranslations = { + en: organizationUserRegistrationTranslationsEn, +}; diff --git a/feature-libs/organization/user-registration/assets/translations/cs/index.ts b/feature-libs/organization/user-registration/assets/translations/cs/index.ts new file mode 100644 index 00000000000..e7331eb326a --- /dev/null +++ b/feature-libs/organization/user-registration/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userRegistration from './userRegistration.json'; +export const cs = { + userRegistration, +}; diff --git a/feature-libs/organization/user-registration/assets/translations/de/index.ts b/feature-libs/organization/user-registration/assets/translations/de/index.ts index 3caa6d7ed27..70985435f92 100644 --- a/feature-libs/organization/user-registration/assets/translations/de/index.ts +++ b/feature-libs/organization/user-registration/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import userRegistration from './userRegistration.json'; - export const de = { userRegistration, }; diff --git a/feature-libs/organization/user-registration/assets/translations/en/index.ts b/feature-libs/organization/user-registration/assets/translations/en/index.ts index d1470448bd5..6f4435fd5ab 100644 --- a/feature-libs/organization/user-registration/assets/translations/en/index.ts +++ b/feature-libs/organization/user-registration/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import userRegistration from './userRegistration.json'; - export const en = { userRegistration, }; diff --git a/feature-libs/organization/user-registration/assets/translations/es/index.ts b/feature-libs/organization/user-registration/assets/translations/es/index.ts new file mode 100644 index 00000000000..3c75eccec0f --- /dev/null +++ b/feature-libs/organization/user-registration/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userRegistration from './userRegistration.json'; +export const es = { + userRegistration, +}; diff --git a/feature-libs/organization/user-registration/assets/translations/es_CO/index.ts b/feature-libs/organization/user-registration/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..dde15f33714 --- /dev/null +++ b/feature-libs/organization/user-registration/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userRegistration from './userRegistration.json'; +export const es_CO = { + userRegistration, +}; diff --git a/feature-libs/organization/user-registration/assets/translations/fr/index.ts b/feature-libs/organization/user-registration/assets/translations/fr/index.ts new file mode 100644 index 00000000000..e3d5d0512ca --- /dev/null +++ b/feature-libs/organization/user-registration/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userRegistration from './userRegistration.json'; +export const fr = { + userRegistration, +}; diff --git a/feature-libs/organization/user-registration/assets/translations/hi/index.ts b/feature-libs/organization/user-registration/assets/translations/hi/index.ts new file mode 100644 index 00000000000..2f61c68c01a --- /dev/null +++ b/feature-libs/organization/user-registration/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userRegistration from './userRegistration.json'; +export const hi = { + userRegistration, +}; diff --git a/feature-libs/organization/user-registration/assets/translations/hu/index.ts b/feature-libs/organization/user-registration/assets/translations/hu/index.ts new file mode 100644 index 00000000000..f34d972451b --- /dev/null +++ b/feature-libs/organization/user-registration/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userRegistration from './userRegistration.json'; +export const hu = { + userRegistration, +}; diff --git a/feature-libs/organization/user-registration/assets/translations/id/index.ts b/feature-libs/organization/user-registration/assets/translations/id/index.ts new file mode 100644 index 00000000000..1459fc39dbb --- /dev/null +++ b/feature-libs/organization/user-registration/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userRegistration from './userRegistration.json'; +export const id = { + userRegistration, +}; diff --git a/feature-libs/organization/user-registration/assets/translations/it/index.ts b/feature-libs/organization/user-registration/assets/translations/it/index.ts new file mode 100644 index 00000000000..dac19dccd29 --- /dev/null +++ b/feature-libs/organization/user-registration/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userRegistration from './userRegistration.json'; +export const it = { + userRegistration, +}; diff --git a/feature-libs/organization/user-registration/assets/translations/ja/index.ts b/feature-libs/organization/user-registration/assets/translations/ja/index.ts index b3a9bd415b5..575eef2da78 100644 --- a/feature-libs/organization/user-registration/assets/translations/ja/index.ts +++ b/feature-libs/organization/user-registration/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import userRegistration from './userRegistration.json'; - export const ja = { userRegistration, }; diff --git a/feature-libs/organization/user-registration/assets/translations/ko/index.ts b/feature-libs/organization/user-registration/assets/translations/ko/index.ts new file mode 100644 index 00000000000..bc340d701de --- /dev/null +++ b/feature-libs/organization/user-registration/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userRegistration from './userRegistration.json'; +export const ko = { + userRegistration, +}; diff --git a/feature-libs/organization/user-registration/assets/translations/pl/index.ts b/feature-libs/organization/user-registration/assets/translations/pl/index.ts new file mode 100644 index 00000000000..8db211f278e --- /dev/null +++ b/feature-libs/organization/user-registration/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userRegistration from './userRegistration.json'; +export const pl = { + userRegistration, +}; diff --git a/feature-libs/organization/user-registration/assets/translations/pt/index.ts b/feature-libs/organization/user-registration/assets/translations/pt/index.ts new file mode 100644 index 00000000000..250a4351913 --- /dev/null +++ b/feature-libs/organization/user-registration/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userRegistration from './userRegistration.json'; +export const pt = { + userRegistration, +}; diff --git a/feature-libs/organization/user-registration/assets/translations/ru/index.ts b/feature-libs/organization/user-registration/assets/translations/ru/index.ts new file mode 100644 index 00000000000..cdd73f9d1a5 --- /dev/null +++ b/feature-libs/organization/user-registration/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userRegistration from './userRegistration.json'; +export const ru = { + userRegistration, +}; diff --git a/feature-libs/organization/user-registration/assets/translations/translations.ts b/feature-libs/organization/user-registration/assets/translations/translations.ts index c001f6f62cd..9be9bba52a4 100644 --- a/feature-libs/organization/user-registration/assets/translations/translations.ts +++ b/feature-libs/organization/user-registration/assets/translations/translations.ts @@ -4,20 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const organizationUserRegistrationTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const organizationUserRegistrationTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const organizationUserRegistrationTranslationChunksConfig: TranslationChunksConfig = - { - userRegistration: ['userRegistrationForm'], - }; +export { cs as organizationUserRegistrationTranslationsCs } from './cs/index'; +export { de as organizationUserRegistrationTranslationsDe } from './de/index'; +export { en as organizationUserRegistrationTranslationsEn } from './en/index'; +export { es as organizationUserRegistrationTranslationsEs } from './es/index'; +export { es_CO as organizationUserRegistrationTranslationsEs_CO } from './es_CO/index'; +export { fr as organizationUserRegistrationTranslationsFr } from './fr/index'; +export { hi as organizationUserRegistrationTranslationsHi } from './hi/index'; +export { hu as organizationUserRegistrationTranslationsHu } from './hu/index'; +export { id as organizationUserRegistrationTranslationsId } from './id/index'; +export { it as organizationUserRegistrationTranslationsIt } from './it/index'; +export { ja as organizationUserRegistrationTranslationsJa } from './ja/index'; +export { ko as organizationUserRegistrationTranslationsKo } from './ko/index'; +export { pl as organizationUserRegistrationTranslationsPl } from './pl/index'; +export { pt as organizationUserRegistrationTranslationsPt } from './pt/index'; +export { ru as organizationUserRegistrationTranslationsRu } from './ru/index'; +export { zh as organizationUserRegistrationTranslationsZh } from './zh/index'; +export { zh_TW as organizationUserRegistrationTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/organization/user-registration/assets/translations/zh/index.ts b/feature-libs/organization/user-registration/assets/translations/zh/index.ts index ded2c9bdb71..ccf9a4025e5 100644 --- a/feature-libs/organization/user-registration/assets/translations/zh/index.ts +++ b/feature-libs/organization/user-registration/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import userRegistration from './userRegistration.json'; - export const zh = { userRegistration, }; diff --git a/feature-libs/organization/user-registration/assets/translations/zh_TW/index.ts b/feature-libs/organization/user-registration/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..b7619103975 --- /dev/null +++ b/feature-libs/organization/user-registration/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userRegistration from './userRegistration.json'; +export const zh_TW = { + userRegistration, +}; diff --git a/feature-libs/pdf-invoices/assets/public_api.ts b/feature-libs/pdf-invoices/assets/public_api.ts index 0784e372a0d..3fcd4e0964b 100644 --- a/feature-libs/pdf-invoices/assets/public_api.ts +++ b/feature-libs/pdf-invoices/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { pdfInvoicesTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: pdfInvoicesTranslations + * + resources: { en: pdfInvoicesTranslationsEn } + * } + * ``` + */ +export const pdfInvoicesTranslations = { + en: pdfInvoicesTranslationsEn, +}; diff --git a/feature-libs/pdf-invoices/assets/translations/cs/index.ts b/feature-libs/pdf-invoices/assets/translations/cs/index.ts new file mode 100644 index 00000000000..539f1ae8806 --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pdfInvoices from './pdfInvoices.json'; +export const cs = { + pdfInvoices, +}; diff --git a/feature-libs/pdf-invoices/assets/translations/de/index.ts b/feature-libs/pdf-invoices/assets/translations/de/index.ts index 059f21d226a..7e3c7a87d4c 100644 --- a/feature-libs/pdf-invoices/assets/translations/de/index.ts +++ b/feature-libs/pdf-invoices/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import pdfInvoices from './pdfInvoices.json'; - export const de = { pdfInvoices, }; diff --git a/feature-libs/pdf-invoices/assets/translations/en/index.ts b/feature-libs/pdf-invoices/assets/translations/en/index.ts index c129c220d7f..08314a283f1 100644 --- a/feature-libs/pdf-invoices/assets/translations/en/index.ts +++ b/feature-libs/pdf-invoices/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import pdfInvoices from './pdfInvoices.json'; - export const en = { pdfInvoices, }; diff --git a/feature-libs/pdf-invoices/assets/translations/es/index.ts b/feature-libs/pdf-invoices/assets/translations/es/index.ts new file mode 100644 index 00000000000..aa38319bf5e --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pdfInvoices from './pdfInvoices.json'; +export const es = { + pdfInvoices, +}; diff --git a/feature-libs/pdf-invoices/assets/translations/es_CO/index.ts b/feature-libs/pdf-invoices/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..648477ebaf7 --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pdfInvoices from './pdfInvoices.json'; +export const es_CO = { + pdfInvoices, +}; diff --git a/feature-libs/pdf-invoices/assets/translations/fr/index.ts b/feature-libs/pdf-invoices/assets/translations/fr/index.ts new file mode 100644 index 00000000000..3eac736abee --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pdfInvoices from './pdfInvoices.json'; +export const fr = { + pdfInvoices, +}; diff --git a/feature-libs/pdf-invoices/assets/translations/hi/index.ts b/feature-libs/pdf-invoices/assets/translations/hi/index.ts new file mode 100644 index 00000000000..7c068cf6a8a --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pdfInvoices from './pdfInvoices.json'; +export const hi = { + pdfInvoices, +}; diff --git a/feature-libs/pdf-invoices/assets/translations/hu/index.ts b/feature-libs/pdf-invoices/assets/translations/hu/index.ts new file mode 100644 index 00000000000..a4d9c56d093 --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pdfInvoices from './pdfInvoices.json'; +export const hu = { + pdfInvoices, +}; diff --git a/feature-libs/pdf-invoices/assets/translations/id/index.ts b/feature-libs/pdf-invoices/assets/translations/id/index.ts new file mode 100644 index 00000000000..7e4f68f6045 --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pdfInvoices from './pdfInvoices.json'; +export const id = { + pdfInvoices, +}; diff --git a/feature-libs/pdf-invoices/assets/translations/it/index.ts b/feature-libs/pdf-invoices/assets/translations/it/index.ts new file mode 100644 index 00000000000..bc90abf3643 --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pdfInvoices from './pdfInvoices.json'; +export const it = { + pdfInvoices, +}; diff --git a/feature-libs/pdf-invoices/assets/translations/ja/index.ts b/feature-libs/pdf-invoices/assets/translations/ja/index.ts index 5a61b6813b2..85c30d9c45e 100644 --- a/feature-libs/pdf-invoices/assets/translations/ja/index.ts +++ b/feature-libs/pdf-invoices/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import pdfInvoices from './pdfInvoices.json'; - export const ja = { pdfInvoices, }; diff --git a/feature-libs/pdf-invoices/assets/translations/ko/index.ts b/feature-libs/pdf-invoices/assets/translations/ko/index.ts new file mode 100644 index 00000000000..2b04b7bc0c8 --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pdfInvoices from './pdfInvoices.json'; +export const ko = { + pdfInvoices, +}; diff --git a/feature-libs/pdf-invoices/assets/translations/pl/index.ts b/feature-libs/pdf-invoices/assets/translations/pl/index.ts new file mode 100644 index 00000000000..7b0ccf03b6e --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pdfInvoices from './pdfInvoices.json'; +export const pl = { + pdfInvoices, +}; diff --git a/feature-libs/pdf-invoices/assets/translations/pt/index.ts b/feature-libs/pdf-invoices/assets/translations/pt/index.ts new file mode 100644 index 00000000000..fda09d38458 --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pdfInvoices from './pdfInvoices.json'; +export const pt = { + pdfInvoices, +}; diff --git a/feature-libs/pdf-invoices/assets/translations/ru/index.ts b/feature-libs/pdf-invoices/assets/translations/ru/index.ts new file mode 100644 index 00000000000..8a06c6db8c0 --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pdfInvoices from './pdfInvoices.json'; +export const ru = { + pdfInvoices, +}; diff --git a/feature-libs/pdf-invoices/assets/translations/translations.ts b/feature-libs/pdf-invoices/assets/translations/translations.ts index 4a5b1354d4c..e8c41f73882 100644 --- a/feature-libs/pdf-invoices/assets/translations/translations.ts +++ b/feature-libs/pdf-invoices/assets/translations/translations.ts @@ -4,19 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const pdfInvoicesTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const pdfInvoicesTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const pdfInvoicesTranslationChunksConfig: TranslationChunksConfig = { - pdfInvoices: ['pdfInvoices'], -}; +export { cs as pdfInvoicesTranslationsCs } from './cs/index'; +export { de as pdfInvoicesTranslationsDe } from './de/index'; +export { en as pdfInvoicesTranslationsEn } from './en/index'; +export { es as pdfInvoicesTranslationsEs } from './es/index'; +export { es_CO as pdfInvoicesTranslationsEs_CO } from './es_CO/index'; +export { fr as pdfInvoicesTranslationsFr } from './fr/index'; +export { hi as pdfInvoicesTranslationsHi } from './hi/index'; +export { hu as pdfInvoicesTranslationsHu } from './hu/index'; +export { id as pdfInvoicesTranslationsId } from './id/index'; +export { it as pdfInvoicesTranslationsIt } from './it/index'; +export { ja as pdfInvoicesTranslationsJa } from './ja/index'; +export { ko as pdfInvoicesTranslationsKo } from './ko/index'; +export { pl as pdfInvoicesTranslationsPl } from './pl/index'; +export { pt as pdfInvoicesTranslationsPt } from './pt/index'; +export { ru as pdfInvoicesTranslationsRu } from './ru/index'; +export { zh as pdfInvoicesTranslationsZh } from './zh/index'; +export { zh_TW as pdfInvoicesTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/pdf-invoices/assets/translations/zh/index.ts b/feature-libs/pdf-invoices/assets/translations/zh/index.ts index 9cb830bda06..f39dcfbd757 100644 --- a/feature-libs/pdf-invoices/assets/translations/zh/index.ts +++ b/feature-libs/pdf-invoices/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import pdfInvoices from './pdfInvoices.json'; - export const zh = { pdfInvoices, }; diff --git a/feature-libs/pdf-invoices/assets/translations/zh_TW/index.ts b/feature-libs/pdf-invoices/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..759377f074c --- /dev/null +++ b/feature-libs/pdf-invoices/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pdfInvoices from './pdfInvoices.json'; +export const zh_TW = { + pdfInvoices, +}; diff --git a/feature-libs/pickup-in-store/assets/public_api.ts b/feature-libs/pickup-in-store/assets/public_api.ts index 0784e372a0d..eb1adb3dddc 100644 --- a/feature-libs/pickup-in-store/assets/public_api.ts +++ b/feature-libs/pickup-in-store/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { pickupInStoreTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: pickupInStoreTranslations + * + resources: { en: pickupInStoreTranslationsEn } + * } + * ``` + */ +export const pickupInStoreTranslations = { + en: pickupInStoreTranslationsEn, +}; diff --git a/feature-libs/pickup-in-store/assets/translations/cs/index.ts b/feature-libs/pickup-in-store/assets/translations/cs/index.ts new file mode 100644 index 00000000000..2d04b173b48 --- /dev/null +++ b/feature-libs/pickup-in-store/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pickupInStore from './pickupInStore.json'; +export const cs = { + pickupInStore, +}; diff --git a/feature-libs/pickup-in-store/assets/translations/de/index.ts b/feature-libs/pickup-in-store/assets/translations/de/index.ts index 0b6f685877f..350661759de 100644 --- a/feature-libs/pickup-in-store/assets/translations/de/index.ts +++ b/feature-libs/pickup-in-store/assets/translations/de/index.ts @@ -5,8 +5,6 @@ */ import pickupInStore from './pickupInStore.json'; - -/** English language translations for pickup in store strings. */ export const de = { pickupInStore, }; diff --git a/feature-libs/pickup-in-store/assets/translations/en/index.ts b/feature-libs/pickup-in-store/assets/translations/en/index.ts index d866ed7b08b..048d167bcd7 100644 --- a/feature-libs/pickup-in-store/assets/translations/en/index.ts +++ b/feature-libs/pickup-in-store/assets/translations/en/index.ts @@ -5,8 +5,6 @@ */ import pickupInStore from './pickupInStore.json'; - -/** English language translations for pickup in store strings. */ export const en = { pickupInStore, }; diff --git a/feature-libs/pickup-in-store/assets/translations/es/index.ts b/feature-libs/pickup-in-store/assets/translations/es/index.ts new file mode 100644 index 00000000000..9e0f1038119 --- /dev/null +++ b/feature-libs/pickup-in-store/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pickupInStore from './pickupInStore.json'; +export const es = { + pickupInStore, +}; diff --git a/feature-libs/pickup-in-store/assets/translations/es_CO/index.ts b/feature-libs/pickup-in-store/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..f12c41dbe2e --- /dev/null +++ b/feature-libs/pickup-in-store/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pickupInStore from './pickupInStore.json'; +export const es_CO = { + pickupInStore, +}; diff --git a/feature-libs/pickup-in-store/assets/translations/fr/index.ts b/feature-libs/pickup-in-store/assets/translations/fr/index.ts new file mode 100644 index 00000000000..9dac5e8c039 --- /dev/null +++ b/feature-libs/pickup-in-store/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pickupInStore from './pickupInStore.json'; +export const fr = { + pickupInStore, +}; diff --git a/feature-libs/pickup-in-store/assets/translations/hi/index.ts b/feature-libs/pickup-in-store/assets/translations/hi/index.ts new file mode 100644 index 00000000000..d0a20dbb3ca --- /dev/null +++ b/feature-libs/pickup-in-store/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pickupInStore from './pickupInStore.json'; +export const hi = { + pickupInStore, +}; diff --git a/feature-libs/pickup-in-store/assets/translations/hu/index.ts b/feature-libs/pickup-in-store/assets/translations/hu/index.ts new file mode 100644 index 00000000000..f152e9b0b46 --- /dev/null +++ b/feature-libs/pickup-in-store/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pickupInStore from './pickupInStore.json'; +export const hu = { + pickupInStore, +}; diff --git a/feature-libs/pickup-in-store/assets/translations/id/index.ts b/feature-libs/pickup-in-store/assets/translations/id/index.ts new file mode 100644 index 00000000000..271fb85b521 --- /dev/null +++ b/feature-libs/pickup-in-store/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pickupInStore from './pickupInStore.json'; +export const id = { + pickupInStore, +}; diff --git a/feature-libs/pickup-in-store/assets/translations/it/index.ts b/feature-libs/pickup-in-store/assets/translations/it/index.ts new file mode 100644 index 00000000000..5d76b80f167 --- /dev/null +++ b/feature-libs/pickup-in-store/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pickupInStore from './pickupInStore.json'; +export const it = { + pickupInStore, +}; diff --git a/feature-libs/pickup-in-store/assets/translations/ja/index.ts b/feature-libs/pickup-in-store/assets/translations/ja/index.ts index 4a66625a7f6..cbc8a81e2c8 100644 --- a/feature-libs/pickup-in-store/assets/translations/ja/index.ts +++ b/feature-libs/pickup-in-store/assets/translations/ja/index.ts @@ -5,8 +5,6 @@ */ import pickupInStore from './pickupInStore.json'; - -/** English language translations for pickup in store strings. */ export const ja = { pickupInStore, }; diff --git a/feature-libs/pickup-in-store/assets/translations/ko/index.ts b/feature-libs/pickup-in-store/assets/translations/ko/index.ts new file mode 100644 index 00000000000..70fcbb92d04 --- /dev/null +++ b/feature-libs/pickup-in-store/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pickupInStore from './pickupInStore.json'; +export const ko = { + pickupInStore, +}; diff --git a/feature-libs/pickup-in-store/assets/translations/pl/index.ts b/feature-libs/pickup-in-store/assets/translations/pl/index.ts new file mode 100644 index 00000000000..d134055d37f --- /dev/null +++ b/feature-libs/pickup-in-store/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pickupInStore from './pickupInStore.json'; +export const pl = { + pickupInStore, +}; diff --git a/feature-libs/pickup-in-store/assets/translations/pt/index.ts b/feature-libs/pickup-in-store/assets/translations/pt/index.ts new file mode 100644 index 00000000000..864d5b5b434 --- /dev/null +++ b/feature-libs/pickup-in-store/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pickupInStore from './pickupInStore.json'; +export const pt = { + pickupInStore, +}; diff --git a/feature-libs/pickup-in-store/assets/translations/ru/index.ts b/feature-libs/pickup-in-store/assets/translations/ru/index.ts new file mode 100644 index 00000000000..0db93bfcb0e --- /dev/null +++ b/feature-libs/pickup-in-store/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pickupInStore from './pickupInStore.json'; +export const ru = { + pickupInStore, +}; diff --git a/feature-libs/pickup-in-store/assets/translations/translations.ts b/feature-libs/pickup-in-store/assets/translations/translations.ts index 28328cca41d..853c782cc2f 100644 --- a/feature-libs/pickup-in-store/assets/translations/translations.ts +++ b/feature-libs/pickup-in-store/assets/translations/translations.ts @@ -4,20 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const pickupInStoreTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const pickupInStoreTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -// expose all translation chunk mapping for the pickupInStore feature -export const pickupInStoreTranslationChunksConfig: TranslationChunksConfig = { - pickupInStore: Object.keys(en.pickupInStore), -}; +export { cs as pickupInStoreTranslationsCs } from './cs/index'; +export { de as pickupInStoreTranslationsDe } from './de/index'; +export { en as pickupInStoreTranslationsEn } from './en/index'; +export { es as pickupInStoreTranslationsEs } from './es/index'; +export { es_CO as pickupInStoreTranslationsEs_CO } from './es_CO/index'; +export { fr as pickupInStoreTranslationsFr } from './fr/index'; +export { hi as pickupInStoreTranslationsHi } from './hi/index'; +export { hu as pickupInStoreTranslationsHu } from './hu/index'; +export { id as pickupInStoreTranslationsId } from './id/index'; +export { it as pickupInStoreTranslationsIt } from './it/index'; +export { ja as pickupInStoreTranslationsJa } from './ja/index'; +export { ko as pickupInStoreTranslationsKo } from './ko/index'; +export { pl as pickupInStoreTranslationsPl } from './pl/index'; +export { pt as pickupInStoreTranslationsPt } from './pt/index'; +export { ru as pickupInStoreTranslationsRu } from './ru/index'; +export { zh as pickupInStoreTranslationsZh } from './zh/index'; +export { zh_TW as pickupInStoreTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/pickup-in-store/assets/translations/zh/index.ts b/feature-libs/pickup-in-store/assets/translations/zh/index.ts index d0095fbbde0..9b1c5764d28 100644 --- a/feature-libs/pickup-in-store/assets/translations/zh/index.ts +++ b/feature-libs/pickup-in-store/assets/translations/zh/index.ts @@ -5,8 +5,6 @@ */ import pickupInStore from './pickupInStore.json'; - -/** English language translations for pickup in store strings. */ export const zh = { pickupInStore, }; diff --git a/feature-libs/pickup-in-store/assets/translations/zh_TW/index.ts b/feature-libs/pickup-in-store/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..2d28b9dee72 --- /dev/null +++ b/feature-libs/pickup-in-store/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import pickupInStore from './pickupInStore.json'; +export const zh_TW = { + pickupInStore, +}; diff --git a/feature-libs/pickup-in-store/schematics/add-pickup-in-store/__snapshots__/index_spec.ts.snap b/feature-libs/pickup-in-store/schematics/add-pickup-in-store/__snapshots__/index_spec.ts.snap index a39a2e39007..6119a2d0617 100644 --- a/feature-libs/pickup-in-store/schematics/add-pickup-in-store/__snapshots__/index_spec.ts.snap +++ b/feature-libs/pickup-in-store/schematics/add-pickup-in-store/__snapshots__/index_spec.ts.snap @@ -4,7 +4,7 @@ exports[`Spartacus Pickup in Store schematics: ng-add Pick Up In Store feature e "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { PickupInStoreModule } from "@spartacus/pickup-in-store"; -import { pickupInStoreTranslationChunksConfig, pickupInStoreTranslations } from "@spartacus/pickup-in-store/assets"; +import { pickupInStoreTranslationChunksConfig, pickupInStoreTranslationsEn } from "@spartacus/pickup-in-store/assets"; import { PickupInStoreRootModule } from "@spartacus/pickup-in-store/root"; @NgModule({ @@ -15,7 +15,7 @@ import { PickupInStoreRootModule } from "@spartacus/pickup-in-store/root"; ], providers: [provideConfig({ i18n: { - resources: pickupInStoreTranslations, + resources: { en: pickupInStoreTranslationsEn }, chunks: pickupInStoreTranslationChunksConfig, }, })] @@ -27,7 +27,7 @@ export class PickupInStoreFeatureModule { } exports[`Spartacus Pickup in Store schematics: ng-add Pick Up In Store feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { pickupInStoreTranslationChunksConfig, pickupInStoreTranslations } from "@spartacus/pickup-in-store/assets"; +import { pickupInStoreTranslationChunksConfig, pickupInStoreTranslationsEn } from "@spartacus/pickup-in-store/assets"; import { PICKUP_IN_STORE_FEATURE, PickupInStoreRootModule } from "@spartacus/pickup-in-store/root"; @NgModule({ @@ -45,7 +45,7 @@ import { PICKUP_IN_STORE_FEATURE, PickupInStoreRootModule } from "@spartacus/pic }), provideConfig({ i18n: { - resources: pickupInStoreTranslations, + resources: { en: pickupInStoreTranslationsEn }, chunks: pickupInStoreTranslationChunksConfig, }, }) diff --git a/feature-libs/product-configurator/common/assets/public_api.ts b/feature-libs/product-configurator/common/assets/public_api.ts index 0784e372a0d..e5c102ff882 100644 --- a/feature-libs/product-configurator/common/assets/public_api.ts +++ b/feature-libs/product-configurator/common/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { configuratorTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: configuratorTranslations + * + resources: { en: configuratorTranslationsEn } + * } + * ``` + */ +export const configuratorTranslations = { + en: configuratorTranslationsEn, +}; diff --git a/feature-libs/product-configurator/common/assets/translations/cs/index.ts b/feature-libs/product-configurator/common/assets/translations/cs/index.ts new file mode 100644 index 00000000000..61df1f881ef --- /dev/null +++ b/feature-libs/product-configurator/common/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import configurator from './configurator.json'; +export const cs = { + configurator, +}; diff --git a/feature-libs/product-configurator/common/assets/translations/de/index.ts b/feature-libs/product-configurator/common/assets/translations/de/index.ts index ed6962e1afe..9fcc435335e 100644 --- a/feature-libs/product-configurator/common/assets/translations/de/index.ts +++ b/feature-libs/product-configurator/common/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import configurator from './configurator.json'; - export const de = { configurator, }; diff --git a/feature-libs/product-configurator/common/assets/translations/en/index.ts b/feature-libs/product-configurator/common/assets/translations/en/index.ts index d83efa94666..890b3d22742 100644 --- a/feature-libs/product-configurator/common/assets/translations/en/index.ts +++ b/feature-libs/product-configurator/common/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import configurator from './configurator.json'; - export const en = { configurator, }; diff --git a/feature-libs/product-configurator/common/assets/translations/es/index.ts b/feature-libs/product-configurator/common/assets/translations/es/index.ts new file mode 100644 index 00000000000..77adf5cd4ae --- /dev/null +++ b/feature-libs/product-configurator/common/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import configurator from './configurator.json'; +export const es = { + configurator, +}; diff --git a/feature-libs/product-configurator/common/assets/translations/es_CO/index.ts b/feature-libs/product-configurator/common/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..e616178e079 --- /dev/null +++ b/feature-libs/product-configurator/common/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import configurator from './configurator.json'; +export const es_CO = { + configurator, +}; diff --git a/feature-libs/product-configurator/common/assets/translations/fr/index.ts b/feature-libs/product-configurator/common/assets/translations/fr/index.ts new file mode 100644 index 00000000000..855ecae4cce --- /dev/null +++ b/feature-libs/product-configurator/common/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import configurator from './configurator.json'; +export const fr = { + configurator, +}; diff --git a/feature-libs/product-configurator/common/assets/translations/hi/index.ts b/feature-libs/product-configurator/common/assets/translations/hi/index.ts new file mode 100644 index 00000000000..9a58c1ab758 --- /dev/null +++ b/feature-libs/product-configurator/common/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import configurator from './configurator.json'; +export const hi = { + configurator, +}; diff --git a/feature-libs/product-configurator/common/assets/translations/hu/index.ts b/feature-libs/product-configurator/common/assets/translations/hu/index.ts new file mode 100644 index 00000000000..fec76cc3167 --- /dev/null +++ b/feature-libs/product-configurator/common/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import configurator from './configurator.json'; +export const hu = { + configurator, +}; diff --git a/feature-libs/product-configurator/common/assets/translations/id/index.ts b/feature-libs/product-configurator/common/assets/translations/id/index.ts new file mode 100644 index 00000000000..9bc9dc05010 --- /dev/null +++ b/feature-libs/product-configurator/common/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import configurator from './configurator.json'; +export const id = { + configurator, +}; diff --git a/feature-libs/product-configurator/common/assets/translations/it/index.ts b/feature-libs/product-configurator/common/assets/translations/it/index.ts new file mode 100644 index 00000000000..1f4b9ff0a80 --- /dev/null +++ b/feature-libs/product-configurator/common/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import configurator from './configurator.json'; +export const it = { + configurator, +}; diff --git a/feature-libs/product-configurator/common/assets/translations/ja/index.ts b/feature-libs/product-configurator/common/assets/translations/ja/index.ts index beb32ccc536..8c17ff5f9f5 100644 --- a/feature-libs/product-configurator/common/assets/translations/ja/index.ts +++ b/feature-libs/product-configurator/common/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import configurator from './configurator.json'; - export const ja = { configurator, }; diff --git a/feature-libs/product-configurator/common/assets/translations/ko/index.ts b/feature-libs/product-configurator/common/assets/translations/ko/index.ts new file mode 100644 index 00000000000..efd2d6c26df --- /dev/null +++ b/feature-libs/product-configurator/common/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import configurator from './configurator.json'; +export const ko = { + configurator, +}; diff --git a/feature-libs/product-configurator/common/assets/translations/pl/index.ts b/feature-libs/product-configurator/common/assets/translations/pl/index.ts new file mode 100644 index 00000000000..9cde4d81219 --- /dev/null +++ b/feature-libs/product-configurator/common/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import configurator from './configurator.json'; +export const pl = { + configurator, +}; diff --git a/feature-libs/product-configurator/common/assets/translations/pt/index.ts b/feature-libs/product-configurator/common/assets/translations/pt/index.ts new file mode 100644 index 00000000000..b8a0efaa0e8 --- /dev/null +++ b/feature-libs/product-configurator/common/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import configurator from './configurator.json'; +export const pt = { + configurator, +}; diff --git a/feature-libs/product-configurator/common/assets/translations/ru/index.ts b/feature-libs/product-configurator/common/assets/translations/ru/index.ts new file mode 100644 index 00000000000..85ccdb7461d --- /dev/null +++ b/feature-libs/product-configurator/common/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import configurator from './configurator.json'; +export const ru = { + configurator, +}; diff --git a/feature-libs/product-configurator/common/assets/translations/translations.ts b/feature-libs/product-configurator/common/assets/translations/translations.ts index 76336c46387..b3accae5324 100644 --- a/feature-libs/product-configurator/common/assets/translations/translations.ts +++ b/feature-libs/product-configurator/common/assets/translations/translations.ts @@ -4,17 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const configuratorTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const configuratorTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; -//empty for now but needed for schematics support -export const configuratorTranslationChunksConfig: TranslationChunksConfig = {}; +export { cs as configuratorTranslationsCs } from './cs/index'; +export { de as configuratorTranslationsDe } from './de/index'; +export { en as configuratorTranslationsEn } from './en/index'; +export { es as configuratorTranslationsEs } from './es/index'; +export { es_CO as configuratorTranslationsEs_CO } from './es_CO/index'; +export { fr as configuratorTranslationsFr } from './fr/index'; +export { hi as configuratorTranslationsHi } from './hi/index'; +export { hu as configuratorTranslationsHu } from './hu/index'; +export { id as configuratorTranslationsId } from './id/index'; +export { it as configuratorTranslationsIt } from './it/index'; +export { ja as configuratorTranslationsJa } from './ja/index'; +export { ko as configuratorTranslationsKo } from './ko/index'; +export { pl as configuratorTranslationsPl } from './pl/index'; +export { pt as configuratorTranslationsPt } from './pt/index'; +export { ru as configuratorTranslationsRu } from './ru/index'; +export { zh as configuratorTranslationsZh } from './zh/index'; +export { zh_TW as configuratorTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/product-configurator/common/assets/translations/zh/index.ts b/feature-libs/product-configurator/common/assets/translations/zh/index.ts index 86f603a71fb..4ec524a07c8 100644 --- a/feature-libs/product-configurator/common/assets/translations/zh/index.ts +++ b/feature-libs/product-configurator/common/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import configurator from './configurator.json'; - export const zh = { configurator, }; diff --git a/feature-libs/product-configurator/common/assets/translations/zh_TW/index.ts b/feature-libs/product-configurator/common/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..ed685aa61ad --- /dev/null +++ b/feature-libs/product-configurator/common/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import configurator from './configurator.json'; +export const zh_TW = { + configurator, +}; diff --git a/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap b/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap index 64ad9ecae02..a80c5470e88 100644 --- a/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap +++ b/feature-libs/product-configurator/schematics/add-product-configurator/__snapshots__/index_spec.ts.snap @@ -3,7 +3,7 @@ exports[`Spartacus product configurator schematics: ng-add Product config feature CPQ and Textfield eager loading should import appropriate modules 1`] = ` "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; -import { configuratorTranslationChunksConfig, configuratorTranslations } from "@spartacus/product-configurator/common/assets"; +import { configuratorTranslationChunksConfig, configuratorTranslationsEn } from "@spartacus/product-configurator/common/assets"; import { RulebasedConfiguratorModule } from "@spartacus/product-configurator/rulebased"; import { RulebasedCpqConfiguratorModule } from "@spartacus/product-configurator/rulebased/cpq"; import { CpqConfiguratorRootModule, RulebasedConfiguratorRootModule } from "@spartacus/product-configurator/rulebased/root"; @@ -22,7 +22,7 @@ import { TextfieldConfiguratorRootModule } from "@spartacus/product-configurator ], providers: [provideConfig({ i18n: { - resources: configuratorTranslations, + resources: { en: configuratorTranslationsEn }, chunks: configuratorTranslationChunksConfig, }, })] @@ -33,7 +33,7 @@ export class ProductConfiguratorFeatureModule { } exports[`Spartacus product configurator schematics: ng-add Product config feature CPQ and Textfield general setup b2b features configuration should be added 1`] = ` "import { NgModule } from '@angular/core'; -import { translationChunksConfig, translations } from "@spartacus/assets"; +import { translationChunksConfig, translationsEn } from "@spartacus/assets"; import { FeaturesConfig, I18nConfig, OccConfig, provideConfig, SiteContextConfig } from "@spartacus/core"; import { defaultB2bOccConfig } from "@spartacus/setup"; import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacus/storefront"; @@ -52,7 +52,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu context: {}, }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunksConfig, fallbackLang: 'en' }, @@ -69,7 +69,7 @@ export class SpartacusConfigurationModule { } exports[`Spartacus product configurator schematics: ng-add Product config feature CPQ and Textfield general setup should add the feature using the lazy loading syntax, including VC as well 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { configuratorTranslationChunksConfig, configuratorTranslations } from "@spartacus/product-configurator/common/assets"; +import { configuratorTranslationChunksConfig, configuratorTranslationsEn } from "@spartacus/product-configurator/common/assets"; import { CpqConfiguratorRootModule, PRODUCT_CONFIGURATOR_RULEBASED_FEATURE, RulebasedConfiguratorRootModule } from "@spartacus/product-configurator/rulebased/root"; import { PRODUCT_CONFIGURATOR_TEXTFIELD_FEATURE, TextfieldConfiguratorRootModule } from "@spartacus/product-configurator/textfield/root"; @@ -90,7 +90,7 @@ import { PRODUCT_CONFIGURATOR_TEXTFIELD_FEATURE, TextfieldConfiguratorRootModule }), provideConfig({ i18n: { - resources: configuratorTranslations, + resources: { en: configuratorTranslationsEn }, chunks: configuratorTranslationChunksConfig, }, }), @@ -257,7 +257,7 @@ exports[`Spartacus product configurator schematics: ng-add Product config featur exports[`Spartacus product configurator schematics: ng-add Product config feature CPQ eager loading should import appropriate modules 1`] = ` "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; -import { configuratorTranslationChunksConfig, configuratorTranslations } from "@spartacus/product-configurator/common/assets"; +import { configuratorTranslationChunksConfig, configuratorTranslationsEn } from "@spartacus/product-configurator/common/assets"; import { RulebasedConfiguratorModule } from "@spartacus/product-configurator/rulebased"; import { RulebasedCpqConfiguratorModule } from "@spartacus/product-configurator/rulebased/cpq"; import { CpqConfiguratorRootModule, RulebasedConfiguratorRootModule } from "@spartacus/product-configurator/rulebased/root"; @@ -272,7 +272,7 @@ import { CpqConfiguratorRootModule, RulebasedConfiguratorRootModule } from "@spa ], providers: [provideConfig({ i18n: { - resources: configuratorTranslations, + resources: { en: configuratorTranslationsEn }, chunks: configuratorTranslationChunksConfig, }, })] @@ -283,7 +283,7 @@ export class ProductConfiguratorFeatureModule { } exports[`Spartacus product configurator schematics: ng-add Product config feature CPQ general setup b2b features configuration should be added 1`] = ` "import { NgModule } from '@angular/core'; -import { translationChunksConfig, translations } from "@spartacus/assets"; +import { translationChunksConfig, translationsEn } from "@spartacus/assets"; import { FeaturesConfig, I18nConfig, OccConfig, provideConfig, SiteContextConfig } from "@spartacus/core"; import { defaultB2bOccConfig } from "@spartacus/setup"; import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacus/storefront"; @@ -302,7 +302,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu context: {}, }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunksConfig, fallbackLang: 'en' }, @@ -319,7 +319,7 @@ export class SpartacusConfigurationModule { } exports[`Spartacus product configurator schematics: ng-add Product config feature CPQ general setup should add the feature using the lazy loading syntax, and include VC as well 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { configuratorTranslationChunksConfig, configuratorTranslations } from "@spartacus/product-configurator/common/assets"; +import { configuratorTranslationChunksConfig, configuratorTranslationsEn } from "@spartacus/product-configurator/common/assets"; import { CpqConfiguratorRootModule, PRODUCT_CONFIGURATOR_RULEBASED_FEATURE, RulebasedConfiguratorRootModule } from "@spartacus/product-configurator/rulebased/root"; @NgModule({ @@ -338,7 +338,7 @@ import { CpqConfiguratorRootModule, PRODUCT_CONFIGURATOR_RULEBASED_FEATURE, Rule }), provideConfig({ i18n: { - resources: configuratorTranslations, + resources: { en: configuratorTranslationsEn }, chunks: configuratorTranslationChunksConfig, }, }) @@ -497,7 +497,7 @@ exports[`Spartacus product configurator schematics: ng-add Product config featur exports[`Spartacus product configurator schematics: ng-add Product config feature Textfield eager loading should import appropriate modules 1`] = ` "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; -import { configuratorTranslationChunksConfig, configuratorTranslations } from "@spartacus/product-configurator/common/assets"; +import { configuratorTranslationChunksConfig, configuratorTranslationsEn } from "@spartacus/product-configurator/common/assets"; import { TextfieldConfiguratorModule } from "@spartacus/product-configurator/textfield"; import { TextfieldConfiguratorRootModule } from "@spartacus/product-configurator/textfield/root"; @@ -509,7 +509,7 @@ import { TextfieldConfiguratorRootModule } from "@spartacus/product-configurator ], providers: [provideConfig({ i18n: { - resources: configuratorTranslations, + resources: { en: configuratorTranslationsEn }, chunks: configuratorTranslationChunksConfig, }, })] @@ -520,7 +520,7 @@ export class ProductConfiguratorFeatureModule { } exports[`Spartacus product configurator schematics: ng-add Product config feature Textfield general setup b2b features configuration should not be added 1`] = ` "import { NgModule } from '@angular/core'; -import { translationChunksConfig, translations } from "@spartacus/assets"; +import { translationChunksConfig, translationsEn } from "@spartacus/assets"; import { FeaturesConfig, I18nConfig, OccConfig, provideConfig, SiteContextConfig } from "@spartacus/core"; import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacus/storefront"; @@ -538,7 +538,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu context: {}, }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunksConfig, fallbackLang: 'en' }, @@ -555,7 +555,7 @@ export class SpartacusConfigurationModule { } exports[`Spartacus product configurator schematics: ng-add Product config feature Textfield general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { configuratorTranslationChunksConfig, configuratorTranslations } from "@spartacus/product-configurator/common/assets"; +import { configuratorTranslationChunksConfig, configuratorTranslationsEn } from "@spartacus/product-configurator/common/assets"; import { PRODUCT_CONFIGURATOR_TEXTFIELD_FEATURE, TextfieldConfiguratorRootModule } from "@spartacus/product-configurator/textfield/root"; @NgModule({ @@ -573,7 +573,7 @@ import { PRODUCT_CONFIGURATOR_TEXTFIELD_FEATURE, TextfieldConfiguratorRootModule }), provideConfig({ i18n: { - resources: configuratorTranslations, + resources: { en: configuratorTranslationsEn }, chunks: configuratorTranslationChunksConfig, }, }) @@ -716,7 +716,7 @@ exports[`Spartacus product configurator schematics: ng-add Product config featur exports[`Spartacus product configurator schematics: ng-add Product config feature VC eager loading should import appropriate modules 1`] = ` "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; -import { configuratorTranslationChunksConfig, configuratorTranslations } from "@spartacus/product-configurator/common/assets"; +import { configuratorTranslationChunksConfig, configuratorTranslationsEn } from "@spartacus/product-configurator/common/assets"; import { RulebasedConfiguratorModule } from "@spartacus/product-configurator/rulebased"; import { RulebasedConfiguratorRootModule } from "@spartacus/product-configurator/rulebased/root"; @@ -728,7 +728,7 @@ import { RulebasedConfiguratorRootModule } from "@spartacus/product-configurator ], providers: [provideConfig({ i18n: { - resources: configuratorTranslations, + resources: { en: configuratorTranslationsEn }, chunks: configuratorTranslationChunksConfig, }, })] @@ -740,7 +740,7 @@ export class ProductConfiguratorFeatureModule { } exports[`Spartacus product configurator schematics: ng-add Product config feature VC general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { configuratorTranslationChunksConfig, configuratorTranslations } from "@spartacus/product-configurator/common/assets"; +import { configuratorTranslationChunksConfig, configuratorTranslationsEn } from "@spartacus/product-configurator/common/assets"; import { PRODUCT_CONFIGURATOR_RULEBASED_FEATURE, RulebasedConfiguratorRootModule } from "@spartacus/product-configurator/rulebased/root"; @NgModule({ @@ -758,7 +758,7 @@ import { PRODUCT_CONFIGURATOR_RULEBASED_FEATURE, RulebasedConfiguratorRootModule }), provideConfig({ i18n: { - resources: configuratorTranslations, + resources: { en: configuratorTranslationsEn }, chunks: configuratorTranslationChunksConfig, }, }) diff --git a/feature-libs/product-multi-dimensional/schematics/add-product-multi-dimensional/__snapshots__/index_spec.ts.snap b/feature-libs/product-multi-dimensional/schematics/add-product-multi-dimensional/__snapshots__/index_spec.ts.snap index 5d844d71d45..151151483d4 100644 --- a/feature-libs/product-multi-dimensional/schematics/add-product-multi-dimensional/__snapshots__/index_spec.ts.snap +++ b/feature-libs/product-multi-dimensional/schematics/add-product-multi-dimensional/__snapshots__/index_spec.ts.snap @@ -140,7 +140,7 @@ exports[`Spartacus Product Multi-Dimensional schematics: ng-add selector feature "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { ProductMultiDimensionalSelectorModule } from "@spartacus/product-multi-dimensional/selector"; -import { multiDimensionalSelectorTranslationChunksConfig, multiDimensionalSelectorTranslations } from "@spartacus/product-multi-dimensional/selector/assets"; +import { multiDimensionalSelectorTranslationChunksConfig, multiDimensionalSelectorTranslationsEn } from "@spartacus/product-multi-dimensional/selector/assets"; import { ProductMultiDimensionalSelectorRootModule } from "@spartacus/product-multi-dimensional/selector/root"; @NgModule({ @@ -151,7 +151,7 @@ import { ProductMultiDimensionalSelectorRootModule } from "@spartacus/product-mu ], providers: [provideConfig({ i18n: { - resources: multiDimensionalSelectorTranslations, + resources: { en: multiDimensionalSelectorTranslationsEn }, chunks: multiDimensionalSelectorTranslationChunksConfig, }, })] @@ -163,7 +163,7 @@ export class ProductMultiDimensionalSelectorFeatureModule { } exports[`Spartacus Product Multi-Dimensional schematics: ng-add selector feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { multiDimensionalSelectorTranslationChunksConfig, multiDimensionalSelectorTranslations } from "@spartacus/product-multi-dimensional/selector/assets"; +import { multiDimensionalSelectorTranslationChunksConfig, multiDimensionalSelectorTranslationsEn } from "@spartacus/product-multi-dimensional/selector/assets"; import { PRODUCT_MULTI_DIMENSIONAL_SELECTOR_FEATURE, ProductMultiDimensionalSelectorRootModule } from "@spartacus/product-multi-dimensional/selector/root"; @NgModule({ @@ -181,7 +181,7 @@ import { PRODUCT_MULTI_DIMENSIONAL_SELECTOR_FEATURE, ProductMultiDimensionalSele }), provideConfig({ i18n: { - resources: multiDimensionalSelectorTranslations, + resources: { en: multiDimensionalSelectorTranslationsEn }, chunks: multiDimensionalSelectorTranslationChunksConfig, }, }) diff --git a/feature-libs/product-multi-dimensional/selector/assets/public_api.ts b/feature-libs/product-multi-dimensional/selector/assets/public_api.ts index 0784e372a0d..4d96668197c 100644 --- a/feature-libs/product-multi-dimensional/selector/assets/public_api.ts +++ b/feature-libs/product-multi-dimensional/selector/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { multiDimensionalSelectorTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: multiDimensionalSelectorTranslations + * + resources: { en: multiDimensionalSelectorTranslationsEn } + * } + * ``` + */ +export const multiDimensionalSelectorTranslations = { + en: multiDimensionalSelectorTranslationsEn, +}; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/cs/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/cs/index.ts new file mode 100644 index 00000000000..d88696a1247 --- /dev/null +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import multiDimensionalSelector from './multiDimensionalSelector.json'; +export const cs = { + multiDimensionalSelector, +}; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/de/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/de/index.ts index 7936a9f7b93..ef70bb7ba7b 100644 --- a/feature-libs/product-multi-dimensional/selector/assets/translations/de/index.ts +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import multiDimensionalSelector from './multiDimensionalSelector.json'; - export const de = { multiDimensionalSelector, }; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/en/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/en/index.ts index ccdcf1cabd9..8105d99c573 100644 --- a/feature-libs/product-multi-dimensional/selector/assets/translations/en/index.ts +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import multiDimensionalSelector from './multiDimensionalSelector.json'; - export const en = { multiDimensionalSelector, }; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/es/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/es/index.ts new file mode 100644 index 00000000000..5362ecfa10f --- /dev/null +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import multiDimensionalSelector from './multiDimensionalSelector.json'; +export const es = { + multiDimensionalSelector, +}; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/es_CO/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..bfc0dff9f82 --- /dev/null +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import multiDimensionalSelector from './multiDimensionalSelector.json'; +export const es_CO = { + multiDimensionalSelector, +}; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/fr/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/fr/index.ts new file mode 100644 index 00000000000..ba16eaf4dcf --- /dev/null +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import multiDimensionalSelector from './multiDimensionalSelector.json'; +export const fr = { + multiDimensionalSelector, +}; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/hi/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/hi/index.ts new file mode 100644 index 00000000000..f33b84cd79e --- /dev/null +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import multiDimensionalSelector from './multiDimensionalSelector.json'; +export const hi = { + multiDimensionalSelector, +}; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/hu/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/hu/index.ts new file mode 100644 index 00000000000..3726d1c8690 --- /dev/null +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import multiDimensionalSelector from './multiDimensionalSelector.json'; +export const hu = { + multiDimensionalSelector, +}; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/id/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/id/index.ts new file mode 100644 index 00000000000..a5269c4ceb5 --- /dev/null +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import multiDimensionalSelector from './multiDimensionalSelector.json'; +export const id = { + multiDimensionalSelector, +}; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/it/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/it/index.ts new file mode 100644 index 00000000000..f5ba58b132b --- /dev/null +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import multiDimensionalSelector from './multiDimensionalSelector.json'; +export const it = { + multiDimensionalSelector, +}; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/ja/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/ja/index.ts index f3cd8653fab..b48ccd522db 100644 --- a/feature-libs/product-multi-dimensional/selector/assets/translations/ja/index.ts +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import multiDimensionalSelector from './multiDimensionalSelector.json'; - export const ja = { multiDimensionalSelector, }; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/ko/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/ko/index.ts new file mode 100644 index 00000000000..3f5aa79ea45 --- /dev/null +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import multiDimensionalSelector from './multiDimensionalSelector.json'; +export const ko = { + multiDimensionalSelector, +}; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/pl/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/pl/index.ts new file mode 100644 index 00000000000..513cb16635d --- /dev/null +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import multiDimensionalSelector from './multiDimensionalSelector.json'; +export const pl = { + multiDimensionalSelector, +}; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/pt/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/pt/index.ts new file mode 100644 index 00000000000..a1b512f7cbb --- /dev/null +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import multiDimensionalSelector from './multiDimensionalSelector.json'; +export const pt = { + multiDimensionalSelector, +}; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/ru/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/ru/index.ts new file mode 100644 index 00000000000..785b631fe45 --- /dev/null +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import multiDimensionalSelector from './multiDimensionalSelector.json'; +export const ru = { + multiDimensionalSelector, +}; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/translations.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/translations.ts index ac1e92a31a6..27d6b9a9edb 100644 --- a/feature-libs/product-multi-dimensional/selector/assets/translations/translations.ts +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/translations.ts @@ -4,20 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const multiDimensionalSelectorTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const multiDimensionalSelectorTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const multiDimensionalSelectorTranslationChunksConfig: TranslationChunksConfig = - { - multiDimensionalSelector: ['multiDimensionalSelector'], - }; +export { cs as multiDimensionalSelectorTranslationsCs } from './cs/index'; +export { de as multiDimensionalSelectorTranslationsDe } from './de/index'; +export { en as multiDimensionalSelectorTranslationsEn } from './en/index'; +export { es as multiDimensionalSelectorTranslationsEs } from './es/index'; +export { es_CO as multiDimensionalSelectorTranslationsEs_CO } from './es_CO/index'; +export { fr as multiDimensionalSelectorTranslationsFr } from './fr/index'; +export { hi as multiDimensionalSelectorTranslationsHi } from './hi/index'; +export { hu as multiDimensionalSelectorTranslationsHu } from './hu/index'; +export { id as multiDimensionalSelectorTranslationsId } from './id/index'; +export { it as multiDimensionalSelectorTranslationsIt } from './it/index'; +export { ja as multiDimensionalSelectorTranslationsJa } from './ja/index'; +export { ko as multiDimensionalSelectorTranslationsKo } from './ko/index'; +export { pl as multiDimensionalSelectorTranslationsPl } from './pl/index'; +export { pt as multiDimensionalSelectorTranslationsPt } from './pt/index'; +export { ru as multiDimensionalSelectorTranslationsRu } from './ru/index'; +export { zh as multiDimensionalSelectorTranslationsZh } from './zh/index'; +export { zh_TW as multiDimensionalSelectorTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/zh/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/zh/index.ts index a0ea672a4a9..121eae60c28 100644 --- a/feature-libs/product-multi-dimensional/selector/assets/translations/zh/index.ts +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import multiDimensionalSelector from './multiDimensionalSelector.json'; - export const zh = { multiDimensionalSelector, }; diff --git a/feature-libs/product-multi-dimensional/selector/assets/translations/zh_TW/index.ts b/feature-libs/product-multi-dimensional/selector/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..f2042e521f7 --- /dev/null +++ b/feature-libs/product-multi-dimensional/selector/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import multiDimensionalSelector from './multiDimensionalSelector.json'; +export const zh_TW = { + multiDimensionalSelector, +}; diff --git a/feature-libs/product/bulk-pricing/assets/public_api.ts b/feature-libs/product/bulk-pricing/assets/public_api.ts index 0784e372a0d..82de3bb0f55 100644 --- a/feature-libs/product/bulk-pricing/assets/public_api.ts +++ b/feature-libs/product/bulk-pricing/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { bulkPricingTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: bulkPricingTranslations + * + resources: { en: bulkPricingTranslationsEn } + * } + * ``` + */ +export const bulkPricingTranslations = { + en: bulkPricingTranslationsEn, +}; diff --git a/feature-libs/product/bulk-pricing/assets/translations/cs/index.ts b/feature-libs/product/bulk-pricing/assets/translations/cs/index.ts new file mode 100644 index 00000000000..c77bd3c47c6 --- /dev/null +++ b/feature-libs/product/bulk-pricing/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import bulkPricing from './bulkPricing.json'; +export const cs = { + bulkPricing, +}; diff --git a/feature-libs/product/bulk-pricing/assets/translations/de/index.ts b/feature-libs/product/bulk-pricing/assets/translations/de/index.ts index b0a77567526..bd143e5c75b 100644 --- a/feature-libs/product/bulk-pricing/assets/translations/de/index.ts +++ b/feature-libs/product/bulk-pricing/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import bulkPricing from './bulkPricing.json'; - export const de = { bulkPricing, }; diff --git a/feature-libs/product/bulk-pricing/assets/translations/en/index.ts b/feature-libs/product/bulk-pricing/assets/translations/en/index.ts index a76120ecd8b..9db92a4f4bd 100644 --- a/feature-libs/product/bulk-pricing/assets/translations/en/index.ts +++ b/feature-libs/product/bulk-pricing/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import bulkPricing from './bulkPricing.json'; - export const en = { bulkPricing, }; diff --git a/feature-libs/product/bulk-pricing/assets/translations/es/index.ts b/feature-libs/product/bulk-pricing/assets/translations/es/index.ts new file mode 100644 index 00000000000..45435ead045 --- /dev/null +++ b/feature-libs/product/bulk-pricing/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import bulkPricing from './bulkPricing.json'; +export const es = { + bulkPricing, +}; diff --git a/feature-libs/product/bulk-pricing/assets/translations/es_CO/index.ts b/feature-libs/product/bulk-pricing/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..4b291468e9f --- /dev/null +++ b/feature-libs/product/bulk-pricing/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import bulkPricing from './bulkPricing.json'; +export const es_CO = { + bulkPricing, +}; diff --git a/feature-libs/product/bulk-pricing/assets/translations/fr/index.ts b/feature-libs/product/bulk-pricing/assets/translations/fr/index.ts new file mode 100644 index 00000000000..a5ceab896c8 --- /dev/null +++ b/feature-libs/product/bulk-pricing/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import bulkPricing from './bulkPricing.json'; +export const fr = { + bulkPricing, +}; diff --git a/feature-libs/product/bulk-pricing/assets/translations/hi/index.ts b/feature-libs/product/bulk-pricing/assets/translations/hi/index.ts new file mode 100644 index 00000000000..fa503ab2a55 --- /dev/null +++ b/feature-libs/product/bulk-pricing/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import bulkPricing from './bulkPricing.json'; +export const hi = { + bulkPricing, +}; diff --git a/feature-libs/product/bulk-pricing/assets/translations/hu/index.ts b/feature-libs/product/bulk-pricing/assets/translations/hu/index.ts new file mode 100644 index 00000000000..04767d20416 --- /dev/null +++ b/feature-libs/product/bulk-pricing/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import bulkPricing from './bulkPricing.json'; +export const hu = { + bulkPricing, +}; diff --git a/feature-libs/product/bulk-pricing/assets/translations/id/index.ts b/feature-libs/product/bulk-pricing/assets/translations/id/index.ts new file mode 100644 index 00000000000..8ccb6774a7f --- /dev/null +++ b/feature-libs/product/bulk-pricing/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import bulkPricing from './bulkPricing.json'; +export const id = { + bulkPricing, +}; diff --git a/feature-libs/product/bulk-pricing/assets/translations/it/index.ts b/feature-libs/product/bulk-pricing/assets/translations/it/index.ts new file mode 100644 index 00000000000..4685b738ecd --- /dev/null +++ b/feature-libs/product/bulk-pricing/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import bulkPricing from './bulkPricing.json'; +export const it = { + bulkPricing, +}; diff --git a/feature-libs/product/bulk-pricing/assets/translations/ja/index.ts b/feature-libs/product/bulk-pricing/assets/translations/ja/index.ts index 290d90ab5b6..24c815c69f4 100644 --- a/feature-libs/product/bulk-pricing/assets/translations/ja/index.ts +++ b/feature-libs/product/bulk-pricing/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import bulkPricing from './bulkPricing.json'; - export const ja = { bulkPricing, }; diff --git a/feature-libs/product/bulk-pricing/assets/translations/ko/index.ts b/feature-libs/product/bulk-pricing/assets/translations/ko/index.ts new file mode 100644 index 00000000000..64e7de1fdbe --- /dev/null +++ b/feature-libs/product/bulk-pricing/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import bulkPricing from './bulkPricing.json'; +export const ko = { + bulkPricing, +}; diff --git a/feature-libs/product/bulk-pricing/assets/translations/pl/index.ts b/feature-libs/product/bulk-pricing/assets/translations/pl/index.ts new file mode 100644 index 00000000000..e287003034e --- /dev/null +++ b/feature-libs/product/bulk-pricing/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import bulkPricing from './bulkPricing.json'; +export const pl = { + bulkPricing, +}; diff --git a/feature-libs/product/bulk-pricing/assets/translations/pt/index.ts b/feature-libs/product/bulk-pricing/assets/translations/pt/index.ts new file mode 100644 index 00000000000..9f4b6ec1f56 --- /dev/null +++ b/feature-libs/product/bulk-pricing/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import bulkPricing from './bulkPricing.json'; +export const pt = { + bulkPricing, +}; diff --git a/feature-libs/product/bulk-pricing/assets/translations/ru/index.ts b/feature-libs/product/bulk-pricing/assets/translations/ru/index.ts new file mode 100644 index 00000000000..862e0e959b0 --- /dev/null +++ b/feature-libs/product/bulk-pricing/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import bulkPricing from './bulkPricing.json'; +export const ru = { + bulkPricing, +}; diff --git a/feature-libs/product/bulk-pricing/assets/translations/translations.ts b/feature-libs/product/bulk-pricing/assets/translations/translations.ts index 7c6c6da4cbc..0b0964fc76c 100644 --- a/feature-libs/product/bulk-pricing/assets/translations/translations.ts +++ b/feature-libs/product/bulk-pricing/assets/translations/translations.ts @@ -4,20 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const bulkPricingTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const bulkPricingTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -// expose all translation chunk mapping for bulkPricing feature -export const bulkPricingTranslationChunksConfig: TranslationChunksConfig = { - bulkPricing: ['bulkPricingTable'], -}; +export { cs as bulkPricingTranslationsCs } from './cs/index'; +export { de as bulkPricingTranslationsDe } from './de/index'; +export { en as bulkPricingTranslationsEn } from './en/index'; +export { es as bulkPricingTranslationsEs } from './es/index'; +export { es_CO as bulkPricingTranslationsEs_CO } from './es_CO/index'; +export { fr as bulkPricingTranslationsFr } from './fr/index'; +export { hi as bulkPricingTranslationsHi } from './hi/index'; +export { hu as bulkPricingTranslationsHu } from './hu/index'; +export { id as bulkPricingTranslationsId } from './id/index'; +export { it as bulkPricingTranslationsIt } from './it/index'; +export { ja as bulkPricingTranslationsJa } from './ja/index'; +export { ko as bulkPricingTranslationsKo } from './ko/index'; +export { pl as bulkPricingTranslationsPl } from './pl/index'; +export { pt as bulkPricingTranslationsPt } from './pt/index'; +export { ru as bulkPricingTranslationsRu } from './ru/index'; +export { zh as bulkPricingTranslationsZh } from './zh/index'; +export { zh_TW as bulkPricingTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/product/bulk-pricing/assets/translations/zh/index.ts b/feature-libs/product/bulk-pricing/assets/translations/zh/index.ts index 5fc65fbe515..dd0180647fa 100644 --- a/feature-libs/product/bulk-pricing/assets/translations/zh/index.ts +++ b/feature-libs/product/bulk-pricing/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import bulkPricing from './bulkPricing.json'; - export const zh = { bulkPricing, }; diff --git a/feature-libs/product/bulk-pricing/assets/translations/zh_TW/index.ts b/feature-libs/product/bulk-pricing/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..294bc5d04cc --- /dev/null +++ b/feature-libs/product/bulk-pricing/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import bulkPricing from './bulkPricing.json'; +export const zh_TW = { + bulkPricing, +}; diff --git a/feature-libs/product/future-stock/assets/public_api.ts b/feature-libs/product/future-stock/assets/public_api.ts index 0784e372a0d..eb1ff52be01 100644 --- a/feature-libs/product/future-stock/assets/public_api.ts +++ b/feature-libs/product/future-stock/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { futureStockTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: futureStockTranslations + * + resources: { en: futureStockTranslationsEn } + * } + * ``` + */ +export const futureStockTranslations = { + en: futureStockTranslationsEn, +}; diff --git a/feature-libs/product/future-stock/assets/translations/cs/index.ts b/feature-libs/product/future-stock/assets/translations/cs/index.ts new file mode 100644 index 00000000000..9adb4928732 --- /dev/null +++ b/feature-libs/product/future-stock/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import futureStock from './futureStock.json'; +export const cs = { + futureStock, +}; diff --git a/feature-libs/product/future-stock/assets/translations/de/index.ts b/feature-libs/product/future-stock/assets/translations/de/index.ts index 2f5eacc94d2..cac3f230422 100644 --- a/feature-libs/product/future-stock/assets/translations/de/index.ts +++ b/feature-libs/product/future-stock/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import futureStock from './futureStock.json'; - export const de = { futureStock, }; diff --git a/feature-libs/product/future-stock/assets/translations/en/index.ts b/feature-libs/product/future-stock/assets/translations/en/index.ts index 3553fc87771..efb309bfaa8 100644 --- a/feature-libs/product/future-stock/assets/translations/en/index.ts +++ b/feature-libs/product/future-stock/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import futureStock from './futureStock.json'; - export const en = { futureStock, }; diff --git a/feature-libs/product/future-stock/assets/translations/es/index.ts b/feature-libs/product/future-stock/assets/translations/es/index.ts new file mode 100644 index 00000000000..0996e4509fc --- /dev/null +++ b/feature-libs/product/future-stock/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import futureStock from './futureStock.json'; +export const es = { + futureStock, +}; diff --git a/feature-libs/product/future-stock/assets/translations/es_CO/index.ts b/feature-libs/product/future-stock/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..5c5cfdfd1bf --- /dev/null +++ b/feature-libs/product/future-stock/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import futureStock from './futureStock.json'; +export const es_CO = { + futureStock, +}; diff --git a/feature-libs/product/future-stock/assets/translations/fr/index.ts b/feature-libs/product/future-stock/assets/translations/fr/index.ts new file mode 100644 index 00000000000..040570609aa --- /dev/null +++ b/feature-libs/product/future-stock/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import futureStock from './futureStock.json'; +export const fr = { + futureStock, +}; diff --git a/feature-libs/product/future-stock/assets/translations/hi/index.ts b/feature-libs/product/future-stock/assets/translations/hi/index.ts new file mode 100644 index 00000000000..8bbb45c1712 --- /dev/null +++ b/feature-libs/product/future-stock/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import futureStock from './futureStock.json'; +export const hi = { + futureStock, +}; diff --git a/feature-libs/product/future-stock/assets/translations/hu/index.ts b/feature-libs/product/future-stock/assets/translations/hu/index.ts new file mode 100644 index 00000000000..8f977dd6beb --- /dev/null +++ b/feature-libs/product/future-stock/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import futureStock from './futureStock.json'; +export const hu = { + futureStock, +}; diff --git a/feature-libs/product/future-stock/assets/translations/id/index.ts b/feature-libs/product/future-stock/assets/translations/id/index.ts new file mode 100644 index 00000000000..feb051fab6a --- /dev/null +++ b/feature-libs/product/future-stock/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import futureStock from './futureStock.json'; +export const id = { + futureStock, +}; diff --git a/feature-libs/product/future-stock/assets/translations/it/index.ts b/feature-libs/product/future-stock/assets/translations/it/index.ts new file mode 100644 index 00000000000..2818526ac97 --- /dev/null +++ b/feature-libs/product/future-stock/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import futureStock from './futureStock.json'; +export const it = { + futureStock, +}; diff --git a/feature-libs/product/future-stock/assets/translations/ja/index.ts b/feature-libs/product/future-stock/assets/translations/ja/index.ts index 52908e59dda..de4e44d2b21 100644 --- a/feature-libs/product/future-stock/assets/translations/ja/index.ts +++ b/feature-libs/product/future-stock/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import futureStock from './futureStock.json'; - export const ja = { futureStock, }; diff --git a/feature-libs/product/future-stock/assets/translations/ko/index.ts b/feature-libs/product/future-stock/assets/translations/ko/index.ts new file mode 100644 index 00000000000..b911c360af2 --- /dev/null +++ b/feature-libs/product/future-stock/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import futureStock from './futureStock.json'; +export const ko = { + futureStock, +}; diff --git a/feature-libs/product/future-stock/assets/translations/pl/index.ts b/feature-libs/product/future-stock/assets/translations/pl/index.ts new file mode 100644 index 00000000000..13d03231648 --- /dev/null +++ b/feature-libs/product/future-stock/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import futureStock from './futureStock.json'; +export const pl = { + futureStock, +}; diff --git a/feature-libs/product/future-stock/assets/translations/pt/index.ts b/feature-libs/product/future-stock/assets/translations/pt/index.ts new file mode 100644 index 00000000000..ecc40c4cf72 --- /dev/null +++ b/feature-libs/product/future-stock/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import futureStock from './futureStock.json'; +export const pt = { + futureStock, +}; diff --git a/feature-libs/product/future-stock/assets/translations/ru/index.ts b/feature-libs/product/future-stock/assets/translations/ru/index.ts new file mode 100644 index 00000000000..3a121e026ab --- /dev/null +++ b/feature-libs/product/future-stock/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import futureStock from './futureStock.json'; +export const ru = { + futureStock, +}; diff --git a/feature-libs/product/future-stock/assets/translations/translations.ts b/feature-libs/product/future-stock/assets/translations/translations.ts index e1f8b2989c9..b1846755dd2 100644 --- a/feature-libs/product/future-stock/assets/translations/translations.ts +++ b/feature-libs/product/future-stock/assets/translations/translations.ts @@ -4,20 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const futureStockTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const futureStockTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -// expose all translation chunk mapping for FutureStock feature -export const futureStockTranslationChunksConfig: TranslationChunksConfig = { - futureStock: ['futureStockDropdown'], -}; +export { cs as futureStockTranslationsCs } from './cs/index'; +export { de as futureStockTranslationsDe } from './de/index'; +export { en as futureStockTranslationsEn } from './en/index'; +export { es as futureStockTranslationsEs } from './es/index'; +export { es_CO as futureStockTranslationsEs_CO } from './es_CO/index'; +export { fr as futureStockTranslationsFr } from './fr/index'; +export { hi as futureStockTranslationsHi } from './hi/index'; +export { hu as futureStockTranslationsHu } from './hu/index'; +export { id as futureStockTranslationsId } from './id/index'; +export { it as futureStockTranslationsIt } from './it/index'; +export { ja as futureStockTranslationsJa } from './ja/index'; +export { ko as futureStockTranslationsKo } from './ko/index'; +export { pl as futureStockTranslationsPl } from './pl/index'; +export { pt as futureStockTranslationsPt } from './pt/index'; +export { ru as futureStockTranslationsRu } from './ru/index'; +export { zh as futureStockTranslationsZh } from './zh/index'; +export { zh_TW as futureStockTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/product/future-stock/assets/translations/zh/index.ts b/feature-libs/product/future-stock/assets/translations/zh/index.ts index 5e0ea8f1591..67987f431ad 100644 --- a/feature-libs/product/future-stock/assets/translations/zh/index.ts +++ b/feature-libs/product/future-stock/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import futureStock from './futureStock.json'; - export const zh = { futureStock, }; diff --git a/feature-libs/product/future-stock/assets/translations/zh_TW/index.ts b/feature-libs/product/future-stock/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..f9c8adc4782 --- /dev/null +++ b/feature-libs/product/future-stock/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import futureStock from './futureStock.json'; +export const zh_TW = { + futureStock, +}; diff --git a/feature-libs/product/image-zoom/assets/public_api.ts b/feature-libs/product/image-zoom/assets/public_api.ts index 0784e372a0d..9f048dcbef9 100644 --- a/feature-libs/product/image-zoom/assets/public_api.ts +++ b/feature-libs/product/image-zoom/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { productImageZoomTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: productImageZoomTranslations + * + resources: { en: productImageZoomTranslationsEn } + * } + * ``` + */ +export const productImageZoomTranslations = { + en: productImageZoomTranslationsEn, +}; diff --git a/feature-libs/product/image-zoom/assets/translations/cs/index.ts b/feature-libs/product/image-zoom/assets/translations/cs/index.ts new file mode 100644 index 00000000000..9c6f4160b3d --- /dev/null +++ b/feature-libs/product/image-zoom/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productImageZoom from './productImageZoom.json'; +export const cs = { + productImageZoom, +}; diff --git a/feature-libs/product/image-zoom/assets/translations/de/index.ts b/feature-libs/product/image-zoom/assets/translations/de/index.ts index 7760d6cc4e5..a282593dce2 100644 --- a/feature-libs/product/image-zoom/assets/translations/de/index.ts +++ b/feature-libs/product/image-zoom/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import productImageZoom from './productImageZoom.json'; - export const de = { productImageZoom, }; diff --git a/feature-libs/product/image-zoom/assets/translations/en/index.ts b/feature-libs/product/image-zoom/assets/translations/en/index.ts index f8ed8baab8c..07854426b4b 100644 --- a/feature-libs/product/image-zoom/assets/translations/en/index.ts +++ b/feature-libs/product/image-zoom/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import productImageZoom from './productImageZoom.json'; - export const en = { productImageZoom, }; diff --git a/feature-libs/product/image-zoom/assets/translations/es/index.ts b/feature-libs/product/image-zoom/assets/translations/es/index.ts new file mode 100644 index 00000000000..5ca88112871 --- /dev/null +++ b/feature-libs/product/image-zoom/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productImageZoom from './productImageZoom.json'; +export const es = { + productImageZoom, +}; diff --git a/feature-libs/product/image-zoom/assets/translations/es_CO/index.ts b/feature-libs/product/image-zoom/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..2a51d696f59 --- /dev/null +++ b/feature-libs/product/image-zoom/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productImageZoom from './productImageZoom.json'; +export const es_CO = { + productImageZoom, +}; diff --git a/feature-libs/product/image-zoom/assets/translations/fr/index.ts b/feature-libs/product/image-zoom/assets/translations/fr/index.ts new file mode 100644 index 00000000000..4096e152481 --- /dev/null +++ b/feature-libs/product/image-zoom/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productImageZoom from './productImageZoom.json'; +export const fr = { + productImageZoom, +}; diff --git a/feature-libs/product/image-zoom/assets/translations/hi/index.ts b/feature-libs/product/image-zoom/assets/translations/hi/index.ts new file mode 100644 index 00000000000..01e9a403f02 --- /dev/null +++ b/feature-libs/product/image-zoom/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productImageZoom from './productImageZoom.json'; +export const hi = { + productImageZoom, +}; diff --git a/feature-libs/product/image-zoom/assets/translations/hu/index.ts b/feature-libs/product/image-zoom/assets/translations/hu/index.ts new file mode 100644 index 00000000000..86e5ef7ce4f --- /dev/null +++ b/feature-libs/product/image-zoom/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productImageZoom from './productImageZoom.json'; +export const hu = { + productImageZoom, +}; diff --git a/feature-libs/product/image-zoom/assets/translations/id/index.ts b/feature-libs/product/image-zoom/assets/translations/id/index.ts new file mode 100644 index 00000000000..f1d5410fe79 --- /dev/null +++ b/feature-libs/product/image-zoom/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productImageZoom from './productImageZoom.json'; +export const id = { + productImageZoom, +}; diff --git a/feature-libs/product/image-zoom/assets/translations/it/index.ts b/feature-libs/product/image-zoom/assets/translations/it/index.ts new file mode 100644 index 00000000000..1a29d2ee3b1 --- /dev/null +++ b/feature-libs/product/image-zoom/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productImageZoom from './productImageZoom.json'; +export const it = { + productImageZoom, +}; diff --git a/feature-libs/product/image-zoom/assets/translations/ja/index.ts b/feature-libs/product/image-zoom/assets/translations/ja/index.ts index 072cd9ec330..a5092b0eab7 100644 --- a/feature-libs/product/image-zoom/assets/translations/ja/index.ts +++ b/feature-libs/product/image-zoom/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import productImageZoom from './productImageZoom.json'; - export const ja = { productImageZoom, }; diff --git a/feature-libs/product/image-zoom/assets/translations/ko/index.ts b/feature-libs/product/image-zoom/assets/translations/ko/index.ts new file mode 100644 index 00000000000..82a4f04b578 --- /dev/null +++ b/feature-libs/product/image-zoom/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productImageZoom from './productImageZoom.json'; +export const ko = { + productImageZoom, +}; diff --git a/feature-libs/product/image-zoom/assets/translations/pl/index.ts b/feature-libs/product/image-zoom/assets/translations/pl/index.ts new file mode 100644 index 00000000000..6165b5ed337 --- /dev/null +++ b/feature-libs/product/image-zoom/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productImageZoom from './productImageZoom.json'; +export const pl = { + productImageZoom, +}; diff --git a/feature-libs/product/image-zoom/assets/translations/pt/index.ts b/feature-libs/product/image-zoom/assets/translations/pt/index.ts new file mode 100644 index 00000000000..893561d70ce --- /dev/null +++ b/feature-libs/product/image-zoom/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productImageZoom from './productImageZoom.json'; +export const pt = { + productImageZoom, +}; diff --git a/feature-libs/product/image-zoom/assets/translations/ru/index.ts b/feature-libs/product/image-zoom/assets/translations/ru/index.ts new file mode 100644 index 00000000000..6e87c150fc8 --- /dev/null +++ b/feature-libs/product/image-zoom/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productImageZoom from './productImageZoom.json'; +export const ru = { + productImageZoom, +}; diff --git a/feature-libs/product/image-zoom/assets/translations/translations.ts b/feature-libs/product/image-zoom/assets/translations/translations.ts index d78814be99b..3cb33394475 100644 --- a/feature-libs/product/image-zoom/assets/translations/translations.ts +++ b/feature-libs/product/image-zoom/assets/translations/translations.ts @@ -4,21 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const productImageZoomTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const productImageZoomTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -// expose all translation chunk mapping for imageZoom feature -export const productImageZoomTranslationChunksConfig: TranslationChunksConfig = - { - productImageZoom: ['productImageZoomTrigger', 'productImageZoomDialog'], - }; +export { cs as productImageZoomTranslationsCs } from './cs/index'; +export { de as productImageZoomTranslationsDe } from './de/index'; +export { en as productImageZoomTranslationsEn } from './en/index'; +export { es as productImageZoomTranslationsEs } from './es/index'; +export { es_CO as productImageZoomTranslationsEs_CO } from './es_CO/index'; +export { fr as productImageZoomTranslationsFr } from './fr/index'; +export { hi as productImageZoomTranslationsHi } from './hi/index'; +export { hu as productImageZoomTranslationsHu } from './hu/index'; +export { id as productImageZoomTranslationsId } from './id/index'; +export { it as productImageZoomTranslationsIt } from './it/index'; +export { ja as productImageZoomTranslationsJa } from './ja/index'; +export { ko as productImageZoomTranslationsKo } from './ko/index'; +export { pl as productImageZoomTranslationsPl } from './pl/index'; +export { pt as productImageZoomTranslationsPt } from './pt/index'; +export { ru as productImageZoomTranslationsRu } from './ru/index'; +export { zh as productImageZoomTranslationsZh } from './zh/index'; +export { zh_TW as productImageZoomTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/product/image-zoom/assets/translations/zh/index.ts b/feature-libs/product/image-zoom/assets/translations/zh/index.ts index 170988e65e9..79828736d7a 100644 --- a/feature-libs/product/image-zoom/assets/translations/zh/index.ts +++ b/feature-libs/product/image-zoom/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import productImageZoom from './productImageZoom.json'; - export const zh = { productImageZoom, }; diff --git a/feature-libs/product/image-zoom/assets/translations/zh_TW/index.ts b/feature-libs/product/image-zoom/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..273c1570a0d --- /dev/null +++ b/feature-libs/product/image-zoom/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productImageZoom from './productImageZoom.json'; +export const zh_TW = { + productImageZoom, +}; diff --git a/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap b/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap index 223da6bc64f..2e9129540c5 100644 --- a/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap +++ b/feature-libs/product/schematics/add-product/__snapshots__/index_spec.ts.snap @@ -4,7 +4,7 @@ exports[`Spartacus Product schematics: ng-add BulkPricing feature eager loading "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { BulkPricingModule } from "@spartacus/product/bulk-pricing"; -import { bulkPricingTranslationChunksConfig, bulkPricingTranslations } from "@spartacus/product/bulk-pricing/assets"; +import { bulkPricingTranslationChunksConfig, bulkPricingTranslationsEn } from "@spartacus/product/bulk-pricing/assets"; import { BulkPricingRootModule } from "@spartacus/product/bulk-pricing/root"; @NgModule({ @@ -15,7 +15,7 @@ import { BulkPricingRootModule } from "@spartacus/product/bulk-pricing/root"; ], providers: [provideConfig({ i18n: { - resources: bulkPricingTranslations, + resources: { en: bulkPricingTranslationsEn }, chunks: bulkPricingTranslationChunksConfig, }, })] @@ -26,7 +26,7 @@ export class ProductBulkPricingFeatureModule { } exports[`Spartacus Product schematics: ng-add BulkPricing feature general setup b2b features configuration should be added 1`] = ` "import { NgModule } from '@angular/core'; -import { translationChunksConfig, translations } from "@spartacus/assets"; +import { translationChunksConfig, translationsEn } from "@spartacus/assets"; import { FeaturesConfig, I18nConfig, OccConfig, provideConfig, SiteContextConfig } from "@spartacus/core"; import { defaultB2bOccConfig } from "@spartacus/setup"; import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacus/storefront"; @@ -45,7 +45,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu context: {}, }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunksConfig, fallbackLang: 'en' }, @@ -62,7 +62,7 @@ export class SpartacusConfigurationModule { } exports[`Spartacus Product schematics: ng-add BulkPricing feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { bulkPricingTranslationChunksConfig, bulkPricingTranslations } from "@spartacus/product/bulk-pricing/assets"; +import { bulkPricingTranslationChunksConfig, bulkPricingTranslationsEn } from "@spartacus/product/bulk-pricing/assets"; import { BulkPricingRootModule, PRODUCT_BULK_PRICING_FEATURE } from "@spartacus/product/bulk-pricing/root"; @NgModule({ @@ -80,7 +80,7 @@ import { BulkPricingRootModule, PRODUCT_BULK_PRICING_FEATURE } from "@spartacus/ }), provideConfig({ i18n: { - resources: bulkPricingTranslations, + resources: { en: bulkPricingTranslationsEn }, chunks: bulkPricingTranslationChunksConfig, }, }) @@ -224,7 +224,7 @@ exports[`Spartacus Product schematics: ng-add FutureStock feature eager loading "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { FutureStockModule } from "@spartacus/product/future-stock"; -import { futureStockTranslationChunksConfig, futureStockTranslations } from "@spartacus/product/future-stock/assets"; +import { futureStockTranslationChunksConfig, futureStockTranslationsEn } from "@spartacus/product/future-stock/assets"; import { FutureStockRootModule } from "@spartacus/product/future-stock/root"; @NgModule({ @@ -235,7 +235,7 @@ import { FutureStockRootModule } from "@spartacus/product/future-stock/root"; ], providers: [provideConfig({ i18n: { - resources: futureStockTranslations, + resources: { en: futureStockTranslationsEn }, chunks: futureStockTranslationChunksConfig, }, })] @@ -246,7 +246,7 @@ export class ProductFutureStockFeatureModule { } exports[`Spartacus Product schematics: ng-add FutureStock feature general setup b2b features configuration should be added 1`] = ` "import { NgModule } from '@angular/core'; -import { translationChunksConfig, translations } from "@spartacus/assets"; +import { translationChunksConfig, translationsEn } from "@spartacus/assets"; import { FeaturesConfig, I18nConfig, OccConfig, provideConfig, SiteContextConfig } from "@spartacus/core"; import { defaultB2bOccConfig } from "@spartacus/setup"; import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacus/storefront"; @@ -265,7 +265,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu context: {}, }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunksConfig, fallbackLang: 'en' }, @@ -282,7 +282,7 @@ export class SpartacusConfigurationModule { } exports[`Spartacus Product schematics: ng-add FutureStock feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { futureStockTranslationChunksConfig, futureStockTranslations } from "@spartacus/product/future-stock/assets"; +import { futureStockTranslationChunksConfig, futureStockTranslationsEn } from "@spartacus/product/future-stock/assets"; import { FutureStockRootModule, PRODUCT_FUTURE_STOCK_FEATURE } from "@spartacus/product/future-stock/root"; @NgModule({ @@ -300,7 +300,7 @@ import { FutureStockRootModule, PRODUCT_FUTURE_STOCK_FEATURE } from "@spartacus/ }), provideConfig({ i18n: { - resources: futureStockTranslations, + resources: { en: futureStockTranslationsEn }, chunks: futureStockTranslationChunksConfig, }, }) @@ -444,7 +444,7 @@ exports[`Spartacus Product schematics: ng-add ImageZoom feature eager loading sh "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { ProductImageZoomModule } from "@spartacus/product/image-zoom"; -import { productImageZoomTranslationChunksConfig, productImageZoomTranslations } from "@spartacus/product/image-zoom/assets"; +import { productImageZoomTranslationChunksConfig, productImageZoomTranslationsEn } from "@spartacus/product/image-zoom/assets"; import { ProductImageZoomRootModule } from "@spartacus/product/image-zoom/root"; @NgModule({ @@ -455,7 +455,7 @@ import { ProductImageZoomRootModule } from "@spartacus/product/image-zoom/root"; ], providers: [provideConfig({ i18n: { - resources: productImageZoomTranslations, + resources: { en: productImageZoomTranslationsEn }, chunks: productImageZoomTranslationChunksConfig, }, })] @@ -467,7 +467,7 @@ export class ProductImageZoomFeatureModule { } exports[`Spartacus Product schematics: ng-add ImageZoom feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { productImageZoomTranslationChunksConfig, productImageZoomTranslations } from "@spartacus/product/image-zoom/assets"; +import { productImageZoomTranslationChunksConfig, productImageZoomTranslationsEn } from "@spartacus/product/image-zoom/assets"; import { PRODUCT_IMAGE_ZOOM_FEATURE, ProductImageZoomRootModule } from "@spartacus/product/image-zoom/root"; @NgModule({ @@ -485,7 +485,7 @@ import { PRODUCT_IMAGE_ZOOM_FEATURE, ProductImageZoomRootModule } from "@spartac }), provideConfig({ i18n: { - resources: productImageZoomTranslations, + resources: { en: productImageZoomTranslationsEn }, chunks: productImageZoomTranslationChunksConfig, }, }) @@ -629,7 +629,7 @@ exports[`Spartacus Product schematics: ng-add Variants feature eager loading sho "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { ProductVariantsModule } from "@spartacus/product/variants"; -import { productVariantsTranslationChunksConfig, productVariantsTranslations } from "@spartacus/product/variants/assets"; +import { productVariantsTranslationChunksConfig, productVariantsTranslationsEn } from "@spartacus/product/variants/assets"; import { ProductVariantsRootModule } from "@spartacus/product/variants/root"; @NgModule({ @@ -640,7 +640,7 @@ import { ProductVariantsRootModule } from "@spartacus/product/variants/root"; ], providers: [provideConfig({ i18n: { - resources: productVariantsTranslations, + resources: { en: productVariantsTranslationsEn }, chunks: productVariantsTranslationChunksConfig, }, })] @@ -652,7 +652,7 @@ export class ProductVariantsFeatureModule { } exports[`Spartacus Product schematics: ng-add Variants feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { productVariantsTranslationChunksConfig, productVariantsTranslations } from "@spartacus/product/variants/assets"; +import { productVariantsTranslationChunksConfig, productVariantsTranslationsEn } from "@spartacus/product/variants/assets"; import { PRODUCT_VARIANTS_FEATURE, ProductVariantsRootModule } from "@spartacus/product/variants/root"; @NgModule({ @@ -670,7 +670,7 @@ import { PRODUCT_VARIANTS_FEATURE, ProductVariantsRootModule } from "@spartacus/ }), provideConfig({ i18n: { - resources: productVariantsTranslations, + resources: { en: productVariantsTranslationsEn }, chunks: productVariantsTranslationChunksConfig, }, }) diff --git a/feature-libs/product/variants/assets/public_api.ts b/feature-libs/product/variants/assets/public_api.ts index 0784e372a0d..3d2b2c549fe 100644 --- a/feature-libs/product/variants/assets/public_api.ts +++ b/feature-libs/product/variants/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { productVariantsTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: productVariantsTranslations + * + resources: { en: productVariantsTranslationsEn } + * } + * ``` + */ +export const productVariantsTranslations = { + en: productVariantsTranslationsEn, +}; diff --git a/feature-libs/product/variants/assets/translations/cs/index.ts b/feature-libs/product/variants/assets/translations/cs/index.ts new file mode 100644 index 00000000000..da5541a6f9e --- /dev/null +++ b/feature-libs/product/variants/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productVariants from './productVariants.json'; +export const cs = { + productVariants, +}; diff --git a/feature-libs/product/variants/assets/translations/de/index.ts b/feature-libs/product/variants/assets/translations/de/index.ts index dea9c34642d..b2a6ace9595 100644 --- a/feature-libs/product/variants/assets/translations/de/index.ts +++ b/feature-libs/product/variants/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import productVariants from './productVariants.json'; - export const de = { productVariants, }; diff --git a/feature-libs/product/variants/assets/translations/en/index.ts b/feature-libs/product/variants/assets/translations/en/index.ts index 1f97e758b92..09e35d07c48 100644 --- a/feature-libs/product/variants/assets/translations/en/index.ts +++ b/feature-libs/product/variants/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import productVariants from './productVariants.json'; - export const en = { productVariants, }; diff --git a/feature-libs/product/variants/assets/translations/es/index.ts b/feature-libs/product/variants/assets/translations/es/index.ts new file mode 100644 index 00000000000..4369de7c3a3 --- /dev/null +++ b/feature-libs/product/variants/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productVariants from './productVariants.json'; +export const es = { + productVariants, +}; diff --git a/feature-libs/product/variants/assets/translations/es_CO/index.ts b/feature-libs/product/variants/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..b26df500ee2 --- /dev/null +++ b/feature-libs/product/variants/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productVariants from './productVariants.json'; +export const es_CO = { + productVariants, +}; diff --git a/feature-libs/product/variants/assets/translations/fr/index.ts b/feature-libs/product/variants/assets/translations/fr/index.ts new file mode 100644 index 00000000000..008a0f2ab66 --- /dev/null +++ b/feature-libs/product/variants/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productVariants from './productVariants.json'; +export const fr = { + productVariants, +}; diff --git a/feature-libs/product/variants/assets/translations/hi/index.ts b/feature-libs/product/variants/assets/translations/hi/index.ts new file mode 100644 index 00000000000..84734c73183 --- /dev/null +++ b/feature-libs/product/variants/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productVariants from './productVariants.json'; +export const hi = { + productVariants, +}; diff --git a/feature-libs/product/variants/assets/translations/hu/index.ts b/feature-libs/product/variants/assets/translations/hu/index.ts new file mode 100644 index 00000000000..e6a25616605 --- /dev/null +++ b/feature-libs/product/variants/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productVariants from './productVariants.json'; +export const hu = { + productVariants, +}; diff --git a/feature-libs/product/variants/assets/translations/id/index.ts b/feature-libs/product/variants/assets/translations/id/index.ts new file mode 100644 index 00000000000..9abbbf3ffb8 --- /dev/null +++ b/feature-libs/product/variants/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productVariants from './productVariants.json'; +export const id = { + productVariants, +}; diff --git a/feature-libs/product/variants/assets/translations/it/index.ts b/feature-libs/product/variants/assets/translations/it/index.ts new file mode 100644 index 00000000000..2a4d94aecb7 --- /dev/null +++ b/feature-libs/product/variants/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productVariants from './productVariants.json'; +export const it = { + productVariants, +}; diff --git a/feature-libs/product/variants/assets/translations/ja/index.ts b/feature-libs/product/variants/assets/translations/ja/index.ts index 466573777a6..f93e929706d 100644 --- a/feature-libs/product/variants/assets/translations/ja/index.ts +++ b/feature-libs/product/variants/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import productVariants from './productVariants.json'; - export const ja = { productVariants, }; diff --git a/feature-libs/product/variants/assets/translations/ko/index.ts b/feature-libs/product/variants/assets/translations/ko/index.ts new file mode 100644 index 00000000000..d93552be03f --- /dev/null +++ b/feature-libs/product/variants/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productVariants from './productVariants.json'; +export const ko = { + productVariants, +}; diff --git a/feature-libs/product/variants/assets/translations/pl/index.ts b/feature-libs/product/variants/assets/translations/pl/index.ts new file mode 100644 index 00000000000..18385edcc0d --- /dev/null +++ b/feature-libs/product/variants/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productVariants from './productVariants.json'; +export const pl = { + productVariants, +}; diff --git a/feature-libs/product/variants/assets/translations/pt/index.ts b/feature-libs/product/variants/assets/translations/pt/index.ts new file mode 100644 index 00000000000..462d1c14cb9 --- /dev/null +++ b/feature-libs/product/variants/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productVariants from './productVariants.json'; +export const pt = { + productVariants, +}; diff --git a/feature-libs/product/variants/assets/translations/ru/index.ts b/feature-libs/product/variants/assets/translations/ru/index.ts new file mode 100644 index 00000000000..27359951e92 --- /dev/null +++ b/feature-libs/product/variants/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productVariants from './productVariants.json'; +export const ru = { + productVariants, +}; diff --git a/feature-libs/product/variants/assets/translations/translations.ts b/feature-libs/product/variants/assets/translations/translations.ts index 9eea882eb53..7aca927de7f 100644 --- a/feature-libs/product/variants/assets/translations/translations.ts +++ b/feature-libs/product/variants/assets/translations/translations.ts @@ -4,20 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const productVariantsTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const productVariantsTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -// expose all translation chunk mapping for variants sub features -export const productVariantsTranslationChunksConfig: TranslationChunksConfig = { - productVariants: ['productVariants'], -}; +export { cs as productVariantsTranslationsCs } from './cs/index'; +export { de as productVariantsTranslationsDe } from './de/index'; +export { en as productVariantsTranslationsEn } from './en/index'; +export { es as productVariantsTranslationsEs } from './es/index'; +export { es_CO as productVariantsTranslationsEs_CO } from './es_CO/index'; +export { fr as productVariantsTranslationsFr } from './fr/index'; +export { hi as productVariantsTranslationsHi } from './hi/index'; +export { hu as productVariantsTranslationsHu } from './hu/index'; +export { id as productVariantsTranslationsId } from './id/index'; +export { it as productVariantsTranslationsIt } from './it/index'; +export { ja as productVariantsTranslationsJa } from './ja/index'; +export { ko as productVariantsTranslationsKo } from './ko/index'; +export { pl as productVariantsTranslationsPl } from './pl/index'; +export { pt as productVariantsTranslationsPt } from './pt/index'; +export { ru as productVariantsTranslationsRu } from './ru/index'; +export { zh as productVariantsTranslationsZh } from './zh/index'; +export { zh_TW as productVariantsTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/product/variants/assets/translations/zh/index.ts b/feature-libs/product/variants/assets/translations/zh/index.ts index 372f0c22a26..fc1170bd4fc 100644 --- a/feature-libs/product/variants/assets/translations/zh/index.ts +++ b/feature-libs/product/variants/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import productVariants from './productVariants.json'; - export const zh = { productVariants, }; diff --git a/feature-libs/product/variants/assets/translations/zh_TW/index.ts b/feature-libs/product/variants/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..c36a70192fa --- /dev/null +++ b/feature-libs/product/variants/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import productVariants from './productVariants.json'; +export const zh_TW = { + productVariants, +}; diff --git a/feature-libs/quote/assets/public_api.ts b/feature-libs/quote/assets/public_api.ts index 0784e372a0d..1ada8303b0f 100644 --- a/feature-libs/quote/assets/public_api.ts +++ b/feature-libs/quote/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { quoteTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: quoteTranslations + * + resources: { en: quoteTranslationsEn } + * } + * ``` + */ +export const quoteTranslations = { + en: quoteTranslationsEn, +}; diff --git a/feature-libs/quote/assets/translations/cs/index.ts b/feature-libs/quote/assets/translations/cs/index.ts new file mode 100644 index 00000000000..8857fea4bd6 --- /dev/null +++ b/feature-libs/quote/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quote from './quote.json'; +export const cs = { + quote, +}; diff --git a/feature-libs/quote/assets/translations/de/index.ts b/feature-libs/quote/assets/translations/de/index.ts index 7a798b98865..8e7613fe2f5 100644 --- a/feature-libs/quote/assets/translations/de/index.ts +++ b/feature-libs/quote/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import quote from './quote.json'; - export const de = { quote, }; diff --git a/feature-libs/quote/assets/translations/en/index.ts b/feature-libs/quote/assets/translations/en/index.ts index 5530fe1a689..821ce555bd6 100644 --- a/feature-libs/quote/assets/translations/en/index.ts +++ b/feature-libs/quote/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import quote from './quote.json'; - export const en = { quote, }; diff --git a/feature-libs/quote/assets/translations/es/index.ts b/feature-libs/quote/assets/translations/es/index.ts new file mode 100644 index 00000000000..05032b254c7 --- /dev/null +++ b/feature-libs/quote/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quote from './quote.json'; +export const es = { + quote, +}; diff --git a/feature-libs/quote/assets/translations/es_CO/index.ts b/feature-libs/quote/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..8baddc0b509 --- /dev/null +++ b/feature-libs/quote/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quote from './quote.json'; +export const es_CO = { + quote, +}; diff --git a/feature-libs/quote/assets/translations/fr/index.ts b/feature-libs/quote/assets/translations/fr/index.ts new file mode 100644 index 00000000000..069076720aa --- /dev/null +++ b/feature-libs/quote/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quote from './quote.json'; +export const fr = { + quote, +}; diff --git a/feature-libs/quote/assets/translations/hi/index.ts b/feature-libs/quote/assets/translations/hi/index.ts new file mode 100644 index 00000000000..e9b443947f5 --- /dev/null +++ b/feature-libs/quote/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quote from './quote.json'; +export const hi = { + quote, +}; diff --git a/feature-libs/quote/assets/translations/hu/index.ts b/feature-libs/quote/assets/translations/hu/index.ts new file mode 100644 index 00000000000..109378f39f7 --- /dev/null +++ b/feature-libs/quote/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quote from './quote.json'; +export const hu = { + quote, +}; diff --git a/feature-libs/quote/assets/translations/id/index.ts b/feature-libs/quote/assets/translations/id/index.ts new file mode 100644 index 00000000000..67ba0832a7e --- /dev/null +++ b/feature-libs/quote/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quote from './quote.json'; +export const id = { + quote, +}; diff --git a/feature-libs/quote/assets/translations/it/index.ts b/feature-libs/quote/assets/translations/it/index.ts new file mode 100644 index 00000000000..edf0c3d49ba --- /dev/null +++ b/feature-libs/quote/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quote from './quote.json'; +export const it = { + quote, +}; diff --git a/feature-libs/quote/assets/translations/ja/index.ts b/feature-libs/quote/assets/translations/ja/index.ts index 60ca59e169c..4b293ced0f0 100644 --- a/feature-libs/quote/assets/translations/ja/index.ts +++ b/feature-libs/quote/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import quote from './quote.json'; - export const ja = { quote, }; diff --git a/feature-libs/quote/assets/translations/ko/index.ts b/feature-libs/quote/assets/translations/ko/index.ts new file mode 100644 index 00000000000..8ee617c1ed5 --- /dev/null +++ b/feature-libs/quote/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quote from './quote.json'; +export const ko = { + quote, +}; diff --git a/feature-libs/quote/assets/translations/pl/index.ts b/feature-libs/quote/assets/translations/pl/index.ts new file mode 100644 index 00000000000..48363624bd9 --- /dev/null +++ b/feature-libs/quote/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quote from './quote.json'; +export const pl = { + quote, +}; diff --git a/feature-libs/quote/assets/translations/pt/index.ts b/feature-libs/quote/assets/translations/pt/index.ts new file mode 100644 index 00000000000..b4d83d2d0a9 --- /dev/null +++ b/feature-libs/quote/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quote from './quote.json'; +export const pt = { + quote, +}; diff --git a/feature-libs/quote/assets/translations/ru/index.ts b/feature-libs/quote/assets/translations/ru/index.ts new file mode 100644 index 00000000000..d5003bc5038 --- /dev/null +++ b/feature-libs/quote/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quote from './quote.json'; +export const ru = { + quote, +}; diff --git a/feature-libs/quote/assets/translations/translations.ts b/feature-libs/quote/assets/translations/translations.ts index abb28b5a181..656b4e13936 100644 --- a/feature-libs/quote/assets/translations/translations.ts +++ b/feature-libs/quote/assets/translations/translations.ts @@ -4,17 +4,24 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const quoteTranslationChunksConfig = extractTranslationChunksConfig(en); -export const quoteTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const quoteTranslationChunksConfig: TranslationChunksConfig = {}; +export { cs as quoteTranslationsCs } from './cs/index'; +export { de as quoteTranslationsDe } from './de/index'; +export { en as quoteTranslationsEn } from './en/index'; +export { es as quoteTranslationsEs } from './es/index'; +export { es_CO as quoteTranslationsEs_CO } from './es_CO/index'; +export { fr as quoteTranslationsFr } from './fr/index'; +export { hi as quoteTranslationsHi } from './hi/index'; +export { hu as quoteTranslationsHu } from './hu/index'; +export { id as quoteTranslationsId } from './id/index'; +export { it as quoteTranslationsIt } from './it/index'; +export { ja as quoteTranslationsJa } from './ja/index'; +export { ko as quoteTranslationsKo } from './ko/index'; +export { pl as quoteTranslationsPl } from './pl/index'; +export { pt as quoteTranslationsPt } from './pt/index'; +export { ru as quoteTranslationsRu } from './ru/index'; +export { zh as quoteTranslationsZh } from './zh/index'; +export { zh_TW as quoteTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/quote/assets/translations/zh/index.ts b/feature-libs/quote/assets/translations/zh/index.ts index 00198349767..77430556ae2 100644 --- a/feature-libs/quote/assets/translations/zh/index.ts +++ b/feature-libs/quote/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import quote from './quote.json'; - export const zh = { quote, }; diff --git a/feature-libs/quote/assets/translations/zh_TW/index.ts b/feature-libs/quote/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..371732f38dc --- /dev/null +++ b/feature-libs/quote/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import quote from './quote.json'; +export const zh_TW = { + quote, +}; diff --git a/feature-libs/quote/schematics/add-quote/__snapshots__/index_spec.ts.snap b/feature-libs/quote/schematics/add-quote/__snapshots__/index_spec.ts.snap index 87aff6bfd93..f5822ec5bea 100644 --- a/feature-libs/quote/schematics/add-quote/__snapshots__/index_spec.ts.snap +++ b/feature-libs/quote/schematics/add-quote/__snapshots__/index_spec.ts.snap @@ -4,7 +4,7 @@ exports[`Spartacus Quote schematics: ng-add Quote feature eager loading should i "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { QuoteModule } from "@spartacus/quote"; -import { quoteTranslationChunksConfig, quoteTranslations } from "@spartacus/quote/assets"; +import { quoteTranslationChunksConfig, quoteTranslationsEn } from "@spartacus/quote/assets"; import { QuoteCartGuardComponentModule } from "@spartacus/quote/components/cart-guard"; import { QuoteRequestButtonModule } from "@spartacus/quote/components/request-button"; import { QuoteRootModule } from "@spartacus/quote/root"; @@ -19,7 +19,7 @@ import { QuoteRootModule } from "@spartacus/quote/root"; ], providers: [provideConfig({ i18n: { - resources: quoteTranslations, + resources: { en: quoteTranslationsEn }, chunks: quoteTranslationChunksConfig, }, })] @@ -30,7 +30,7 @@ export class QuoteFeatureModule { } exports[`Spartacus Quote schematics: ng-add Quote feature general setup b2b features should be added for quote library 1`] = ` "import { NgModule } from '@angular/core'; -import { translationChunksConfig, translations } from "@spartacus/assets"; +import { translationChunksConfig, translationsEn } from "@spartacus/assets"; import { FeaturesConfig, I18nConfig, OccConfig, provideConfig, SiteContextConfig } from "@spartacus/core"; import { defaultB2bOccConfig } from "@spartacus/setup"; import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacus/storefront"; @@ -49,7 +49,7 @@ import { defaultCmsContentProviders, layoutConfig, mediaConfig } from "@spartacu context: {}, }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunksConfig, fallbackLang: 'en' }, @@ -66,7 +66,7 @@ export class SpartacusConfigurationModule { } exports[`Spartacus Quote schematics: ng-add Quote feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { quoteTranslationChunksConfig, quoteTranslations } from "@spartacus/quote/assets"; +import { quoteTranslationChunksConfig, quoteTranslationsEn } from "@spartacus/quote/assets"; import { QUOTE_CART_GUARD_FEATURE, QUOTE_FEATURE, QUOTE_REQUEST_FEATURE, QuoteRootModule } from "@spartacus/quote/root"; @NgModule({ @@ -100,7 +100,7 @@ import { QUOTE_CART_GUARD_FEATURE, QUOTE_FEATURE, QUOTE_REQUEST_FEATURE, QuoteRo }), provideConfig({ i18n: { - resources: quoteTranslations, + resources: { en: quoteTranslationsEn }, chunks: quoteTranslationChunksConfig, }, }) diff --git a/feature-libs/requested-delivery-date/assets/public_api.ts b/feature-libs/requested-delivery-date/assets/public_api.ts index 0784e372a0d..f7faac62fb3 100644 --- a/feature-libs/requested-delivery-date/assets/public_api.ts +++ b/feature-libs/requested-delivery-date/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { requestedDeliveryDateTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: requestedDeliveryDateTranslations + * + resources: { en: requestedDeliveryDateTranslationsEn } + * } + * ``` + */ +export const requestedDeliveryDateTranslations = { + en: requestedDeliveryDateTranslationsEn, +}; diff --git a/feature-libs/requested-delivery-date/assets/translations/cs/index.ts b/feature-libs/requested-delivery-date/assets/translations/cs/index.ts new file mode 100644 index 00000000000..5d63dc545bd --- /dev/null +++ b/feature-libs/requested-delivery-date/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import requestedDeliveryDate from './requestedDeliveryDate.json'; +export const cs = { + requestedDeliveryDate, +}; diff --git a/feature-libs/requested-delivery-date/assets/translations/de/index.ts b/feature-libs/requested-delivery-date/assets/translations/de/index.ts index 2a2518687d7..59fc59815ce 100644 --- a/feature-libs/requested-delivery-date/assets/translations/de/index.ts +++ b/feature-libs/requested-delivery-date/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import requestedDeliveryDate from './requestedDeliveryDate.json'; - export const de = { requestedDeliveryDate, }; diff --git a/feature-libs/requested-delivery-date/assets/translations/en/index.ts b/feature-libs/requested-delivery-date/assets/translations/en/index.ts index 321651332b5..40abf67562a 100644 --- a/feature-libs/requested-delivery-date/assets/translations/en/index.ts +++ b/feature-libs/requested-delivery-date/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import requestedDeliveryDate from './requestedDeliveryDate.json'; - export const en = { requestedDeliveryDate, }; diff --git a/feature-libs/requested-delivery-date/assets/translations/es/index.ts b/feature-libs/requested-delivery-date/assets/translations/es/index.ts new file mode 100644 index 00000000000..df73549b3ba --- /dev/null +++ b/feature-libs/requested-delivery-date/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import requestedDeliveryDate from './requestedDeliveryDate.json'; +export const es = { + requestedDeliveryDate, +}; diff --git a/feature-libs/requested-delivery-date/assets/translations/es_CO/index.ts b/feature-libs/requested-delivery-date/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..929be6a5036 --- /dev/null +++ b/feature-libs/requested-delivery-date/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import requestedDeliveryDate from './requestedDeliveryDate.json'; +export const es_CO = { + requestedDeliveryDate, +}; diff --git a/feature-libs/requested-delivery-date/assets/translations/fr/index.ts b/feature-libs/requested-delivery-date/assets/translations/fr/index.ts new file mode 100644 index 00000000000..5d385c28625 --- /dev/null +++ b/feature-libs/requested-delivery-date/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import requestedDeliveryDate from './requestedDeliveryDate.json'; +export const fr = { + requestedDeliveryDate, +}; diff --git a/feature-libs/requested-delivery-date/assets/translations/hi/index.ts b/feature-libs/requested-delivery-date/assets/translations/hi/index.ts new file mode 100644 index 00000000000..317f7da5c46 --- /dev/null +++ b/feature-libs/requested-delivery-date/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import requestedDeliveryDate from './requestedDeliveryDate.json'; +export const hi = { + requestedDeliveryDate, +}; diff --git a/feature-libs/requested-delivery-date/assets/translations/hu/index.ts b/feature-libs/requested-delivery-date/assets/translations/hu/index.ts new file mode 100644 index 00000000000..1880149e68d --- /dev/null +++ b/feature-libs/requested-delivery-date/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import requestedDeliveryDate from './requestedDeliveryDate.json'; +export const hu = { + requestedDeliveryDate, +}; diff --git a/feature-libs/requested-delivery-date/assets/translations/id/index.ts b/feature-libs/requested-delivery-date/assets/translations/id/index.ts new file mode 100644 index 00000000000..a93e10e5432 --- /dev/null +++ b/feature-libs/requested-delivery-date/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import requestedDeliveryDate from './requestedDeliveryDate.json'; +export const id = { + requestedDeliveryDate, +}; diff --git a/feature-libs/requested-delivery-date/assets/translations/it/index.ts b/feature-libs/requested-delivery-date/assets/translations/it/index.ts new file mode 100644 index 00000000000..924a27a3fb1 --- /dev/null +++ b/feature-libs/requested-delivery-date/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import requestedDeliveryDate from './requestedDeliveryDate.json'; +export const it = { + requestedDeliveryDate, +}; diff --git a/feature-libs/requested-delivery-date/assets/translations/ja/index.ts b/feature-libs/requested-delivery-date/assets/translations/ja/index.ts index 45ab52d7803..b5c358f9a2d 100644 --- a/feature-libs/requested-delivery-date/assets/translations/ja/index.ts +++ b/feature-libs/requested-delivery-date/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import requestedDeliveryDate from './requestedDeliveryDate.json'; - export const ja = { requestedDeliveryDate, }; diff --git a/feature-libs/requested-delivery-date/assets/translations/ko/index.ts b/feature-libs/requested-delivery-date/assets/translations/ko/index.ts new file mode 100644 index 00000000000..459fc9cfd01 --- /dev/null +++ b/feature-libs/requested-delivery-date/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import requestedDeliveryDate from './requestedDeliveryDate.json'; +export const ko = { + requestedDeliveryDate, +}; diff --git a/feature-libs/requested-delivery-date/assets/translations/pl/index.ts b/feature-libs/requested-delivery-date/assets/translations/pl/index.ts new file mode 100644 index 00000000000..995f8f0724e --- /dev/null +++ b/feature-libs/requested-delivery-date/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import requestedDeliveryDate from './requestedDeliveryDate.json'; +export const pl = { + requestedDeliveryDate, +}; diff --git a/feature-libs/requested-delivery-date/assets/translations/pt/index.ts b/feature-libs/requested-delivery-date/assets/translations/pt/index.ts new file mode 100644 index 00000000000..d193f4a33a8 --- /dev/null +++ b/feature-libs/requested-delivery-date/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import requestedDeliveryDate from './requestedDeliveryDate.json'; +export const pt = { + requestedDeliveryDate, +}; diff --git a/feature-libs/requested-delivery-date/assets/translations/ru/index.ts b/feature-libs/requested-delivery-date/assets/translations/ru/index.ts new file mode 100644 index 00000000000..d96b81485d5 --- /dev/null +++ b/feature-libs/requested-delivery-date/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import requestedDeliveryDate from './requestedDeliveryDate.json'; +export const ru = { + requestedDeliveryDate, +}; diff --git a/feature-libs/requested-delivery-date/assets/translations/translations.ts b/feature-libs/requested-delivery-date/assets/translations/translations.ts index 2f8e26f090d..5f186455656 100644 --- a/feature-libs/requested-delivery-date/assets/translations/translations.ts +++ b/feature-libs/requested-delivery-date/assets/translations/translations.ts @@ -4,20 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const requestedDeliveryDateTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const requestedDeliveryDateTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const requestedDeliveryDateTranslationChunksConfig: TranslationChunksConfig = - { - requestedDeliveryDate: ['requestedDeliveryDate'], - }; +export { cs as requestedDeliveryDateTranslationsCs } from './cs/index'; +export { de as requestedDeliveryDateTranslationsDe } from './de/index'; +export { en as requestedDeliveryDateTranslationsEn } from './en/index'; +export { es as requestedDeliveryDateTranslationsEs } from './es/index'; +export { es_CO as requestedDeliveryDateTranslationsEs_CO } from './es_CO/index'; +export { fr as requestedDeliveryDateTranslationsFr } from './fr/index'; +export { hi as requestedDeliveryDateTranslationsHi } from './hi/index'; +export { hu as requestedDeliveryDateTranslationsHu } from './hu/index'; +export { id as requestedDeliveryDateTranslationsId } from './id/index'; +export { it as requestedDeliveryDateTranslationsIt } from './it/index'; +export { ja as requestedDeliveryDateTranslationsJa } from './ja/index'; +export { ko as requestedDeliveryDateTranslationsKo } from './ko/index'; +export { pl as requestedDeliveryDateTranslationsPl } from './pl/index'; +export { pt as requestedDeliveryDateTranslationsPt } from './pt/index'; +export { ru as requestedDeliveryDateTranslationsRu } from './ru/index'; +export { zh as requestedDeliveryDateTranslationsZh } from './zh/index'; +export { zh_TW as requestedDeliveryDateTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/requested-delivery-date/assets/translations/zh/index.ts b/feature-libs/requested-delivery-date/assets/translations/zh/index.ts index 185dfea6fad..3c849b1dda1 100644 --- a/feature-libs/requested-delivery-date/assets/translations/zh/index.ts +++ b/feature-libs/requested-delivery-date/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import requestedDeliveryDate from './requestedDeliveryDate.json'; - export const zh = { requestedDeliveryDate, }; diff --git a/feature-libs/requested-delivery-date/assets/translations/zh_TW/index.ts b/feature-libs/requested-delivery-date/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..92994fe160f --- /dev/null +++ b/feature-libs/requested-delivery-date/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import requestedDeliveryDate from './requestedDeliveryDate.json'; +export const zh_TW = { + requestedDeliveryDate, +}; diff --git a/feature-libs/storefinder/assets/public_api.ts b/feature-libs/storefinder/assets/public_api.ts index 0784e372a0d..0d565c8f847 100644 --- a/feature-libs/storefinder/assets/public_api.ts +++ b/feature-libs/storefinder/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { storeFinderTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: storeFinderTranslations + * + resources: { en: storeFinderTranslationsEn } + * } + * ``` + */ +export const storeFinderTranslations = { + en: storeFinderTranslationsEn, +}; diff --git a/feature-libs/storefinder/assets/translations/cs/index.ts b/feature-libs/storefinder/assets/translations/cs/index.ts new file mode 100644 index 00000000000..5cdb4ec7cf9 --- /dev/null +++ b/feature-libs/storefinder/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import storeFinder from './storeFinder.json'; +export const cs = { + storeFinder, +}; diff --git a/feature-libs/storefinder/assets/translations/de/index.ts b/feature-libs/storefinder/assets/translations/de/index.ts index dce4d19e88c..26f9bff653c 100644 --- a/feature-libs/storefinder/assets/translations/de/index.ts +++ b/feature-libs/storefinder/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import storeFinder from './storeFinder.json'; - export const de = { storeFinder, }; diff --git a/feature-libs/storefinder/assets/translations/en/index.ts b/feature-libs/storefinder/assets/translations/en/index.ts index 3af04295821..02e5c97687c 100644 --- a/feature-libs/storefinder/assets/translations/en/index.ts +++ b/feature-libs/storefinder/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import storeFinder from './storeFinder.json'; - export const en = { storeFinder, }; diff --git a/feature-libs/storefinder/assets/translations/es/index.ts b/feature-libs/storefinder/assets/translations/es/index.ts new file mode 100644 index 00000000000..cb661e29b3e --- /dev/null +++ b/feature-libs/storefinder/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import storeFinder from './storeFinder.json'; +export const es = { + storeFinder, +}; diff --git a/feature-libs/storefinder/assets/translations/es_CO/index.ts b/feature-libs/storefinder/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..bbdb9715753 --- /dev/null +++ b/feature-libs/storefinder/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import storeFinder from './storeFinder.json'; +export const es_CO = { + storeFinder, +}; diff --git a/feature-libs/storefinder/assets/translations/fr/index.ts b/feature-libs/storefinder/assets/translations/fr/index.ts new file mode 100644 index 00000000000..d8782474761 --- /dev/null +++ b/feature-libs/storefinder/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import storeFinder from './storeFinder.json'; +export const fr = { + storeFinder, +}; diff --git a/feature-libs/storefinder/assets/translations/hi/index.ts b/feature-libs/storefinder/assets/translations/hi/index.ts new file mode 100644 index 00000000000..72d639d6f76 --- /dev/null +++ b/feature-libs/storefinder/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import storeFinder from './storeFinder.json'; +export const hi = { + storeFinder, +}; diff --git a/feature-libs/storefinder/assets/translations/hu/index.ts b/feature-libs/storefinder/assets/translations/hu/index.ts new file mode 100644 index 00000000000..988c0f7d65b --- /dev/null +++ b/feature-libs/storefinder/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import storeFinder from './storeFinder.json'; +export const hu = { + storeFinder, +}; diff --git a/feature-libs/storefinder/assets/translations/id/index.ts b/feature-libs/storefinder/assets/translations/id/index.ts new file mode 100644 index 00000000000..0f97954257f --- /dev/null +++ b/feature-libs/storefinder/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import storeFinder from './storeFinder.json'; +export const id = { + storeFinder, +}; diff --git a/feature-libs/storefinder/assets/translations/it/index.ts b/feature-libs/storefinder/assets/translations/it/index.ts new file mode 100644 index 00000000000..95fa2b9c69b --- /dev/null +++ b/feature-libs/storefinder/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import storeFinder from './storeFinder.json'; +export const it = { + storeFinder, +}; diff --git a/feature-libs/storefinder/assets/translations/ja/index.ts b/feature-libs/storefinder/assets/translations/ja/index.ts index 4d85875b759..0b01a78e119 100644 --- a/feature-libs/storefinder/assets/translations/ja/index.ts +++ b/feature-libs/storefinder/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import storeFinder from './storeFinder.json'; - export const ja = { storeFinder, }; diff --git a/feature-libs/storefinder/assets/translations/ko/index.ts b/feature-libs/storefinder/assets/translations/ko/index.ts new file mode 100644 index 00000000000..c755af7998f --- /dev/null +++ b/feature-libs/storefinder/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import storeFinder from './storeFinder.json'; +export const ko = { + storeFinder, +}; diff --git a/feature-libs/storefinder/assets/translations/pl/index.ts b/feature-libs/storefinder/assets/translations/pl/index.ts new file mode 100644 index 00000000000..707093b4cb7 --- /dev/null +++ b/feature-libs/storefinder/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import storeFinder from './storeFinder.json'; +export const pl = { + storeFinder, +}; diff --git a/feature-libs/storefinder/assets/translations/pt/index.ts b/feature-libs/storefinder/assets/translations/pt/index.ts new file mode 100644 index 00000000000..da04b27a211 --- /dev/null +++ b/feature-libs/storefinder/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import storeFinder from './storeFinder.json'; +export const pt = { + storeFinder, +}; diff --git a/feature-libs/storefinder/assets/translations/ru/index.ts b/feature-libs/storefinder/assets/translations/ru/index.ts new file mode 100644 index 00000000000..be0c616eb1c --- /dev/null +++ b/feature-libs/storefinder/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import storeFinder from './storeFinder.json'; +export const ru = { + storeFinder, +}; diff --git a/feature-libs/storefinder/assets/translations/translations.ts b/feature-libs/storefinder/assets/translations/translations.ts index 3029f4422b9..d99d2d36f38 100644 --- a/feature-libs/storefinder/assets/translations/translations.ts +++ b/feature-libs/storefinder/assets/translations/translations.ts @@ -4,19 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const storeFinderTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const storeFinderTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const storeFinderTranslationChunksConfig: TranslationChunksConfig = { - storeFinder: ['storeFinder'], -}; +export { cs as storeFinderTranslationsCs } from './cs/index'; +export { de as storeFinderTranslationsDe } from './de/index'; +export { en as storeFinderTranslationsEn } from './en/index'; +export { es as storeFinderTranslationsEs } from './es/index'; +export { es_CO as storeFinderTranslationsEs_CO } from './es_CO/index'; +export { fr as storeFinderTranslationsFr } from './fr/index'; +export { hi as storeFinderTranslationsHi } from './hi/index'; +export { hu as storeFinderTranslationsHu } from './hu/index'; +export { id as storeFinderTranslationsId } from './id/index'; +export { it as storeFinderTranslationsIt } from './it/index'; +export { ja as storeFinderTranslationsJa } from './ja/index'; +export { ko as storeFinderTranslationsKo } from './ko/index'; +export { pl as storeFinderTranslationsPl } from './pl/index'; +export { pt as storeFinderTranslationsPt } from './pt/index'; +export { ru as storeFinderTranslationsRu } from './ru/index'; +export { zh as storeFinderTranslationsZh } from './zh/index'; +export { zh_TW as storeFinderTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/storefinder/assets/translations/zh/index.ts b/feature-libs/storefinder/assets/translations/zh/index.ts index 153db73fdc4..12b87366deb 100644 --- a/feature-libs/storefinder/assets/translations/zh/index.ts +++ b/feature-libs/storefinder/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import storeFinder from './storeFinder.json'; - export const zh = { storeFinder, }; diff --git a/feature-libs/storefinder/assets/translations/zh_TW/index.ts b/feature-libs/storefinder/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..64410efe79d --- /dev/null +++ b/feature-libs/storefinder/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import storeFinder from './storeFinder.json'; +export const zh_TW = { + storeFinder, +}; diff --git a/feature-libs/storefinder/schematics/add-storefinder/__snapshots__/index_spec.ts.snap b/feature-libs/storefinder/schematics/add-storefinder/__snapshots__/index_spec.ts.snap index 89cc4ea8e65..e2091d73d58 100644 --- a/feature-libs/storefinder/schematics/add-storefinder/__snapshots__/index_spec.ts.snap +++ b/feature-libs/storefinder/schematics/add-storefinder/__snapshots__/index_spec.ts.snap @@ -4,7 +4,7 @@ exports[`Spartacus Storefinder schematics: ng-add Storefinder feature eager load "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { StoreFinderModule } from "@spartacus/storefinder"; -import { storeFinderTranslationChunksConfig, storeFinderTranslations } from "@spartacus/storefinder/assets"; +import { storeFinderTranslationChunksConfig, storeFinderTranslationsEn } from "@spartacus/storefinder/assets"; import { StoreFinderRootModule } from "@spartacus/storefinder/root"; @NgModule({ @@ -15,7 +15,7 @@ import { StoreFinderRootModule } from "@spartacus/storefinder/root"; ], providers: [provideConfig({ i18n: { - resources: storeFinderTranslations, + resources: { en: storeFinderTranslationsEn }, chunks: storeFinderTranslationChunksConfig, }, })] @@ -27,7 +27,7 @@ export class StoreFinderFeatureModule { } exports[`Spartacus Storefinder schematics: ng-add Storefinder feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { storeFinderTranslationChunksConfig, storeFinderTranslations } from "@spartacus/storefinder/assets"; +import { storeFinderTranslationChunksConfig, storeFinderTranslationsEn } from "@spartacus/storefinder/assets"; import { STORE_FINDER_FEATURE, StoreFinderRootModule } from "@spartacus/storefinder/root"; @NgModule({ @@ -45,7 +45,7 @@ import { STORE_FINDER_FEATURE, StoreFinderRootModule } from "@spartacus/storefin }), provideConfig({ i18n: { - resources: storeFinderTranslations, + resources: { en: storeFinderTranslationsEn }, chunks: storeFinderTranslationChunksConfig, }, }) diff --git a/feature-libs/user/account/assets/public_api.ts b/feature-libs/user/account/assets/public_api.ts index 0784e372a0d..37b410dff95 100644 --- a/feature-libs/user/account/assets/public_api.ts +++ b/feature-libs/user/account/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { userAccountTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: userAccountTranslations + * + resources: { en: userAccountTranslationsEn } + * } + * ``` + */ +export const userAccountTranslations = { + en: userAccountTranslationsEn, +}; diff --git a/feature-libs/user/account/assets/translations/cs/index.ts b/feature-libs/user/account/assets/translations/cs/index.ts new file mode 100644 index 00000000000..4bade2f90d2 --- /dev/null +++ b/feature-libs/user/account/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userAccount from './userAccount.json'; +export const cs = { + userAccount, +}; diff --git a/feature-libs/user/account/assets/translations/de/index.ts b/feature-libs/user/account/assets/translations/de/index.ts index e1d00969fb5..ce3f28fffef 100644 --- a/feature-libs/user/account/assets/translations/de/index.ts +++ b/feature-libs/user/account/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import userAccount from './userAccount.json'; - export const de = { userAccount, }; diff --git a/feature-libs/user/account/assets/translations/en/index.ts b/feature-libs/user/account/assets/translations/en/index.ts index c84c45de19c..63ceb3b5e9d 100644 --- a/feature-libs/user/account/assets/translations/en/index.ts +++ b/feature-libs/user/account/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import userAccount from './userAccount.json'; - export const en = { userAccount, }; diff --git a/feature-libs/user/account/assets/translations/es/index.ts b/feature-libs/user/account/assets/translations/es/index.ts new file mode 100644 index 00000000000..a5fbc94da14 --- /dev/null +++ b/feature-libs/user/account/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userAccount from './userAccount.json'; +export const es = { + userAccount, +}; diff --git a/feature-libs/user/account/assets/translations/es_CO/index.ts b/feature-libs/user/account/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..0aafc257cef --- /dev/null +++ b/feature-libs/user/account/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userAccount from './userAccount.json'; +export const es_CO = { + userAccount, +}; diff --git a/feature-libs/user/account/assets/translations/fr/index.ts b/feature-libs/user/account/assets/translations/fr/index.ts new file mode 100644 index 00000000000..6f4b32a074b --- /dev/null +++ b/feature-libs/user/account/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userAccount from './userAccount.json'; +export const fr = { + userAccount, +}; diff --git a/feature-libs/user/account/assets/translations/hi/index.ts b/feature-libs/user/account/assets/translations/hi/index.ts new file mode 100644 index 00000000000..cf8b746235c --- /dev/null +++ b/feature-libs/user/account/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userAccount from './userAccount.json'; +export const hi = { + userAccount, +}; diff --git a/feature-libs/user/account/assets/translations/hu/index.ts b/feature-libs/user/account/assets/translations/hu/index.ts new file mode 100644 index 00000000000..c8e6c1a5474 --- /dev/null +++ b/feature-libs/user/account/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userAccount from './userAccount.json'; +export const hu = { + userAccount, +}; diff --git a/feature-libs/user/account/assets/translations/id/index.ts b/feature-libs/user/account/assets/translations/id/index.ts new file mode 100644 index 00000000000..f37182f61e3 --- /dev/null +++ b/feature-libs/user/account/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userAccount from './userAccount.json'; +export const id = { + userAccount, +}; diff --git a/feature-libs/user/account/assets/translations/it/index.ts b/feature-libs/user/account/assets/translations/it/index.ts new file mode 100644 index 00000000000..dc7dcb9f431 --- /dev/null +++ b/feature-libs/user/account/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userAccount from './userAccount.json'; +export const it = { + userAccount, +}; diff --git a/feature-libs/user/account/assets/translations/ja/index.ts b/feature-libs/user/account/assets/translations/ja/index.ts index 4aa6db5e77e..8338bc7bbca 100644 --- a/feature-libs/user/account/assets/translations/ja/index.ts +++ b/feature-libs/user/account/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import userAccount from './userAccount.json'; - export const ja = { userAccount, }; diff --git a/feature-libs/user/account/assets/translations/ko/index.ts b/feature-libs/user/account/assets/translations/ko/index.ts new file mode 100644 index 00000000000..f370b8bdc8f --- /dev/null +++ b/feature-libs/user/account/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userAccount from './userAccount.json'; +export const ko = { + userAccount, +}; diff --git a/feature-libs/user/account/assets/translations/pl/index.ts b/feature-libs/user/account/assets/translations/pl/index.ts new file mode 100644 index 00000000000..36200e4fd8e --- /dev/null +++ b/feature-libs/user/account/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userAccount from './userAccount.json'; +export const pl = { + userAccount, +}; diff --git a/feature-libs/user/account/assets/translations/pt/index.ts b/feature-libs/user/account/assets/translations/pt/index.ts new file mode 100644 index 00000000000..9c3f0765113 --- /dev/null +++ b/feature-libs/user/account/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userAccount from './userAccount.json'; +export const pt = { + userAccount, +}; diff --git a/feature-libs/user/account/assets/translations/ru/index.ts b/feature-libs/user/account/assets/translations/ru/index.ts new file mode 100644 index 00000000000..27455c74fa9 --- /dev/null +++ b/feature-libs/user/account/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userAccount from './userAccount.json'; +export const ru = { + userAccount, +}; diff --git a/feature-libs/user/account/assets/translations/translations.ts b/feature-libs/user/account/assets/translations/translations.ts index c08b1cc032d..ba3c3512574 100644 --- a/feature-libs/user/account/assets/translations/translations.ts +++ b/feature-libs/user/account/assets/translations/translations.ts @@ -4,25 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const userAccountTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const userAccountTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const userAccountTranslationChunksConfig: TranslationChunksConfig = { - userAccount: [ - 'loginForm', - 'verificationTokenForm', - 'verificationTokenDialog', - 'miniLogin', - 'myAccountV2User', - ], -}; +export { cs as userAccountTranslationsCs } from './cs/index'; +export { de as userAccountTranslationsDe } from './de/index'; +export { en as userAccountTranslationsEn } from './en/index'; +export { es as userAccountTranslationsEs } from './es/index'; +export { es_CO as userAccountTranslationsEs_CO } from './es_CO/index'; +export { fr as userAccountTranslationsFr } from './fr/index'; +export { hi as userAccountTranslationsHi } from './hi/index'; +export { hu as userAccountTranslationsHu } from './hu/index'; +export { id as userAccountTranslationsId } from './id/index'; +export { it as userAccountTranslationsIt } from './it/index'; +export { ja as userAccountTranslationsJa } from './ja/index'; +export { ko as userAccountTranslationsKo } from './ko/index'; +export { pl as userAccountTranslationsPl } from './pl/index'; +export { pt as userAccountTranslationsPt } from './pt/index'; +export { ru as userAccountTranslationsRu } from './ru/index'; +export { zh as userAccountTranslationsZh } from './zh/index'; +export { zh_TW as userAccountTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/user/account/assets/translations/zh/index.ts b/feature-libs/user/account/assets/translations/zh/index.ts index 92d4f3801a7..0ba912efb95 100644 --- a/feature-libs/user/account/assets/translations/zh/index.ts +++ b/feature-libs/user/account/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import userAccount from './userAccount.json'; - export const zh = { userAccount, }; diff --git a/feature-libs/user/account/assets/translations/zh_TW/index.ts b/feature-libs/user/account/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..3d101f86b58 --- /dev/null +++ b/feature-libs/user/account/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import userAccount from './userAccount.json'; +export const zh_TW = { + userAccount, +}; diff --git a/feature-libs/user/profile/assets/public_api.ts b/feature-libs/user/profile/assets/public_api.ts index 0784e372a0d..fee9681790c 100644 --- a/feature-libs/user/profile/assets/public_api.ts +++ b/feature-libs/user/profile/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { userProfileTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: userProfileTranslations + * + resources: { en: userProfileTranslationsEn } + * } + * ``` + */ +export const userProfileTranslations = { + en: userProfileTranslationsEn, +}; diff --git a/feature-libs/user/profile/assets/translations/cs/index.ts b/feature-libs/user/profile/assets/translations/cs/index.ts new file mode 100644 index 00000000000..fa01d7404c5 --- /dev/null +++ b/feature-libs/user/profile/assets/translations/cs/index.ts @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import address from './address.json'; +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; +export const cs = { + address, + myAccountV2Email, + myAccountV2Password, + myAccountV2UserProfile, + userProfile, +}; diff --git a/feature-libs/user/profile/assets/translations/de/index.ts b/feature-libs/user/profile/assets/translations/de/index.ts index bec34f2417c..9a3b80c1894 100644 --- a/feature-libs/user/profile/assets/translations/de/index.ts +++ b/feature-libs/user/profile/assets/translations/de/index.ts @@ -4,17 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import userProfile from './userProfile.json'; import address from './address.json'; -// TODO after we get translation we need to change -import myAccountV2Email from '../en/myAccountV2Email.json'; -import myAccountV2UserProfile from '../en/myAccountV2UserProfile.json'; -import myAccountV2Password from '../en/myAccountV2Password.json'; - +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; export const de = { - userProfile, - myAccountV2UserProfile, + address, myAccountV2Email, myAccountV2Password, - address, + myAccountV2UserProfile, + userProfile, }; diff --git a/feature-libs/user/profile/assets/translations/en/index.ts b/feature-libs/user/profile/assets/translations/en/index.ts index 12354b20de0..c80edaac6e4 100644 --- a/feature-libs/user/profile/assets/translations/en/index.ts +++ b/feature-libs/user/profile/assets/translations/en/index.ts @@ -4,16 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import userProfile from './userProfile.json'; import address from './address.json'; import myAccountV2Email from './myAccountV2Email.json'; -import myAccountV2UserProfile from './myAccountV2UserProfile.json'; import myAccountV2Password from './myAccountV2Password.json'; - +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; export const en = { - userProfile, - myAccountV2UserProfile, + address, myAccountV2Email, myAccountV2Password, - address, + myAccountV2UserProfile, + userProfile, }; diff --git a/feature-libs/user/profile/assets/translations/es/index.ts b/feature-libs/user/profile/assets/translations/es/index.ts new file mode 100644 index 00000000000..99065a0836e --- /dev/null +++ b/feature-libs/user/profile/assets/translations/es/index.ts @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import address from './address.json'; +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; +export const es = { + address, + myAccountV2Email, + myAccountV2Password, + myAccountV2UserProfile, + userProfile, +}; diff --git a/feature-libs/user/profile/assets/translations/es_CO/index.ts b/feature-libs/user/profile/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..06363e821e3 --- /dev/null +++ b/feature-libs/user/profile/assets/translations/es_CO/index.ts @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import address from './address.json'; +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; +export const es_CO = { + address, + myAccountV2Email, + myAccountV2Password, + myAccountV2UserProfile, + userProfile, +}; diff --git a/feature-libs/user/profile/assets/translations/fr/index.ts b/feature-libs/user/profile/assets/translations/fr/index.ts new file mode 100644 index 00000000000..61e19a917db --- /dev/null +++ b/feature-libs/user/profile/assets/translations/fr/index.ts @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import address from './address.json'; +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; +export const fr = { + address, + myAccountV2Email, + myAccountV2Password, + myAccountV2UserProfile, + userProfile, +}; diff --git a/feature-libs/user/profile/assets/translations/hi/index.ts b/feature-libs/user/profile/assets/translations/hi/index.ts new file mode 100644 index 00000000000..5ee74a4d298 --- /dev/null +++ b/feature-libs/user/profile/assets/translations/hi/index.ts @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import address from './address.json'; +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; +export const hi = { + address, + myAccountV2Email, + myAccountV2Password, + myAccountV2UserProfile, + userProfile, +}; diff --git a/feature-libs/user/profile/assets/translations/hu/index.ts b/feature-libs/user/profile/assets/translations/hu/index.ts new file mode 100644 index 00000000000..654d0886327 --- /dev/null +++ b/feature-libs/user/profile/assets/translations/hu/index.ts @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import address from './address.json'; +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; +export const hu = { + address, + myAccountV2Email, + myAccountV2Password, + myAccountV2UserProfile, + userProfile, +}; diff --git a/feature-libs/user/profile/assets/translations/id/index.ts b/feature-libs/user/profile/assets/translations/id/index.ts new file mode 100644 index 00000000000..89e7210aca8 --- /dev/null +++ b/feature-libs/user/profile/assets/translations/id/index.ts @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import address from './address.json'; +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; +export const id = { + address, + myAccountV2Email, + myAccountV2Password, + myAccountV2UserProfile, + userProfile, +}; diff --git a/feature-libs/user/profile/assets/translations/it/index.ts b/feature-libs/user/profile/assets/translations/it/index.ts new file mode 100644 index 00000000000..70f251f3454 --- /dev/null +++ b/feature-libs/user/profile/assets/translations/it/index.ts @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import address from './address.json'; +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; +export const it = { + address, + myAccountV2Email, + myAccountV2Password, + myAccountV2UserProfile, + userProfile, +}; diff --git a/feature-libs/user/profile/assets/translations/ja/index.ts b/feature-libs/user/profile/assets/translations/ja/index.ts index 89663a391ed..29475262daa 100644 --- a/feature-libs/user/profile/assets/translations/ja/index.ts +++ b/feature-libs/user/profile/assets/translations/ja/index.ts @@ -4,17 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import userProfile from './userProfile.json'; import address from './address.json'; -// TODO after we get translation we need to change -import myAccountV2Email from '../en/myAccountV2Email.json'; -import myAccountV2UserProfile from '../en/myAccountV2UserProfile.json'; -import myAccountV2Password from '../en/myAccountV2Password.json'; - +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; export const ja = { - userProfile, - myAccountV2UserProfile, + address, myAccountV2Email, myAccountV2Password, - address, + myAccountV2UserProfile, + userProfile, }; diff --git a/feature-libs/user/profile/assets/translations/ko/index.ts b/feature-libs/user/profile/assets/translations/ko/index.ts new file mode 100644 index 00000000000..47a69da2159 --- /dev/null +++ b/feature-libs/user/profile/assets/translations/ko/index.ts @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import address from './address.json'; +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; +export const ko = { + address, + myAccountV2Email, + myAccountV2Password, + myAccountV2UserProfile, + userProfile, +}; diff --git a/feature-libs/user/profile/assets/translations/pl/index.ts b/feature-libs/user/profile/assets/translations/pl/index.ts new file mode 100644 index 00000000000..b3936de3ceb --- /dev/null +++ b/feature-libs/user/profile/assets/translations/pl/index.ts @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import address from './address.json'; +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; +export const pl = { + address, + myAccountV2Email, + myAccountV2Password, + myAccountV2UserProfile, + userProfile, +}; diff --git a/feature-libs/user/profile/assets/translations/pt/index.ts b/feature-libs/user/profile/assets/translations/pt/index.ts new file mode 100644 index 00000000000..1e8ea8e40c5 --- /dev/null +++ b/feature-libs/user/profile/assets/translations/pt/index.ts @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import address from './address.json'; +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; +export const pt = { + address, + myAccountV2Email, + myAccountV2Password, + myAccountV2UserProfile, + userProfile, +}; diff --git a/feature-libs/user/profile/assets/translations/ru/index.ts b/feature-libs/user/profile/assets/translations/ru/index.ts new file mode 100644 index 00000000000..2939a45954e --- /dev/null +++ b/feature-libs/user/profile/assets/translations/ru/index.ts @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import address from './address.json'; +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; +export const ru = { + address, + myAccountV2Email, + myAccountV2Password, + myAccountV2UserProfile, + userProfile, +}; diff --git a/feature-libs/user/profile/assets/translations/translations.ts b/feature-libs/user/profile/assets/translations/translations.ts index 08c82fe53a7..fdb199d5462 100644 --- a/feature-libs/user/profile/assets/translations/translations.ts +++ b/feature-libs/user/profile/assets/translations/translations.ts @@ -4,29 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const userProfileTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const userProfileTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const userProfileTranslationChunksConfig: TranslationChunksConfig = { - userProfile: ['updateEmailForm', 'register', 'forgottenPassword'], - myAccountV2UserProfile: ['myAccountV2UserProfile'], - myAccountV2Email: ['myAccountV2Email'], - myAccountV2Password: ['myAccountV2PasswordForm'], - address: [ - 'addressForm', - 'addressBook', - 'addressCard', - 'addressSuggestion', - 'addressMessages', - ], -}; +export { cs as userProfileTranslationsCs } from './cs/index'; +export { de as userProfileTranslationsDe } from './de/index'; +export { en as userProfileTranslationsEn } from './en/index'; +export { es as userProfileTranslationsEs } from './es/index'; +export { es_CO as userProfileTranslationsEs_CO } from './es_CO/index'; +export { fr as userProfileTranslationsFr } from './fr/index'; +export { hi as userProfileTranslationsHi } from './hi/index'; +export { hu as userProfileTranslationsHu } from './hu/index'; +export { id as userProfileTranslationsId } from './id/index'; +export { it as userProfileTranslationsIt } from './it/index'; +export { ja as userProfileTranslationsJa } from './ja/index'; +export { ko as userProfileTranslationsKo } from './ko/index'; +export { pl as userProfileTranslationsPl } from './pl/index'; +export { pt as userProfileTranslationsPt } from './pt/index'; +export { ru as userProfileTranslationsRu } from './ru/index'; +export { zh as userProfileTranslationsZh } from './zh/index'; +export { zh_TW as userProfileTranslationsZh_TW } from './zh_TW/index'; diff --git a/feature-libs/user/profile/assets/translations/zh/index.ts b/feature-libs/user/profile/assets/translations/zh/index.ts index fbc7030ced1..e1ae750167a 100644 --- a/feature-libs/user/profile/assets/translations/zh/index.ts +++ b/feature-libs/user/profile/assets/translations/zh/index.ts @@ -4,17 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import userProfile from './userProfile.json'; import address from './address.json'; -// TODO after we get translation we need to change -import myAccountV2Email from '../en/myAccountV2Email.json'; -import myAccountV2UserProfile from '../en/myAccountV2UserProfile.json'; -import myAccountV2Password from '../en/myAccountV2Password.json'; - +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; export const zh = { - userProfile, - myAccountV2UserProfile, + address, myAccountV2Email, myAccountV2Password, - address, + myAccountV2UserProfile, + userProfile, }; diff --git a/feature-libs/user/profile/assets/translations/zh_TW/index.ts b/feature-libs/user/profile/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..98298c38b74 --- /dev/null +++ b/feature-libs/user/profile/assets/translations/zh_TW/index.ts @@ -0,0 +1,19 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import address from './address.json'; +import myAccountV2Email from './myAccountV2Email.json'; +import myAccountV2Password from './myAccountV2Password.json'; +import myAccountV2UserProfile from './myAccountV2UserProfile.json'; +import userProfile from './userProfile.json'; +export const zh_TW = { + address, + myAccountV2Email, + myAccountV2Password, + myAccountV2UserProfile, + userProfile, +}; diff --git a/feature-libs/user/schematics/add-user/__snapshots__/index_spec.ts.snap b/feature-libs/user/schematics/add-user/__snapshots__/index_spec.ts.snap index 787c629575d..b4d54c385b6 100644 --- a/feature-libs/user/schematics/add-user/__snapshots__/index_spec.ts.snap +++ b/feature-libs/user/schematics/add-user/__snapshots__/index_spec.ts.snap @@ -4,7 +4,7 @@ exports[`Spartacus User schematics: ng-add User Profile feature eager loading sh "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { UserProfileModule } from "@spartacus/user/profile"; -import { userProfileTranslationChunksConfig, userProfileTranslations } from "@spartacus/user/profile/assets"; +import { userProfileTranslationChunksConfig, userProfileTranslationsEn } from "@spartacus/user/profile/assets"; import { UserProfileRootModule } from "@spartacus/user/profile/root"; @NgModule({ @@ -15,7 +15,7 @@ import { UserProfileRootModule } from "@spartacus/user/profile/root"; ], providers: [provideConfig({ i18n: { - resources: userProfileTranslations, + resources: { en: userProfileTranslationsEn }, chunks: userProfileTranslationChunksConfig, }, })] @@ -27,7 +27,7 @@ export class UserFeatureModule { } exports[`Spartacus User schematics: ng-add User Profile feature general setup should NOT install the required feature dependencies 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { userProfileTranslationChunksConfig, userProfileTranslations } from "@spartacus/user/profile/assets"; +import { userProfileTranslationChunksConfig, userProfileTranslationsEn } from "@spartacus/user/profile/assets"; import { USER_PROFILE_FEATURE, UserProfileRootModule } from "@spartacus/user/profile/root"; @NgModule({ @@ -45,7 +45,7 @@ import { USER_PROFILE_FEATURE, UserProfileRootModule } from "@spartacus/user/pro }), provideConfig({ i18n: { - resources: userProfileTranslations, + resources: { en: userProfileTranslationsEn }, chunks: userProfileTranslationChunksConfig, }, }) @@ -58,7 +58,7 @@ export class UserFeatureModule { } exports[`Spartacus User schematics: ng-add User Profile feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { userProfileTranslationChunksConfig, userProfileTranslations } from "@spartacus/user/profile/assets"; +import { userProfileTranslationChunksConfig, userProfileTranslationsEn } from "@spartacus/user/profile/assets"; import { USER_PROFILE_FEATURE, UserProfileRootModule } from "@spartacus/user/profile/root"; @NgModule({ @@ -76,7 +76,7 @@ import { USER_PROFILE_FEATURE, UserProfileRootModule } from "@spartacus/user/pro }), provideConfig({ i18n: { - resources: userProfileTranslations, + resources: { en: userProfileTranslationsEn }, chunks: userProfileTranslationChunksConfig, }, }) @@ -220,7 +220,7 @@ exports[`Spartacus User schematics: ng-add User-Account feature eager loading sh "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { UserAccountModule } from "@spartacus/user/account"; -import { userAccountTranslationChunksConfig, userAccountTranslations } from "@spartacus/user/account/assets"; +import { userAccountTranslationChunksConfig, userAccountTranslationsEn } from "@spartacus/user/account/assets"; import { UserAccountRootModule } from "@spartacus/user/account/root"; @NgModule({ @@ -231,7 +231,7 @@ import { UserAccountRootModule } from "@spartacus/user/account/root"; ], providers: [provideConfig({ i18n: { - resources: userAccountTranslations, + resources: { en: userAccountTranslationsEn }, chunks: userAccountTranslationChunksConfig, }, })] @@ -243,7 +243,7 @@ export class UserFeatureModule { } exports[`Spartacus User schematics: ng-add User-Account feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { userAccountTranslationChunksConfig, userAccountTranslations } from "@spartacus/user/account/assets"; +import { userAccountTranslationChunksConfig, userAccountTranslationsEn } from "@spartacus/user/account/assets"; import { USER_ACCOUNT_FEATURE, UserAccountRootModule } from "@spartacus/user/account/root"; @NgModule({ @@ -261,7 +261,7 @@ import { USER_ACCOUNT_FEATURE, UserAccountRootModule } from "@spartacus/user/acc }), provideConfig({ i18n: { - resources: userAccountTranslations, + resources: { en: userAccountTranslationsEn }, chunks: userAccountTranslationChunksConfig, }, }) diff --git a/integration-libs/cdc/assets/public_api.ts b/integration-libs/cdc/assets/public_api.ts index 0784e372a0d..d8f41faff23 100644 --- a/integration-libs/cdc/assets/public_api.ts +++ b/integration-libs/cdc/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { cdcTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: cdcTranslations + * + resources: { en: cdcTranslationsEn } + * } + * ``` + */ +export const cdcTranslations = { + en: cdcTranslationsEn, +}; diff --git a/integration-libs/cdc/assets/translations/cs/index.ts b/integration-libs/cdc/assets/translations/cs/index.ts new file mode 100644 index 00000000000..8fe007686de --- /dev/null +++ b/integration-libs/cdc/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cdc from './cdc.json'; +export const cs = { + cdc, +}; diff --git a/integration-libs/cdc/assets/translations/de/index.ts b/integration-libs/cdc/assets/translations/de/index.ts index 63fcfbffd2f..416c2fe25bb 100644 --- a/integration-libs/cdc/assets/translations/de/index.ts +++ b/integration-libs/cdc/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import cdc from './cdc.json'; - export const de = { cdc, }; diff --git a/integration-libs/cdc/assets/translations/en/index.ts b/integration-libs/cdc/assets/translations/en/index.ts index 8537e18d696..69b2966124f 100644 --- a/integration-libs/cdc/assets/translations/en/index.ts +++ b/integration-libs/cdc/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import cdc from './cdc.json'; - export const en = { cdc, }; diff --git a/integration-libs/cdc/assets/translations/es/index.ts b/integration-libs/cdc/assets/translations/es/index.ts new file mode 100644 index 00000000000..d8d0797bbf6 --- /dev/null +++ b/integration-libs/cdc/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cdc from './cdc.json'; +export const es = { + cdc, +}; diff --git a/integration-libs/cdc/assets/translations/es_CO/index.ts b/integration-libs/cdc/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..411d7b2bcb8 --- /dev/null +++ b/integration-libs/cdc/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cdc from './cdc.json'; +export const es_CO = { + cdc, +}; diff --git a/integration-libs/cdc/assets/translations/fr/index.ts b/integration-libs/cdc/assets/translations/fr/index.ts new file mode 100644 index 00000000000..4879c63ed10 --- /dev/null +++ b/integration-libs/cdc/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cdc from './cdc.json'; +export const fr = { + cdc, +}; diff --git a/integration-libs/cdc/assets/translations/hi/index.ts b/integration-libs/cdc/assets/translations/hi/index.ts new file mode 100644 index 00000000000..89d43092c16 --- /dev/null +++ b/integration-libs/cdc/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cdc from './cdc.json'; +export const hi = { + cdc, +}; diff --git a/integration-libs/cdc/assets/translations/hu/index.ts b/integration-libs/cdc/assets/translations/hu/index.ts new file mode 100644 index 00000000000..b70b6e10d9d --- /dev/null +++ b/integration-libs/cdc/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cdc from './cdc.json'; +export const hu = { + cdc, +}; diff --git a/integration-libs/cdc/assets/translations/id/index.ts b/integration-libs/cdc/assets/translations/id/index.ts new file mode 100644 index 00000000000..3f766982959 --- /dev/null +++ b/integration-libs/cdc/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cdc from './cdc.json'; +export const id = { + cdc, +}; diff --git a/integration-libs/cdc/assets/translations/it/index.ts b/integration-libs/cdc/assets/translations/it/index.ts new file mode 100644 index 00000000000..208327a252c --- /dev/null +++ b/integration-libs/cdc/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cdc from './cdc.json'; +export const it = { + cdc, +}; diff --git a/integration-libs/cdc/assets/translations/ja/index.ts b/integration-libs/cdc/assets/translations/ja/index.ts index 6d11f0b3e18..49c2e31c5bc 100644 --- a/integration-libs/cdc/assets/translations/ja/index.ts +++ b/integration-libs/cdc/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import cdc from './cdc.json'; - export const ja = { cdc, }; diff --git a/integration-libs/cdc/assets/translations/ko/index.ts b/integration-libs/cdc/assets/translations/ko/index.ts new file mode 100644 index 00000000000..89a28c3ce2c --- /dev/null +++ b/integration-libs/cdc/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cdc from './cdc.json'; +export const ko = { + cdc, +}; diff --git a/integration-libs/cdc/assets/translations/pl/index.ts b/integration-libs/cdc/assets/translations/pl/index.ts new file mode 100644 index 00000000000..104312e1bb1 --- /dev/null +++ b/integration-libs/cdc/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cdc from './cdc.json'; +export const pl = { + cdc, +}; diff --git a/integration-libs/cdc/assets/translations/pt/index.ts b/integration-libs/cdc/assets/translations/pt/index.ts new file mode 100644 index 00000000000..2d29a570f39 --- /dev/null +++ b/integration-libs/cdc/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cdc from './cdc.json'; +export const pt = { + cdc, +}; diff --git a/integration-libs/cdc/assets/translations/ru/index.ts b/integration-libs/cdc/assets/translations/ru/index.ts new file mode 100644 index 00000000000..de4da550393 --- /dev/null +++ b/integration-libs/cdc/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cdc from './cdc.json'; +export const ru = { + cdc, +}; diff --git a/integration-libs/cdc/assets/translations/translations.ts b/integration-libs/cdc/assets/translations/translations.ts index 5ba4ad1e542..c00fec77790 100644 --- a/integration-libs/cdc/assets/translations/translations.ts +++ b/integration-libs/cdc/assets/translations/translations.ts @@ -4,19 +4,24 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const cdcTranslationChunksConfig = extractTranslationChunksConfig(en); -export const cdcTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const cdcTranslationChunksConfig: TranslationChunksConfig = { - cdc: ['reconsent', 'cdcProfile'], -}; +export { cs as cdcTranslationsCs } from './cs/index'; +export { de as cdcTranslationsDe } from './de/index'; +export { en as cdcTranslationsEn } from './en/index'; +export { es as cdcTranslationsEs } from './es/index'; +export { es_CO as cdcTranslationsEs_CO } from './es_CO/index'; +export { fr as cdcTranslationsFr } from './fr/index'; +export { hi as cdcTranslationsHi } from './hi/index'; +export { hu as cdcTranslationsHu } from './hu/index'; +export { id as cdcTranslationsId } from './id/index'; +export { it as cdcTranslationsIt } from './it/index'; +export { ja as cdcTranslationsJa } from './ja/index'; +export { ko as cdcTranslationsKo } from './ko/index'; +export { pl as cdcTranslationsPl } from './pl/index'; +export { pt as cdcTranslationsPt } from './pt/index'; +export { ru as cdcTranslationsRu } from './ru/index'; +export { zh as cdcTranslationsZh } from './zh/index'; +export { zh_TW as cdcTranslationsZh_TW } from './zh_TW/index'; diff --git a/integration-libs/cdc/assets/translations/zh/index.ts b/integration-libs/cdc/assets/translations/zh/index.ts index 15f0c08c804..30d7d55800f 100644 --- a/integration-libs/cdc/assets/translations/zh/index.ts +++ b/integration-libs/cdc/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import cdc from './cdc.json'; - export const zh = { cdc, }; diff --git a/integration-libs/cdc/assets/translations/zh_TW/index.ts b/integration-libs/cdc/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..7235ae96dce --- /dev/null +++ b/integration-libs/cdc/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cdc from './cdc.json'; +export const zh_TW = { + cdc, +}; diff --git a/integration-libs/cdc/schematics/add-cdc/__snapshots__/index_spec.ts.snap b/integration-libs/cdc/schematics/add-cdc/__snapshots__/index_spec.ts.snap index 091537e3dac..7f0782a59fd 100644 --- a/integration-libs/cdc/schematics/add-cdc/__snapshots__/index_spec.ts.snap +++ b/integration-libs/cdc/schematics/add-cdc/__snapshots__/index_spec.ts.snap @@ -3,7 +3,7 @@ exports[`Spartacus CDC schematics: ng-add CDC-B2B feature eager loading should import appropriate modules 1`] = ` "import { NgModule } from '@angular/core'; import { CdcModule } from "@spartacus/cdc"; -import { cdcTranslationChunksConfig, cdcTranslations } from "@spartacus/cdc/assets"; +import { cdcTranslationChunksConfig, cdcTranslationsEn } from "@spartacus/cdc/assets"; import { CdcAdministrationModule } from "@spartacus/cdc/organization/administration"; import { CDCB2BRegisterModule } from "@spartacus/cdc/organization/user-registration"; import { CdcConfig, CdcRootModule } from "@spartacus/cdc/root"; @@ -23,7 +23,7 @@ import { I18nConfig, provideConfig } from "@spartacus/core"; ], providers: [provideConfig({ i18n: { - resources: cdcTranslations, + resources: { en: cdcTranslationsEn }, chunks: cdcTranslationChunksConfig, }, }), @@ -44,7 +44,7 @@ export class CdcFeatureModule { } exports[`Spartacus CDC schematics: ng-add CDC-B2B feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; -import { cdcTranslationChunksConfig, cdcTranslations } from "@spartacus/cdc/assets"; +import { cdcTranslationChunksConfig, cdcTranslationsEn } from "@spartacus/cdc/assets"; import { CDC_FEATURE, CdcConfig, CdcRootModule } from "@spartacus/cdc/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @@ -63,7 +63,7 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: cdcTranslations, + resources: { en: cdcTranslationsEn }, chunks: cdcTranslationChunksConfig, }, }), @@ -148,7 +148,7 @@ export class OrganizationUserRegistrationWrapperModule { } exports[`Spartacus CDC schematics: ng-add CDC-B2B feature validation of jsSDKUrl should set the given javascriptUrl 1`] = ` "import { NgModule } from '@angular/core'; -import { cdcTranslationChunksConfig, cdcTranslations } from "@spartacus/cdc/assets"; +import { cdcTranslationChunksConfig, cdcTranslationsEn } from "@spartacus/cdc/assets"; import { CDC_FEATURE, CdcConfig, CdcRootModule } from "@spartacus/cdc/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @@ -167,7 +167,7 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: cdcTranslations, + resources: { en: cdcTranslationsEn }, chunks: cdcTranslationChunksConfig, }, }), @@ -189,7 +189,7 @@ export class CdcFeatureModule { } exports[`Spartacus CDC schematics: ng-add CDC-B2C feature eager loading should import appropriate modules 1`] = ` "import { NgModule } from '@angular/core'; import { CdcModule } from "@spartacus/cdc"; -import { cdcTranslationChunksConfig, cdcTranslations } from "@spartacus/cdc/assets"; +import { cdcTranslationChunksConfig, cdcTranslationsEn } from "@spartacus/cdc/assets"; import { CdcConfig, CdcRootModule } from "@spartacus/cdc/root"; import { CDCUserAccountModule } from "@spartacus/cdc/user-account"; import { CDCUserProfileModule } from "@spartacus/cdc/user-profile"; @@ -205,7 +205,7 @@ import { I18nConfig, provideConfig } from "@spartacus/core"; ], providers: [provideConfig({ i18n: { - resources: cdcTranslations, + resources: { en: cdcTranslationsEn }, chunks: cdcTranslationChunksConfig, }, }), @@ -226,7 +226,7 @@ export class CdcFeatureModule { } exports[`Spartacus CDC schematics: ng-add CDC-B2C feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; -import { cdcTranslationChunksConfig, cdcTranslations } from "@spartacus/cdc/assets"; +import { cdcTranslationChunksConfig, cdcTranslationsEn } from "@spartacus/cdc/assets"; import { CDC_FEATURE, CdcConfig, CdcRootModule } from "@spartacus/cdc/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @@ -245,7 +245,7 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: cdcTranslations, + resources: { en: cdcTranslationsEn }, chunks: cdcTranslationChunksConfig, }, }), @@ -298,7 +298,7 @@ export class UserProfileWrapperModule { } exports[`Spartacus CDC schematics: ng-add CDC-B2C feature validation of jsSDKUrl should set the given javascriptUrl 1`] = ` "import { NgModule } from '@angular/core'; -import { cdcTranslationChunksConfig, cdcTranslations } from "@spartacus/cdc/assets"; +import { cdcTranslationChunksConfig, cdcTranslationsEn } from "@spartacus/cdc/assets"; import { CDC_FEATURE, CdcConfig, CdcRootModule } from "@spartacus/cdc/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @@ -317,7 +317,7 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: cdcTranslations, + resources: { en: cdcTranslationsEn }, chunks: cdcTranslationChunksConfig, }, }), diff --git a/integration-libs/cds/assets/public_api.ts b/integration-libs/cds/assets/public_api.ts index 0784e372a0d..c5950e3751e 100644 --- a/integration-libs/cds/assets/public_api.ts +++ b/integration-libs/cds/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { cdsTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: cdsTranslations + * + resources: { en: cdsTranslationsEn } + * } + * ``` + */ +export const cdsTranslations = { + en: cdsTranslationsEn, +}; diff --git a/integration-libs/cds/assets/translations/cs/index.ts b/integration-libs/cds/assets/translations/cs/index.ts new file mode 100644 index 00000000000..e4bad10005c --- /dev/null +++ b/integration-libs/cds/assets/translations/cs/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import recentSearches from './recentSearches.json'; +import trendingSearches from './trendingSearches.json'; +export const cs = { + recentSearches, + trendingSearches, +}; diff --git a/integration-libs/cds/assets/translations/de/index.ts b/integration-libs/cds/assets/translations/de/index.ts index 5e1b35c079f..457ab5f4428 100644 --- a/integration-libs/cds/assets/translations/de/index.ts +++ b/integration-libs/cds/assets/translations/de/index.ts @@ -7,6 +7,6 @@ import recentSearches from './recentSearches.json'; import trendingSearches from './trendingSearches.json'; export const de = { - cdsRecentSearches: recentSearches, - cdsTrendingSearches: trendingSearches, + recentSearches, + trendingSearches, }; diff --git a/integration-libs/cds/assets/translations/en/index.ts b/integration-libs/cds/assets/translations/en/index.ts index 2dc58de3745..b97c2dd0921 100644 --- a/integration-libs/cds/assets/translations/en/index.ts +++ b/integration-libs/cds/assets/translations/en/index.ts @@ -7,6 +7,6 @@ import recentSearches from './recentSearches.json'; import trendingSearches from './trendingSearches.json'; export const en = { - cdsRecentSearches: recentSearches, - cdsTrendingSearches: trendingSearches, + recentSearches, + trendingSearches, }; diff --git a/integration-libs/cds/assets/translations/es/index.ts b/integration-libs/cds/assets/translations/es/index.ts new file mode 100644 index 00000000000..e5f9d284af1 --- /dev/null +++ b/integration-libs/cds/assets/translations/es/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import recentSearches from './recentSearches.json'; +import trendingSearches from './trendingSearches.json'; +export const es = { + recentSearches, + trendingSearches, +}; diff --git a/integration-libs/cds/assets/translations/es_CO/index.ts b/integration-libs/cds/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..9a48aa486a7 --- /dev/null +++ b/integration-libs/cds/assets/translations/es_CO/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import recentSearches from './recentSearches.json'; +import trendingSearches from './trendingSearches.json'; +export const es_CO = { + recentSearches, + trendingSearches, +}; diff --git a/integration-libs/cds/assets/translations/fr/index.ts b/integration-libs/cds/assets/translations/fr/index.ts new file mode 100644 index 00000000000..f75ecedab35 --- /dev/null +++ b/integration-libs/cds/assets/translations/fr/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import recentSearches from './recentSearches.json'; +import trendingSearches from './trendingSearches.json'; +export const fr = { + recentSearches, + trendingSearches, +}; diff --git a/integration-libs/cds/assets/translations/hi/index.ts b/integration-libs/cds/assets/translations/hi/index.ts new file mode 100644 index 00000000000..8ad46bc5f03 --- /dev/null +++ b/integration-libs/cds/assets/translations/hi/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import recentSearches from './recentSearches.json'; +import trendingSearches from './trendingSearches.json'; +export const hi = { + recentSearches, + trendingSearches, +}; diff --git a/integration-libs/cds/assets/translations/hu/index.ts b/integration-libs/cds/assets/translations/hu/index.ts new file mode 100644 index 00000000000..50fa1f60d18 --- /dev/null +++ b/integration-libs/cds/assets/translations/hu/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import recentSearches from './recentSearches.json'; +import trendingSearches from './trendingSearches.json'; +export const hu = { + recentSearches, + trendingSearches, +}; diff --git a/integration-libs/cds/assets/translations/id/index.ts b/integration-libs/cds/assets/translations/id/index.ts new file mode 100644 index 00000000000..9acee4ff110 --- /dev/null +++ b/integration-libs/cds/assets/translations/id/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import recentSearches from './recentSearches.json'; +import trendingSearches from './trendingSearches.json'; +export const id = { + recentSearches, + trendingSearches, +}; diff --git a/integration-libs/cds/assets/translations/it/index.ts b/integration-libs/cds/assets/translations/it/index.ts new file mode 100644 index 00000000000..87f5a000e14 --- /dev/null +++ b/integration-libs/cds/assets/translations/it/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import recentSearches from './recentSearches.json'; +import trendingSearches from './trendingSearches.json'; +export const it = { + recentSearches, + trendingSearches, +}; diff --git a/integration-libs/cds/assets/translations/ja/index.ts b/integration-libs/cds/assets/translations/ja/index.ts index fa0abe089ab..247fef2499e 100644 --- a/integration-libs/cds/assets/translations/ja/index.ts +++ b/integration-libs/cds/assets/translations/ja/index.ts @@ -7,6 +7,6 @@ import recentSearches from './recentSearches.json'; import trendingSearches from './trendingSearches.json'; export const ja = { - cdsRecentSearches: recentSearches, - cdsTrendingSearches: trendingSearches, + recentSearches, + trendingSearches, }; diff --git a/integration-libs/cds/assets/translations/ko/index.ts b/integration-libs/cds/assets/translations/ko/index.ts new file mode 100644 index 00000000000..6e18563f892 --- /dev/null +++ b/integration-libs/cds/assets/translations/ko/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import recentSearches from './recentSearches.json'; +import trendingSearches from './trendingSearches.json'; +export const ko = { + recentSearches, + trendingSearches, +}; diff --git a/integration-libs/cds/assets/translations/pl/index.ts b/integration-libs/cds/assets/translations/pl/index.ts new file mode 100644 index 00000000000..87e7058273d --- /dev/null +++ b/integration-libs/cds/assets/translations/pl/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import recentSearches from './recentSearches.json'; +import trendingSearches from './trendingSearches.json'; +export const pl = { + recentSearches, + trendingSearches, +}; diff --git a/integration-libs/cds/assets/translations/pt/index.ts b/integration-libs/cds/assets/translations/pt/index.ts new file mode 100644 index 00000000000..99775164626 --- /dev/null +++ b/integration-libs/cds/assets/translations/pt/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import recentSearches from './recentSearches.json'; +import trendingSearches from './trendingSearches.json'; +export const pt = { + recentSearches, + trendingSearches, +}; diff --git a/integration-libs/cds/assets/translations/ru/index.ts b/integration-libs/cds/assets/translations/ru/index.ts new file mode 100644 index 00000000000..94e6867ab6e --- /dev/null +++ b/integration-libs/cds/assets/translations/ru/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import recentSearches from './recentSearches.json'; +import trendingSearches from './trendingSearches.json'; +export const ru = { + recentSearches, + trendingSearches, +}; diff --git a/integration-libs/cds/assets/translations/translations.ts b/integration-libs/cds/assets/translations/translations.ts index ebb5a87381b..e34f61bdd9b 100644 --- a/integration-libs/cds/assets/translations/translations.ts +++ b/integration-libs/cds/assets/translations/translations.ts @@ -4,20 +4,24 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; -import { en } from './en'; -import { ja } from './ja'; -import { de } from './de'; -import { zh } from './zh'; +import { en } from './en/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const cdsTranslationChunksConfig = extractTranslationChunksConfig(en); -export const cdsTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const cdsTranslationChunksConfig: TranslationChunksConfig = { - cdsRecentSearches: ['cdsRecentSearches'], - cdsTrendingSearches: ['cdsTrendingSearches'], -}; +export { cs as cdsTranslationsCs } from './cs/index'; +export { de as cdsTranslationsDe } from './de/index'; +export { en as cdsTranslationsEn } from './en/index'; +export { es as cdsTranslationsEs } from './es/index'; +export { es_CO as cdsTranslationsEs_CO } from './es_CO/index'; +export { fr as cdsTranslationsFr } from './fr/index'; +export { hi as cdsTranslationsHi } from './hi/index'; +export { hu as cdsTranslationsHu } from './hu/index'; +export { id as cdsTranslationsId } from './id/index'; +export { it as cdsTranslationsIt } from './it/index'; +export { ja as cdsTranslationsJa } from './ja/index'; +export { ko as cdsTranslationsKo } from './ko/index'; +export { pl as cdsTranslationsPl } from './pl/index'; +export { pt as cdsTranslationsPt } from './pt/index'; +export { ru as cdsTranslationsRu } from './ru/index'; +export { zh as cdsTranslationsZh } from './zh/index'; +export { zh_TW as cdsTranslationsZh_TW } from './zh_TW/index'; diff --git a/integration-libs/cds/assets/translations/zh/index.ts b/integration-libs/cds/assets/translations/zh/index.ts index 07648a64129..b50439af9cf 100644 --- a/integration-libs/cds/assets/translations/zh/index.ts +++ b/integration-libs/cds/assets/translations/zh/index.ts @@ -7,6 +7,6 @@ import recentSearches from './recentSearches.json'; import trendingSearches from './trendingSearches.json'; export const zh = { - cdsRecentSearches: recentSearches, - cdsTrendingSearches: trendingSearches, + recentSearches, + trendingSearches, }; diff --git a/integration-libs/cds/assets/translations/zh_TW/index.ts b/integration-libs/cds/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..4eb8b8384ab --- /dev/null +++ b/integration-libs/cds/assets/translations/zh_TW/index.ts @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import recentSearches from './recentSearches.json'; +import trendingSearches from './trendingSearches.json'; +export const zh_TW = { + recentSearches, + trendingSearches, +}; diff --git a/integration-libs/cds/src/schematics/add-cds/__snapshots__/index_spec.ts.snap b/integration-libs/cds/src/schematics/add-cds/__snapshots__/index_spec.ts.snap index 3e158a7be46..0b0dfe6701d 100644 --- a/integration-libs/cds/src/schematics/add-cds/__snapshots__/index_spec.ts.snap +++ b/integration-libs/cds/src/schematics/add-cds/__snapshots__/index_spec.ts.snap @@ -3,7 +3,7 @@ exports[`Spartacus CDS schematics: ng-add CDS feature with Profile tag configured general setup should create the feature module 1`] = ` "import { NgModule } from '@angular/core'; import { CdsConfig, CdsModule } from "@spartacus/cds"; -import { cdsTranslationChunksConfig, cdsTranslations } from "@spartacus/cds/assets"; +import { cdsTranslationChunksConfig, cdsTranslationsEn } from "@spartacus/cds/assets"; import { I18nConfig, provideConfig } from "@spartacus/core"; @NgModule({ @@ -13,7 +13,7 @@ import { I18nConfig, provideConfig } from "@spartacus/core"; ], providers: [provideConfig({ i18n: { - resources: cdsTranslations, + resources: { en: cdsTranslationsEn }, chunks: cdsTranslationChunksConfig, }, }), @@ -49,7 +49,7 @@ export class CdsFeatureModule { } exports[`Spartacus CDS schematics: ng-add CDS feature without Profile tag general setup should create the feature module 1`] = ` "import { NgModule } from '@angular/core'; import { CdsConfig, CdsModule } from "@spartacus/cds"; -import { cdsTranslationChunksConfig, cdsTranslations } from "@spartacus/cds/assets"; +import { cdsTranslationChunksConfig, cdsTranslationsEn } from "@spartacus/cds/assets"; import { I18nConfig, provideConfig } from "@spartacus/core"; @NgModule({ @@ -59,7 +59,7 @@ import { I18nConfig, provideConfig } from "@spartacus/core"; ], providers: [provideConfig({ i18n: { - resources: cdsTranslations, + resources: { en: cdsTranslationsEn }, chunks: cdsTranslationChunksConfig, }, }), diff --git a/integration-libs/cpq-quote/assets/public_api.ts b/integration-libs/cpq-quote/assets/public_api.ts index 0784e372a0d..2ab6c75d592 100644 --- a/integration-libs/cpq-quote/assets/public_api.ts +++ b/integration-libs/cpq-quote/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { cpqquoteTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: cpqquoteTranslations + * + resources: { en: cpqquoteTranslationsEn } + * } + * ``` + */ +export const cpqquoteTranslations = { + en: cpqquoteTranslationsEn, +}; diff --git a/integration-libs/cpq-quote/assets/translations/cs/index.ts b/integration-libs/cpq-quote/assets/translations/cs/index.ts new file mode 100644 index 00000000000..2e3406dcae5 --- /dev/null +++ b/integration-libs/cpq-quote/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cpqQuote from './cpq-quote.json'; +export const cs = { + cpqQuote, +}; diff --git a/integration-libs/cpq-quote/assets/translations/de/index.ts b/integration-libs/cpq-quote/assets/translations/de/index.ts index 97508ef62e9..5a7bbf89cea 100644 --- a/integration-libs/cpq-quote/assets/translations/de/index.ts +++ b/integration-libs/cpq-quote/assets/translations/de/index.ts @@ -4,10 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import cpqQuoteHeading from './cpq-quote.json'; -import discountCaption from './cpq-quote.json'; - +import cpqQuote from './cpq-quote.json'; export const de = { - cpqQuoteHeading, - discountCaption, + cpqQuote, }; diff --git a/integration-libs/cpq-quote/assets/translations/en/index.ts b/integration-libs/cpq-quote/assets/translations/en/index.ts index 205ea47ddc4..6bfa6aaee35 100644 --- a/integration-libs/cpq-quote/assets/translations/en/index.ts +++ b/integration-libs/cpq-quote/assets/translations/en/index.ts @@ -4,10 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import cpqQuoteHeading from './cpq-quote.json'; -import discountCaption from './cpq-quote.json'; - +import cpqQuote from './cpq-quote.json'; export const en = { - cpqQuoteHeading, - discountCaption, + cpqQuote, }; diff --git a/integration-libs/cpq-quote/assets/translations/es/index.ts b/integration-libs/cpq-quote/assets/translations/es/index.ts new file mode 100644 index 00000000000..732d89f1376 --- /dev/null +++ b/integration-libs/cpq-quote/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cpqQuote from './cpq-quote.json'; +export const es = { + cpqQuote, +}; diff --git a/integration-libs/cpq-quote/assets/translations/es_CO/index.ts b/integration-libs/cpq-quote/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..10ae21a0a19 --- /dev/null +++ b/integration-libs/cpq-quote/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cpqQuote from './cpq-quote.json'; +export const es_CO = { + cpqQuote, +}; diff --git a/integration-libs/cpq-quote/assets/translations/fr/index.ts b/integration-libs/cpq-quote/assets/translations/fr/index.ts new file mode 100644 index 00000000000..29a57a36a07 --- /dev/null +++ b/integration-libs/cpq-quote/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cpqQuote from './cpq-quote.json'; +export const fr = { + cpqQuote, +}; diff --git a/integration-libs/cpq-quote/assets/translations/hi/index.ts b/integration-libs/cpq-quote/assets/translations/hi/index.ts new file mode 100644 index 00000000000..7a4d98d0949 --- /dev/null +++ b/integration-libs/cpq-quote/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cpqQuote from './cpq-quote.json'; +export const hi = { + cpqQuote, +}; diff --git a/integration-libs/cpq-quote/assets/translations/hu/index.ts b/integration-libs/cpq-quote/assets/translations/hu/index.ts new file mode 100644 index 00000000000..d67e612ecd0 --- /dev/null +++ b/integration-libs/cpq-quote/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cpqQuote from './cpq-quote.json'; +export const hu = { + cpqQuote, +}; diff --git a/integration-libs/cpq-quote/assets/translations/id/index.ts b/integration-libs/cpq-quote/assets/translations/id/index.ts new file mode 100644 index 00000000000..be804387583 --- /dev/null +++ b/integration-libs/cpq-quote/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cpqQuote from './cpq-quote.json'; +export const id = { + cpqQuote, +}; diff --git a/integration-libs/cpq-quote/assets/translations/it/index.ts b/integration-libs/cpq-quote/assets/translations/it/index.ts new file mode 100644 index 00000000000..b61505dc92f --- /dev/null +++ b/integration-libs/cpq-quote/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cpqQuote from './cpq-quote.json'; +export const it = { + cpqQuote, +}; diff --git a/integration-libs/cpq-quote/assets/translations/ja/index.ts b/integration-libs/cpq-quote/assets/translations/ja/index.ts index 84ef99f16f4..074801342d7 100644 --- a/integration-libs/cpq-quote/assets/translations/ja/index.ts +++ b/integration-libs/cpq-quote/assets/translations/ja/index.ts @@ -4,10 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import cpqQuoteHeading from './cpq-quote.json'; -import discountCaption from './cpq-quote.json'; - +import cpqQuote from './cpq-quote.json'; export const ja = { - cpqQuoteHeading, - discountCaption, + cpqQuote, }; diff --git a/integration-libs/cpq-quote/assets/translations/ko/index.ts b/integration-libs/cpq-quote/assets/translations/ko/index.ts new file mode 100644 index 00000000000..5879dc0cfdf --- /dev/null +++ b/integration-libs/cpq-quote/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cpqQuote from './cpq-quote.json'; +export const ko = { + cpqQuote, +}; diff --git a/integration-libs/cpq-quote/assets/translations/pl/index.ts b/integration-libs/cpq-quote/assets/translations/pl/index.ts new file mode 100644 index 00000000000..4c98a75a96d --- /dev/null +++ b/integration-libs/cpq-quote/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cpqQuote from './cpq-quote.json'; +export const pl = { + cpqQuote, +}; diff --git a/integration-libs/cpq-quote/assets/translations/pt/index.ts b/integration-libs/cpq-quote/assets/translations/pt/index.ts new file mode 100644 index 00000000000..29ccd812abc --- /dev/null +++ b/integration-libs/cpq-quote/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cpqQuote from './cpq-quote.json'; +export const pt = { + cpqQuote, +}; diff --git a/integration-libs/cpq-quote/assets/translations/ru/index.ts b/integration-libs/cpq-quote/assets/translations/ru/index.ts new file mode 100644 index 00000000000..2302faad165 --- /dev/null +++ b/integration-libs/cpq-quote/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cpqQuote from './cpq-quote.json'; +export const ru = { + cpqQuote, +}; diff --git a/integration-libs/cpq-quote/assets/translations/translations.ts b/integration-libs/cpq-quote/assets/translations/translations.ts index 36bb0f013b6..fe81578f458 100644 --- a/integration-libs/cpq-quote/assets/translations/translations.ts +++ b/integration-libs/cpq-quote/assets/translations/translations.ts @@ -4,19 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const cpqquoteTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const cpqquoteTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const cpqquoteTranslationChunksConfig: TranslationChunksConfig = { - cpqQuoteHeading: ['cpqQuoteHeading'], -}; +export { cs as cpqquoteTranslationsCs } from './cs/index'; +export { de as cpqquoteTranslationsDe } from './de/index'; +export { en as cpqquoteTranslationsEn } from './en/index'; +export { es as cpqquoteTranslationsEs } from './es/index'; +export { es_CO as cpqquoteTranslationsEs_CO } from './es_CO/index'; +export { fr as cpqquoteTranslationsFr } from './fr/index'; +export { hi as cpqquoteTranslationsHi } from './hi/index'; +export { hu as cpqquoteTranslationsHu } from './hu/index'; +export { id as cpqquoteTranslationsId } from './id/index'; +export { it as cpqquoteTranslationsIt } from './it/index'; +export { ja as cpqquoteTranslationsJa } from './ja/index'; +export { ko as cpqquoteTranslationsKo } from './ko/index'; +export { pl as cpqquoteTranslationsPl } from './pl/index'; +export { pt as cpqquoteTranslationsPt } from './pt/index'; +export { ru as cpqquoteTranslationsRu } from './ru/index'; +export { zh as cpqquoteTranslationsZh } from './zh/index'; +export { zh_TW as cpqquoteTranslationsZh_TW } from './zh_TW/index'; diff --git a/integration-libs/cpq-quote/assets/translations/zh/index.ts b/integration-libs/cpq-quote/assets/translations/zh/index.ts index 97e672486a9..6057136363c 100644 --- a/integration-libs/cpq-quote/assets/translations/zh/index.ts +++ b/integration-libs/cpq-quote/assets/translations/zh/index.ts @@ -4,10 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import cpqQuoteHeading from './cpq-quote.json'; -import discountCaption from './cpq-quote.json'; - +import cpqQuote from './cpq-quote.json'; export const zh = { - cpqQuoteHeading, - discountCaption, + cpqQuote, }; diff --git a/integration-libs/cpq-quote/assets/translations/zh_TW/index.ts b/integration-libs/cpq-quote/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..1af71c88873 --- /dev/null +++ b/integration-libs/cpq-quote/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import cpqQuote from './cpq-quote.json'; +export const zh_TW = { + cpqQuote, +}; diff --git a/integration-libs/cpq-quote/schematics/add-cpq-quote/__snapshots__/index_spec.ts.snap b/integration-libs/cpq-quote/schematics/add-cpq-quote/__snapshots__/index_spec.ts.snap index 3ebf3c76f7e..f8937925f58 100644 --- a/integration-libs/cpq-quote/schematics/add-cpq-quote/__snapshots__/index_spec.ts.snap +++ b/integration-libs/cpq-quote/schematics/add-cpq-quote/__snapshots__/index_spec.ts.snap @@ -3,7 +3,7 @@ exports[`Spartacus Cpq-quote CPQ-QUOTE feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; -import { cpqquoteTranslationChunksConfig, cpqquoteTranslations } from "@spartacus/cpq-quote/assets"; +import { cpqquoteTranslationChunksConfig, cpqquoteTranslationsEn } from "@spartacus/cpq-quote/assets"; import { CpqQuoteRootModule } from "@spartacus/cpq-quote/root"; @NgModule({ @@ -13,7 +13,7 @@ import { CpqQuoteRootModule } from "@spartacus/cpq-quote/root"; ], providers: [provideConfig({ i18n: { - resources: cpqquoteTranslations, + resources: { en: cpqquoteTranslationsEn }, chunks: cpqquoteTranslationChunksConfig, }, }) @@ -43,7 +43,7 @@ exports[`Spartacus Cpq-quote eager loading should import appropriate modules 1`] "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { CpqQuoteModule } from "@spartacus/cpq-quote"; -import { cpqquoteTranslationChunksConfig, cpqquoteTranslations } from "@spartacus/cpq-quote/assets"; +import { cpqquoteTranslationChunksConfig, cpqquoteTranslationsEn } from "@spartacus/cpq-quote/assets"; import { CpqQuoteRootModule } from "@spartacus/cpq-quote/root"; @NgModule({ @@ -54,7 +54,7 @@ import { CpqQuoteRootModule } from "@spartacus/cpq-quote/root"; ], providers: [provideConfig({ i18n: { - resources: cpqquoteTranslations, + resources: { en: cpqquoteTranslationsEn }, chunks: cpqquoteTranslationChunksConfig, }, })] diff --git a/integration-libs/digital-payments/assets/public_api.ts b/integration-libs/digital-payments/assets/public_api.ts index 0784e372a0d..1f84b3194cc 100644 --- a/integration-libs/digital-payments/assets/public_api.ts +++ b/integration-libs/digital-payments/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { dpTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: dpTranslations + * + resources: { en: dpTranslationsEn } + * } + * ``` + */ +export const dpTranslations = { + en: dpTranslationsEn, +}; diff --git a/integration-libs/digital-payments/assets/translations/cs/index.ts b/integration-libs/digital-payments/assets/translations/cs/index.ts new file mode 100644 index 00000000000..caf9d13afe5 --- /dev/null +++ b/integration-libs/digital-payments/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import dpPaymentForm from './dpPaymentForm.json'; +export const cs = { + dpPaymentForm, +}; diff --git a/integration-libs/digital-payments/assets/translations/de/index.ts b/integration-libs/digital-payments/assets/translations/de/index.ts index e51f34ee913..66386a6b7ff 100644 --- a/integration-libs/digital-payments/assets/translations/de/index.ts +++ b/integration-libs/digital-payments/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import dpPaymentForm from './dpPaymentForm.json'; - export const de = { dpPaymentForm, }; diff --git a/integration-libs/digital-payments/assets/translations/en/index.ts b/integration-libs/digital-payments/assets/translations/en/index.ts index 5b0ea46729a..3e6ba8b8e29 100644 --- a/integration-libs/digital-payments/assets/translations/en/index.ts +++ b/integration-libs/digital-payments/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import dpPaymentForm from './dpPaymentForm.json'; - export const en = { dpPaymentForm, }; diff --git a/integration-libs/digital-payments/assets/translations/es/index.ts b/integration-libs/digital-payments/assets/translations/es/index.ts new file mode 100644 index 00000000000..1e5cf008ae7 --- /dev/null +++ b/integration-libs/digital-payments/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import dpPaymentForm from './dpPaymentForm.json'; +export const es = { + dpPaymentForm, +}; diff --git a/integration-libs/digital-payments/assets/translations/es_CO/index.ts b/integration-libs/digital-payments/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..b1d7073e1a4 --- /dev/null +++ b/integration-libs/digital-payments/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import dpPaymentForm from './dpPaymentForm.json'; +export const es_CO = { + dpPaymentForm, +}; diff --git a/integration-libs/digital-payments/assets/translations/fr/index.ts b/integration-libs/digital-payments/assets/translations/fr/index.ts new file mode 100644 index 00000000000..912ab4a7abb --- /dev/null +++ b/integration-libs/digital-payments/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import dpPaymentForm from './dpPaymentForm.json'; +export const fr = { + dpPaymentForm, +}; diff --git a/integration-libs/digital-payments/assets/translations/hi/index.ts b/integration-libs/digital-payments/assets/translations/hi/index.ts new file mode 100644 index 00000000000..994f05f43a8 --- /dev/null +++ b/integration-libs/digital-payments/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import dpPaymentForm from './dpPaymentForm.json'; +export const hi = { + dpPaymentForm, +}; diff --git a/integration-libs/digital-payments/assets/translations/hu/index.ts b/integration-libs/digital-payments/assets/translations/hu/index.ts new file mode 100644 index 00000000000..d83aa616a51 --- /dev/null +++ b/integration-libs/digital-payments/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import dpPaymentForm from './dpPaymentForm.json'; +export const hu = { + dpPaymentForm, +}; diff --git a/integration-libs/digital-payments/assets/translations/id/index.ts b/integration-libs/digital-payments/assets/translations/id/index.ts new file mode 100644 index 00000000000..3f18cc7fab8 --- /dev/null +++ b/integration-libs/digital-payments/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import dpPaymentForm from './dpPaymentForm.json'; +export const id = { + dpPaymentForm, +}; diff --git a/integration-libs/digital-payments/assets/translations/it/index.ts b/integration-libs/digital-payments/assets/translations/it/index.ts new file mode 100644 index 00000000000..efad5b0864e --- /dev/null +++ b/integration-libs/digital-payments/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import dpPaymentForm from './dpPaymentForm.json'; +export const it = { + dpPaymentForm, +}; diff --git a/integration-libs/digital-payments/assets/translations/ja/index.ts b/integration-libs/digital-payments/assets/translations/ja/index.ts index 08abe585a42..7d8052e2a71 100644 --- a/integration-libs/digital-payments/assets/translations/ja/index.ts +++ b/integration-libs/digital-payments/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import dpPaymentForm from './dpPaymentForm.json'; - export const ja = { dpPaymentForm, }; diff --git a/integration-libs/digital-payments/assets/translations/ko/index.ts b/integration-libs/digital-payments/assets/translations/ko/index.ts new file mode 100644 index 00000000000..372810f5f52 --- /dev/null +++ b/integration-libs/digital-payments/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import dpPaymentForm from './dpPaymentForm.json'; +export const ko = { + dpPaymentForm, +}; diff --git a/integration-libs/digital-payments/assets/translations/pl/index.ts b/integration-libs/digital-payments/assets/translations/pl/index.ts new file mode 100644 index 00000000000..9581933622a --- /dev/null +++ b/integration-libs/digital-payments/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import dpPaymentForm from './dpPaymentForm.json'; +export const pl = { + dpPaymentForm, +}; diff --git a/integration-libs/digital-payments/assets/translations/pt/index.ts b/integration-libs/digital-payments/assets/translations/pt/index.ts new file mode 100644 index 00000000000..08feac98bed --- /dev/null +++ b/integration-libs/digital-payments/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import dpPaymentForm from './dpPaymentForm.json'; +export const pt = { + dpPaymentForm, +}; diff --git a/integration-libs/digital-payments/assets/translations/ru/index.ts b/integration-libs/digital-payments/assets/translations/ru/index.ts new file mode 100644 index 00000000000..72049a4e72a --- /dev/null +++ b/integration-libs/digital-payments/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import dpPaymentForm from './dpPaymentForm.json'; +export const ru = { + dpPaymentForm, +}; diff --git a/integration-libs/digital-payments/assets/translations/translations.ts b/integration-libs/digital-payments/assets/translations/translations.ts index bbf472842e7..0426ccece82 100644 --- a/integration-libs/digital-payments/assets/translations/translations.ts +++ b/integration-libs/digital-payments/assets/translations/translations.ts @@ -4,19 +4,24 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const dpTranslationChunksConfig = extractTranslationChunksConfig(en); -export const dpTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const dpTranslationChunksConfig: TranslationChunksConfig = { - dpPaymentForm: ['dpPaymentForm'], -}; +export { cs as dpTranslationsCs } from './cs/index'; +export { de as dpTranslationsDe } from './de/index'; +export { en as dpTranslationsEn } from './en/index'; +export { es as dpTranslationsEs } from './es/index'; +export { es_CO as dpTranslationsEs_CO } from './es_CO/index'; +export { fr as dpTranslationsFr } from './fr/index'; +export { hi as dpTranslationsHi } from './hi/index'; +export { hu as dpTranslationsHu } from './hu/index'; +export { id as dpTranslationsId } from './id/index'; +export { it as dpTranslationsIt } from './it/index'; +export { ja as dpTranslationsJa } from './ja/index'; +export { ko as dpTranslationsKo } from './ko/index'; +export { pl as dpTranslationsPl } from './pl/index'; +export { pt as dpTranslationsPt } from './pt/index'; +export { ru as dpTranslationsRu } from './ru/index'; +export { zh as dpTranslationsZh } from './zh/index'; +export { zh_TW as dpTranslationsZh_TW } from './zh_TW/index'; diff --git a/integration-libs/digital-payments/assets/translations/zh/index.ts b/integration-libs/digital-payments/assets/translations/zh/index.ts index d7f6b0b890a..940b277d8ab 100644 --- a/integration-libs/digital-payments/assets/translations/zh/index.ts +++ b/integration-libs/digital-payments/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import dpPaymentForm from './dpPaymentForm.json'; - export const zh = { dpPaymentForm, }; diff --git a/integration-libs/digital-payments/assets/translations/zh_TW/index.ts b/integration-libs/digital-payments/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..e69781500ae --- /dev/null +++ b/integration-libs/digital-payments/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import dpPaymentForm from './dpPaymentForm.json'; +export const zh_TW = { + dpPaymentForm, +}; diff --git a/integration-libs/digital-payments/schematics/add-digital-payments/__snapshots__/index_spec.ts.snap b/integration-libs/digital-payments/schematics/add-digital-payments/__snapshots__/index_spec.ts.snap index ce2654ed51f..1966bc891e1 100644 --- a/integration-libs/digital-payments/schematics/add-digital-payments/__snapshots__/index_spec.ts.snap +++ b/integration-libs/digital-payments/schematics/add-digital-payments/__snapshots__/index_spec.ts.snap @@ -4,7 +4,7 @@ exports[`Spartacus Digital-Payments schematics: ng-add Digital-Payments feature "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { DigitalPaymentsModule } from "@spartacus/digital-payments"; -import { dpTranslationChunksConfig, dpTranslations } from "@spartacus/digital-payments/assets"; +import { dpTranslationChunksConfig, dpTranslationsEn } from "@spartacus/digital-payments/assets"; @NgModule({ declarations: [], @@ -13,7 +13,7 @@ import { dpTranslationChunksConfig, dpTranslations } from "@spartacus/digital-pa ], providers: [provideConfig({ i18n: { - resources: dpTranslations, + resources: { en: dpTranslationsEn }, chunks: dpTranslationChunksConfig, }, })] @@ -25,7 +25,7 @@ export class DigitalPaymentsFeatureModule { } exports[`Spartacus Digital-Payments schematics: ng-add Digital-Payments feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; -import { dpTranslationChunksConfig, dpTranslations } from "@spartacus/digital-payments/assets"; +import { dpTranslationChunksConfig, dpTranslationsEn } from "@spartacus/digital-payments/assets"; @NgModule({ declarations: [], @@ -33,7 +33,7 @@ import { dpTranslationChunksConfig, dpTranslations } from "@spartacus/digital-pa ], providers: [provideConfig({ i18n: { - resources: dpTranslations, + resources: { en: dpTranslationsEn }, chunks: dpTranslationChunksConfig, }, }) diff --git a/integration-libs/epd-visualization/assets/public_api.ts b/integration-libs/epd-visualization/assets/public_api.ts index 7acabb626ac..fee551f2ca0 100644 --- a/integration-libs/epd-visualization/assets/public_api.ts +++ b/integration-libs/epd-visualization/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { epdVisualizationTranslationsEn } from './translations/translations'; + export * from './translations/index'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: epdVisualizationTranslations + * + resources: { en: epdVisualizationTranslationsEn } + * } + * ``` + */ +export const epdVisualizationTranslations = { + en: epdVisualizationTranslationsEn, +}; diff --git a/integration-libs/epd-visualization/assets/translations/cs/index.ts b/integration-libs/epd-visualization/assets/translations/cs/index.ts new file mode 100644 index 00000000000..8eb4bcc9896 --- /dev/null +++ b/integration-libs/epd-visualization/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import epdVisualization from './epdVisualization.json'; +export const cs = { + epdVisualization, +}; diff --git a/integration-libs/epd-visualization/assets/translations/de/index.ts b/integration-libs/epd-visualization/assets/translations/de/index.ts index 9b68a828e02..ba62615eafd 100644 --- a/integration-libs/epd-visualization/assets/translations/de/index.ts +++ b/integration-libs/epd-visualization/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import epdVisualization from './epdVisualization.json'; - export const de = { epdVisualization, }; diff --git a/integration-libs/epd-visualization/assets/translations/en/index.ts b/integration-libs/epd-visualization/assets/translations/en/index.ts index 7de89fa716d..f1c7f026248 100644 --- a/integration-libs/epd-visualization/assets/translations/en/index.ts +++ b/integration-libs/epd-visualization/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import epdVisualization from './epdVisualization.json'; - export const en = { epdVisualization, }; diff --git a/integration-libs/epd-visualization/assets/translations/es/index.ts b/integration-libs/epd-visualization/assets/translations/es/index.ts new file mode 100644 index 00000000000..15721d4ae93 --- /dev/null +++ b/integration-libs/epd-visualization/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import epdVisualization from './epdVisualization.json'; +export const es = { + epdVisualization, +}; diff --git a/integration-libs/epd-visualization/assets/translations/es_CO/index.ts b/integration-libs/epd-visualization/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..ca348ff3ab8 --- /dev/null +++ b/integration-libs/epd-visualization/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import epdVisualization from './epdVisualization.json'; +export const es_CO = { + epdVisualization, +}; diff --git a/integration-libs/epd-visualization/assets/translations/fr/index.ts b/integration-libs/epd-visualization/assets/translations/fr/index.ts new file mode 100644 index 00000000000..a4d66f7ef7f --- /dev/null +++ b/integration-libs/epd-visualization/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import epdVisualization from './epdVisualization.json'; +export const fr = { + epdVisualization, +}; diff --git a/integration-libs/epd-visualization/assets/translations/hi/index.ts b/integration-libs/epd-visualization/assets/translations/hi/index.ts new file mode 100644 index 00000000000..251e98495cb --- /dev/null +++ b/integration-libs/epd-visualization/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import epdVisualization from './epdVisualization.json'; +export const hi = { + epdVisualization, +}; diff --git a/integration-libs/epd-visualization/assets/translations/hu/index.ts b/integration-libs/epd-visualization/assets/translations/hu/index.ts new file mode 100644 index 00000000000..125908b22a1 --- /dev/null +++ b/integration-libs/epd-visualization/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import epdVisualization from './epdVisualization.json'; +export const hu = { + epdVisualization, +}; diff --git a/integration-libs/epd-visualization/assets/translations/id/index.ts b/integration-libs/epd-visualization/assets/translations/id/index.ts new file mode 100644 index 00000000000..c08a58ee44f --- /dev/null +++ b/integration-libs/epd-visualization/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import epdVisualization from './epdVisualization.json'; +export const id = { + epdVisualization, +}; diff --git a/integration-libs/epd-visualization/assets/translations/it/index.ts b/integration-libs/epd-visualization/assets/translations/it/index.ts new file mode 100644 index 00000000000..1bcd50a97d3 --- /dev/null +++ b/integration-libs/epd-visualization/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import epdVisualization from './epdVisualization.json'; +export const it = { + epdVisualization, +}; diff --git a/integration-libs/epd-visualization/assets/translations/ja/index.ts b/integration-libs/epd-visualization/assets/translations/ja/index.ts index d99b9ebfadc..bddf875d34c 100644 --- a/integration-libs/epd-visualization/assets/translations/ja/index.ts +++ b/integration-libs/epd-visualization/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import epdVisualization from './epdVisualization.json'; - export const ja = { epdVisualization, }; diff --git a/integration-libs/epd-visualization/assets/translations/ko/index.ts b/integration-libs/epd-visualization/assets/translations/ko/index.ts new file mode 100644 index 00000000000..4ee84dca367 --- /dev/null +++ b/integration-libs/epd-visualization/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import epdVisualization from './epdVisualization.json'; +export const ko = { + epdVisualization, +}; diff --git a/integration-libs/epd-visualization/assets/translations/pl/index.ts b/integration-libs/epd-visualization/assets/translations/pl/index.ts new file mode 100644 index 00000000000..00677778c83 --- /dev/null +++ b/integration-libs/epd-visualization/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import epdVisualization from './epdVisualization.json'; +export const pl = { + epdVisualization, +}; diff --git a/integration-libs/epd-visualization/assets/translations/pt/index.ts b/integration-libs/epd-visualization/assets/translations/pt/index.ts new file mode 100644 index 00000000000..9b1d062b889 --- /dev/null +++ b/integration-libs/epd-visualization/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import epdVisualization from './epdVisualization.json'; +export const pt = { + epdVisualization, +}; diff --git a/integration-libs/epd-visualization/assets/translations/ru/index.ts b/integration-libs/epd-visualization/assets/translations/ru/index.ts new file mode 100644 index 00000000000..f0aa7655f0a --- /dev/null +++ b/integration-libs/epd-visualization/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import epdVisualization from './epdVisualization.json'; +export const ru = { + epdVisualization, +}; diff --git a/integration-libs/epd-visualization/assets/translations/translations.ts b/integration-libs/epd-visualization/assets/translations/translations.ts index 0fd9f7d5e1b..9d0bb9df96b 100644 --- a/integration-libs/epd-visualization/assets/translations/translations.ts +++ b/integration-libs/epd-visualization/assets/translations/translations.ts @@ -4,20 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const epdVisualizationTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const epdVisualizationTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const epdVisualizationTranslationChunksConfig: TranslationChunksConfig = - { - epdVisualization: ['epdVisualization'], - }; +export { cs as epdVisualizationTranslationsCs } from './cs/index'; +export { de as epdVisualizationTranslationsDe } from './de/index'; +export { en as epdVisualizationTranslationsEn } from './en/index'; +export { es as epdVisualizationTranslationsEs } from './es/index'; +export { es_CO as epdVisualizationTranslationsEs_CO } from './es_CO/index'; +export { fr as epdVisualizationTranslationsFr } from './fr/index'; +export { hi as epdVisualizationTranslationsHi } from './hi/index'; +export { hu as epdVisualizationTranslationsHu } from './hu/index'; +export { id as epdVisualizationTranslationsId } from './id/index'; +export { it as epdVisualizationTranslationsIt } from './it/index'; +export { ja as epdVisualizationTranslationsJa } from './ja/index'; +export { ko as epdVisualizationTranslationsKo } from './ko/index'; +export { pl as epdVisualizationTranslationsPl } from './pl/index'; +export { pt as epdVisualizationTranslationsPt } from './pt/index'; +export { ru as epdVisualizationTranslationsRu } from './ru/index'; +export { zh as epdVisualizationTranslationsZh } from './zh/index'; +export { zh_TW as epdVisualizationTranslationsZh_TW } from './zh_TW/index'; diff --git a/integration-libs/epd-visualization/assets/translations/zh/index.ts b/integration-libs/epd-visualization/assets/translations/zh/index.ts index dff7185df69..534246f6ee9 100644 --- a/integration-libs/epd-visualization/assets/translations/zh/index.ts +++ b/integration-libs/epd-visualization/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import epdVisualization from './epdVisualization.json'; - export const zh = { epdVisualization, }; diff --git a/integration-libs/epd-visualization/assets/translations/zh_TW/index.ts b/integration-libs/epd-visualization/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..bef2fcf42df --- /dev/null +++ b/integration-libs/epd-visualization/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import epdVisualization from './epdVisualization.json'; +export const zh_TW = { + epdVisualization, +}; diff --git a/integration-libs/epd-visualization/schematics/add-epd-visualization/__snapshots__/index_spec.ts.snap b/integration-libs/epd-visualization/schematics/add-epd-visualization/__snapshots__/index_spec.ts.snap index 33c5e9481d2..6f1dae6679d 100644 --- a/integration-libs/epd-visualization/schematics/add-epd-visualization/__snapshots__/index_spec.ts.snap +++ b/integration-libs/epd-visualization/schematics/add-epd-visualization/__snapshots__/index_spec.ts.snap @@ -4,7 +4,7 @@ exports[`Spartacus SAP EPD Visualization integration schematics: ng-add SAP EPD "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { EpdVisualizationModule } from "@spartacus/epd-visualization"; -import { epdVisualizationTranslationChunksConfig, epdVisualizationTranslations } from "@spartacus/epd-visualization/assets"; +import { epdVisualizationTranslationChunksConfig, epdVisualizationTranslationsEn } from "@spartacus/epd-visualization/assets"; import { EpdVisualizationConfig, EpdVisualizationRootModule } from "@spartacus/epd-visualization/root"; @NgModule({ @@ -15,7 +15,7 @@ import { EpdVisualizationConfig, EpdVisualizationRootModule } from "@spartacus/e ], providers: [provideConfig({ i18n: { - resources: epdVisualizationTranslations, + resources: { en: epdVisualizationTranslationsEn }, chunks: epdVisualizationTranslationChunksConfig, }, }), @@ -40,7 +40,7 @@ exports[`Spartacus SAP EPD Visualization integration schematics: ng-add SAP EPD "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { EpdVisualizationModule } from "@spartacus/epd-visualization"; -import { epdVisualizationTranslationChunksConfig, epdVisualizationTranslations } from "@spartacus/epd-visualization/assets"; +import { epdVisualizationTranslationChunksConfig, epdVisualizationTranslationsEn } from "@spartacus/epd-visualization/assets"; import { EpdVisualizationConfig, EpdVisualizationRootModule } from "@spartacus/epd-visualization/root"; @NgModule({ @@ -51,7 +51,7 @@ import { EpdVisualizationConfig, EpdVisualizationRootModule } from "@spartacus/e ], providers: [provideConfig({ i18n: { - resources: epdVisualizationTranslations, + resources: { en: epdVisualizationTranslationsEn }, chunks: epdVisualizationTranslationChunksConfig, }, }), @@ -75,7 +75,7 @@ export class EpdVisualizationFeatureModule { } exports[`Spartacus SAP EPD Visualization integration schematics: ng-add SAP EPD Visualization feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { epdVisualizationTranslationChunksConfig, epdVisualizationTranslations } from "@spartacus/epd-visualization/assets"; +import { epdVisualizationTranslationChunksConfig, epdVisualizationTranslationsEn } from "@spartacus/epd-visualization/assets"; import { EPD_VISUALIZATION_FEATURE, EpdVisualizationConfig, EpdVisualizationRootModule } from "@spartacus/epd-visualization/root"; @NgModule({ @@ -93,7 +93,7 @@ import { EPD_VISUALIZATION_FEATURE, EpdVisualizationConfig, EpdVisualizationRoot }), provideConfig({ i18n: { - resources: epdVisualizationTranslations, + resources: { en: epdVisualizationTranslationsEn }, chunks: epdVisualizationTranslationChunksConfig, }, }), diff --git a/integration-libs/opf/checkout/assets/public_api.ts b/integration-libs/opf/checkout/assets/public_api.ts index 7acabb626ac..f11bdc62e69 100644 --- a/integration-libs/opf/checkout/assets/public_api.ts +++ b/integration-libs/opf/checkout/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { opfCheckoutTranslationsEn } from './translations/translations'; + export * from './translations/index'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: opfCheckoutTranslations + * + resources: { en: opfCheckoutTranslationsEn } + * } + * ``` + */ +export const opfCheckoutTranslations = { + en: opfCheckoutTranslationsEn, +}; diff --git a/integration-libs/opf/checkout/assets/translations/cs/index.ts b/integration-libs/opf/checkout/assets/translations/cs/index.ts new file mode 100644 index 00000000000..604df51b52d --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const cs = { + opfCheckout, +}; diff --git a/integration-libs/opf/checkout/assets/translations/de/index.ts b/integration-libs/opf/checkout/assets/translations/de/index.ts new file mode 100644 index 00000000000..282b5928a30 --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/de/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const de = { + opfCheckout, +}; diff --git a/integration-libs/opf/checkout/assets/translations/en/index.ts b/integration-libs/opf/checkout/assets/translations/en/index.ts index 6d6db095f62..0fbe5a809e2 100644 --- a/integration-libs/opf/checkout/assets/translations/en/index.ts +++ b/integration-libs/opf/checkout/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import opfCheckout from './opfCheckout.json'; - export const en = { opfCheckout, }; diff --git a/integration-libs/opf/checkout/assets/translations/es/index.ts b/integration-libs/opf/checkout/assets/translations/es/index.ts new file mode 100644 index 00000000000..8fdd1f3753a --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const es = { + opfCheckout, +}; diff --git a/integration-libs/opf/checkout/assets/translations/es_CO/index.ts b/integration-libs/opf/checkout/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..009655960e4 --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const es_CO = { + opfCheckout, +}; diff --git a/integration-libs/opf/checkout/assets/translations/fr/index.ts b/integration-libs/opf/checkout/assets/translations/fr/index.ts new file mode 100644 index 00000000000..7ce032d621b --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const fr = { + opfCheckout, +}; diff --git a/integration-libs/opf/checkout/assets/translations/hi/index.ts b/integration-libs/opf/checkout/assets/translations/hi/index.ts new file mode 100644 index 00000000000..f3e016ad38e --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const hi = { + opfCheckout, +}; diff --git a/integration-libs/opf/checkout/assets/translations/hu/index.ts b/integration-libs/opf/checkout/assets/translations/hu/index.ts new file mode 100644 index 00000000000..d6d8d1be6f4 --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const hu = { + opfCheckout, +}; diff --git a/integration-libs/opf/checkout/assets/translations/id/index.ts b/integration-libs/opf/checkout/assets/translations/id/index.ts new file mode 100644 index 00000000000..e1d9cd0f905 --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const id = { + opfCheckout, +}; diff --git a/integration-libs/opf/checkout/assets/translations/it/index.ts b/integration-libs/opf/checkout/assets/translations/it/index.ts new file mode 100644 index 00000000000..d93af92d223 --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const it = { + opfCheckout, +}; diff --git a/integration-libs/opf/checkout/assets/translations/ja/index.ts b/integration-libs/opf/checkout/assets/translations/ja/index.ts new file mode 100644 index 00000000000..c1669186993 --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/ja/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const ja = { + opfCheckout, +}; diff --git a/integration-libs/opf/checkout/assets/translations/ko/index.ts b/integration-libs/opf/checkout/assets/translations/ko/index.ts new file mode 100644 index 00000000000..c7cdf0441d2 --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const ko = { + opfCheckout, +}; diff --git a/integration-libs/opf/checkout/assets/translations/pl/index.ts b/integration-libs/opf/checkout/assets/translations/pl/index.ts new file mode 100644 index 00000000000..748d05a71ca --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const pl = { + opfCheckout, +}; diff --git a/integration-libs/opf/checkout/assets/translations/pt/index.ts b/integration-libs/opf/checkout/assets/translations/pt/index.ts new file mode 100644 index 00000000000..5ffc0ff8b9b --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const pt = { + opfCheckout, +}; diff --git a/integration-libs/opf/checkout/assets/translations/ru/index.ts b/integration-libs/opf/checkout/assets/translations/ru/index.ts new file mode 100644 index 00000000000..d7264e342f4 --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const ru = { + opfCheckout, +}; diff --git a/integration-libs/opf/checkout/assets/translations/translations.ts b/integration-libs/opf/checkout/assets/translations/translations.ts index 04e3ac3779b..f0d39d9f2f4 100644 --- a/integration-libs/opf/checkout/assets/translations/translations.ts +++ b/integration-libs/opf/checkout/assets/translations/translations.ts @@ -4,13 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const opfCheckoutTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const opfCheckoutTranslations: TranslationResources = { - en, -}; - -export const opfCheckoutTranslationChunksConfig: TranslationChunksConfig = { - opfCheckout: ['opfCheckout'], -}; +export { cs as opfCheckoutTranslationsCs } from './cs/index'; +export { de as opfCheckoutTranslationsDe } from './de/index'; +export { en as opfCheckoutTranslationsEn } from './en/index'; +export { es as opfCheckoutTranslationsEs } from './es/index'; +export { es_CO as opfCheckoutTranslationsEs_CO } from './es_CO/index'; +export { fr as opfCheckoutTranslationsFr } from './fr/index'; +export { hi as opfCheckoutTranslationsHi } from './hi/index'; +export { hu as opfCheckoutTranslationsHu } from './hu/index'; +export { id as opfCheckoutTranslationsId } from './id/index'; +export { it as opfCheckoutTranslationsIt } from './it/index'; +export { ja as opfCheckoutTranslationsJa } from './ja/index'; +export { ko as opfCheckoutTranslationsKo } from './ko/index'; +export { pl as opfCheckoutTranslationsPl } from './pl/index'; +export { pt as opfCheckoutTranslationsPt } from './pt/index'; +export { ru as opfCheckoutTranslationsRu } from './ru/index'; +export { zh as opfCheckoutTranslationsZh } from './zh/index'; +export { zh_TW as opfCheckoutTranslationsZh_TW } from './zh_TW/index'; diff --git a/integration-libs/opf/checkout/assets/translations/zh/index.ts b/integration-libs/opf/checkout/assets/translations/zh/index.ts new file mode 100644 index 00000000000..8568fc2ee7c --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/zh/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const zh = { + opfCheckout, +}; diff --git a/integration-libs/opf/checkout/assets/translations/zh_TW/index.ts b/integration-libs/opf/checkout/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..0ad22ff3d65 --- /dev/null +++ b/integration-libs/opf/checkout/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfCheckout from './opfCheckout.json'; +export const zh_TW = { + opfCheckout, +}; diff --git a/integration-libs/opf/payment/assets/public_api.ts b/integration-libs/opf/payment/assets/public_api.ts index 7acabb626ac..c0a12ceeb02 100644 --- a/integration-libs/opf/payment/assets/public_api.ts +++ b/integration-libs/opf/payment/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { opfPaymentTranslationsEn } from './translations/translations'; + export * from './translations/index'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: opfPaymentTranslations + * + resources: { en: opfPaymentTranslationsEn } + * } + * ``` + */ +export const opfPaymentTranslations = { + en: opfPaymentTranslationsEn, +}; diff --git a/integration-libs/opf/payment/assets/translations/cs/index.ts b/integration-libs/opf/payment/assets/translations/cs/index.ts new file mode 100644 index 00000000000..7496818d646 --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const cs = { + opfPayment, +}; diff --git a/integration-libs/opf/payment/assets/translations/de/index.ts b/integration-libs/opf/payment/assets/translations/de/index.ts new file mode 100644 index 00000000000..fcd2e8a59d4 --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/de/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const de = { + opfPayment, +}; diff --git a/integration-libs/opf/payment/assets/translations/en/index.ts b/integration-libs/opf/payment/assets/translations/en/index.ts index 07b17066b76..75c8e0e35ad 100644 --- a/integration-libs/opf/payment/assets/translations/en/index.ts +++ b/integration-libs/opf/payment/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import opfPayment from './opfPayment.json'; - export const en = { opfPayment, }; diff --git a/integration-libs/opf/payment/assets/translations/es/index.ts b/integration-libs/opf/payment/assets/translations/es/index.ts new file mode 100644 index 00000000000..2bdb4390065 --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const es = { + opfPayment, +}; diff --git a/integration-libs/opf/payment/assets/translations/es_CO/index.ts b/integration-libs/opf/payment/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..fb5695afcaf --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const es_CO = { + opfPayment, +}; diff --git a/integration-libs/opf/payment/assets/translations/fr/index.ts b/integration-libs/opf/payment/assets/translations/fr/index.ts new file mode 100644 index 00000000000..da8181b6f4f --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const fr = { + opfPayment, +}; diff --git a/integration-libs/opf/payment/assets/translations/hi/index.ts b/integration-libs/opf/payment/assets/translations/hi/index.ts new file mode 100644 index 00000000000..4dfb856ce9b --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const hi = { + opfPayment, +}; diff --git a/integration-libs/opf/payment/assets/translations/hu/index.ts b/integration-libs/opf/payment/assets/translations/hu/index.ts new file mode 100644 index 00000000000..946266748cb --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const hu = { + opfPayment, +}; diff --git a/integration-libs/opf/payment/assets/translations/id/index.ts b/integration-libs/opf/payment/assets/translations/id/index.ts new file mode 100644 index 00000000000..5b370bcef7c --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const id = { + opfPayment, +}; diff --git a/integration-libs/opf/payment/assets/translations/it/index.ts b/integration-libs/opf/payment/assets/translations/it/index.ts new file mode 100644 index 00000000000..bdc967fc824 --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const it = { + opfPayment, +}; diff --git a/integration-libs/opf/payment/assets/translations/ja/index.ts b/integration-libs/opf/payment/assets/translations/ja/index.ts new file mode 100644 index 00000000000..c1b797083b4 --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/ja/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const ja = { + opfPayment, +}; diff --git a/integration-libs/opf/payment/assets/translations/ko/index.ts b/integration-libs/opf/payment/assets/translations/ko/index.ts new file mode 100644 index 00000000000..9685212c34b --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const ko = { + opfPayment, +}; diff --git a/integration-libs/opf/payment/assets/translations/pl/index.ts b/integration-libs/opf/payment/assets/translations/pl/index.ts new file mode 100644 index 00000000000..3cfefe46c39 --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const pl = { + opfPayment, +}; diff --git a/integration-libs/opf/payment/assets/translations/pt/index.ts b/integration-libs/opf/payment/assets/translations/pt/index.ts new file mode 100644 index 00000000000..ac000fc9f39 --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const pt = { + opfPayment, +}; diff --git a/integration-libs/opf/payment/assets/translations/ru/index.ts b/integration-libs/opf/payment/assets/translations/ru/index.ts new file mode 100644 index 00000000000..104c6022532 --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const ru = { + opfPayment, +}; diff --git a/integration-libs/opf/payment/assets/translations/translations.ts b/integration-libs/opf/payment/assets/translations/translations.ts index 2243881e738..42911cecfb1 100644 --- a/integration-libs/opf/payment/assets/translations/translations.ts +++ b/integration-libs/opf/payment/assets/translations/translations.ts @@ -4,13 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const opfPaymentTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const opfPaymentTranslations: TranslationResources = { - en, -}; - -export const opfPaymentTranslationChunksConfig: TranslationChunksConfig = { - opfPayment: ['opfPayment'], -}; +export { cs as opfPaymentTranslationsCs } from './cs/index'; +export { de as opfPaymentTranslationsDe } from './de/index'; +export { en as opfPaymentTranslationsEn } from './en/index'; +export { es as opfPaymentTranslationsEs } from './es/index'; +export { es_CO as opfPaymentTranslationsEs_CO } from './es_CO/index'; +export { fr as opfPaymentTranslationsFr } from './fr/index'; +export { hi as opfPaymentTranslationsHi } from './hi/index'; +export { hu as opfPaymentTranslationsHu } from './hu/index'; +export { id as opfPaymentTranslationsId } from './id/index'; +export { it as opfPaymentTranslationsIt } from './it/index'; +export { ja as opfPaymentTranslationsJa } from './ja/index'; +export { ko as opfPaymentTranslationsKo } from './ko/index'; +export { pl as opfPaymentTranslationsPl } from './pl/index'; +export { pt as opfPaymentTranslationsPt } from './pt/index'; +export { ru as opfPaymentTranslationsRu } from './ru/index'; +export { zh as opfPaymentTranslationsZh } from './zh/index'; +export { zh_TW as opfPaymentTranslationsZh_TW } from './zh_TW/index'; diff --git a/integration-libs/opf/payment/assets/translations/zh/index.ts b/integration-libs/opf/payment/assets/translations/zh/index.ts new file mode 100644 index 00000000000..f342d418498 --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/zh/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const zh = { + opfPayment, +}; diff --git a/integration-libs/opf/payment/assets/translations/zh_TW/index.ts b/integration-libs/opf/payment/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..562ec834f54 --- /dev/null +++ b/integration-libs/opf/payment/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import opfPayment from './opfPayment.json'; +export const zh_TW = { + opfPayment, +}; diff --git a/integration-libs/s4-service/assets/public_api.ts b/integration-libs/s4-service/assets/public_api.ts index 0784e372a0d..9ed8b4a63d5 100644 --- a/integration-libs/s4-service/assets/public_api.ts +++ b/integration-libs/s4-service/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { s4ServiceTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: s4ServiceTranslations + * + resources: { en: s4ServiceTranslationsEn } + * } + * ``` + */ +export const s4ServiceTranslations = { + en: s4ServiceTranslationsEn, +}; diff --git a/integration-libs/s4-service/assets/translations/cs/index.ts b/integration-libs/s4-service/assets/translations/cs/index.ts new file mode 100644 index 00000000000..94f19024532 --- /dev/null +++ b/integration-libs/s4-service/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4Service from './s4-service.json'; +export const cs = { + s4Service, +}; diff --git a/integration-libs/s4-service/assets/translations/de/index.ts b/integration-libs/s4-service/assets/translations/de/index.ts index fed00b10af2..729af9aedb6 100644 --- a/integration-libs/s4-service/assets/translations/de/index.ts +++ b/integration-libs/s4-service/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import s4Service from './s4-service.json'; - export const de = { s4Service, }; diff --git a/integration-libs/s4-service/assets/translations/en/index.ts b/integration-libs/s4-service/assets/translations/en/index.ts index 2bfd855ed52..dd8ef0d2f6d 100644 --- a/integration-libs/s4-service/assets/translations/en/index.ts +++ b/integration-libs/s4-service/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import s4Service from './s4-service.json'; - export const en = { s4Service, }; diff --git a/integration-libs/s4-service/assets/translations/es/index.ts b/integration-libs/s4-service/assets/translations/es/index.ts new file mode 100644 index 00000000000..679a2c935ee --- /dev/null +++ b/integration-libs/s4-service/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4Service from './s4-service.json'; +export const es = { + s4Service, +}; diff --git a/integration-libs/s4-service/assets/translations/es_CO/index.ts b/integration-libs/s4-service/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..48e6a78751f --- /dev/null +++ b/integration-libs/s4-service/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4Service from './s4-service.json'; +export const es_CO = { + s4Service, +}; diff --git a/integration-libs/s4-service/assets/translations/fr/index.ts b/integration-libs/s4-service/assets/translations/fr/index.ts new file mode 100644 index 00000000000..1b865e34cd5 --- /dev/null +++ b/integration-libs/s4-service/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4Service from './s4-service.json'; +export const fr = { + s4Service, +}; diff --git a/integration-libs/s4-service/assets/translations/hi/index.ts b/integration-libs/s4-service/assets/translations/hi/index.ts new file mode 100644 index 00000000000..0985baf10bd --- /dev/null +++ b/integration-libs/s4-service/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4Service from './s4-service.json'; +export const hi = { + s4Service, +}; diff --git a/integration-libs/s4-service/assets/translations/hu/index.ts b/integration-libs/s4-service/assets/translations/hu/index.ts new file mode 100644 index 00000000000..af99611afe8 --- /dev/null +++ b/integration-libs/s4-service/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4Service from './s4-service.json'; +export const hu = { + s4Service, +}; diff --git a/integration-libs/s4-service/assets/translations/id/index.ts b/integration-libs/s4-service/assets/translations/id/index.ts new file mode 100644 index 00000000000..d9ace73e035 --- /dev/null +++ b/integration-libs/s4-service/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4Service from './s4-service.json'; +export const id = { + s4Service, +}; diff --git a/integration-libs/s4-service/assets/translations/it/index.ts b/integration-libs/s4-service/assets/translations/it/index.ts new file mode 100644 index 00000000000..88e43745d22 --- /dev/null +++ b/integration-libs/s4-service/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4Service from './s4-service.json'; +export const it = { + s4Service, +}; diff --git a/integration-libs/s4-service/assets/translations/ja/index.ts b/integration-libs/s4-service/assets/translations/ja/index.ts index 9617fcf5e73..b1d4bc179ed 100644 --- a/integration-libs/s4-service/assets/translations/ja/index.ts +++ b/integration-libs/s4-service/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import s4Service from './s4-service.json'; - export const ja = { s4Service, }; diff --git a/integration-libs/s4-service/assets/translations/ko/index.ts b/integration-libs/s4-service/assets/translations/ko/index.ts new file mode 100644 index 00000000000..5fabbe9f328 --- /dev/null +++ b/integration-libs/s4-service/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4Service from './s4-service.json'; +export const ko = { + s4Service, +}; diff --git a/integration-libs/s4-service/assets/translations/pl/index.ts b/integration-libs/s4-service/assets/translations/pl/index.ts new file mode 100644 index 00000000000..52790e02467 --- /dev/null +++ b/integration-libs/s4-service/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4Service from './s4-service.json'; +export const pl = { + s4Service, +}; diff --git a/integration-libs/s4-service/assets/translations/pt/index.ts b/integration-libs/s4-service/assets/translations/pt/index.ts new file mode 100644 index 00000000000..82b6c1ee81b --- /dev/null +++ b/integration-libs/s4-service/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4Service from './s4-service.json'; +export const pt = { + s4Service, +}; diff --git a/integration-libs/s4-service/assets/translations/ru/index.ts b/integration-libs/s4-service/assets/translations/ru/index.ts new file mode 100644 index 00000000000..9e0f1ee899f --- /dev/null +++ b/integration-libs/s4-service/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4Service from './s4-service.json'; +export const ru = { + s4Service, +}; diff --git a/integration-libs/s4-service/assets/translations/translations.ts b/integration-libs/s4-service/assets/translations/translations.ts index 2b7af411708..e24287665c7 100644 --- a/integration-libs/s4-service/assets/translations/translations.ts +++ b/integration-libs/s4-service/assets/translations/translations.ts @@ -4,19 +4,25 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const s4ServiceTranslationChunksConfig = + extractTranslationChunksConfig(en); -export const s4ServiceTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const s4ServiceTranslationChunksConfig: TranslationChunksConfig = { - s4Service: ['serviceOrderCheckout', 'rescheduleService', 'cancelService'], -}; +export { cs as s4ServiceTranslationsCs } from './cs/index'; +export { de as s4ServiceTranslationsDe } from './de/index'; +export { en as s4ServiceTranslationsEn } from './en/index'; +export { es as s4ServiceTranslationsEs } from './es/index'; +export { es_CO as s4ServiceTranslationsEs_CO } from './es_CO/index'; +export { fr as s4ServiceTranslationsFr } from './fr/index'; +export { hi as s4ServiceTranslationsHi } from './hi/index'; +export { hu as s4ServiceTranslationsHu } from './hu/index'; +export { id as s4ServiceTranslationsId } from './id/index'; +export { it as s4ServiceTranslationsIt } from './it/index'; +export { ja as s4ServiceTranslationsJa } from './ja/index'; +export { ko as s4ServiceTranslationsKo } from './ko/index'; +export { pl as s4ServiceTranslationsPl } from './pl/index'; +export { pt as s4ServiceTranslationsPt } from './pt/index'; +export { ru as s4ServiceTranslationsRu } from './ru/index'; +export { zh as s4ServiceTranslationsZh } from './zh/index'; +export { zh_TW as s4ServiceTranslationsZh_TW } from './zh_TW/index'; diff --git a/integration-libs/s4-service/assets/translations/zh/index.ts b/integration-libs/s4-service/assets/translations/zh/index.ts index d2f217e23f6..dd3ca77ee14 100644 --- a/integration-libs/s4-service/assets/translations/zh/index.ts +++ b/integration-libs/s4-service/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import s4Service from './s4-service.json'; - export const zh = { s4Service, }; diff --git a/integration-libs/s4-service/assets/translations/zh_TW/index.ts b/integration-libs/s4-service/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..15284ba64e5 --- /dev/null +++ b/integration-libs/s4-service/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4Service from './s4-service.json'; +export const zh_TW = { + s4Service, +}; diff --git a/integration-libs/s4-service/schematics/add-s4-service/__snapshots__/index_spec.ts.snap b/integration-libs/s4-service/schematics/add-s4-service/__snapshots__/index_spec.ts.snap index 1180c78dfb7..4b8dd2d940d 100644 --- a/integration-libs/s4-service/schematics/add-s4-service/__snapshots__/index_spec.ts.snap +++ b/integration-libs/s4-service/schematics/add-s4-service/__snapshots__/index_spec.ts.snap @@ -4,7 +4,7 @@ exports[`Spartacus S/4HANA Service Integration (S4-Service) Schematics: ng-add S "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { S4ServiceModule } from "@spartacus/s4-service"; -import { s4ServiceTranslationChunksConfig, s4ServiceTranslations } from "@spartacus/s4-service/assets"; +import { s4ServiceTranslationChunksConfig, s4ServiceTranslationsEn } from "@spartacus/s4-service/assets"; import { S4ServiceCheckoutModule } from "@spartacus/s4-service/checkout"; import { S4ServiceOrderModule } from "@spartacus/s4-service/order"; import { S4ServiceRootModule } from "@spartacus/s4-service/root"; @@ -19,7 +19,7 @@ import { S4ServiceRootModule } from "@spartacus/s4-service/root"; ], providers: [provideConfig({ i18n: { - resources: s4ServiceTranslations, + resources: { en: s4ServiceTranslationsEn }, chunks: s4ServiceTranslationChunksConfig, }, })] @@ -31,7 +31,7 @@ export class S4ServiceFeatureModule { } exports[`Spartacus S/4HANA Service Integration (S4-Service) Schematics: ng-add S4-Service feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { s4ServiceTranslationChunksConfig, s4ServiceTranslations } from "@spartacus/s4-service/assets"; +import { s4ServiceTranslationChunksConfig, s4ServiceTranslationsEn } from "@spartacus/s4-service/assets"; import { S4_SERVICE_FEATURE, S4ServiceRootModule } from "@spartacus/s4-service/root"; @NgModule({ @@ -49,7 +49,7 @@ import { S4_SERVICE_FEATURE, S4ServiceRootModule } from "@spartacus/s4-service/r }), provideConfig({ i18n: { - resources: s4ServiceTranslations, + resources: { en: s4ServiceTranslationsEn }, chunks: s4ServiceTranslationChunksConfig, }, }) diff --git a/integration-libs/s4om/assets/public_api.ts b/integration-libs/s4om/assets/public_api.ts index 0784e372a0d..e7cf3fc924c 100644 --- a/integration-libs/s4om/assets/public_api.ts +++ b/integration-libs/s4om/assets/public_api.ts @@ -4,4 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { s4omTranslationsEn } from './translations/translations'; + export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: s4omTranslations + * + resources: { en: s4omTranslationsEn } + * } + * ``` + */ +export const s4omTranslations = { + en: s4omTranslationsEn, +}; diff --git a/integration-libs/s4om/assets/translations/cs/index.ts b/integration-libs/s4om/assets/translations/cs/index.ts new file mode 100644 index 00000000000..17bc828ae4c --- /dev/null +++ b/integration-libs/s4om/assets/translations/cs/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4omScheduleLines from './s4omScheduleLines.json'; +export const cs = { + s4omScheduleLines, +}; diff --git a/integration-libs/s4om/assets/translations/de/index.ts b/integration-libs/s4om/assets/translations/de/index.ts index d236ff2ed41..a9e3770478e 100644 --- a/integration-libs/s4om/assets/translations/de/index.ts +++ b/integration-libs/s4om/assets/translations/de/index.ts @@ -5,7 +5,6 @@ */ import s4omScheduleLines from './s4omScheduleLines.json'; - export const de = { s4omScheduleLines, }; diff --git a/integration-libs/s4om/assets/translations/en/index.ts b/integration-libs/s4om/assets/translations/en/index.ts index 53d15f79049..a43044dcb0b 100644 --- a/integration-libs/s4om/assets/translations/en/index.ts +++ b/integration-libs/s4om/assets/translations/en/index.ts @@ -5,7 +5,6 @@ */ import s4omScheduleLines from './s4omScheduleLines.json'; - export const en = { s4omScheduleLines, }; diff --git a/integration-libs/s4om/assets/translations/es/index.ts b/integration-libs/s4om/assets/translations/es/index.ts new file mode 100644 index 00000000000..56479a4c8e8 --- /dev/null +++ b/integration-libs/s4om/assets/translations/es/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4omScheduleLines from './s4omScheduleLines.json'; +export const es = { + s4omScheduleLines, +}; diff --git a/integration-libs/s4om/assets/translations/es_CO/index.ts b/integration-libs/s4om/assets/translations/es_CO/index.ts new file mode 100644 index 00000000000..b72549b3edc --- /dev/null +++ b/integration-libs/s4om/assets/translations/es_CO/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4omScheduleLines from './s4omScheduleLines.json'; +export const es_CO = { + s4omScheduleLines, +}; diff --git a/integration-libs/s4om/assets/translations/fr/index.ts b/integration-libs/s4om/assets/translations/fr/index.ts new file mode 100644 index 00000000000..44458f224e2 --- /dev/null +++ b/integration-libs/s4om/assets/translations/fr/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4omScheduleLines from './s4omScheduleLines.json'; +export const fr = { + s4omScheduleLines, +}; diff --git a/integration-libs/s4om/assets/translations/hi/index.ts b/integration-libs/s4om/assets/translations/hi/index.ts new file mode 100644 index 00000000000..661bfc2dd9d --- /dev/null +++ b/integration-libs/s4om/assets/translations/hi/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4omScheduleLines from './s4omScheduleLines.json'; +export const hi = { + s4omScheduleLines, +}; diff --git a/integration-libs/s4om/assets/translations/hu/index.ts b/integration-libs/s4om/assets/translations/hu/index.ts new file mode 100644 index 00000000000..172b2159f83 --- /dev/null +++ b/integration-libs/s4om/assets/translations/hu/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4omScheduleLines from './s4omScheduleLines.json'; +export const hu = { + s4omScheduleLines, +}; diff --git a/integration-libs/s4om/assets/translations/id/index.ts b/integration-libs/s4om/assets/translations/id/index.ts new file mode 100644 index 00000000000..714eb1327b8 --- /dev/null +++ b/integration-libs/s4om/assets/translations/id/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4omScheduleLines from './s4omScheduleLines.json'; +export const id = { + s4omScheduleLines, +}; diff --git a/integration-libs/s4om/assets/translations/it/index.ts b/integration-libs/s4om/assets/translations/it/index.ts new file mode 100644 index 00000000000..f3420d80be5 --- /dev/null +++ b/integration-libs/s4om/assets/translations/it/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4omScheduleLines from './s4omScheduleLines.json'; +export const it = { + s4omScheduleLines, +}; diff --git a/integration-libs/s4om/assets/translations/ja/index.ts b/integration-libs/s4om/assets/translations/ja/index.ts index 7b8aa61958c..7e1f27fa251 100644 --- a/integration-libs/s4om/assets/translations/ja/index.ts +++ b/integration-libs/s4om/assets/translations/ja/index.ts @@ -5,7 +5,6 @@ */ import s4omScheduleLines from './s4omScheduleLines.json'; - export const ja = { s4omScheduleLines, }; diff --git a/integration-libs/s4om/assets/translations/ko/index.ts b/integration-libs/s4om/assets/translations/ko/index.ts new file mode 100644 index 00000000000..9f6e48a2f41 --- /dev/null +++ b/integration-libs/s4om/assets/translations/ko/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4omScheduleLines from './s4omScheduleLines.json'; +export const ko = { + s4omScheduleLines, +}; diff --git a/integration-libs/s4om/assets/translations/pl/index.ts b/integration-libs/s4om/assets/translations/pl/index.ts new file mode 100644 index 00000000000..44295736a74 --- /dev/null +++ b/integration-libs/s4om/assets/translations/pl/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4omScheduleLines from './s4omScheduleLines.json'; +export const pl = { + s4omScheduleLines, +}; diff --git a/integration-libs/s4om/assets/translations/pt/index.ts b/integration-libs/s4om/assets/translations/pt/index.ts new file mode 100644 index 00000000000..3347a344a19 --- /dev/null +++ b/integration-libs/s4om/assets/translations/pt/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4omScheduleLines from './s4omScheduleLines.json'; +export const pt = { + s4omScheduleLines, +}; diff --git a/integration-libs/s4om/assets/translations/ru/index.ts b/integration-libs/s4om/assets/translations/ru/index.ts new file mode 100644 index 00000000000..d7a90802503 --- /dev/null +++ b/integration-libs/s4om/assets/translations/ru/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4omScheduleLines from './s4omScheduleLines.json'; +export const ru = { + s4omScheduleLines, +}; diff --git a/integration-libs/s4om/assets/translations/translations.ts b/integration-libs/s4om/assets/translations/translations.ts index b5a330c79d2..d7db705d461 100644 --- a/integration-libs/s4om/assets/translations/translations.ts +++ b/integration-libs/s4om/assets/translations/translations.ts @@ -4,19 +4,24 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { TranslationChunksConfig, TranslationResources } from '@spartacus/core'; import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const s4omTranslationChunksConfig = extractTranslationChunksConfig(en); -export const s4omTranslations: TranslationResources = { - en, - ja, - de, - zh, -}; - -export const s4omTranslationChunksConfig: TranslationChunksConfig = { - s4omScheduleLines: ['s4omScheduleLines'], -}; +export { cs as s4omTranslationsCs } from './cs/index'; +export { de as s4omTranslationsDe } from './de/index'; +export { en as s4omTranslationsEn } from './en/index'; +export { es as s4omTranslationsEs } from './es/index'; +export { es_CO as s4omTranslationsEs_CO } from './es_CO/index'; +export { fr as s4omTranslationsFr } from './fr/index'; +export { hi as s4omTranslationsHi } from './hi/index'; +export { hu as s4omTranslationsHu } from './hu/index'; +export { id as s4omTranslationsId } from './id/index'; +export { it as s4omTranslationsIt } from './it/index'; +export { ja as s4omTranslationsJa } from './ja/index'; +export { ko as s4omTranslationsKo } from './ko/index'; +export { pl as s4omTranslationsPl } from './pl/index'; +export { pt as s4omTranslationsPt } from './pt/index'; +export { ru as s4omTranslationsRu } from './ru/index'; +export { zh as s4omTranslationsZh } from './zh/index'; +export { zh_TW as s4omTranslationsZh_TW } from './zh_TW/index'; diff --git a/integration-libs/s4om/assets/translations/zh/index.ts b/integration-libs/s4om/assets/translations/zh/index.ts index 245f2418608..c1909b62ce8 100644 --- a/integration-libs/s4om/assets/translations/zh/index.ts +++ b/integration-libs/s4om/assets/translations/zh/index.ts @@ -5,7 +5,6 @@ */ import s4omScheduleLines from './s4omScheduleLines.json'; - export const zh = { s4omScheduleLines, }; diff --git a/integration-libs/s4om/assets/translations/zh_TW/index.ts b/integration-libs/s4om/assets/translations/zh_TW/index.ts new file mode 100644 index 00000000000..d4350eef64b --- /dev/null +++ b/integration-libs/s4om/assets/translations/zh_TW/index.ts @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import s4omScheduleLines from './s4omScheduleLines.json'; +export const zh_TW = { + s4omScheduleLines, +}; diff --git a/integration-libs/s4om/schematics/add-s4om/__snapshots__/index_spec.ts.snap b/integration-libs/s4om/schematics/add-s4om/__snapshots__/index_spec.ts.snap index 877a74454aa..af9ef7f440d 100644 --- a/integration-libs/s4om/schematics/add-s4om/__snapshots__/index_spec.ts.snap +++ b/integration-libs/s4om/schematics/add-s4om/__snapshots__/index_spec.ts.snap @@ -4,7 +4,7 @@ exports[`Spartacus S4OM schematics: ng-add S4OM feature eager loading should imp "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { S4omModule } from "@spartacus/s4om"; -import { s4omTranslationChunksConfig, s4omTranslations } from "@spartacus/s4om/assets"; +import { s4omTranslationChunksConfig, s4omTranslationsEn } from "@spartacus/s4om/assets"; import { S4omRootModule } from "@spartacus/s4om/root"; @NgModule({ @@ -15,7 +15,7 @@ import { S4omRootModule } from "@spartacus/s4om/root"; ], providers: [provideConfig({ i18n: { - resources: s4omTranslations, + resources: { en: s4omTranslationsEn }, chunks: s4omTranslationChunksConfig, }, })] @@ -27,7 +27,7 @@ export class S4omFeatureModule { } exports[`Spartacus S4OM schematics: ng-add S4OM feature general setup should add the feature using the lazy loading syntax 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { s4omTranslationChunksConfig, s4omTranslations } from "@spartacus/s4om/assets"; +import { s4omTranslationChunksConfig, s4omTranslationsEn } from "@spartacus/s4om/assets"; import { S4OM_FEATURE, S4omRootModule } from "@spartacus/s4om/root"; @NgModule({ @@ -45,7 +45,7 @@ import { S4OM_FEATURE, S4omRootModule } from "@spartacus/s4om/root"; }), provideConfig({ i18n: { - resources: s4omTranslations, + resources: { en: s4omTranslationsEn }, chunks: s4omTranslationChunksConfig, }, }) diff --git a/projects/assets/generate-translations-ts-2-json.ts b/projects/assets/generate-translations-ts-2-json.ts index f758e2b8df8..bd2b4235de6 100644 --- a/projects/assets/generate-translations-ts-2-json.ts +++ b/projects/assets/generate-translations-ts-2-json.ts @@ -5,7 +5,7 @@ */ import * as fs from 'fs-extra'; -import { translations } from './src/translations/translations'; +import { en } from './src/translations/en'; const assetsDistDir = '../../dist/assets/'; const translationsDistDir = assetsDistDir + 'i18n-assets/'; @@ -29,14 +29,14 @@ if (!fs.existsSync(assetsDistDir)) { createDir(translationsDistDir); // generate files - Object.keys(translations).forEach((lang) => { - createDir(getLangDir(lang)); - Object.keys(translations[lang]).forEach((chunk) => { - const obj = translations[lang][chunk]; - const json = JSON.stringify(obj, null, 2); - const fileName = getFileName(lang, chunk); - fs.writeFileSync(fileName, json, 'utf8'); - }); + const lang = 'en'; + const translationsEn: Record = en; + createDir(getLangDir(lang)); + Object.keys(translationsEn).forEach((chunk) => { + const obj = translationsEn[chunk]; + const json = JSON.stringify(obj, null, 2); + const fileName = getFileName(lang, chunk); + fs.writeFileSync(fileName, json, 'utf8'); }); /* eslint-disable-next-line no-console */ console.log(`Translations generated in '${assetsDistDir}'`); diff --git a/projects/assets/package.json b/projects/assets/package.json index ec687b0c10e..ca5a4bb610b 100644 --- a/projects/assets/package.json +++ b/projects/assets/package.json @@ -12,6 +12,9 @@ "dependencies": { "tslib": "^2.6.2" }, + "peerDependencies": { + "@spartacus/core": "2211.32.0-1" + }, "publishConfig": { "access": "public" } diff --git a/projects/assets/src/public_api.ts b/projects/assets/src/public_api.ts index c42a3a85de1..24d537736c6 100644 --- a/projects/assets/src/public_api.ts +++ b/projects/assets/src/public_api.ts @@ -8,5 +8,20 @@ * Public API Surface of assets */ +import { translationsEn } from './translations/translations'; export * from './translations/translation-chunks-config'; export * from './translations/translations'; + +/** + * @deprecated Please use **specific language** translations (suffixed with language code) instead, + * like in the following example: + * ```diff + * i18n: { + * - resources: translations + * + resources: { en: translationsEn } + * } + * ``` + */ +export const translations = { + en: translationsEn, +}; diff --git a/projects/assets/src/translations/cs/index.ts b/projects/assets/src/translations/cs/index.ts new file mode 100644 index 00000000000..c497afbc89f --- /dev/null +++ b/projects/assets/src/translations/cs/index.ts @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import common from './common.json'; +import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; +import myAccount from './myAccount.json'; +import payment from './payment.json'; +import pdf from './pdf.json'; +import product from './product.json'; +import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; +import user from './user.json'; +import video from './video.json'; +export const cs = { + common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, + myAccount, + payment, + pdf, + product, + pwa, + siteThemeSwitcher, + user, + video, +}; diff --git a/projects/assets/src/translations/de/index.ts b/projects/assets/src/translations/de/index.ts index 3100f0777a8..7c89f505974 100644 --- a/projects/assets/src/translations/de/index.ts +++ b/projects/assets/src/translations/de/index.ts @@ -4,30 +4,29 @@ * SPDX-License-Identifier: Apache-2.0 */ -import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; -import myAccountV2Consent from './my-account-v2-consent.json'; import common from './common.json'; import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; import myAccount from './myAccount.json'; import payment from './payment.json'; import pdf from './pdf.json'; import product from './product.json'; import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; import user from './user.json'; import video from './video.json'; -import siteThemeSwitcher from './site-theme-switcher.json'; - export const de = { common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, myAccount, payment, + pdf, product, pwa, + siteThemeSwitcher, user, video, - pdf, - deliveryMode, - myAccountV2Consent, - myAccountV2NotifiationPerference, - siteThemeSwitcher, }; diff --git a/projects/assets/src/translations/en/index.ts b/projects/assets/src/translations/en/index.ts index d3440e970e9..19ce7b3fb77 100644 --- a/projects/assets/src/translations/en/index.ts +++ b/projects/assets/src/translations/en/index.ts @@ -4,30 +4,29 @@ * SPDX-License-Identifier: Apache-2.0 */ -import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; -import myAccountV2Consent from './my-account-v2-consent.json'; import common from './common.json'; import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; import myAccount from './myAccount.json'; import payment from './payment.json'; import pdf from './pdf.json'; import product from './product.json'; import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; import user from './user.json'; import video from './video.json'; -import siteThemeSwitcher from './site-theme-switcher.json'; - export const en = { common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, myAccount, payment, + pdf, product, pwa, + siteThemeSwitcher, user, video, - pdf, - deliveryMode, - myAccountV2Consent, - myAccountV2NotifiationPerference, - siteThemeSwitcher, }; diff --git a/projects/assets/src/translations/es/index.ts b/projects/assets/src/translations/es/index.ts new file mode 100644 index 00000000000..81967d0de4e --- /dev/null +++ b/projects/assets/src/translations/es/index.ts @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import common from './common.json'; +import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; +import myAccount from './myAccount.json'; +import payment from './payment.json'; +import pdf from './pdf.json'; +import product from './product.json'; +import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; +import user from './user.json'; +import video from './video.json'; +export const es = { + common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, + myAccount, + payment, + pdf, + product, + pwa, + siteThemeSwitcher, + user, + video, +}; diff --git a/projects/assets/src/translations/es_CO/index.ts b/projects/assets/src/translations/es_CO/index.ts new file mode 100644 index 00000000000..48b0326a2b3 --- /dev/null +++ b/projects/assets/src/translations/es_CO/index.ts @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import common from './common.json'; +import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; +import myAccount from './myAccount.json'; +import payment from './payment.json'; +import pdf from './pdf.json'; +import product from './product.json'; +import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; +import user from './user.json'; +import video from './video.json'; +export const es_CO = { + common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, + myAccount, + payment, + pdf, + product, + pwa, + siteThemeSwitcher, + user, + video, +}; diff --git a/projects/assets/src/translations/fr/index.ts b/projects/assets/src/translations/fr/index.ts new file mode 100644 index 00000000000..a361b7f7103 --- /dev/null +++ b/projects/assets/src/translations/fr/index.ts @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import common from './common.json'; +import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; +import myAccount from './myAccount.json'; +import payment from './payment.json'; +import pdf from './pdf.json'; +import product from './product.json'; +import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; +import user from './user.json'; +import video from './video.json'; +export const fr = { + common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, + myAccount, + payment, + pdf, + product, + pwa, + siteThemeSwitcher, + user, + video, +}; diff --git a/projects/assets/src/translations/hi/index.ts b/projects/assets/src/translations/hi/index.ts new file mode 100644 index 00000000000..a07ba934ac3 --- /dev/null +++ b/projects/assets/src/translations/hi/index.ts @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import common from './common.json'; +import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; +import myAccount from './myAccount.json'; +import payment from './payment.json'; +import pdf from './pdf.json'; +import product from './product.json'; +import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; +import user from './user.json'; +import video from './video.json'; +export const hi = { + common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, + myAccount, + payment, + pdf, + product, + pwa, + siteThemeSwitcher, + user, + video, +}; diff --git a/projects/assets/src/translations/hu/index.ts b/projects/assets/src/translations/hu/index.ts new file mode 100644 index 00000000000..6a1d0ecd65e --- /dev/null +++ b/projects/assets/src/translations/hu/index.ts @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import common from './common.json'; +import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; +import myAccount from './myAccount.json'; +import payment from './payment.json'; +import pdf from './pdf.json'; +import product from './product.json'; +import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; +import user from './user.json'; +import video from './video.json'; +export const hu = { + common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, + myAccount, + payment, + pdf, + product, + pwa, + siteThemeSwitcher, + user, + video, +}; diff --git a/projects/assets/src/translations/id/index.ts b/projects/assets/src/translations/id/index.ts new file mode 100644 index 00000000000..2331d7bda46 --- /dev/null +++ b/projects/assets/src/translations/id/index.ts @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import common from './common.json'; +import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; +import myAccount from './myAccount.json'; +import payment from './payment.json'; +import pdf from './pdf.json'; +import product from './product.json'; +import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; +import user from './user.json'; +import video from './video.json'; +export const id = { + common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, + myAccount, + payment, + pdf, + product, + pwa, + siteThemeSwitcher, + user, + video, +}; diff --git a/projects/assets/src/translations/it/index.ts b/projects/assets/src/translations/it/index.ts new file mode 100644 index 00000000000..794c01a2b3f --- /dev/null +++ b/projects/assets/src/translations/it/index.ts @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import common from './common.json'; +import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; +import myAccount from './myAccount.json'; +import payment from './payment.json'; +import pdf from './pdf.json'; +import product from './product.json'; +import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; +import user from './user.json'; +import video from './video.json'; +export const it = { + common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, + myAccount, + payment, + pdf, + product, + pwa, + siteThemeSwitcher, + user, + video, +}; diff --git a/projects/assets/src/translations/ja/index.ts b/projects/assets/src/translations/ja/index.ts index 412f136ac9d..33da823801c 100644 --- a/projects/assets/src/translations/ja/index.ts +++ b/projects/assets/src/translations/ja/index.ts @@ -4,30 +4,29 @@ * SPDX-License-Identifier: Apache-2.0 */ -import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; -import myAccountV2Consent from './my-account-v2-consent.json'; import common from './common.json'; import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; import myAccount from './myAccount.json'; import payment from './payment.json'; import pdf from './pdf.json'; import product from './product.json'; import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; import user from './user.json'; import video from './video.json'; -import siteThemeSwitcher from './site-theme-switcher.json'; - export const ja = { common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, myAccount, payment, + pdf, product, pwa, + siteThemeSwitcher, user, video, - pdf, - deliveryMode, - myAccountV2Consent, - myAccountV2NotifiationPerference, - siteThemeSwitcher, }; diff --git a/projects/assets/src/translations/ko/index.ts b/projects/assets/src/translations/ko/index.ts new file mode 100644 index 00000000000..a4865c7b66d --- /dev/null +++ b/projects/assets/src/translations/ko/index.ts @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import common from './common.json'; +import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; +import myAccount from './myAccount.json'; +import payment from './payment.json'; +import pdf from './pdf.json'; +import product from './product.json'; +import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; +import user from './user.json'; +import video from './video.json'; +export const ko = { + common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, + myAccount, + payment, + pdf, + product, + pwa, + siteThemeSwitcher, + user, + video, +}; diff --git a/projects/assets/src/translations/pl/index.ts b/projects/assets/src/translations/pl/index.ts new file mode 100644 index 00000000000..4d62e816e18 --- /dev/null +++ b/projects/assets/src/translations/pl/index.ts @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import common from './common.json'; +import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; +import myAccount from './myAccount.json'; +import payment from './payment.json'; +import pdf from './pdf.json'; +import product from './product.json'; +import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; +import user from './user.json'; +import video from './video.json'; +export const pl = { + common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, + myAccount, + payment, + pdf, + product, + pwa, + siteThemeSwitcher, + user, + video, +}; diff --git a/projects/assets/src/translations/pt/index.ts b/projects/assets/src/translations/pt/index.ts new file mode 100644 index 00000000000..4884f6b186b --- /dev/null +++ b/projects/assets/src/translations/pt/index.ts @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import common from './common.json'; +import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; +import myAccount from './myAccount.json'; +import payment from './payment.json'; +import pdf from './pdf.json'; +import product from './product.json'; +import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; +import user from './user.json'; +import video from './video.json'; +export const pt = { + common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, + myAccount, + payment, + pdf, + product, + pwa, + siteThemeSwitcher, + user, + video, +}; diff --git a/projects/assets/src/translations/ru/index.ts b/projects/assets/src/translations/ru/index.ts new file mode 100644 index 00000000000..8c263e33fe5 --- /dev/null +++ b/projects/assets/src/translations/ru/index.ts @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import common from './common.json'; +import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; +import myAccount from './myAccount.json'; +import payment from './payment.json'; +import pdf from './pdf.json'; +import product from './product.json'; +import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; +import user from './user.json'; +import video from './video.json'; +export const ru = { + common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, + myAccount, + payment, + pdf, + product, + pwa, + siteThemeSwitcher, + user, + video, +}; diff --git a/projects/assets/src/translations/translation-chunks-config.ts b/projects/assets/src/translations/translation-chunks-config.ts index 74ec1b1a800..dbc2880406d 100644 --- a/projects/assets/src/translations/translation-chunks-config.ts +++ b/projects/assets/src/translations/translation-chunks-config.ts @@ -7,68 +7,3 @@ export interface TranslationChunksConfig { [chunk: string]: string[]; } - -export const translationChunksConfig: TranslationChunksConfig = { - common: [ - 'common', - 'spinner', - 'searchBox', - 'navigation', - 'sorting', - 'httpHandlers', - 'pageMetaResolver', - 'miniCart', - 'skipLink', - 'formErrors', - 'errorHandlers', - 'carousel', - 'assistiveMessage', - 'passwordVisibility', - 'generalErrors', - 'chatMessaging', - 'formLegend', - ], - payment: [ - 'paymentForm', - 'paymentMethods', - 'paymentCard', - 'paymentTypes', - 'paymentMessages', - ], - myAccount: [ - 'orderDetails', - 'orderHistory', - 'closeAccount', - 'updatePasswordForm', - 'updateProfileForm', - 'consentManagementForm', - 'myCoupons', - 'notificationPreference', - 'myInterests', - 'AccountOrderHistoryTabContainer', - 'returnRequestList', - 'returnRequest', - ], - pwa: ['pwa'], - product: [ - 'productDetails', - 'productList', - 'productFacetNavigation', - 'productCarousel', - 'productSummary', - 'productReview', - 'addToCart', - 'addToWishList', - 'CMSTabParagraphContainer', - 'stockNotification', - 'TabPanelContainer', - 'itemCounter', - 'productView', - ], - user: ['anonymousConsents', 'loginRegister', 'checkoutLogin', 'authMessages'], - video: ['player'], - deliveryMode: ['setDeliveryMode'], - myAccountV2NotifiationPerference: ['myAccountV2NotifiationPerference'], - myAccountV2Consent: ['myAccountV2Consent'], - siteThemeSwitcher: ['siteThemeSwitcher'], -}; diff --git a/projects/assets/src/translations/translations.ts b/projects/assets/src/translations/translations.ts index 01d188c68af..2ab17612c40 100644 --- a/projects/assets/src/translations/translations.ts +++ b/projects/assets/src/translations/translations.ts @@ -5,21 +5,23 @@ */ import { en } from './en/index'; -import { ja } from './ja/index'; -import { de } from './de/index'; -import { zh } from './zh/index'; +import { extractTranslationChunksConfig } from '@spartacus/core'; +export const translationChunksConfig = extractTranslationChunksConfig(en); -interface TranslationResources { - [lang: string]: { - [chunkName: string]: { - [key: string]: any; - }; - }; -} - -export const translations: TranslationResources = { - en, - ja, - de, - zh, -}; +export { cs as translationsCs } from './cs/index'; +export { de as translationsDe } from './de/index'; +export { en as translationsEn } from './en/index'; +export { es as translationsEs } from './es/index'; +export { es_CO as translationsEs_CO } from './es_CO/index'; +export { fr as translationsFr } from './fr/index'; +export { hi as translationsHi } from './hi/index'; +export { hu as translationsHu } from './hu/index'; +export { id as translationsId } from './id/index'; +export { it as translationsIt } from './it/index'; +export { ja as translationsJa } from './ja/index'; +export { ko as translationsKo } from './ko/index'; +export { pl as translationsPl } from './pl/index'; +export { pt as translationsPt } from './pt/index'; +export { ru as translationsRu } from './ru/index'; +export { zh as translationsZh } from './zh/index'; +export { zh_TW as translationsZh_TW } from './zh_TW/index'; diff --git a/projects/assets/src/translations/zh/index.ts b/projects/assets/src/translations/zh/index.ts index 95d6da552a8..db977d13c48 100644 --- a/projects/assets/src/translations/zh/index.ts +++ b/projects/assets/src/translations/zh/index.ts @@ -4,30 +4,29 @@ * SPDX-License-Identifier: Apache-2.0 */ -import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; -import myAccountV2Consent from './my-account-v2-consent.json'; import common from './common.json'; import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; import myAccount from './myAccount.json'; import payment from './payment.json'; import pdf from './pdf.json'; import product from './product.json'; import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; import user from './user.json'; import video from './video.json'; -import siteThemeSwitcher from './site-theme-switcher.json'; - export const zh = { common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, myAccount, payment, + pdf, product, pwa, + siteThemeSwitcher, user, video, - pdf, - deliveryMode, - myAccountV2Consent, - myAccountV2NotifiationPerference, - siteThemeSwitcher, }; diff --git a/projects/assets/src/translations/zh_TW/index.ts b/projects/assets/src/translations/zh_TW/index.ts new file mode 100644 index 00000000000..acf154f8296 --- /dev/null +++ b/projects/assets/src/translations/zh_TW/index.ts @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +import common from './common.json'; +import deliveryMode from './deliveryMode.json'; +import myAccountV2Consent from './my-account-v2-consent.json'; +import myAccountV2NotifiationPerference from './my-account-v2-notification-perference.json'; +import myAccount from './myAccount.json'; +import payment from './payment.json'; +import pdf from './pdf.json'; +import product from './product.json'; +import pwa from './pwa.json'; +import siteThemeSwitcher from './site-theme-switcher.json'; +import user from './user.json'; +import video from './video.json'; +export const zh_TW = { + common, + deliveryMode, + myAccountV2Consent, + myAccountV2NotifiationPerference, + myAccount, + payment, + pdf, + product, + pwa, + siteThemeSwitcher, + user, + video, +}; diff --git a/projects/assets/tsconfig.lib.json b/projects/assets/tsconfig.lib.json index 9ed6d388cfc..bf8d724fea4 100644 --- a/projects/assets/tsconfig.lib.json +++ b/projects/assets/tsconfig.lib.json @@ -12,7 +12,10 @@ "experimentalDecorators": true, "importHelpers": true, "types": [], - "lib": ["esnext", "dom"] + "lib": ["esnext", "dom"], + "paths": { + "@spartacus/core": ["dist/core"] + } }, "exclude": ["src/test.ts", "**/*.spec.ts"] } diff --git a/projects/core/src/i18n/extract-translation-chunks-config.spec.ts b/projects/core/src/i18n/extract-translation-chunks-config.spec.ts new file mode 100644 index 00000000000..3c08fd6f3b7 --- /dev/null +++ b/projects/core/src/i18n/extract-translation-chunks-config.spec.ts @@ -0,0 +1,69 @@ +import { extractTranslationChunksConfig } from './extract-translation-chunks-config'; + +describe('extractTranslationChunksConfig', () => { + it('should transform translation object into chunks config', () => { + const translationsEn = { + common: { + greetings: { + hello: 'Hello', + welcome: 'Welcome', + }, + errors: { + notFound: 'Not found', + }, + }, + auth: { + userActions: { + login: 'Login', + register: 'Register', + }, + account: { + close: 'Close', + }, + }, + }; + + const result = extractTranslationChunksConfig(translationsEn); + + expect(result).toEqual({ + common: ['greetings', 'errors'], + auth: ['userActions', 'account'], + }); + }); + + it('should handle empty translation object', () => { + const translations = {}; + + const result = extractTranslationChunksConfig(translations); + + expect(result).toEqual({}); + }); + + it('should handle chunks that contain just 1 key', () => { + const translations = { + common: { hello: 'Hello' }, + auth: { login: 'Login' }, + }; + + const result = extractTranslationChunksConfig(translations); + + expect(result).toEqual({ + common: ['hello'], + auth: ['login'], + }); + }); + + it('should return empty array for a chunk without keys (edge case)', () => { + const translations = { + emptyChunk: {}, + nonEmptyChunk: { key: 'value' }, + }; + + const result = extractTranslationChunksConfig(translations); + + expect(result).toEqual({ + emptyChunk: [], + nonEmptyChunk: ['key'], + }); + }); +}); diff --git a/projects/core/src/i18n/extract-translation-chunks-config.ts b/projects/core/src/i18n/extract-translation-chunks-config.ts new file mode 100644 index 00000000000..bfb4e1e21e6 --- /dev/null +++ b/projects/core/src/i18n/extract-translation-chunks-config.ts @@ -0,0 +1,65 @@ +/* + * SPDX-FileCopyrightText: 2024 SAP Spartacus team + * SPDX-FileCopyrightText: 2025 SAP Spartacus team + * + * SPDX-License-Identifier: Apache-2.0 + */ + +type TranslationKeys = { + [K in keyof T]: string[]; +}; + +/** + * It extracts information about the primary keys in the various chunks of the given translations object. + * + * In other words, given the translations object for a single language, + * it returns an object with the keys as the chunk names, + * and the values as the array of primary keys in that chunk. + * + * @example For example, it will return the following object: + * ```ts + * { + * common: ['errors', 'pageMetaResolvers', ...], + * myAccount: ['closeAccount', 'updatePasswordForm', ...], + * ... + * } + * ``` + * + * ...when passing the following translations object as an argument: + * ```ts + * import common from './common.json'; + * import myAccount from './myAccount.json'; + * + * export const en = { + * common, + * myAccount, + * ... + * } + * ``` + * Where the JSON files are: + * ```ts + * // common.json + * { + * "errors": { ... }, + * "pageMetaResolvers": { ... }, + * ... + * } + * ``` + * + * ```ts + * // myAccount.json + * { + * "closeAccount": { ... }, + * "updatePasswordForm": { ... }, + * ... + * } + * ``` + */ +export const extractTranslationChunksConfig = < + T extends Record, +>( + translations: T +): TranslationKeys => + Object.fromEntries( + Object.entries(translations).map(([key, obj]) => [key, Object.keys(obj)]) + ) as TranslationKeys; diff --git a/projects/core/src/i18n/index.ts b/projects/core/src/i18n/index.ts index 9ac3f381f49..591b67ef1c3 100644 --- a/projects/core/src/i18n/index.ts +++ b/projects/core/src/i18n/index.ts @@ -16,3 +16,4 @@ export * from './translate.pipe'; export * from './translation-chunk.service'; export * from './translation-resources'; export * from './translation.service'; +export * from './extract-translation-chunks-config'; diff --git a/projects/schematics/src/add-spartacus/configuration.ts b/projects/schematics/src/add-spartacus/configuration.ts index 3f438d4e70a..6055ac91d7d 100644 --- a/projects/schematics/src/add-spartacus/configuration.ts +++ b/projects/schematics/src/add-spartacus/configuration.ts @@ -188,7 +188,7 @@ function addStorefrontConfig( }, { moduleSpecifier: SPARTACUS_ASSETS, - namedImports: ['translations', 'translationChunksConfig'], + namedImports: ['translationsEn', 'translationChunksConfig'], }, ], content: i18nConfig, @@ -222,7 +222,7 @@ function createBackendConfiguration(options: SpartacusOptions): string { function createI18NConfiguration(): string { return `provideConfig(<${I18N_CONFIG}>{ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunksConfig, fallbackLang: 'en' }, diff --git a/projects/schematics/src/dependencies.json b/projects/schematics/src/dependencies.json index e06f9f8c3d6..5d3a4b9ade7 100644 --- a/projects/schematics/src/dependencies.json +++ b/projects/schematics/src/dependencies.json @@ -1,5 +1,7 @@ { - "@spartacus/assets": {}, + "@spartacus/assets": { + "@spartacus/core": "2211.32.0-1" + }, "@spartacus/core": { "@angular/common": "^18.2.9", "@angular/core": "^18.2.9", diff --git a/projects/schematics/src/shared/utils/__snapshots__/feature-utils_spec.ts.snap b/projects/schematics/src/shared/utils/__snapshots__/feature-utils_spec.ts.snap index 46dd8ace2da..c31dc806013 100644 --- a/projects/schematics/src/shared/utils/__snapshots__/feature-utils_spec.ts.snap +++ b/projects/schematics/src/shared/utils/__snapshots__/feature-utils_spec.ts.snap @@ -3,7 +3,7 @@ exports[`Feature utils addFeatures should generate feature modules for the given array of features 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { userAccountTranslationChunksConfig, userAccountTranslations } from "@spartacus/user/account/assets"; +import { userAccountTranslationChunksConfig, userAccountTranslationsEn } from "@spartacus/user/account/assets"; import { USER_ACCOUNT_FEATURE, UserAccountRootModule } from "@spartacus/user/account/root"; @NgModule({ @@ -21,7 +21,7 @@ import { USER_ACCOUNT_FEATURE, UserAccountRootModule } from "@spartacus/user/acc }), provideConfig({ i18n: { - resources: userAccountTranslations, + resources: { en: userAccountTranslationsEn }, chunks: userAccountTranslationChunksConfig, }, }) @@ -34,7 +34,7 @@ export class UserFeatureModule { } exports[`Feature utils analyzeApplication dependent features check when the dependent feature is eagerly configured should succeed 1`] = ` "import { NgModule } from '@angular/core'; import { CheckoutModule } from "@spartacus/checkout/base"; -import { checkoutTranslationChunksConfig, checkoutTranslations } from "@spartacus/checkout/base/assets"; +import { checkoutTranslationChunksConfig, checkoutTranslationsEn } from "@spartacus/checkout/base/assets"; import { CheckoutRootModule } from "@spartacus/checkout/base/root"; import { I18nConfig, provideConfig } from "@spartacus/core"; import { DigitalPaymentsModule } from "@spartacus/digital-payments"; @@ -47,7 +47,7 @@ import { DigitalPaymentsModule } from "@spartacus/digital-payments"; ], providers: [provideConfig({ i18n: { - resources: checkoutTranslations, + resources: { en: checkoutTranslationsEn }, chunks: checkoutTranslationChunksConfig, }, })] @@ -75,7 +75,7 @@ export class CheckoutWrapperModule { exports[`Feature utils analyzeApplication dependent features check when the dependent feature is lazily configured should succeed 2`] = ` "import { NgModule } from '@angular/core'; -import { checkoutTranslationChunksConfig, checkoutTranslations } from "@spartacus/checkout/base/assets"; +import { checkoutTranslationChunksConfig, checkoutTranslationsEn } from "@spartacus/checkout/base/assets"; import { CHECKOUT_FEATURE, CheckoutRootModule } from "@spartacus/checkout/base/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @NgModule({ @@ -92,7 +92,7 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: checkoutTranslations, + resources: { en: checkoutTranslationsEn }, chunks: checkoutTranslationChunksConfig, }, }) diff --git a/projects/schematics/src/shared/utils/__snapshots__/lib-utils_spec.ts.snap b/projects/schematics/src/shared/utils/__snapshots__/lib-utils_spec.ts.snap index b98aeb8530f..c0894743f83 100644 --- a/projects/schematics/src/shared/utils/__snapshots__/lib-utils_spec.ts.snap +++ b/projects/schematics/src/shared/utils/__snapshots__/lib-utils_spec.ts.snap @@ -4,7 +4,7 @@ exports[`Lib utils addLibraryFeature custom config option should add the custom "import { NgModule } from '@angular/core'; import { CdsConfig } from "@spartacus/cds"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { translationChunk, translations } from "@spartacus/xxx/assets"; +import { translationChunk, translationsEn } from "@spartacus/xxx/assets"; import { XxxModuleRoot } from "@spartacus/xxx/root"; @NgModule({ @@ -22,7 +22,7 @@ import { XxxModuleRoot } from "@spartacus/xxx/root"; }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunk, }, }), @@ -69,7 +69,7 @@ export class XxxFeatureModule { } exports[`Lib utils addLibraryFeature should add i18n config in feature module 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { translationChunk, translations } from "@spartacus/xxx/assets"; +import { translationChunk, translationsEn } from "@spartacus/xxx/assets"; import { XxxModuleRoot } from "@spartacus/xxx/root"; @NgModule({ @@ -87,7 +87,7 @@ import { XxxModuleRoot } from "@spartacus/xxx/root"; }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunk, }, }) @@ -100,7 +100,7 @@ export class XxxFeatureModule { } exports[`Lib utils addLibraryFeature when the lazy loading is configured should add it in the lazy loading way 1`] = ` "import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; -import { translationChunk, translations } from "@spartacus/xxx/assets"; +import { translationChunk, translationsEn } from "@spartacus/xxx/assets"; import { XxxModuleRoot } from "@spartacus/xxx/root"; @NgModule({ @@ -118,7 +118,7 @@ import { XxxModuleRoot } from "@spartacus/xxx/root"; }), provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunk, }, }) @@ -388,7 +388,7 @@ exports[`Lib utils when the eager loading is configured should add it in the eag "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; import { XxxModule } from "@spartacus/xxx"; -import { translationChunk, translations } from "@spartacus/xxx/assets"; +import { translationChunk, translationsEn } from "@spartacus/xxx/assets"; import { XxxModuleRoot } from "@spartacus/xxx/root"; @NgModule({ @@ -399,7 +399,7 @@ import { XxxModuleRoot } from "@spartacus/xxx/root"; ], providers: [provideConfig({ i18n: { - resources: translations, + resources: { en: translationsEn }, chunks: translationChunk, }, })] diff --git a/projects/schematics/src/shared/utils/lib-utils.ts b/projects/schematics/src/shared/utils/lib-utils.ts index 1907ba54064..5b97ec824a3 100644 --- a/projects/schematics/src/shared/utils/lib-utils.ts +++ b/projects/schematics/src/shared/utils/lib-utils.ts @@ -469,12 +469,12 @@ export function addFeatureTranslations( }, { moduleSpecifier: config.i18n.importPath, - namedImports: [config.i18n.chunks, config.i18n.resources], + namedImports: [config.i18n.chunks, `${config.i18n.resources}En`], }, ], content: `${PROVIDE_CONFIG_FUNCTION}(<${I18N_CONFIG}>{ i18n: { - resources: ${config.i18n.resources}, + resources: { en: ${config.i18n.resources}En }, chunks: ${config.i18n.chunks}, }, })`, diff --git a/projects/schematics/src/wrapper-module/__snapshots__/index_spec.ts.snap b/projects/schematics/src/wrapper-module/__snapshots__/index_spec.ts.snap index bd5c0974f8d..a3692535fe8 100644 --- a/projects/schematics/src/wrapper-module/__snapshots__/index_spec.ts.snap +++ b/projects/schematics/src/wrapper-module/__snapshots__/index_spec.ts.snap @@ -2,11 +2,11 @@ exports[`Spartacus Wrapper Module Schematics: ng g @spartacus/schematics:wrapper-module Checkout Scheduled Replenishment should create the checkout wrapper module and import Checkout features 1`] = ` "import { NgModule } from '@angular/core'; -import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslations } from "@spartacus/checkout/b2b/assets"; +import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslationsEn } from "@spartacus/checkout/b2b/assets"; import { CheckoutB2BRootModule } from "@spartacus/checkout/b2b/root"; -import { checkoutTranslationChunksConfig, checkoutTranslations } from "@spartacus/checkout/base/assets"; +import { checkoutTranslationChunksConfig, checkoutTranslationsEn } from "@spartacus/checkout/base/assets"; import { CHECKOUT_FEATURE, CheckoutRootModule } from "@spartacus/checkout/base/root"; -import { checkoutScheduledReplenishmentTranslationChunksConfig, checkoutScheduledReplenishmentTranslations } from "@spartacus/checkout/scheduled-replenishment/assets"; +import { checkoutScheduledReplenishmentTranslationChunksConfig, checkoutScheduledReplenishmentTranslationsEn } from "@spartacus/checkout/scheduled-replenishment/assets"; import { CheckoutScheduledReplenishmentRootModule } from "@spartacus/checkout/scheduled-replenishment/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @NgModule({ @@ -25,19 +25,19 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: checkoutTranslations, + resources: { en: checkoutTranslationsEn }, chunks: checkoutTranslationChunksConfig, }, }), provideConfig({ i18n: { - resources: checkoutB2BTranslations, + resources: { en: checkoutB2BTranslationsEn }, chunks: checkoutB2BTranslationChunksConfig, }, }), provideConfig({ i18n: { - resources: checkoutScheduledReplenishmentTranslations, + resources: { en: checkoutScheduledReplenishmentTranslationsEn }, chunks: checkoutScheduledReplenishmentTranslationChunksConfig, }, }) @@ -69,13 +69,13 @@ export class CheckoutWrapperModule { exports[`Spartacus Wrapper Module Schematics: ng g @spartacus/schematics:wrapper-module Checkout and DP Should create DP feature module 1`] = ` "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; -import { dpTranslationChunksConfig, dpTranslations } from "@spartacus/digital-payments/assets"; +import { dpTranslationChunksConfig, dpTranslationsEn } from "@spartacus/digital-payments/assets"; @NgModule({ declarations: [], imports: [], providers: [provideConfig({ i18n: { - resources: dpTranslations, + resources: { en: dpTranslationsEn }, chunks: dpTranslationChunksConfig, }, }) @@ -88,11 +88,11 @@ export class DigitalPaymentsFeatureModule { exports[`Spartacus Wrapper Module Schematics: ng g @spartacus/schematics:wrapper-module Checkout and DP Should create checkout feature module 1`] = ` "import { NgModule } from '@angular/core'; -import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslations } from "@spartacus/checkout/b2b/assets"; +import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslationsEn } from "@spartacus/checkout/b2b/assets"; import { CheckoutB2BRootModule } from "@spartacus/checkout/b2b/root"; -import { checkoutTranslationChunksConfig, checkoutTranslations } from "@spartacus/checkout/base/assets"; +import { checkoutTranslationChunksConfig, checkoutTranslationsEn } from "@spartacus/checkout/base/assets"; import { CHECKOUT_FEATURE, CheckoutRootModule } from "@spartacus/checkout/base/root"; -import { checkoutScheduledReplenishmentTranslationChunksConfig, checkoutScheduledReplenishmentTranslations } from "@spartacus/checkout/scheduled-replenishment/assets"; +import { checkoutScheduledReplenishmentTranslationChunksConfig, checkoutScheduledReplenishmentTranslationsEn } from "@spartacus/checkout/scheduled-replenishment/assets"; import { CheckoutScheduledReplenishmentRootModule } from "@spartacus/checkout/scheduled-replenishment/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @NgModule({ @@ -111,19 +111,19 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: checkoutTranslations, + resources: { en: checkoutTranslationsEn }, chunks: checkoutTranslationChunksConfig, }, }), provideConfig({ i18n: { - resources: checkoutB2BTranslations, + resources: { en: checkoutB2BTranslationsEn }, chunks: checkoutB2BTranslationChunksConfig, }, }), provideConfig({ i18n: { - resources: checkoutScheduledReplenishmentTranslations, + resources: { en: checkoutScheduledReplenishmentTranslationsEn }, chunks: checkoutScheduledReplenishmentTranslationChunksConfig, }, }) @@ -176,11 +176,11 @@ export class CheckoutWrapperModule { exports[`Spartacus Wrapper Module Schematics: ng g @spartacus/schematics:wrapper-module Digital Payments should create the checkout wrapper module and import Base Checkout and DP 2`] = ` "import { NgModule } from '@angular/core'; -import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslations } from "@spartacus/checkout/b2b/assets"; +import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslationsEn } from "@spartacus/checkout/b2b/assets"; import { CheckoutB2BRootModule } from "@spartacus/checkout/b2b/root"; -import { checkoutTranslationChunksConfig, checkoutTranslations } from "@spartacus/checkout/base/assets"; +import { checkoutTranslationChunksConfig, checkoutTranslationsEn } from "@spartacus/checkout/base/assets"; import { CHECKOUT_FEATURE, CheckoutRootModule } from "@spartacus/checkout/base/root"; -import { checkoutScheduledReplenishmentTranslationChunksConfig, checkoutScheduledReplenishmentTranslations } from "@spartacus/checkout/scheduled-replenishment/assets"; +import { checkoutScheduledReplenishmentTranslationChunksConfig, checkoutScheduledReplenishmentTranslationsEn } from "@spartacus/checkout/scheduled-replenishment/assets"; import { CheckoutScheduledReplenishmentRootModule } from "@spartacus/checkout/scheduled-replenishment/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @NgModule({ @@ -199,19 +199,19 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: checkoutTranslations, + resources: { en: checkoutTranslationsEn }, chunks: checkoutTranslationChunksConfig, }, }), provideConfig({ i18n: { - resources: checkoutB2BTranslations, + resources: { en: checkoutB2BTranslationsEn }, chunks: checkoutB2BTranslationChunksConfig, }, }), provideConfig({ i18n: { - resources: checkoutScheduledReplenishmentTranslations, + resources: { en: checkoutScheduledReplenishmentTranslationsEn }, chunks: checkoutScheduledReplenishmentTranslationChunksConfig, }, }) @@ -225,13 +225,13 @@ export class CheckoutFeatureModule { exports[`Spartacus Wrapper Module Schematics: ng g @spartacus/schematics:wrapper-module Digital Payments should create the checkout wrapper module and import Base Checkout and DP 3`] = ` "import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from "@spartacus/core"; -import { dpTranslationChunksConfig, dpTranslations } from "@spartacus/digital-payments/assets"; +import { dpTranslationChunksConfig, dpTranslationsEn } from "@spartacus/digital-payments/assets"; @NgModule({ declarations: [], imports: [], providers: [provideConfig({ i18n: { - resources: dpTranslations, + resources: { en: dpTranslationsEn }, chunks: dpTranslationChunksConfig, }, }) @@ -244,7 +244,7 @@ export class DigitalPaymentsFeatureModule { exports[`Spartacus Wrapper Module Schematics: ng g @spartacus/schematics:wrapper-module Double execution should not change anything 1`] = ` "import { NgModule } from '@angular/core'; -import { checkoutTranslationChunksConfig, checkoutTranslations } from "@spartacus/checkout/base/assets"; +import { checkoutTranslationChunksConfig, checkoutTranslationsEn } from "@spartacus/checkout/base/assets"; import { CHECKOUT_FEATURE, CheckoutRootModule } from "@spartacus/checkout/base/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @NgModule({ @@ -261,7 +261,7 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: checkoutTranslations, + resources: { en: checkoutTranslationsEn }, chunks: checkoutTranslationChunksConfig, }, }) @@ -288,7 +288,7 @@ export class CheckoutWrapperModule { exports[`Spartacus Wrapper Module Schematics: ng g @spartacus/schematics:wrapper-module Multiple dynamic imports in the file should generate appropriate feature module 1`] = ` "import { NgModule } from '@angular/core'; -import { cartBaseTranslationChunksConfig, cartBaseTranslations } from "@spartacus/cart/base/assets"; +import { cartBaseTranslationChunksConfig, cartBaseTranslationsEn } from "@spartacus/cart/base/assets"; import { ADD_TO_CART_FEATURE, CART_BASE_FEATURE, CartBaseRootModule, MINI_CART_FEATURE } from "@spartacus/cart/base/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @NgModule({ @@ -319,7 +319,7 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: cartBaseTranslations, + resources: { en: cartBaseTranslationsEn }, chunks: cartBaseTranslationChunksConfig, }, }) @@ -346,9 +346,9 @@ export class CartBaseWrapperModule { exports[`Spartacus Wrapper Module Schematics: ng g @spartacus/schematics:wrapper-module One dynamic import in the file should generate appropriate feature module 1`] = ` "import { NgModule } from '@angular/core'; -import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslations } from "@spartacus/checkout/b2b/assets"; +import { checkoutB2BTranslationChunksConfig, checkoutB2BTranslationsEn } from "@spartacus/checkout/b2b/assets"; import { CheckoutB2BRootModule } from "@spartacus/checkout/b2b/root"; -import { checkoutTranslationChunksConfig, checkoutTranslations } from "@spartacus/checkout/base/assets"; +import { checkoutTranslationChunksConfig, checkoutTranslationsEn } from "@spartacus/checkout/base/assets"; import { CHECKOUT_FEATURE, CheckoutRootModule } from "@spartacus/checkout/base/root"; import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; @NgModule({ @@ -366,13 +366,13 @@ import { CmsConfig, I18nConfig, provideConfig } from "@spartacus/core"; }), provideConfig({ i18n: { - resources: checkoutTranslations, + resources: { en: checkoutTranslationsEn }, chunks: checkoutTranslationChunksConfig, }, }), provideConfig({ i18n: { - resources: checkoutB2BTranslations, + resources: { en: checkoutB2BTranslationsEn }, chunks: checkoutB2BTranslationChunksConfig, }, }) @@ -401,7 +401,7 @@ export class CheckoutWrapperModule { exports[`Spartacus Wrapper Module Schematics: ng g @spartacus/schematics:wrapper-module wrapper module already exists should append the feature module after it, and not add a dynamic import to the feature module 1`] = ` "import { NgModule } from '@angular/core'; -import { checkoutTranslationChunksConfig, checkoutTranslations } from "@spartacus/checkout/base/assets"; +import { checkoutTranslationChunksConfig, checkoutTranslationsEn } from "@spartacus/checkout/base/assets"; import { CheckoutRootModule } from "@spartacus/checkout/base/root"; import { I18nConfig, provideConfig } from "@spartacus/core"; @NgModule({ @@ -411,7 +411,7 @@ import { I18nConfig, provideConfig } from "@spartacus/core"; ], providers: [provideConfig({ i18n: { - resources: checkoutTranslations, + resources: { en: checkoutTranslationsEn }, chunks: checkoutTranslationChunksConfig, }, }) diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/customer-list.e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/customer-list.e2e.cy.ts index 6d5b42eb185..9038a360d9c 100644 --- a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/customer-list.e2e.cy.ts +++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/asm/customer-list.e2e.cy.ts @@ -6,7 +6,6 @@ import * as asm from '../../../helpers/asm'; import * as checkout from '../../../helpers/checkout-flow'; -import { getSampleUser } from '../../../sample-data/checkout-flow'; import { clearAllStorage } from '../../../support/utils/clear-all-storage'; context('Assisted Service Module', () => { diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-interactive.e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-interactive.e2e.cy.ts index 6b3bb6a3997..a3bb00b1e3e 100644 --- a/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-interactive.e2e.cy.ts +++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/regression/product_configurator/product-configurator-vc-interactive.e2e.cy.ts @@ -8,10 +8,7 @@ import * as configuration from '../../../helpers/product-configurator'; import { clickAllowAllFromBanner } from '../../../helpers/anonymous-consents'; import * as configurationOverviewVc from '../../../helpers/product-configurator-overview-vc'; import * as configurationVc from '../../../helpers/product-configurator-vc'; -import * as configurationCart from '../../../helpers/product-configurator-cart'; import * as common from '../../../helpers/common'; -import { clickOnConfigurationLink } from '../../../helpers/common'; -import { checkConfigPageDisplayed } from '../../../helpers/product-configurator-vc'; const electronicsShop = 'electronics-spa'; const testProduct = 'CONF_CAMERA_SL'; diff --git a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/omf/omf-order-v2-e2e.cy.ts b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/omf/omf-order-v2-e2e.cy.ts index 04d7b4e8056..0d10832dea8 100644 --- a/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/omf/omf-order-v2-e2e.cy.ts +++ b/projects/storefrontapp-e2e-cypress/cypress/e2e/vendor/omf/omf-order-v2-e2e.cy.ts @@ -14,11 +14,11 @@ import { interceptOrdersEndpoint, waitForResponse, } from '../../../helpers/order-history'; +import { OmfConfig } from '@spartacus/core'; const omfTester = { email: 'keenreviewer14@hybris.com', password: 'Welcome@1', }; -import { OmfConfig } from '@spartacus/core'; const headerName = 'guid'; diff --git a/projects/storefrontapp/src/app/app.module.ts b/projects/storefrontapp/src/app/app.module.ts index 7002a6b08f4..7143191d0aa 100644 --- a/projects/storefrontapp/src/app/app.module.ts +++ b/projects/storefrontapp/src/app/app.module.ts @@ -18,7 +18,13 @@ import { BrowserModule } from '@angular/platform-browser'; import { EffectsModule } from '@ngrx/effects'; import { StoreModule } from '@ngrx/store'; import { StoreDevtoolsModule } from '@ngrx/store-devtools'; -import { translationChunksConfig, translations } from '@spartacus/assets'; +import { + translationChunksConfig, + translationsDe, + translationsEn, + translationsJa, + translationsZh, +} from '@spartacus/assets'; import { I18nConfig, OccConfig, @@ -79,10 +85,10 @@ if (!environment.production) { // we bring in static translations to be up and running soon right away i18n: { resources: { - en: translations['en'], - ja: translations['ja'], - de: translations['de'], - zh: translations['zh'], + en: translationsEn, + ja: translationsJa, + de: translationsDe, + zh: translationsZh, }, chunks: translationChunksConfig, fallbackLang: 'en', diff --git a/projects/storefrontapp/src/app/spartacus/features/asm/asm-customer-360-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/asm/asm-customer-360-feature.module.ts index c5ac36a3f4f..24dd190d370 100644 --- a/projects/storefrontapp/src/app/spartacus/features/asm/asm-customer-360-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/asm/asm-customer-360-feature.module.ts @@ -7,7 +7,10 @@ import { NgModule } from '@angular/core'; import { asmCustomer360TranslationChunksConfig, - asmCustomer360Translations, + asmCustomer360TranslationsEn, + asmCustomer360TranslationsJa, + asmCustomer360TranslationsDe, + asmCustomer360TranslationsZh, } from '@spartacus/asm/customer-360/assets'; import { AsmCustomer360RootModule, @@ -30,7 +33,12 @@ import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; }), provideConfig({ i18n: { - resources: asmCustomer360Translations, + resources: { + en: asmCustomer360TranslationsEn, + ja: asmCustomer360TranslationsJa, + de: asmCustomer360TranslationsDe, + zh: asmCustomer360TranslationsZh, + }, chunks: asmCustomer360TranslationChunksConfig, }, }), diff --git a/projects/storefrontapp/src/app/spartacus/features/asm/asm-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/asm/asm-feature.module.ts index 2465fb2bebb..8c5b903a561 100644 --- a/projects/storefrontapp/src/app/spartacus/features/asm/asm-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/asm/asm-feature.module.ts @@ -7,7 +7,10 @@ import { NgModule } from '@angular/core'; import { asmTranslationChunksConfig, - asmTranslations, + asmTranslationsEn, + asmTranslationsJa, + asmTranslationsDe, + asmTranslationsZh, } from '@spartacus/asm/assets'; import { AsmRootModule, ASM_FEATURE } from '@spartacus/asm/root'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; @@ -24,7 +27,12 @@ import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; }), provideConfig({ i18n: { - resources: asmTranslations, + resources: { + en: asmTranslationsEn, + ja: asmTranslationsJa, + de: asmTranslationsDe, + zh: asmTranslationsZh, + }, chunks: asmTranslationChunksConfig, }, }), diff --git a/projects/storefrontapp/src/app/spartacus/features/cart/cart-base-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/cart/cart-base-feature.module.ts index df0935d2bd2..25feb6a1e43 100644 --- a/projects/storefrontapp/src/app/spartacus/features/cart/cart-base-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/cart/cart-base-feature.module.ts @@ -7,7 +7,10 @@ import { NgModule } from '@angular/core'; import { cartBaseTranslationChunksConfig, - cartBaseTranslations, + cartBaseTranslationsEn, + cartBaseTranslationsJa, + cartBaseTranslationsDe, + cartBaseTranslationsZh, } from '@spartacus/cart/base/assets'; import { ADD_TO_CART_FEATURE, @@ -52,7 +55,12 @@ import { provideConfig } from '@spartacus/core'; }), provideConfig({ i18n: { - resources: cartBaseTranslations, + resources: { + en: cartBaseTranslationsEn, + ja: cartBaseTranslationsJa, + de: cartBaseTranslationsDe, + zh: cartBaseTranslationsZh, + }, chunks: cartBaseTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/cart/cart-import-export-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/cart/cart-import-export-feature.module.ts index b611490bf3b..f053dd5f1c5 100644 --- a/projects/storefrontapp/src/app/spartacus/features/cart/cart-import-export-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/cart/cart-import-export-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { provideConfig } from '@spartacus/core'; import { importExportTranslationChunksConfig, - importExportTranslations, + importExportTranslationsEn, + importExportTranslationsJa, + importExportTranslationsDe, + importExportTranslationsZh, } from '@spartacus/cart/import-export/assets'; import { CART_IMPORT_EXPORT_FEATURE, @@ -28,7 +31,12 @@ import { }, }, i18n: { - resources: importExportTranslations, + resources: { + en: importExportTranslationsEn, + ja: importExportTranslationsJa, + de: importExportTranslationsDe, + zh: importExportTranslationsZh, + }, chunks: importExportTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/cart/cart-quick-order-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/cart/cart-quick-order-feature.module.ts index cc6dca7160b..42f4f950231 100644 --- a/projects/storefrontapp/src/app/spartacus/features/cart/cart-quick-order-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/cart/cart-quick-order-feature.module.ts @@ -7,7 +7,10 @@ import { NgModule } from '@angular/core'; import { quickOrderTranslationChunksConfig, - quickOrderTranslations, + quickOrderTranslationsEn, + quickOrderTranslationsJa, + quickOrderTranslationsDe, + quickOrderTranslationsZh, } from '@spartacus/cart/quick-order/assets'; import { CART_QUICK_ORDER_FEATURE, @@ -28,7 +31,12 @@ import { provideConfig } from '@spartacus/core'; }, }, i18n: { - resources: quickOrderTranslations, + resources: { + en: quickOrderTranslationsEn, + ja: quickOrderTranslationsJa, + de: quickOrderTranslationsDe, + zh: quickOrderTranslationsZh, + }, chunks: quickOrderTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/cart/cart-saved-cart-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/cart/cart-saved-cart-feature.module.ts index 29ffb8bc5e5..f68c1eef37a 100644 --- a/projects/storefrontapp/src/app/spartacus/features/cart/cart-saved-cart-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/cart/cart-saved-cart-feature.module.ts @@ -7,7 +7,10 @@ import { NgModule } from '@angular/core'; import { savedCartTranslationChunksConfig, - savedCartTranslations, + savedCartTranslationsEn, + savedCartTranslationsJa, + savedCartTranslationsDe, + savedCartTranslationsZh, } from '@spartacus/cart/saved-cart/assets'; import { CART_SAVED_CART_FEATURE, @@ -28,7 +31,12 @@ import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; }), provideConfig({ i18n: { - resources: savedCartTranslations, + resources: { + en: savedCartTranslationsEn, + ja: savedCartTranslationsJa, + de: savedCartTranslationsDe, + zh: savedCartTranslationsZh, + }, chunks: savedCartTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/cart/wish-list-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/cart/wish-list-feature.module.ts index 84bb857aa44..7a81396a719 100644 --- a/projects/storefrontapp/src/app/spartacus/features/cart/wish-list-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/cart/wish-list-feature.module.ts @@ -7,7 +7,10 @@ import { NgModule } from '@angular/core'; import { wishListTranslationChunksConfig, - wishListTranslations, + wishListTranslationsEn, + wishListTranslationsJa, + wishListTranslationsDe, + wishListTranslationsZh, } from '@spartacus/cart/wish-list/assets'; import { ADD_TO_WISHLIST_FEATURE, @@ -35,7 +38,12 @@ import { I18nConfig, provideConfig } from '@spartacus/core'; }), provideConfig({ i18n: { - resources: wishListTranslations, + resources: { + en: wishListTranslationsEn, + ja: wishListTranslationsJa, + de: wishListTranslationsDe, + zh: wishListTranslationsZh, + }, chunks: wishListTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/cdc/cdc-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/cdc/cdc-feature.module.ts index fb9cdd38d6a..5406be42430 100644 --- a/projects/storefrontapp/src/app/spartacus/features/cdc/cdc-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/cdc/cdc-feature.module.ts @@ -8,8 +8,11 @@ import { NgModule } from '@angular/core'; import { CdcConfig, CdcRootModule, CDC_FEATURE } from '@spartacus/cdc/root'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { - cdcTranslations, cdcTranslationChunksConfig, + cdcTranslationsEn, + cdcTranslationsJa, + cdcTranslationsDe, + cdcTranslationsZh, } from '@spartacus/cdc/assets'; @NgModule({ imports: [CdcRootModule], @@ -37,7 +40,12 @@ import { }), provideConfig({ i18n: { - resources: cdcTranslations, + resources: { + en: cdcTranslationsEn, + ja: cdcTranslationsJa, + de: cdcTranslationsDe, + zh: cdcTranslationsZh, + }, chunks: cdcTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/cds/cds-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/cds/cds-feature.module.ts index c073c636b47..c5d01b1ab70 100644 --- a/projects/storefrontapp/src/app/spartacus/features/cds/cds-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/cds/cds-feature.module.ts @@ -14,7 +14,10 @@ import { } from '@spartacus/core'; import { cdsTranslationChunksConfig, - cdsTranslations, + cdsTranslationsEn, + cdsTranslationsJa, + cdsTranslationsDe, + cdsTranslationsZh, } from '@spartacus/cds/assets'; const cds1: CdsConfig = { @@ -85,7 +88,12 @@ const cdsConfig = (windowRef: WindowRef): CdsConfig => { providers: [ provideConfig({ i18n: { - resources: cdsTranslations, + resources: { + en: cdsTranslationsEn, + ja: cdsTranslationsJa, + de: cdsTranslationsDe, + zh: cdsTranslationsZh, + }, chunks: cdsTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/checkout/checkout-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/checkout/checkout-feature.module.ts index 44978e19897..429a3605417 100644 --- a/projects/storefrontapp/src/app/spartacus/features/checkout/checkout-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/checkout/checkout-feature.module.ts @@ -7,12 +7,18 @@ import { NgModule, Provider, Type } from '@angular/core'; import { checkoutB2BTranslationChunksConfig, - checkoutB2BTranslations, + checkoutB2BTranslationsEn, + checkoutB2BTranslationsJa, + checkoutB2BTranslationsDe, + checkoutB2BTranslationsZh, } from '@spartacus/checkout/b2b/assets'; import { CheckoutB2BRootModule } from '@spartacus/checkout/b2b/root'; import { checkoutTranslationChunksConfig, - checkoutTranslations, + checkoutTranslationsEn, + checkoutTranslationsJa, + checkoutTranslationsDe, + checkoutTranslationsZh, } from '@spartacus/checkout/base/assets'; import { CHECKOUT_FEATURE, @@ -20,7 +26,10 @@ import { } from '@spartacus/checkout/base/root'; import { checkoutScheduledReplenishmentTranslationChunksConfig, - checkoutScheduledReplenishmentTranslations, + checkoutScheduledReplenishmentTranslationsEn, + checkoutScheduledReplenishmentTranslationsJa, + checkoutScheduledReplenishmentTranslationsDe, + checkoutScheduledReplenishmentTranslationsZh, } from '@spartacus/checkout/scheduled-replenishment/assets'; import { CheckoutScheduledReplenishmentRootModule } from '@spartacus/checkout/scheduled-replenishment/root'; import { provideConfig } from '@spartacus/core'; @@ -38,7 +47,12 @@ if (environment.b2b) { extensionProviders.push( provideConfig({ i18n: { - resources: checkoutB2BTranslations, + resources: { + en: checkoutB2BTranslationsEn, + ja: checkoutB2BTranslationsJa, + de: checkoutB2BTranslationsDe, + zh: checkoutB2BTranslationsZh, + }, chunks: checkoutB2BTranslationChunksConfig, }, }) @@ -46,7 +60,12 @@ if (environment.b2b) { extensionProviders.push( provideConfig({ i18n: { - resources: checkoutScheduledReplenishmentTranslations, + resources: { + en: checkoutScheduledReplenishmentTranslationsEn, + ja: checkoutScheduledReplenishmentTranslationsJa, + de: checkoutScheduledReplenishmentTranslationsDe, + zh: checkoutScheduledReplenishmentTranslationsZh, + }, chunks: checkoutScheduledReplenishmentTranslationChunksConfig, }, }) @@ -68,7 +87,12 @@ if (environment.b2b) { }), provideConfig({ i18n: { - resources: checkoutTranslations, + resources: { + en: checkoutTranslationsEn, + ja: checkoutTranslationsJa, + de: checkoutTranslationsDe, + zh: checkoutTranslationsZh, + }, chunks: checkoutTranslationChunksConfig, }, }), diff --git a/projects/storefrontapp/src/app/spartacus/features/cpq-quote/cpq-quote-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/cpq-quote/cpq-quote-feature.module.ts index 00a5332f204..6c94536de29 100644 --- a/projects/storefrontapp/src/app/spartacus/features/cpq-quote/cpq-quote-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/cpq-quote/cpq-quote-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from '@spartacus/core'; import { cpqquoteTranslationChunksConfig, - cpqquoteTranslations, + cpqquoteTranslationsEn, + cpqquoteTranslationsJa, + cpqquoteTranslationsDe, + cpqquoteTranslationsZh, } from '@spartacus/cpq-quote/assets'; import { CpqQuoteRootModule } from '@spartacus/cpq-quote/root'; @@ -17,7 +20,12 @@ import { CpqQuoteRootModule } from '@spartacus/cpq-quote/root'; providers: [ provideConfig({ i18n: { - resources: cpqquoteTranslations, + resources: { + en: cpqquoteTranslationsEn, + ja: cpqquoteTranslationsJa, + de: cpqquoteTranslationsDe, + zh: cpqquoteTranslationsZh, + }, chunks: cpqquoteTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/customer-ticketing/customer-ticketing-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/customer-ticketing/customer-ticketing-feature.module.ts index ffbd2fe7ee9..c3ee356f73e 100644 --- a/projects/storefrontapp/src/app/spartacus/features/customer-ticketing/customer-ticketing-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/customer-ticketing/customer-ticketing-feature.module.ts @@ -7,7 +7,10 @@ import { NgModule } from '@angular/core'; import { customerTicketingTranslationChunksConfig, - customerTicketingTranslations, + customerTicketingTranslationsEn, + customerTicketingTranslationsJa, + customerTicketingTranslationsDe, + customerTicketingTranslationsZh, } from '@spartacus/customer-ticketing/assets'; import { CustomerTicketingRootModule, @@ -30,7 +33,12 @@ import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; }), provideConfig({ i18n: { - resources: customerTicketingTranslations, + resources: { + en: customerTicketingTranslationsEn, + ja: customerTicketingTranslationsJa, + de: customerTicketingTranslationsDe, + zh: customerTicketingTranslationsZh, + }, chunks: customerTicketingTranslationChunksConfig, }, }), diff --git a/projects/storefrontapp/src/app/spartacus/features/digital-payments/digital-payments-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/digital-payments/digital-payments-feature.module.ts index 064ae04bf57..0f5623dfac8 100644 --- a/projects/storefrontapp/src/app/spartacus/features/digital-payments/digital-payments-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/digital-payments/digital-payments-feature.module.ts @@ -8,14 +8,22 @@ import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from '@spartacus/core'; import { dpTranslationChunksConfig, - dpTranslations, + dpTranslationsEn, + dpTranslationsJa, + dpTranslationsDe, + dpTranslationsZh, } from '@spartacus/digital-payments/assets'; @NgModule({ providers: [ provideConfig({ i18n: { - resources: dpTranslations, + resources: { + en: dpTranslationsEn, + ja: dpTranslationsJa, + de: dpTranslationsDe, + zh: dpTranslationsZh, + }, chunks: dpTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/epd-visualization/epd-visualization-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/epd-visualization/epd-visualization-feature.module.ts index c42eab4d4ab..cfd3d0c24ef 100644 --- a/projects/storefrontapp/src/app/spartacus/features/epd-visualization/epd-visualization-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/epd-visualization/epd-visualization-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { epdVisualizationTranslationChunksConfig, - epdVisualizationTranslations, + epdVisualizationTranslationsEn, + epdVisualizationTranslationsJa, + epdVisualizationTranslationsDe, + epdVisualizationTranslationsZh, } from '@spartacus/epd-visualization/assets'; import { EpdVisualizationConfig, @@ -34,7 +37,12 @@ const epdVisualizationConfig: EpdVisualizationConfig = { providers: [ provideConfig({ i18n: { - resources: epdVisualizationTranslations, + resources: { + en: epdVisualizationTranslationsEn, + ja: epdVisualizationTranslationsJa, + de: epdVisualizationTranslationsDe, + zh: epdVisualizationTranslationsZh, + }, chunks: epdVisualizationTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/estimated-delivery-date/estimated-delivery-date-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/estimated-delivery-date/estimated-delivery-date-feature.module.ts index 1e8933ab46f..111e6f3f6c0 100644 --- a/projects/storefrontapp/src/app/spartacus/features/estimated-delivery-date/estimated-delivery-date-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/estimated-delivery-date/estimated-delivery-date-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from '@spartacus/core'; import { estimatedDeliveryDateTranslationChunksConfig, - estimatedDeliveryDateTranslations, + estimatedDeliveryDateTranslationsEn, + estimatedDeliveryDateTranslationsJa, + estimatedDeliveryDateTranslationsDe, + estimatedDeliveryDateTranslationsZh, } from '@spartacus/estimated-delivery-date/assets'; import { EstimatedDeliveryDateRootModule } from '@spartacus/estimated-delivery-date/root'; @@ -17,7 +20,12 @@ import { EstimatedDeliveryDateRootModule } from '@spartacus/estimated-delivery-d providers: [ provideConfig({ i18n: { - resources: estimatedDeliveryDateTranslations, + resources: { + en: estimatedDeliveryDateTranslationsEn, + ja: estimatedDeliveryDateTranslationsJa, + de: estimatedDeliveryDateTranslationsDe, + zh: estimatedDeliveryDateTranslationsZh, + }, chunks: estimatedDeliveryDateTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/opf/opf-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/opf/opf-feature.module.ts index d87089276d8..591adc3fccb 100644 --- a/projects/storefrontapp/src/app/spartacus/features/opf/opf-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/opf/opf-feature.module.ts @@ -13,7 +13,10 @@ import { } from '@spartacus/opf/base/root'; import { opfCheckoutTranslationChunksConfig, - opfCheckoutTranslations, + opfCheckoutTranslationsEn, + opfCheckoutTranslationsJa, + opfCheckoutTranslationsDe, + opfCheckoutTranslationsZh, } from '@spartacus/opf/checkout/assets'; import { OPF_CHECKOUT_FEATURE, @@ -23,7 +26,10 @@ import { } from '@spartacus/opf/checkout/root'; import { opfPaymentTranslationChunksConfig, - opfPaymentTranslations, + opfPaymentTranslationsEn, + opfPaymentTranslationsJa, + opfPaymentTranslationsDe, + opfPaymentTranslationsZh, } from '@spartacus/opf/payment/assets'; import { OPF_CTA_FEATURE, OpfCtaRootModule } from '@spartacus/opf/cta/root'; @@ -93,14 +99,24 @@ if (environment.b2b) { }), provideConfig({ i18n: { - resources: opfCheckoutTranslations, + resources: { + en: opfCheckoutTranslationsEn, + ja: opfCheckoutTranslationsJa, + de: opfCheckoutTranslationsDe, + zh: opfCheckoutTranslationsZh, + }, chunks: opfCheckoutTranslationChunksConfig, fallbackLang: 'en', }, }), provideConfig({ i18n: { - resources: opfPaymentTranslations, + resources: { + en: opfPaymentTranslationsEn, + ja: opfPaymentTranslationsJa, + de: opfPaymentTranslationsDe, + zh: opfPaymentTranslationsZh, + }, chunks: opfPaymentTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/order/order-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/order/order-feature.module.ts index a36cf578a6d..1544263b1f0 100644 --- a/projects/storefrontapp/src/app/spartacus/features/order/order-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/order/order-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { orderTranslationChunksConfig, - orderTranslations, + orderTranslationsEn, + orderTranslationsJa, + orderTranslationsDe, + orderTranslationsZh, } from '@spartacus/order/assets'; import { USE_MY_ACCOUNT_V2_ORDER, @@ -34,7 +37,12 @@ import { environment } from '../../../../environments/environment'; }, provideConfig({ i18n: { - resources: orderTranslations, + resources: { + en: orderTranslationsEn, + ja: orderTranslationsJa, + de: orderTranslationsDe, + zh: orderTranslationsZh, + }, chunks: orderTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/organization/organization-account-summary-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/organization/organization-account-summary-feature.module.ts index fe459c9c5af..da9cccd1641 100644 --- a/projects/storefrontapp/src/app/spartacus/features/organization/organization-account-summary-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/organization/organization-account-summary-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { accountSummaryTranslationChunksConfig, - accountSummaryTranslations, + accountSummaryTranslationsEn, + accountSummaryTranslationsJa, + accountSummaryTranslationsDe, + accountSummaryTranslationsZh, } from '@spartacus/organization/account-summary/assets'; import { AccountSummaryRootModule, @@ -30,7 +33,12 @@ import { }), provideConfig({ i18n: { - resources: accountSummaryTranslations, + resources: { + en: accountSummaryTranslationsEn, + ja: accountSummaryTranslationsJa, + de: accountSummaryTranslationsDe, + zh: accountSummaryTranslationsZh, + }, chunks: accountSummaryTranslationChunksConfig, }, }), diff --git a/projects/storefrontapp/src/app/spartacus/features/organization/organization-administration-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/organization/organization-administration-feature.module.ts index 633a63e4492..620d860c0b2 100644 --- a/projects/storefrontapp/src/app/spartacus/features/organization/organization-administration-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/organization/organization-administration-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { organizationTranslationChunksConfig, - organizationTranslations, + organizationTranslationsEn, + organizationTranslationsJa, + organizationTranslationsDe, + organizationTranslationsZh, } from '@spartacus/organization/administration/assets'; import { AdministrationRootModule, @@ -31,7 +34,12 @@ import { }), provideConfig({ i18n: { - resources: organizationTranslations, + resources: { + en: organizationTranslationsEn, + ja: organizationTranslationsJa, + de: organizationTranslationsDe, + zh: organizationTranslationsZh, + }, chunks: organizationTranslationChunksConfig, }, }), diff --git a/projects/storefrontapp/src/app/spartacus/features/organization/organization-order-approval-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/organization/organization-order-approval-feature.module.ts index 5214272135a..78e4e72f645 100644 --- a/projects/storefrontapp/src/app/spartacus/features/organization/organization-order-approval-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/organization/organization-order-approval-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { orderApprovalTranslationChunksConfig, - orderApprovalTranslations, + orderApprovalTranslationsEn, + orderApprovalTranslationsJa, + orderApprovalTranslationsDe, + orderApprovalTranslationsZh, } from '@spartacus/organization/order-approval/assets'; import { OrderApprovalRootModule, @@ -30,7 +33,12 @@ import { }), provideConfig({ i18n: { - resources: orderApprovalTranslations, + resources: { + en: orderApprovalTranslationsEn, + ja: orderApprovalTranslationsJa, + de: orderApprovalTranslationsDe, + zh: orderApprovalTranslationsZh, + }, chunks: orderApprovalTranslationChunksConfig, }, }), diff --git a/projects/storefrontapp/src/app/spartacus/features/organization/organization-unit-order-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/organization/organization-unit-order-feature.module.ts index c5de80bd5c2..45fce25db27 100644 --- a/projects/storefrontapp/src/app/spartacus/features/organization/organization-unit-order-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/organization/organization-unit-order-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { unitOrderTranslationChunksConfig, - unitOrderTranslations, + unitOrderTranslationsEn, + unitOrderTranslationsJa, + unitOrderTranslationsDe, + unitOrderTranslationsZh, } from '@spartacus/organization/unit-order/assets'; import { UnitOrderRootModule, @@ -30,7 +33,12 @@ import { }), provideConfig({ i18n: { - resources: unitOrderTranslations, + resources: { + en: unitOrderTranslationsEn, + ja: unitOrderTranslationsJa, + de: unitOrderTranslationsDe, + zh: unitOrderTranslationsZh, + }, chunks: unitOrderTranslationChunksConfig, }, }), diff --git a/projects/storefrontapp/src/app/spartacus/features/pdf-invoices/pdf-invoices-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/pdf-invoices/pdf-invoices-feature.module.ts index 7693189abed..778a9b04499 100644 --- a/projects/storefrontapp/src/app/spartacus/features/pdf-invoices/pdf-invoices-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/pdf-invoices/pdf-invoices-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { pdfInvoicesTranslationChunksConfig, - pdfInvoicesTranslations, + pdfInvoicesTranslationsEn, + pdfInvoicesTranslationsJa, + pdfInvoicesTranslationsDe, + pdfInvoicesTranslationsZh, } from '@spartacus/pdf-invoices/assets'; import { PDFInvoicesRootModule, @@ -28,7 +31,12 @@ import { }), provideConfig({ i18n: { - resources: pdfInvoicesTranslations, + resources: { + en: pdfInvoicesTranslationsEn, + ja: pdfInvoicesTranslationsJa, + de: pdfInvoicesTranslationsDe, + zh: pdfInvoicesTranslationsZh, + }, chunks: pdfInvoicesTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/pickup-in-store/pickup-in-store-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/pickup-in-store/pickup-in-store-feature.module.ts index 8132632673a..b3d3c0ddf37 100644 --- a/projects/storefrontapp/src/app/spartacus/features/pickup-in-store/pickup-in-store-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/pickup-in-store/pickup-in-store-feature.module.ts @@ -13,7 +13,10 @@ import { import { pickupInStoreTranslationChunksConfig, - pickupInStoreTranslations, + pickupInStoreTranslationsEn, + pickupInStoreTranslationsJa, + pickupInStoreTranslationsDe, + pickupInStoreTranslationsZh, } from '@spartacus/pickup-in-store/assets'; @NgModule({ @@ -31,7 +34,12 @@ import { }), provideConfig({ i18n: { - resources: pickupInStoreTranslations, + resources: { + en: pickupInStoreTranslationsEn, + ja: pickupInStoreTranslationsJa, + de: pickupInStoreTranslationsDe, + zh: pickupInStoreTranslationsZh, + }, chunks: pickupInStoreTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/product-configurator/product-configurator-rulebased-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/product-configurator/product-configurator-rulebased-feature.module.ts index f6276c1e96b..29eefd67403 100644 --- a/projects/storefrontapp/src/app/spartacus/features/product-configurator/product-configurator-rulebased-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/product-configurator/product-configurator-rulebased-feature.module.ts @@ -6,13 +6,18 @@ import { NgModule, Type } from '@angular/core'; import { provideConfig } from '@spartacus/core'; -import { configuratorTranslations } from '@spartacus/product-configurator/common/assets'; import { CpqConfiguratorRootModule, PRODUCT_CONFIGURATOR_RULEBASED_FEATURE, RulebasedConfiguratorRootModule, } from '@spartacus/product-configurator/rulebased/root'; import { environment } from '../../../../environments/environment'; +import { + configuratorTranslationsDe, + configuratorTranslationsEn, + configuratorTranslationsJa, + configuratorTranslationsZh, +} from '@spartacus/product-configurator/common/assets'; const extensions: Type[] = []; @@ -35,7 +40,12 @@ if (environment.cpq) { }), provideConfig({ i18n: { - resources: configuratorTranslations, + resources: { + en: configuratorTranslationsEn, + ja: configuratorTranslationsJa, + de: configuratorTranslationsDe, + zh: configuratorTranslationsZh, + }, }, }), ], diff --git a/projects/storefrontapp/src/app/spartacus/features/product-configurator/product-configurator-textfield-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/product-configurator/product-configurator-textfield-feature.module.ts index 84650af44de..f6a01aabcc5 100644 --- a/projects/storefrontapp/src/app/spartacus/features/product-configurator/product-configurator-textfield-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/product-configurator/product-configurator-textfield-feature.module.ts @@ -6,7 +6,12 @@ import { NgModule } from '@angular/core'; import { provideConfig } from '@spartacus/core'; -import { configuratorTranslations } from '@spartacus/product-configurator/common/assets'; +import { + configuratorTranslationsDe, + configuratorTranslationsEn, + configuratorTranslationsJa, + configuratorTranslationsZh, +} from '@spartacus/product-configurator/common/assets'; import {} from '@spartacus/product-configurator/rulebased/root'; import { PRODUCT_CONFIGURATOR_TEXTFIELD_FEATURE, @@ -28,7 +33,12 @@ import { }), provideConfig({ i18n: { - resources: configuratorTranslations, + resources: { + en: configuratorTranslationsEn, + ja: configuratorTranslationsJa, + de: configuratorTranslationsDe, + zh: configuratorTranslationsZh, + }, }, }), ], diff --git a/projects/storefrontapp/src/app/spartacus/features/product-multi-dimensional/product-multi-dimensional-selector-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/product-multi-dimensional/product-multi-dimensional-selector-feature.module.ts index bc99a7df713..72a05019c9e 100644 --- a/projects/storefrontapp/src/app/spartacus/features/product-multi-dimensional/product-multi-dimensional-selector-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/product-multi-dimensional/product-multi-dimensional-selector-feature.module.ts @@ -12,7 +12,10 @@ import { } from '@spartacus/product-multi-dimensional/selector/root'; import { multiDimensionalSelectorTranslationChunksConfig, - multiDimensionalSelectorTranslations, + multiDimensionalSelectorTranslationsEn, + multiDimensionalSelectorTranslationsJa, + multiDimensionalSelectorTranslationsDe, + multiDimensionalSelectorTranslationsZh, } from '@spartacus/product-multi-dimensional/selector/assets'; @NgModule({ @@ -28,7 +31,12 @@ import { }, }, i18n: { - resources: multiDimensionalSelectorTranslations, + resources: { + en: multiDimensionalSelectorTranslationsEn, + ja: multiDimensionalSelectorTranslationsJa, + de: multiDimensionalSelectorTranslationsDe, + zh: multiDimensionalSelectorTranslationsZh, + }, chunks: multiDimensionalSelectorTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/product/product-bulk-pricing-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/product/product-bulk-pricing-feature.module.ts index a45790d5fde..64f6fdf5f15 100644 --- a/projects/storefrontapp/src/app/spartacus/features/product/product-bulk-pricing-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/product/product-bulk-pricing-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { bulkPricingTranslationChunksConfig, - bulkPricingTranslations, + bulkPricingTranslationsEn, + bulkPricingTranslationsJa, + bulkPricingTranslationsDe, + bulkPricingTranslationsZh, } from '@spartacus/product/bulk-pricing/assets'; import { BulkPricingRootModule, @@ -30,7 +33,12 @@ import { }), provideConfig({ i18n: { - resources: bulkPricingTranslations, + resources: { + en: bulkPricingTranslationsEn, + ja: bulkPricingTranslationsJa, + de: bulkPricingTranslationsDe, + zh: bulkPricingTranslationsZh, + }, chunks: bulkPricingTranslationChunksConfig, }, }), diff --git a/projects/storefrontapp/src/app/spartacus/features/product/product-future-stock-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/product/product-future-stock-feature.module.ts index e953cc3e809..509b5a4c3d2 100644 --- a/projects/storefrontapp/src/app/spartacus/features/product/product-future-stock-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/product/product-future-stock-feature.module.ts @@ -7,7 +7,10 @@ import { NgModule } from '@angular/core'; import { futureStockTranslationChunksConfig, - futureStockTranslations, + futureStockTranslationsEn, + futureStockTranslationsJa, + futureStockTranslationsDe, + futureStockTranslationsZh, } from '@spartacus/product/future-stock/assets'; import { FutureStockRootModule } from '@spartacus/product/future-stock/root'; import { provideConfig } from '@spartacus/core'; @@ -26,7 +29,12 @@ import { PRODUCT_FUTURE_STOCK_FEATURE } from '@spartacus/product/future-stock/ro }, }, i18n: { - resources: futureStockTranslations, + resources: { + en: futureStockTranslationsEn, + ja: futureStockTranslationsJa, + de: futureStockTranslationsDe, + zh: futureStockTranslationsZh, + }, chunks: futureStockTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/product/product-image-zoom-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/product/product-image-zoom-feature.module.ts index ebdbb9cc62e..80396f6209d 100644 --- a/projects/storefrontapp/src/app/spartacus/features/product/product-image-zoom-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/product/product-image-zoom-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { productImageZoomTranslationChunksConfig, - productImageZoomTranslations, + productImageZoomTranslationsEn, + productImageZoomTranslationsJa, + productImageZoomTranslationsDe, + productImageZoomTranslationsZh, } from '@spartacus/product/image-zoom/assets'; import { ProductImageZoomRootModule, @@ -30,7 +33,12 @@ import { }), provideConfig({ i18n: { - resources: productImageZoomTranslations, + resources: { + en: productImageZoomTranslationsEn, + ja: productImageZoomTranslationsJa, + de: productImageZoomTranslationsDe, + zh: productImageZoomTranslationsZh, + }, chunks: productImageZoomTranslationChunksConfig, }, }), diff --git a/projects/storefrontapp/src/app/spartacus/features/product/product-variants-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/product/product-variants-feature.module.ts index 0c7155253bb..845590cd151 100644 --- a/projects/storefrontapp/src/app/spartacus/features/product/product-variants-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/product/product-variants-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { productVariantsTranslationChunksConfig, - productVariantsTranslations, + productVariantsTranslationsEn, + productVariantsTranslationsJa, + productVariantsTranslationsDe, + productVariantsTranslationsZh, } from '@spartacus/product/variants/assets'; import { ProductVariantsRootModule, @@ -30,7 +33,12 @@ import { }), provideConfig({ i18n: { - resources: productVariantsTranslations, + resources: { + en: productVariantsTranslationsEn, + ja: productVariantsTranslationsJa, + de: productVariantsTranslationsDe, + zh: productVariantsTranslationsZh, + }, chunks: productVariantsTranslationChunksConfig, }, }), diff --git a/projects/storefrontapp/src/app/spartacus/features/quote-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/quote-feature.module.ts index 04626a7be52..8e20ea353d0 100644 --- a/projects/storefrontapp/src/app/spartacus/features/quote-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/quote-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from '@spartacus/core'; import { quoteTranslationChunksConfig, - quoteTranslations, + quoteTranslationsEn, + quoteTranslationsJa, + quoteTranslationsDe, + quoteTranslationsZh, } from '@spartacus/quote/assets'; import { QUOTE_CART_GUARD_FEATURE, @@ -29,7 +32,12 @@ import { }), provideConfig({ i18n: { - resources: quoteTranslations, + resources: { + en: quoteTranslationsEn, + ja: quoteTranslationsJa, + de: quoteTranslationsDe, + zh: quoteTranslationsZh, + }, chunks: quoteTranslationChunksConfig, }, }), diff --git a/projects/storefrontapp/src/app/spartacus/features/registration-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/registration-feature.module.ts index 978f20617dd..23e6c200fba 100644 --- a/projects/storefrontapp/src/app/spartacus/features/registration-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/registration-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { organizationUserRegistrationTranslationChunksConfig, - organizationUserRegistrationTranslations, + organizationUserRegistrationTranslationsEn, + organizationUserRegistrationTranslationsJa, + organizationUserRegistrationTranslationsDe, + organizationUserRegistrationTranslationsZh, } from '@spartacus/organization/user-registration/assets'; import { OrganizationUserRegistrationRootModule, @@ -30,7 +33,12 @@ import { }), provideConfig({ i18n: { - resources: organizationUserRegistrationTranslations, + resources: { + en: organizationUserRegistrationTranslationsEn, + ja: organizationUserRegistrationTranslationsJa, + de: organizationUserRegistrationTranslationsDe, + zh: organizationUserRegistrationTranslationsZh, + }, chunks: organizationUserRegistrationTranslationChunksConfig, }, }), diff --git a/projects/storefrontapp/src/app/spartacus/features/requested-delivery-date/requested-delivery-date-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/requested-delivery-date/requested-delivery-date-feature.module.ts index a886795c728..bacc4e8841c 100644 --- a/projects/storefrontapp/src/app/spartacus/features/requested-delivery-date/requested-delivery-date-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/requested-delivery-date/requested-delivery-date-feature.module.ts @@ -9,7 +9,10 @@ import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { requestedDeliveryDateTranslationChunksConfig, - requestedDeliveryDateTranslations, + requestedDeliveryDateTranslationsEn, + requestedDeliveryDateTranslationsJa, + requestedDeliveryDateTranslationsDe, + requestedDeliveryDateTranslationsZh, } from '@spartacus/requested-delivery-date/assets'; import { RequestedDeliveryDateRootModule, @@ -31,7 +34,12 @@ import { }), provideConfig({ i18n: { - resources: requestedDeliveryDateTranslations, + resources: { + en: requestedDeliveryDateTranslationsEn, + ja: requestedDeliveryDateTranslationsJa, + de: requestedDeliveryDateTranslationsDe, + zh: requestedDeliveryDateTranslationsZh, + }, chunks: requestedDeliveryDateTranslationChunksConfig, }, }), diff --git a/projects/storefrontapp/src/app/spartacus/features/s4-service/s4-service-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/s4-service/s4-service-feature.module.ts index 84d59c3abf1..50cca255d79 100644 --- a/projects/storefrontapp/src/app/spartacus/features/s4-service/s4-service-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/s4-service/s4-service-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { s4ServiceTranslationChunksConfig, - s4ServiceTranslations, + s4ServiceTranslationsEn, + s4ServiceTranslationsJa, + s4ServiceTranslationsDe, + s4ServiceTranslationsZh, } from '@spartacus/s4-service/assets'; import { S4ServiceRootModule, @@ -28,7 +31,12 @@ import { }), provideConfig({ i18n: { - resources: s4ServiceTranslations, + resources: { + en: s4ServiceTranslationsEn, + ja: s4ServiceTranslationsJa, + de: s4ServiceTranslationsDe, + zh: s4ServiceTranslationsZh, + }, chunks: s4ServiceTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/s4om/s4om-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/s4om/s4om-feature.module.ts index a825c165921..19431212b24 100644 --- a/projects/storefrontapp/src/app/spartacus/features/s4om/s4om-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/s4om/s4om-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { I18nConfig, provideConfig } from '@spartacus/core'; import { s4omTranslationChunksConfig, - s4omTranslations, + s4omTranslationsEn, + s4omTranslationsJa, + s4omTranslationsDe, + s4omTranslationsZh, } from '@spartacus/s4om/assets'; import { S4omRootModule } from '@spartacus/s4om/root'; @@ -17,7 +20,12 @@ import { S4omRootModule } from '@spartacus/s4om/root'; providers: [ provideConfig({ i18n: { - resources: s4omTranslations, + resources: { + en: s4omTranslationsEn, + ja: s4omTranslationsJa, + de: s4omTranslationsDe, + zh: s4omTranslationsZh, + }, chunks: s4omTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/projects/storefrontapp/src/app/spartacus/features/storefinder/storefinder-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/storefinder/storefinder-feature.module.ts index fa338976931..d9d4f62a2e8 100644 --- a/projects/storefrontapp/src/app/spartacus/features/storefinder/storefinder-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/storefinder/storefinder-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { storeFinderTranslationChunksConfig, - storeFinderTranslations, + storeFinderTranslationsEn, + storeFinderTranslationsJa, + storeFinderTranslationsDe, + storeFinderTranslationsZh, } from '@spartacus/storefinder/assets'; import { StoreFinderRootModule, @@ -28,7 +31,12 @@ import { }), provideConfig({ i18n: { - resources: storeFinderTranslations, + resources: { + en: storeFinderTranslationsEn, + ja: storeFinderTranslationsJa, + de: storeFinderTranslationsDe, + zh: storeFinderTranslationsZh, + }, chunks: storeFinderTranslationChunksConfig, }, }), diff --git a/projects/storefrontapp/src/app/spartacus/features/user/user-feature.module.ts b/projects/storefrontapp/src/app/spartacus/features/user/user-feature.module.ts index 0129d606349..ff4a0ef5e2a 100644 --- a/projects/storefrontapp/src/app/spartacus/features/user/user-feature.module.ts +++ b/projects/storefrontapp/src/app/spartacus/features/user/user-feature.module.ts @@ -8,7 +8,10 @@ import { NgModule } from '@angular/core'; import { CmsConfig, I18nConfig, provideConfig } from '@spartacus/core'; import { userAccountTranslationChunksConfig, - userAccountTranslations, + userAccountTranslationsEn, + userAccountTranslationsJa, + userAccountTranslationsDe, + userAccountTranslationsZh, } from '@spartacus/user/account/assets'; import { UserAccountRootModule, @@ -16,7 +19,10 @@ import { } from '@spartacus/user/account/root'; import { userProfileTranslationChunksConfig, - userProfileTranslations, + userProfileTranslationsEn, + userProfileTranslationsJa, + userProfileTranslationsDe, + userProfileTranslationsZh, } from '@spartacus/user/profile/assets'; import { USE_MY_ACCOUNT_V2_EMAIL, @@ -44,7 +50,12 @@ import { environment } from '../../../../environments/environment'; }), provideConfig({ i18n: { - resources: userAccountTranslations, + resources: { + en: userAccountTranslationsEn, + ja: userAccountTranslationsJa, + de: userAccountTranslationsDe, + zh: userAccountTranslationsZh, + }, chunks: userAccountTranslationChunksConfig, fallbackLang: 'en', }, @@ -73,7 +84,12 @@ import { environment } from '../../../../environments/environment'; }, provideConfig({ i18n: { - resources: userProfileTranslations, + resources: { + en: userProfileTranslationsEn, + ja: userProfileTranslationsJa, + de: userProfileTranslationsDe, + zh: userProfileTranslationsZh, + }, chunks: userProfileTranslationChunksConfig, fallbackLang: 'en', }, diff --git a/tools/breaking-changes/extract.ts b/tools/breaking-changes/extract.ts index 1f396f31abe..8be373a8f32 100644 --- a/tools/breaking-changes/extract.ts +++ b/tools/breaking-changes/extract.ts @@ -55,7 +55,7 @@ function runExtractor(libPath: string) { } else { console.error( `API Extractor completed with ${extractorResult.errorCount} errors` + - ` and ${extractorResult.warningCount} warnings` + ` and ${extractorResult.warningCount} warnings` ); process.exitCode = 1; } diff --git a/tools/breaking-changes/parse.ts b/tools/breaking-changes/parse.ts index d85804bb4ca..890729b08e3 100644 --- a/tools/breaking-changes/parse.ts +++ b/tools/breaking-changes/parse.ts @@ -136,7 +136,9 @@ function parseElement( function parseMembers(rawElement: any) { const parsedMembers: any[] = []; rawElement.members.forEach((rawMember: any) => { - if (rawMember?.name?.startsWith('ɵ')) {return;} + if (rawMember?.name?.startsWith('ɵ')) { + return; + } const parsedMember: any = {}; parsedMember.kind = rawMember.kind; parsedMember.name = rawMember.name; diff --git a/tools/build-lib/augmented-types/index.ts b/tools/build-lib/augmented-types/index.ts index d634d45f246..da49fc3ff23 100644 --- a/tools/build-lib/augmented-types/index.ts +++ b/tools/build-lib/augmented-types/index.ts @@ -99,7 +99,9 @@ async function propagateAugmentableTypes( for (const packageJsonFile of files) { try { // get typings file from package.json - const packageData = JSON.parse(await fs.readFile(packageJsonFile, 'utf8')); + const packageData = JSON.parse( + await fs.readFile(packageJsonFile, 'utf8') + ); const typingsFile = packageData.typings; if (!typingsFile) { diff --git a/tools/chalk/index.ts b/tools/chalk/index.ts index 6e839367920..c45280f2d67 100644 --- a/tools/chalk/index.ts +++ b/tools/chalk/index.ts @@ -10,7 +10,7 @@ enum TextStyle { Blue = '\x1b[34m', Gray = '\x1b[90m', Green = '\x1b[32m', - Bold = '\x1b[1m' + Bold = '\x1b[1m', } export const Reset = '\x1b[0m'; @@ -50,10 +50,10 @@ function paint(text: string | undefined, color: string): string { * - `chalk.bold(text)`: Applies bold style to the text. */ export const chalk = { - red: (text?: string) => paint(text, TextStyle.Red,), + red: (text?: string) => paint(text, TextStyle.Red), yellow: (text?: string) => paint(text, TextStyle.Yellow), blue: (text?: string) => paint(text, TextStyle.Blue), gray: (text?: string) => paint(text, TextStyle.Gray), green: (text?: string) => paint(text, TextStyle.Green), - bold: (text?: string) => paint(text, TextStyle.Bold) + bold: (text?: string) => paint(text, TextStyle.Bold), }; diff --git a/tools/config/index.ts b/tools/config/index.ts index 0d3f6d4c567..ef0bd4a8810 100644 --- a/tools/config/index.ts +++ b/tools/config/index.ts @@ -19,7 +19,7 @@ import glob from 'glob'; import { NG_PACKAGE_JSON, PACKAGE_JSON } from './const'; import { manageDependencies } from './manage-dependencies'; import { manageTsConfigs } from './tsconfig-paths'; -import {chalk} from "../chalk"; +import { chalk } from '../chalk'; // ------------ Utilities ------------ diff --git a/tools/config/tsconfig-paths.ts b/tools/config/tsconfig-paths.ts index 16e0223b0fa..c96b76f9617 100644 --- a/tools/config/tsconfig-paths.ts +++ b/tools/config/tsconfig-paths.ts @@ -34,7 +34,7 @@ import { reportProgress, success, } from './index'; -import {chalk} from "../chalk"; +import { chalk } from '../chalk'; function readTsConfigFile(path: string): any { return parse(fs.readFileSync(path, 'utf-8')); @@ -353,14 +353,17 @@ function handleAppConfigs( // Add paths to `projects/storefrontapp/tsconfig.app.prod.json` config. const appEntryPoints = Object.values(libraries) .filter((lib) => lib.name !== SPARTACUS_SCHEMATICS) - .reduce((acc, curr) => { - curr.entryPoints.forEach((entryPoint) => { - acc[entryPoint.entryPoint] = [ - joinPaths('dist', curr.distDir, entryPoint.directory), - ]; - }); - return acc; - }, {} as { [key: string]: [string] }); + .reduce( + (acc, curr) => { + curr.entryPoints.forEach((entryPoint) => { + acc[entryPoint.entryPoint] = [ + joinPaths('dist', curr.distDir, entryPoint.directory), + ]; + }); + return acc; + }, + {} as { [key: string]: [string] } + ); const hadErrorsApp = handleConfigUpdate( appEntryPoints, @@ -371,20 +374,23 @@ function handleAppConfigs( // Add paths to `projects/storefrontapp/tsconfig.server.json` config. const serverEntryPoints = Object.values(libraries) .filter((lib) => lib.name !== SPARTACUS_SCHEMATICS) - .reduce((acc, curr) => { - curr.entryPoints.forEach((entryPoint) => { - // For server configuration we need relative paths that's why we append `../..` - acc[entryPoint.entryPoint] = [ - joinPaths( - '../..', - curr.directory, - entryPoint.directory, - entryPoint.entryFile - ), - ]; - }); - return acc; - }, {} as { [key: string]: [string] }); + .reduce( + (acc, curr) => { + curr.entryPoints.forEach((entryPoint) => { + // For server configuration we need relative paths that's why we append `../..` + acc[entryPoint.entryPoint] = [ + joinPaths( + '../..', + curr.directory, + entryPoint.directory, + entryPoint.entryFile + ), + ]; + }); + return acc; + }, + {} as { [key: string]: [string] } + ); const hadErrorsServer = handleConfigUpdate( serverEntryPoints, 'projects/storefrontapp/tsconfig.server.json', @@ -394,15 +400,18 @@ function handleAppConfigs( // Add paths to `projects/storefrontapp/tsconfig.server.prod.json` config. const serverProdEntryPoints = Object.values(libraries) .filter((lib) => lib.name !== SPARTACUS_SCHEMATICS) - .reduce((acc, curr) => { - curr.entryPoints.forEach((entryPoint) => { - // For server configuration we need relative paths that's why we append `../..` - acc[entryPoint.entryPoint] = [ - joinPaths('../..', 'dist', curr.distDir, entryPoint.directory), - ]; - }); - return acc; - }, {} as { [key: string]: [string] }); + .reduce( + (acc, curr) => { + curr.entryPoints.forEach((entryPoint) => { + // For server configuration we need relative paths that's why we append `../..` + acc[entryPoint.entryPoint] = [ + joinPaths('../..', 'dist', curr.distDir, entryPoint.directory), + ]; + }); + return acc; + }, + {} as { [key: string]: [string] } + ); const hadErrorsServerProd = handleConfigUpdate( serverProdEntryPoints,