Skip to content

Commit 3712f7e

Browse files
committed
lightbox: Translate video position slider semantic labels
This descriptions were taken from [VideoPlayerValue]. Signed-off-by: Zixuan James Li <[email protected]>
1 parent 4c6235f commit 3712f7e

9 files changed

+78
-21
lines changed

assets/l10n/app_en.arb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,5 +708,13 @@
708708
"emojiPickerSearchEmoji": "Search emoji",
709709
"@emojiPickerSearchEmoji": {
710710
"description": "Hint text for the emoji picker search text field."
711+
},
712+
"videoCurrentPositionLabel": "Current position",
713+
"@videoCurrentPositionLabel": {
714+
"description": "The current playback position."
715+
},
716+
"videoDurationLabel": "Video duration",
717+
"@videoDurationLabel": {
718+
"description": "The total duration of the video."
711719
}
712720
}

lib/generated/l10n/zulip_localizations.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,18 @@ abstract class ZulipLocalizations {
10521052
/// In en, this message translates to:
10531053
/// **'Search emoji'**
10541054
String get emojiPickerSearchEmoji;
1055+
1056+
/// The current playback position.
1057+
///
1058+
/// In en, this message translates to:
1059+
/// **'Current position'**
1060+
String get videoCurrentPositionLabel;
1061+
1062+
/// The total duration of the video.
1063+
///
1064+
/// In en, this message translates to:
1065+
/// **'Video duration'**
1066+
String get videoDurationLabel;
10551067
}
10561068

10571069
class _ZulipLocalizationsDelegate extends LocalizationsDelegate<ZulipLocalizations> {

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,4 +557,10 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
557557

558558
@override
559559
String get emojiPickerSearchEmoji => 'Search emoji';
560+
561+
@override
562+
String get videoCurrentPositionLabel => 'Current position';
563+
564+
@override
565+
String get videoDurationLabel => 'Video duration';
560566
}

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,4 +557,10 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
557557

558558
@override
559559
String get emojiPickerSearchEmoji => 'Search emoji';
560+
561+
@override
562+
String get videoCurrentPositionLabel => 'Current position';
563+
564+
@override
565+
String get videoDurationLabel => 'Video duration';
560566
}

lib/generated/l10n/zulip_localizations_ja.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,4 +557,10 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
557557

558558
@override
559559
String get emojiPickerSearchEmoji => 'Search emoji';
560+
561+
@override
562+
String get videoCurrentPositionLabel => 'Current position';
563+
564+
@override
565+
String get videoDurationLabel => 'Video duration';
560566
}

lib/generated/l10n/zulip_localizations_nb.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,4 +557,10 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
557557

558558
@override
559559
String get emojiPickerSearchEmoji => 'Search emoji';
560+
561+
@override
562+
String get videoCurrentPositionLabel => 'Current position';
563+
564+
@override
565+
String get videoDurationLabel => 'Video duration';
560566
}

lib/generated/l10n/zulip_localizations_pl.dart

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
2424
String get chooseAccountPageTitle => 'Wybierz konto';
2525

2626
@override
27-
String get switchAccountButton => 'Przełącz konto';
27+
String get switchAccountButton => 'Switch account';
2828

2929
@override
3030
String tryAnotherAccountMessage(Object url) {
31-
return 'Twoje konto na $url wymaga jeszcze chwili na załadowanie.';
31+
return 'Your account at $url is taking a while to load.';
3232
}
3333

3434
@override
35-
String get tryAnotherAccountButton => 'Sprawdź inne konto';
35+
String get tryAnotherAccountButton => 'Try another account';
3636

3737
@override
3838
String get chooseAccountPageLogOutButton => 'Wyloguj';
@@ -68,16 +68,16 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
6868
String get permissionsDeniedReadExternalStorage => 'Aby odebrać pliki Zulip musi uzyskać dodatkowe uprawnienia w Ustawieniach.';
6969

7070
@override
71-
String get actionSheetOptionMuteTopic => 'Wycisz wątek';
71+
String get actionSheetOptionMuteTopic => 'Mute topic';
7272

7373
@override
74-
String get actionSheetOptionUnmuteTopic => 'Wznów wątek';
74+
String get actionSheetOptionUnmuteTopic => 'Unmute topic';
7575

7676
@override
77-
String get actionSheetOptionFollowTopic => 'Śledź wątek';
77+
String get actionSheetOptionFollowTopic => 'Follow topic';
7878

7979
@override
80-
String get actionSheetOptionUnfollowTopic => 'Nie śledź wątku';
80+
String get actionSheetOptionUnfollowTopic => 'Unfollow topic';
8181

