diff options
8 files changed, 168 insertions, 153 deletions
diff --git a/Localizable.xcstrings b/Localizable.xcstrings index 3315e3a..521867c 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -13,13 +13,19 @@ "%lld times" : { }, + "About" : { + + }, + "Account" : { + + }, "Actions" : { }, "Add" : { }, - "Add Custom Provider" : { + "Add credentials only if your selected source supports them." : { }, "Add Sample Bookmarks" : { @@ -30,6 +36,9 @@ "comment" : "A button label that adds sample search history.", "isCommentAutoGenerated" : true }, + "Add Source" : { + + }, "Add Tag to Search" : { "localizations" : { "en-GB" : { @@ -56,21 +65,24 @@ } } }, + "Advanced" : { + + }, "All" : { }, "All %@" : { }, - "API Credentials" : { - "comment" : "A section header that lists API credentials.", - "isCommentAutoGenerated" : true - }, "API Key" : { }, + "Appearance" : { + + }, "Appearance and Behavior" : { "comment" : "A section header in the settings menu.", + "extractionState" : "stale", "isCommentAutoGenerated" : true, "localizations" : { "en-GB" : { @@ -100,7 +112,7 @@ "Are you sure you want to remove all searches? This action cannot be undone." : { }, - "Blur Content Ratings" : { + "Blur Ratings" : { }, "Bookmark" : { @@ -129,10 +141,13 @@ } } }, + "Browsing" : { + + }, "Cancel" : { }, - "Clear History" : { + "Clear Search History" : { }, "Collection" : { @@ -147,7 +162,11 @@ "Collections" : { }, + "Columns: %lld" : { + + }, "Content Filtering" : { + "extractionState" : "stale", "localizations" : { "ja" : { "stringUnit" : { @@ -164,6 +183,7 @@ }, "Credits" : { + "extractionState" : "stale", "localizations" : { "ja" : { "stringUnit" : { @@ -173,11 +193,10 @@ } } }, - "Custom Providers" : { - "comment" : "A section in the settings menu that allows users to manage their custom booru providers.", - "isCommentAutoGenerated" : true + "Custom Sources" : { + }, - "Custom User-Agent" : { + "Custom User Agent" : { }, "Debug" : { @@ -199,14 +218,8 @@ } } }, - "Details Settings" : { - "comment" : "A link to the settings related to the details of a post.", - "isCommentAutoGenerated" : true - }, - "Display Content Ratings" : { - - }, "Display Information Bar" : { + "extractionState" : "stale", "localizations" : { "ja" : { "stringUnit" : { @@ -216,22 +229,12 @@ } } }, - "Display Options" : { - "comment" : "A section header in the settings view for display-related options.", - "isCommentAutoGenerated" : true - }, - "Domain" : { - - }, "Done" : { }, "Double-tap to zoom. Pinch to adjust zoom level." : { }, - "Enable \"Share Image\" Shortcut" : { - - }, "Error" : { }, @@ -288,16 +291,11 @@ } } }, - "File Management" : { - "comment" : "A section header in the settings view that allows users to manage their downloaded files.", - "isCommentAutoGenerated" : true - }, "Fit to screen" : { }, - "Grid Layout" : { - "comment" : "A section header that lists options related to the layout of thumbnails in the grid.", - "isCommentAutoGenerated" : true + "Hidden Posts" : { + }, "Image" : { @@ -305,9 +303,6 @@ "Image Quality" : { }, - "Import and Export" : { - - }, "Import Bookmarks" : { }, @@ -317,24 +312,27 @@ "In %@" : { }, - "Invalid Domain" : { + "Invalid Website" : { }, - "Keep bookmarks, search history, and providers consistent across all your devices." : { + "Keep bookmarks, collections, search history, and sources in sync across your devices." : { }, "Last Visited" : { }, - "Lazy Thumbnail Loading" : { + "Layout" : { }, - "Leave this field empty to use Sora's default User-Agent." : { + "Library" : { }, "Load Next Page" : { }, + "Loading" : { + + }, "Loading %@…" : { }, @@ -344,12 +342,6 @@ "Login" : { }, - "Manage Collections" : { - - }, - "Moebooru Feed" : { - - }, "New Collection" : { }, @@ -408,6 +400,9 @@ } } }, + "Only change these options if a source requires them." : { + + }, "Open Post in Safari" : { "localizations" : { "ja" : { @@ -431,10 +426,6 @@ "Opens post details." : { }, - "Performance" : { - "comment" : "A section header in the settings view related to performance settings.", - "isCommentAutoGenerated" : true - }, "Post %@" : { }, @@ -448,13 +439,13 @@ } } }, - "Preloaded Images" : { + "Preload Nearby Images: %lld" : { }, - "Preloaded Images: %lld" : { + "Previous Search" : { }, - "Previous Search" : { + "Prioritize Scrolling Performance" : { }, "Provider" : { @@ -467,23 +458,9 @@ } } }, - "Provider Details" : { - "comment" : "A section header in the settings view for adding custom booru providers.", - "isCommentAutoGenerated" : true - }, "Provider Error" : { }, - "Provider Selection" : { - - }, - "Provider Settings" : { - "comment" : "A link in the settings menu that takes the user to the provider settings section.", - "isCommentAutoGenerated" : true - }, - "Provider Type" : { - - }, "Rabbit SVG created by Kim Sun Young" : { }, @@ -519,7 +496,7 @@ "Remove All Bookmarks" : { }, - "Remove All Custom Providers" : { + "Remove All Custom Sources" : { }, "Remove All Favorites" : { @@ -538,7 +515,7 @@ "Remove Bookmark" : { }, - "Remove Custom Provider" : { + "Remove Current Source" : { }, "Remove from Collection" : { @@ -562,7 +539,11 @@ "Rename Collection" : { }, + "Reset Settings" : { + + }, "Reset to Defaults" : { + "extractionState" : "stale", "localizations" : { "ja" : { "stringUnit" : { @@ -572,9 +553,6 @@ } } }, - "Save Tags to File" : { - - }, "Save to Photos" : { }, @@ -600,7 +578,10 @@ "Select a Post" : { }, - "Send User-Agent" : { + "Send User Agent" : { + + }, + "Sensitive Content" : { }, "Settings" : { @@ -620,7 +601,16 @@ "comment" : "A menu item that shows detailed information about a favorite post.", "isCommentAutoGenerated" : true }, - "Show Held Posts" : { + "Show Hidden Posts" : { + + }, + "Show Information Bar" : { + + }, + "Show Ratings" : { + + }, + "Show Share Action" : { }, "Sort" : { @@ -629,7 +619,19 @@ "Sort By" : { }, - "Suggestion Mode" : { + "Source" : { + + }, + "Source Details" : { + + }, + "Square Thumbnails" : { + + }, + "Storage & Sync" : { + + }, + "Suggestions" : { }, "Sync with iCloud" : { @@ -646,6 +648,7 @@ } }, "Thumbnail Grid Columns" : { + "extractionState" : "stale", "localizations" : { "ja" : { "stringUnit" : { @@ -655,9 +658,6 @@ } } }, - "Thumbnail Grid Columns: %lld" : { - - }, "Thumbnail Quality" : { "localizations" : { "ja" : { @@ -668,10 +668,6 @@ } } }, - "Thumbnail Settings" : { - "comment" : "A label for a section in the settings view related to thumbnail customization.", - "isCommentAutoGenerated" : true - }, "Thumbnails" : { "localizations" : { "ja" : { @@ -685,6 +681,9 @@ "Try adjusting your search or collection filter." : { }, + "Type" : { + + }, "Uncategorized" : { "localizations" : { "en-GB" : { @@ -695,7 +694,7 @@ } } }, - "Uniform Thumbnail Size" : { + "Use custom sources when you want Sora to browse a compatible site." : { }, "Use the bookmark button on a search page to add a bookmark." : { @@ -717,9 +716,15 @@ "User-Agent" : { }, + "Viewer" : { + + }, "Visit Count" : { }, + "Website" : { + + }, "Zoomed in" : { } diff --git a/Sora/Views/Settings/Section/SettingsSectionContentRatingsView.swift b/Sora/Views/Settings/Section/SettingsSectionContentRatingsView.swift index 85b28af..40a8a7e 100644 --- a/Sora/Views/Settings/Section/SettingsSectionContentRatingsView.swift +++ b/Sora/Views/Settings/Section/SettingsSectionContentRatingsView.swift @@ -5,7 +5,7 @@ struct SettingsSectionContentRatingsView: View { var body: some View { List { - Section(header: Text("Display Content Ratings")) { + Section("Show Ratings") { ForEach(BooruRating.allCases, id: \.self) { rating in Toggle( rating.rawValue, @@ -25,7 +25,7 @@ struct SettingsSectionContentRatingsView: View { } } - Section(header: Text("Blur Content Ratings")) { + Section("Blur Ratings") { ForEach(BooruRating.allCases, id: \.self) { rating in Toggle( rating.rawValue, @@ -43,7 +43,7 @@ struct SettingsSectionContentRatingsView: View { } } } - .navigationTitle(Text("Content Filtering")) + .navigationTitle(Text("Sensitive Content")) #if !os(macOS) .navigationBarTitleDisplayMode(.inline) #endif diff --git a/Sora/Views/Settings/Section/SettingsSectionDetailsView.swift b/Sora/Views/Settings/Section/SettingsSectionDetailsView.swift index 9634297..8db6002 100644 --- a/Sora/Views/Settings/Section/SettingsSectionDetailsView.swift +++ b/Sora/Views/Settings/Section/SettingsSectionDetailsView.swift @@ -5,7 +5,7 @@ struct SettingsSectionDetailsView: View { var body: some View { Form { - Section(header: Text("Image Quality")) { + Section("Image Quality") { Picker("Image Quality", selection: $settings.detailViewQuality) { ForEach(BooruPostFileType.allCases, id: \.self) { type in Text(type.rawValue.capitalized).tag(type) @@ -13,32 +13,32 @@ struct SettingsSectionDetailsView: View { } } - Section(header: Text("Display Options")) { - Toggle("Enable \"Share Image\" Shortcut", isOn: $settings.enableShareShortcut) + Section("Appearance") { + Toggle("Show Share Action", isOn: $settings.enableShareShortcut) - Toggle("Display Information Bar", isOn: $settings.displayDetailsInformationBar) + Toggle("Show Information Bar", isOn: $settings.displayDetailsInformationBar) } #if os(macOS) - Section(header: Text("File Management")) { + Section("Saved Files") { Toggle(isOn: $settings.saveTagsToFile) { - Text("Save Tags to File") + Text("Save Tags Alongside Images") Text("Saves post tags in a file alongside the downloaded image.") } } #endif - Section(header: Text("Performance")) { + Section("Loading") { let preloadRange = 0...10 #if os(macOS) - Picker("Preloaded Images", selection: $settings.preloadedCarouselImages) { + Picker("Preload Nearby Images", selection: $settings.preloadedCarouselImages) { ForEach(preloadRange, id: \.self) { columns in Text("\(columns)") } } #else Stepper( - "Preloaded Images: \(settings.preloadedCarouselImages)", + "Preload Nearby Images: \(settings.preloadedCarouselImages)", value: $settings.preloadedCarouselImages, in: preloadRange ) @@ -48,7 +48,7 @@ struct SettingsSectionDetailsView: View { #if os(macOS) .formStyle(.grouped) #endif - .navigationTitle("Details") + .navigationTitle("Viewer") #if !os(macOS) .navigationBarTitleDisplayMode(.large) #endif diff --git a/Sora/Views/Settings/Section/SettingsSectionProviderView.swift b/Sora/Views/Settings/Section/SettingsSectionProviderView.swift index 031840a..b9a7900 100644 --- a/Sora/Views/Settings/Section/SettingsSectionProviderView.swift +++ b/Sora/Views/Settings/Section/SettingsSectionProviderView.swift @@ -9,8 +9,8 @@ struct SettingsSectionProviderView: View { var body: some View { Form { - Section(header: Text("Provider Selection")) { - Picker("Provider", selection: $settings.preferredBooru) { + Section("Source") { + Picker("Website", selection: $settings.preferredBooru) { ForEach(BooruProvider.allCases, id: \.self) { type in Text(type.rawValue).tag(type) } @@ -22,24 +22,13 @@ struct SettingsSectionProviderView: View { } } - Section(header: Text("Moebooru Feed")) { - Toggle("Show Held Posts", isOn: $settings.showHeldMoebooruPosts) - } - - Section(header: Text("User-Agent")) { - Toggle("Send User-Agent", isOn: $settings.sendBooruUserAgent) - - if settings.sendBooruUserAgent { - TextField("Custom User-Agent", text: $settings.customBooruUserAgent) - .autocorrectionDisabled(true) - - Text("Leave this field empty to use Sora's default User-Agent.") - .font(.caption) - .foregroundStyle(.secondary) + if BooruProviderFlavor(provider: settings.preferredBooru) == .moebooru { + Section("Hidden Posts") { + Toggle("Show Hidden Posts", isOn: $settings.showHeldMoebooruPosts) } } - Section(header: Text("API Credentials")) { + Section { SecureField( "API Key", text: Binding( @@ -78,23 +67,40 @@ struct SettingsSectionProviderView: View { #if os(iOS) .keyboardType(isDanbooruProvider ? .default : .numberPad) #endif + } header: { + Text("Account") + } footer: { + Text("Add credentials only if your selected source supports them.") + } + + Section { + Toggle("Send User Agent", isOn: $settings.sendBooruUserAgent) + + if settings.sendBooruUserAgent { + TextField("Custom User Agent", text: $settings.customBooruUserAgent) + .autocorrectionDisabled(true) + } + } header: { + Text("Advanced") + } footer: { + Text("Only change these options if a source requires them.") } - Section(header: Text("Custom Providers")) { - Button("Add Custom Provider") { + Section { + Button("Add Source") { showingCustomBooruSheet = true } .trailingFrame() if case .custom(let provider) = settings.preferredBooru { - Button("Remove Custom Provider") { + Button("Remove Current Source") { settings.customProviders.removeAll { $0.id == provider.id } settings.preferredBooru = .safebooru } .disabled(!settings.customProviders.contains { $0.id == provider.id }) } - Button("Remove All Custom Providers") { + Button("Remove All Custom Sources") { if case .custom = settings.preferredBooru { settings.preferredBooru = .safebooru } @@ -104,23 +110,27 @@ struct SettingsSectionProviderView: View { } } .trailingFrame() + } header: { + Text("Custom Sources") + } footer: { + Text("Use custom sources when you want Sora to browse a compatible site.") } } #if os(macOS) .formStyle(.grouped) #endif - .navigationTitle("Provider") + .navigationTitle("Source") #if !os(macOS) .navigationBarTitleDisplayMode(.large) #endif .sheet(isPresented: $showingCustomBooruSheet) { NavigationStack { Form { - Section(header: Text("Provider Details")) { - TextField("Domain", text: $newDomain) + Section("Source Details") { + TextField("Website", text: $newDomain) .autocorrectionDisabled(true) - Picker("Provider Type", selection: $newFlavor) { + Picker("Type", selection: $newFlavor) { ForEach(BooruProviderFlavor.allCases, id: \.self) { flavor in Text(flavor.rawValue).tag(flavor) } @@ -130,7 +140,7 @@ struct SettingsSectionProviderView: View { #if os(macOS) .formStyle(.grouped) #endif - .navigationTitle("Add Custom Provider") + .navigationTitle("Add Source") #if !os(macOS) .navigationBarTitleDisplayMode(.inline) #endif @@ -155,7 +165,7 @@ struct SettingsSectionProviderView: View { } } .alert( - "Invalid Domain", + "Invalid Website", isPresented: Binding( get: { domainError != nil }, set: { if !$0 { domainError = nil } } @@ -196,19 +206,19 @@ struct SettingsSectionProviderView: View { "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*\\.[a-z]{2,}$" guard NSPredicate(format: "SELF MATCHES %@", domainRegex).evaluate(with: domain) else { - domainError = "Please enter a valid domain name, such as yande.re." + domainError = "Enter a valid website, such as yande.re." return false } guard !domain.contains("://"), !domain.contains("/"), !domain.contains("?") else { - domainError = "Only enter the domain name—leave out 'http://' or extra details." + domainError = "Enter only the website name, without 'http://' or extra details." return false } guard domain.count <= 253 else { // RFC 1035 - domainError = "This domain name is too long. It must be 253 characters or fewer." + domainError = "This website name is too long. It must be 253 characters or fewer." return false } @@ -216,7 +226,7 @@ struct SettingsSectionProviderView: View { let labels = domain.split(separator: ".") guard labels.allSatisfy({ $0.count <= 63 }) else { - domainError = "Each section of the domain name must be 63 characters or fewer." + domainError = "Each section of the website name must be 63 characters or fewer." return false } diff --git a/Sora/Views/Settings/Section/SettingsSectionSearchView.swift b/Sora/Views/Settings/Section/SettingsSectionSearchView.swift index 6249c4a..b702cd4 100644 --- a/Sora/Views/Settings/Section/SettingsSectionSearchView.swift +++ b/Sora/Views/Settings/Section/SettingsSectionSearchView.swift @@ -4,13 +4,13 @@ struct SettingsSectionSearchView: View { @EnvironmentObject var settings: SettingsManager var body: some View { - Picker("Suggestion Mode", selection: $settings.searchSuggestionsMode) { + Picker("Suggestions", selection: $settings.searchSuggestionsMode) { ForEach(SettingsSearchSuggestionsMode.allCases, id: \.self) { type in Text(type.rawValue.capitalized).tag(type) } } - Button("Clear History") { + Button("Clear Search History") { settings.searchHistory.removeAll() } .trailingFrame() diff --git a/Sora/Views/Settings/Section/SettingsSectionSettingsView.swift b/Sora/Views/Settings/Section/SettingsSectionSettingsView.swift index 273cc82..784ee2a 100644 --- a/Sora/Views/Settings/Section/SettingsSectionSettingsView.swift +++ b/Sora/Views/Settings/Section/SettingsSectionSettingsView.swift @@ -7,14 +7,14 @@ struct SettingsSectionSettingsView: View { Toggle(isOn: $settings.enableSync) { Text("Sync with iCloud") - Text("Keep bookmarks, search history, and providers consistent across all your devices.") + Text("Keep bookmarks, collections, search history, and sources in sync across your devices.") .font(.caption) } .onChange(of: settings.enableSync) { _, _ in settings.triggerSyncIfNeededForAll() } - Button("Reset to Defaults") { + Button("Reset Settings") { settings.resetToDefaults() } .trailingFrame() diff --git a/Sora/Views/Settings/Section/SettingsSectionThumbnailsView.swift b/Sora/Views/Settings/Section/SettingsSectionThumbnailsView.swift index ddfbdcc..f8dffc8 100644 --- a/Sora/Views/Settings/Section/SettingsSectionThumbnailsView.swift +++ b/Sora/Views/Settings/Section/SettingsSectionThumbnailsView.swift @@ -6,7 +6,7 @@ struct SettingsSectionThumbnailsView: View { var body: some View { Form { - Section(header: Text("Thumbnail Quality")) { + Section("Image Quality") { Picker("Thumbnail Quality", selection: $settings.thumbnailQuality) { ForEach(BooruPostFileType.allCases, id: \.self) { type in Text(type.rawValue.capitalized).tag(type) @@ -14,27 +14,27 @@ struct SettingsSectionThumbnailsView: View { } } - Section(header: Text("Grid Layout")) { + Section("Layout") { #if os(macOS) - Picker("Thumbnail Grid Columns", selection: $settings.thumbnailGridColumns) { + Picker("Columns", selection: $settings.thumbnailGridColumns) { ForEach(1...10, id: \.self) { columns in Text("\(columns)") } } #else Stepper( - "Thumbnail Grid Columns: \(settings.thumbnailGridColumns)", + "Columns: \(settings.thumbnailGridColumns)", value: $settings.thumbnailGridColumns, in: 1...10 ) #endif - Toggle("Uniform Thumbnail Size", isOn: $settings.uniformThumbnailGrid) + Toggle("Square Thumbnails", isOn: $settings.uniformThumbnailGrid) - Toggle("Lazy Thumbnail Loading", isOn: $settings.alternativeThumbnailGrid) + Toggle("Prioritize Scrolling Performance", isOn: $settings.alternativeThumbnailGrid) } - Section(header: Text("Content Filtering")) { + Section("Sensitive Content") { #if os(macOS) - Button("Content Filtering") { + Button("Sensitive Content") { isShowingContentFiltering.toggle() } .sheet(isPresented: $isShowingContentFiltering) { @@ -44,7 +44,7 @@ struct SettingsSectionThumbnailsView: View { .trailingFrame() #else NavigationLink(destination: SettingsSectionContentRatingsView()) { - Text("Content Filtering") + Text("Sensitive Content") } #endif } diff --git a/Sora/Views/Settings/SettingsView.swift b/Sora/Views/Settings/SettingsView.swift index 814a303..4ea60b8 100644 --- a/Sora/Views/Settings/SettingsView.swift +++ b/Sora/Views/Settings/SettingsView.swift @@ -4,45 +4,45 @@ struct SettingsView: View { var body: some View { NavigationStack { Form { - Section(header: Text("Appearance and Behavior")) { + Section("Browsing") { NavigationLink(destination: SettingsSectionProviderView()) { - Text("Provider Settings") + Text("Source") } NavigationLink(destination: SettingsSectionThumbnailsView()) { - Text("Thumbnail Settings") + Text("Thumbnails") } NavigationLink(destination: SettingsSectionDetailsView()) { - Text("Details Settings") + Text("Viewer") } } - Section(header: Text("Search")) { + Section("Search") { SettingsSectionSearchView() } - Section(header: Text("Collections")) { + Section("Library") { NavigationLink(destination: SettingsCollectionsListView()) { - Text("Manage Collections") + Text("Collections") } } - Section(header: Text("Settings")) { + Section("Storage & Sync") { SettingsSectionSettingsView() } - Section(header: Text("Import and Export")) { + Section("Bookmarks") { SettingsSectionImportExportView() } #if DEBUG - Section(header: Text("Debug")) { + Section("Debug") { SettingsSectionDebugView() } #endif - Section(header: Text("Credits")) { + Section("About") { SettingsSectionCreditsView() } } |