Skip to content

Commit 2155db1

Browse files
cagnuleinclaude
andcommitted
Merge origin/master into claude/modest-cartwright-f3da09
Resolved conflicts: - .github/workflows/main.yml: keep Qt6 packages for android-build, accept master's new CI jobs (msvc2019, raspberry-pi, nordictrack, pr-build) - src/android/AndroidManifest.xml: minSdkVersion=23 from HEAD + overrideLibrary from master - src/devices/bkoolbike/bkoolbike.cpp: accept master (adds Bkool custom cadence UUID parsing) - src/devices/cscbike/cscbike.cpp: accept master (jorotoBike + clampedCustomResistance) - src/profiles.qml: keep HEAD Qt6 FileDialog and onAccepted/clickedButton style Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 parents 81fd5e2 + 386e7ba commit 2155db1

148 files changed

Lines changed: 269915 additions & 6289 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codex

Whitespace-only changes.

.github/workflows/main.yml

Lines changed: 1153 additions & 286 deletions
Large diffs are not rendered by default.
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
name: Update Translations
2+
3+
on:
4+
workflow_dispatch: # Manual trigger
5+
schedule:
6+
- cron: '0 0 * * 0' # Weekly on Sunday at midnight
7+
pull_request: # Run on every PR commit for testing
8+
paths:
9+
- 'src/**/*.cpp'
10+
- 'src/**/*.h'
11+
- 'src/**/*.qml'
12+
- 'src/**/*.ui'
13+
- 'src/**/*.ts'
14+
push: # Run on push to PR branches
15+
branches:
16+
- 'claude/**' # All Claude Code branches
17+
- 'translations/**' # Translation-specific branches
18+
19+
jobs:
20+
update-translations:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Install Qt Linguist Tools
31+
run: |
32+
sudo apt-get update
33+
sudo apt-get install -y qtbase5-dev qttools5-dev-tools
34+
35+
- name: Detect workflow context
36+
id: context
37+
run: |
38+
if [ "${{ github.event_name }}" = "pull_request" ] || [ "${{ github.event_name }}" = "push" ]; then
39+
echo "mode=testing" >> $GITHUB_OUTPUT
40+
echo "🧪 Running in TESTING mode (PR/push to branch)"
41+
else
42+
echo "mode=production" >> $GITHUB_OUTPUT
43+
echo "🚀 Running in PRODUCTION mode (scheduled/manual)"
44+
fi
45+
46+
- name: Update translation files
47+
run: |
48+
echo "Extracting translatable strings from source code..."
49+
echo "Updating 30 language files..."
50+
51+
# lupdate will create/update all .ts files defined in TRANSLATIONS
52+
lupdate src/qdomyos-zwift.pri
53+
54+
- name: Compile translation binaries (.qm)
55+
run: |
56+
echo "Compiling .ts files into .qm binaries..."
57+
lrelease src/qdomyos-zwift.pri
58+
59+
- name: Verify generated .qm files
60+
run: |
61+
echo "Checking compiled translation files..."
62+
ls -1 src/translations/*.qm
63+
64+
- name: Check for translation changes
65+
run: |
66+
echo ""
67+
echo "Checking for changes..."
68+
69+
# Check if there are changes in translations folder
70+
if git diff --quiet src/translations/; then
71+
echo "✅ No translation updates needed - files are up to date"
72+
echo "HAS_CHANGES=false" >> $GITHUB_ENV
73+
else
74+
echo "📝 Translation files have been updated with new/modified strings"
75+
echo "HAS_CHANGES=true" >> $GITHUB_ENV
76+
77+
# Show diff stats
78+
echo ""
79+
echo "Changes summary:"
80+
git diff --stat src/translations/
81+
82+
echo ""
83+
echo "Files modified:"
84+
git diff --name-only src/translations/
85+
fi
86+
87+
- name: Commit and push changes (Testing Mode)
88+
if: env.HAS_CHANGES == 'true' && steps.context.outputs.mode == 'testing' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
89+
env:
90+
TARGET_BRANCH: ${{ github.head_ref || github.ref_name }}
91+
run: |
92+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
93+
git config --local user.name "github-actions[bot]"
94+
95+
# Commit updated translation source files only
96+
git add src/translations/*.ts
97+
git commit -m "chore: update translation strings [automated]
98+
99+
Automatic update of translatable strings extracted from source code.
100+
Updated 30 language files in src/translations/
101+
102+
- Updated by GitHub Actions (Testing Mode)
103+
- Triggered by: ${{ github.event_name }}
104+
- Date: $(date -u +"%Y-%m-%d %H:%M:%S UTC")"
105+
106+
# Push to remote branch explicitly (works also in detached HEAD on pull_request events)
107+
git push origin HEAD:refs/heads/${TARGET_BRANCH}
108+
109+
echo "✅ Changes committed and pushed to current branch"
110+
111+
- name: Commit and push changes (Production Mode)
112+
if: env.HAS_CHANGES == 'true' && steps.context.outputs.mode == 'production'
113+
run: |
114+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
115+
git config --local user.name "github-actions[bot]"
116+
117+
# Create a new branch for production updates
118+
BRANCH_NAME="translations/auto-update-$(date +%Y%m%d-%H%M%S)"
119+
git checkout -b "$BRANCH_NAME"
120+
121+
# Add updated translation source files only
122+
git add src/translations/*.ts
123+
git commit -m "chore: update translation strings
124+
125+
Automatic update of translatable strings extracted from source code.
126+
Updated 30 language files in src/translations/
127+
128+
- Updated by GitHub Actions (Scheduled)
129+
- Date: $(date -u +"%Y-%m-%d %H:%M:%S UTC")"
130+
131+
# Push the branch
132+
git push origin "$BRANCH_NAME"
133+
134+
# Store branch name for PR creation
135+
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
136+
echo "✅ Changes pushed to new branch: $BRANCH_NAME"
137+
138+
- name: Create Pull Request (Production Mode Only)
139+
if: env.HAS_CHANGES == 'true' && steps.context.outputs.mode == 'production'
140+
uses: peter-evans/create-pull-request@v5
141+
with:
142+
token: ${{ secrets.GITHUB_TOKEN }}
143+
branch: ${{ env.BRANCH_NAME }}
144+
title: "🌍 Update translation strings"
145+
body: |
146+
## Translation Update
147+
148+
This PR updates the translation file with new strings extracted from the source code.
149+
150+
### Changes
151+
- Extracted new translatable strings using `lupdate`
152+
- Updated 30 language files in `src/translations/`
153+
- Languages: Italian, German, French, Spanish, Portuguese, Russian, Chinese, Japanese, Korean, Arabic, Hindi, and 19 more
154+
155+
### What to do next
156+
1. Review the new strings in `src/translations/qdomyos-zwift_*.ts`
157+
2. Contributors can now create PRs to add translations in their language
158+
3. Edit the `.ts` file for your language and add translations in `<translation>` tags
159+
4. Merge this PR to make new strings available
160+
161+
### Translation Files
162+
- Location: `src/translations/`
163+
- Format: `qdomyos-zwift_LOCALE.ts` (e.g., `qdomyos-zwift_it.ts` for Italian)
164+
- 30 languages supported
165+
166+
**Note:** Strings marked as `<translation type="unfinished">` need translation.
167+
168+
---
169+
*Generated automatically by GitHub Actions*
170+
labels: |
171+
translations
172+
automation
173+
174+
- name: Summary
175+
if: always()
176+
run: |
177+
echo ""
178+
echo "============================================"
179+
echo "Translation Workflow Summary"
180+
echo "============================================"
181+
echo "Mode: ${{ steps.context.outputs.mode }}"
182+
echo "Event: ${{ github.event_name }}"
183+
echo "Has changes: ${{ env.HAS_CHANGES }}"
184+
echo "============================================"
185+
186+
if [ "${{ env.HAS_CHANGES }}" = "true" ]; then
187+
if [ "${{ steps.context.outputs.mode }}" = "testing" ]; then
188+
echo "✅ Translation files updated in current branch"
189+
echo " Review changes in: src/translations/"
190+
else
191+
echo "✅ Translation files updated and PR created"
192+
echo " Branch: ${{ env.BRANCH_NAME }}"
193+
fi
194+
else
195+
echo "ℹ️ No updates needed - translation files are current"
196+
fi

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ src/inner_templates/googlemaps/cesium-key.js
5454
src/inner_templates/googlemaps/cesium-key.js
5555
src/qdomyos-zwift.pro.user.49de507
5656
/.vs
57+
src/translations/*.qm
58+
/tools/__pycache__

AGENTS.md

Lines changed: 6 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,11 @@
22

33
QDomyos-Zwift is a Qt-based application that bridges fitness equipment (treadmills, bikes, ellipticals, rowers) with virtual training platforms like Zwift. It acts as a Bluetooth intermediary, connecting physical equipment to fitness apps while providing enhanced features like Peloton integration, power zone training, and workout programs.
44

5-
## Build System & Commands
6-
7-
### Build Commands
8-
```bash
9-
# Build entire project (use subdirs TEMPLATE)
10-
qmake
11-
make
12-
13-
# Build specific configurations
14-
qmake -r # Recursive build
15-
make debug # Debug build
16-
make release # Release build
17-
18-
# Clean build
19-
make clean
20-
make distclean
21-
```
22-
23-
### Platform-Specific Builds
24-
```bash
25-
# Android
26-
qmake -spec android-clang
27-
make
28-
29-
# iOS
30-
qmake -spec macx-ios-clang
31-
make
32-
33-
# Windows (MinGW)
34-
qmake -spec win32-g++
35-
make
36-
```
37-
38-
### Testing
39-
```bash
40-
# Build and run tests (requires main app built first)
41-
cd tst
42-
qmake
43-
make
44-
./qdomyos-zwift-tests
45-
46-
# Run with XML output for CI
47-
GTEST_OUTPUT=xml:test-results/ GTEST_COLOR=1 ./qdomyos-zwift-tests
48-
```
49-
50-
### No-GUI Mode
51-
```bash
52-
# Run application without GUI
53-
sudo ./qdomyos-zwift -no-gui
54-
```
5+
## Rules
6+
1. Ask, dont assume. If something's unclear, ask before writing a line and no silent guesses about intent, architecture, or requirements.
7+
2. Simplest solution first and implement the minimum thing that works. No abstractions you didn't request.
8+
3. Dont touch unrelated code and if a file isnt part of the current task, leave it.
9+
4. Flag uncertainty explicitly or if you're not confident, say so before proceeding as confidence without certainty causes more damage than admitting a gap.
5510

5611
## Architecture Overview
5712

@@ -213,6 +168,7 @@ tst/Devices/
213168
- Platform-specific configuration paths
214169
- Profile system for multiple users/devices
215170
- Extensive customization options for device behavior
171+
- `src/settings-catalog.json` is the generated cross-platform catalog of every persistent setting declared in `src/settings.qml` and its settings child QML files. When adding, removing, or renaming any settings QML property, run `python tools/generate_settings_catalog.py` and then `python tools/generate_settings_catalog.py --check`. The check must report exact coverage before the change is complete.
216172

217173
## External Dependencies
218174

0 commit comments

Comments
 (0)