Skip to content

Commit e8dcdfb

Browse files
committed
adding translations
1 parent 3824cc6 commit e8dcdfb

15 files changed

Lines changed: 10242 additions & 9794 deletions

.github/workflows/auto-translate-language.yml

Lines changed: 0 additions & 165 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 0 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -934,99 +934,6 @@ jobs:
934934
qdomyos_logcat.txt
935935
if-no-files-found: warn
936936

937-
android-translation-screenshots:
938-
runs-on: ubuntu-latest
939-
needs: android-build
940-
if: github.event_name == 'workflow_dispatch'
941-
strategy:
942-
fail-fast: false
943-
matrix:
944-
include:
945-
- { locale: "en_US", language: "en", country: "US", label: "en-US" }
946-
- { locale: "it_IT", language: "it", country: "IT", label: "it-IT" }
947-
- { locale: "de_DE", language: "de", country: "DE", label: "de-DE" }
948-
- { locale: "fr_FR", language: "fr", country: "FR", label: "fr-FR" }
949-
- { locale: "es_ES", language: "es", country: "ES", label: "es-ES" }
950-
- { locale: "ja_JP", language: "ja", country: "JP", label: "ja-JP" }
951-
- { locale: "ar_SA", language: "ar", country: "SA", label: "ar-SA" }
952-
953-
steps:
954-
- name: Checkout code
955-
uses: actions/checkout@v4
956-
957-
- name: Download APK Artifact
958-
uses: actions/download-artifact@v4
959-
with:
960-
name: fdroid-android-trial
961-
path: apk-debug
962-
963-
- name: Setup Java for Android Emulator
964-
uses: actions/setup-java@v3
965-
with:
966-
distribution: 'temurin'
967-
java-version: '17'
968-
969-
- name: Run translation screenshot capture (${{ matrix.label }})
970-
uses: ReactiveCircus/android-emulator-runner@v2
971-
with:
972-
api-level: 35
973-
target: google_apis
974-
arch: x86_64
975-
profile: Nexus 6
976-
disable-animations: true
977-
script: |
978-
set -euxo pipefail
979-
980-
wait_for_boot() {
981-
adb wait-for-device
982-
until adb shell getprop sys.boot_completed 2>/dev/null | tr -d '\r' | grep -q '^1$'; do
983-
sleep 5
984-
done
985-
sleep 10
986-
}
987-
988-
set_android_locale() {
989-
adb shell setprop persist.sys.locale ${{ matrix.language }}-${{ matrix.country }} || true
990-
adb shell setprop persist.sys.language ${{ matrix.language }} || true
991-
adb shell setprop persist.sys.country ${{ matrix.country }} || true
992-
adb shell stop
993-
adb shell start
994-
wait_for_boot
995-
}
996-
997-
adb install apk-debug/android-debug.apk
998-
wait_for_boot
999-
set_android_locale
1000-
1001-
adb shell getprop persist.sys.locale > locale-${{ matrix.label }}.txt
1002-
adb logcat -c
1003-
1004-
adb shell am force-stop org.cagnulen.qdomyoszwift || true
1005-
adb shell am start -n org.cagnulen.qdomyoszwift/org.cagnulen.qdomyoszwift.CustomQtActivity --es startup_screen home
1006-
sleep 90
1007-
adb shell screencap -p /sdcard/screenshot-home-${{ matrix.label }}.png
1008-
adb pull /sdcard/screenshot-home-${{ matrix.label }}.png screenshot-home-${{ matrix.label }}.png
1009-
1010-
adb shell am force-stop org.cagnulen.qdomyoszwift || true
1011-
adb shell am start -n org.cagnulen.qdomyoszwift/org.cagnulen.qdomyoszwift.CustomQtActivity --es startup_screen settings
1012-
sleep 90
1013-
adb shell screencap -p /sdcard/screenshot-settings-${{ matrix.label }}.png
1014-
adb pull /sdcard/screenshot-settings-${{ matrix.label }}.png screenshot-settings-${{ matrix.label }}.png
1015-
1016-
adb logcat -d > logcat-${{ matrix.label }}.txt
1017-
1018-
- name: Upload translation screenshot artifact (${{ matrix.label }})
1019-
if: always()
1020-
uses: actions/upload-artifact@v4
1021-
with:
1022-
name: android-translation-screenshot-${{ matrix.label }}
1023-
path: |
1024-
screenshot-home-${{ matrix.label }}.png
1025-
screenshot-settings-${{ matrix.label }}.png
1026-
logcat-${{ matrix.label }}.txt
1027-
locale-${{ matrix.label }}.txt
1028-
if-no-files-found: warn
1029-
1030937
ios-build:
1031938
# The type of runner that the job will run on
1032939
runs-on: macos-14

