diff --git a/composer.json b/composer.json index 73ed5bf81..66e8ebb77 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,10 @@ }, "require": { "php": ">=8.3", - "symfony/http-kernel": "^7.2" + "symfony/config": "^7.4", + "symfony/dependency-injection": "^7.4", + "symfony/http-kernel": "^7.4", + "symfony/yaml": "^7.4" }, "require-dev": { "ibexa/code-style": "~2.0.0" diff --git a/package.json b/package.json index efa647a89..22af50350 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,9 @@ "move-ckeditor5-core": "cp -r node_modules/ckeditor5 src/bundle/Resources/public/vendors/ckeditor5", "move-ids-assets": "mkdir src/bundle/Resources/public/vendors/ids-assets && cp -r node_modules/@ibexa/design-system/packages/assets/dist src/bundle/Resources/public/vendors/ids-assets/dist", "move-ids-components": "mkdir src/bundle/Resources/public/vendors/ids-components && cp -r node_modules/@ibexa/design-system/packages/components/dist src/bundle/Resources/public/vendors/ids-components/dist", + "move-ids-components-translations": "mkdir -p src/bundle/Resources/translations && cp node_modules/@ibexa/design-system/packages/components/assets/ibexa_design_system.en.xliff src/bundle/Resources/translations/ibexa_design_system.en.xliff", "move-ids-core": "mkdir src/bundle/Resources/public/vendors/ids-core && cp -r node_modules/@ibexa/design-system/packages/core/dist src/bundle/Resources/public/vendors/ids-core/dist", - "prepare-release": "yarn run create-folder; yarn run move-bootstrap; yarn run move-jquery; yarn run move-leaflet; yarn run move-react; yarn run move-react-dom; yarn run move-popperjs; yarn run move-flatpickr; yarn run move-create-react-class; yarn run move-prop-types; yarn run move-moment; yarn run move-moment-timezone; yarn run move-d3; yarn run move-dagre-d3; yarn run move-chart-js; yarn run move-js-md5; yarn run move-ckeditor5; yarn run move-ckeditor5-core; yarn run move-chartjs-plugin-datalabels; yarn run move-ids-assets; yarn run move-ids-components; yarn run move-ids-core" + "prepare-release": "yarn run create-folder; yarn run move-bootstrap; yarn run move-jquery; yarn run move-leaflet; yarn run move-react; yarn run move-react-dom; yarn run move-popperjs; yarn run move-flatpickr; yarn run move-create-react-class; yarn run move-prop-types; yarn run move-moment; yarn run move-moment-timezone; yarn run move-d3; yarn run move-dagre-d3; yarn run move-chart-js; yarn run move-js-md5; yarn run move-ckeditor5; yarn run move-ckeditor5-core; yarn run move-chartjs-plugin-datalabels; yarn run move-ids-assets; yarn run move-ids-components; yarn run move-ids-components-translations; yarn run move-ids-core" }, "repository": { "type": "git", diff --git a/src/bundle/DependencyInjection/IbexaAdminUiAssetsExtension.php b/src/bundle/DependencyInjection/IbexaAdminUiAssetsExtension.php new file mode 100644 index 000000000..60826f32f --- /dev/null +++ b/src/bundle/DependencyInjection/IbexaAdminUiAssetsExtension.php @@ -0,0 +1,36 @@ +prependBazingaJsTranslationConfiguration($container); + } + + private function prependBazingaJsTranslationConfiguration(ContainerBuilder $container): void + { + $configFile = __DIR__ . '/../Resources/config/bazinga_js_translation.yaml'; + $config = Yaml::parseFile($configFile); + $container->prependExtensionConfig('bazinga_js_translation', $config); + $container->addResource(new FileResource($configFile)); + } +} diff --git a/src/bundle/Resources/config/bazinga_js_translation.yaml b/src/bundle/Resources/config/bazinga_js_translation.yaml new file mode 100644 index 000000000..92dfe0773 --- /dev/null +++ b/src/bundle/Resources/config/bazinga_js_translation.yaml @@ -0,0 +1,2 @@ +active_domains: + - 'ibexa_design_system'