2017 © Pedro Peláez
 

symfony-bundle onesky-bundle

One Sky Bundle

image

openclassrooms/onesky-bundle

One Sky Bundle

  • Thursday, March 1, 2018
  • by romainkuzniak
  • Repository
  • 11 Watchers
  • 8 Stars
  • 58,454 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 6 Open issues
  • 2 Versions
  • 12 % Grown

The README.md

OneSkyBundle

Build Status SensioLabsInsight Coverage Status, (*1)

The OneSkyBundle offers integration of OneSky Client for common tasks like pulling and pushing translations.
OneSky is a plateform that provides translations management., (*2)

Installation

This bundle can be installed using composer:, (*3)

composer require openclassrooms/onesky-bundle, (*4)

or by adding the package to the composer.json file directly:, (*5)

{
    "require": {
        "openclassrooms/onesky-bundle": "*"
    }
}

After the package has been installed, add the bundle to the AppKernel.php file:, (*6)

// 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., (*7)

php app/console openclassrooms:one-sky:pull

Options

filePath

filePath source can be set as an option., (*8)

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., (*9)

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., (*10)

php app/console openclassrooms:one-sky:push

Options

filePath

filePath source can be set as an option., (*11)

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., (*12)

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., (*13)

php app/console openclassrooms:one-sky:update

Check translation progress

Check the translation progress from the OneSky API using the default configuration., (*14)

php app/console openclassrooms:one-sky:check-translation-progress

Options

locale

Locale can be set as an option., (*15)

php app/console openclassrooms:one-sky:check-translation-progress --locale=en
php app/console openclassrooms:one-sky:check-translation-progress --locale=en --locale=fr

The Versions