Skip to content

Commit

Permalink
Refactor FXIOS-9719 Update Twitter name String to X (#21630)
Browse files Browse the repository at this point in the history
* Update the "Twitter" title for the Default Suggested Tile to contain X (new name).

* Fix UI test.

* Update firefox-ios/Client/Frontend/Strings.swift

Co-authored-by: roux g. buciu <[email protected]>

* Test fix.

---------

Co-authored-by: roux g. buciu <[email protected]>
  • Loading branch information
ih-codes and adudenamedruby authored Aug 27, 2024
1 parent a20fc22 commit 6eaddba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions firefox-ios/Client/Frontend/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6791,6 +6791,11 @@ extension String {
tableName: nil,
value: nil,
comment: "Tile title for Twitter")
public static let DefaultSuggestedX = MZLocalizedString(
key: "SuggestedSites.X.Title.v131",
tableName: "SuggestedSites",
value: "X",
comment: "Title for X (formerly Twitter) tile in the suggested sites section of the homepage.")
}

// MARK: - Credential Provider
Expand Down
2 changes: 1 addition & 1 deletion firefox-ios/Storage/DefaultSuggestedSites.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ open class DefaultSuggestedSites {
imageUrl: "asset://suggestedsites_twitter",
faviconUrl: "asset://defaultFavicon",
trackingId: 628,
title: .DefaultSuggestedTwitter
title: .DefaultSuggestedX
)
],
"zh_CN": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let newTopSite = [
"topSiteLabel": "Mozilla",
"bookmarkLabel": "Internet for people, not profit — Mozilla (US)"
]
let allDefaultTopSites = ["Facebook", "YouTube", "Amazon", "Wikipedia", "Twitter"]
let allDefaultTopSites = ["Facebook", "YouTube", "Amazon", "Wikipedia", "X"]

class ActivityStreamTest: BaseTestCase {
typealias TopSites = AccessibilityIdentifiers.FirefoxHomepage.TopSites
Expand Down Expand Up @@ -53,7 +53,7 @@ class ActivityStreamTest: BaseTestCase {
// There should be 5 top sites by default
checkNumberOfExpectedTopSites(numberOfExpectedTopSites: 5)
// Check their names so that test is added to Smoketest
mozWaitForElementToExist(app.collectionViews.cells.staticTexts["Twitter"])
mozWaitForElementToExist(app.collectionViews.cells.staticTexts["X"])
mozWaitForElementToExist(app.collectionViews.cells.staticTexts["Amazon"])
mozWaitForElementToExist(app.collectionViews.cells.staticTexts["Wikipedia"])
mozWaitForElementToExist(app.collectionViews.cells.staticTexts["YouTube"])
Expand Down

0 comments on commit 6eaddba

Please sign in to comment.