fix(i18n): drop unused video-control strings and restore spinner lookups
`clean_translations.py --strict` reported seven unused keys.
Three are genuinely dead: TrackSelectionHelper.getEmptyMessage was
removed as unreachable in 4307c49c, and the sheets that need an empty
state carry their own strings. Removes them from every locale.
The four accessibility keys are false positives. tv_number_spinner
aliased the subtree as `final a11y = ...accessibility`, which the static
scanner cannot follow — its docstring says as much. Binds the documented
`final t = Translations.of(context)` instead and hoists the two labels,
so the semantics stay identical and the scanner sees the chains.
This commit is contained in:
@@ -172,7 +172,13 @@ class _TvNumberSpinnerState extends State<TvNumberSpinner> with KeyRepeatHelper<
|
||||
final gap = isCompact ? const SizedBox(width: 8) : const SizedBox(width: 16);
|
||||
final label = widget.label;
|
||||
final semanticLabel = widget.semanticLabel;
|
||||
final a11y = Translations.of(context).accessibility;
|
||||
final t = Translations.of(context);
|
||||
final decrementLabel = semanticLabel != null
|
||||
? t.accessibility.decreaseValue(label: semanticLabel)
|
||||
: t.accessibility.decrease;
|
||||
final incrementLabel = semanticLabel != null
|
||||
? t.accessibility.increaseValue(label: semanticLabel)
|
||||
: t.accessibility.increase;
|
||||
|
||||
return Focus(
|
||||
focusNode: _focusNode,
|
||||
@@ -211,7 +217,7 @@ class _TvNumberSpinnerState extends State<TvNumberSpinner> with KeyRepeatHelper<
|
||||
onPressed: canDecrement ? _decrement : null,
|
||||
onLongPressStart: !isCompact && canDecrement ? () => startRepeat(_decrement) : null,
|
||||
onLongPressEnd: isCompact ? null : stopRepeat,
|
||||
semanticLabel: semanticLabel != null ? a11y.decreaseValue(label: semanticLabel) : a11y.decrease,
|
||||
semanticLabel: decrementLabel,
|
||||
compact: isCompact,
|
||||
),
|
||||
gap,
|
||||
@@ -231,7 +237,7 @@ class _TvNumberSpinnerState extends State<TvNumberSpinner> with KeyRepeatHelper<
|
||||
onPressed: canIncrement ? _increment : null,
|
||||
onLongPressStart: !isCompact && canIncrement ? () => startRepeat(_increment) : null,
|
||||
onLongPressEnd: isCompact ? null : stopRepeat,
|
||||
semanticLabel: semanticLabel != null ? a11y.increaseValue(label: semanticLabel) : a11y.increase,
|
||||
semanticLabel: incrementLabel,
|
||||
compact: isCompact,
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user