A cross platform Audiobookshelf client for Android and iOS
Dart
Say Now Playing in the tab hold settings when classic wording is on
Barnabas027601af98e1
diff --git a/lib/services/wording.dart b/lib/services/wording.dartindex 93bb7dff..fb42eb1a 100644--- a/lib/services/wording.dart+++ b/lib/services/wording.dart@@ -17,6 +17,11 @@ class Wording {static Wording of(BuildContext context) =>Wording._(AppLocalizations.of(context)!, classicWordingNotifier.value);+ /// For code that already holds the strings but has no context to hand -+ /// helpers called from a build method's callee, mostly.+ static Wording from(AppLocalizations l) =>+ Wording._(l, classicWordingNotifier.value);+// ── Card primary action ──String get absorb => classic ? 'Play' : _l.absorb;String get absorbing => classic ? 'Playing...' : _l.absorbing;diff --git a/lib/widgets/nav_hold_options.dart b/lib/widgets/nav_hold_options.dartindex 5dfc054a..b98ddf11 100644--- a/lib/widgets/nav_hold_options.dart+++ b/lib/widgets/nav_hold_options.dart@@ -1,5 +1,6 @@import 'package:flutter/material.dart';import '../l10n/app_localizations.dart';+import '../services/wording.dart';/// One choice for what holding a nav tab does. The shell maps ids to the/// actual actions; the settings dialog only needs ids, icons and labels for@@ -210,7 +211,9 @@ String navHoldTabLabel(String tab, AppLocalizations l) => switch (tab) {'home' => l.appShellHomeTab,'library' => l.appShellLibraryTab,'podcasts' => l.appShellPodcastsTab,- 'absorbing' => l.appShellAbsorbingTab,+ // Through Wording, so the tab reads "Now Playing" under classic wording+ // exactly as the nav bar itself does.+ 'absorbing' => Wording.from(l).appShellAbsorbingTab,'stats' => l.appShellStatsTab,'settings' => l.appShellSettingsTab,_ => tab,