Skip to content

Commit

Permalink
Refactor FXIOS-5658 [v112] Update localized string from Sites to Pages (
Browse files Browse the repository at this point in the history
mozilla-mobile#13207)

* refact: Update string from Sites to Pages

* refact: Change version to v112

* reafact: Adjust testConfigureGroupCell()
  • Loading branch information
PARAIPAN9 authored Feb 21, 2023
1 parent 6279bbb commit 6aa0c91
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Client/Frontend/Browser/Tabs/ASGroup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extension ASGroup: HighlightItem {
}

var description: String? {
return String.localizedStringWithFormat(.FirefoxHomepage.Common.SitesCount, groupedItems.count)
return String.localizedStringWithFormat(.FirefoxHomepage.Common.PagesCount, groupedItems.count)
}

var siteUrl: URL? {
Expand Down
8 changes: 4 additions & 4 deletions Client/Frontend/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ extension String {
/// Identifiers of all new strings should begin with `FirefoxHome.`
public struct FirefoxHomepage {
public struct Common {
public static let SitesCount = MZLocalizedString(
"FirefoxHomepage.Common.SitesCount.v101",
public static let PagesCount = MZLocalizedString(
"FirefoxHomepage.Common.PagesCount.v112",
tableName: nil,
value: "Sites: %d",
comment: "Label showing how many sites there is in a search group. %d represents a number")
value: "Pages: %d",
comment: "Label showing how many pages there is in a search group. %d represents a number")
}

public struct CustomizeHomepage {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class HistoryHighlightsViewModelTests: XCTestCase {
XCTAssertNotNil(cell)
XCTAssertFalse(cell!.isFillerCell)
XCTAssertEqual(cell!.itemDescription.text,
String.localizedStringWithFormat(.FirefoxHomepage.Common.SitesCount, 2))
String.localizedStringWithFormat(.FirefoxHomepage.Common.PagesCount, 2))
}

func testDidSelectItem() {
Expand Down

0 comments on commit 6aa0c91

Please sign in to comment.