Skip to content

Commit

Permalink
Add Checkmark icon to pickers (#2337)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/0/1206327436431895/f

Description:

- Adds a checkmark icon to the picker options in settings (based on design feedback)
- Fixes missing translations
  • Loading branch information
afterxleep authored Jan 15, 2024
1 parent 8b94de5 commit 54d76ae
Show file tree
Hide file tree
Showing 26 changed files with 2,701 additions and 7 deletions.
25 changes: 18 additions & 7 deletions DuckDuckGo/SettingsCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,11 @@ struct SettingsPickerCellView<T: CaseIterable & Hashable & CustomStringConvertib
Spacer()
Menu {
ForEach(options, id: \.self) { option in
getButtonWithAction(action: { self.selectedOption = option },
option: option.description)
Group {
getButtonWithAction(action: { self.selectedOption = option },
option: option.description,
selected: option == selectedOption)
}
}
} label: {
HStack {
Expand All @@ -204,16 +207,24 @@ struct SettingsPickerCellView<T: CaseIterable & Hashable & CustomStringConvertib
Image(systemName: "chevron.up.chevron.down")
.font(Font.system(.footnote).weight(.bold))
.foregroundColor(Color(UIColor.tertiaryLabel))
.padding(.trailing, -2)
}
}
}
}

private func getButtonWithAction(action: @escaping () -> Void, option: String) -> some View {
return Button(action: action) {
Text(option)
.daxBodyRegular()
.foregroundColor(Color(designSystemColor: .textSecondary))
private func getButtonWithAction(action: @escaping () -> Void,
option: String,
selected: Bool) -> some View {
return Group {
Button(action: action) {
HStack {
if selected {
Image(systemName: "checkmark")
}
Text(option)
}
}
}
}
}
Expand Down
19 changes: 19 additions & 0 deletions DuckDuckGo/SettingsHostingController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,22 @@ class SettingsHostingController: UIHostingController<AnyView> {
navigationController?.present(vc, animated: true)
}
}

extension SettingsHostingController: Themable {

func decorate(with theme: Theme) {
// Apply Theme
navigationController?.navigationBar.barTintColor = theme.barBackgroundColor
navigationController?.navigationBar.tintColor = theme.navigationBarTintColor

if #available(iOS 15.0, *) {
let appearance = UINavigationBarAppearance()
appearance.shadowColor = .clear
appearance.backgroundColor = theme.backgroundColor

navigationController?.navigationBar.standardAppearance = appearance
navigationController?.navigationBar.scrollEdgeAppearance = appearance
}
}

}
111 changes: 111 additions & 0 deletions DuckDuckGo/bg.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,9 @@
/* No comment provided by engineer. */
"dax.onboarding.message" = "Интернет може да бъде и доста опасно място.\n\nНе се притеснявайте! Поверителното търсене и сърфиране е много по-лесно, отколкото си мислите.";

/* No comment provided by engineer. */
"Debug" = "Debug";

/* GPC Setting state */
"donotsell.disabled" = "Деактивирано";

Expand Down Expand Up @@ -1372,6 +1375,9 @@
/* Please preserve newline character */
"launchscreenWelcomeMessage" = "Добре дошли в\nDuckDuckGo!";

/* No comment provided by engineer. */
"LOREM IPSUM" = "LOREM IPSUM";

/* Summary text for the macOS browser waitlist */
"mac-browser.waitlist.summary" = "DuckDuckGo за Mac притежава необходимата скорост, както и очакваните от Вас функции за сърфиране, и предлага най-добрите в този клас елементи за защита.";

Expand Down Expand Up @@ -1489,6 +1495,9 @@
/* Second subtitle for Network Protection join waitlist screen */
"network-protection.waitlist.join.subtitle.2" = "Включете се в списъка с чакащи и ще Ви уведомим, когато дойде Вашият ред.";

/* Title for Network Protection join waitlist screen */
"network-protection.waitlist.join.title" = "Network Protection Early Access";

/* Title for Network Protection joined waitlist screen */
"network-protection.waitlist.joined.title" = "Включени сте в списъка с чакащи!";

Expand Down Expand Up @@ -1762,9 +1771,108 @@
/* No comment provided by engineer. */
"section.title.favorites" = "Любими";

/* Settings cell for About DDG */
"settings.about.ddg" = "Относно DuckDuckGo";

