From eb35b5d08a40c3f32e9c31c27c24a967e51fc278 Mon Sep 17 00:00:00 2001 From: Julio Date: Wed, 4 Dec 2019 13:39:45 +0100 Subject: [PATCH] Add php-translation/symfony-bundle In order to translate from the symfony toolbar updating the po files. --- composer.json | 3 ++- config/bundles.php | 1 + config/packages/dev/php_translation.yaml | 5 +++++ config/packages/php_translation.yaml | 12 ++++++++++++ config/routes/dev/php_translation.yaml | 6 ++++++ config/routes/php_translation.yaml | 3 +++ 6 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 config/packages/dev/php_translation.yaml create mode 100644 config/packages/php_translation.yaml create mode 100644 config/routes/dev/php_translation.yaml create mode 100644 config/routes/php_translation.yaml diff --git a/composer.json b/composer.json index 1d0734c6f2..420dfacf71 100755 --- a/composer.json +++ b/composer.json @@ -168,7 +168,8 @@ "maennchen/zipstream-php": "^1.2", "league/glide-symfony": "^1.0", "cocur/slugify": "^3.2", - "knpuniversity/oauth2-client-bundle": "^1.31" + "knpuniversity/oauth2-client-bundle": "^1.31", + "php-translation/symfony-bundle": "^0.9.1" }, "config": { "component-dir": "public/assets" diff --git a/config/bundles.php b/config/bundles.php index 5842f4b432..8c3d0d8d55 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -78,4 +78,5 @@ return [ Vich\UploaderBundle\VichUploaderBundle::class => ['all' => true], Cocur\Slugify\Bridge\Symfony\CocurSlugifyBundle::class => ['all' => true], KnpU\OAuth2ClientBundle\KnpUOAuth2ClientBundle::class => ['all' => true], + Translation\Bundle\TranslationBundle::class => ['all' => true], ]; diff --git a/config/packages/dev/php_translation.yaml b/config/packages/dev/php_translation.yaml new file mode 100644 index 0000000000..53398fbca0 --- /dev/null +++ b/config/packages/dev/php_translation.yaml @@ -0,0 +1,5 @@ +translation: + symfony_profiler: + enabled: true + webui: + enabled: true diff --git a/config/packages/php_translation.yaml b/config/packages/php_translation.yaml new file mode 100644 index 0000000000..75cff7ceac --- /dev/null +++ b/config/packages/php_translation.yaml @@ -0,0 +1,12 @@ +translation: + locales: ["en"] + edit_in_place: + enabled: true + config_name: app + activator: php_translation.edit_in_place.activator + configs: + app: + dirs: ["%kernel.project_dir%/var/templates", "%kernel.project_dir%/src"] + output_dir: "%kernel.project_dir%/src/CoreBundle/Resources/translations" + excluded_names: ["*TestCase.php", "*Test.php"] + excluded_dirs: [cache, data, logs] diff --git a/config/routes/dev/php_translation.yaml b/config/routes/dev/php_translation.yaml new file mode 100644 index 0000000000..b363216b06 --- /dev/null +++ b/config/routes/dev/php_translation.yaml @@ -0,0 +1,6 @@ +_translation_webui: + resource: "@TranslationBundle/Resources/config/routing_webui.yml" + prefix: /admin + +_translation_profiler: + resource: '@TranslationBundle/Resources/config/routing_symfony_profiler.yml' diff --git a/config/routes/php_translation.yaml b/config/routes/php_translation.yaml new file mode 100644 index 0000000000..142c449623 --- /dev/null +++ b/config/routes/php_translation.yaml @@ -0,0 +1,3 @@ +_translation_edit_in_place: + resource: '@TranslationBundle/Resources/config/routing_edit_in_place.yml' + prefix: /admin