gentor / laravel-onesky
使用 artisan 命令来跟踪您的 onesky 翻译
v0.9.0
2018-10-04 07:28 UTC
Requires
- illuminate/console: ^5.2
- illuminate/support: ^5.2
- onesky/api-library-php5: ^1.0
- vlucas/phpdotenv: ^2.2
Requires (Dev)
- orchestra/testbench: ^3.1
- phpspec/phpspec: ^2.5
- phpunit/phpunit: ^5.3
This package is auto-updated.
Last update: 2024-09-14 00:27:10 UTC
README
描述
Laravel 和 Onesky API 之间的无缝集成。
通过使用 artisan 命令,您可以轻松推送新短语以供翻译,并拉取已翻译的短语以供生产使用。
安装
使用 composer 安装此包
composer require gentor/laravel-onesky
使用
将服务提供者添加到 app.php
文件
'providers' => [
...
Gentor\LaravelOneSky\ServiceProvider::class,
]
使用发布命令将包配置复制到本地配置
php artisan vendor:publish --provider="Gentor\LaravelOneSky\ServiceProvider"
更改新发布的 onesky.php
文件,使其与您的项目匹配。
接下来,将 ONESKY_API_KEY
和 ONESKY_SECRET
添加到您的 .env
文件。
当您准备好翻译语言文件时,使用此简单的 artisan 命令将它们上传到您的 OneSky 账户
php artisan onesky:push
当您的语言文件被翻译后,使用此命令直接将它们下载到您的项目中
php artisan onesky:pull
如果您只想拉取某些语言,可以使用 --lang=
标志
php artisan onesky:pull --lang=en,da,no
如果您有多个项目,可以使用 --project=
标志指定 id
php artisan onesky:push --project=1337
贡献
错误报告
欢迎所有问题,为了创建更好的产品,但您的问题应包含标题和问题的清晰描述。您还应尽可能提供尽可能多的相关信息和一个展示问题的代码示例。
哪个分支?
所有错误修复应发送到 develop 分支。错误修复永远不应该发送到 master
安全漏洞
如果您在 Sherlock 包中发现安全漏洞,请向 Ageras 的开发团队发送电子邮件。
编码风格
Ageras 遵循 PSR-2 编码标准和 PSR-4 自动加载标准。
StyleCI
StyleCI 会自动修复代码风格以符合标准。
许可
Copyright (c) 2016: Ageras Aps and other contributors:
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.