Skip to content

Commit

Permalink
PCA-43: 📝 Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
jmleroux committed Aug 26, 2023
1 parent 6b8f02e commit e48bf32
Showing 1 changed file with 25 additions and 15 deletions.
40 changes: 25 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ Crowdin is a translation and localization management platform : http://crowdin.n

FYI, an official and more complete Ruby Client exists here : https://github.com/crowdin/crowdin-api

[![Build Status](https://travis-ci.org/akeneo/php-crowdin-api.png)](https://travis-ci.org/akeneo/php-crowdin-api) [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/akeneo/php-crowdin-api/badges/quality-score.png?s=6f2062a3c333671eb8112a79d3c5f6118f0ad496)](https://scrutinizer-ci.com/g/akeneo/php-crowdin-api/)
[![Build Status](https://travis-ci.org/akeneo/php-crowdin-api.png)](https://travis-ci.org/akeneo/php-crowdin-api)
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/akeneo/php-crowdin-api/badges/quality-score.png?s=6f2062a3c333671eb8112a79d3c5f6118f0ad496)](https://scrutinizer-ci.com/g/akeneo/php-crowdin-api/)

Features
--------

PSR-2 conventions and coding standard

Wrap following API methods :

* Add a file, delete a file
* Add a directory, delete a directory, change a directory
* Update File, Upload translations, Upload fresh version of your localization file
Expand All @@ -29,28 +31,25 @@ Missing API methods https://github.com/akeneo/php-crowdin-api/issues?q=is%3Aopen
Requirements
------------

* PHP >= 5.5
* GuzzleHttp https://github.com/guzzle/guzzle

Optional, for dev purpose:

* PHP Spec https://github.com/phpspec/phpspec
* PHP-CS-Fixer https://github.com/FriendsOfPHP/PHP-CS-Fixer
* PHP >= 8.1
* Docker for a better dev experience

How to use ?
------------

Add the following lines in your project composer.json :

```yaml
{
"require": {
"akeneo/crowdin-api": "1.0.0-alpha3"
"akeneo/crowdin-api": "^2.0.0"
},
"minimum-stability": "alpha"
"minimum-stability": "stable"
}
```

Then, to instantiate the client and use available API methods :

```php
<?php
require 'vendor/autoload.php';
Expand All @@ -75,14 +74,24 @@ $api->addTranslation($localPath, $crowdinPath);
$result = $api->execute();
```

You can take a look at following use cases to see more real life samples.
### Run tests

```bash
docker-compose run --rm php vendor/bin/php-cs-fixer fix --config=.php_cs.php --diff
docker-compose run --rm php vendor/bin/phpstan analyze src --level 5
docker-compose run --rm php vendor/bin/phpspec run
```

Use cases
---------

The Akeneo core team uses this library in Nelson, a command based translation workflow between Crowdin and Github (cf https://github.com/akeneo/nelson).
You can take a look at following use cases to see more real life samples.

The Akeneo core team uses this library in Nelson, a command based translation workflow between Crowdin and GitHub
(cf https://github.com/akeneo/nelson).

The Sylius core team uses this library in SyliusBot to manage community translations https://github.com/SyliusBot/SyliusBot.
The Sylius core team uses this library in SyliusBot to manage community translations
https://github.com/SyliusBot/SyliusBot.

If you use this library don't hesitate to open a PR to explain your use case here :)

Expand All @@ -94,6 +103,7 @@ The MIT License (MIT)
Contribution
------------

Feel free to fork and propose PR to complete missing API methods https://github.com/akeneo/php-crowdin-api/issues?q=is%3Aopen+is%3Aissue+label%3Aapi-method
Feel free to fork and propose PR to complete missing API methods
https://github.com/akeneo/php-crowdin-api/issues?q=is%3Aopen+is%3Aissue+label%3Aapi-method

Any contributions are welcomed!
Any contributions are welcome!

0 comments on commit e48bf32

Please sign in to comment.