From e48bf3229cc8904886daa9b95c32533fb4f54c44 Mon Sep 17 00:00:00 2001 From: jmleroux Date: Fri, 25 Aug 2023 17:23:21 +0200 Subject: [PATCH] PCA-43: :memo: Update README --- README.md | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index f1e5b5c..685a4c6 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ 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 -------- @@ -15,6 +16,7 @@ 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 @@ -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 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 :) @@ -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!