src/Home.qml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import QtMultimedia 5.15
99

1010
HomeForm {
1111
objectName: "home"
12-
property bool ciStartupMode: (typeof STARTUP_SCREEN !== "undefined" && STARTUP_SCREEN.toString().toLowerCase() !== "")
1312
background: Rectangle {
1413
anchors.fill: parent
1514
width: parent.fill
@@ -116,7 +115,7 @@ HomeForm {
116115
rootItem.enableLocationServices()
117116
}
118117
onNoClicked: remindLocationServicesDialog.visible = true
119-
visible: !ciStartupMode && !rootItem.locationServices() && !locationServiceRequsted && !settings.skipLocationServicesDialog
118+
visible: !rootItem.locationServices() && !locationServiceRequsted && !settings.skipLocationServicesDialog
120119
}
121120

122121
MessageDialog {
@@ -139,7 +138,7 @@ HomeForm {
139138
}
140139

141140
Timer {
142-
interval: 200; running: !ciStartupMode; repeat: false
141+
interval: 200; running: true; repeat: false
143142
onTriggered: {
144143
if(rootItem.firstRun()) {
145144
stackView.push("Wizard.qml")

src/android/src/Shortcuts.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,6 @@ public static String getProfileExtras(Context context) {
8282
return "";
8383
}
8484

85-
public static String getStartupScreenExtra(Context context) {
86-
Intent intent = ((Activity)context).getIntent();
87-
Bundle extras = intent.getExtras();
88-
if (extras != null) {
89-
for (String key : extras.keySet()) {
90-
Object value = extras.get(key);
91-
if("startup_screen".equals(key)) {
92-
QLog.d("Shortcuts", "startup_screen: " + value.toString());
93-
return value.toString();
94-
}
95-
}
96-
}
97-
return "";
98-
}
99-
10085
public static void getAllExtras(Context context) {
10186
Intent intent = ((Activity)context).getIntent(); // Ottieni l'Intent che ha avviato l'attività
10287
Bundle extras = intent.getExtras();

src/main.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ double bikeResistanceGain = 1.0;
128128
QString power_sensor_name = QStringLiteral("Disabled");
129129
bool power_sensor_as_treadmill = false;
130130
bool smokeTest = false;
131-
QString startupScreen = "";
132131
QString logfilename = QStringLiteral("debug-") +
133132
QDateTime::currentDateTime()
134133
.toString()
@@ -218,7 +217,6 @@ void displayHelp() {
218217
printf("\nOther options:\n");
219218
printf(" -test-resistance Enable resistance testing\n");
220219
printf(" -fit-file-saved-on-quit Save FIT file on application quit\n");
221-
printf(" -startup-screen <name> Open a specific screen at startup (e.g. home, settings)\n");
222220

223221
exit(0);
224222
}
@@ -367,9 +365,6 @@ QCoreApplication *createApplication(int &argc, char *argv[]) {
367365
smokeTest = true;
368366
nogui = true;
369367
}
370-
if (!qstrcmp(argv[i], "-startup-screen")) {
371-
startupScreen = QString::fromLocal8Bit(argv[++i]).trimmed().toLower();
372-
}
373368
if (!qstrcmp(argv[i], "-train")) {
374369

375370
trainProgram = argv[++i];
@@ -612,13 +607,6 @@ int main(int argc, char *argv[]) {
612607
QAndroidJniObject r = QAndroidJniObject::callStaticObjectMethod("org/cagnulen/qdomyoszwift/Shortcuts", "getProfileExtras",
613608
"(Landroid/content/Context;)Ljava/lang/String;", QtAndroid::androidContext().object());
614609
profileName = r.toString();
615-
if (startupScreen.isEmpty()) {
616-
QAndroidJniObject startupScreenExtra = QAndroidJniObject::callStaticObjectMethod(
617-
"org/cagnulen/qdomyoszwift/Shortcuts", "getStartupScreenExtra",
618-
"(Landroid/content/Context;)Ljava/lang/String;", QtAndroid::androidContext().object());
619-
startupScreen = startupScreenExtra.toString().trimmed();
620-
startupScreen = startupScreen.toLower();
621-
}
622610
#endif
623611

624612
QFileInfo pp(profileName);
@@ -969,7 +957,6 @@ int main(int argc, char *argv[]) {
969957
#else
970958
engine.rootContext()->setContextProperty("OS_VERSION", QVariant("Other"));
971959
#endif
972-
engine.rootContext()->setContextProperty("STARTUP_SCREEN", startupScreen);
973960
#ifdef CHARTJS
974961
engine.rootContext()->setContextProperty("CHARTJS", QVariant(true));
975962
#else

0 commit comments

Comments
 (0)