Mercurial > public > simoleon
diff Simoleon/ContentView.swift @ 53:b0bce2c8e4a9
Refactor UK spelling to US
author | Dennis Concepción Martín <dennisconcepcionmartin@gmail.com> |
---|---|
date | Tue, 27 Jul 2021 09:44:51 +0100 |
parents | 7a6a7c677851 |
children | aa451ca55e48 |
line wrap: on
line diff
--- a/Simoleon/ContentView.swift Mon Jul 26 21:54:30 2021 +0100 +++ b/Simoleon/ContentView.swift Tue Jul 27 09:44:51 2021 +0100 @@ -13,41 +13,39 @@ @State private var tab: Tab = .convert + private enum Tab { + case convert, favorites, settings + } + var body: some View { TabView(selection: $tab) { Conversion(currencyPair: defaultCurrency.first?.pair ?? "USD/GBP") .tabItem { - Text("Convert", comment: "Tab bar button to show conversion") - Image(systemName: "arrow.counterclockwise.circle") + Label("Convert", systemImage: "arrow.counterclockwise.circle") } .tag(Tab.convert) .accessibilityIdentifier("Convert") - Favourites() + Favorites() .tabItem { - Text("Favourites", comment: "Tab bar button to show favourites") - Image(systemName: "star") + Label("Favorites", systemImage: "star") } - .tag(Tab.favourites) - .accessibilityIdentifier("Favourites") + .tag(Tab.favorites) + .accessibilityIdentifier("Favorites") Settings() .tabItem { - Text("Settings", comment: "Tab bar button to show settings") - Image(systemName: "gear") + Label("Settings", systemImage: "gear") } .tag(Tab.settings) .accessibilityIdentifier("Settings") } } - - private enum Tab { - case convert, favourites, settings - } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() + .environment(\.locale, Locale(identifier: "es")) } }