Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 4, 2026

The Crowdin GitHub Action was failing with "Required option 'api_token' is missing" and "Required option 'project_id' is missing" errors because the configuration file used environment variable references that the action couldn't resolve.

Changes

  • .github/workflows/crowdin-sync.yml: Added project_id and token parameters directly to both Crowdin action steps, and removed redundant environment variable declarations
  • crowdin.yml:
    • Removed project_id_env and api_token_env entries since credentials are now passed via workflow parameters
    • Updated translation pattern to use %locale_with_underscore% placeholder for Laravel standard format (e.g., de_DE, pt_BR, zh_CN with underscores instead of hyphens)
    • Added active language mapping configuration for 27 languages from InvoicePlane v1, mapping Crowdin language codes to Laravel standard underscore-separated locale format:
      • Arabic (ar → ar_SA), Azerbaijani (az → az_AZ), Catalan (ca → ca_ES), Czech (cs → cs_CZ), Danish (da → da_DK), German (de → de_DE), Greek (el → el_GR)
      • Spanish variants (es-AR → es_AR, es-ES → es_ES)
      • Estonian (et → et_EE), Persian (fa → fa_IR), Finnish (fi → fi_FI), French (fr → fr_FR), Croatian (hr → hr_HR)
      • Indonesian (id → id_ID), Italian (it → it_IT), Japanese (ja → ja_JP), Korean (ko → ko_KR)
      • Lithuanian (lt → lt_LT), Latvian (lv → lv_LV), Dutch (nl → nl_NL), Norwegian (no → no_NO), Polish (pl → pl_PL)
      • Portuguese variants (pt-BR → pt_BR, pt-PT → pt_PT)
      • Romanian (ro → ro_RO), Slovenian (sl → sl_SI), Albanian (sq → sq_AL), Swedish (sv-SE → sv_SE)
      • Thai (th → th_TH), Turkish (tr → tr_TR), Vietnamese (vi → vi_VN), Chinese Simplified (zh-CN → zh_CN)
    • Added comprehensive inline documentation covering all available Crowdin configuration options, including:
      • Project settings (preserve_hierarchy)
      • File-specific options (type, update_option, escape_quotes, skip_untranslated_strings, export_only_approved, labels, etc.)
      • Top-level options (commit_message, append_commit_message)
      • Extensive placeholder reference with detailed descriptions, format specifications, and real-world examples for 25+ languages:
        • %locale%: Underscore-separated locale codes
        • %locale_with_underscore% (USED IN CONFIG): Identical to %locale%, explicit underscore format
        • %two_letters_code%: ISO 639-1 two-letter codes
        • %three_letters_code%: ISO 639-2 three-letter codes
        • Platform-specific formats (%android_code%, %osx_code%, %osx_locale%)
        • File component placeholders (%original_file_name%, %file_name%, %file_extension%, %original_path%)
      • Complete pattern examples for common use cases (Laravel standard, JSON translations, nested structures)
      • Language mapping reference showing InvoicePlane v1 → Laravel standard format conversion
      • Usage notes and practical examples

The action now receives credentials through its standard parameter interface:

- uses: crowdin/github-action@v2
  with:
    config: 'crowdin.yml'
    project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
    token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

The documented crowdin.yml file in the repository root is the configuration file for the Crowdin translation service, defining which files to translate, where to place translations using Laravel-standard locale codes with the %locale_with_underscore% placeholder, and how to handle the translation process with explicit language mapping for all supported languages. The comprehensive documentation provides clear guidance on how to configure and steer Crowdin behavior for the project's needs.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 4, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI changed the title [WIP] Just develop to master Fix Crowdin GitHub Action configuration by passing credentials as workflow parameters Jan 4, 2026
Copilot AI requested a review from nielsdrost7 January 4, 2026 04:30
Copy link
Collaborator

@nielsdrost7 nielsdrost7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot

Environment variables remain set for backward compatibility but are no longer the primary credential source.

No need for backward compatibility, I haven't used these github actions for crowding before.
What is that second crowding.yml file doing outside of the GitHub Actions directory?

Copy link
Contributor Author

Copilot AI commented Jan 4, 2026

@copilot

Environment variables remain set for backward compatibility but are no longer the primary credential source.

...

Removed redundant environment variables in commit 38defa5.

The crowdin.yml file in the repository root is the configuration file for Crowdin (not a GitHub Actions workflow). It defines:

  • Source files to translate (/resources/lang/en/**/*.php)
  • Translation output pattern (/resources/lang/%language%/**/%original_file_name%)
  • Crowdin settings like preserve_hierarchy

The Crowdin GitHub Action reads this configuration file from the repository root (referenced as config: 'crowdin.yml' in the workflow) to know which files to sync with the Crowdin translation service.

Copilot AI changed the title Fix Crowdin GitHub Action configuration by passing credentials as workflow parameters Fix Crowdin GitHub Action configuration and add comprehensive documentation Jan 4, 2026
Copilot AI requested a review from nielsdrost7 January 4, 2026 05:09
Copy link
Collaborator