8282
@override
8383
String get actionSheetOptionCopyMessageText => 'Skopiuj tekst wiadomości';
@@ -192,16 +192,16 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
192192
}
193193

194194
@override
195-
String get errorMuteTopicFailed => 'Wyciszenie bez powodzenia';
195+
String get errorMuteTopicFailed => 'Failed to mute topic';
196196

197197
@override
198-
String get errorUnmuteTopicFailed => 'Wznowienie bez powodzenia';
198+
String get errorUnmuteTopicFailed => 'Failed to unmute topic';
199199

200200
@override
201-
String get errorFollowTopicFailed => 'Śledzenie bez powodzenia';
201+
String get errorFollowTopicFailed => 'Failed to follow topic';
202202

203203
@override
204-
String get errorUnfollowTopicFailed => 'Nie śledź bez powodzenia';
204+
String get errorUnfollowTopicFailed => 'Failed to unfollow topic';
205205

206206
@override
207207
String get errorSharingFailed => 'Udostępnianie bez powodzenia';
@@ -302,7 +302,7 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
302302
String get dialogContinue => 'Kontynuuj';
303303

304304
@override
305-
String get dialogClose => 'Zamknij';
305+
String get dialogClose => 'Close';
306306

307307
@override
308308
String get errorDialogContinue => 'OK';
@@ -464,7 +464,7 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
464464
String get userRoleUnknown => 'Nieznany';
465465

466466
@override
467-
String get inboxPageTitle => 'Odebrane';
467+
String get inboxPageTitle => 'Inbox';
468468

469469
@override
470470
String get recentDmConversationsPageTitle => 'Wiadomości bezpośrednie';
@@ -479,10 +479,10 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
479479
String get starredMessagesPageTitle => 'Wiadomości z gwiazdką';
480480

481481
@override
482-
String get channelsPageTitle => 'Kanały';
482+
String get channelsPageTitle => 'Channels';
483483

484484
@override
485-
String get mainMenuMyProfile => 'Mój profil';
485+
String get mainMenuMyProfile => 'My profile';
486486

487487
@override
488488
String get channelFeedButtonTooltip => 'Strumień kanału';
@@ -547,14 +547,20 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
547547
String get errorNotificationOpenAccountMissing => 'Konto związane z tym powiadomieniem już nie istnieje.';
548548

549549
@override
550-
String get errorReactionAddingFailedTitle => 'Dodanie reakcji bez powodzenia';
550+
String get errorReactionAddingFailedTitle => 'Adding reaction failed';
551551

552552
@override
553-
String get errorReactionRemovingFailedTitle => 'Usuwanie reakcji bez powodzenia';
553+
String get errorReactionRemovingFailedTitle => 'Removing reaction failed';
554554

555555
@override
556-
String get emojiReactionsMore => 'więcej';
556+
String get emojiReactionsMore => 'more';
557557

558558
@override
559-
String get emojiPickerSearchEmoji => 'Szukaj emoji';
559+
String get emojiPickerSearchEmoji => 'Search emoji';
560+
561+
@override
562+
String get videoCurrentPositionLabel => 'Current position';
563+
564+
@override
565+
String get videoDurationLabel => 'Video duration';
560566
}

lib/generated/l10n/zulip_localizations_ru.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,4 +557,10 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
557557

558558
@override
559559
String get emojiPickerSearchEmoji => 'Search emoji';
560+
561+
@override
562+
String get videoCurrentPositionLabel => 'Current position';
563+
564+
@override
565+
String get videoDurationLabel => 'Video duration';
560566
}

lib/widgets/lightbox.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,13 +385,14 @@ class _VideoPositionSliderControlState extends State<_VideoPositionSliderControl
385385

386386
@override
387387
Widget build(BuildContext context) {
388+
final zulipLocalizations = ZulipLocalizations.of(context);
388389
final currentPosition = _isSliderDragging
389390
? _sliderValue
390391
: widget.controller.value.position;
391392

392393
return Row(children: [
393394
VideoDurationLabel(currentPosition,
394-
semanticsLabel: "Current position"),
395+
semanticsLabel: zulipLocalizations.videoCurrentPositionLabel),
395396
Expanded(
396397
child: Slider(
397398
value: currentPosition.inMilliseconds.toDouble(),
@@ -421,7 +422,7 @@ class _VideoPositionSliderControlState extends State<_VideoPositionSliderControl
421422
),
422423
),
423424
VideoDurationLabel(widget.controller.value.duration,
424-
semanticsLabel: "Video duration"),
425+
semanticsLabel: zulipLocalizations.videoDurationLabel),
425426
]);
426427
}
427428
}

0 commit comments

Comments
 (0)