Skip to content

Conversation

@kevalyq
Copy link
Contributor

@kevalyq kevalyq commented Nov 2, 2025

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

  • ✅ Install tio/laravel package (v1.23) for Translation.io integration
  • ✅ Create config/translation.php with environment-based API key configuration
  • ✅ Add TRANSLATIONIO_KEY to .env.example with placeholder value
  • ✅ Initialize Translation.io sync (php artisan translation:init executed)
  • ✅ Add Translation.io credit to README (required for Open Source plan)
  • ✅ Update CHANGELOG.md with i18n additions in [Unreleased] → Added section

Configuration Details

Locales:

  • Source: en (English)
  • Target: de (German)

API Key Management:

  • Stored in .env as TRANSLATIONIO_KEY
  • Loaded from environment in config/translation.php
  • Never committed to version control

Gettext Parse Paths:

  • app/ - Application code
  • resources/ - Views and language files

Translation.io Dashboard

After initialization, the project is synced and available at:
https://translation.io/secpal/api

Quality Gates

✅ All preflight checks passing:

  • Prettier formatting
  • Markdownlint
  • REUSE 3.3 compliance
  • Laravel Pint (PSR-12)
  • PHPStan Level Max
  • All 132 tests passing (392 assertions)

Related Issues

Fixes #84
Part of: #83

Next Steps

After this PR is merged:

  1. PR feat: add Laravel Boost for AI-assisted development #2 will implement the Accept-Language header middleware (PR-2: Implement Accept-Language Middleware & Translate Existing Strings #87)
  2. PR feat: add Laravel Boost for AI-assisted development #2 will extract and translate existing strings
  3. Frontend implementation will follow (PR-2: Frontend Translation.io Integration & i18n Setup #85)

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

- 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
Copilot AI review requested due to automatic review settings November 2, 2025 20:30
@github-actions
Copy link

github-actions bot commented Nov 2, 2025

💡 Tip: Consider Using Draft PRs

Benefits of opening PRs as drafts initially:

  • 💰 Saves CI runtime and Copilot review credits
  • 🎯 Automatically sets linked issues to "🚧 In Progress" status
  • 🚀 Mark "Ready for review" when done to trigger full CI pipeline

How to convert:

  1. Click "Still in progress? Convert to draft" in the sidebar, OR
  2. Use gh pr ready when ready for review

This is just a friendly reminder - feel free to continue as is! 😊

Copy link
Contributor

Copilot AI left a 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/laravel package (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

@github-actions
Copy link

github-actions bot commented Nov 2, 2025

💡 Tip: Consider Using Draft PRs

Benefits of opening PRs as drafts initially:

  • 💰 Saves CI runtime and Copilot review credits
  • 🎯 Automatically sets linked issues to "🚧 In Progress" status
  • 🚀 Mark "Ready for review" when done to trigger full CI pipeline

How to convert:

  1. Click "Still in progress? Convert to draft" in the sidebar, OR
  2. Use gh pr ready when ready for review

This is just a friendly reminder - feel free to continue as is! 😊

kevalyq added a commit that referenced this pull request Nov 2, 2025
- 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.
@kevalyq kevalyq requested a review from Copilot November 2, 2025 20:40
Copy link
Contributor

Copilot AI left a 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.
@kevalyq kevalyq force-pushed the feat/translation-io-setup branch from 1466274 to 66a2b71 Compare November 2, 2025 20:42
- 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.
@kevalyq kevalyq force-pushed the feat/translation-io-setup branch from 1928ad8 to cff93f3 Compare November 2, 2025 20:45
@kevalyq kevalyq merged commit 7d7d1b9 into main Nov 2, 2025
12 checks passed
@kevalyq kevalyq deleted the feat/translation-io-setup branch November 2, 2025 20:47
@github-actions
Copy link

github-actions bot commented Nov 2, 2025

💡 Tip: Consider Using Draft PRs

Benefits of opening PRs as drafts initially:

  • 💰 Saves CI runtime and Copilot review credits
  • 🎯 Automatically sets linked issues to "🚧 In Progress" status
  • 🚀 Mark "Ready for review" when done to trigger full CI pipeline

How to convert:

  1. Click "Still in progress? Convert to draft" in the sidebar, OR
  2. Use gh pr ready when ready for review

This is just a friendly reminder - feel free to continue as is! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PR-1: API Translation.io Integration & Configuration

2 participants