Mercurial > public > simoleon
changeset 53:b0bce2c8e4a9
Refactor UK spelling to US
line wrap: on
line diff
--- a/Simoleon.xcodeproj/project.pbxproj Mon Jul 26 21:54:30 2021 +0100 +++ b/Simoleon.xcodeproj/project.pbxproj Tue Jul 27 09:44:51 2021 +0100 @@ -32,10 +32,10 @@ 95B5F53326AADE4B00BDCE89 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 95B5F52D26AADE4B00BDCE89 /* Localizable.strings */; }; 95B5F53426AADE4B00BDCE89 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 95B5F52F26AADE4B00BDCE89 /* InfoPlist.strings */; }; 95C5179126A5DC8E00BC2B24 /* ConditionalWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C5179026A5DC8E00BC2B24 /* ConditionalWrapper.swift */; }; - 95C5179926A5EC9F00BC2B24 /* FavouriteButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C5179826A5EC9F00BC2B24 /* FavouriteButton.swift */; }; - 95C5179C26A5EFBE00BC2B24 /* Favourite+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C5179A26A5EFBE00BC2B24 /* Favourite+CoreDataClass.swift */; }; - 95C5179D26A5EFBE00BC2B24 /* Favourite+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C5179B26A5EFBE00BC2B24 /* Favourite+CoreDataProperties.swift */; }; - 95C5179F26A5F34200BC2B24 /* Favourites.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C5179E26A5F34200BC2B24 /* Favourites.swift */; }; + 95C5179926A5EC9F00BC2B24 /* FavoriteButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C5179826A5EC9F00BC2B24 /* FavoriteButton.swift */; }; + 95C5179C26A5EFBE00BC2B24 /* Favorite+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C5179A26A5EFBE00BC2B24 /* Favorite+CoreDataClass.swift */; }; + 95C5179D26A5EFBE00BC2B24 /* Favorite+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C5179B26A5EFBE00BC2B24 /* Favorite+CoreDataProperties.swift */; }; + 95C5179F26A5F34200BC2B24 /* Favorites.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C5179E26A5F34200BC2B24 /* Favorites.swift */; }; 95C517A126A5F6C000BC2B24 /* ResignKeyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C517A026A5F6C000BC2B24 /* ResignKeyboard.swift */; }; 95C5B2282697752600941585 /* SimoleonApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C5B2272697752600941585 /* SimoleonApp.swift */; }; 95C5B22C2697752700941585 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 95C5B22B2697752700941585 /* Assets.xcassets */; }; @@ -98,10 +98,10 @@ 95B5F53526AADE5200BDCE89 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; }; 95B5F53626AADE5500BDCE89 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 95C5179026A5DC8E00BC2B24 /* ConditionalWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConditionalWrapper.swift; sourceTree = "<group>"; }; - 95C5179826A5EC9F00BC2B24 /* FavouriteButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavouriteButton.swift; sourceTree = "<group>"; }; - 95C5179A26A5EFBE00BC2B24 /* Favourite+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Favourite+CoreDataClass.swift"; sourceTree = "<group>"; }; - 95C5179B26A5EFBE00BC2B24 /* Favourite+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Favourite+CoreDataProperties.swift"; sourceTree = "<group>"; }; - 95C5179E26A5F34200BC2B24 /* Favourites.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Favourites.swift; sourceTree = "<group>"; }; + 95C5179826A5EC9F00BC2B24 /* FavoriteButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavoriteButton.swift; sourceTree = "<group>"; }; + 95C5179A26A5EFBE00BC2B24 /* Favorite+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Favorite+CoreDataClass.swift"; sourceTree = "<group>"; }; + 95C5179B26A5EFBE00BC2B24 /* Favorite+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Favorite+CoreDataProperties.swift"; sourceTree = "<group>"; }; + 95C5179E26A5F34200BC2B24 /* Favorites.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Favorites.swift; sourceTree = "<group>"; }; 95C517A026A5F6C000BC2B24 /* ResignKeyboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResignKeyboard.swift; sourceTree = "<group>"; }; 95C5B2242697752600941585 /* Simoleon.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Simoleon.app; sourceTree = BUILT_PRODUCTS_DIR; }; 95C5B2272697752600941585 /* SimoleonApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimoleonApp.swift; sourceTree = "<group>"; }; @@ -159,8 +159,8 @@ children = ( 950A377526A820F400CAB175 /* DefaultCurrency+CoreDataClass.swift */, 950A377626A820F400CAB175 /* DefaultCurrency+CoreDataProperties.swift */, - 95C5179A26A5EFBE00BC2B24 /* Favourite+CoreDataClass.swift */, - 95C5179B26A5EFBE00BC2B24 /* Favourite+CoreDataProperties.swift */, + 95C5179A26A5EFBE00BC2B24 /* Favorite+CoreDataClass.swift */, + 95C5179B26A5EFBE00BC2B24 /* Favorite+CoreDataProperties.swift */, 95AEBC9A26A04A4200613729 /* CurrencyMetadataModel.swift */, 95AEBCA226A0900E00613729 /* CurrencyQuoteModel.swift */, ); @@ -187,12 +187,12 @@ path = Resources; sourceTree = "<group>"; }; - 95B5F52526AADE4B00BDCE89 /* Localisation */ = { + 95B5F52526AADE4B00BDCE89 /* Localization */ = { isa = PBXGroup; children = ( 95B5F52626AADE4B00BDCE89 /* en.xcloc */, ); - path = Localisation; + path = Localization; sourceTree = "<group>"; }; 95B5F52626AADE4B00BDCE89 /* en.xcloc */ = { @@ -268,7 +268,7 @@ 95AEBC9426A03ECB00613729 /* ContentView.swift */, 95B54F4E26A4AC52001DC0D8 /* ContentViewPad.swift */, 95B54F4326A4842C001DC0D8 /* Conversion.swift */, - 95C5179E26A5F34200BC2B24 /* Favourites.swift */, + 95C5179E26A5F34200BC2B24 /* Favorites.swift */, 957065E126A5FE0400523E68 /* Settings.swift */, 95D8C8C626A95D2900BCC188 /* SubscriptionPaywall.swift */, 95C5B22B2697752700941585 /* Assets.xcassets */, @@ -280,7 +280,7 @@ 95559331269B094A000FD726 /* Models */, 95559338269B0AAA000FD726 /* Functions */, 9555933B269B0DF9000FD726 /* Resources */, - 95B5F52526AADE4B00BDCE89 /* Localisation */, + 95B5F52526AADE4B00BDCE89 /* Localization */, 95C5B22D2697752700941585 /* Preview Content */, ); path = Simoleon; @@ -329,7 +329,7 @@ 95B54F4926A4A450001DC0D8 /* ConversionBox.swift */, 95B54F5026A4ACAC001DC0D8 /* Sidebar.swift */, 95C5179026A5DC8E00BC2B24 /* ConditionalWrapper.swift */, - 95C5179826A5EC9F00BC2B24 /* FavouriteButton.swift */, + 95C5179826A5EC9F00BC2B24 /* FavoriteButton.swift */, 95C517A026A5F6C000BC2B24 /* ResignKeyboard.swift */, 95D8C8CC26A9784500BCC188 /* SubscribeButton.swift */, 95D8C8CE26A98A7900BCC188 /* RestoreButton.swift */, @@ -482,8 +482,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 95C5179926A5EC9F00BC2B24 /* FavouriteButton.swift in Sources */, - 95C5179C26A5EFBE00BC2B24 /* Favourite+CoreDataClass.swift in Sources */, + 95C5179926A5EC9F00BC2B24 /* FavoriteButton.swift in Sources */, + 95C5179C26A5EFBE00BC2B24 /* Favorite+CoreDataClass.swift in Sources */, 950A377826A820F800CAB175 /* DefaultCurrency+CoreDataClass.swift in Sources */, 95C5B2312697752700941585 /* Persistence.swift in Sources */, 9585BB1226A6B71B00E3193E /* ReadConfig.swift in Sources */, @@ -494,8 +494,8 @@ 9585BB1A26A6E8FD00E3193E /* SimpleSuccess.swift in Sources */, 9555933A269B0AB8000FD726 /* ParseJson.swift in Sources */, 95D8C8CF26A98A7900BCC188 /* RestoreButton.swift in Sources */, - 95C5179D26A5EFBE00BC2B24 /* Favourite+CoreDataProperties.swift in Sources */, - 95C5179F26A5F34200BC2B24 /* Favourites.swift in Sources */, + 95C5179D26A5EFBE00BC2B24 /* Favorite+CoreDataProperties.swift in Sources */, + 95C5179F26A5F34200BC2B24 /* Favorites.swift in Sources */, 95C5B2282697752600941585 /* SimoleonApp.swift in Sources */, 95B54F4A26A4A450001DC0D8 /* ConversionBox.swift in Sources */, 95D8C8C726A95D2900BCC188 /* SubscriptionPaywall.swift in Sources */, @@ -695,7 +695,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = Simoleon/Simoleon.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Simoleon/Preview Content\""; DEVELOPMENT_TEAM = MTX83R5H8X; ENABLE_PREVIEWS = YES; @@ -705,7 +705,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.2; + MARKETING_VERSION = 1.3; PRODUCT_BUNDLE_IDENTIFIER = io.dennistech.Simoleon; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; @@ -720,7 +720,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = Simoleon/Simoleon.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Simoleon/Preview Content\""; DEVELOPMENT_TEAM = MTX83R5H8X; ENABLE_PREVIEWS = YES; @@ -730,7 +730,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.2; + MARKETING_VERSION = 1.3; PRODUCT_BUNDLE_IDENTIFIER = io.dennistech.Simoleon; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0;
Binary file Simoleon.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate has changed
--- 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")) } }
--- a/Simoleon/Conversion.swift Mon Jul 26 21:54:30 2021 +0100 +++ b/Simoleon/Conversion.swift Tue Jul 27 09:44:51 2021 +0100 @@ -33,9 +33,8 @@ .padding(.horizontal) ) } - .accessibilityIdentifier("CurrencySelector") - FavouriteButton(currencyPair: currencyPair) + FavoriteButton(currencyPair: currencyPair) } ConversionBox( @@ -52,7 +51,7 @@ } } .onAppear(perform: request) - .navigationTitle(Text("Convert", comment: "Navigation title")) + .navigationTitle("Convert") .toolbar { ToolbarItem(placement: .navigationBarTrailing) { if amountIsEditing { @@ -60,7 +59,7 @@ UIApplication.shared.dismissKeyboard() amountIsEditing = false }) { - Text("Cancel", comment: "Button to stop editing textfield") + Text("Cancel") } } }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Simoleon/Favorites.swift Tue Jul 27 09:44:51 2021 +0100 @@ -0,0 +1,67 @@ +// +// Favorites.swift +// Simoleon +// +// Created by Dennis Concepción Martín on 19/07/2021. +// + +import SwiftUI + +struct Favorites: View { + @Environment(\.managedObjectContext) private var viewContext + @FetchRequest( + sortDescriptors: [NSSortDescriptor(keyPath: \Favorite.currencyPair, ascending: true)], + animation: .default) private var favorite: FetchedResults<Favorite> + + var body: some View { + VStack { + if favorite.isEmpty { + Group { + Text("Tap ") + Text(Image(systemName: "star")) + Text("to add a currency pair to favorites") + .padding(.top, 5) + } + .foregroundColor(Color(.systemGray)) + } else { + List { + ForEach(favorite) { favorite in + NavigationLink(destination: Conversion(showNavigationView: false, currencyPair: favorite.currencyPair)) { + CurrencyRow(currencyPair: favorite.currencyPair) + } + } + .onDelete(perform: removeFromFavorites) + } + .listStyle(PlainListStyle()) + } + } + .navigationTitle("Favorites") + .toolbar { + #if os(iOS) + EditButton() + #endif + } + .if(UIDevice.current.userInterfaceIdiom == .phone) { content in + NavigationView { content } + } + } + + private func removeFromFavorites(offsets: IndexSet) { + withAnimation { + offsets.map { favorite[$0] }.forEach(viewContext.delete) + + do { + try viewContext.save() + } catch { + let nsError = error as NSError + fatalError("Unresolved error \(nsError), \(nsError.userInfo)") + } + } + } +} + +struct Favorites_Previews: PreviewProvider { + static var previews: some View { + Favorites() + .environment(\.managedObjectContext, PersistenceController.preview.container.viewContext) + } +}
--- a/Simoleon/Favourites.swift Mon Jul 26 21:54:30 2021 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -// -// Favourites.swift -// Simoleon -// -// Created by Dennis Concepción Martín on 19/07/2021. -// - -import SwiftUI - -struct Favourites: View { - @Environment(\.managedObjectContext) private var viewContext - @FetchRequest( - sortDescriptors: [NSSortDescriptor(keyPath: \Favourite.currencyPair, ascending: true)], - animation: .default) private var favourite: FetchedResults<Favourite> - - var body: some View { - VStack { - if favourite.isEmpty { - Group { - Text("Tap ", comment: "First line when favourites are empty") + Text(Image(systemName: "star")) - Text("to add a currency pair to favourites", comment: "Finish line when favourites are empty") - .padding(.top, 5) - } - .foregroundColor(Color(.systemGray)) - } else { - List { - ForEach(favourite) { favourite in - NavigationLink(destination: Conversion(showNavigationView: false, currencyPair: favourite.currencyPair)) { - CurrencyRow(currencyPair: favourite.currencyPair) - } - } - .onDelete(perform: removeFromFavourites) - } - .listStyle(PlainListStyle()) - } - } - .navigationTitle(Text("Favourites", comment: "Navigation title")) - .toolbar { - #if os(iOS) - EditButton() - #endif - } - .if(UIDevice.current.userInterfaceIdiom == .phone) { content in - NavigationView { content } - } - } - - private func removeFromFavourites(offsets: IndexSet) { - withAnimation { - offsets.map { favourite[$0] }.forEach(viewContext.delete) - - do { - try viewContext.save() - } catch { - let nsError = error as NSError - fatalError("Unresolved error \(nsError), \(nsError.userInfo)") - } - } - } -} - -struct Favourites_Previews: PreviewProvider { - static var previews: some View { - Favourites() - .environment(\.managedObjectContext, PersistenceController.preview.container.viewContext) - } -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Simoleon/Helpers/FavoriteButton.swift Tue Jul 27 09:44:51 2021 +0100 @@ -0,0 +1,103 @@ +// +// FavoriteButton.swift +// Simoleon +// +// Created by Dennis Concepción Martín on 19/07/2021. +// + +import SwiftUI + +struct FavoriteButton: View { + var currencyPair: String + + @Environment(\.managedObjectContext) private var viewContext + @FetchRequest(sortDescriptors: []) private var favorite: FetchedResults<Favorite> + + @State private var starSymbol = "star" + + var body: some View { + let favoriteCurrencyPairs = favorite.map { $0.currencyPair } + Button(action: { favoriteAction(favoriteCurrencyPairs) }) { + RoundedRectangle(cornerRadius: 15) + .foregroundColor(Color(.secondarySystemBackground)) + .frame(width: 60, height: 60) + .overlay( + Image(systemName: generateStar(favoriteCurrencyPairs)) + .font(.system(size: 28)) + .foregroundColor(Color(.systemYellow)) + ) + } + } + + /* + If currency pair is favorite: + * Button action is to remove from favorites + else: + * Button action is to add to favorites + */ + private func favoriteAction(_ favoriteCurrencyPairs: [String]) { + if favoriteCurrencyPairs.contains(currencyPair) { + removeFromFavorites() + } else { + addToFavorites() + } + + simpleSuccess() + } + + /* + if currency pair is favorite: + * Return "star.fill" symbol + else: + * Return "star" + */ + private func generateStar(_ favoriteCurrencyPairs: [String]) -> String { + if favoriteCurrencyPairs.contains(currencyPair) { + return "star.fill" + } else { + return "star" + } + } + + /* + * Get first favorite core data object that matches the specified currency pair + * Delete it + */ + private func removeFromFavorites() { + withAnimation { + let favoriteObject = favorite.first(where: { $0.currencyPair == currencyPair }) + viewContext.delete(favoriteObject ?? Favorite()) + + do { + try viewContext.save() + } catch { + let nsError = error as NSError + fatalError("Unresolved error \(nsError), \(nsError.userInfo)") + } + } + } + + /* + * Create a favorite core data object + * Save it + */ + private func addToFavorites() { + withAnimation { + let favorite = Favorite(context: viewContext) + favorite.currencyPair = currencyPair + + do { + try viewContext.save() + } catch { + let nsError = error as NSError + fatalError("Unresolved error \(nsError), \(nsError.userInfo)") + } + } + } +} + +struct FavoriteButton_Previews: PreviewProvider { + static var previews: some View { + FavoriteButton(currencyPair: "USD/GBP") + } +}
--- a/Simoleon/Helpers/FavouriteButton.swift Mon Jul 26 21:54:30 2021 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -// -// FavouriteButton.swift -// Simoleon -// -// Created by Dennis Concepción Martín on 19/07/2021. -// - -import SwiftUI - -struct FavouriteButton: View { - var currencyPair: String - - @Environment(\.managedObjectContext) private var viewContext - @FetchRequest(sortDescriptors: []) private var favourite: FetchedResults<Favourite> - - @State private var starSymbol = "star" - - var body: some View { - let favouriteCurrencyPairs = favourite.map { $0.currencyPair } - Button(action: { favouriteAction(favouriteCurrencyPairs) }) { - RoundedRectangle(cornerRadius: 15) - .foregroundColor(Color(.secondarySystemBackground)) - .frame(width: 60, height: 60) - .overlay( - Image(systemName: generateStar(favouriteCurrencyPairs)) - .font(.system(size: 28)) - .foregroundColor(Color(.systemYellow)) - ) - } - } - - /* - If currency pair is favourite: - * Button action is to remove from favourites - else: - * Button action is to add to favourites - */ - private func favouriteAction(_ favouriteCurrencyPairs: [String]) { - if favouriteCurrencyPairs.contains(currencyPair) { - removeFromFavourites() - } else { - addToFavourites() - } - - simpleSuccess() - } - - /* - if currency pair is favourite: - * Return "star.fill" symbol - else: - * Return "star" - */ - private func generateStar(_ favouriteCurrencyPairs: [String]) -> String { - if favouriteCurrencyPairs.contains(currencyPair) { - return "star.fill" - } else { - return "star" - } - } - - /* - * Get first favourite core data object that matches the specified currency pair - * Delete it - */ - private func removeFromFavourites() { - withAnimation { - let favouriteObject = favourite.first(where: { $0.currencyPair == currencyPair }) - viewContext.delete(favouriteObject ?? Favourite()) - - do { - try viewContext.save() - } catch { - let nsError = error as NSError - fatalError("Unresolved error \(nsError), \(nsError.userInfo)") - } - } - } - - /* - * Create a favourite core data object - * Save it - */ - private func addToFavourites() { - withAnimation { - let favourite = Favourite(context: viewContext) - favourite.currencyPair = currencyPair - - do { - try viewContext.save() - } catch { - let nsError = error as NSError - fatalError("Unresolved error \(nsError), \(nsError.userInfo)") - } - } - } -} - -struct FavouriteButton_Previews: PreviewProvider { - static var previews: some View { - FavouriteButton(currencyPair: "USD/GBP") - } -}
--- a/Simoleon/Helpers/Sidebar.swift Mon Jul 26 21:54:30 2021 +0100 +++ b/Simoleon/Helpers/Sidebar.swift Tue Jul 27 09:44:51 2021 +0100 @@ -14,8 +14,8 @@ Label("Convert", systemImage: "arrow.counterclockwise.circle") } - NavigationLink(destination: Favourites()) { - Label("Favourites", systemImage: "star") + NavigationLink(destination: Favorites()) { + Label("Favorites", systemImage: "star") } NavigationLink(destination: Settings()) { @@ -23,7 +23,7 @@ } } .listStyle(SidebarListStyle()) - .navigationTitle(Text("Categories", comment: "Side bar navigation title")) + .navigationTitle("Categories") } }
--- a/Simoleon/Helpers/SubscriptionFeature.swift Mon Jul 26 21:54:30 2021 +0100 +++ b/Simoleon/Helpers/SubscriptionFeature.swift Tue Jul 27 09:44:51 2021 +0100 @@ -34,8 +34,8 @@ SubscriptionFeature( symbol: "star.circle.fill", colour: Color(.systemYellow), - title: "Favourite currencies", - description: "Save your favourite currencies to access them quickly." + title: "Favorite currencies", + description: "Save your favorite currencies to access them quickly." ) } }
--- a/Simoleon/Localisation/en.xcloc/Localized Contents/en.xliff Mon Jul 26 21:54:30 2021 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,251 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 http://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd"> - <file original="Simoleon/en.lproj/InfoPlist.strings" source-language="en" target-language="en" datatype="plaintext"> - <header> - <tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="12.5.1" build-num="12E507"/> - </header> - <body> - <trans-unit id="CFBundleDisplayName" xml:space="preserve"> - <source>Simoleon</source> - <target>Simoleon</target> - <note>Bundle display name</note> - </trans-unit> - <trans-unit id="CFBundleName" xml:space="preserve"> - <source>Simoleon</source> - <target>Simoleon</target> - <note>Bundle name</note> - </trans-unit> - </body> - </file> - <file original="Simoleon/en.lproj/Localizable.strings" source-language="en" target-language="en" datatype="plaintext"> - <header> - <tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="12.5.1" build-num="12E507"/> - </header> - <body> - <trans-unit id="%.2f" xml:space="preserve"> - <source>%.2f</source> - <target>%.2f</target> - <note>No comment provided by engineer.</note> - </trans-unit> - <trans-unit id="%@ (%@)" xml:space="preserve"> - <source>%1$@ (%2$@)</source> - <target>%1$@ (%2$@)</target> - <note>No comment provided by engineer.</note> - </trans-unit> - <trans-unit id="-" xml:space="preserve"> - <source>-</source> - <target>-</target> - <note>No comment provided by engineer.</note> - </trans-unit> - <trans-unit id="About" xml:space="preserve"> - <source>About</source> - <target>About</target> - <note>No comment provided by engineer.</note> - </trans-unit> - <trans-unit id="All currencies" xml:space="preserve"> - <source>All currencies</source> - <target>All currencies</target> - <note>Section header in currency selector</note> - </trans-unit> - <trans-unit id="Cancel" xml:space="preserve"> - <source>Cancel</source> - <target>Cancel</target> - <note>Button to dismiss currency selector - Button to dismiss paywall modal sheet - Button to stop editing textfield</note> - </trans-unit> - <trans-unit id="Categories" xml:space="preserve"> - <source>Categories</source> - <target>Categories</target> - <note>Side bar navigation title</note> - </trans-unit> - <trans-unit id="Contact" xml:space="preserve"> - <source>Contact</source> - <target>Contact</target> - <note>Button to contact in Settings</note> - </trans-unit> - <trans-unit id="Convert" xml:space="preserve"> - <source>Convert</source> - <target>Convert</target> - <note>Navigation title - Tab bar button to show conversion</note> - </trans-unit> - <trans-unit id="Convert your currency between cryptos, gold, and silver." xml:space="preserve"> - <source>Convert your currency between cryptos, gold, and silver.</source> - <target>Convert your currency between cryptos, gold, and silver.</target> - <note>Subscription feature description</note> - </trans-unit> - <trans-unit id="Cryptos and commodities" xml:space="preserve"> - <source>Cryptos and commodities</source> - <target>Cryptos and commodities</target> - <note>Subscription feature title</note> - </trans-unit> - <trans-unit id="Currencies" xml:space="preserve"> - <source>Currencies</source> - <target>Currencies</target> - <note>Navigation title</note> - </trans-unit> - <trans-unit id="Default currency" xml:space="preserve"> - <source>Default currency</source> - <target>Default currency</target> - <note>Label in locked picker - Picker to select default currency</note> - </trans-unit> - <trans-unit id="Developer's Twitter" xml:space="preserve"> - <source>Developer's Twitter</source> - <target>Developer's Twitter</target> - <note>Button to go to Twitter in Settings</note> - </trans-unit> - <trans-unit id="Enter amount" xml:space="preserve"> - <source>Enter amount</source> - <target>Enter amount</target> - <note>No comment provided by engineer.</note> - </trans-unit> - <trans-unit id="Expires at %@" xml:space="preserve"> - <source>Expires at %@</source> - <target>Expires at %@</target> - <note>Subscriber information</note> - </trans-unit> - <trans-unit id="Favourite currencies" xml:space="preserve"> - <source>Favourite currencies</source> - <target>Favourite currencies</target> - <note>Subscription feature title</note> - </trans-unit> - <trans-unit id="Favourites" xml:space="preserve"> - <source>Favourites</source> - <target>Favourites</target> - <note>Navigation title - Tab bar button to show favourites</note> - </trans-unit> - <trans-unit id="From %@ to %@" xml:space="preserve"> - <source>From %1$@ to %2$@</source> - <target>From %1$@ to %2$@</target> - <note>Conversion from one currency to another</note> - </trans-unit> - <trans-unit id="Have access to almost every currency of the world." xml:space="preserve"> - <source>Have access to almost every currency of the world.</source> - <target>Have access to almost every currency of the world.</target> - <note>Subscription feature description</note> - </trans-unit> - <trans-unit id="Information" xml:space="preserve"> - <source>Information</source> - <target>Information</target> - <note>Button to show subscription information in settings - Navigation title</note> - </trans-unit> - <trans-unit id="Latest purchase %@" xml:space="preserve"> - <source>Latest purchase %@</source> - <target>Latest purchase %@</target> - <note>Subscriber information</note> - </trans-unit> - <trans-unit id="Member since %@" xml:space="preserve"> - <source>Member since %@</source> - <target>Member since %@</target> - <note>Subscriber information</note> - </trans-unit> - <trans-unit id="Ok" xml:space="preserve"> - <source>Ok</source> - <target>Ok</target> - <note>Button to dismiss alert - Button to stop searching in currency selector - Dismiss alert</note> - </trans-unit> - <trans-unit id="Over 170 currencies" xml:space="preserve"> - <source>Over 170 currencies</source> - <target>Over 170 currencies</target> - <note>Subscription feature title</note> - </trans-unit> - <trans-unit id="Preferences" xml:space="preserve"> - <source>Preferences</source> - <target>Preferences</target> - <note>Section header in settings</note> - </trans-unit> - <trans-unit id="Privacy Policy" xml:space="preserve"> - <source>Privacy Policy</source> - <target>Privacy Policy</target> - <note>Button to go to app privacy policy</note> - </trans-unit> - <trans-unit id="Rate Simoleon" xml:space="preserve"> - <source>Rate Simoleon</source> - <target>Rate Simoleon</target> - <note>Button to rate app in Settings</note> - </trans-unit> - <trans-unit id="Restore purchases" xml:space="preserve"> - <source>Restore purchases</source> - <target>Restore purchases</target> - <note>Button to restore in-App purchases</note> - </trans-unit> - <trans-unit id="Save your favourite currencies to access them quickly." xml:space="preserve"> - <source>Save your favourite currencies to access them quickly.</source> - <target>Save your favourite currencies to access them quickly.</target> - <note>Subscription feature description</note> - </trans-unit> - <trans-unit id="Search ..." xml:space="preserve"> - <source>Search ...</source> - <target>Search ...</target> - <note>No comment provided by engineer.</note> - </trans-unit> - <trans-unit id="Settings" xml:space="preserve"> - <source>Settings</source> - <target>Settings</target> - <note>Navigation title - Tab bar button to show settings</note> - </trans-unit> - <trans-unit id="Simoleon on all your devices" xml:space="preserve"> - <source>Simoleon on all your devices</source> - <target>Simoleon on all your devices</target> - <note>Subscription feature title</note> - </trans-unit> - <trans-unit id="Stay in touch" xml:space="preserve"> - <source>Stay in touch</source> - <target>Stay in touch</target> - <note>Section header in settings</note> - </trans-unit> - <trans-unit id="Subscribe" xml:space="preserve"> - <source>Subscribe</source> - <target>Subscribe</target> - <note>Button to suscribe in settings</note> - </trans-unit> - <trans-unit id="Subscribe for %@ / month" xml:space="preserve"> - <source>Subscribe for %@ / month</source> - <target>Subscribe for %@ / month</target> - <note>Subscribe button</note> - </trans-unit> - <trans-unit id="Subscription" xml:space="preserve"> - <source>Subscription</source> - <target>Subscription</target> - <note>Section header in settings</note> - </trans-unit> - <trans-unit id="Tap " xml:space="preserve"> - <source>Tap </source> - <target>Tap </target> - <note>First line when favourites are empty</note> - </trans-unit> - <trans-unit id="USD/GBP" xml:space="preserve"> - <source>USD/GBP</source> - <target>USD/GBP</target> - <note>Default currency in locked picker</note> - </trans-unit> - <trans-unit id="Unlock all access" xml:space="preserve"> - <source>Unlock all access</source> - <target>Unlock all access</target> - <note>Headline in Subscription paywall</note> - </trans-unit> - <trans-unit id="Website" xml:space="preserve"> - <source>Website</source> - <target>Website</target> - <note>Button to go to Dennis Tech website</note> - </trans-unit> - <trans-unit id="Your settings and favourite currencies in all your devices." xml:space="preserve"> - <source>Your settings and favourite currencies in all your devices.</source> - <target>Your settings and favourite currencies in all your devices.</target> - <note>Subscription feature description</note> - </trans-unit> - <trans-unit id="to add a currency pair to favourites" xml:space="preserve"> - <source>to add a currency pair to favourites</source> - <target>to add a currency pair to favourites</target> - <note>Finish line when favourites are empty</note> - </trans-unit> - </body> - </file> -</xliff>
--- a/Simoleon/Localisation/en.xcloc/Source Contents/Simoleon/en.lproj/InfoPlist.strings Mon Jul 26 21:54:30 2021 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -/* Bundle display name */ -"CFBundleDisplayName" = "Simoleon"; -/* Bundle name */ -"CFBundleName" = "Simoleon";
Binary file Simoleon/Localisation/en.xcloc/Source Contents/Simoleon/en.lproj/Localizable.strings has changed
--- a/Simoleon/Localisation/en.xcloc/Source Contents/Simoleon/es.lproj/InfoPlist.strings Mon Jul 26 21:54:30 2021 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -/* Bundle display name */ -"CFBundleDisplayName" = "Simoleon"; -/* Bundle name */ -"CFBundleName" = "Simoleon";
Binary file Simoleon/Localisation/en.xcloc/Source Contents/Simoleon/es.lproj/Localizable.strings has changed
--- a/Simoleon/Localisation/en.xcloc/contents.json Mon Jul 26 21:54:30 2021 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -{ - "developmentRegion" : "en", - "project" : "Simoleon.xcodeproj", - "targetLocale" : "en", - "toolInfo" : { - "toolBuildNumber" : "12E507", - "toolID" : "com.apple.dt.xcode", - "toolName" : "Xcode", - "toolVersion" : "12.5.1" - }, - "version" : "1.0" -} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Simoleon/Localization/en.xcloc/Localized Contents/en.xliff Tue Jul 27 09:44:51 2021 +0100 @@ -0,0 +1,251 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 http://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd"> + <file original="Simoleon/en.lproj/InfoPlist.strings" source-language="en" target-language="en" datatype="plaintext"> + <header> + <tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="12.5.1" build-num="12E507"/> + </header> + <body> + <trans-unit id="CFBundleDisplayName" xml:space="preserve"> + <source>Simoleon</source> + <target>Simoleon</target> + <note>Bundle display name</note> + </trans-unit> + <trans-unit id="CFBundleName" xml:space="preserve"> + <source>Simoleon</source> + <target>Simoleon</target> + <note>Bundle name</note> + </trans-unit> + </body> + </file> + <file original="Simoleon/en.lproj/Localizable.strings" source-language="en" target-language="en" datatype="plaintext"> + <header> + <tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="12.5.1" build-num="12E507"/> + </header> + <body> + <trans-unit id="%.2f" xml:space="preserve"> + <source>%.2f</source> + <target>%.2f</target> + <note>No comment provided by engineer.</note> + </trans-unit> + <trans-unit id="%@ (%@)" xml:space="preserve"> + <source>%1$@ (%2$@)</source> + <target>%1$@ (%2$@)</target> + <note>No comment provided by engineer.</note> + </trans-unit> + <trans-unit id="-" xml:space="preserve"> + <source>-</source> + <target>-</target> + <note>No comment provided by engineer.</note> + </trans-unit> + <trans-unit id="About" xml:space="preserve"> + <source>About</source> + <target>About</target> + <note>No comment provided by engineer.</note> + </trans-unit> + <trans-unit id="All currencies" xml:space="preserve"> + <source>All currencies</source> + <target>All currencies</target> + <note>Section header in currency selector</note> + </trans-unit> + <trans-unit id="Cancel" xml:space="preserve"> + <source>Cancel</source> + <target>Cancel</target> + <note>Button to dismiss currency selector + Button to dismiss paywall modal sheet + Button to stop editing textfield</note> + </trans-unit> + <trans-unit id="Categories" xml:space="preserve"> + <source>Categories</source> + <target>Categories</target> + <note>Side bar navigation title</note> + </trans-unit> + <trans-unit id="Contact" xml:space="preserve"> + <source>Contact</source> + <target>Contact</target> + <note>Button to contact in Settings</note> + </trans-unit> + <trans-unit id="Convert" xml:space="preserve"> + <source>Convert</source> + <target>Convert</target> + <note>Navigation title + Tab bar button to show conversion</note> + </trans-unit> + <trans-unit id="Convert your currency between cryptos, gold, and silver." xml:space="preserve"> + <source>Convert your currency between cryptos, gold, and silver.</source> + <target>Convert your currency between cryptos, gold, and silver.</target> + <note>Subscription feature description</note> + </trans-unit> + <trans-unit id="Cryptos and commodities" xml:space="preserve"> + <source>Cryptos and commodities</source> + <target>Cryptos and commodities</target> + <note>Subscription feature title</note> + </trans-unit> + <trans-unit id="Currencies" xml:space="preserve"> + <source>Currencies</source> + <target>Currencies</target> + <note>Navigation title</note> + </trans-unit> + <trans-unit id="Default currency" xml:space="preserve"> + <source>Default currency</source> + <target>Default currency</target> + <note>Label in locked picker + Picker to select default currency</note> + </trans-unit> + <trans-unit id="Developer's Twitter" xml:space="preserve"> + <source>Developer's Twitter</source> + <target>Developer's Twitter</target> + <note>Button to go to Twitter in Settings</note> + </trans-unit> + <trans-unit id="Enter amount" xml:space="preserve"> + <source>Enter amount</source> + <target>Enter amount</target> + <note>No comment provided by engineer.</note> + </trans-unit> + <trans-unit id="Expires at %@" xml:space="preserve"> + <source>Expires at %@</source> + <target>Expires at %@</target> + <note>Subscriber information</note> + </trans-unit> + <trans-unit id="Favorite currencies" xml:space="preserve"> + <source>Favorite currencies</source> + <target>Favorite currencies</target> + <note>Subscription feature title</note> + </trans-unit> + <trans-unit id="Favorites" xml:space="preserve"> + <source>Favorite</source> + <target>Favorite</target> + <note>Navigation title + Tab bar button to show favorites</note> + </trans-unit> + <trans-unit id="From %@ to %@" xml:space="preserve"> + <source>From %1$@ to %2$@</source> + <target>From %1$@ to %2$@</target> + <note>Conversion from one currency to another</note> + </trans-unit> + <trans-unit id="Have access to almost every currency of the world." xml:space="preserve"> + <source>Have access to almost every currency of the world.</source> + <target>Have access to almost every currency of the world.</target> + <note>Subscription feature description</note> + </trans-unit> + <trans-unit id="Information" xml:space="preserve"> + <source>Information</source> + <target>Information</target> + <note>Button to show subscription information in settings + Navigation title</note> + </trans-unit> + <trans-unit id="Latest purchase %@" xml:space="preserve"> + <source>Latest purchase %@</source> + <target>Latest purchase %@</target> + <note>Subscriber information</note> + </trans-unit> + <trans-unit id="Member since %@" xml:space="preserve"> + <source>Member since %@</source> + <target>Member since %@</target> + <note>Subscriber information</note> + </trans-unit> + <trans-unit id="Ok" xml:space="preserve"> + <source>Ok</source> + <target>Ok</target> + <note>Button to dismiss alert + Button to stop searching in currency selector + Dismiss alert</note> + </trans-unit> + <trans-unit id="Over 170 currencies" xml:space="preserve"> + <source>Over 170 currencies</source> + <target>Over 170 currencies</target> + <note>Subscription feature title</note> + </trans-unit> + <trans-unit id="Preferences" xml:space="preserve"> + <source>Preferences</source> + <target>Preferences</target> + <note>Section header in settings</note> + </trans-unit> + <trans-unit id="Privacy Policy" xml:space="preserve"> + <source>Privacy Policy</source> + <target>Privacy Policy</target> + <note>Button to go to app privacy policy</note> + </trans-unit> + <trans-unit id="Rate Simoleon" xml:space="preserve"> + <source>Rate Simoleon</source> + <target>Rate Simoleon</target> + <note>Button to rate app in Settings</note> + </trans-unit> + <trans-unit id="Restore purchases" xml:space="preserve"> + <source>Restore purchases</source> + <target>Restore purchases</target> + <note>Button to restore in-App purchases</note> + </trans-unit> + <trans-unit id="Save your favorite currencies to access them quickly." xml:space="preserve"> + <source>Save your favorite currencies to access them quickly.</source> + <target>Save your favorite currencies to access them quickly.</target> + <note>Subscription feature description</note> + </trans-unit> + <trans-unit id="Search ..." xml:space="preserve"> + <source>Search ...</source> + <target>Search ...</target> + <note>No comment provided by engineer.</note> + </trans-unit> + <trans-unit id="Settings" xml:space="preserve"> + <source>Settings</source> + <target>Settings</target> + <note>Navigation title + Tab bar button to show settings</note> + </trans-unit> + <trans-unit id="Simoleon on all your devices" xml:space="preserve"> + <source>Simoleon on all your devices</source> + <target>Simoleon on all your devices</target> + <note>Subscription feature title</note> + </trans-unit> + <trans-unit id="Stay in touch" xml:space="preserve"> + <source>Stay in touch</source> + <target>Stay in touch</target> + <note>Section header in settings</note> + </trans-unit> + <trans-unit id="Subscribe" xml:space="preserve"> + <source>Subscribe</source> + <target>Subscribe</target> + <note>Button to suscribe in settings</note> + </trans-unit> + <trans-unit id="Subscribe for %@ / month" xml:space="preserve"> + <source>Subscribe for %@ / month</source> + <target>Subscribe for %@ / month</target> + <note>Subscribe button</note> + </trans-unit> + <trans-unit id="Subscription" xml:space="preserve"> + <source>Subscription</source> + <target>Subscription</target> + <note>Section header in settings</note> + </trans-unit> + <trans-unit id="Tap " xml:space="preserve"> + <source>Tap </source> + <target>Tap </target> + <note>First line when favorites are empty</note> + </trans-unit> + <trans-unit id="USD/GBP" xml:space="preserve"> + <source>USD/GBP</source> + <target>USD/GBP</target> + <note>Default currency in locked picker</note> + </trans-unit> + <trans-unit id="Unlock all access" xml:space="preserve"> + <source>Unlock all access</source> + <target>Unlock all access</target> + <note>Headline in Subscription paywall</note> + </trans-unit> + <trans-unit id="Website" xml:space="preserve"> + <source>Website</source> + <target>Website</target> + <note>Button to go to Dennis Tech website</note> + </trans-unit> + <trans-unit id="Your settings and favorite currencies in all your devices." xml:space="preserve"> + <source>Your settings and favorite currencies in all your devices.</source> + <target>Your settings and favorite currencies in all your devices.</target> + <note>Subscription feature description</note> + </trans-unit> + <trans-unit id="to add a currency pair to favorites" xml:space="preserve"> + <source>to add a currency pair to favorites</source> + <target>to add a currency pair to favorites</target> + <note>Finish line when favorites are empty</note> + </trans-unit> + </body> + </file> +</xliff>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Simoleon/Localization/en.xcloc/Source Contents/Simoleon/en.lproj/InfoPlist.strings Tue Jul 27 09:44:51 2021 +0100 @@ -0,0 +1,4 @@ +/* Bundle display name */ +"CFBundleDisplayName" = "Simoleon"; +/* Bundle name */ +"CFBundleName" = "Simoleon";
Binary file Simoleon/Localization/en.xcloc/Source Contents/Simoleon/en.lproj/Localizable.strings has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Simoleon/Localization/en.xcloc/Source Contents/Simoleon/es.lproj/InfoPlist.strings Tue Jul 27 09:44:51 2021 +0100 @@ -0,0 +1,4 @@ +/* Bundle display name */ +"CFBundleDisplayName" = "Simoleon"; +/* Bundle name */ +"CFBundleName" = "Simoleon";
Binary file Simoleon/Localization/en.xcloc/Source Contents/Simoleon/es.lproj/Localizable.strings has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Simoleon/Localization/en.xcloc/contents.json Tue Jul 27 09:44:51 2021 +0100 @@ -0,0 +1,12 @@ +{ + "developmentRegion" : "en", + "project" : "Simoleon.xcodeproj", + "targetLocale" : "en", + "toolInfo" : { + "toolBuildNumber" : "12E507", + "toolID" : "com.apple.dt.xcode", + "toolName" : "Xcode", + "toolVersion" : "12.5.1" + }, + "version" : "1.0" +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Simoleon/Models/Favorite+CoreDataClass.swift Tue Jul 27 09:44:51 2021 +0100 @@ -0,0 +1,15 @@ +// +// Favorite+CoreDataClass.swift +// Simoleon +// +// Created by Dennis Concepción Martín on 19/07/2021. +// +// + +import Foundation +import CoreData + +@objc(Favorite) +public class Favorite: NSManagedObject { + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Simoleon/Models/Favorite+CoreDataProperties.swift Tue Jul 27 09:44:51 2021 +0100 @@ -0,0 +1,25 @@ +// +// Favorite+CoreDataProperties.swift +// Simoleon +// +// Created by Dennis Concepción Martín on 19/07/2021. +// +// + +import Foundation +import CoreData + + +extension Favorite { + + @nonobjc public class func fetchRequest() -> NSFetchRequest<Favorite> { + return NSFetchRequest<Favorite>(entityName: "Favorite") + } + + @NSManaged public var currencyPair: String + +} + +extension Favorite : Identifiable { + +}
--- a/Simoleon/Models/Favourite+CoreDataClass.swift Mon Jul 26 21:54:30 2021 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -// -// Favourite+CoreDataClass.swift -// Simoleon -// -// Created by Dennis Concepción Martín on 19/07/2021. -// -// - -import Foundation -import CoreData - -@objc(Favourite) -public class Favourite: NSManagedObject { - -}
--- a/Simoleon/Models/Favourite+CoreDataProperties.swift Mon Jul 26 21:54:30 2021 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -// -// Favourite+CoreDataProperties.swift -// Simoleon -// -// Created by Dennis Concepción Martín on 19/07/2021. -// -// - -import Foundation -import CoreData - - -extension Favourite { - - @nonobjc public class func fetchRequest() -> NSFetchRequest<Favourite> { - return NSFetchRequest<Favourite>(entityName: "Favourite") - } - - @NSManaged public var currencyPair: String - -} - -extension Favourite : Identifiable { - -}
--- a/Simoleon/Persistence.swift Mon Jul 26 21:54:30 2021 +0100 +++ b/Simoleon/Persistence.swift Tue Jul 27 09:44:51 2021 +0100 @@ -19,8 +19,8 @@ } for _ in 0..<10 { - let favourite = Favourite(context: viewContext) - favourite.currencyPair = "USD/GBP" + let favorite = Favorite(context: viewContext) + favorite.currencyPair = "USD/GBP" } do { try viewContext.save()
--- a/Simoleon/Simoleon.xcdatamodeld/Simoleon.xcdatamodel/contents Mon Jul 26 21:54:30 2021 +0100 +++ b/Simoleon/Simoleon.xcdatamodeld/Simoleon.xcdatamodel/contents Tue Jul 27 09:44:51 2021 +0100 @@ -1,17 +1,17 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="18154" systemVersion="20F71" minimumToolsVersion="Automatic" sourceLanguage="Swift" usedWithCloudKit="YES" userDefinedModelVersionIdentifier=""> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="18154" systemVersion="20G71" minimumToolsVersion="Automatic" sourceLanguage="Swift" usedWithCloudKit="YES" userDefinedModelVersionIdentifier=""> <entity name="DefaultCurrency" representedClassName="DefaultCurrency" syncable="YES"> <attribute name="pair" optional="YES" attributeType="String"/> </entity> - <entity name="Favourite" representedClassName="Favourite" syncable="YES"> + <entity name="Favorite" representedClassName="Favorite" syncable="YES"> <attribute name="currencyPair" optional="YES" attributeType="String"/> </entity> <entity name="Item" representedClassName="Item" syncable="YES" codeGenerationType="class"> <attribute name="timestamp" optional="YES" attributeType="Date" usesScalarValueType="NO"/> </entity> <elements> - <element name="Favourite" positionX="-63" positionY="-9" width="128" height="44"/> - <element name="Item" positionX="-63" positionY="-18" width="128" height="44"/> - <element name="DefaultCurrency" positionX="-54" positionY="0" width="128" height="44"/> + <element name="DefaultCurrency" positionX="0" positionY="0" width="0" height="0"/> + <element name="Favorite" positionX="0" positionY="0" width="0" height="0"/> + <element name="Item" positionX="0" positionY="0" width="0" height="0"/> </elements> </model> \ No newline at end of file
--- a/Simoleon/SubscriptionPaywall.swift Mon Jul 26 21:54:30 2021 +0100 +++ b/Simoleon/SubscriptionPaywall.swift Tue Jul 27 09:44:51 2021 +0100 @@ -37,8 +37,8 @@ SubscriptionFeature( symbol: "star.circle.fill", colour: Color(.systemYellow), - title: "Favourite currencies", - description: "Save your favourite currencies to access them quickly." + title: "Favorite currencies", + description: "Save your favorite currencies to access them quickly." ) SubscriptionFeature( @@ -52,7 +52,7 @@ symbol: "icloud.circle.fill", colour: Color(.systemBlue), title: "Simoleon on all your devices", - description: "Your settings and favourite currencies in all your devices." + description: "Your settings and favorite currencies in all your devices." ) SubscriptionFeature(
--- a/SimoleonUITests/SimoleonUITests.swift Mon Jul 26 21:54:30 2021 +0100 +++ b/SimoleonUITests/SimoleonUITests.swift Tue Jul 27 09:44:51 2021 +0100 @@ -27,8 +27,8 @@ let app = XCUIApplication() app.launch() - app.tabBars.buttons["Favourites"].tap() - XCTAssertTrue(app.navigationBars["Favourites"].exists) + app.tabBars.buttons["Favorites"].tap() + XCTAssertTrue(app.navigationBars["Favorites"].exists) app.tabBars.buttons["Settings"].tap() XCTAssertTrue(app.navigationBars["Settings"].exists)