diff --git a/DuckDuckGo/Common/Localizables/UserText.swift b/DuckDuckGo/Common/Localizables/UserText.swift index a3ee25f1f8..f5a8f3b421 100644 --- a/DuckDuckGo/Common/Localizables/UserText.swift +++ b/DuckDuckGo/Common/Localizables/UserText.swift @@ -332,7 +332,6 @@ struct UserText { static let currentWindow = NSLocalizedString("fire.currentWindow", value: "All sites visited in current window", comment: "Configuration option for fire button") static let allDataDescription = NSLocalizedString("fire.all-data.description", value: "Clear all tabs and related site data", comment: "Description of the 'All Data' configuration option for the fire button") static let currentWindowDescription = NSLocalizedString("fire.current-window.description", value: "Clear current window and related site data", comment: "Description of the 'Current Window' configuration option for the fire button") - static let selectedDomainsDescription = NSLocalizedString("fire.selected-domains.description", value: "Clear data only for selected domains", comment: "Description of the 'Current Window' configuration option for the fire button") static let selectSiteToClear = NSLocalizedString("fire.select-site-to-clear", value: "Select a site to clear its data.", comment: "Info label in the fire button popover") static func activeTabsInfo(tabs: Int, sites: Int) -> String { let localized = NSLocalizedString("fire.active-tabs-info", diff --git a/DuckDuckGo/Fire/View/FirePopoverViewController.swift b/DuckDuckGo/Fire/View/FirePopoverViewController.swift index 72708e500d..53b1dc91b2 100644 --- a/DuckDuckGo/Fire/View/FirePopoverViewController.swift +++ b/DuckDuckGo/Fire/View/FirePopoverViewController.swift @@ -108,7 +108,7 @@ final class FirePopoverViewController: NSViewController { setUpStrings() updateClearButtonAppearance() setupOptionsButton() - updateCloseDetailsButton() + setupOpenCloseDetailsButton() updateWarningWrapperView() subscribeToViewModel() @@ -125,7 +125,6 @@ final class FirePopoverViewController: NSViewController { openFireWindowsTitleLabel.stringValue = UserText.fireDialogFireWindowTitle fireWindowDescriptionLabel.stringValue = UserText.fireDialogFireWindowDescription closeTabsLabel.stringValue = UserText.fireDialogCloseTabs - openDetailsButton.title = UserText.details closeBurnerWindowButton.title = UserText.fireDialogBurnWindowButton clearButton.title = UserText.clear cancelButton.title = UserText.cancel @@ -137,7 +136,6 @@ final class FirePopoverViewController: NSViewController { return } firePopoverViewModel.clearingOption = clearingOption - updateCloseDetailsButton() updateWarningWrapperView() } @@ -221,13 +219,16 @@ final class FirePopoverViewController: NSViewController { button.attributedTitle = attrTitle } - private func updateCloseDetailsButton() { - guard firePopoverViewModel.areAllSelected else { - closeDetailsButton.title = " \(UserText.selectedDomainsDescription)" - return - } + private func setupOpenCloseDetailsButton() { + let paragraphStyle = NSMutableParagraphStyle() + paragraphStyle.firstLineHeadIndent = 15 + let title = NSMutableAttributedString(string: UserText.fireDialogDetails) + title.addAttributes([.paragraphStyle: paragraphStyle], range: NSRange(location: 0, length: title.length)) - closeDetailsButton.title = " \(UserText.fireDialogDetails)" + openDetailsButton.attributedTitle = title + openDetailsButton.alignment = .left + closeDetailsButton.attributedTitle = title + closeDetailsButton.alignment = .left } private func updateWarningWrapperView() { @@ -288,7 +289,6 @@ final class FirePopoverViewController: NSViewController { let selectionIndexPaths = Set(selected.map {IndexPath(item: $0, section: self.firePopoverViewModel.selectableSectionIndex)}) self.collectionView.selectionIndexPaths = selectionIndexPaths self.updateInfoLabel() - self.updateCloseDetailsButton() } } diff --git a/DuckDuckGo/Localizable.xcstrings b/DuckDuckGo/Localizable.xcstrings index caa202fc24..8382341179 100644 --- a/DuckDuckGo/Localizable.xcstrings +++ b/DuckDuckGo/Localizable.xcstrings @@ -19935,66 +19935,6 @@ } } }, - "fire.selected-domains.description" : { - "comment" : "Description of the 'Current Window' configuration option for the fire button", - "extractionState" : "extracted_with_value", - "localizations" : { - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Daten nur für ausgewählte Domains löschen" - } - }, - "en" : { - "stringUnit" : { - "state" : "new", - "value" : "Clear data only for selected domains" - } - }, - "es" : { - "stringUnit" : { - "state" : "translated", - "value" : "Borrar datos solo para los dominios seleccionados" - } - }, - "fr" : { - "stringUnit" : { - "state" : "translated", - "value" : "N'effacer les données que des domaines sélectionnés" - } - }, - "it" : { - "stringUnit" : { - "state" : "translated", - "value" : "Cancella i dati solo per i domini selezionati" - } - }, - "nl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Alleen gegevens wissen voor de geselecteerde domeinen" - } - }, - "pl" : { - "stringUnit" : { - "state" : "translated", - "value" : "Wyczyść dane dotyczące tylko wybranych domen" - } - }, - "pt" : { - "stringUnit" : { - "state" : "translated", - "value" : "Limpar dados apenas para domínios selecionados" - } - }, - "ru" : { - "stringUnit" : { - "state" : "translated", - "value" : "Функция Fire Button сотрет только данные выбранных сайтов" - } - } - } - }, "fireproof" : { "comment" : "Fireproof button", "extractionState" : "extracted_with_value",