Skip to content
This repository was archived by the owner on Apr 3, 2025. It is now read-only.

Commit 5ce1279

Browse files
committed
feat(settings): replace all strings with localizable strings
1 parent 0f4ac9a commit 5ce1279

File tree

42 files changed

+384
-566
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+384
-566
lines changed

assets/localization/en.json

+56
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757
"lunasea.DownloadClient": "Download Client",
5858
"lunasea.Edge": "Edge",
5959
"lunasea.Error": "Error",
60+
"lunasea.EverySecond": "Every Second",
61+
"lunasea.EverySeconds": "Every {} Seconds",
6062
"lunasea.ExternalModules": "External Modules",
6163
"lunasea.Features": "Features",
6264
"lunasea.Fixes": "Fixes",
@@ -70,6 +72,7 @@
7072
"lunasea.IncorrectEncryptionKey": "Incorrect encryption key",
7173
"lunasea.Internal": "Internal",
7274
"lunasea.InvalidFileTypeSelected": "Invalid File Type Selected",
75+
"lunasea.Items": "{} Items",
7376
"lunasea.JustNow": "Just Now",
7477
"lunasea.Minutes": "{} Minutes",
7578
"lunasea.MinutesAgo": "{} Minutes Ago",
@@ -85,6 +88,7 @@
8588
"lunasea.OneDayAgo": "1 Day Ago",
8689
"lunasea.OneHour": "1 Hour",
8790
"lunasea.OneHourAgo": "1 Hour Ago",
91+
"lunasea.OneItem": "1 Item",
8892
"lunasea.OneMinute": "1 Minute",
8993
"lunasea.OneMinuteAgo": "1 Minute Ago",
9094
"lunasea.OneMonth": "1 Month",
@@ -113,6 +117,8 @@
113117
"lunasea.Settings": "Settings",
114118
"lunasea.Stable": "Stable",
115119
"lunasea.StartingView": "Starting View",
120+
"lunasea.ThankYou": "Thank You",
121+
"lunasea.ThankYouMessage": "Thank you for supporting the open-source community!",
116122
"lunasea.Today": "Today",
117123
"lunasea.TransactionFailure": "Transaction Failure",
118124
"lunasea.TryAgain": "Try Again",
@@ -181,6 +187,8 @@
181187
"radarr.DigitalRelease": "Digital Release",
182188
"radarr.DirectoryNotFound": "Directory Not Found",
183189
"radarr.Discover": "Discover",
190+
"radarr.DiscoverSuggestions": "Discover Suggestions",
191+
"radarr.DiscoverSuggestionsDescription": "Add Suggested Releases in Discover",
184192
"radarr.Disks": "Disks",
185193
"radarr.DownloadFailed": "Download Failed",
186194
"radarr.DownloadIgnored": "Download Ignored",
@@ -215,6 +223,7 @@
215223
"radarr.MoveFilesDescription": "Would you like to move the files?",
216224
"radarr.MoveFull": "Move Files",
217225
"radarr.Movie": "Movie",
226+
"radarr.MovieDetails": "Movie Details",
218227
"radarr.Movies": "Movies",
219228
"radarr.MovieFileDeleted": "Movie File Deleted",
220229
"radarr.MovieFileRenamed": "Movie File Renamed",
@@ -237,6 +246,7 @@
237246
"radarr.QualityProfile": "Quality Profile",
238247
"radarr.Queue": "Queue",
239248
"radarr.QueueDescription": "View Active & Queued Content",
249+
"radarr.QueueSize": "Queue Size",
240250
"radarr.Quick": "Quick",
241251
"radarr.RefreshMovie": "Refresh Movie",
242252
"radarr.Rejected": "Rejected",
@@ -306,25 +316,39 @@
306316
"sabnzbd.ShutdownSABnzbd": "Shutdown SABnzbd",
307317
"sabnzbd.StandbyPC": "Standby PC",
308318
"sabnzbd.Stop": "Stop",
319+
"search.AddIndexer": "Add Indexer",
309320
"search.Age": "Age",
310321
"search.AllSubcategories": "All Subcategories",
311322
"search.Alphabetical": "Alphabetical",
312323
"search.Category": "Category",
313324
"search.Categories": "Categories",
314325
"search.Comments": "Comments",
326+
"search.DeleteIndexer": "Delete Indexer",
315327
"search.Download": "Download",
316328
"search.Downloading": "Downloading…",
317329
"search.DownloadingNZBToDevice": "Downloading NZB to your device",
318330
"search.DownloadToDevice": "Download to Device",
331+
"search.EditIndexer": "Edit Indexer",
332+
"search.FailedToAddIndexer": "Failed to Add indexer",
319333
"search.FailedToDownloadNZB": "Failed to Download NZB",
320334
"search.FailedToSend": "Failed to Send",
335+
"search.HideAdultCategories": "Hide Adult Categories",
336+
"search.HideAdultCategoriesDescription": "Hide Adult Content",
337+
"search.IndexerAPIHost": "Indexer API Host",
338+
"search.IndexerAPIKey": "Indexer API Key",
339+
"search.IndexerAdded": "Indexer Added",
340+
"search.IndexerDeleted": "Indexer Deleted",
341+
"search.IndexerNotFound": "Indexer Not Found",
321342
"search.NoCategoriesFound": "No Categories Found",
343+
"search.NoIndexersFound": "No Indexers Found",
322344
"search.NoResultsFound": "No Results Found",
323345
"search.NoSubcategoriesFound": "No Subcategories Found",
324346
"search.Results": "Results",
325347
"search.Search": "Search",
326348
"search.SentNZBData": "Sent NZB Data",
327349
"search.SentTo": "Sent to {}",
350+
"search.ShowLinks": "Show Links",
351+
"search.ShowLinksDescription": "Show Download and Comments Links",
328352
"search.Size": "Size",
329353
"search.Subcategories": "Subcategories",
330354
"settings.Account": "Account",
@@ -343,6 +367,8 @@
343367
"settings.AddProfileDescription": "Add a New Profile",
344368
"settings.AddedProfile": "Added Profile",
345369
"settings.AllFieldsAreRequired": "All fields are required",
370+
"settings.AllLogs": "All Logs",
371+
"settings.AllLogsDescription": "View Logs of All Types",
346372
"settings.AmoledTheme": "AMOLED Theme",
347373
"settings.AmoledThemeBorders": "AMOLED Theme Borders",
348374
"settings.AmoledThemeBordersDescription": "Add Subtle Borders Across the UI",
@@ -381,9 +407,12 @@
381407
"settings.BuildChannels": "Build Channels",
382408
"settings.BuildChannelsDescription": "Learn About Additional Build Channels",
383409
"settings.CalendarSettings": "Calendar Settings",
410+
"settings.CalendarSettingsDescription": "Customize the Unified Calendar",
384411
"settings.ChangedProfile": "Changed Profile",
385412
"settings.Channel": "Channel",
413+
"settings.Class": "Class",
386414
"settings.CleanSlate": "Clean Slate",
415+
"settings.Clear": "Clear",
387416
"settings.ClearConfiguration": "Clear Configuration",
388417
"settings.ClearConfigurationHint1": "Are you sure you want to clear your configuration?",
389418
"settings.ClearConfigurationHint2": "You will be starting from a clean slate, please ensure you backup your current configuration first!",
@@ -404,6 +433,9 @@
404433
"settings.ConnectionDetails": "Connection Details",
405434
"settings.ConnectionDetailsDescription": "Connection Details for {}",
406435
"settings.ConnectionTestFailed": "Connection Test Failed",
436+
"settings.CopiedURLFor": "Copied URL for {}",
437+
"settings.CopiedDeviceURL": "Copied your device-based URL to the clipboard",
438+
"settings.CopiedUserURL": "Copied your user-based URL to the clipboard",
407439
"settings.CurrentPassword": "Current Password",
408440
"settings.Custom": "Custom…",
409441
"settings.CustomHeader": "Custom Header",
@@ -444,6 +476,7 @@
444476
"settings.DeleteModuleSuccess": "Module Deleted",
445477
"settings.DeleteProfile": "Delete Profile",
446478
"settings.DeleteProfileDescription": "Delete an Existing Profile",
479+
"settings.Device": "Device",
447480
"settings.DiscordDescription": "Request Features & Get Support",
448481
"settings.DismissBanners": "Dismiss Banners",
449482
"settings.DismissBannersHint1": "Are you sure you want to dismiss all tooltip banners?",
@@ -467,6 +500,10 @@
467500
"settings.EnableModule": "Enable {}",
468501
"settings.EnabledProfile": "Enabled Profile",
469502
"settings.EncryptionKey": "Encryption Key",
503+
"settings.Exception": "Exception",
504+
"settings.Export": "Export",
505+
"settings.ExportedLogs": "Exported Logs",
506+
"settings.ExportedLogsMessage": "Logs have been successfully exported",
470507
"settings.FailedToClearImageCache": "Failed to Clear Image Cache",
471508
"settings.FailedToClearImageCacheDescription": "The image cache could not be cleared",
472509
"settings.FailedToDeleteAccount": "Failed to Delete Account",
@@ -477,6 +514,8 @@
477514
"settings.FutureDays": "Future Days",
478515
"settings.General": "General",
479516
"settings.GeneralDescription": "Customize LunaSea",
517+
"settings.GettingStarted": "Getting Started",
518+
"settings.GettingStartedDescription": "Information & Setup Instructions",
480519
"settings.GitHubDescription": "View the Source Code",
481520
"settings.HeaderAdded": "Header Added",
482521
"settings.HeaderDeleted": "Header Deleted",
@@ -507,7 +546,10 @@
507546
"settings.Localization": "Localization",
508547
"settings.LocalizationDescription": "Customize to your Locale",
509548
"settings.Logs": "Logs",
549+
"settings.LogsCleared": "Logs Cleared",
550+
"settings.LogsClearedDescription": "All recorded logs have been cleared",
510551
"settings.LogsDescription": "View, Export, and Clear Logs",
552+
"settings.Method": "Method",
511553
"settings.MACAddress": "MAC Address",
512554
"settings.MACAddressHint1": "This is the MAC address of the machine that you want to wake up",
513555
"settings.MACAddressHint2": "MAC addresses contain six two-digit hexadecimal nibbles (an octet)",
@@ -520,12 +562,16 @@
520562
"settings.Network": "Network",
521563
"settings.NetworkDescription": "Customize Network Features",
522564
"settings.NewPassword": "New Password",
565+
"settings.NotAuthorized": "Not Authorized",
566+
"settings.NotAuthorizedMessage": "LunaSea is not authorized to show notifications. Please go to your device's settings to enable notifications.",
567+
"settings.NotAvailable": "Not Available",
523568
"settings.Notifications": "Notifications",
524569
"settings.NotificationsDescription": "Set up Webhooks for Push Notifications",
525570
"settings.NoAdditionalProfilesAdded": "No additional profiles have been added",
526571
"settings.NoBackupsFound": "No Backups Found",
527572
"settings.NoExternalModulesFound": "No External Modules Found",
528573
"settings.NoHeadersAdded": "No Headers Added",
574+
"settings.NoLogsFound": "No Logs Found",
529575
"settings.NoProfilesFound": "No Profiles Found",
530576
"settings.OpenDrawerOnBackAction": "Open Drawer on Back Action",
531577
"settings.OpenDrawerOnBackActionDescription": "Open the drawer instead of closing LunaSea",
@@ -596,6 +642,7 @@
596642
"settings.UpToDate": "Up To Date",
597643
"settings.Use24HourTime": "Use 24 Hour Time",
598644
"settings.Use24HourTimeDescription": "Show Timestamps in 24 Hour Style",
645+
"settings.User": "User",
599646
"settings.Username": "Username",
600647
"settings.UsernameValidation": "Username Required",
601648
"settings.Version": "Version",
@@ -738,6 +785,7 @@
738785
"sonarr.Queue": "Queue",
739786
"sonarr.Queued": "Queued",
740787
"sonarr.QueueDescription": "View Active & Queued Content",
788+
"sonarr.QueueSize": "Queue Size",
741789
"sonarr.Reason": "Reason",
742790
"sonarr.RefreshSeries": "Refresh Series",
743791
"sonarr.Rejected": "Rejected",
@@ -817,6 +865,7 @@
817865
"sonarr.WordScore": "Word Score",
818866
"tautulli.Activity": "Activity",
819867
"tautulli.ActivityDetails": "Activity Details",
868+
"tautulli.ActivityRefreshRate": "Activity Refresh Rate",
820869
"tautulli.Audio": "Audio",
821870
"tautulli.BackingUpConfiguration": "Backing Up Configuration…",
822871
"tautulli.BackingUpConfigurationDescription": "Backing up your configuration in the background",
@@ -831,6 +880,7 @@
831880
"tautulli.Converting": "Converting",
832881
"tautulli.Container": "Container",
833882
"tautulli.Copy": "Copy",
883+
"tautulli.DefaultTerminationMessage": "Default Termination Message",
834884
"tautulli.DeleteCache": "Delete Cache",
835885
"tautulli.DeleteImageCache": "Delete Image Cache",
836886
"tautulli.DeleteTemporarySessions": "Delete Temporary Sessions",
@@ -850,9 +900,12 @@
850900
"tautulli.Duration": "Duration",
851901
"tautulli.Episode": "Episode {}",
852902
"tautulli.ETA": "ETA",
903+
"tautulli.Graphs": "Graphs",
853904
"tautulli.History": "History",
854905
"tautulli.Library": "Library",
906+
"tautulli.LibraryDetails": "Library Details",
855907
"tautulli.Location": "Location",
908+
"tautulli.MediaDetails": "Media Details",
856909
"tautulli.Metadata": "Metadata",
857910
"tautulli.More": "More",
858911
"tautulli.None": "None",
@@ -867,6 +920,8 @@
867920
"tautulli.SessionsOne": "1 Session",
868921
"tautulli.SessionsMany": "{} Sessions",
869922
"tautulli.Speed": "Speed: {}x",
923+
"tautulli.Statistics": "Statistics",
924+
"tautulli.StatisticsItemCount": "Statistics Item Count",
870925
"tautulli.Stream": "Stream",
871926
"tautulli.Subtitle": "Subtitle",
872927
"tautulli.Terminate": "Terminate",
@@ -882,6 +937,7 @@
882937
"tautulli.Transcodes": "Transcodes",
883938
"tautulli.User": "User",
884939
"tautulli.Users": "Users",
940+
"tautulli.UserDetails": "User Details",
885941
"tautulli.Video": "Video",
886942
"tautulli.ViewWebGUI": "View Web GUI",
887943
"tautulli.Year": "Year",

