-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add Translation.io configuration and setup #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Install tio/laravel package for Translation.io integration - Create config/translation.php with environment-based API key - Add TRANSLATIONIO_KEY to .env.example as placeholder - Initialize Translation.io sync (php artisan translation:init) - Add Translation.io credit to README (Open Source plan requirement) - Update CHANGELOG with i18n additions This commit implements the configuration and setup for multi-language support (English and German) using Translation.io. The actual middleware implementation and string translations will follow in a separate PR. Fixes #84 Part of: #83
💡 Tip: Consider Using Draft PRsBenefits of opening PRs as drafts initially:
How to convert:
This is just a friendly reminder - feel free to continue as is! 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds Translation.io integration to enable multi-language support (English and German) in the Laravel application. Translation.io is a translation management service that offers free accounts for open source projects.
Key changes:
- Added
tio/laravelpackage (v1.23) for Translation.io integration - Created configuration file for Translation.io settings
- Updated documentation to mention the translation service
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| composer.json | Added tio/laravel v1.23 dependency to production requirements |
| composer.lock | Updated lock file with tio/laravel, gettext/gettext, and gettext/languages packages |
| config/translation.php | Created configuration file with Translation.io API key, source/target locales, and parse paths |
| README.md | Added Translation section documenting the use of Translation.io for the project |
| CHANGELOG.md | Documented the new Translation.io integration and related configuration |
💡 Tip: Consider Using Draft PRsBenefits of opening PRs as drafts initially:
How to convert:
This is just a friendly reminder - feel free to continue as is! 😊 |
- Add comprehensive PEST tests for translation.php configuration - Test config structure, required keys, and data types - Test source locale (en) and target locales (de) - Test gettext parse paths exist as valid directories - Verify API key loading from environment variable - Add missing .env.example changes to commit Addresses Copilot review comments on PR #88: 1. Added test coverage for configuration (PEST format) 2. Ensured .env.example is properly committed All 8 new tests passing (24 assertions total). Note: Tests are written in PEST format as per project guidelines, NOT PHPUnit. This follows the TDD and quality-first principles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
- Add comprehensive PEST tests for translation.php configuration - Test config structure, required keys, and data types - Test source locale (en) and target locales (de) - Test gettext parse paths exist as valid directories - Verify API key loading from environment variable - Add missing .env.example changes to commit Addresses Copilot review comments on PR #88: 1. Added test coverage for configuration (PEST format) 2. Ensured .env.example is properly committed All 8 new tests passing (24 assertions total). Note: Tests are written in PEST format as per project guidelines, NOT PHPUnit. This follows the TDD and quality-first principles.
1466274 to
66a2b71
Compare
- Update config/translation.php copyright header - Update tests/Feature/TranslationConfigTest.php copyright header Follows project convention of using 'SecPal Contributors' for SPDX-FileCopyrightText as seen in other project files.
1928ad8 to
cff93f3
Compare
💡 Tip: Consider Using Draft PRsBenefits of opening PRs as drafts initially:
How to convert:
This is just a friendly reminder - feel free to continue as is! 😊 |
Summary
This PR adds Translation.io configuration and setup for multi-language support (English and German). This is the first PR of the multi-language implementation epic and focuses solely on configuration - the actual middleware implementation and string translations will follow in a separate PR (#87).
Changes
tio/laravelpackage (v1.23) for Translation.io integrationconfig/translation.phpwith environment-based API key configurationTRANSLATIONIO_KEYto.env.examplewith placeholder valuephp artisan translation:initexecuted)[Unreleased] → AddedsectionConfiguration Details
Locales:
en(English)de(German)API Key Management:
.envasTRANSLATIONIO_KEYconfig/translation.phpGettext Parse Paths:
app/- Application coderesources/- Views and language filesTranslation.io Dashboard
After initialization, the project is synced and available at:
https://translation.io/secpal/api
Quality Gates
✅ All preflight checks passing:
Related Issues
Fixes #84
Part of: #83
Next Steps
After this PR is merged:
Accept-Languageheader middleware (PR-2: Implement Accept-Language Middleware & Translate Existing Strings #87)Open Source Plan Requirements
✅ Repository is public
✅ README mentions Translation.io
→ Qualifies for free unlimited Translation.io account
PR Type: Configuration / Setup
Breaking Changes: None
LOC: ~150 (excluding
composer.lock)Review Focus: Configuration structure, environment variable handling, README credit placement