-
Notifications
You must be signed in to change notification settings - Fork 3
Fix Crowdin GitHub Action configuration and add comprehensive documentation with Laravel locale support #337
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
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit 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 |
… config file Co-authored-by: nielsdrost7 <[email protected]>
nielsdrost7
left a comment
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.
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?
Co-authored-by: nielsdrost7 <[email protected]>
... Removed redundant environment variables in commit 38defa5. The
The Crowdin GitHub Action reads this configuration file from the repository root (referenced as |
Co-authored-by: nielsdrost7 <[email protected]>
nielsdrost7
left a comment
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.
@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
…xtensive documentation Co-authored-by: nielsdrost7 <[email protected]>
... Updated to Laravel standard in commit 926d7fe. The configuration now uses |
nielsdrost7
left a comment
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.
%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
…ping configuration Co-authored-by: nielsdrost7 <[email protected]>
... Applied in commit 7b48de4:
The configuration now explicitly maps Crowdin language codes to Laravel standard underscore-separated format. |
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: Addedproject_idandtokenparameters directly to both Crowdin action steps, and removed redundant environment variable declarationscrowdin.yml:project_id_envandapi_token_enventries since credentials are now passed via workflow parameters%locale_with_underscore%placeholder for Laravel standard format (e.g.,de_DE,pt_BR,zh_CNwith underscores instead of hyphens)%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 codesThe action now receives credentials through its standard parameter interface:
The documented
crowdin.ymlfile 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.