From 8b83b9e98f87bc9a69518e793c309337dbf4f439 Mon Sep 17 00:00:00 2001 From: Victor Bocharsky Date: Thu, 14 Mar 2019 16:41:24 +0200 Subject: [PATCH 1/4] Add missing Bing translator --- DependencyInjection/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 65722010..8c77c808 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -187,7 +187,7 @@ private function addAutoTranslateNode(ArrayNodeDefinition $root) ->arrayNode('fallback_translation') ->canBeEnabled() ->children() - ->enumNode('service')->values(['google', 'yandex'])->defaultValue('google')->end() + ->enumNode('service')->values(['google', 'yandex', 'bing'])->defaultValue('google')->end() ->scalarNode('api_key')->defaultNull()->end() ->end() ->end() From f8b3739d5c7da2ecf6cf3829ea32ac61d4674c73 Mon Sep 17 00:00:00 2001 From: Victor Bocharsky Date: Thu, 14 Mar 2019 16:43:57 +0200 Subject: [PATCH 2/4] Register php_translation.translator_service.bing service --- Resources/config/auto_translation.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Resources/config/auto_translation.yml b/Resources/config/auto_translation.yml index 853b74ec..40a8799d 100644 --- a/Resources/config/auto_translation.yml +++ b/Resources/config/auto_translation.yml @@ -23,3 +23,7 @@ services: php_translation.translator_service.yandex: class: Translation\Translator\Service\YandexTranslator arguments: ["%php_translation.translator_service.api_key%"] + + php_translation.translator_service.bing: + class: Translation\Translator\Service\BingTranslator + arguments: ["%php_translation.translator_service.api_key%"] From 3746b43dfe026a71e8f2c5fd662239bceffd4949 Mon Sep 17 00:00:00 2001 From: bocharsky-bw Date: Mon, 24 Jun 2019 22:51:39 +0300 Subject: [PATCH 3/4] Fix code style as StyleCI requested --- Command/DeleteObsoleteCommand.php | 3 ++- Command/DownloadCommand.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Command/DeleteObsoleteCommand.php b/Command/DeleteObsoleteCommand.php index 4da26b80..43e67444 100644 --- a/Command/DeleteObsoleteCommand.php +++ b/Command/DeleteObsoleteCommand.php @@ -28,7 +28,8 @@ */ class DeleteObsoleteCommand extends Command { - use BundleTrait, StorageTrait; + use BundleTrait; + use StorageTrait; protected static $defaultName = 'translation:delete-obsolete'; diff --git a/Command/DownloadCommand.php b/Command/DownloadCommand.php index 6d853776..87fb03d4 100644 --- a/Command/DownloadCommand.php +++ b/Command/DownloadCommand.php @@ -27,7 +27,8 @@ */ class DownloadCommand extends Command { - use BundleTrait, StorageTrait; + use BundleTrait; + use StorageTrait; protected static $defaultName = 'translation:download'; From 6b291bfc4797e71f74d3c01cb73bbcf7efc7d4eb Mon Sep 17 00:00:00 2001 From: bocharsky-bw Date: Mon, 24 Jun 2019 22:53:36 +0300 Subject: [PATCH 4/4] Remove unused namespace --- Command/DownloadCommand.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Command/DownloadCommand.php b/Command/DownloadCommand.php index 87fb03d4..974536c3 100644 --- a/Command/DownloadCommand.php +++ b/Command/DownloadCommand.php @@ -20,7 +20,6 @@ use Translation\Bundle\Service\CacheClearer; use Translation\Bundle\Service\ConfigurationManager; use Translation\Bundle\Service\StorageManager; -use Translation\Bundle\Model\Configuration; /** * @author Tobias Nyholm