Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Fix # 7770: Discrepancy in the titles of multiple settings screens #8139

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ struct PageZoomSettingsView: View {
}
}
.listBackgroundColor(Color(UIColor.braveGroupedBackground))
.navigationTitle(Strings.PageZoom.settingsTitle)
.navigationBarTitleDisplayMode(.inline)
.listStyle(.insetGrouped)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fileprivate struct QualitySettingsView: View {

var body: some View {
Form {
Section(header: Text("")) {
Section(header: Text(Strings.Settings.qualitySettings)) {
Button(action: {
qualityOption.value = YoutubeHighQualityPreference.on.rawValue
presentationMode.dismiss()
Expand All @@ -69,7 +69,7 @@ fileprivate struct QualitySettingsView: View {
}
.listRowBackground(Color(.secondaryBraveGroupedBackground))
}
.navigationBarTitle(Strings.Settings.qualitySettings)
.navigationBarTitle(Strings.Settings.highestQualityPlayback)
.listBackgroundColor(Color(UIColor.braveGroupedBackground))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct FilterListsView: View {
.animation(.default, value: customFilterListStorage.filterListsURLs)
.listBackgroundColor(Color(UIColor.braveGroupedBackground))
.listStyle(.insetGrouped)
.navigationTitle(Strings.filterLists)
.navigationTitle(Strings.contentFiltering)
.toolbar {
EditButton().disabled(
customFilterListStorage.filterListsURLs.isEmpty &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ struct PrivacyReportSettingsView: View {
.listRowBackground(Color(.secondaryBraveGroupedBackground))
}
}
.navigationTitle(Strings.PrivacyHub.privacyReportsTitle)
.listStyle(.insetGrouped)
.listBackgroundColor(Color(UIColor.braveGroupedBackground))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class SearchCustomEngineViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()

title = Strings.CustomSearchEngine.customEngineNavigationTitle
title = Strings.searchSettingAddCustomEngineCellTitle

setup()
doLayout()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SearchEnginePicker: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()

navigationItem.title = Strings.searchEnginePickerNavTitle
navigationItem.title = type == .standard ? Strings.standardTabSearch : Strings.privateTabSearch
if showCancel {
navigationItem.leftBarButtonItem = UIBarButtonItem(title: Strings.cancelButtonTitle, style: .plain, target: self, action: #selector(cancel))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ class SearchSettingsTableViewController: UITableViewController {
private var privateBrowsingManager: PrivateBrowsingManager

private func searchPickerEngines(type: DefaultEngineType) -> [OpenSearchEngine] {
let isPrivate = type == .privateMode

var orderedEngines = searchEngines.orderedEngines
.sorted { $0.shortName < $1.shortName }
.sorted { engine, _ in engine.shortName == OpenSearchEngine.EngineNames.brave }
Expand Down Expand Up @@ -99,7 +97,7 @@ class SearchSettingsTableViewController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()

navigationItem.title = Strings.searchSettingNavTitle
navigationItem.title = Strings.searchEngines

tableView.do {
$0.allowsSelectionDuringEditing = true
Expand Down
10 changes: 8 additions & 2 deletions Sources/Brave/Frontend/Settings/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ class SettingsViewController: TableViewController {
}
)
optionsViewController.headerText = Strings.showTabsBar
optionsViewController.navigationItem.title = Strings.showTabsBar
self.navigationController?.pushViewController(optionsViewController, animated: true)
}
tabs.rows.append(row)
Expand All @@ -443,6 +444,7 @@ class SettingsViewController: TableViewController {
)
optionsViewController.headerText = Strings.Settings.autocloseTabsSetting
optionsViewController.footerText = Strings.Settings.autocloseTabsSettingFooter
optionsViewController.navigationItem.title = Strings.Settings.autocloseTabsSetting
self.navigationController?.pushViewController(optionsViewController, animated: true)
}

Expand Down Expand Up @@ -494,7 +496,8 @@ class SettingsViewController: TableViewController {
)
optionsViewController.headerText = Strings.themesDisplayBrightness
optionsViewController.footerText = Strings.themesDisplayBrightnessFooter

optionsViewController.navigationItem.title = Strings.themesDisplayBrightness

let nightModeSection = Section(
header: .title(Strings.NightMode.sectionTitle.uppercased()),
rows: [
Expand Down Expand Up @@ -527,9 +530,10 @@ class SettingsViewController: TableViewController {
// We do NOT persistently save page-zoom settings in Private Browsing
if !tabManager.privateBrowsingManager.isPrivateBrowsing {
display.rows.append(
Row(text: Strings.PageZoom.settingsMenuTitle,
Row(text: Strings.PageZoom.settingsTitle,
selection: { [weak self] in
let controller = PageZoomSettingsController()
controller.navigationItem.title = Strings.PageZoom.settingsTitle
self?.navigationController?.pushViewController(controller, animated: true)
},
image: UIImage(braveSystemNamed: "leo.font.size"),
Expand Down Expand Up @@ -683,6 +687,7 @@ class SettingsViewController: TableViewController {
selection: { [unowned self] in
// Show privacy policy
let privacy = SettingsContentViewController().then { $0.url = .brave.privacy }
privacy.navigationItem.title = Strings.privacyPolicy
self.navigationController?.pushViewController(privacy, animated: true)
},
accessory: .disclosureIndicator, cellClass: MultilineValue1Cell.self),
Expand All @@ -691,6 +696,7 @@ class SettingsViewController: TableViewController {
selection: { [unowned self] in
// Show terms of use
let toc = SettingsContentViewController().then { $0.url = .brave.termsOfUse }
toc.navigationItem.title = Strings.termsOfUse
self.navigationController?.pushViewController(toc, animated: true)
},
accessory: .disclosureIndicator, cellClass: MultilineValue1Cell.self),
Expand Down
2 changes: 1 addition & 1 deletion Sources/Brave/Frontend/Share/PageZoomActivity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class PageZoomActivity: UIActivity, MenuActivity {
}

override var activityTitle: String? {
return Strings.PageZoom.settingsMenuTitle
return Strings.PageZoom.settingsTitle
}

override var activityImage: UIImage? {
Expand Down
15 changes: 2 additions & 13 deletions Sources/BraveStrings/BraveStrings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -529,11 +529,6 @@ extension Strings {
value: "Reader Mode", comment: "Title of a bar that show up when you enter reader mode.")
}

// MARK:- SearchEnginePicker.swift
extension Strings {
public static let searchEnginePickerNavTitle = NSLocalizedString("SearchEnginePickerNavTitle", tableName: "BraveShared", bundle: .module, value: "Default Search Engine", comment: "Title for default search engine picker.")
}

// MARK:- SearchSettingsTableViewController.swift
extension Strings {
public static let searchSettingNavTitle = NSLocalizedString("SearchSettingNavTitle", tableName: "BraveShared", bundle: .module, value: "Search", comment: "Navigation title for search settings.")
Expand Down Expand Up @@ -1783,7 +1778,7 @@ extension Strings {

public static let playlistStartPlaybackSettingsOptionTitle =
NSLocalizedString("playlist.playlistStartPlaybackSettingsOptionTitle", tableName: "BraveShared", bundle: .module,
value: "Remember file playback position",
value: "Remember File Playback Position",
comment: "Title for the Playlist Settings Option for Enable/Disable ability to start playing from the point where user last left-off")

public static let playlistStartPlaybackSettingsFooterText =
Expand Down Expand Up @@ -4597,13 +4592,8 @@ extension Strings {
// Page Zoom
extension Strings {
public struct PageZoom {
public static let settingsMenuTitle = NSLocalizedString("pagezoom.settings.menu-title", tableName: "BraveShared", bundle: .module,
value: "Page Zoom",
comment: "Title of the Web-Page Zoom settings menu"
)

public static let settingsTitle = NSLocalizedString("pagezoom.settings.title", tableName: "BraveShared", bundle: .module,
value: "Page Zoom Settings",
value: "Page Zoom",
comment: "Title of the Web-Page Zoom screen"
)

Expand Down Expand Up @@ -4858,7 +4848,6 @@ extension Strings {
public static let contentFiltering = NSLocalizedString("ContentFiltering", tableName: "BraveShared", bundle: .module, value: "Content Filtering", comment: "A title to the content filtering page under global shield settings and the title on the Content filtering page")
public static let blockMobileAnnoyances = NSLocalizedString("blockMobileAnnoyances", tableName: "BraveShared", bundle: .module, value: "Block 'Switch to App' Notices", comment: "A title for setting which blocks 'switch to app' popups")
public static let contentFilteringDescription = NSLocalizedString("ContentFilteringDescription", tableName: "BraveShared", bundle: .module, value: "Enable custom filters that block regional and language-specific trackers and Annoyances", comment: "A description of the content filtering page.")
public static let filterLists = NSLocalizedString("FilterLists", tableName: "BraveShared", bundle: .module, value: "Filter Lists", comment: "A title on the content filtering screen that allows you to enable/disable filter lists")
public static let defaultFilterLists = NSLocalizedString("DefaultFilterLists", tableName: "BraveShared", bundle: .module, value: "Default Filter Lists", comment: "A section title that contains default (predefined) filter lists a user can enable/diable.")
public static let filterListsDescription = NSLocalizedString("FilterListsDescription", tableName: "BraveShared", bundle: .module, value: "Additional popular community lists. Note that enabling too many filters will degrade browsing speeds.", comment: "A description on the content filtering screen for the filter lists section.")
public static let addCustomFilterList = NSLocalizedString("AddCustomFilterList", tableName: "BraveShared", bundle: .module, value: "Add Custom Filter List", comment: "A title within a cell where a user can navigate to an add screen.")
Expand Down