From 4a630d147b801c2be4336e5afc3fe47dac51bc8b Mon Sep 17 00:00:00 2001 From: tischsoic Date: Tue, 19 May 2026 15:39:59 +0200 Subject: [PATCH 1/6] Add IDS components JS translation support --- composer.json | 1 + package.json | 3 +- .../IbexaAdminUiAssetsExtension.php | 29 ++++++++++ .../translations/ibexa_ds_components.en.xliff | 58 +++++++++++++++++++ 4 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 src/bundle/DependencyInjection/IbexaAdminUiAssetsExtension.php create mode 100644 src/bundle/Resources/translations/ibexa_ds_components.en.xliff diff --git a/composer.json b/composer.json index 73ed5bf81..a4c75e2fc 100644 --- a/composer.json +++ b/composer.json @@ -7,6 +7,7 @@ }, "require": { "php": ">=8.3", + "symfony/dependency-injection": "^7.2", "symfony/http-kernel": "^7.2" }, "require-dev": { diff --git a/package.json b/package.json index efa647a89..b447e55b3 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_ds_components.en.xliff src/bundle/Resources/translations/ibexa_ds_components.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..70eeab3ed --- /dev/null +++ b/src/bundle/DependencyInjection/IbexaAdminUiAssetsExtension.php @@ -0,0 +1,29 @@ +prependExtensionConfig('bazinga_js_translation', [ + 'active_domains' => [ + 'ibexa_ds_components', + ], + ]); + } +} diff --git a/src/bundle/Resources/translations/ibexa_ds_components.en.xliff b/src/bundle/Resources/translations/ibexa_ds_components.en.xliff new file mode 100644 index 000000000..2456929f1 --- /dev/null +++ b/src/bundle/Resources/translations/ibexa_ds_components.en.xliff @@ -0,0 +1,58 @@ + + + + + Clear + Clear + + + Select an item + Select an item + + + Search... + Search... + + + On + On + + + Off + Off + + + Delete + Delete + + + Autosave is off, draft not created + Autosave is off, draft not created + + + Autosave is on, draft created + Autosave is on, draft created + + + Saving + Saving + + + Autosave is on, draft saved %time% + Autosave is on, draft saved %time% + + + Saving error + Saving error + + + Hide + Hide + + + Show + Show + + + + \ No newline at end of file From 84f27165e0fb8125849dc566629089f99685c455 Mon Sep 17 00:00:00 2001 From: tischsoic Date: Tue, 19 May 2026 15:44:39 +0200 Subject: [PATCH 2/6] Move IDS translation domain config to YAML --- composer.json | 4 +++- .../IbexaAdminUiAssetsExtension.php | 16 +++++++++++----- .../Resources/config/bazinga_js_translation.yaml | 2 ++ 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 src/bundle/Resources/config/bazinga_js_translation.yaml diff --git a/composer.json b/composer.json index a4c75e2fc..69f74a88f 100644 --- a/composer.json +++ b/composer.json @@ -7,8 +7,10 @@ }, "require": { "php": ">=8.3", + "symfony/config": "^7.2", "symfony/dependency-injection": "^7.2", - "symfony/http-kernel": "^7.2" + "symfony/http-kernel": "^7.2", + "symfony/yaml": "^7.2" }, "require-dev": { "ibexa/code-style": "~2.0.0" diff --git a/src/bundle/DependencyInjection/IbexaAdminUiAssetsExtension.php b/src/bundle/DependencyInjection/IbexaAdminUiAssetsExtension.php index 70eeab3ed..3b7088bbb 100644 --- a/src/bundle/DependencyInjection/IbexaAdminUiAssetsExtension.php +++ b/src/bundle/DependencyInjection/IbexaAdminUiAssetsExtension.php @@ -8,9 +8,11 @@ namespace Ibexa\Bundle\AdminUiAssets\DependencyInjection; +use Symfony\Component\Config\Resource\FileResource; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Extension\Extension; use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; +use Symfony\Component\Yaml\Yaml; final class IbexaAdminUiAssetsExtension extends Extension implements PrependExtensionInterface { @@ -20,10 +22,14 @@ public function load(array $configs, ContainerBuilder $container): void public function prepend(ContainerBuilder $container): void { - $container->prependExtensionConfig('bazinga_js_translation', [ - 'active_domains' => [ - 'ibexa_ds_components', - ], - ]); + $this->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..b078fe4b8 --- /dev/null +++ b/src/bundle/Resources/config/bazinga_js_translation.yaml @@ -0,0 +1,2 @@ +active_domains: + - 'ibexa_ds_components' From a70abd2b3e3533ce20a007b5db15f1d4a58c880f Mon Sep 17 00:00:00 2001 From: tischsoic Date: Tue, 19 May 2026 15:47:09 +0200 Subject: [PATCH 3/6] Remove generated IDS translation artifact --- .../translations/ibexa_ds_components.en.xliff | 58 ------------------- 1 file changed, 58 deletions(-) delete mode 100644 src/bundle/Resources/translations/ibexa_ds_components.en.xliff diff --git a/src/bundle/Resources/translations/ibexa_ds_components.en.xliff b/src/bundle/Resources/translations/ibexa_ds_components.en.xliff deleted file mode 100644 index 2456929f1..000000000 --- a/src/bundle/Resources/translations/ibexa_ds_components.en.xliff +++ /dev/null @@ -1,58 +0,0 @@ - - - - - Clear - Clear - - - Select an item - Select an item - - - Search... - Search... - - - On - On - - - Off - Off - - - Delete - Delete - - - Autosave is off, draft not created - Autosave is off, draft not created - - - Autosave is on, draft created - Autosave is on, draft created - - - Saving - Saving - - - Autosave is on, draft saved %time% - Autosave is on, draft saved %time% - - - Saving error - Saving error - - - Hide - Hide - - - Show - Show - - - - \ No newline at end of file From 3ab0d088a583ced1f4399dae7a0d10339f18f48b Mon Sep 17 00:00:00 2001 From: tischsoic Date: Wed, 20 May 2026 08:54:52 +0200 Subject: [PATCH 4/6] Document empty IDS extension load method --- src/bundle/DependencyInjection/IbexaAdminUiAssetsExtension.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bundle/DependencyInjection/IbexaAdminUiAssetsExtension.php b/src/bundle/DependencyInjection/IbexaAdminUiAssetsExtension.php index 3b7088bbb..60826f32f 100644 --- a/src/bundle/DependencyInjection/IbexaAdminUiAssetsExtension.php +++ b/src/bundle/DependencyInjection/IbexaAdminUiAssetsExtension.php @@ -18,6 +18,7 @@ final class IbexaAdminUiAssetsExtension extends Extension implements PrependExte { public function load(array $configs, ContainerBuilder $container): void { + // Intentionally left empty: this bundle only prepends Bazinga JS translation config. } public function prepend(ContainerBuilder $container): void From 15caa63bc704bbce264e55b83e8a93943d3a26e9 Mon Sep 17 00:00:00 2001 From: tischsoic Date: Wed, 20 May 2026 09:04:09 +0200 Subject: [PATCH 5/6] Rename IDS translation domain to ibexa_design_system --- package.json | 2 +- src/bundle/Resources/config/bazinga_js_translation.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b447e55b3..22af50350 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "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_ds_components.en.xliff src/bundle/Resources/translations/ibexa_ds_components.en.xliff", + "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-components-translations; yarn run move-ids-core" }, diff --git a/src/bundle/Resources/config/bazinga_js_translation.yaml b/src/bundle/Resources/config/bazinga_js_translation.yaml index b078fe4b8..92dfe0773 100644 --- a/src/bundle/Resources/config/bazinga_js_translation.yaml +++ b/src/bundle/Resources/config/bazinga_js_translation.yaml @@ -1,2 +1,2 @@ active_domains: - - 'ibexa_ds_components' + - 'ibexa_design_system' From 8021c6e58dbe180eeec1e61e2ecb4718c4c2b437 Mon Sep 17 00:00:00 2001 From: Jakub Brzegowski Date: Wed, 20 May 2026 09:42:40 +0200 Subject: [PATCH 6/6] Update composer.json Co-authored-by: Konrad Oboza --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 69f74a88f..66e8ebb77 100644 --- a/composer.json +++ b/composer.json @@ -7,10 +7,10 @@ }, "require": { "php": ">=8.3", - "symfony/config": "^7.2", - "symfony/dependency-injection": "^7.2", - "symfony/http-kernel": "^7.2", - "symfony/yaml": "^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"