Skip to content
Open
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
4 changes: 3 additions & 1 deletion .github/l10n/linter_config_ios.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
},
"quotes": {
"enabled": true,
"exclusions": []
"exclusions": [
"firefox-ios.xliff:Settings.Studies.Message.v148"
]
},
"placeables": {
"enabled": true,
Expand Down
30 changes: 30 additions & 0 deletions firefox-ios/Shared/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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. %1$@ is the app name (e.g. Firefox).")
public static let SettingsSiriSectionName = MZLocalizedString(
key: "Settings.Siri.SectionName",
tableName: nil,
Expand Down
18 changes: 18 additions & 0 deletions firefox-ios/Shared/Supporting Files/en-CA.lproj/Settings.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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.";

Expand Down
19 changes: 18 additions & 1 deletion firefox-ios/Shared/Supporting Files/en-GB.lproj/Settings.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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.";

Expand Down Expand Up @@ -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";

24 changes: 22 additions & 2 deletions focus-ios/Blockzilla/UIComponents/UIConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -408,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)
}
}
}