lib/modules.dart

+17
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,23 @@ extension LunaModuleWebhookExtension on LunaModule {
436436
}
437437
}
438438

439+
String? get webhookDocs {
440+
switch (this) {
441+
case LunaModule.LIDARR:
442+
return 'https://docs.lunasea.app/lunasea/notifications/lidarr';
443+
case LunaModule.RADARR:
444+
return 'https://docs.lunasea.app/lunasea/notifications/radarr';
445+
case LunaModule.SONARR:
446+
return 'https://docs.lunasea.app/lunasea/notifications/sonarr';
447+
case LunaModule.OVERSEERR:
448+
return 'https://docs.lunasea.app/lunasea/notifications/overseerr';
449+
case LunaModule.TAUTULLI:
450+
return 'https://docs.lunasea.app/lunasea/notifications/tautulli';
451+
default:
452+
return null;
453+
}
454+
}
455+
439456
Future<void> handleWebhook(Map<String, dynamic> data) async {
440457
switch (this) {
441458
case LunaModule.LIDARR:

lib/modules/settings/core/pages/headers.dart

+5-5
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ class _State extends State<SettingsHeaderRoute> with LunaScrollControllerMixin {
125125
Future<void> _resetState() async {
126126
switch (widget.module) {
127127
case LunaModule.DASHBOARD:
128-
throw Exception('Dashboard does not have a headers page');
128+
throw Exception('Dashboard does not have a global state');
129129
case LunaModule.EXTERNAL_MODULES:
130-
throw Exception('External modules do not have a headers page');
130+
throw Exception('External modules do not have a global state');
131131
case LunaModule.LIDARR:
132132
return;
133133
case LunaModule.RADARR:
@@ -139,11 +139,11 @@ class _State extends State<SettingsHeaderRoute> with LunaScrollControllerMixin {
139139
case LunaModule.NZBGET:
140140
return;
141141
case LunaModule.SEARCH:
142-
throw Exception('Search does not have a headers page');
142+
throw Exception('Search does not have a global state');
143143
case LunaModule.SETTINGS:
144-
throw Exception('Settings does not have a headers page');
144+
throw Exception('Settings does not have a global state');
145145
case LunaModule.WAKE_ON_LAN:
146-
throw Exception('Wake on LAN does not have a headers page');
146+
throw Exception('Wake on LAN does not have a global state');
147147
case LunaModule.TAUTULLI:
148148
return context.read<TautulliState>().reset();
149149
case LunaModule.OVERSEERR:

lib/modules/settings/core/utilities/headers.dart

+1-3
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ class HeaderUtility {
4545
await _genericHeader(context, headers, indexer);
4646
break;
4747
default:
48-
LunaLogger().warning(
49-
'Unknown case: ${result.item2}',
50-
);
48+
LunaLogger().warning('Unknown case: ${result.item2}');
5149
}
5250
}
5351

lib/modules/settings/routes/configuration_dashboard/route.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ class _State extends State<ConfigurationDashboardRoute>
5252

5353
Widget _calendarSettingsPage() {
5454
return LunaBlock(
55-
title: 'Calendar Settings',
56-
body: const [TextSpan(text: 'Customize the Unified Calendar')],
55+
title: 'settings.CalendarSettings'.tr(),
56+
body: [TextSpan(text: 'settings.CalendarSettingsDescription'.tr())],
5757
trailing: const LunaIconButton.arrow(),
5858
onTap: SettingsRoutes.CONFIGURATION_DASHBOARD_CALENDAR.go,
5959
);

lib/modules/settings/routes/configuration_overseerr/route.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class _State extends State<ConfigurationOverseerrRoute>
4646
Widget _enabledToggle() {
4747
return LunaBox.profiles.listenableBuilder(
4848
builder: (context, _) => LunaBlock(
49-
title: 'Enable ${LunaModule.OVERSEERR.title}',
49+
title: 'settings.EnableModule'.tr(args: [LunaModule.OVERSEERR.title]),
5050
trailing: LunaSwitch(
5151
value: LunaProfile.current.overseerrEnabled,
5252
onChanged: (value) {

lib/modules/settings/routes/configuration_radarr/pages/default_pages.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class _State extends State<ConfigurationRadarrDefaultPagesRoute>
6666
const _db = RadarrDatabase.NAVIGATION_INDEX_MOVIE_DETAILS;
6767
return _db.listenableBuilder(
6868
builder: (context, _) => LunaBlock(
69-
title: 'Movie Details',
69+
title: 'radarr.MovieDetails'.tr(),
7070
body: [
7171
TextSpan(text: RadarrMovieDetailsNavigationBar.titles[_db.read()]),
7272
],
@@ -89,7 +89,7 @@ class _State extends State<ConfigurationRadarrDefaultPagesRoute>
8989
const _db = RadarrDatabase.NAVIGATION_INDEX_ADD_MOVIE;
9090
return _db.listenableBuilder(
9191
builder: (context, _) => LunaBlock(
92-
title: 'Add Movie',
92+
title: 'radarr.AddMovie'.tr(),
9393
body: [TextSpan(text: RadarrAddMovieNavigationBar.titles[_db.read()])],
9494
trailing:
9595
LunaIconButton(icon: RadarrAddMovieNavigationBar.icons[_db.read()]),
@@ -109,7 +109,7 @@ class _State extends State<ConfigurationRadarrDefaultPagesRoute>
109109
const _db = RadarrDatabase.NAVIGATION_INDEX_SYSTEM_STATUS;
110110
return _db.listenableBuilder(
111111
builder: (context, _) => LunaBlock(
112-
title: 'System Status',
112+
title: 'radarr.SystemStatus'.tr(),
113113
body: [
114114
TextSpan(text: RadarrSystemStatusNavigationBar.titles[_db.read()]),
115115
],

0 commit comments

Comments
 (0)