Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 82179a6

Browse filesBrowse files
committed
Added Lokalise Provider
1 parent c151f76 commit 82179a6
Copy full SHA for 82179a6

File tree

14 files changed

+1175
-0
lines changed
Filter options

14 files changed

+1175
-0
lines changed

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@
171171
use Symfony\Component\String\Slugger\SluggerInterface;
172172
use Symfony\Component\Translation\Bridge\Crowdin\CrowdinProviderFactory;
173173
use Symfony\Component\Translation\Bridge\Loco\LocoProviderFactory;
174+
use Symfony\Component\Translation\Bridge\Lokalise\LokaliseProviderFactory;
174175
use Symfony\Component\Translation\Command\XliffLintCommand as BaseXliffLintCommand;
175176
use Symfony\Component\Translation\PseudoLocalizationTranslator;
176177
use Symfony\Component\Translation\Translator;
@@ -1344,6 +1345,7 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
13441345
$classToServices = [
13451346
CrowdinProviderFactory::class => 'translation.provider_factory.crowdin',
13461347
LocoProviderFactory::class => 'translation.provider_factory.loco',
1348+
LokaliseProviderFactory::class => 'translation.provider_factory.lokalise',
13471349
];
13481350

13491351
$parentPackages = ['symfony/framework-bundle', 'symfony/translation', 'symfony/http-client'];

‎src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_providers.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/translation_providers.php
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Symfony\Component\Translation\Bridge\Crowdin\CrowdinProviderFactory;
1515
use Symfony\Component\Translation\Bridge\Loco\LocoProviderFactory;
16+
use Symfony\Component\Translation\Bridge\Lokalise\LokaliseProviderFactory;
1617
use Symfony\Component\Translation\Provider\NullProviderFactory;
1718
use Symfony\Component\Translation\Provider\TranslationProviderCollection;
1819
use Symfony\Component\Translation\Provider\TranslationProviderCollectionFactory;
@@ -52,5 +53,14 @@
5253
service('translation.loader.xliff'),
5354
])
5455
->tag('translation.provider_factory')
56+
57+
->set('translation.provider_factory.lokalise', LokaliseProviderFactory::class)
58+
->args([
59+
service('http_client'),
60+
service('logger'),
61+
param('kernel.default_locale'),
62+
service('translation.loader.xliff'),
63+
])
64+
->tag('translation.provider_factory')
5565
;
5666
};
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/Tests export-ignore
2+
/phpunit.xml.dist export-ignore
3+
/.gitattributes export-ignore
4+
/.gitignore export-ignore
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
vendor/
2+
composer.lock
3+
phpunit.xml
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CHANGELOG
2+
=========
3+
4+
5.3
5+
---
6+
7+
* Create the bridge
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2021 Fabien Potencier
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.