/* Settings section title for About DuckDuckGo */
"settings.about.section" = "За нас";

/* about page */
"settings.about.text" = "DuckDuckGo е независима компания, основана през 2008 г., за защита на личните данни в интернет за всеки, на когото му е омръзнало да бъде проследяван онлайн и иска лесно решение на проблема. Ние сме доказателство, че можете да получите реална и безкомпромисна защита на личните данни онлайн.\n\nБраузърът DuckDuckGo притежава функциите, които очаквате от един основен браузър, като отметки, раздели, пароли и много други, както и [редица мощни защити на поверителността](ddgQuickLink://duckduckgo.com/duckduckgo-help-pages/privacy/web-tracking-protections/), които не се предлагат в повечето популярни браузъри по подразбиране. Този уникален и комплексен набор от защити на поверителността предлага сигурност при онлайн дейностите – търсене, сърфиране, изпращане на имейли и др.\n\nЗа да работят, нашите защити на поверителността не изискват да имате технически познания или да се извършвате сложни настройки. Необходимо е да използвате браузъра DuckDuckGo на всички Ваши устройства и ще получите поверителност по подразбиране.\n\nНо ако *наистина* искате да надникнете зад кулисите, и да разберете как работят защитите на поверителността на DuckDuckGo, можете да намерите повече информация на нашите [страници за помощ](ddgQuickLink://duckduckgo.com/duckduckgo-help-pages/).";

/* Settings screen cell text for adding the app to the dock */
"settings.add.to.dock" = "Добавяне на приложението към панела";

/* Settings screen cell text for add widget to the home screen */
"settings.add.widget" = "Добавяне на приспособлението към началния екран";

/* Settings screen cell text for addess bar position */
"settings.address.bar" = "Позиция на адресната лента";

/* Settings screen appearance section title */
"settings.appearance" = "Външен Вид";

/* Settings screen cell for opening links in associated apps */
"settings.associated.apps" = "Отваряне на връзките в свързаните приложения";

/* Description for associated apps description */
"settings.associated.apps.description" = "Деактивирайте, за да предотвратите автоматично отваряне на връзки в други инсталирани приложения.";

/* Settings screen cell for autocomplete */
"settings.autocomplete" = "Показване на предложенията за автоматично довършване";

/* Settings screen cell text for Application Lock */
"settings.autolock" = "Заключване на приложение";

/* Section footer Autolock description */
"settings.autolock.description" = "Ако сте задали пръстов отпечатък, лицево разпознаване или системна парола, ще бъдете приканени да отключите приложението при отваряне.";

/* Settings screen cell text for Automatically Clearing Data */
"settings.clear.data" = "Автоматично изчистване на данните";

/* Settings screen cell text for Cookie popups */
"settings.cookie.popups" = "Управление на прозорци за бисквитки";

/* Settings title for the customize section */
"settings.customize" = "Персонализиране";

/* Settings screen cell text for setting the app as default browser */
"settings.default.browser" = "Задаване като браузър по подразбиране";

/* Settings cell for Email Protection */
"settings.emailProtection" = "Защита на имейл";

/* Settings cell for Email Protection */
"settings.emailProtection.description" = "Блокирайте имейл тракерите и скрийте своя адрес";

/* Settings cell for Feedback */
"settings.feedback" = "Споделяне на отзив";

/* Settings screen cell text for fire button animation */
"settings.firebutton" = "Анимация на огнения бутон";

/* Settings screen cell text for Fireproof Sites */
"settings.fireproof.sites" = "Огнеустойчиви сайтове";

/* Settings screen cell text for GPC */
"settings.gpc" = "Глобален контрол на поверителността (GPC)";

/* Settings screen cell text for app icon selection */
"settings.icon" = "Икона на приложението";

/* Settings screen cell for Keyboard */
"settings.keyboard" = "Клавиатура";

/* Settings title for the 'More' section */
"settings.more" = "Още от DuckDuckGo";

/* Settings screen cell for long press previews */
"settings.previews" = "Прегледи с продължително натискане";

/* Settings title for the privacy section */
"settings.privacy" = "Поверителност";

/* Settings screen cell text for sync and backup */
"settings.sync" = "Синхронизиране и архивиране";

/* Settings screen cell text for text size */
"settings.text.size" = "Размер на текста";

