Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
For #20764 separate learn more string
Browse files Browse the repository at this point in the history
  • Loading branch information
Amejia481 committed Aug 16, 2021
1 parent b4bcaa0 commit 22e9e06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ class StudiesView(
@VisibleForTesting
internal fun bindDescription() {
val sumoUrl = SupportUtils.getSumoURLForTopic(context, OPT_OUT_STUDIES)
val rawText =
context.getString(R.string.studies_description, sumoUrl)
val description = context.getString(R.string.studies_description)
val learnMore = context.getString(R.string.studies_learn_more)
val rawText = "$description <a href=\"$sumoUrl\">$learnMore</a>"
val text = HtmlCompat.fromHtml(rawText, HtmlCompat.FROM_HTML_MODE_COMPACT)

val spannableStringBuilder = SpannableStringBuilder(text)
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,10 @@
<string name="studies_remove">Remove</string>
<!-- Title of the active section on the studies list -->
<string name="studies_active">Active</string>
<!-- Description for studies, it indicates why Firefox use studies and links to an article for more information. The %1 will be replaced with the corresponding article URL -->
<string name="studies_description"><![CDATA[Firefox may install and run studies from time to time. <a href="%1$s">Learn more</a>]]></string>
<!-- Description for studies, it indicates why Firefox use studies -->
<string name="studies_description">Firefox may install and run studies from time to time.</string>
<!-- Learn more link for studies, links to an article for more information about studies. -->
<string name="studies_learn_more">Learn more</string>

<!-- Sessions -->
<!-- Title for the list of tabs -->
Expand Down

0 comments on commit 22e9e06

Please sign in to comment.