openclassrooms / onesky-bundle
One Sky Bundle
Installs: 110 725
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 26
Forks: 12
Open Issues: 8
Type:symfony-bundle
Requires
- onesky/api-library-php5: 1.*
- symfony/config: >=2.7 <4
- symfony/console: >=2.7 <4
- symfony/dependency-injection: >=2.7 <4
- symfony/finder: >=2.7 <4
- symfony/framework-bundle: >=2.7 <4
- symfony/http-kernel: >=2.7 <4
Requires (Dev)
- fabpot/php-cs-fixer: 1.*
- phpunit/phpunit: ~5.0
- satooshi/php-coveralls: 1.*
This package is auto-updated.
Last update: 2025-01-07 00:04:05 UTC
README
The OneSkyBundle offers integration of OneSky Client for common tasks like pulling and pushing translations.
OneSky is a plateform that provides translations management.
Installation
This bundle can be installed using composer:
composer require openclassrooms/onesky-bundle
or by adding the package to the composer.json file directly:
{ "require": { "openclassrooms/onesky-bundle": "*" } }
After the package has been installed, add the bundle to the AppKernel.php file:
// in AppKernel::registerBundles() $bundles = array( // ... new OpenClassrooms\Bundle\OneSkyBundle\OpenClassroomsOneSkyBundle(), // ... );
Configuration
# app/config/config.yml openclassrooms_onesky: api_key: %onesky.api_key% api_secret: %onesky.api_secret% project_id: %onesky.project_id% source_locale: %source_locale% #optional, default en locales: - fr - es file_format: %onesky.file_format% #optional, default xliff file_paths: - %path.to.translations.files.directory% keep_all_strings: false # default true
Usage
Pull
Pull the translations from the OneSky API using the default configuration.
php app/console openclassrooms:one-sky:pull
Options
filePath
filePath source can be set as an option.
php app/console openclassrooms:one-sky:pull --filePath=/path/to/source/files php app/console openclassrooms:one-sky:pull --filePath=/path/to/source/files --filePath=/path/to/another/source/file
locale
Locale can be set as an option.
php app/console openclassrooms:one-sky:pull --locale=fr php app/console openclassrooms:one-sky:pull --locale=fr --locale=es
Push
Push the translations from the OneSky API using the default configuration.
php app/console openclassrooms:one-sky:push
Options
filePath
filePath source can be set as an option.
php app/console openclassrooms:one-sky:push --filePath=/path/to/source/files php app/console openclassrooms:one-sky:push --filePath=/path/to/source/files --filePath=/path/to/another/source/file
locale
Locale can be set as an option.
php app/console openclassrooms:one-sky:push --locale=en php app/console openclassrooms:one-sky:push --locale=en --locale=fr
Update
Pull then push translations from the OneSky API using the default configuration.
php app/console openclassrooms:one-sky:update
Check translation progress
Check the translation progress from the OneSky API using the default configuration.
php app/console openclassrooms:one-sky:check-translation-progress
Options
locale
Locale can be set as an option.
php app/console openclassrooms:one-sky:check-translation-progress --locale=en php app/console openclassrooms:one-sky:check-translation-progress --locale=en --locale=fr