generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4231a37
commit 2adcb5f
Showing
32 changed files
with
393 additions
and
561 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
TRANSLATOR_DRIVER=openai | ||
TRANSLATORS_DEEPL_API_KEY=your-deepl-api-key | ||
TRANSLATORS_GOOGLE_PROJECT=your-google-project | ||
TRANSLATORS_MICROSOFT_KEY=your-microsoft-key | ||
TRANSLATORS_MICROSOFT_REGION=your-microsoft-region | ||
TRANSLATORS_OPENAI_API_KEY=your-openai-api-key | ||
TRANSLATORS_OPENAI_MODEL=gpt-4o-mini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
github: :vendor_name | ||
github: datashaman |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Ask a question | ||
url: https://github.com/:vendor_name/:package_name/discussions/new?category=q-a | ||
url: https://github.com/datashaman/laravel-translators/discussions/new?category=q-a | ||
about: Ask the community for help | ||
- name: Request a feature | ||
url: https://github.com/:vendor_name/:package_name/discussions/new?category=ideas | ||
url: https://github.com/datashaman/laravel-translators/discussions/new?category=ideas | ||
about: Share ideas for new features | ||
- name: Report a security issue | ||
url: https://github.com/:vendor_name/:package_name/security/policy | ||
url: https://github.com/datashaman/laravel-translators/security/policy | ||
about: Learn how to notify us for sensitive bugs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
.idea | ||
.phpunit.cache | ||
build | ||
composer.lock | ||
coverage | ||
docs | ||
phpunit.xml | ||
phpstan.neon | ||
testbench.yaml | ||
vendor | ||
node_modules | ||
/.envrc | ||
/.idea | ||
/.phpunit.cache | ||
/build | ||
/composer.lock | ||
/coverage | ||
/docs | ||
/node_modules | ||
/phpstan.neon | ||
/phpunit.xml | ||
/testbench.yaml | ||
/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Changelog | ||
|
||
All notable changes to `:package_name` will be documented in this file. | ||
All notable changes to `laravel-translators` will be documented in this file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
return [ | ||
'default' => env('TRANSLATOR_DRIVER', 'openai'), | ||
|
||
'services' => [ | ||
'deepl' => [ | ||
'api_key' => env('TRANSLATORS_DEEPL_API_KEY'), | ||
], | ||
|
||
'google' => [ | ||
'project' => env('TRANSLATORS_GOOGLE_PROJECT'), | ||
], | ||
|
||
'microsoft' => [ | ||
'key' => env('TRANSLATORS_MICROSOFT_KEY'), | ||
'region' => env('TRANSLATORS_MICROSOFT_REGION', 'westus'), | ||
], | ||
|
||
'openai' => [ | ||
'api_key' => env('TRANSLATORS_OPENAI_API_KEY', env('OPENAI_API_KEY')), | ||
'model' => env('TRANSLATORS_OPENAI_MODEL', 'gpt-4o-mini'), | ||
'prompt' => ' Translate the following list of messages into the target locale. Preserve the original meaning and formatting. Preserve the order of the messages.', | ||
'response_format' => [ | ||
'type' => 'json_schema', | ||
'json_schema' => [ | ||
'name' => 'translation', | ||
'strict' => true, | ||
'schema' => [ | ||
'type' => 'object', | ||
'properties' => [ | ||
'translations' => [ | ||
'type' => 'array', | ||
'items' => [ | ||
'type' => 'string', | ||
'description' => 'Translated message.', | ||
], | ||
], | ||
], | ||
'required' => ['translations'], | ||
'additionalProperties' => false, | ||
], | ||
], | ||
], | ||
], | ||
], | ||
]; |
Oops, something went wrong.