/* Settings screen cell text for theme */
"settings.theme" = "Тема";

/* Title for the Settings View */
"settings.title" = "Настройки";

/* Settings screen cell text for Unprotected Sites */
"settings.unprotected.sites" = "Незащитени сайтове";

/* Settings cell for Version */
"settings.version" = "Версия";

/* Settings screen cell for voice search */
"settings.voice.search" = "Поверително гласово търсене";

/* Report a Broken Site screen confirmation button */
"siteFeedback.buttonText" = "Изпращане на доклад";

Expand Down Expand Up @@ -1858,6 +1966,9 @@
/* Message for alert warning the user about missing microphone permission */
"voiceSearch.alert.no-permission.message" = "Разрешете достъп до микрофона в настройките на системата iOS, за да може DuckDuckGo да използва гласовите функции.";

/* OK button alert warning the user about missing microphone permission */
"voiceSearch.alert.no-permission.ok" = "ОК";

/* Title for alert warning the user about missing microphone permission */
"voiceSearch.alert.no-permission.title" = "Изисква се достъп до микрофона";

Expand Down
111 changes: 111 additions & 0 deletions DuckDuckGo/cs.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,9 @@
/* No comment provided by engineer. */
"dax.onboarding.message" = "Internet může být trochu strašidelný.\n\nNebojte se! Anonymní vyhledávání a procházení je jednodušší, než si myslíte.";

/* No comment provided by engineer. */
"Debug" = "Debug";

/* GPC Setting state */
"donotsell.disabled" = "Zakázáno";

Expand Down Expand Up @@ -1372,6 +1375,9 @@
/* Please preserve newline character */
"launchscreenWelcomeMessage" = "Vítejte na\nDuckDuckGo!";

/* No comment provided by engineer. */
"LOREM IPSUM" = "LOREM IPSUM";

/* Summary text for the macOS browser waitlist */
"mac-browser.waitlist.summary" = "DuckDuckGo pro Mac má rychlost, kterou potřebuješ, funkce prohlížeče, které očekáváš, a obsahuje naše nejlepší nástroje na ochranu soukromí.";

Expand Down Expand Up @@ -1489,6 +1495,9 @@
/* Second subtitle for Network Protection join waitlist screen */
"network-protection.waitlist.join.subtitle.2" = "Zapiš se na čekací listinu a my tě upozorníme, až budeš na řadě.";

/* Title for Network Protection join waitlist screen */
"network-protection.waitlist.join.title" = "Network Protection Early Access";

/* Title for Network Protection joined waitlist screen */
"network-protection.waitlist.joined.title" = "Jsi v pořadníku!";

Expand Down Expand Up @@ -1762,9 +1771,108 @@
/* No comment provided by engineer. */
"section.title.favorites" = "Oblíbené";

/* Settings cell for About DDG */
"settings.about.ddg" = "O DuckDuckGo";

/* Settings section title for About DuckDuckGo */
"settings.about.section" = "O společnosti";

/* about page */
"settings.about.text" = "DuckDuckGo je nezávislá společnost založená v roce 2008, která se zabývá ochranou soukromí pro všechny, kdo už mají dost sledování na internetu a chtějí snadné řešení. Jsme důkazem, že skutečná ochrana soukromí na internetu nemusí mít kompromisy.\n\nProhlížeč DuckDuckGo má všechno, co od prohlížeče očekáváš, jako jsou záložky, karty, hesla a další funkce. A k tomu má víc než [desítku účinných funkcí na ochranu soukromí](ddgQuickLink://duckduckgo.com/duckduckgo-help-pages/privacy/web-tracking-protections/), které většina oblíbených prohlížečů ve výchozím nastavení nenabízí. Tahle jedinečná komplexní sada na ochranu soukromí pomáhá chránit tvoje aktivity na internetu, ať už zrovna něco vyhledáváš, jen tak surfuješ, nebo posíláš e-maily.\n\nAby naše ochrana soukromí fungovala, nemusíš znát technické detaily ani řešit žádná složitá nastavení. Stačí přejít na prohlížeč DuckDuckGo ve všech zařízeních a dostaneš soukromí pro všechny své aktivity.\n\nJestli chceš nahlédnout pod pokličku, víc informací o tom, jak ochrana soukromí DuckDuckGo funguje, najdeš v naší [nápovědě](ddgQuickLink://duckduckgo.com/duckduckgo-help-pages/).";

