Commit 2b16feb
committed
feat: Add dual-mode translation workflow for PR testing
Enhanced the translation workflow to support two operational modes:
## 🧪 Testing Mode (NEW)
- Triggers on every PR commit
- Triggers on push to claude/** and translations/** branches
- Updates .ts file directly in current branch
- Does NOT create new PRs
- Provides immediate feedback during development
- Perfect for validating translation extraction
## 🚀 Production Mode (Existing)
- Triggers weekly (Sunday midnight UTC)
- Triggers on manual workflow dispatch
- Creates new branch (translations/auto-update-YYYYMMDD-HHMMSS)
- Creates Pull Request for review
- Isolated translation updates
## Key Features
- Automatic mode detection based on event type
- Enhanced logging with emojis and clear status
- Diff stats showing translation changes
- Summary output for both modes
- Path-based triggers (.cpp, .h, .qml, .ui, .ts files)
## Benefits
Testing Mode:
✅ No extra PRs during development
✅ Keeps translations in sync with code changes
✅ Immediate validation of workflow
✅ Easy to review changes in context
Production Mode:
✅ Weekly automation ensures completeness
✅ Clean separation of translation work
✅ Easy for translators to review
✅ Professional PR with full context
## Documentation
Added comprehensive TRANSLATION-WORKFLOW.md covering:
- Detailed explanation of both modes
- Trigger conditions and examples
- Workflow output samples
- Usage guide for developers, translators, maintainers
- Troubleshooting section
- Best practices
- Weblate integration notes
This allows testing the workflow in PRs while maintaining
clean automated weekly updates for translators.1 parent 0c748bf commit 2b16feb
2 files changed
Lines changed: 448 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
7 | 18 | | |
8 | 19 | | |
9 | 20 | | |
| |||
26 | 37 | | |
27 | 38 | | |
28 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
29 | 51 | | |
30 | 52 | | |
31 | | - | |
| 53 | + | |
32 | 54 | | |
33 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
34 | 59 | | |
35 | 60 | | |
36 | | - | |
| 61 | + | |
37 | 62 | | |
38 | 63 | | |
39 | | - | |
| 64 | + | |
40 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
41 | 71 | | |
42 | 72 | | |
43 | | - | |
44 | | - | |
| 73 | + | |
| 74 | + | |
45 | 75 | | |
46 | 76 | | |
47 | 77 | | |
48 | 78 | | |
49 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
50 | 98 | | |
51 | 99 | | |
52 | 100 | | |
| |||
56 | 104 | | |
57 | 105 | | |
58 | 106 | | |
59 | | - | |
| 107 | + | |
60 | 108 | | |
61 | 109 | | |
62 | 110 | | |
63 | 111 | | |
64 | 112 | | |
65 | 113 | | |
66 | 114 | | |
| 115 | + | |
67 | 116 | | |
68 | | - | |
69 | | - | |
| 117 | + | |
| 118 | + | |
70 | 119 | | |
71 | 120 | | |
72 | 121 | | |
| |||
97 | 146 | | |
98 | 147 | | |
99 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
0 commit comments