Skip to content

Repository files navigation

OneSkyBundle

Build StatusSensioLabsInsightCoverage Status

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(
// ...newOpenClassrooms\Bundle\OneSkyBundle\OpenClassroomsOneSkyBundle(),
// ...
);

Configuration

# app/config/config.ymlopenclassrooms_onesky:
api_key: %onesky.api_key%api_secret: %onesky.api_secret%project_id: %onesky.project_id%source_locale: %source_locale% #optional, default enlocales:
- fr
- esfile_format: %onesky.file_format% #optional, default xlifffile_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

About

Symfony Bundle that provides utility commands for the OneSky Api

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages