feat(train): each km announced on foot, each 5 km by bike (ADR 0030, D49)

Step 11 takes up what OpenTracks does that Train didn't (D49). 11a: a
recording announces each kilometre on foot and each 5 km by bike, never
on a rower, where the Record sheet's switch is on for the activity
(remembered in the person's announce.json, off at first): the distance,
the moving time, the split's pace or speed and the heart rate. The app
hands the recorder the words in its language; Announcer.kt counts the
moving time and the distance, Cues.kt speaks the line after a cue still
speaking.

Not tried on a phone yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-29 14:25:13 +01:00
commit db7e0b7bcd
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64
5 changed files with 782 additions and 11 deletions

View file

@ -505,5 +505,14 @@
"recordMusic": "Musik",
"recordMusicOn": "Musik",
"recordMetronome": "Metronom",
"recordMusicOff": "Aus"
"recordMusicOff": "Aus",
"recordAnnounce": "Ansagen",
"recordAnnounceFoot": "Jeden Kilometer: Zeit, Pace und Puls",
"recordAnnounceBike": "Alle 5 km: Zeit, Tempo und Puls",
"announceKilometres": "{count, plural, =1{1 Kilometer} other{{count} Kilometer}}",
"announceHours": "{count, plural, =1{1 Stunde} other{{count} Stunden}}",
"announceTime": "Zeit {time}",
"announcePace": "Pace {pace} pro Kilometer",
"announceSpeed": "Tempo {speed} Kilometer pro Stunde",
"announceHeartRate": "Puls {bpm}"
}

View file

@ -636,5 +636,22 @@
"recordMusicOn": "Music",
"@recordMusicOn": {"description": "The segment playing the kept tracks by cadence."},
"recordMetronome": "Metronome",
"recordMusicOff": "Off"
"recordMusicOff": "Off",
"recordAnnounce": "Announcements",
"recordAnnounceFoot": "Every kilometre: time, pace and heart rate",
"@recordAnnounceFoot": {"description": "The switch's hint on foot (D49)."},
"recordAnnounceBike": "Every 5 km: time, speed and heart rate",
"@recordAnnounceBike": {"description": "The switch's hint on a bike (D49)."},
"announceKilometres": "{count, plural, =1{1 kilometre} other{{count} kilometres}}",
"@announceKilometres": {"placeholders": {"count": {"type": "int"}}},
"announceHours": "{count, plural, =1{1 hour} other{{count} hours}}",
"@announceHours": {"placeholders": {"count": {"type": "int"}}},
"announceTime": "Time {time}",
"@announceTime": {"placeholders": {"time": {"type": "String"}}},
"announcePace": "Pace {pace} a kilometre",
"@announcePace": {"placeholders": {"pace": {"type": "String"}}},
"announceSpeed": "Speed {speed} kilometres an hour",
"@announceSpeed": {"placeholders": {"speed": {"type": "String"}}},
"announceHeartRate": "Heart rate {bpm}",
"@announceHeartRate": {"placeholders": {"bpm": {"type": "String"}}}
}

View file

@ -3057,6 +3057,60 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'Off'**
String get recordMusicOff;
/// No description provided for @recordAnnounce.
///
/// In en, this message translates to:
/// **'Announcements'**
String get recordAnnounce;
/// The switch's hint on foot (D49).
///
/// In en, this message translates to:
/// **'Every kilometre: time, pace and heart rate'**
String get recordAnnounceFoot;
/// The switch's hint on a bike (D49).
///
/// In en, this message translates to:
/// **'Every 5 km: time, speed and heart rate'**
String get recordAnnounceBike;
/// No description provided for @announceKilometres.
///
/// In en, this message translates to:
/// **'{count, plural, =1{1 kilometre} other{{count} kilometres}}'**
String announceKilometres(int count);
/// No description provided for @announceHours.
///
/// In en, this message translates to:
/// **'{count, plural, =1{1 hour} other{{count} hours}}'**
String announceHours(int count);
/// No description provided for @announceTime.
///
/// In en, this message translates to:
/// **'Time {time}'**
String announceTime(String time);
/// No description provided for @announcePace.
///
/// In en, this message translates to:
/// **'Pace {pace} a kilometre'**
String announcePace(String pace);
/// No description provided for @announceSpeed.
///
/// In en, this message translates to:
/// **'Speed {speed} kilometres an hour'**
String announceSpeed(String speed);
/// No description provided for @announceHeartRate.
///
/// In en, this message translates to:
/// **'Heart rate {bpm}'**
String announceHeartRate(String bpm);
}
class _AppLocalizationsDelegate

View file

@ -1821,4 +1821,55 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get recordMusicOff => 'Aus';
@override
String get recordAnnounce => 'Ansagen';
@override
String get recordAnnounceFoot => 'Jeden Kilometer: Zeit, Pace und Puls';
@override
String get recordAnnounceBike => 'Alle 5 km: Zeit, Tempo und Puls';
@override
String announceKilometres(int count) {
String _temp0 = intl.Intl.pluralLogic(
count,
locale: localeName,
other: '$count Kilometer',
one: '1 Kilometer',
);
return '$_temp0';
}
@override
String announceHours(int count) {
String _temp0 = intl.Intl.pluralLogic(
count,
locale: localeName,
other: '$count Stunden',
one: '1 Stunde',
);
return '$_temp0';
}
@override
String announceTime(String time) {
return 'Zeit $time';
}
@override
String announcePace(String pace) {
return 'Pace $pace pro Kilometer';
}
@override
String announceSpeed(String speed) {
return 'Tempo $speed Kilometer pro Stunde';
}
@override
String announceHeartRate(String bpm) {
return 'Puls $bpm';
}
}

View file

@ -1809,6 +1809,57 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get recordMusicOff => 'Off';
@override
String get recordAnnounce => 'Announcements';
@override
String get recordAnnounceFoot => 'Every kilometre: time, pace and heart rate';
@override
String get recordAnnounceBike => 'Every 5 km: time, speed and heart rate';
@override
String announceKilometres(int count) {
String _temp0 = intl.Intl.pluralLogic(
count,
locale: localeName,
other: '$count kilometres',
one: '1 kilometre',
);
return '$_temp0';
}
@override
String announceHours(int count) {
String _temp0 = intl.Intl.pluralLogic(
count,
locale: localeName,
other: '$count hours',
one: '1 hour',
);
return '$_temp0';
}
@override
String announceTime(String time) {
return 'Time $time';
}
@override
String announcePace(String pace) {
return 'Pace $pace a kilometre';
}
@override
String announceSpeed(String speed) {
return 'Speed $speed kilometres an hour';
}
@override
String announceHeartRate(String bpm) {
return 'Heart rate $bpm';
}
}
/// The translations for English, as used in the United Kingdom (`en_GB`).