Skip to content

Commit 49fd5d8

Browse files
authored
Merge pull request #3553 from tecpromotion/5.3-dev
Adding repository custom instructions for GitHub Copilot
2 parents bab9c0c + 4adbc2a commit 49fd5d8

File tree

1 file changed

+175
-0
lines changed

1 file changed

+175
-0
lines changed

.github/copilot-instructions.md

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
# Copilot Instructions for J!German Joomla Translation Repository
2+
3+
## Repository Overview
4+
5+
This repository contains the **J!German translation project** - German language packs for the Joomla! Content Management System. It provides comprehensive German translations for Joomla! 5.x and maintains regional variants for Germany, Austria, Switzerland, Liechtenstein, and Luxembourg.
6+
7+
**Repository Type**: Translation/Language Pack Project
8+
**Primary Language**: PHP (build scripts), INI files (translations)
9+
**Target Runtime**: PHP 8.1+ (per script.php requirements)
10+
**Size**: Medium (~300+ translation files)
11+
**Framework**: Joomla! CMS Language Pack
12+
13+
## Project Structure & Architecture
14+
15+
### Core Directories
16+
- `administrator/language/de-DE/` - Backend/admin interface translations (~300 .ini files)
17+
- `language/de-DE/` - Frontend/site interface translations (~50 .ini files)
18+
- `api/language/de-DE/` - REST API translations (~10 .ini files)
19+
- `installation/language/de-DE/` - Installation wizard translations
20+
- `build/` - Build and versioning scripts (build.php, bump.php)
21+
22+
### Key Files
23+
- `pkg_de-DE.xml` - Main language package manifest and metadata
24+
- `script.php` - Installation/update script with cleanup logic
25+
- `langmetadata.xml` - Language metadata (locale, timezone, calendar settings)
26+
- `localise.php` - Localization helper class for date/time formatting
27+
28+
### Translation File Structure
29+
- `.ini` files contain translations in `KEY="Value"` format
30+
- `.sys.ini` files contain system/installation related strings
31+
- Files are named by component: `com_content.ini`, `mod_menu.ini`, `plg_system_cache.ini`
32+
- All files must be UTF-8 encoded
33+
34+
## Build System & Commands
35+
36+
### Prerequisites
37+
- PHP 8.1 or higher
38+
- Git command line tools
39+
- Linux/Mac OS X/WSL environment
40+
- Umask set to 022 for correct file permissions
41+
42+
### Version Management
43+
```bash
44+
# Update version numbers across all files
45+
php build/bump.php -v 5.3.2 -l 1
46+
47+
# Where:
48+
# -v = Joomla version (e.g., 5.3.2, 5.4.0-rc1)
49+
# -l = Language pack version (integer: 1, 2, 3, etc.)
50+
```
51+
52+
**Always run bump.php before building packages.** This updates:
53+
- Version numbers in all XML files
54+
- Creation dates
55+
- Copyright years
56+
- Package descriptions
57+
58+
### Build Commands
59+
```bash
60+
# Build language packages (most common)
61+
php build/build.php --lpackages --v
62+
63+
# Build installation files
64+
php build/build.php --install --v
65+
66+
# Build Crowdin integration files
67+
php build/build.php --crowdin --v
68+
69+
# Build with custom tag version
70+
php build/build.php --lpackages --v --tagversion "5.3.2v1"
71+
72+
# Build full Joomla package with German language
73+
php build/build.php --fullurl "https://github.com/joomla/joomla-cms/releases/download/5.3.2/Joomla_5.3.2-Stable-Full_Package.zip" --v
74+
```
75+
76+
**Build output location**: `build/tmp/packages/` (created automatically)
77+
78+
### Pre-build Requirements
79+
1. Commit all changes to git
80+
2. Create git tag: `git tag -s 5.3.2v1` (where `5.3.2` is the Joomla version and `v1` is the language pack version; tag format: `<JoomlaVersion>v<PackVersion>`)
81+
3. Verify umask is 022: `umask 022`
82+
83+
### Build Timing
84+
- Language packages: ~30 seconds
85+
- Installation files: ~10 seconds
86+
- Full package with download: ~2-3 minutes (depending on download speed)
87+
88+
## Regional Language Variants
89+
90+
The build system automatically creates 5 regional variants:
91+
92+
| Variant | Changes Applied |
93+
|---------|----------------|
94+
| de-DE | Base German (Germany) - no changes |
95+
| de-AT | Austria - "Januar" → "Jänner", "Jan." → "Jän." |
96+
| de-CH | Switzerland - "ß" → "ss" replacement |
97+
| de-LI | Liechtenstein - "ß" → "ss" replacement |
98+
| de-LU | Luxembourg - no character changes |
99+
100+
Each variant updates:
101+
- Language tags in XML files
102+
- Country names in metadata
103+
- Regional-specific terminology
104+
- File names and internal references
105+
106+
## Validation & Quality Assurance
107+
108+
### File Validation
109+
- INI files must be UTF-8 encoded
110+
- No syntax errors in key=value pairs
111+
- Proper XML structure in metadata files
112+
- Git tags must exist before building
113+
114+
### Manual Testing Steps
115+
1. Install generated language pack in Joomla! test site
116+
2. Switch backend language to German
117+
3. Check for untranslated strings (English fallbacks)
118+
4. Verify special characters display correctly
119+
5. Test installation process
120+
121+
### Common Issues & Solutions
122+
- **Build fails with "tag not found"**: Create git tag first
123+
- **Permission errors**: Run `umask 022` before building
124+
- **Character encoding issues**: Ensure files are UTF-8
125+
- **Missing translations**: Check for new/updated keys in source
126+
127+
## GitHub Workflow & Contributing
128+
129+
### Issue Management
130+
- Use German language in issue templates
131+
- Bug reports require: location, current text, suggested improvement
132+
- Version compatibility is tracked (3.x, 4.x, 5.x)
133+
134+
### Contributing Guidelines
135+
1. Follow "issue-first principle" - create issue before PR
136+
2. Use branch naming: `<issue-number>` or descriptive name
137+
3. Commit messages in German: "fix #123" or descriptive text
138+
4. Test translations in actual Joomla! installation
139+
140+
### Release Process
141+
1. Run version bump: `php build/bump.php -v X.Y.Z -l N`
142+
2. Commit version changes
143+
3. Create git tag: `git tag -s X.Y.ZvN`
144+
4. Build packages: `php build/build.php --lpackages --v`
145+
5. Upload to release/distribution channels
146+
147+
## Development Environment Setup
148+
149+
### Required Tools
150+
- PHP 8.1+ with CLI
151+
- Git
152+
- Text editor with UTF-8 support
153+
- Local Joomla! installation for testing
154+
155+
### File Editing Guidelines
156+
- Always maintain UTF-8 encoding
157+
- Preserve INI file structure and comments
158+
- Keep consistent translation style/terminology
159+
- Test special characters (umlauts: ä, ö, ü, ß)
160+
161+
### Debugging Build Issues
162+
- Run with `--v` flag for verbose output
163+
- Check git status and tags: `git tag -l`
164+
- Verify file permissions: `ls -la`
165+
- Test individual PHP scripts: `php -l build/build.php`
166+
167+
## Trust These Instructions
168+
169+
These instructions are comprehensive and tested. Only search for additional information if:
170+
- Commands fail with unexpected errors
171+
- New Joomla! versions require different approaches
172+
- Build output doesn't match expected structure
173+
- Translation files show encoding problems
174+
175+
The build system is stable and well-established. Follow the documented process for reliable results.

0 commit comments

Comments
 (0)