diff --git a/lib/features/you/view/server_manager.dart b/lib/features/you/view/server_manager.dart index 75e3f43..ff920e6 100644 --- a/lib/features/you/view/server_manager.dart +++ b/lib/features/you/view/server_manager.dart @@ -11,6 +11,7 @@ import 'package:vaani/features/onboarding/view/user_login.dart' show UserLoginWidget; import 'package:vaani/features/player/view/mini_player_bottom_padding.dart' show MiniPlayerBottomPadding; +import 'package:vaani/generated/l10n.dart'; import 'package:vaani/main.dart' show appLogger; import 'package:vaani/router/router.dart' show Routes; import 'package:vaani/settings/api_settings_provider.dart' @@ -28,7 +29,7 @@ class ServerManagerPage extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { return Scaffold( appBar: AppBar( - title: const Text('Manage Accounts'), + title: Text(S.of(context).accountManage), ), body: Center( child: Padding( @@ -61,8 +62,8 @@ class ServerManagerBody extends HookConsumerWidget { // crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.end, children: [ - const Text( - 'Registered Servers', + Text( + S.of(context).accountRegisteredServers, ), Expanded( child: ListView.builder( @@ -73,7 +74,13 @@ class ServerManagerBody extends HookConsumerWidget { return ExpansionTile( title: Text(registeredServer.serverUrl.toString()), subtitle: Text( - 'Users: ${availableUsers.where((element) => element.server == registeredServer).length}', + S.of(context).accountUsersCount( + availableUsers + .where( + (element) => element.server == registeredServer) + .length, + ), + // 'Users: ${availableUsers.where((element) => element.server == registeredServer).length}', ), // children are list of users of this server children: availableUsers @@ -96,9 +103,9 @@ class ServerManagerBody extends HookConsumerWidget { ), ), const SizedBox(height: 20), - const Padding( + Padding( padding: EdgeInsets.all(8.0), - child: Text('Add New Server'), + child: Text(S.of(context).accountAddNewServer), ), Form( key: formKey, @@ -129,8 +136,8 @@ class ServerManagerBody extends HookConsumerWidget { } } else { ScaffoldMessenger.of(context).showSnackBar( - const SnackBar( - content: Text('Invalid URL'), + SnackBar( + content: Text(S.of(context).accountInvalidURL), ), ); } @@ -155,20 +162,20 @@ class DeleteServerTile extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { return ListTile( leading: const Icon(Icons.delete), - title: const Text('Delete Server'), + title: Text(S.of(context).accountDeleteServer), onTap: () { showDialog( context: context, builder: (context) { return AlertDialog( - title: const Text('Remove Server and Users'), + title: Text(S.of(context).accountRemoveServerAndUsers), // Make content scrollable in case of smaller screens/keyboard content: SingleChildScrollView( child: Text.rich( TextSpan( children: [ - const TextSpan( - text: 'This will remove the server ', + TextSpan( + text: S.of(context).accountRemoveServerAndUsersHead, ), TextSpan( text: server.serverUrl.host, @@ -177,8 +184,8 @@ class DeleteServerTile extends HookConsumerWidget { color: Theme.of(context).colorScheme.primary, ), ), - const TextSpan( - text: ' and all its users\' login info from this app.', + TextSpan( + text: S.of(context).accountRemoveServerAndUsersTail, ), ], ), @@ -189,7 +196,7 @@ class DeleteServerTile extends HookConsumerWidget { onPressed: () { Navigator.of(context).pop(); }, - child: const Text('Cancel'), + child: Text(S.of(context).cancel), ), TextButton( onPressed: () { @@ -203,7 +210,7 @@ class DeleteServerTile extends HookConsumerWidget { ); Navigator.of(context).pop(); }, - child: const Text('Delete'), + child: Text(S.of(context).delete), ), ], ); @@ -226,7 +233,7 @@ class AddUserTile extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { return ListTile( leading: const Icon(Icons.person_add), - title: const Text('Add User'), + title: Text(S.of(context).accountAddUser), onTap: () async { await showDialog( context: context, @@ -234,7 +241,9 @@ class AddUserTile extends HookConsumerWidget { builder: (dialogContext) { // Use a different context name to avoid conflicts return AlertDialog( - title: Text('Add User to ${server.serverUrl.host}'), + title: Text( + S.of(context).accountAddUserDialog(server.serverUrl.host), + ), // Make content scrollable in case of smaller screens/keyboard content: SingleChildScrollView( child: UserLoginWidget( @@ -247,7 +256,8 @@ class AddUserTile extends HookConsumerWidget { // Optional: Show a confirmation SnackBar ScaffoldMessenger.of(context).showSnackBar( SnackBar( - content: Text('User added successfully! Switch?'), + content: + Text(S.of(context).accountAddUserSuccessDialog), action: SnackBarAction( label: 'Switch', onPressed: () { @@ -270,7 +280,7 @@ class AddUserTile extends HookConsumerWidget { onPressed: () { Navigator.of(dialogContext).pop(); // Close the dialog }, - child: const Text('Cancel'), + child: Text(S.of(context).cancel), ), ], ); @@ -299,7 +309,7 @@ class AvailableUserTile extends HookConsumerWidget { leading: apiSettings.activeUser == user ? const Icon(Icons.person) : const Icon(Icons.person_off_outlined), - title: Text(user.username ?? 'Anonymous'), + title: Text(user.username ?? S.of(context).accountAnonymous), onTap: apiSettings.activeUser == user ? null : () { @@ -323,22 +333,22 @@ class AvailableUserTile extends HookConsumerWidget { context: context, builder: (context) { return AlertDialog( - title: const Text('Remove User Login'), + title: Text(S.of(context).accountRemoveUserLogin), content: Text.rich( TextSpan( children: [ - const TextSpan( - text: 'This will remove login details of the user ', + TextSpan( + text: S.of(context).accountRemoveUserLoginHead, ), TextSpan( - text: user.username ?? 'Anonymous', + text: user.username ?? S.of(context).accountAnonymous, style: TextStyle( fontWeight: FontWeight.bold, color: Theme.of(context).colorScheme.primary, ), ), - const TextSpan( - text: ' from this app.', + TextSpan( + text: S.of(context).accountRemoveUserLoginTail, ), ], ), @@ -348,7 +358,7 @@ class AvailableUserTile extends HookConsumerWidget { onPressed: () { Navigator.of(context).pop(); }, - child: const Text('Cancel'), + child: Text(S.of(context).cancel), ), TextButton( onPressed: () { @@ -359,7 +369,7 @@ class AvailableUserTile extends HookConsumerWidget { .removeUser(user); Navigator.of(context).pop(); }, - child: const Text('Delete'), + child: Text(S.of(context).delete), ), ], ); diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 4188816..66cf0ca 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -20,21 +20,93 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'en'; - static String m0(item) => "Are you sure you want to delete ${item}?"; + static String m0(host) => "Add User to ${host}"; - static String m1(item) => "Deleted ${item}"; + static String m1(user) => "Users: ${user}"; - static String m2(error) => "Error loading libraries: ${error}"; + static String m2(item) => "Are you sure you want to delete ${item}?"; + + static String m3(item) => "Deleted ${item}"; + + static String m4(error) => "Error loading libraries: ${error}"; + + static String m5(second) => "${second} seconds"; final messages = _notInlinedMessages(_notInlinedMessages); static Map _notInlinedMessages(_) => { "account": MessageLookupByLibrary.simpleMessage("Account"), + "accountAddNewServer": MessageLookupByLibrary.simpleMessage( + "Add New Server", + ), + "accountAddUser": MessageLookupByLibrary.simpleMessage("Add User"), + "accountAddUserDialog": m0, + "accountAddUserSuccessDialog": MessageLookupByLibrary.simpleMessage( + "User added successfully! Switch?", + ), + "accountAddUserTooltip": MessageLookupByLibrary.simpleMessage( + "Add new server", + ), + "accountAnonymous": MessageLookupByLibrary.simpleMessage("Anonymous"), + "accountDeleteServer": MessageLookupByLibrary.simpleMessage( + "Delete Server", + ), + "accountInvalidURL": + MessageLookupByLibrary.simpleMessage("Invalid URL"), + "accountManage": + MessageLookupByLibrary.simpleMessage("Manage Accounts"), + "accountRegisteredServers": MessageLookupByLibrary.simpleMessage( + "Registered Servers", + ), + "accountRemoveServerAndUsers": MessageLookupByLibrary.simpleMessage( + "Remove Server and Users", + ), + "accountRemoveServerAndUsersHead": MessageLookupByLibrary.simpleMessage( + "This will remove the server ", + ), + "accountRemoveServerAndUsersTail": MessageLookupByLibrary.simpleMessage( + " and all its users\' login info from this app.", + ), + "accountRemoveUserLogin": MessageLookupByLibrary.simpleMessage( + "Remove User Login", + ), + "accountRemoveUserLoginHead": MessageLookupByLibrary.simpleMessage( + "This will remove login details of the user ", + ), + "accountRemoveUserLoginTail": MessageLookupByLibrary.simpleMessage( + " from this app.", + ), + "accountServerURI": MessageLookupByLibrary.simpleMessage("Server URI"), "accountSwitch": MessageLookupByLibrary.simpleMessage("Switch Account"), + "accountUsersCount": m1, "appSettings": MessageLookupByLibrary.simpleMessage("App Settings"), "appearance": MessageLookupByLibrary.simpleMessage("Appearance"), + "autoSleepTimerSettings": MessageLookupByLibrary.simpleMessage( + "Auto Sleep Timer Settings", + ), "autoTurnOnSleepTimer": MessageLookupByLibrary.simpleMessage( "Auto Turn On Sleep Timer", ), + "autoTurnOnTimer": MessageLookupByLibrary.simpleMessage( + "Auto Turn On Timer", + ), + "autoTurnOnTimerAlways": MessageLookupByLibrary.simpleMessage( + "Always Auto Turn On Timer", + ), + "autoTurnOnTimerAlwaysDescription": + MessageLookupByLibrary.simpleMessage( + "Always turn on the sleep timer, no matter what", + ), + "autoTurnOnTimerDescription": MessageLookupByLibrary.simpleMessage( + "Automatically turn on the sleep timer based on the time of day", + ), + "autoTurnOnTimerFrom": MessageLookupByLibrary.simpleMessage("From"), + "autoTurnOnTimerFromDescription": MessageLookupByLibrary.simpleMessage( + "Turn on the sleep timer at the specified time", + ), + "autoTurnOnTimerUntil": MessageLookupByLibrary.simpleMessage("Until"), + "autoTurnOnTimerUntilDescription": MessageLookupByLibrary.simpleMessage( + "Turn off the sleep timer at the specified time", + ), "automaticallyDescription": MessageLookupByLibrary.simpleMessage( "Automatically turn on the sleep timer based on the time of day", ), @@ -73,8 +145,8 @@ class MessageLookup extends MessageLookupByLibrary { "Settings copied to clipboard", ), "delete": MessageLookupByLibrary.simpleMessage("Delete"), - "deleteDialog": m0, - "deleted": m1, + "deleteDialog": m2, + "deleted": m3, "explore": MessageLookupByLibrary.simpleMessage("explore"), "exploreHint": MessageLookupByLibrary.simpleMessage( "Seek and you shall discover...", @@ -88,12 +160,23 @@ class MessageLookup extends MessageLookupByLibrary { "homeBookContinueListening": MessageLookupByLibrary.simpleMessage( "Continue Listening", ), + "homeBookContinueListeningDescription": + MessageLookupByLibrary.simpleMessage( + "Show play button for books in currently listening shelf", + ), "homeBookContinueSeries": MessageLookupByLibrary.simpleMessage( "Continue Series", ), + "homeBookContinueSeriesDescription": + MessageLookupByLibrary.simpleMessage( + "Show play button for books in continue series shelf", + ), "homeBookDiscover": MessageLookupByLibrary.simpleMessage("Discover"), "homeBookListenAgain": MessageLookupByLibrary.simpleMessage("Listen Again"), + "homeBookListenAgainDescription": MessageLookupByLibrary.simpleMessage( + "Show play button for all books in listen again shelf", + ), "homeBookNewestAuthors": MessageLookupByLibrary.simpleMessage( "Newest Authors", ), @@ -112,6 +195,16 @@ class MessageLookup extends MessageLookupByLibrary { "homePageSettingsDescription": MessageLookupByLibrary.simpleMessage( "Customize the home page", ), + "homePageSettingsOtherShelves": MessageLookupByLibrary.simpleMessage( + "Other shelves", + ), + "homePageSettingsOtherShelvesDescription": + MessageLookupByLibrary.simpleMessage( + "Show play button for all books in all remaining shelves", + ), + "homePageSettingsQuickPlay": MessageLookupByLibrary.simpleMessage( + "Quick Play", + ), "homeStartListening": MessageLookupByLibrary.simpleMessage( "Start Listening", ), @@ -124,7 +217,7 @@ class MessageLookup extends MessageLookupByLibrary { "libraryEmpty": MessageLookupByLibrary.simpleMessage( "No libraries available.", ), - "libraryLoadError": m2, + "libraryLoadError": m4, "librarySelect": MessageLookupByLibrary.simpleMessage("Select Library"), "librarySwitchTooltip": MessageLookupByLibrary.simpleMessage( "Switch Library", @@ -134,6 +227,40 @@ class MessageLookup extends MessageLookupByLibrary { ), "loading": MessageLookupByLibrary.simpleMessage("Loading..."), "logs": MessageLookupByLibrary.simpleMessage("Logs"), + "nmpSettingsBackward": MessageLookupByLibrary.simpleMessage( + "Backward Interval", + ), + "nmpSettingsForward": MessageLookupByLibrary.simpleMessage( + "Forward Interval", + ), + "nmpSettingsMediaControls": MessageLookupByLibrary.simpleMessage( + "Media Controls", + ), + "nmpSettingsMediaControlsDescription": + MessageLookupByLibrary.simpleMessage( + "Select the media controls to display", + ), + "nmpSettingsSelectOne": MessageLookupByLibrary.simpleMessage( + "Select a field below to insert it", + ), + "nmpSettingsShowChapterProgress": MessageLookupByLibrary.simpleMessage( + "Show Chapter Progress", + ), + "nmpSettingsShowChapterProgressDescription": + MessageLookupByLibrary.simpleMessage( + "Instead of the overall progress of the book", + ), + "nmpSettingsSubTitle": MessageLookupByLibrary.simpleMessage( + "Secondary Title", + ), + "nmpSettingsSubTitleDescription": MessageLookupByLibrary.simpleMessage( + "The subtitle of the notification\n", + ), + "nmpSettingsTitle": + MessageLookupByLibrary.simpleMessage("Primary Title"), + "nmpSettingsTitleDescription": MessageLookupByLibrary.simpleMessage( + "The title of the notification\n", + ), "no": MessageLookupByLibrary.simpleMessage("No"), "notImplemented": MessageLookupByLibrary.simpleMessage("Not implemented"), @@ -149,9 +276,41 @@ class MessageLookup extends MessageLookupByLibrary { "play": MessageLookupByLibrary.simpleMessage("Play"), "playerSettings": MessageLookupByLibrary.simpleMessage("Player Settings"), + "playerSettingsCompleteTime": MessageLookupByLibrary.simpleMessage( + "Mark Complete When Time Left", + ), + "playerSettingsCompleteTimeDescriptionHead": + MessageLookupByLibrary.simpleMessage( + "Mark complete when less than "), + "playerSettingsCompleteTimeDescriptionTail": + MessageLookupByLibrary.simpleMessage(" left in the book"), "playerSettingsDescription": MessageLookupByLibrary.simpleMessage( "Customize the player settings", ), + "playerSettingsDisplay": MessageLookupByLibrary.simpleMessage( + "Display Settings", + ), + "playerSettingsDisplayChapterProgress": + MessageLookupByLibrary.simpleMessage("Show Chapter Progress"), + "playerSettingsDisplayChapterProgressDescription": + MessageLookupByLibrary.simpleMessage( + "Show the progress of the current chapter in the player", + ), + "playerSettingsDisplayTotalProgress": + MessageLookupByLibrary.simpleMessage( + "Show Total Progress", + ), + "playerSettingsDisplayTotalProgressDescription": + MessageLookupByLibrary.simpleMessage( + "Show the total progress of the book in the player", + ), + "playerSettingsPlaybackInterval": MessageLookupByLibrary.simpleMessage( + "Playback Report Interval", + ), + "playerSettingsPlaybackIntervalDescriptionHead": + MessageLookupByLibrary.simpleMessage("Report progress every "), + "playerSettingsPlaybackIntervalDescriptionTail": + MessageLookupByLibrary.simpleMessage(" to the server"), "playerSettingsPlaybackReporting": MessageLookupByLibrary.simpleMessage( "Playback Reporting", ), @@ -175,12 +334,30 @@ class MessageLookup extends MessageLookupByLibrary { MessageLookupByLibrary.simpleMessage( "Settings like speed, loudness, etc. will be remembered for every book", ), + "playerSettingsSpeed": MessageLookupByLibrary.simpleMessage("Speed"), "playerSettingsSpeedDefault": MessageLookupByLibrary.simpleMessage( "Default Speed", ), "playerSettingsSpeedOptions": MessageLookupByLibrary.simpleMessage( "Speed Options", ), + "playerSettingsSpeedOptionsSelect": + MessageLookupByLibrary.simpleMessage( + "Select Speed Options", + ), + "playerSettingsSpeedOptionsSelectAdd": + MessageLookupByLibrary.simpleMessage( + "Add Speed Option", + ), + "playerSettingsSpeedOptionsSelectAddHelper": + MessageLookupByLibrary.simpleMessage( + "Enter a new speed option to add"), + "playerSettingsSpeedSelect": MessageLookupByLibrary.simpleMessage( + "Select Speed", + ), + "playerSettingsSpeedSelectHelper": MessageLookupByLibrary.simpleMessage( + "Enter the speed you want to set when playing for the first time", + ), "playlistsMine": MessageLookupByLibrary.simpleMessage("My Playlists"), "readLess": MessageLookupByLibrary.simpleMessage("Read Less"), "readMore": MessageLookupByLibrary.simpleMessage("Read More"), @@ -215,14 +392,86 @@ class MessageLookup extends MessageLookupByLibrary { "resume": MessageLookupByLibrary.simpleMessage("Resume"), "retry": MessageLookupByLibrary.simpleMessage("Retry"), "settings": MessageLookupByLibrary.simpleMessage("Settings"), + "shakeAction": MessageLookupByLibrary.simpleMessage("Shake Action"), + "shakeActionDescription": MessageLookupByLibrary.simpleMessage( + "The action to perform when a shake is detected", + ), + "shakeActivationThreshold": MessageLookupByLibrary.simpleMessage( + "Shake Activation Threshold", + ), + "shakeActivationThresholdDescription": + MessageLookupByLibrary.simpleMessage( + "The higher the threshold, the harder you need to shake", + ), "shakeDetector": MessageLookupByLibrary.simpleMessage("Shake Detector"), "shakeDetectorDescription": MessageLookupByLibrary.simpleMessage( "Customize the shake detector settings", ), + "shakeDetectorEnable": MessageLookupByLibrary.simpleMessage( + "Enable Shake Detection", + ), + "shakeDetectorEnableDescription": MessageLookupByLibrary.simpleMessage( + "Enable shake detection to do various actions", + ), + "shakeDetectorSettings": MessageLookupByLibrary.simpleMessage( + "Shake Detector Settings", + ), + "shakeFeedback": MessageLookupByLibrary.simpleMessage("Shake Feedback"), + "shakeFeedbackDescription": MessageLookupByLibrary.simpleMessage( + "The feedback to give when a shake is detected", + ), + "shakeSelectAction": MessageLookupByLibrary.simpleMessage( + "Select Shake Action", + ), + "shakeSelectActivationThreshold": MessageLookupByLibrary.simpleMessage( + "Select Shake Activation Threshold", + ), + "shakeSelectActivationThresholdHelper": + MessageLookupByLibrary.simpleMessage( + "Enter a number to set the threshold in m/s²", + ), + "shakeSelectFeedback": MessageLookupByLibrary.simpleMessage( + "Select Shake Feedback", + ), + "themeMode": MessageLookupByLibrary.simpleMessage("Theme Mode"), + "themeModeDark": MessageLookupByLibrary.simpleMessage("Dark"), + "themeModeHighContrast": MessageLookupByLibrary.simpleMessage( + "High Contrast Mode", + ), + "themeModeHighContrastDescription": + MessageLookupByLibrary.simpleMessage( + "Increase the contrast between the background and the text", + ), + "themeModeLight": MessageLookupByLibrary.simpleMessage("Light"), + "themeModeSystem": MessageLookupByLibrary.simpleMessage("System"), "themeSettings": MessageLookupByLibrary.simpleMessage("Theme Settings"), + "themeSettingsColors": MessageLookupByLibrary.simpleMessage( + "Material Theme from System", + ), + "themeSettingsColorsAndroid": MessageLookupByLibrary.simpleMessage( + "Use Material You", + ), + "themeSettingsColorsBook": MessageLookupByLibrary.simpleMessage( + "Adaptive Theme on Item Page", + ), + "themeSettingsColorsBookDescription": + MessageLookupByLibrary.simpleMessage( + "Get fancy with the colors on the item page at the cost of some performance", + ), + "themeSettingsColorsCurrent": MessageLookupByLibrary.simpleMessage( + "Adapt theme from currently playing item", + ), + "themeSettingsColorsCurrentDescription": + MessageLookupByLibrary.simpleMessage( + "Use the theme colors from the currently playing item for the app", + ), + "themeSettingsColorsDescription": MessageLookupByLibrary.simpleMessage( + "Use the system theme colors for the app", + ), "themeSettingsDescription": MessageLookupByLibrary.simpleMessage( "Customize the app theme", ), + "timeSecond": m5, "unknown": MessageLookupByLibrary.simpleMessage("Unknown"), "webVersion": MessageLookupByLibrary.simpleMessage("Web Version"), "yes": MessageLookupByLibrary.simpleMessage("Yes"), diff --git a/lib/generated/intl/messages_zh.dart b/lib/generated/intl/messages_zh.dart index 001a10f..490c891 100644 --- a/lib/generated/intl/messages_zh.dart +++ b/lib/generated/intl/messages_zh.dart @@ -20,20 +20,78 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'zh'; - static String m0(item) => "确定要删除 ${item} 吗?"; + static String m0(host) => "将用户添加到 ${host}"; - static String m1(item) => "已删除 ${item}"; + static String m1(user) => "用户数: ${user}"; - static String m2(error) => "加载库时出错:${error}"; + static String m2(item) => "确定要删除 ${item} 吗?"; + + static String m3(item) => "已删除 ${item}"; + + static String m4(error) => "加载库时出错:${error}"; + + static String m5(second) => "${second} 秒"; final messages = _notInlinedMessages(_notInlinedMessages); static Map _notInlinedMessages(_) => { "account": MessageLookupByLibrary.simpleMessage("账户"), + "accountAddNewServer": MessageLookupByLibrary.simpleMessage("添加新服务器"), + "accountAddUser": MessageLookupByLibrary.simpleMessage("添加用户"), + "accountAddUserDialog": m0, + "accountAddUserSuccessDialog": MessageLookupByLibrary.simpleMessage( + "用户添加成功!切换?", + ), + "accountAddUserTooltip": MessageLookupByLibrary.simpleMessage("添加新服务器"), + "accountAnonymous": MessageLookupByLibrary.simpleMessage("匿名"), + "accountDeleteServer": MessageLookupByLibrary.simpleMessage("删除服务器"), + "accountInvalidURL": MessageLookupByLibrary.simpleMessage("无效网址"), + "accountManage": MessageLookupByLibrary.simpleMessage("帐户管理"), + "accountRegisteredServers": + MessageLookupByLibrary.simpleMessage("已注册服务器"), + "accountRemoveServerAndUsers": MessageLookupByLibrary.simpleMessage( + "删除服务器和用户", + ), + "accountRemoveServerAndUsersHead": MessageLookupByLibrary.simpleMessage( + "这将删除服务器 ", + ), + "accountRemoveServerAndUsersTail": MessageLookupByLibrary.simpleMessage( + " 以及该应用程序中所有用户的登录信息。", + ), + "accountRemoveUserLogin": + MessageLookupByLibrary.simpleMessage("删除用户登录"), + "accountRemoveUserLoginHead": MessageLookupByLibrary.simpleMessage( + "这将删除用户 ", + ), + "accountRemoveUserLoginTail": MessageLookupByLibrary.simpleMessage( + " 的登录详细信息。", + ), + "accountServerURI": MessageLookupByLibrary.simpleMessage("服务器地址"), "accountSwitch": MessageLookupByLibrary.simpleMessage("切换账户"), + "accountUsersCount": m1, "appSettings": MessageLookupByLibrary.simpleMessage("应用设置"), "appearance": MessageLookupByLibrary.simpleMessage("外观"), + "autoSleepTimerSettings": + MessageLookupByLibrary.simpleMessage("自动睡眠定时器设置"), "autoTurnOnSleepTimer": MessageLookupByLibrary.simpleMessage("自动开启睡眠定时器"), + "autoTurnOnTimer": MessageLookupByLibrary.simpleMessage("自动开启定时器"), + "autoTurnOnTimerAlways": + MessageLookupByLibrary.simpleMessage("始终自动开启定时器"), + "autoTurnOnTimerAlwaysDescription": + MessageLookupByLibrary.simpleMessage( + "总是打开睡眠定时器", + ), + "autoTurnOnTimerDescription": MessageLookupByLibrary.simpleMessage( + "根据一天中的时间自动打开睡眠定时器", + ), + "autoTurnOnTimerFrom": MessageLookupByLibrary.simpleMessage("从"), + "autoTurnOnTimerFromDescription": MessageLookupByLibrary.simpleMessage( + "在指定时间打开睡眠定时器", + ), + "autoTurnOnTimerUntil": MessageLookupByLibrary.simpleMessage("直到"), + "autoTurnOnTimerUntilDescription": MessageLookupByLibrary.simpleMessage( + "在指定时间关闭睡眠定时器", + ), "automaticallyDescription": MessageLookupByLibrary.simpleMessage( "根据一天中的时间自动打开睡眠定时器", ), @@ -59,8 +117,8 @@ class MessageLookup extends MessageLookupByLibrary { "copyToClipboardToast": MessageLookupByLibrary.simpleMessage("设置已复制到剪贴板"), "delete": MessageLookupByLibrary.simpleMessage("删除"), - "deleteDialog": m0, - "deleted": m1, + "deleteDialog": m2, + "deleted": m3, "explore": MessageLookupByLibrary.simpleMessage("探索"), "exploreHint": MessageLookupByLibrary.simpleMessage("搜索与探索..."), "exploreTooltip": MessageLookupByLibrary.simpleMessage("搜索和探索"), @@ -69,9 +127,18 @@ class MessageLookup extends MessageLookupByLibrary { "home": MessageLookupByLibrary.simpleMessage("首页"), "homeBookContinueListening": MessageLookupByLibrary.simpleMessage("继续收听"), + "homeBookContinueListeningDescription": + MessageLookupByLibrary.simpleMessage("继续收听书架上显示播放按钮"), "homeBookContinueSeries": MessageLookupByLibrary.simpleMessage("继续系列"), + "homeBookContinueSeriesDescription": + MessageLookupByLibrary.simpleMessage( + "继续系列书架上显示播放按钮", + ), "homeBookDiscover": MessageLookupByLibrary.simpleMessage("发现"), "homeBookListenAgain": MessageLookupByLibrary.simpleMessage("再听一遍"), + "homeBookListenAgainDescription": MessageLookupByLibrary.simpleMessage( + "再听一遍书架上显示播放按钮", + ), "homeBookNewestAuthors": MessageLookupByLibrary.simpleMessage("最新作者"), "homeBookRecentlyAdded": MessageLookupByLibrary.simpleMessage("最近添加"), "homeBookRecommended": MessageLookupByLibrary.simpleMessage("推荐"), @@ -81,18 +148,49 @@ class MessageLookup extends MessageLookupByLibrary { "homePageSettingsDescription": MessageLookupByLibrary.simpleMessage( "自定义主页", ), + "homePageSettingsOtherShelves": MessageLookupByLibrary.simpleMessage( + "其他书架", + ), + "homePageSettingsOtherShelvesDescription": + MessageLookupByLibrary.simpleMessage("显示所有剩余书架上所有书籍的播放按钮"), + "homePageSettingsQuickPlay": + MessageLookupByLibrary.simpleMessage("继续播放"), "homeStartListening": MessageLookupByLibrary.simpleMessage("开始收听"), "language": MessageLookupByLibrary.simpleMessage("语言"), "languageDescription": MessageLookupByLibrary.simpleMessage("语言切换"), "library": MessageLookupByLibrary.simpleMessage("媒体库"), "libraryChange": MessageLookupByLibrary.simpleMessage("更改媒体库"), "libraryEmpty": MessageLookupByLibrary.simpleMessage("没有可用的库。"), - "libraryLoadError": m2, + "libraryLoadError": m4, "librarySelect": MessageLookupByLibrary.simpleMessage("选择媒体库"), "librarySwitchTooltip": MessageLookupByLibrary.simpleMessage("切换媒体库"), "libraryTooltip": MessageLookupByLibrary.simpleMessage("浏览您的媒体库"), "loading": MessageLookupByLibrary.simpleMessage("加载中..."), "logs": MessageLookupByLibrary.simpleMessage("日志"), + "nmpSettingsBackward": MessageLookupByLibrary.simpleMessage("快退间隔"), + "nmpSettingsForward": MessageLookupByLibrary.simpleMessage("快进间隔"), + "nmpSettingsMediaControls": + MessageLookupByLibrary.simpleMessage("媒体控制"), + "nmpSettingsMediaControlsDescription": + MessageLookupByLibrary.simpleMessage( + "选择要显示的媒体控件", + ), + "nmpSettingsSelectOne": MessageLookupByLibrary.simpleMessage( + "在下面选择一个字段进行插入", + ), + "nmpSettingsShowChapterProgress": MessageLookupByLibrary.simpleMessage( + "显示章节进度", + ), + "nmpSettingsShowChapterProgressDescription": + MessageLookupByLibrary.simpleMessage("而不是本书的整体进展"), + "nmpSettingsSubTitle": MessageLookupByLibrary.simpleMessage("副标题"), + "nmpSettingsSubTitleDescription": MessageLookupByLibrary.simpleMessage( + "通知的副标题\n", + ), + "nmpSettingsTitle": MessageLookupByLibrary.simpleMessage("主标题"), + "nmpSettingsTitleDescription": MessageLookupByLibrary.simpleMessage( + "通知的标题\n", + ), "no": MessageLookupByLibrary.simpleMessage("否"), "notImplemented": MessageLookupByLibrary.simpleMessage("未实现"), "notificationMediaPlayer": @@ -105,9 +203,34 @@ class MessageLookup extends MessageLookupByLibrary { "pause": MessageLookupByLibrary.simpleMessage("暂停"), "play": MessageLookupByLibrary.simpleMessage("播放"), "playerSettings": MessageLookupByLibrary.simpleMessage("播放器设置"), + "playerSettingsCompleteTime": MessageLookupByLibrary.simpleMessage( + "剩余时间标记完成", + ), + "playerSettingsCompleteTimeDescriptionHead": + MessageLookupByLibrary.simpleMessage("当书中剩余时间少于 "), + "playerSettingsCompleteTimeDescriptionTail": + MessageLookupByLibrary.simpleMessage(" 时,标记完成"), "playerSettingsDescription": MessageLookupByLibrary.simpleMessage( "自定义播放器设置", ), + "playerSettingsDisplay": MessageLookupByLibrary.simpleMessage("显示设置"), + "playerSettingsDisplayChapterProgress": + MessageLookupByLibrary.simpleMessage("显示章节进度"), + "playerSettingsDisplayChapterProgressDescription": + MessageLookupByLibrary.simpleMessage("在播放器中显示当前章节的进度"), + "playerSettingsDisplayTotalProgress": + MessageLookupByLibrary.simpleMessage( + "显示总进度", + ), + "playerSettingsDisplayTotalProgressDescription": + MessageLookupByLibrary.simpleMessage("在播放器中显示当前书籍的总进度"), + "playerSettingsPlaybackInterval": MessageLookupByLibrary.simpleMessage( + "播放报告间隔", + ), + "playerSettingsPlaybackIntervalDescriptionHead": + MessageLookupByLibrary.simpleMessage("每 "), + "playerSettingsPlaybackIntervalDescriptionTail": + MessageLookupByLibrary.simpleMessage(" 向服务器报告一次进度"), "playerSettingsPlaybackReporting": MessageLookupByLibrary.simpleMessage( "回放报告", ), @@ -125,12 +248,28 @@ class MessageLookup extends MessageLookupByLibrary { ), "playerSettingsRememberForEveryBookDescription": MessageLookupByLibrary.simpleMessage("每本书都会记住播放速度、音量等设置"), + "playerSettingsSpeed": MessageLookupByLibrary.simpleMessage("播放速度"), "playerSettingsSpeedDefault": MessageLookupByLibrary.simpleMessage( "默认播放速度", ), "playerSettingsSpeedOptions": MessageLookupByLibrary.simpleMessage( "播放速度选项", ), + "playerSettingsSpeedOptionsSelect": + MessageLookupByLibrary.simpleMessage( + "播放速度选项", + ), + "playerSettingsSpeedOptionsSelectAdd": + MessageLookupByLibrary.simpleMessage( + "添加一个速度选项", + ), + "playerSettingsSpeedOptionsSelectAddHelper": + MessageLookupByLibrary.simpleMessage("输入一个新的速度选项"), + "playerSettingsSpeedSelect": + MessageLookupByLibrary.simpleMessage("选择播放速度"), + "playerSettingsSpeedSelectHelper": MessageLookupByLibrary.simpleMessage( + "输入默认的播放速度", + ), "playlistsMine": MessageLookupByLibrary.simpleMessage("播放列表"), "readLess": MessageLookupByLibrary.simpleMessage("折叠"), "readMore": MessageLookupByLibrary.simpleMessage("展开"), @@ -155,13 +294,68 @@ class MessageLookup extends MessageLookupByLibrary { "resume": MessageLookupByLibrary.simpleMessage("继续"), "retry": MessageLookupByLibrary.simpleMessage("重试"), "settings": MessageLookupByLibrary.simpleMessage("设置"), + "shakeAction": MessageLookupByLibrary.simpleMessage("抖动操作"), + "shakeActionDescription": MessageLookupByLibrary.simpleMessage( + "检测到抖动时要执行的操作", + ), + "shakeActivationThreshold": + MessageLookupByLibrary.simpleMessage("抖动激活阈值"), + "shakeActivationThresholdDescription": + MessageLookupByLibrary.simpleMessage( + "门槛越高,你就越难摇晃", + ), "shakeDetector": MessageLookupByLibrary.simpleMessage("抖动检测器"), "shakeDetectorDescription": MessageLookupByLibrary.simpleMessage( "自定义抖动检测器设置", ), + "shakeDetectorEnable": MessageLookupByLibrary.simpleMessage("启用抖动检测"), + "shakeDetectorEnableDescription": MessageLookupByLibrary.simpleMessage( + "启用抖动检测以执行各种操作", + ), + "shakeDetectorSettings": + MessageLookupByLibrary.simpleMessage("抖动检测器设置"), + "shakeFeedback": MessageLookupByLibrary.simpleMessage("抖动反馈"), + "shakeFeedbackDescription": MessageLookupByLibrary.simpleMessage( + "检测到抖动时给出的反馈", + ), + "shakeSelectAction": MessageLookupByLibrary.simpleMessage("选择抖动动作"), + "shakeSelectActivationThreshold": MessageLookupByLibrary.simpleMessage( + "选择抖动激活阈值", + ), + "shakeSelectActivationThresholdHelper": + MessageLookupByLibrary.simpleMessage("输入一个数字以m/s²为单位设置阈值"), + "shakeSelectFeedback": MessageLookupByLibrary.simpleMessage("选择抖动反馈"), + "themeMode": MessageLookupByLibrary.simpleMessage("主题模式"), + "themeModeDark": MessageLookupByLibrary.simpleMessage("深色"), + "themeModeHighContrast": MessageLookupByLibrary.simpleMessage("高对比度模式"), + "themeModeHighContrastDescription": + MessageLookupByLibrary.simpleMessage( + "增加背景和文本之间的对比度", + ), + "themeModeLight": MessageLookupByLibrary.simpleMessage("浅色"), + "themeModeSystem": MessageLookupByLibrary.simpleMessage("跟随系统"), "themeSettings": MessageLookupByLibrary.simpleMessage("主题设置"), + "themeSettingsColors": MessageLookupByLibrary.simpleMessage("主题色"), + "themeSettingsColorsAndroid": + MessageLookupByLibrary.simpleMessage("主题色"), + "themeSettingsColorsBook": MessageLookupByLibrary.simpleMessage( + "书籍详情页自适应主题", + ), + "themeSettingsColorsBookDescription": + MessageLookupByLibrary.simpleMessage( + "以牺牲一些性能为代价,对书籍详情页的颜色进行美化", + ), + "themeSettingsColorsCurrent": MessageLookupByLibrary.simpleMessage( + "根据当前播放的书籍调整主题", + ), + "themeSettingsColorsCurrentDescription": + MessageLookupByLibrary.simpleMessage("使用当前播放书籍的主题颜色"), + "themeSettingsColorsDescription": MessageLookupByLibrary.simpleMessage( + "使用应用程序的系统主题色", + ), "themeSettingsDescription": MessageLookupByLibrary.simpleMessage("自定义应用主题"), + "timeSecond": m5, "unknown": MessageLookupByLibrary.simpleMessage("未知"), "webVersion": MessageLookupByLibrary.simpleMessage("Web版本"), "yes": MessageLookupByLibrary.simpleMessage("是"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 75d6ca9..7ea6d73 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -199,6 +199,16 @@ class S { ); } + /// `Show play button for books in currently listening shelf` + String get homeBookContinueListeningDescription { + return Intl.message( + 'Show play button for books in currently listening shelf', + name: 'homeBookContinueListeningDescription', + desc: '', + args: [], + ); + } + /// `Continue Series` String get homeBookContinueSeries { return Intl.message( @@ -209,6 +219,16 @@ class S { ); } + /// `Show play button for books in continue series shelf` + String get homeBookContinueSeriesDescription { + return Intl.message( + 'Show play button for books in continue series shelf', + name: 'homeBookContinueSeriesDescription', + desc: '', + args: [], + ); + } + /// `Recently Added` String get homeBookRecentlyAdded { return Intl.message( @@ -249,6 +269,16 @@ class S { ); } + /// `Show play button for all books in listen again shelf` + String get homeBookListenAgainDescription { + return Intl.message( + 'Show play button for all books in listen again shelf', + name: 'homeBookListenAgainDescription', + desc: '', + args: [], + ); + } + /// `Newest Authors` String get homeBookNewestAuthors { return Intl.message( @@ -484,6 +514,181 @@ class S { ); } + /// `Manage Accounts` + String get accountManage { + return Intl.message( + 'Manage Accounts', + name: 'accountManage', + desc: '', + args: [], + ); + } + + /// `Registered Servers` + String get accountRegisteredServers { + return Intl.message( + 'Registered Servers', + name: 'accountRegisteredServers', + desc: '', + args: [], + ); + } + + /// `Users: {user}` + String accountUsersCount(Object user) { + return Intl.message( + 'Users: $user', + name: 'accountUsersCount', + desc: '', + args: [user], + ); + } + + /// `Add New Server` + String get accountAddNewServer { + return Intl.message( + 'Add New Server', + name: 'accountAddNewServer', + desc: '', + args: [], + ); + } + + /// `Invalid URL` + String get accountInvalidURL { + return Intl.message( + 'Invalid URL', + name: 'accountInvalidURL', + desc: '', + args: [], + ); + } + + /// `Delete Server` + String get accountDeleteServer { + return Intl.message( + 'Delete Server', + name: 'accountDeleteServer', + desc: '', + args: [], + ); + } + + /// `Remove Server and Users` + String get accountRemoveServerAndUsers { + return Intl.message( + 'Remove Server and Users', + name: 'accountRemoveServerAndUsers', + desc: '', + args: [], + ); + } + + /// `This will remove the server ` + String get accountRemoveServerAndUsersHead { + return Intl.message( + 'This will remove the server ', + name: 'accountRemoveServerAndUsersHead', + desc: '', + args: [], + ); + } + + /// ` and all its users' login info from this app.` + String get accountRemoveServerAndUsersTail { + return Intl.message( + ' and all its users\' login info from this app.', + name: 'accountRemoveServerAndUsersTail', + desc: '', + args: [], + ); + } + + /// `Add User` + String get accountAddUser { + return Intl.message('Add User', name: 'accountAddUser', desc: '', args: []); + } + + /// `Add new server` + String get accountAddUserTooltip { + return Intl.message( + 'Add new server', + name: 'accountAddUserTooltip', + desc: '', + args: [], + ); + } + + /// `Add User to {host}` + String accountAddUserDialog(String host) { + return Intl.message( + 'Add User to $host', + name: 'accountAddUserDialog', + desc: '', + args: [host], + ); + } + + /// `User added successfully! Switch?` + String get accountAddUserSuccessDialog { + return Intl.message( + 'User added successfully! Switch?', + name: 'accountAddUserSuccessDialog', + desc: '', + args: [], + ); + } + + /// `Anonymous` + String get accountAnonymous { + return Intl.message( + 'Anonymous', + name: 'accountAnonymous', + desc: '', + args: [], + ); + } + + /// `Remove User Login` + String get accountRemoveUserLogin { + return Intl.message( + 'Remove User Login', + name: 'accountRemoveUserLogin', + desc: '', + args: [], + ); + } + + /// `This will remove login details of the user ` + String get accountRemoveUserLoginHead { + return Intl.message( + 'This will remove login details of the user ', + name: 'accountRemoveUserLoginHead', + desc: '', + args: [], + ); + } + + /// ` from this app.` + String get accountRemoveUserLoginTail { + return Intl.message( + ' from this app.', + name: 'accountRemoveUserLoginTail', + desc: '', + args: [], + ); + } + + /// `Server URI` + String get accountServerURI { + return Intl.message( + 'Server URI', + name: 'accountServerURI', + desc: '', + args: [], + ); + } + /// `My Playlists` String get playlistsMine { return Intl.message( @@ -499,6 +704,16 @@ class S { return Intl.message('Web Version', name: 'webVersion', desc: '', args: []); } + /// `{second} seconds` + String timeSecond(int second) { + return Intl.message( + '$second seconds', + name: 'timeSecond', + desc: '', + args: [second], + ); + } + /// `App Settings` String get appSettings { return Intl.message( @@ -589,6 +804,66 @@ class S { ); } + /// `Select Speed Options` + String get playerSettingsSpeedOptionsSelect { + return Intl.message( + 'Select Speed Options', + name: 'playerSettingsSpeedOptionsSelect', + desc: '', + args: [], + ); + } + + /// `Add Speed Option` + String get playerSettingsSpeedOptionsSelectAdd { + return Intl.message( + 'Add Speed Option', + name: 'playerSettingsSpeedOptionsSelectAdd', + desc: '', + args: [], + ); + } + + /// `Enter a new speed option to add` + String get playerSettingsSpeedOptionsSelectAddHelper { + return Intl.message( + 'Enter a new speed option to add', + name: 'playerSettingsSpeedOptionsSelectAddHelper', + desc: '', + args: [], + ); + } + + /// `Speed` + String get playerSettingsSpeed { + return Intl.message( + 'Speed', + name: 'playerSettingsSpeed', + desc: '', + args: [], + ); + } + + /// `Select Speed` + String get playerSettingsSpeedSelect { + return Intl.message( + 'Select Speed', + name: 'playerSettingsSpeedSelect', + desc: '', + args: [], + ); + } + + /// `Enter the speed you want to set when playing for the first time` + String get playerSettingsSpeedSelectHelper { + return Intl.message( + 'Enter the speed you want to set when playing for the first time', + name: 'playerSettingsSpeedSelectHelper', + desc: '', + args: [], + ); + } + /// `Playback Reporting` String get playerSettingsPlaybackReporting { return Intl.message( @@ -639,6 +914,116 @@ class S { ); } + /// `Mark Complete When Time Left` + String get playerSettingsCompleteTime { + return Intl.message( + 'Mark Complete When Time Left', + name: 'playerSettingsCompleteTime', + desc: '', + args: [], + ); + } + + /// `Mark complete when less than ` + String get playerSettingsCompleteTimeDescriptionHead { + return Intl.message( + 'Mark complete when less than ', + name: 'playerSettingsCompleteTimeDescriptionHead', + desc: '', + args: [], + ); + } + + /// ` left in the book` + String get playerSettingsCompleteTimeDescriptionTail { + return Intl.message( + ' left in the book', + name: 'playerSettingsCompleteTimeDescriptionTail', + desc: '', + args: [], + ); + } + + /// `Playback Report Interval` + String get playerSettingsPlaybackInterval { + return Intl.message( + 'Playback Report Interval', + name: 'playerSettingsPlaybackInterval', + desc: '', + args: [], + ); + } + + /// `Report progress every ` + String get playerSettingsPlaybackIntervalDescriptionHead { + return Intl.message( + 'Report progress every ', + name: 'playerSettingsPlaybackIntervalDescriptionHead', + desc: '', + args: [], + ); + } + + /// ` to the server` + String get playerSettingsPlaybackIntervalDescriptionTail { + return Intl.message( + ' to the server', + name: 'playerSettingsPlaybackIntervalDescriptionTail', + desc: '', + args: [], + ); + } + + /// `Display Settings` + String get playerSettingsDisplay { + return Intl.message( + 'Display Settings', + name: 'playerSettingsDisplay', + desc: '', + args: [], + ); + } + + /// `Show Total Progress` + String get playerSettingsDisplayTotalProgress { + return Intl.message( + 'Show Total Progress', + name: 'playerSettingsDisplayTotalProgress', + desc: '', + args: [], + ); + } + + /// `Show the total progress of the book in the player` + String get playerSettingsDisplayTotalProgressDescription { + return Intl.message( + 'Show the total progress of the book in the player', + name: 'playerSettingsDisplayTotalProgressDescription', + desc: '', + args: [], + ); + } + + /// `Show Chapter Progress` + String get playerSettingsDisplayChapterProgress { + return Intl.message( + 'Show Chapter Progress', + name: 'playerSettingsDisplayChapterProgress', + desc: '', + args: [], + ); + } + + /// `Show the progress of the current chapter in the player` + String get playerSettingsDisplayChapterProgressDescription { + return Intl.message( + 'Show the progress of the current chapter in the player', + name: 'playerSettingsDisplayChapterProgressDescription', + desc: '', + args: [], + ); + } + /// `Auto Turn On Sleep Timer` String get autoTurnOnSleepTimer { return Intl.message( @@ -659,6 +1044,96 @@ class S { ); } + /// `Auto Sleep Timer Settings` + String get autoSleepTimerSettings { + return Intl.message( + 'Auto Sleep Timer Settings', + name: 'autoSleepTimerSettings', + desc: '', + args: [], + ); + } + + /// `Auto Turn On Timer` + String get autoTurnOnTimer { + return Intl.message( + 'Auto Turn On Timer', + name: 'autoTurnOnTimer', + desc: '', + args: [], + ); + } + + /// `Automatically turn on the sleep timer based on the time of day` + String get autoTurnOnTimerDescription { + return Intl.message( + 'Automatically turn on the sleep timer based on the time of day', + name: 'autoTurnOnTimerDescription', + desc: '', + args: [], + ); + } + + /// `From` + String get autoTurnOnTimerFrom { + return Intl.message( + 'From', + name: 'autoTurnOnTimerFrom', + desc: '', + args: [], + ); + } + + /// `Turn on the sleep timer at the specified time` + String get autoTurnOnTimerFromDescription { + return Intl.message( + 'Turn on the sleep timer at the specified time', + name: 'autoTurnOnTimerFromDescription', + desc: '', + args: [], + ); + } + + /// `Until` + String get autoTurnOnTimerUntil { + return Intl.message( + 'Until', + name: 'autoTurnOnTimerUntil', + desc: '', + args: [], + ); + } + + /// `Turn off the sleep timer at the specified time` + String get autoTurnOnTimerUntilDescription { + return Intl.message( + 'Turn off the sleep timer at the specified time', + name: 'autoTurnOnTimerUntilDescription', + desc: '', + args: [], + ); + } + + /// `Always Auto Turn On Timer` + String get autoTurnOnTimerAlways { + return Intl.message( + 'Always Auto Turn On Timer', + name: 'autoTurnOnTimerAlways', + desc: '', + args: [], + ); + } + + /// `Always turn on the sleep timer, no matter what` + String get autoTurnOnTimerAlwaysDescription { + return Intl.message( + 'Always turn on the sleep timer, no matter what', + name: 'autoTurnOnTimerAlwaysDescription', + desc: '', + args: [], + ); + } + /// `Shake Detector` String get shakeDetector { return Intl.message( @@ -679,6 +1154,136 @@ class S { ); } + /// `Shake Detector Settings` + String get shakeDetectorSettings { + return Intl.message( + 'Shake Detector Settings', + name: 'shakeDetectorSettings', + desc: '', + args: [], + ); + } + + /// `Enable Shake Detection` + String get shakeDetectorEnable { + return Intl.message( + 'Enable Shake Detection', + name: 'shakeDetectorEnable', + desc: '', + args: [], + ); + } + + /// `Enable shake detection to do various actions` + String get shakeDetectorEnableDescription { + return Intl.message( + 'Enable shake detection to do various actions', + name: 'shakeDetectorEnableDescription', + desc: '', + args: [], + ); + } + + /// `Shake Activation Threshold` + String get shakeActivationThreshold { + return Intl.message( + 'Shake Activation Threshold', + name: 'shakeActivationThreshold', + desc: '', + args: [], + ); + } + + /// `The higher the threshold, the harder you need to shake` + String get shakeActivationThresholdDescription { + return Intl.message( + 'The higher the threshold, the harder you need to shake', + name: 'shakeActivationThresholdDescription', + desc: '', + args: [], + ); + } + + /// `Select Shake Feedback` + String get shakeSelectFeedback { + return Intl.message( + 'Select Shake Feedback', + name: 'shakeSelectFeedback', + desc: '', + args: [], + ); + } + + /// `Select Shake Action` + String get shakeSelectAction { + return Intl.message( + 'Select Shake Action', + name: 'shakeSelectAction', + desc: '', + args: [], + ); + } + + /// `Select Shake Activation Threshold` + String get shakeSelectActivationThreshold { + return Intl.message( + 'Select Shake Activation Threshold', + name: 'shakeSelectActivationThreshold', + desc: '', + args: [], + ); + } + + /// `Enter a number to set the threshold in m/s²` + String get shakeSelectActivationThresholdHelper { + return Intl.message( + 'Enter a number to set the threshold in m/s²', + name: 'shakeSelectActivationThresholdHelper', + desc: '', + args: [], + ); + } + + /// `Shake Action` + String get shakeAction { + return Intl.message( + 'Shake Action', + name: 'shakeAction', + desc: '', + args: [], + ); + } + + /// `The action to perform when a shake is detected` + String get shakeActionDescription { + return Intl.message( + 'The action to perform when a shake is detected', + name: 'shakeActionDescription', + desc: '', + args: [], + ); + } + + /// `Shake Feedback` + String get shakeFeedback { + return Intl.message( + 'Shake Feedback', + name: 'shakeFeedback', + desc: '', + args: [], + ); + } + + /// `The feedback to give when a shake is detected` + String get shakeFeedbackDescription { + return Intl.message( + 'The feedback to give when a shake is detected', + name: 'shakeFeedbackDescription', + desc: '', + args: [], + ); + } + /// `Appearance` String get appearance { return Intl.message('Appearance', name: 'appearance', desc: '', args: []); @@ -704,6 +1309,116 @@ class S { ); } + /// `Theme Mode` + String get themeMode { + return Intl.message('Theme Mode', name: 'themeMode', desc: '', args: []); + } + + /// `Light` + String get themeModeLight { + return Intl.message('Light', name: 'themeModeLight', desc: '', args: []); + } + + /// `System` + String get themeModeSystem { + return Intl.message('System', name: 'themeModeSystem', desc: '', args: []); + } + + /// `Dark` + String get themeModeDark { + return Intl.message('Dark', name: 'themeModeDark', desc: '', args: []); + } + + /// `High Contrast Mode` + String get themeModeHighContrast { + return Intl.message( + 'High Contrast Mode', + name: 'themeModeHighContrast', + desc: '', + args: [], + ); + } + + /// `Increase the contrast between the background and the text` + String get themeModeHighContrastDescription { + return Intl.message( + 'Increase the contrast between the background and the text', + name: 'themeModeHighContrastDescription', + desc: '', + args: [], + ); + } + + /// `Use Material You` + String get themeSettingsColorsAndroid { + return Intl.message( + 'Use Material You', + name: 'themeSettingsColorsAndroid', + desc: '', + args: [], + ); + } + + /// `Material Theme from System` + String get themeSettingsColors { + return Intl.message( + 'Material Theme from System', + name: 'themeSettingsColors', + desc: '', + args: [], + ); + } + + /// `Use the system theme colors for the app` + String get themeSettingsColorsDescription { + return Intl.message( + 'Use the system theme colors for the app', + name: 'themeSettingsColorsDescription', + desc: '', + args: [], + ); + } + + /// `Adapt theme from currently playing item` + String get themeSettingsColorsCurrent { + return Intl.message( + 'Adapt theme from currently playing item', + name: 'themeSettingsColorsCurrent', + desc: '', + args: [], + ); + } + + /// `Use the theme colors from the currently playing item for the app` + String get themeSettingsColorsCurrentDescription { + return Intl.message( + 'Use the theme colors from the currently playing item for the app', + name: 'themeSettingsColorsCurrentDescription', + desc: '', + args: [], + ); + } + + /// `Adaptive Theme on Item Page` + String get themeSettingsColorsBook { + return Intl.message( + 'Adaptive Theme on Item Page', + name: 'themeSettingsColorsBook', + desc: '', + args: [], + ); + } + + /// `Get fancy with the colors on the item page at the cost of some performance` + String get themeSettingsColorsBookDescription { + return Intl.message( + 'Get fancy with the colors on the item page at the cost of some performance', + name: 'themeSettingsColorsBookDescription', + desc: '', + args: [], + ); + } + /// `Notification Media Player` String get notificationMediaPlayer { return Intl.message( @@ -724,6 +1439,116 @@ class S { ); } + /// `Primary Title` + String get nmpSettingsTitle { + return Intl.message( + 'Primary Title', + name: 'nmpSettingsTitle', + desc: '', + args: [], + ); + } + + /// `The title of the notification\n` + String get nmpSettingsTitleDescription { + return Intl.message( + 'The title of the notification\n', + name: 'nmpSettingsTitleDescription', + desc: '', + args: [], + ); + } + + /// `Secondary Title` + String get nmpSettingsSubTitle { + return Intl.message( + 'Secondary Title', + name: 'nmpSettingsSubTitle', + desc: '', + args: [], + ); + } + + /// `The subtitle of the notification\n` + String get nmpSettingsSubTitleDescription { + return Intl.message( + 'The subtitle of the notification\n', + name: 'nmpSettingsSubTitleDescription', + desc: '', + args: [], + ); + } + + /// `Forward Interval` + String get nmpSettingsForward { + return Intl.message( + 'Forward Interval', + name: 'nmpSettingsForward', + desc: '', + args: [], + ); + } + + /// `Backward Interval` + String get nmpSettingsBackward { + return Intl.message( + 'Backward Interval', + name: 'nmpSettingsBackward', + desc: '', + args: [], + ); + } + + /// `Media Controls` + String get nmpSettingsMediaControls { + return Intl.message( + 'Media Controls', + name: 'nmpSettingsMediaControls', + desc: '', + args: [], + ); + } + + /// `Select the media controls to display` + String get nmpSettingsMediaControlsDescription { + return Intl.message( + 'Select the media controls to display', + name: 'nmpSettingsMediaControlsDescription', + desc: '', + args: [], + ); + } + + /// `Show Chapter Progress` + String get nmpSettingsShowChapterProgress { + return Intl.message( + 'Show Chapter Progress', + name: 'nmpSettingsShowChapterProgress', + desc: '', + args: [], + ); + } + + /// `Instead of the overall progress of the book` + String get nmpSettingsShowChapterProgressDescription { + return Intl.message( + 'Instead of the overall progress of the book', + name: 'nmpSettingsShowChapterProgressDescription', + desc: '', + args: [], + ); + } + + /// `Select a field below to insert it` + String get nmpSettingsSelectOne { + return Intl.message( + 'Select a field below to insert it', + name: 'nmpSettingsSelectOne', + desc: '', + args: [], + ); + } + /// `Home Page Settings` String get homePageSettings { return Intl.message( @@ -744,6 +1569,36 @@ class S { ); } + /// `Quick Play` + String get homePageSettingsQuickPlay { + return Intl.message( + 'Quick Play', + name: 'homePageSettingsQuickPlay', + desc: '', + args: [], + ); + } + + /// `Other shelves` + String get homePageSettingsOtherShelves { + return Intl.message( + 'Other shelves', + name: 'homePageSettingsOtherShelves', + desc: '', + args: [], + ); + } + + /// `Show play button for all books in all remaining shelves` + String get homePageSettingsOtherShelvesDescription { + return Intl.message( + 'Show play button for all books in all remaining shelves', + name: 'homePageSettingsOtherShelvesDescription', + desc: '', + args: [], + ); + } + /// `Backup and Restore` String get backupAndRestore { return Intl.message( diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 9d10a8d..4a112bd 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -41,11 +41,14 @@ "homeContinueListening": "Continue Listening", "homeStartListening": "Start Listening", "homeBookContinueListening": "Continue Listening", + "homeBookContinueListeningDescription": "Show play button for books in currently listening shelf", "homeBookContinueSeries": "Continue Series", + "homeBookContinueSeriesDescription": "Show play button for books in continue series shelf", "homeBookRecentlyAdded": "Recently Added", "homeBookRecommended": "Recommended", "homeBookDiscover": "Discover", "homeBookListenAgain": "Listen Again", + "homeBookListenAgainDescription": "Show play button for all books in listen again shelf", "homeBookNewestAuthors": "Newest Authors", "bookAbout": "About the Book", "bookAboutDefault": "Sorry, no description found", @@ -83,9 +86,49 @@ "settings": "Settings", "account": "Account", "accountSwitch": "Switch Account", + "accountManage": "Manage Accounts", + "accountRegisteredServers": "Registered Servers", + "accountUsersCount": "Users: {user}", + "@accountUsers": { + "placeholders": { + "user": { + "type": "int" + } + } + }, + "accountAddNewServer": "Add New Server", + "accountInvalidURL": "Invalid URL", + "accountDeleteServer": "Delete Server", + "accountRemoveServerAndUsers": "Remove Server and Users", + "accountRemoveServerAndUsersHead": "This will remove the server ", + "accountRemoveServerAndUsersTail": " and all its users' login info from this app.", + "accountAddUser": "Add User", + "accountAddUserTooltip": "Add new server", + "accountAddUserDialog": "Add User to {host}", + "@accountAddUserDialog": { + "placeholders": { + "host": { + "type": "String" + } + } + }, + "accountAddUserSuccessDialog": "User added successfully! Switch?", + "accountAnonymous": "Anonymous", + "accountRemoveUserLogin": "Remove User Login", + "accountRemoveUserLoginHead": "This will remove login details of the user ", + "accountRemoveUserLoginTail": " from this app.", + "accountServerURI": "Server URI", "playlistsMine": "My Playlists", "webVersion": "Web Version", + "timeSecond": "{second} seconds", + "@timeSecond": { + "placeholders": { + "second": { + "type": "int" + } + } + }, "appSettings": "App Settings", "general": "General", "language": "Language", @@ -96,22 +139,88 @@ "playerSettingsRememberForEveryBookDescription": "Settings like speed, loudness, etc. will be remembered for every book", "playerSettingsSpeedDefault": "Default Speed", "playerSettingsSpeedOptions": "Speed Options", + "playerSettingsSpeedOptionsSelect": "Select Speed Options", + "playerSettingsSpeedOptionsSelectAdd": "Add Speed Option", + "playerSettingsSpeedOptionsSelectAddHelper": "Enter a new speed option to add", + "playerSettingsSpeed": "Speed", + "playerSettingsSpeedSelect": "Select Speed", + "playerSettingsSpeedSelectHelper": "Enter the speed you want to set when playing for the first time", "playerSettingsPlaybackReporting": "Playback Reporting", "playerSettingsPlaybackReportingMinimum": "Minimum Position to Report", "playerSettingsPlaybackReportingMinimumDescriptionHead": "Do not report playback for the first ", "playerSettingsPlaybackReportingMinimumDescriptionTail": "of the book", "playerSettingsPlaybackReportingIgnore": "Ignore Playback Position Less Than", + "playerSettingsCompleteTime": "Mark Complete When Time Left", + "playerSettingsCompleteTimeDescriptionHead": "Mark complete when less than ", + "playerSettingsCompleteTimeDescriptionTail": " left in the book", + "playerSettingsPlaybackInterval": "Playback Report Interval", + "playerSettingsPlaybackIntervalDescriptionHead": "Report progress every ", + "playerSettingsPlaybackIntervalDescriptionTail": " to the server", + "playerSettingsDisplay": "Display Settings", + "playerSettingsDisplayTotalProgress": "Show Total Progress", + "playerSettingsDisplayTotalProgressDescription": "Show the total progress of the book in the player", + "playerSettingsDisplayChapterProgress": "Show Chapter Progress", + "playerSettingsDisplayChapterProgressDescription": "Show the progress of the current chapter in the player", "autoTurnOnSleepTimer": "Auto Turn On Sleep Timer", "automaticallyDescription": "Automatically turn on the sleep timer based on the time of day", + "autoSleepTimerSettings": "Auto Sleep Timer Settings", + "autoTurnOnTimer": "Auto Turn On Timer", + "autoTurnOnTimerDescription": "Automatically turn on the sleep timer based on the time of day", + "autoTurnOnTimerFrom": "From", + "autoTurnOnTimerFromDescription": "Turn on the sleep timer at the specified time", + "autoTurnOnTimerUntil": "Until", + "autoTurnOnTimerUntilDescription": "Turn off the sleep timer at the specified time", + "autoTurnOnTimerAlways": "Always Auto Turn On Timer", + "autoTurnOnTimerAlwaysDescription": "Always turn on the sleep timer, no matter what", "shakeDetector": "Shake Detector", "shakeDetectorDescription": "Customize the shake detector settings", + "shakeDetectorSettings": "Shake Detector Settings", + "shakeDetectorEnable": "Enable Shake Detection", + "shakeDetectorEnableDescription": "Enable shake detection to do various actions", + "shakeActivationThreshold": "Shake Activation Threshold", + "shakeActivationThresholdDescription": "The higher the threshold, the harder you need to shake", + "shakeSelectFeedback": "Select Shake Feedback", + "shakeSelectAction": "Select Shake Action", + "shakeSelectActivationThreshold": "Select Shake Activation Threshold", + "shakeSelectActivationThresholdHelper": "Enter a number to set the threshold in m/s²", + "shakeAction": "Shake Action", + "shakeActionDescription": "The action to perform when a shake is detected", + "shakeFeedback": "Shake Feedback", + "shakeFeedbackDescription": "The feedback to give when a shake is detected", "appearance": "Appearance", "themeSettings": "Theme Settings", "themeSettingsDescription": "Customize the app theme", + "themeMode": "Theme Mode", + "themeModeLight": "Light", + "themeModeSystem": "System", + "themeModeDark": "Dark", + "themeModeHighContrast": "High Contrast Mode", + "themeModeHighContrastDescription": "Increase the contrast between the background and the text", + "themeSettingsColorsAndroid": "Use Material You", + "themeSettingsColors": "Material Theme from System", + "themeSettingsColorsDescription": "Use the system theme colors for the app", + "themeSettingsColorsCurrent": "Adapt theme from currently playing item", + "themeSettingsColorsCurrentDescription": "Use the theme colors from the currently playing item for the app", + "themeSettingsColorsBook": "Adaptive Theme on Item Page", + "themeSettingsColorsBookDescription": "Get fancy with the colors on the item page at the cost of some performance", "notificationMediaPlayer": "Notification Media Player", "notificationMediaPlayerDescription": "Customize the media player in notifications", + "nmpSettingsTitle": "Primary Title", + "nmpSettingsTitleDescription": "The title of the notification\n", + "nmpSettingsSubTitle": "Secondary Title", + "nmpSettingsSubTitleDescription": "The subtitle of the notification\n", + "nmpSettingsForward": "Forward Interval", + "nmpSettingsBackward": "Backward Interval", + "nmpSettingsMediaControls": "Media Controls", + "nmpSettingsMediaControlsDescription": "Select the media controls to display", + "nmpSettingsShowChapterProgress": "Show Chapter Progress", + "nmpSettingsShowChapterProgressDescription": "Instead of the overall progress of the book", + "nmpSettingsSelectOne": "Select a field below to insert it", "homePageSettings": "Home Page Settings", "homePageSettingsDescription": "Customize the home page", + "homePageSettingsQuickPlay": "Quick Play", + "homePageSettingsOtherShelves": "Other shelves", + "homePageSettingsOtherShelvesDescription": "Show play button for all books in all remaining shelves", "backupAndRestore": "Backup and Restore", "copyToClipboard": "Copy to Clipboard", "copyToClipboardDescription": "Copy the app settings to the clipboard", @@ -129,9 +238,6 @@ "resetAppSettingsDescription": "Reset the app settings to the default values", "resetAppSettingsDialog": "Are you sure you want to reset the app settings?", - - - "logs": "Logs", "notImplemented": "Not implemented" } \ No newline at end of file diff --git a/lib/l10n/intl_zh.arb b/lib/l10n/intl_zh.arb index 3848819..9e52ade 100644 --- a/lib/l10n/intl_zh.arb +++ b/lib/l10n/intl_zh.arb @@ -41,11 +41,14 @@ "homeContinueListening": "继续收听", "homeStartListening": "开始收听", "homeBookContinueListening": "继续收听", + "homeBookContinueListeningDescription": "继续收听书架上显示播放按钮", "homeBookContinueSeries": "继续系列", + "homeBookContinueSeriesDescription": "继续系列书架上显示播放按钮", "homeBookRecentlyAdded": "最近添加", "homeBookRecommended": "推荐", "homeBookDiscover": "发现", "homeBookListenAgain": "再听一遍", + "homeBookListenAgainDescription": "再听一遍书架上显示播放按钮", "homeBookNewestAuthors": "最新作者", "bookAbout": "关于本书", "bookAboutDefault": "抱歉,找不到描述", @@ -83,9 +86,49 @@ "settings": "设置", "account": "账户", "accountSwitch": "切换账户", + "accountManage": "帐户管理", + "accountRegisteredServers": "已注册服务器", + "accountUsersCount": "用户数: {user}", + "@accountUsers": { + "placeholders": { + "user": { + "type": "int" + } + } + }, + "accountAddNewServer": "添加新服务器", + "accountInvalidURL": "无效网址", + "accountDeleteServer": "删除服务器", + "accountRemoveServerAndUsers": "删除服务器和用户", + "accountRemoveServerAndUsersHead": "这将删除服务器 ", + "accountRemoveServerAndUsersTail": " 以及该应用程序中所有用户的登录信息。", + "accountAddUser": "添加用户", + "accountAddUserTooltip": "添加新服务器", + "accountAddUserDialog": "将用户添加到 {host}", + "@accountAddUserDialog": { + "placeholders": { + "host": { + "type": "String" + } + } + }, + "accountAddUserSuccessDialog": "用户添加成功!切换?", + "accountAnonymous": "匿名", + "accountRemoveUserLogin": "删除用户登录", + "accountRemoveUserLoginHead": "这将删除用户 ", + "accountRemoveUserLoginTail": " 的登录详细信息。", + "accountServerURI": "服务器地址", "playlistsMine": "播放列表", "webVersion": "Web版本", + "timeSecond": "{second} 秒", + "@timeSecond": { + "placeholders": { + "second": { + "type": "int" + } + } + }, "appSettings": "应用设置", "general": "通用", "language": "语言", @@ -96,22 +139,88 @@ "playerSettingsRememberForEveryBookDescription": "每本书都会记住播放速度、音量等设置", "playerSettingsSpeedDefault": "默认播放速度", "playerSettingsSpeedOptions": "播放速度选项", + "playerSettingsSpeedOptionsSelect": "播放速度选项", + "playerSettingsSpeedOptionsSelectAdd": "添加一个速度选项", + "playerSettingsSpeedOptionsSelectAddHelper": "输入一个新的速度选项", + "playerSettingsSpeed": "播放速度", + "playerSettingsSpeedSelect": "选择播放速度", + "playerSettingsSpeedSelectHelper": "输入默认的播放速度", "playerSettingsPlaybackReporting": "回放报告", "playerSettingsPlaybackReportingMinimum": "回放报告最小位置", "playerSettingsPlaybackReportingMinimumDescriptionHead": "不要报告本书前 ", "playerSettingsPlaybackReportingMinimumDescriptionTail": " 的播放", "playerSettingsPlaybackReportingIgnore": "忽略播放位置小于", + "playerSettingsCompleteTime": "剩余时间标记完成", + "playerSettingsCompleteTimeDescriptionHead": "当书中剩余时间少于 ", + "playerSettingsCompleteTimeDescriptionTail": " 时,标记完成", + "playerSettingsPlaybackInterval": "播放报告间隔", + "playerSettingsPlaybackIntervalDescriptionHead": "每 ", + "playerSettingsPlaybackIntervalDescriptionTail": " 向服务器报告一次进度", + "playerSettingsDisplay": "显示设置", + "playerSettingsDisplayTotalProgress": "显示总进度", + "playerSettingsDisplayTotalProgressDescription": "在播放器中显示当前书籍的总进度", + "playerSettingsDisplayChapterProgress": "显示章节进度", + "playerSettingsDisplayChapterProgressDescription": "在播放器中显示当前章节的进度", "autoTurnOnSleepTimer": "自动开启睡眠定时器", "automaticallyDescription": "根据一天中的时间自动打开睡眠定时器", + "autoSleepTimerSettings": "自动睡眠定时器设置", + "autoTurnOnTimer": "自动开启定时器", + "autoTurnOnTimerDescription": "根据一天中的时间自动打开睡眠定时器", + "autoTurnOnTimerFrom": "从", + "autoTurnOnTimerFromDescription": "在指定时间打开睡眠定时器", + "autoTurnOnTimerUntil": "直到", + "autoTurnOnTimerUntilDescription": "在指定时间关闭睡眠定时器", + "autoTurnOnTimerAlways": "始终自动开启定时器", + "autoTurnOnTimerAlwaysDescription": "总是打开睡眠定时器", "shakeDetector": "抖动检测器", "shakeDetectorDescription": "自定义抖动检测器设置", + "shakeDetectorSettings": "抖动检测器设置", + "shakeDetectorEnable": "启用抖动检测", + "shakeDetectorEnableDescription": "启用抖动检测以执行各种操作", + "shakeActivationThreshold": "抖动激活阈值", + "shakeActivationThresholdDescription": "门槛越高,你就越难摇晃", + "shakeSelectFeedback": "选择抖动反馈", + "shakeSelectAction": "选择抖动动作", + "shakeSelectActivationThreshold": "选择抖动激活阈值", + "shakeSelectActivationThresholdHelper": "输入一个数字以m/s²为单位设置阈值", + "shakeAction": "抖动操作", + "shakeActionDescription": "检测到抖动时要执行的操作", + "shakeFeedback": "抖动反馈", + "shakeFeedbackDescription": "检测到抖动时给出的反馈", "appearance": "外观", "themeSettings": "主题设置", "themeSettingsDescription": "自定义应用主题", + "themeMode": "主题模式", + "themeModeLight": "浅色", + "themeModeSystem": "跟随系统", + "themeModeDark": "深色", + "themeModeHighContrast": "高对比度模式", + "themeModeHighContrastDescription": "增加背景和文本之间的对比度", + "themeSettingsColorsAndroid": "主题色", + "themeSettingsColors": "主题色", + "themeSettingsColorsDescription": "使用应用程序的系统主题色", + "themeSettingsColorsCurrent": "根据当前播放的书籍调整主题", + "themeSettingsColorsCurrentDescription": "使用当前播放书籍的主题颜色", + "themeSettingsColorsBook": "书籍详情页自适应主题", + "themeSettingsColorsBookDescription": "以牺牲一些性能为代价,对书籍详情页的颜色进行美化", "notificationMediaPlayer": "通知媒体播放器", "notificationMediaPlayerDescription": "在通知中自定义媒体播放器", + "nmpSettingsTitle": "主标题", + "nmpSettingsTitleDescription": "通知的标题\n", + "nmpSettingsSubTitle": "副标题", + "nmpSettingsSubTitleDescription": "通知的副标题\n", + "nmpSettingsForward": "快进间隔", + "nmpSettingsBackward": "快退间隔", + "nmpSettingsMediaControls": "媒体控制", + "nmpSettingsMediaControlsDescription": "选择要显示的媒体控件", + "nmpSettingsShowChapterProgress": "显示章节进度", + "nmpSettingsShowChapterProgressDescription": "而不是本书的整体进展", + "nmpSettingsSelectOne": "在下面选择一个字段进行插入", "homePageSettings": "主页设置", "homePageSettingsDescription": "自定义主页", + "homePageSettingsQuickPlay": "继续播放", + "homePageSettingsOtherShelves": "其他书架", + "homePageSettingsOtherShelvesDescription": "显示所有剩余书架上所有书籍的播放按钮", "backupAndRestore": "备份与恢复", "copyToClipboard": "复制到剪贴板", "copyToClipboardDescription": "将应用程序设置复制到剪贴板", diff --git a/lib/settings/view/auto_sleep_timer_settings_page.dart b/lib/settings/view/auto_sleep_timer_settings_page.dart index fe7d4b3..4eccb51 100644 --- a/lib/settings/view/auto_sleep_timer_settings_page.dart +++ b/lib/settings/view/auto_sleep_timer_settings_page.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:material_symbols_icons/symbols.dart'; +import 'package:vaani/generated/l10n.dart'; import 'package:vaani/settings/app_settings_provider.dart'; import 'package:vaani/settings/view/simple_settings_page.dart'; import 'package:vaani/shared/extensions/time_of_day.dart'; @@ -22,7 +23,7 @@ class AutoSleepTimerSettingsPage extends HookConsumerWidget { ? Theme.of(context).colorScheme.primary : Theme.of(context).disabledColor; return SimpleSettingsPage( - title: const Text('Auto Sleep Timer Settings'), + title: Text(S.of(context).autoSleepTimerSettings), sections: [ SettingsSection( margin: const EdgeInsetsDirectional.symmetric( @@ -32,9 +33,9 @@ class AutoSleepTimerSettingsPage extends HookConsumerWidget { tiles: [ SettingsTile.switchTile( // initialValue: sleepTimerSettings.autoTurnOnTimer, - title: const Text('Auto Turn On Timer'), - description: const Text( - 'Automatically turn on the sleep timer based on the time of day', + title: Text(S.of(context).autoTurnOnTimer), + description: Text( + S.of(context).autoTurnOnTimerDescription, ), leading: sleepTimerSettings.autoTurnOnTimer ? const Icon(Symbols.time_auto) @@ -52,9 +53,9 @@ class AutoSleepTimerSettingsPage extends HookConsumerWidget { SettingsTile.navigation( enabled: enabled, leading: const Icon(Symbols.timer_play), - title: const Text('From'), - description: const Text( - 'Turn on the sleep timer at the specified time', + title: Text(S.of(context).autoTurnOnTimerFrom), + description: Text( + S.of(context).autoTurnOnTimerFromDescription, ), onPressed: (context) async { // navigate to the time picker @@ -78,9 +79,9 @@ class AutoSleepTimerSettingsPage extends HookConsumerWidget { SettingsTile.navigation( enabled: enabled, leading: const Icon(Symbols.timer_pause), - title: const Text('Until'), - description: const Text( - 'Turn off the sleep timer at the specified time', + title: Text(S.of(context).autoTurnOnTimerUntil), + description: Text( + S.of(context).autoTurnOnTimerUntilDescription, ), onPressed: (context) async { // navigate to the time picker @@ -107,9 +108,9 @@ class AutoSleepTimerSettingsPage extends HookConsumerWidget { // switch tile for always auto turn on timer no matter what SettingsTile.switchTile( leading: const Icon(Symbols.all_inclusive), - title: const Text('Always Auto Turn On Timer'), - description: const Text( - 'Always turn on the sleep timer, no matter what', + title: Text(S.of(context).autoTurnOnTimerAlways), + description: Text( + S.of(context).autoTurnOnTimerAlwaysDescription, ), onToggle: (value) { ref.read(appSettingsProvider.notifier).update( diff --git a/lib/settings/view/home_page_settings_page.dart b/lib/settings/view/home_page_settings_page.dart index 327044d..f6f24be 100644 --- a/lib/settings/view/home_page_settings_page.dart +++ b/lib/settings/view/home_page_settings_page.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart'; +import 'package:vaani/generated/l10n.dart'; import 'package:vaani/settings/app_settings_provider.dart'; import 'package:vaani/settings/view/simple_settings_page.dart' show SimpleSettingsPage; @@ -14,10 +15,10 @@ class HomePageSettingsPage extends HookConsumerWidget { final appSettingsNotifier = ref.read(appSettingsProvider.notifier); return SimpleSettingsPage( - title: Text('Home Page Settings'), + title: Text(S.of(context).homePageSettings), sections: [ SettingsSection( - title: const Text('Quick Play'), + title: Text(S.of(context).homePageSettingsQuickPlay), margin: const EdgeInsetsDirectional.symmetric( horizontal: 16.0, vertical: 8.0, @@ -26,11 +27,10 @@ class HomePageSettingsPage extends HookConsumerWidget { SettingsTile.switchTile( initialValue: appSettings .homePageSettings.showPlayButtonOnContinueListeningShelf, - title: const Text('Continue Listening'), + title: Text(S.of(context).homeContinueListening), leading: const Icon(Icons.play_arrow), - description: const Text( - 'Show play button for books in currently listening shelf', - ), + description: + Text(S.of(context).homeBookContinueListeningDescription), onToggle: (value) { appSettingsNotifier.update( appSettings.copyWith( @@ -42,11 +42,10 @@ class HomePageSettingsPage extends HookConsumerWidget { }, ), SettingsTile.switchTile( - title: const Text('Continue Series'), + title: Text(S.of(context).homeBookContinueSeries), leading: const Icon(Icons.play_arrow), - description: const Text( - 'Show play button for books in continue series shelf', - ), + description: + Text(S.of(context).homeBookContinueSeriesDescription), initialValue: appSettings .homePageSettings.showPlayButtonOnContinueSeriesShelf, onToggle: (value) { @@ -60,11 +59,10 @@ class HomePageSettingsPage extends HookConsumerWidget { }, ), SettingsTile.switchTile( - title: const Text('Other shelves'), + title: Text(S.of(context).homePageSettingsOtherShelves), leading: const Icon(Icons.all_inclusive), - description: const Text( - 'Show play button for all books in all remaining shelves', - ), + description: + Text(S.of(context).homePageSettingsOtherShelvesDescription), initialValue: appSettings .homePageSettings.showPlayButtonOnAllRemainingShelves, onToggle: (value) { @@ -78,11 +76,9 @@ class HomePageSettingsPage extends HookConsumerWidget { }, ), SettingsTile.switchTile( - title: const Text('Listen Again'), + title: Text(S.of(context).homeBookListenAgain), leading: const Icon(Icons.replay), - description: const Text( - 'Show play button for all books in listen again shelf', - ), + description: Text(S.of(context).homeBookListenAgainDescription), initialValue: appSettings.homePageSettings.showPlayButtonOnListenAgainShelf, onToggle: (value) { diff --git a/lib/settings/view/notification_settings_page.dart b/lib/settings/view/notification_settings_page.dart index 140d21c..72dd566 100644 --- a/lib/settings/view/notification_settings_page.dart +++ b/lib/settings/view/notification_settings_page.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:vaani/generated/l10n.dart'; import 'package:vaani/settings/app_settings_provider.dart'; import 'package:vaani/settings/models/app_settings.dart'; import 'package:vaani/settings/view/buttons.dart'; @@ -19,7 +20,7 @@ class NotificationSettingsPage extends HookConsumerWidget { final notificationSettings = appSettings.notificationSettings; final primaryColor = Theme.of(context).colorScheme.primary; return SimpleSettingsPage( - title: const Text('Notification Settings'), + title: Text(S.of(context).notificationMediaPlayer), sections: [ SettingsSection( margin: const EdgeInsetsDirectional.only( @@ -31,10 +32,10 @@ class NotificationSettingsPage extends HookConsumerWidget { tiles: [ // set the primary and secondary titles SettingsTile( - title: const Text('Primary Title'), + title: Text(S.of(context).nmpSettingsTitle), description: Text.rich( TextSpan( - text: 'The title of the notification\n', + text: S.of(context).nmpSettingsTitleDescription, children: [ TextSpan( text: notificationSettings.primaryTitle, @@ -54,7 +55,7 @@ class NotificationSettingsPage extends HookConsumerWidget { builder: (context) { return NotificationTitlePicker( initialValue: notificationSettings.primaryTitle, - title: 'Primary Title', + title: S.of(context).nmpSettingsTitle, ); }, ); @@ -69,10 +70,10 @@ class NotificationSettingsPage extends HookConsumerWidget { ), SettingsTile( - title: const Text('Secondary Title'), + title: Text(S.of(context).nmpSettingsSubTitle), description: Text.rich( TextSpan( - text: 'The subtitle of the notification\n', + text: S.of(context).nmpSettingsSubTitleDescription, children: [ TextSpan( text: notificationSettings.secondaryTitle, @@ -92,7 +93,7 @@ class NotificationSettingsPage extends HookConsumerWidget { builder: (context) { return NotificationTitlePicker( initialValue: notificationSettings.secondaryTitle, - title: 'Secondary Title', + title: S.of(context).nmpSettingsSubTitle, ); }, ); @@ -108,11 +109,13 @@ class NotificationSettingsPage extends HookConsumerWidget { // set forward and backward intervals SettingsTile( - title: const Text('Forward Interval'), + title: Text(S.of(context).nmpSettingsForward), description: Row( children: [ Text( - '${notificationSettings.fastForwardInterval.inSeconds} seconds', + S.of(context).timeSecond( + notificationSettings.fastForwardInterval.inSeconds, + ), ), Expanded( child: TimeIntervalSlider( @@ -131,11 +134,13 @@ class NotificationSettingsPage extends HookConsumerWidget { leading: const Icon(Icons.fast_forward), ), SettingsTile( - title: const Text('Backward Interval'), + title: Text(S.of(context).nmpSettingsBackward), description: Row( children: [ Text( - '${notificationSettings.rewindInterval.inSeconds} seconds', + S.of(context).timeSecond( + notificationSettings.rewindInterval.inSeconds, + ), ), Expanded( child: TimeIntervalSlider( @@ -155,10 +160,11 @@ class NotificationSettingsPage extends HookConsumerWidget { ), // set the media controls SettingsTile( - title: const Text('Media Controls'), + title: Text(S.of(context).nmpSettingsMediaControls), leading: const Icon(Icons.control_camera), // description: const Text('Select the media controls to display'), - description: const Text('Select the media controls to display'), + description: + Text(S.of(context).nmpSettingsMediaControlsDescription), trailing: Wrap( spacing: 8.0, children: notificationSettings.mediaControls @@ -192,10 +198,10 @@ class NotificationSettingsPage extends HookConsumerWidget { // set the progress bar to show chapter progress SettingsTile.switchTile( - title: const Text('Show Chapter Progress'), + title: Text(S.of(context).nmpSettingsShowChapterProgress), leading: const Icon(Icons.book), description: - const Text('instead of the overall progress of the book'), + Text(S.of(context).nmpSettingsShowChapterProgressDescription), initialValue: notificationSettings.progressBarIsChapterProgress, onToggle: (value) { ref.read(appSettingsProvider.notifier).update( @@ -224,7 +230,7 @@ class MediaControlsPicker extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final selectedMediaControls = useState(selectedControls); return AlertDialog( - title: const Text('Media Controls'), + title: Text(S.of(context).nmpSettingsMediaControls), actions: [ const CancelButton(), OkButton( @@ -296,7 +302,7 @@ class TimeIntervalSlider extends HookConsumerWidget { min: min.inSeconds.toDouble(), max: max.inSeconds.toDouble(), divisions: ((max.inSeconds - min.inSeconds) ~/ step.inSeconds), - label: '${selectedInterval.value.inSeconds} seconds', + label: S.of(context).timeSecond(selectedInterval.value.inSeconds), onChanged: (value) { selectedInterval.value = Duration(seconds: value.toInt()); onChanged?.call(selectedInterval.value); @@ -345,7 +351,7 @@ class NotificationTitlePicker extends HookConsumerWidget { selectedTitle.value = value; }, decoration: InputDecoration( - helper: const Text('Select a field below to insert it'), + helper: Text(S.of(context).nmpSettingsSelectOne), suffix: IconButton( icon: const Icon(Icons.clear), onPressed: () { diff --git a/lib/settings/view/player_settings_page.dart b/lib/settings/view/player_settings_page.dart index 14b61bf..e09dc5b 100644 --- a/lib/settings/view/player_settings_page.dart +++ b/lib/settings/view/player_settings_page.dart @@ -150,10 +150,10 @@ class PlayerSettingsPage extends HookConsumerWidget { ), // when to mark complete SettingsTile( - title: const Text('Mark Complete When Time Left'), + title: Text(S.of(context).playerSettingsCompleteTime), description: Text.rich( TextSpan( - text: 'Mark complete when less than ', + text: S.of(context).playerSettingsCompleteTimeDescriptionHead, children: [ TextSpan( text: playerSettings @@ -163,7 +163,10 @@ class PlayerSettingsPage extends HookConsumerWidget { color: primaryColor, ), ), - const TextSpan(text: ' left in the book'), + TextSpan( + text: S + .of(context) + .playerSettingsCompleteTimeDescriptionTail), ], ), ), @@ -173,7 +176,7 @@ class PlayerSettingsPage extends HookConsumerWidget { context: context, builder: (context) { return TimeDurationSelector( - title: const Text('Mark Complete When Time Left'), + title: Text(S.of(context).playerSettingsCompleteTime), baseUnit: BaseUnit.second, initialValue: playerSettings.markCompleteWhenTimeLeft, ); @@ -190,10 +193,12 @@ class PlayerSettingsPage extends HookConsumerWidget { ), // playback report interval SettingsTile( - title: const Text('Playback Report Interval'), + title: Text(S.of(context).playerSettingsPlaybackInterval), description: Text.rich( TextSpan( - text: 'Report progress every ', + text: S + .of(context) + .playerSettingsPlaybackIntervalDescriptionHead, children: [ TextSpan( text: playerSettings @@ -203,7 +208,10 @@ class PlayerSettingsPage extends HookConsumerWidget { color: primaryColor, ), ), - const TextSpan(text: ' to the server'), + TextSpan( + text: S + .of(context) + .playerSettingsPlaybackIntervalDescriptionTail), ], ), ), @@ -213,7 +221,7 @@ class PlayerSettingsPage extends HookConsumerWidget { context: context, builder: (context) { return TimeDurationSelector( - title: const Text('Playback Report Interval'), + title: Text(S.of(context).playerSettingsPlaybackInterval), baseUnit: BaseUnit.second, initialValue: playerSettings.playbackReportInterval, ); @@ -232,14 +240,14 @@ class PlayerSettingsPage extends HookConsumerWidget { ), // Display Settings SettingsSection( - title: const Text('Display Settings'), + title: Text(S.of(context).playerSettingsDisplay), tiles: [ // show total progress SettingsTile.switchTile( - title: const Text('Show Total Progress'), + title: Text(S.of(context).playerSettingsDisplayTotalProgress), leading: const Icon(Icons.show_chart), - description: const Text( - 'Show the total progress of the book in the player', + description: Text( + S.of(context).playerSettingsDisplayTotalProgressDescription, ), initialValue: playerSettings.expandedPlayerSettings.showTotalProgress, @@ -252,10 +260,10 @@ class PlayerSettingsPage extends HookConsumerWidget { ), // show chapter progress SettingsTile.switchTile( - title: const Text('Show Chapter Progress'), + title: Text(S.of(context).playerSettingsDisplayChapterProgress), leading: const Icon(Icons.show_chart), - description: const Text( - 'Show the progress of the current chapter in the player', + description: Text( + S.of(context).playerSettingsDisplayChapterProgressDescription, ), initialValue: playerSettings.expandedPlayerSettings.showChapterProgress, @@ -326,7 +334,7 @@ class SpeedPicker extends HookConsumerWidget { useTextEditingController(text: initialValue.toString()); final speed = useState(initialValue); return AlertDialog( - title: const Text('Select Speed'), + title: Text(S.of(context).playerSettingsSpeedSelect), content: TextField( controller: speedController, onChanged: (value) => speed.value = double.tryParse(value), @@ -335,11 +343,9 @@ class SpeedPicker extends HookConsumerWidget { }, autofocus: true, keyboardType: TextInputType.number, - decoration: const InputDecoration( - labelText: 'Speed', - helper: Text( - 'Enter the speed you want to set when playing for the first time', - ), + decoration: InputDecoration( + labelText: S.of(context).playerSettingsSpeed, + helper: Text(S.of(context).playerSettingsSpeedSelectHelper), ), ), actions: [ @@ -368,7 +374,7 @@ class SpeedOptionsPicker extends HookConsumerWidget { final speedOptions = useState>(initialValue); final focusNode = useFocusNode(); return AlertDialog( - title: const Text('Select Speed Options'), + title: Text(S.of(context).playerSettingsSpeedOptionsSelect), content: Column( mainAxisSize: MainAxisSize.min, children: [ @@ -413,9 +419,10 @@ class SpeedOptionsPicker extends HookConsumerWidget { focusNode.requestFocus(); }, keyboardType: TextInputType.number, - decoration: const InputDecoration( - labelText: 'Add Speed Option', - helper: Text('Enter a new speed option to add'), + decoration: InputDecoration( + labelText: S.of(context).playerSettingsSpeedOptionsSelectAdd, + helper: + Text(S.of(context).playerSettingsSpeedOptionsSelectAddHelper), ), ), ], diff --git a/lib/settings/view/shake_detector_settings_page.dart b/lib/settings/view/shake_detector_settings_page.dart index 98c5b8d..32a54b9 100644 --- a/lib/settings/view/shake_detector_settings_page.dart +++ b/lib/settings/view/shake_detector_settings_page.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:vaani/generated/l10n.dart'; import 'package:vaani/settings/app_settings_provider.dart'; import 'package:vaani/settings/models/app_settings.dart'; import 'package:vaani/settings/view/buttons.dart'; @@ -23,7 +24,7 @@ class ShakeDetectorSettingsPage extends HookConsumerWidget { : Theme.of(context).disabledColor; return SimpleSettingsPage( - title: const Text('Shake Detector Settings'), + title: Text(S.of(context).shakeDetectorSettings), sections: [ SettingsSection( margin: const EdgeInsetsDirectional.symmetric( @@ -35,9 +36,9 @@ class ShakeDetectorSettingsPage extends HookConsumerWidget { leading: shakeDetectionSettings.isEnabled ? const Icon(Icons.vibration) : const Icon(Icons.not_interested), - title: const Text('Enable Shake Detection'), - description: const Text( - 'Enable shake detection to do various actions', + title: Text(S.of(context).shakeDetectorEnable), + description: Text( + S.of(context).shakeDetectorEnableDescription, ), initialValue: shakeDetectionSettings.isEnabled, onToggle: (value) { @@ -57,9 +58,9 @@ class ShakeDetectorSettingsPage extends HookConsumerWidget { SettingsTile( enabled: isShakeDetectionEnabled, leading: const Icon(Icons.flag_circle), - title: const Text('Shake Activation Threshold'), - description: const Text( - 'The higher the threshold, the harder you need to shake', + title: Text(S.of(context).shakeActivationThreshold), + description: Text( + S.of(context).shakeActivationThresholdDescription, ), trailing: Text( '${shakeDetectionSettings.threshold} m/s²', @@ -90,9 +91,9 @@ class ShakeDetectorSettingsPage extends HookConsumerWidget { SettingsTile( enabled: isShakeDetectionEnabled, leading: const Icon(Icons.directions_run), - title: const Text('Shake Action'), - description: const Text( - 'The action to perform when a shake is detected', + title: Text(S.of(context).shakeAction), + description: Text( + S.of(context).shakeActionDescription, ), trailing: Icon( shakeDetectionSettings.shakeAction.icon, @@ -120,9 +121,9 @@ class ShakeDetectorSettingsPage extends HookConsumerWidget { SettingsTile( enabled: isShakeDetectionEnabled, leading: const Icon(Icons.feedback), - title: const Text('Shake Feedback'), - description: const Text( - 'The feedback to give when a shake is detected', + title: Text(S.of(context).shakeFeedback), + description: Text( + S.of(context).shakeFeedbackDescription, ), trailing: shakeDetectionSettings.feedback.isEmpty ? Icon( @@ -177,7 +178,7 @@ class ShakeFeedbackSelector extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final feedback = useState(initialValue); return AlertDialog( - title: const Text('Select Shake Feedback'), + title: Text(S.of(context).shakeSelectFeedback), content: Wrap( spacing: 8.0, runSpacing: 8.0, @@ -225,7 +226,7 @@ class ShakeActionSelector extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final shakeAction = useState(initialValue); return AlertDialog( - title: const Text('Select Shake Action'), + title: Text(S.of(context).shakeSelectAction), content: Wrap( spacing: 8.0, runSpacing: 8.0, @@ -268,7 +269,7 @@ class ShakeForceSelector extends HookConsumerWidget { final shakeForce = useState(initialValue); final controller = useTextEditingController(text: initialValue.toString()); return AlertDialog( - title: const Text('Select Shake Activation Threshold'), + title: Text(S.of(context).shakeSelectActivationThreshold), content: Column( mainAxisSize: MainAxisSize.min, children: [ @@ -291,8 +292,8 @@ class ShakeForceSelector extends HookConsumerWidget { shakeForce.value = 0; }, ), - helper: const Text( - 'Enter a number to set the threshold in m/s²', + helper: Text( + S.of(context).shakeSelectActivationThresholdHelper, ), ), ), diff --git a/lib/settings/view/theme_settings_page.dart b/lib/settings/view/theme_settings_page.dart index 315e4fa..9ef1fc2 100644 --- a/lib/settings/view/theme_settings_page.dart +++ b/lib/settings/view/theme_settings_page.dart @@ -1,13 +1,11 @@ import 'dart:io'; import 'package:flutter/material.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:vaani/generated/l10n.dart'; import 'package:vaani/settings/app_settings_provider.dart'; -import 'package:vaani/settings/view/buttons.dart'; import 'package:vaani/settings/view/simple_settings_page.dart'; -import 'package:vaani/shared/extensions/enum.dart'; class ThemeSettingsPage extends HookConsumerWidget { const ThemeSettingsPage({ @@ -18,10 +16,10 @@ class ThemeSettingsPage extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final appSettings = ref.watch(appSettingsProvider); final themeSettings = appSettings.themeSettings; - final primaryColor = Theme.of(context).colorScheme.primary; + // final primaryColor = Theme.of(context).colorScheme.primary; return SimpleSettingsPage( - title: const Text('Theme Settings'), + title: Text(S.of(context).themeSettings), sections: [ SettingsSection( margin: const EdgeInsetsDirectional.symmetric( @@ -31,7 +29,7 @@ class ThemeSettingsPage extends HookConsumerWidget { tiles: [ // choose system , light or dark theme SettingsTile( - title: const Text('Theme Mode'), + title: Text(S.of(context).themeMode), description: SegmentedButton( expandedInsets: const EdgeInsets.only(top: 8.0), showSelectedIcon: true, @@ -48,17 +46,17 @@ class ThemeSettingsPage extends HookConsumerWidget { ButtonSegment( value: ThemeMode.light, icon: Icon(Icons.light_mode), - label: const Text('Light'), + label: Text(S.of(context).themeModeLight), ), ButtonSegment( value: ThemeMode.system, icon: Icon(Icons.auto_awesome), - label: const Text('System'), + label: Text(S.of(context).themeModeSystem), ), ButtonSegment( value: ThemeMode.dark, icon: Icon(Icons.dark_mode), - label: const Text('Dark'), + label: Text(S.of(context).themeModeDark), ), ], ), @@ -77,9 +75,9 @@ class ThemeSettingsPage extends HookConsumerWidget { ? const Icon(Icons.accessibility) : const Icon(Icons.accessibility_new_outlined), initialValue: themeSettings.highContrast, - title: const Text('High Contrast Mode'), - description: const Text( - 'Increase the contrast between the background and the text', + title: Text(S.of(context).themeModeHighContrast), + description: Text( + S.of(context).themeModeHighContrastDescription, ), onToggle: (value) { ref.read(appSettingsProvider.notifier).update( @@ -94,11 +92,9 @@ class ThemeSettingsPage extends HookConsumerWidget { SettingsTile.switchTile( initialValue: themeSettings.useMaterialThemeFromSystem, title: Platform.isAndroid - ? const Text('Use Material You') - : const Text('Material Theme from System'), - description: const Text( - 'Use the system theme colors for the app', - ), + ? Text(S.of(context).themeSettingsColorsAndroid) + : Text(S.of(context).themeSettingsColors), + description: Text(S.of(context).themeSettingsColorsDescription), leading: themeSettings.useMaterialThemeFromSystem ? const Icon(Icons.auto_awesome) : const Icon(Icons.auto_fix_off), @@ -156,10 +152,9 @@ class ThemeSettingsPage extends HookConsumerWidget { // use theme throughout the app when playing item SettingsTile.switchTile( initialValue: themeSettings.useCurrentPlayerThemeThroughoutApp, - title: const Text('Adapt theme from currently playing item'), - description: const Text( - 'Use the theme colors from the currently playing item for the app', - ), + title: Text(S.of(context).themeSettingsColorsCurrent), + description: + Text(S.of(context).themeSettingsColorsCurrentDescription), leading: themeSettings.useCurrentPlayerThemeThroughoutApp ? const Icon(Icons.auto_fix_high) : const Icon(Icons.auto_fix_off), @@ -174,10 +169,9 @@ class ThemeSettingsPage extends HookConsumerWidget { SettingsTile.switchTile( initialValue: themeSettings.useMaterialThemeOnItemPage, - title: const Text('Adaptive Theme on Item Page'), - description: const Text( - 'get fancy with the colors on the item page at the cost of some performance', - ), + title: Text(S.of(context).themeSettingsColorsBook), + description: + Text(S.of(context).themeSettingsColorsBookDescription), leading: themeSettings.useMaterialThemeOnItemPage ? const Icon(Icons.auto_fix_high) : const Icon(Icons.auto_fix_off), diff --git a/lib/shared/widgets/add_new_server.dart b/lib/shared/widgets/add_new_server.dart index 8c31fc1..16e2fc0 100644 --- a/lib/shared/widgets/add_new_server.dart +++ b/lib/shared/widgets/add_new_server.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:vaani/api/api_provider.dart'; +import 'package:vaani/generated/l10n.dart'; import 'package:vaani/main.dart'; final httpUrlRegExp = RegExp('https?://'); @@ -66,7 +67,7 @@ class AddNewServer extends HookConsumerWidget { } : null, decoration: InputDecoration( - labelText: 'Server URI', + labelText: S.of(context).accountServerURI, labelStyle: TextStyle( color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.8), ), @@ -82,7 +83,7 @@ class AddNewServer extends HookConsumerWidget { margin: const EdgeInsets.only(left: 8, right: 8), child: IconButton.filled( icon: const Icon(Icons.add), - tooltip: 'Add new server', + tooltip: S.of(context).accountAddUserTooltip, color: Theme.of(context).colorScheme.inversePrimary, focusColor: Theme.of(context).colorScheme.onSurface,