/* Settings screen cell text for adding the app to the dock */
"settings.add.to.dock" = "Přidat aplikaci do docku";

/* Settings screen cell text for add widget to the home screen */
"settings.add.widget" = "Přidat widget na domovskou obrazovku";

/* Settings screen cell text for addess bar position */
"settings.address.bar" = "Pozice adresního řádku";

/* Settings screen appearance section title */
"settings.appearance" = "Vzhled";

/* Settings screen cell for opening links in associated apps */
"settings.associated.apps" = "Otevřít odkazy v přidružených aplikacích";

/* Description for associated apps description */
"settings.associated.apps.description" = "Zakažte, chcete-li zabránit automatickému otevírání odkazů v jiných nainstalovaných aplikacích.";

/* Settings screen cell for autocomplete */
"settings.autocomplete" = "Zobrazit návrhy automatického doplňování";

/* Settings screen cell text for Application Lock */
"settings.autolock" = "Zámek aplikace";

/* Section footer Autolock description */
"settings.autolock.description" = "Pokud je nastaveno Touch ID, Face ID nebo přístupový kód k systému, budete při otevírání požádáni o odemknutí aplikace.";

/* Settings screen cell text for Automatically Clearing Data */
"settings.clear.data" = "Automaticky vymazat data";

/* Settings screen cell text for Cookie popups */
"settings.cookie.popups" = "Správa vyskakovacích oken ohledně cookies";

/* Settings title for the customize section */
"settings.customize" = "Přizpůsobit";

/* Settings screen cell text for setting the app as default browser */
"settings.default.browser" = "Nastavit jako výchozí prohlížeč";

/* Settings cell for Email Protection */
"settings.emailProtection" = "Ochrana e-mailu";

/* Settings cell for Email Protection */
"settings.emailProtection.description" = "Blokování trackerů v e-mailu a skrytí adresy";

/* Settings cell for Feedback */
"settings.feedback" = "Podělte se o zpětnou vazbu";

/* Settings screen cell text for fire button animation */
"settings.firebutton" = "Animace tlačítka pro mazání";

/* Settings screen cell text for Fireproof Sites */
"settings.fireproof.sites" = "Stránky s ochranou";

/* Settings screen cell text for GPC */
"settings.gpc" = "Globální kontrola ochrany osobních údajů (GPC)";

/* Settings screen cell text for app icon selection */
"settings.icon" = "Ikona aplikace";

/* Settings screen cell for Keyboard */
"settings.keyboard" = "Klávesnice";

/* Settings title for the 'More' section */
"settings.more" = "Další od DuckDuckGo";

/* Settings screen cell for long press previews */
"settings.previews" = "Náhledy dlouhého stisknutí";

/* Settings title for the privacy section */
"settings.privacy" = "Soukromí";

/* Settings screen cell text for sync and backup */
"settings.sync" = "Synchronizace a zálohování";

/* Settings screen cell text for text size */
"settings.text.size" = "Velikost textu";

/* Settings screen cell text for theme */
"settings.theme" = "Téma";

/* Title for the Settings View */
"settings.title" = "Nastavení";

/* Settings screen cell text for Unprotected Sites */
"settings.unprotected.sites" = "Nechráněné stránky";

/* Settings cell for Version */
"settings.version" = "Verze";

/* Settings screen cell for voice search */
"settings.voice.search" = "Soukromé hlasové vyhledávání";

/* Report a Broken Site screen confirmation button */
"siteFeedback.buttonText" = "Odešlete zprávu";

Expand Down Expand Up @@ -1858,6 +1966,9 @@
/* Message for alert warning the user about missing microphone permission */
"voiceSearch.alert.no-permission.message" = "Pro používání hlasových funkcí DuckDuckGo je potřeba v Nastaveních iOS povolit přístup k mikrofonu.";

/* OK button alert warning the user about missing microphone permission */
"voiceSearch.alert.no-permission.ok" = "DOBŘE";

/* Title for alert warning the user about missing microphone permission */
"voiceSearch.alert.no-permission.title" = "Je nutný přístup k mikrofonu";

Expand Down
Loading

0 comments on commit 54d76ae

Please sign in to comment.