Skip to content

Commit b2541b6

Browse files
PIG208github-actions[bot]
authored andcommitted
lightbox: Translate video position slider semantic labels
This descriptions were adapted from [VideoPlayerValue]. Signed-off-by: Zixuan James Li <[email protected]>
1 parent 6f2402b commit b2541b6

10 files changed

+65
-2
lines changed

assets/l10n/app_en.arb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,14 @@
403403
"@lightboxCopyLinkTooltip": {
404404
"description": "Tooltip in lightbox for the copy link action."
405405
},
406+
"lightboxVideoCurrentPosition": "Current position",
407+
"@lightboxVideoCurrentPosition": {
408+
"description": "The current playback position of the video playing in the lightbox."
409+
},
410+
"lightboxVideoDuration": "Video duration",
411+
"@lightboxVideoDuration": {
412+
"description": "The total duration of the video playing in the lightbox."
413+
},
406414
"loginPageTitle": "Log in",
407415
"@loginPageTitle": {
408416
"description": "Title for login page."

lib/generated/l10n/zulip_localizations.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,18 @@ abstract class ZulipLocalizations {
645645
/// **'Copy link'**
646646
String get lightboxCopyLinkTooltip;
647647

648+
/// The current playback position of the video playing in the lightbox.
649+
///
650+
/// In en, this message translates to:
651+
/// **'Current position'**
652+
String get lightboxVideoCurrentPosition;
653+
654+
/// The total duration of the video playing in the lightbox.
655+
///
656+
/// In en, this message translates to:
657+
/// **'Video duration'**
658+
String get lightboxVideoDuration;
659+
648660
/// Title for login page.
649661
///
650662
/// In en, this message translates to:

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
316316
@override
317317
String get lightboxCopyLinkTooltip => 'Copy link';
318318

319+
@override
320+
String get lightboxVideoCurrentPosition => 'Current position';
321+
322+
@override
323+
String get lightboxVideoDuration => 'Video duration';
324+
319325
@override
320326
String get loginPageTitle => 'Log in';
321327

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
316316
@override
317317
String get lightboxCopyLinkTooltip => 'Copy link';
318318

319+
@override
320+
String get lightboxVideoCurrentPosition => 'Current position';
321+
322+
@override
323+
String get lightboxVideoDuration => 'Video duration';
324+
319325
@override
320326
String get loginPageTitle => 'Log in';
321327

lib/generated/l10n/zulip_localizations_ja.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
316316
@override
317317
String get lightboxCopyLinkTooltip => 'Copy link';
318318

319+
@override
320+
String get lightboxVideoCurrentPosition => 'Current position';
321+
322+
@override
323+
String get lightboxVideoDuration => 'Video duration';
324+
319325
@override
320326
String get loginPageTitle => 'Log in';
321327

lib/generated/l10n/zulip_localizations_nb.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
316316
@override
317317
String get lightboxCopyLinkTooltip => 'Copy link';
318318

319+
@override
320+
String get lightboxVideoCurrentPosition => 'Current position';
321+
322+
@override
323+
String get lightboxVideoDuration => 'Video duration';
324+
319325
@override
320326
String get loginPageTitle => 'Log in';
321327

lib/generated/l10n/zulip_localizations_pl.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
316316
@override
317317
String get lightboxCopyLinkTooltip => 'Skopiuj odnośnik';
318318

319+
@override
320+
String get lightboxVideoCurrentPosition => 'Current position';
321+
322+
@override
323+
String get lightboxVideoDuration => 'Video duration';
324+
319325
@override
320326
String get loginPageTitle => 'Zaloguj';
321327

lib/generated/l10n/zulip_localizations_ru.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
316316
@override
317317
String get lightboxCopyLinkTooltip => 'Скопировать ссылку';
318318

319+
@override
320+
String get lightboxVideoCurrentPosition => 'Current position';
321+
322+
@override
323+
String get lightboxVideoDuration => 'Video duration';
324+
319325
@override
320326
String get loginPageTitle => 'Вход в систему';
321327

lib/generated/l10n/zulip_localizations_sk.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ class ZulipLocalizationsSk extends ZulipLocalizations {
316316
@override
317317
String get lightboxCopyLinkTooltip => 'Skopírovať odkaz';
318318

319+
@override
320+
String get lightboxVideoCurrentPosition => 'Current position';
321+
322+
@override
323+
String get lightboxVideoDuration => 'Video duration';
324+
319325
@override
320326
String get loginPageTitle => 'Prihlásiť sa';
321327

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.lightboxVideoCurrentPosition),
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.lightboxVideoDuration),
425426
]);
426427
}
427428
}

0 commit comments

Comments
 (0)