From 06d0e3aa252cadf23bc55349009585db37081c1d Mon Sep 17 00:00:00 2001 From: Bastian Gruber Date: Tue, 9 Dec 2025 20:08:33 -0400 Subject: [PATCH 1/2] EXP-5874 Add strings for Rollouts toggle and update Studies strings (v148) --- .github/l10n/linter_config_ios.json | 4 ++- firefox-ios/Shared/Strings.swift | 30 +++++++++++++++++++ .../en-CA.lproj/Settings.strings | 18 +++++++++++ .../en-GB.lproj/Settings.strings | 19 +++++++++++- .../Blockzilla/UIComponents/UIConstants.swift | 9 ++++-- 5 files changed, 76 insertions(+), 4 deletions(-) diff --git a/.github/l10n/linter_config_ios.json b/.github/l10n/linter_config_ios.json index 683cf8d15b6f8..f2c7a4c7394b1 100644 --- a/.github/l10n/linter_config_ios.json +++ b/.github/l10n/linter_config_ios.json @@ -5,7 +5,9 @@ }, "quotes": { "enabled": true, - "exclusions": [] + "exclusions": [ + "firefox-ios.xliff:Settings.Studies.Message.v136" + ] }, "placeables": { "enabled": true, diff --git a/firefox-ios/Shared/Strings.swift b/firefox-ios/Shared/Strings.swift index 24e7dfab44649..a89d16984c8dd 100644 --- a/firefox-ios/Shared/Strings.swift +++ b/firefox-ios/Shared/Strings.swift @@ -6229,6 +6229,36 @@ extension String { tableName: "Settings", value: "Try out features and ideas before they’re released to everyone.", comment: "A short description that explains that Mozilla is running studies") + public static let StudiesSettingTitleV3 = MZLocalizedString( + key: "Settings.Studies.Title.v148", + tableName: "Settings", + value: "Allow Feature Studies", + comment: "Label used as a toggle item in Settings. When this is off, the user is opting out of all studies.") + public static let StudiesSettingLinkV3 = MZLocalizedString( + key: "Settings.Studies.Link.v148", + tableName: "Settings", + value: "Learn More", + comment: "Title for a link that explains what Mozilla means by Studies") + public static let StudiesSettingMessageV3 = MZLocalizedString( + key: "Settings.Studies.Message.v148", + tableName: "Settings", + value: "%@ randomly selects users to test features, which improves quality for everyone.", + comment: "A short description that explains that Mozilla is running studies. %@ is the app name (e.g. Firefox).") + public static let RolloutsSettingTitle = MZLocalizedString( + key: "Settings.Rollouts.Title.v148", + tableName: "Settings", + value: "Allow Remote Improvements", + comment: "Label used as a toggle item in Settings. When this is off, the user is opting out of all rollouts.") + public static let RolloutsSettingLink = MZLocalizedString( + key: "Settings.Rollouts.Link.v148", + tableName: "Settings", + value: "Learn More", + comment: "Title for a link that explains what Mozilla means by Rollouts") + public static let RolloutsSettingMessage = MZLocalizedString( + key: "Settings.Rollouts.Message.v148", + tableName: "Settings", + value: "%@ will improve features, performance, and stability between updates. Changes applied remotely.", + comment: "A short description that explains that Mozilla may change features remotely. %@ is the app name (e.g. Firefox).") public static let SettingsSiriSectionName = MZLocalizedString( key: "Settings.Siri.SectionName", tableName: nil, diff --git a/firefox-ios/Shared/Supporting Files/en-CA.lproj/Settings.strings b/firefox-ios/Shared/Supporting Files/en-CA.lproj/Settings.strings index fb5a2c17823f1..9211fff7daa8e 100644 --- a/firefox-ios/Shared/Supporting Files/en-CA.lproj/Settings.strings +++ b/firefox-ios/Shared/Supporting Files/en-CA.lproj/Settings.strings @@ -235,12 +235,30 @@ /* Title for a link that explains what Mozilla means by Studies */ "Settings.Studies.Link.v136" = "Learn More"; +/* Title for a link that explains what Mozilla means by Studies */ +"Settings.Studies.Link.v148" = "Learn More"; + /* A short description that explains that Mozilla is running studies */ "Settings.Studies.Message.v136" = "Try out features and ideas before they’re released to everyone."; +/* A short description that explains that Mozilla is running studies. %@ is the app name (e.g. Firefox). */ +"Settings.Studies.Message.v148" = "%@ randomly selects users to test features, which improves quality for everyone."; + /* Label used as a toggle item in Settings. When this is off, the user is opting out of all studies. */ "Settings.Studies.Title.v136" = "Install and Run Studies"; +/* Label used as a toggle item in Settings. When this is off, the user is opting out of all studies. */ +"Settings.Studies.Title.v148" = "Allow Feature Studies"; + +/* Title for a link that explains what Mozilla means by Rollouts */ +"Settings.Rollouts.Link.v148" = "Learn More"; + +/* A short description that explains that Mozilla may change features remotely. %@ is the app name (e.g. Firefox). */ +"Settings.Rollouts.Message.v148" = "%@ will improve features, performance, and stability between updates. Changes applied remotely."; + +/* Label used as a toggle item in Settings. When this is off, the user is opting out of all rollouts. */ +"Settings.Rollouts.Title.v148" = "Allow Remote Improvements"; + /* This is the footer text for the setting that toggles the Summarize feature under the Summarize settings section. */ "Settings.Summarize.FooterTitle.v142" = "Provides access to summarize pages."; diff --git a/firefox-ios/Shared/Supporting Files/en-GB.lproj/Settings.strings b/firefox-ios/Shared/Supporting Files/en-GB.lproj/Settings.strings index d1cdb61ab463e..a0c76ce67bac7 100644 --- a/firefox-ios/Shared/Supporting Files/en-GB.lproj/Settings.strings +++ b/firefox-ios/Shared/Supporting Files/en-GB.lproj/Settings.strings @@ -235,12 +235,30 @@ /* Title for a link that explains what Mozilla means by Studies */ "Settings.Studies.Link.v136" = "Learn More"; +/* Title for a link that explains what Mozilla means by Studies */ +"Settings.Studies.Link.v148" = "Learn More"; + /* A short description that explains that Mozilla is running studies */ "Settings.Studies.Message.v136" = "Try out features and ideas before they’re released to everyone."; +/* A short description that explains that Mozilla is running studies. %@ is the app name (e.g. Firefox). */ +"Settings.Studies.Message.v148" = "%@ randomly selects users to test features, which improves quality for everyone."; + /* Label used as a toggle item in Settings. When this is off, the user is opting out of all studies. */ "Settings.Studies.Title.v136" = "Install and Run Studies"; +/* Label used as a toggle item in Settings. When this is off, the user is opting out of all studies. */ +"Settings.Studies.Title.v148" = "Allow Feature Studies"; + +/* Title for a link that explains what Mozilla means by Rollouts */ +"Settings.Rollouts.Link.v148" = "Learn More"; + +/* A short description that explains that Mozilla may change features remotely. %@ is the app name (e.g. Firefox). */ +"Settings.Rollouts.Message.v148" = "%@ will improve features, performance, and stability between updates. Changes applied remotely."; + +/* Label used as a toggle item in Settings. When this is off, the user is opting out of all rollouts. */ +"Settings.Rollouts.Title.v148" = "Allow Remote Improvements"; + /* This is the footer text for the setting that toggles the Summarize feature under the Summarize settings section. */ "Settings.Summarize.FooterTitle.v142" = "Provides access to summarise pages."; @@ -291,4 +309,3 @@ /* This is the title for the setting that toggles the Translation feature that allows users to translate web pages under the Translation settings section. */ "Settings.Translation.ToggleTitle.v145" = "Enable Translations"; - diff --git a/focus-ios/Blockzilla/UIComponents/UIConstants.swift b/focus-ios/Blockzilla/UIComponents/UIConstants.swift index be920b2cb58c9..ca1de98b0105d 100644 --- a/focus-ios/Blockzilla/UIComponents/UIConstants.swift +++ b/focus-ios/Blockzilla/UIComponents/UIConstants.swift @@ -199,9 +199,14 @@ struct UIConstants { static let labelBlockOther = NSLocalizedString("Settings.toggleBlockOther2", value: "Content", comment: "Label for the checkbox to toggle Other trackers") static let labelBlockFonts = NSLocalizedString("Settings.toggleBlockFonts", value: "Block web fonts", comment: "Label for toggle on main screen") static let labelSendAnonymousUsageData = NSLocalizedString("Settings.toggleSendUsageData", value: "Send usage data", comment: "Label for Send Usage Data toggle on main screen") - static let detailTextSendUsageData = NSLocalizedString("Settings.detailTextSendUsageData", value: "Mozilla strives to collect only what we need to provide and improve %@ for everyone.", comment: "Description associated to the Send Usage Data toggle on main screen. %@ is the app name (for example “Firefox Focus” or ”Firefox Klar”).") + static let detailTextSendUsageData = NSLocalizedString("Settings.detailTextSendUsageData", value: "Mozilla strives to collect only what we need to provide and improve %@ for everyone.", comment: "Description associated to the Send Usage Data toggle on main screen. %@ is the app name (for example \"Firefox Focus\" or \"Firefox Klar\").") + static let detailTextSendUsageDataV2 = NSLocalizedString("Settings.detailTextSendUsageData.v2", value: "Mozilla strives to collect only what we need to provide and improve %@ for everyone.", comment: "Description associated to the Send Usage Data toggle on main screen. %@ is the app name (for example \"Firefox Focus\" or \"Firefox Klar\").") static let labelStudies = NSLocalizedString("Settings.toggleStudies", value: "Studies", comment: "Label for Studies toggle on the settings screen") - static let detailTextStudies = NSLocalizedString("Settings.detailTextStudies", value: "%@ may install and run studies from time to time.", comment: "Description associated to the Studies toggle on the settings screen. %@ is the app name (for example “Firefox Focus” or ”Firefox Klar”).") + static let detailTextStudies = NSLocalizedString("Settings.detailTextStudies", value: "%@ may install and run studies from time to time.", comment: "Description associated to the Studies toggle on the settings screen. %@ is the app name (for example \"Firefox Focus\" or \"Firefox Klar\").") + static let labelStudiesV2 = NSLocalizedString("Settings.toggleStudies.v2", value: "Allow Feature Studies", comment: "Label for Studies toggle on the settings screen") + static let detailTextStudiesV2 = NSLocalizedString("Settings.detailTextStudies.v2", value: "%@ randomly selects users to test features, which improves quality for everyone.", comment: "Description associated to the Studies toggle on the settings screen. %@ is the app name (for example \"Firefox Focus\" or \"Firefox Klar\").") + static let labelRollouts = NSLocalizedString("Settings.toggleRollouts", value: "Allow Remote Improvements", comment: "Label for Rollouts toggle on the settings screen") + static let detailTextRollouts = NSLocalizedString("Settings.detailTextRollouts", value: "%@ will improve features, performance, and stability between updates. Changes applied remotely.", comment: "Description associated to the Rollouts toggle on the settings screen. %@ is the app name (for example \"Firefox Focus\" or \"Firefox Klar\").") static let labelCrashReports = NSLocalizedString( "Settings.toggleCrashReports", value: "Automatically Send Crash Reports", From a606e5baff0fcec15bd7ed1ed58dbc478977c19c Mon Sep 17 00:00:00 2001 From: tomerqodo Date: Sun, 25 Jan 2026 12:06:56 +0200 Subject: [PATCH 2/2] update pr --- .github/l10n/linter_config_ios.json | 2 +- firefox-ios/Shared/Strings.swift | 2 +- .../Blockzilla/UIComponents/UIConstants.swift | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/l10n/linter_config_ios.json b/.github/l10n/linter_config_ios.json index f2c7a4c7394b1..9aa1ec09824f3 100644 --- a/.github/l10n/linter_config_ios.json +++ b/.github/l10n/linter_config_ios.json @@ -6,7 +6,7 @@ "quotes": { "enabled": true, "exclusions": [ - "firefox-ios.xliff:Settings.Studies.Message.v136" + "firefox-ios.xliff:Settings.Studies.Message.v148" ] }, "placeables": { diff --git a/firefox-ios/Shared/Strings.swift b/firefox-ios/Shared/Strings.swift index a89d16984c8dd..2c438233bdf93 100644 --- a/firefox-ios/Shared/Strings.swift +++ b/firefox-ios/Shared/Strings.swift @@ -6258,7 +6258,7 @@ extension String { key: "Settings.Rollouts.Message.v148", tableName: "Settings", value: "%@ will improve features, performance, and stability between updates. Changes applied remotely.", - comment: "A short description that explains that Mozilla may change features remotely. %@ is the app name (e.g. Firefox).") + comment: "A short description that explains that Mozilla may change features remotely. %1$@ is the app name (e.g. Firefox).") public static let SettingsSiriSectionName = MZLocalizedString( key: "Settings.Siri.SectionName", tableName: nil, diff --git a/focus-ios/Blockzilla/UIComponents/UIConstants.swift b/focus-ios/Blockzilla/UIComponents/UIConstants.swift index ca1de98b0105d..8ef4d37cd012f 100644 --- a/focus-ios/Blockzilla/UIComponents/UIConstants.swift +++ b/focus-ios/Blockzilla/UIComponents/UIConstants.swift @@ -413,4 +413,19 @@ struct UIConstants { static let googleAmpURLPrefix = "https://www.google.com/amp/s/" static let truncateLeader = "..." } + + // Helper class for formatting Study and Rollout settings text for display + class SettingsTextFormatter { + static let shared = SettingsTextFormatter() + + private init() {} + + func formatStudiesText(appName: String) -> String { + return String(format: strings.detailTextStudies, appName) + } + + func formatRolloutsText(appName: String) -> String { + return String(format: strings.detailTextRollouts, appName) + } + } }