Skip to content

Commit a8860c2

Browse files
authored
Merge pull request #7731 from woocommerce/issue/widget-copies
Widgets: Updates copies
2 parents fb0fc62 + 5599ef4 commit a8860c2

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

WooCommerce/Classes/Tools/Shared Site Settings/SelectedSiteSettings.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ extension SelectedSiteSettings {
6363
ServiceLocator.currencySettings.updateCurrencyOptions(with: $0)
6464
}
6565

66+
// Needed to correcly format the widget data.
6667
UserDefaults.group?[.defaultStoreCurrencySettings] = try? JSONEncoder().encode(ServiceLocator.currencySettings)
6768
}
6869
}

WooCommerce/Classes/Yosemite/DefaultStoresManager.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,8 @@ private extension DefaultStoresManager {
511511
UserDefaults.group?[.defaultStoreID] = siteID
512512
UserDefaults.group?[.defaultStoreName] = sessionManager.defaultSite?.name
513513

514+
// Currency Settings are stored in `SelectedSiteSettings.defaultStoreCurrencySettings`
515+
514516
// Reload widgets UI
515517
WidgetCenter.shared.reloadAllTimelines()
516518
}

WooCommerce/StoreWidgets/StoreInfoWidget.swift

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ struct StoreInfoWidget: Widget {
2222
}
2323
}
2424
}
25-
.configurationDisplayName(Localization.storeInfo)
25+
.configurationDisplayName(Localization.title)
26+
.description(Localization.description)
2627
.supportedFamilies(enableWidgets ? [.systemMedium] : [])
2728
}
2829
}
@@ -159,11 +160,16 @@ private struct UnableToFetchView: View {
159160
///
160161
private extension StoreInfoWidget {
161162
enum Localization {
162-
static let storeInfo = AppLocalizedString(
163+
static let title = AppLocalizedString(
163164
"storeWidgets.displayName",
164-
value: "Store Info",
165+
value: "Today",
165166
comment: "Widget title, displayed when selecting which widget to add"
166167
)
168+
static let description = AppLocalizedString(
169+
"storeWidgets.description",
170+
value: "WooCommerce Stats Today",
171+
comment: "Widget description, displayed when selecting which widget to add"
172+
)
167173
}
168174
}
169175

@@ -193,7 +199,7 @@ private extension StoreInfoView {
193199
)
194200
static func updatedAt(_ updatedTime: String) -> LocalizedString {
195201
let format = AppLocalizedString("storeWidgets.infoView.updatedAt",
196-
value: "as of %1$@",
202+
value: "As of %1$@",
197203
comment: "Displays the time when the widget was last updated. %1$@ is the time to render.")
198204
return LocalizedString.localizedStringWithFormat(format, updatedTime)
199205
}

0 commit comments

Comments
 (0)