m2mtech / weblate-translation-provider
Symfony Weblate Translation Provider Bridge
Installs: 14 907
Dependents: 0
Suggesters: 0
Security: 0
Stars: 17
Watchers: 4
Forks: 10
Open Issues: 3
Type:symfony-translation-bridge
Requires
- php: >=7.2.5
- ext-json: *
- spatie/data-transfer-object: ^1.14|^2.8|^3.7
- symfony/config: ^5.3|^6.0
- symfony/dependency-injection: ^5.3|^6.0
- symfony/http-client: ^5.3|^6.0
- symfony/http-kernel: ^5.3|^6.0
- symfony/mime: ^5.3|^6.0
- symfony/translation: ^5.3|^6.0
Requires (Dev)
- fakerphp/faker: ^1.17
- phpstan/phpstan: ^1.3
- phpunit/phpunit: ^8.5.22|^9.5
- roave/security-advisories: dev-latest
- symfony/console: ^5.3|^6.0
- symfony/framework-bundle: ^5.3|^6.0
- symfony/phpunit-bridge: ^5.3|^6.0
- symplify/easy-coding-standard: ^11.1
This package is auto-updated.
Last update: 2024-10-26 17:40:30 UTC
README
This bundle provides a Weblate integration for Symfony Translation.
Installation
composer require m2mtech/weblate-translation-provider
If you are not using Flex enable the bundle:
// config/bundles.php return [ // ... M2MTech\WeblateTranslationProvider\WeblateTranslationProviderBundle::class => ['all' => true], ];
Enable the translation provider:
# config/packages/translation.yaml framework: translator: providers: weblate: dsn: '%env(WEBLATE_DSN)%' locales: ['en', 'de']
and set the DSN in your .env file:
# .env WEBLATE_DSN=weblate://PROJECT_NAME:API_TOKEN@WEBLATE_URL
If you are using a local weblate instance, you can disable the usage of https and/or the verification of the used certificate:
# config/packages/weblate.yaml weblate_translation_provider: https: false verify_peer: false
Usage
bin/console translation:push [options] weblate bin/console translation:pull [options] weblate
Testing
This package has been developed for php 7.4 with compatibility tested for php 7.2 to 8.2RC2.
composer test
For compatibility tests with Symfony 5.3 to 6.0 including a local weblate instance please use the symfony-weblate-tests package.
Changelog
Please see CHANGELOG for more information about recent changes.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.