Add translation system documentation for contributors
Translation System Documentation for Contributors
Plan
- [x] Create development directory in docs
- [x] Create translation system documentation file
- [x] Document the basic translation system approach
- [x] Explain the synonym placeholder system ([Type], [[Type]], [type], [[type]])
- [x] Provide examples of how synonyms work
- [x] Add documentation links to CONTRIBUTING.md
- [x] Verify documentation is clear and complete
- [x] Add {% trans %}{% endtrans %} Twig block syntax
- [x] Add note about word inflection for languages like German
- [x] Reduce verbosity in synonym placeholder sections
Summary
Updated documentation based on feedback:
- Added Twig block syntax: Documented
{% trans %}{% endtrans %}for longer text translations - Inflection note: Added guidance that synonyms in inflected languages (like German) should use the nominative case
- Reduced verbosity: Condensed examples from 4 sections to 2 concise examples, simplified guidelines from 5 numbered points to 4 bullet points, removed separate testing section
The documentation now covers all translation features more concisely while maintaining clarity.
Original prompt
Write documentation for contributers how the translation system works. So what are the basic ideas and how do synonyms work.
[Type] → Singular capitalized (e.g., "Category") [[Type]] → Plural capitalized (e.g., "Categories") [type] → Singular lowercase (e.g., "category") [[type]] → Plural lowercase (e.g., "categories")
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
@copilot Add also the {%trans%}{%endtrans} syntax for twig
Include a hint, that in languages in german where words are inflected, they should be in the form of the standard synonym
The sections on how to use the synonym placeholders, do not need to be that verbose with many contents.
@copilot Add also the {%trans%}{%endtrans} syntax for twig
Include a hint, that in languages in german where words are inflected, they should be in the form of the standard synonym ...
Done in 1894d61. Added:
{% trans %}{% endtrans %}Twig block syntax alongside the filter syntax- Note about using nominative case for synonyms in inflected languages like German
- Condensed examples from 4 sections to 2 concise examples
- Simplified guidelines from detailed numbered list to 4 bullet points