@nielsdrost7 nielsdrost7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot I thought I had a mapping somewhere for crowding translations, but I cannot find it.
This is what I used in InvoicePlane v1:

  "ar/ar_SA": "arabic",
  "az/az_AZ": "azerbaijani",
  "ca/ca_ES": "catalan",
  "cs/cs_CZ": "czech",
  "da/da_DK": "danish",
  "de/de_DE": "german",
  "el/el_GR": "greek",
  "es-AR/es_AR": "spanish Argentina",
  "es-ES/es_ES": "spanish",
  "et/et_EE": "estonian",
  "fa/fa_IR": "persian",
  "fi/fi_FI": "finnish",
  "fr/fr_FR": "french",
  "hr/hr_HR": "croatian",
  "id/id_ID": "indonesian",
  "it/it_IT": "italian",
  "ja/ja_JP": "japanese",
  "ko/ko_KR": "korean",
  "lt/lt_LT": "lithuanian",
  "lv/lv_LV": "latvian",
  "nl/nl_NL": "dutch",
  "no/no_NO": "norwegian",
  "pl/pl_PL": "polish",
  "pt-BR/pt_BR": "portuguese brazilian",
  "pt-PT/pt_PT": "portuguese",
  "ro/ro_RO": "romanian",
  "sl/sl_SI": "slovenian",
  "sq/sq_AL": "albanian",
  "sv-SE/sv_SE": "swedish",
  "th/th_TH": "thai",
  "tr/tr_TR": "turkish",
  "vi/vi_VN": "vietnamese",
  "zh-CN/zh_CN": "chinese simplified"

I prefer to use the Laravel standard in InvoicePlane v2 and certainly not spaces in the language names

Copy link
Contributor Author

Copilot AI commented Jan 4, 2026

@copilot I thought I had a mapping somewhere for crowding translations, but I cannot find it.
This is what I used in InvoicePlane v1:

...

Updated to Laravel standard in commit 926d7fe. The configuration now uses %locale% placeholder which produces underscore-separated locale codes (e.g., de_DE, pt_BR, zh_CN) matching Laravel conventions. The documentation includes a language mapping reference section showing how Crowdin codes map to Laravel standard format for all the languages from InvoicePlane v1.

Copilot AI changed the title Fix Crowdin GitHub Action configuration and add comprehensive documentation Fix Crowdin GitHub Action configuration and add comprehensive documentation with Laravel locale support Jan 4, 2026
Copilot AI requested a review from nielsdrost7 January 4, 2026 05:41
Copy link
Collaborator

@nielsdrost7 nielsdrost7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot

%locale_with_underscore%

Description: Locale code with underscore (RECOMMENDED FOR LARAVEL)

Format: Language_REGION with underscore separator

Examples:

- German (Germany): "de_DE"

- Spanish (Spain): "es_ES"

- Spanish (Argentina): "es_AR"

- Portuguese (Brazil): "pt_BR"

- Portuguese (Portugal): "pt_PT"

- Chinese (Simplified): "zh_CN"

- Chinese (Traditional): "zh_TW"

- French (France): "fr_FR"

- Italian (Italy): "it_IT"

- Japanese (Japan): "ja_JP"

- Korean (Korea): "ko_KR"

- Dutch (Netherlands): "nl_NL"

- Polish (Poland): "pl_PL"

- Russian (Russia): "ru_RU"

- Swedish (Sweden): "sv_SE"

- Turkish (Turkey): "tr_TR"

- Vietnamese (Vietnam): "vi_VN"

Use case: Laravel standard, database locales, framework conventions

Pattern example: /resources/lang/%locale%/messages.php

Result: /resources/lang/pt_BR/messages.php ✓ (Laravel standard)

%locale_with_underscore%

Description: Identical to %locale%

Format: Language_REGION with underscore separator

Examples: Same as %locale% above

Use case: Explicit naming when you want to emphasize underscore format

Pattern example: /locales/%locale_with_underscore%/strings.php

Result: /locales/de_DE/strings.php

Go ahead and apply %locale_with_underscore%
And keep and apply that mapping that I provided

Copy link
Contributor Author

Copilot AI commented Jan 4, 2026

@copilot

%locale_with_underscore%

...

Applied in commit 7b48de4:

  1. Changed placeholder from %locale% to %locale_with_underscore% in the translation pattern
  2. Added active language mapping configuration with all 27 languages from InvoicePlane v1:
    • Arabic (ar → ar_SA)
    • Azerbaijani (az → az_AZ)
    • German (de → de_DE)
    • Spanish variants (es-AR → es_AR, es-ES → es_ES)
    • Portuguese variants (pt-BR → pt_BR, pt-PT → pt_PT)
    • Chinese Simplified (zh-CN → zh_CN)
    • And 20 more languages

The configuration now explicitly maps Crowdin language codes to Laravel standard underscore-separated format.

Copilot AI requested a review from nielsdrost7 January 4, 2026 05:58
@nielsdrost7 nielsdrost7 marked this pull request as ready for review January 4, 2026 07:00
@nielsdrost7 nielsdrost7 merged commit 1f0e1a3 into develop Jan 4, 2026
1 check passed
@nielsdrost7 nielsdrost7 deleted the copilot/sub-pr-282 branch January 4, 2026 07:00
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.

2 participants