diff --git a/ACHNBrowserUI/ACHNBrowserUI.xcodeproj/project.pbxproj b/ACHNBrowserUI/ACHNBrowserUI.xcodeproj/project.pbxproj index 58a23295..6f315815 100644 --- a/ACHNBrowserUI/ACHNBrowserUI.xcodeproj/project.pbxproj +++ b/ACHNBrowserUI/ACHNBrowserUI.xcodeproj/project.pbxproj @@ -97,6 +97,7 @@ 02F2D4472455D81C009741DA /* simple-orange@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 02F2D3F72455D81C009741DA /* simple-orange@3x.png */; }; 02F2D4482455D81C009741DA /* simple-mint@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 02F2D3F82455D81C009741DA /* simple-mint@3x.png */; }; 325C0945246054AF0043B6A7 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 325C0943246053E10043B6A7 /* SwiftUI.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 3DF14B2B24664B2600438646 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3DF14B2D24664B2600438646 /* Localizable.strings */; }; 4C2D676B245DA41E005831C4 /* TurnipsChartView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C2D676A245DA41E005831C4 /* TurnipsChartView.swift */; }; 4C2D676E245F0666005831C4 /* TurnipsChartBottomLegendView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C2D676D245F0666005831C4 /* TurnipsChartBottomLegendView.swift */; }; 4C2D6770245F0698005831C4 /* TurnipsChart.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C2D676F245F0698005831C4 /* TurnipsChart.swift */; }; @@ -349,6 +350,8 @@ 02F2D3F72455D81C009741DA /* simple-orange@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "simple-orange@3x.png"; sourceTree = ""; }; 02F2D3F82455D81C009741DA /* simple-mint@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "simple-mint@3x.png"; sourceTree = ""; }; 325C0943246053E10043B6A7 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/SwiftUI.framework; sourceTree = DEVELOPER_DIR; }; + 3DF14B2C24664B2600438646 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 3DF14B2E24664B4A00438646 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; 4C2D676A245DA41E005831C4 /* TurnipsChartView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TurnipsChartView.swift; sourceTree = ""; }; 4C2D676D245F0666005831C4 /* TurnipsChartBottomLegendView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TurnipsChartBottomLegendView.swift; sourceTree = ""; }; 4C2D676F245F0698005831C4 /* TurnipsChart.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TurnipsChart.swift; sourceTree = ""; }; @@ -811,6 +814,7 @@ 69AF8C5B243E2841001DD9CB /* LaunchScreen.storyboard */, 69AF8C5E243E2841001DD9CB /* Info.plist */, 69AF8C58243E2841001DD9CB /* Preview Content */, + 3DF14B2D24664B2600438646 /* Localizable.strings */, ); path = ACHNBrowserUI; sourceTree = ""; @@ -1106,6 +1110,7 @@ knownRegions = ( en, Base, + de, ); mainGroup = 69AF8C44243E283D001DD9CB; packageReferences = ( @@ -1200,6 +1205,7 @@ 02F2D4012455D81C009741DA /* round-alt-cactus@2x.png in Resources */, 02F2D4392455D81C009741DA /* round-alt-mint@3x.png in Resources */, 02F2D42A2455D81C009741DA /* bookmark-mint@3x.png in Resources */, + 3DF14B2B24664B2600438646 /* Localizable.strings in Resources */, 02F2D4092455D81C009741DA /* round-alt-lime@2x.png in Resources */, 69CFCA9F245AAF520059C067 /* turnips.js in Resources */, 02F2D4412455D81C009741DA /* bookmark-lime@3x.png in Resources */, @@ -1384,6 +1390,15 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ + 3DF14B2D24664B2600438646 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 3DF14B2C24664B2600438646 /* en */, + 3DF14B2E24664B4A00438646 /* de */, + ); + name = Localizable.strings; + sourceTree = ""; + }; 69AF8C5B243E2841001DD9CB /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( @@ -1407,6 +1422,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -1467,6 +1483,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; diff --git a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings new file mode 100644 index 00000000..7558389d --- /dev/null +++ b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings @@ -0,0 +1,333 @@ +/* + Localizable.strings + ACHNBrowserUI + + Created by Jan on 09.05.20. + Copyright © 2020 Thomas Ricouard. All rights reserved. +*/ + +"Tap here to preview a notification" = "Tippe hier für eine Vorschau"; +"Upgrade to +" = "Upgrade auf +"; +"You're subscribed to AC Helper+" = "You're subscribed to AC Helper+"; + +// copy and paste "export" of Text() and similar SwiftUI functions +// Global +"Close" = "Schließen"; +"Dismiss" = "Abbrechen"; +"Save" = "Speichern"; + +// Date Format +"EEEE, dd MMMM" = "EEEE, dd. MMMM"; +"d/M" = "d.M."; +"dd" = "dd"; +"MMM" = "MMM"; +"MMM dd" = "dd. MMM"; +"dd MMMM" = "dd. MMMM"; + +// TabbarView +"Dashboard" = "Startseite"; +"Catalog" = "Katalog"; +"Turnips" = "Rüben"; +"Villagers" = "Bewohner"; +"Collection" = "Sammlung"; + +// TodayView +"Change Section Order" = "Ändere die Reihenfolge"; +// TodaySectionEditView +"Drag & Drop to Rearrange" = "Zum Anordnen halten und verschieben"; +"Hidden" = "Versteckt"; +"Today Sections" = "Heute Abschnitte"; +"Done" = "Fertig"; +" to re-order sections." = " to re-order sections."; +"Check or un-check" = "Check or un-check"; +" rows to hide sections from the dashboard." = " rows to hide sections from the dashboard."; +"Your top-most section will be the default detail view on iPad and Mac." = "Your top-most section will be the default detail view on iPad and Mac."; +// TodayBirthdaySection +"Birthdays" = "Geburtstage"; +"Today's Birthdays" = "Heutige Geburtstage"; +"Today's Birthday" = "Heutiger Geburtstag"; +// TodayCollectionProgressSection +"Collection Progress" = "Sammelfortschritt"; +"Share" = "Teilen"; +// TodayCurrentlyAvailableSection +"Currently Available" = "Aktuell verfügbar"; +"%lld/%lld Bugs" = "%lld/%lld Insekten"; +"%lld/%lld Fish" = "%lld/%lld Fische"; +"%lld NEW" = "%lld NEU"; +// TodayEventsSection +"Events" = "Ereignisse"; +"Currently" = "Aktuell"; +"No Events Today" = "Heute keine Ereignisse"; +"Upcoming" = "Anstehend"; +// TodayTasksSection +"Today's Tasks" = "Heutige Aufgaben"; +"This feature requires " = "Diese Funktion benötigt "; +"Learn more >" = "Erfahre mehr >"; +// TodayTurnipSection +"Today is sunday, don't forget to buy more turnips and fill your buy price." = "Heute ist Sonntag, denk daran Rüben zu kaufen und den Einkaufspreis einzutragen."; +"Today's average price should be around " = "Der heutige durchschnittliche Kaufpreis sollte bei "; +" in the morning, and " = " am Morgen und bei "; +" this afternoon." = " am Nachmittag liegen."; +// TodayNookazonSection +"New on Nookazon" = "Neu auf Nookazon"; +"Nookazon is loading..." = "Nookazon lädt..."; +// TodayWhatsNewSection +"What's New" = "Was ist neu"; +"See what's new in update %@" = "Schau dir an, was es neues gibt in Version %@"; +// TodaySubscribeSection +"You're subscribed to AC Helper+. Thank you so much for you support!" = "Du abonnierst AC Helper+. Vielen Dank für deine Unterstützung!"; +"If you enjoy the application, consider subscribing to AC Helper+, to get access to some awesome features and support us!" = "Wenn dir die App gefällt, abonniere AC Helper+, um Zugriff auf großartige Funktionen zu erhalten und uns zu unterstütuen!"; + +// SubscribeView +"AC Helper+" = "AC Helper+"; +"ACHelperPlusDescription" = "Das AC Helper+ Abonnement ist ein guter Weg deine Unterstützung für unser kostenloses Open Source Projekt. ♥️ + +Außerdem erhältst du Zugriff auf exklusive, großartige Funktionen: Rüben Prognose Benachrichtigungen und beliebig viele Gegenstands-Listen! 📈 + +Weitere Details unten."; +"ACHelperPlusDetails" = "Über die Benachrichtigungs-Funktion: +Jeden Tag um 8 und 12 Uhr wirst du eine Benachrichtigung mit dem prognostizierten, durchschnittlichen Ankaufspreis bei Nepp und Schlepp erhalten. +Je mehr Ankaufspreise du in der App ab montags morgens speicherst, um so genauer wird die nächste Prognose sein! + +Über die Listen-Funktion: +Ohne Abonnement kannst du nur eine Liste mit Gegenständen im \"Meine Sachen\" Register erstellen. +Wenn du dir AC Helper+ holst, kannst du beliebig viele Listen erstellen und unterschiedlich befüllen."; +"ACHelperPlusPriceAndAboDetail %@" = "Ein monatliches Abo über %@ pro Monat wird nach der Bestätigung deinem iTunes Konto hinzugefügt. +Das Abonnement verlängert sich automatisch, solange es nicht bis 24 Stunden vor der nächsten Verlängerung beendet wird. +Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. Jeder nicht genutzte Teil einer kostenlosen Testversion verfällt, wenn du ein Abonnement abschließt."; +"Subscribe for %@ / Month" = "Abonnieren für %@ / Monat"; +"Thank you for your support!" = "Vielen Dank für deine Unterstützung!"; + +// AboutView +"About" = "Über"; +"The app" = "Die App"; +"Souce code / report an issue" = "Quell Code / Fehler melden"; +"Rate the app on the App Store" = "Bewerte die App im App Store"; +"Privacy Policy" = "Datenschutzbestimmungen"; +"Term of Use" = "Nutzungsbedingungen"; +"App version" = "App Version"; +"Game patch data" = "Daten Spielversion"; +"Acknowledgements" = "Danksagungen"; +"Our amazing contributors" = "Unsere großartigen Mitwirkenden"; +"The NookPlaza API by Azarro" = "Die NookPlaza API von Azarro"; +"Turnip.exchange" = "Turnip.exchange"; +"Nookazon for the marketplace" = "Nookazon für den Marktplatz"; +"Shihab / JPEGuin for the icon" = "Shihab / JPEGuin für das Icon"; +"Christian & Ninji for the turnip predictions algorithm" = "Christian & Ninji für den Rüben Prognose Algorithmus"; +"Error" = "Fehler"; + +// ActiveCittersView +"Active Critters" = "Aktive Tiere"; +"Fishes" = "Fische"; +"Bugs" = "Insekten"; +"You caught them all!" = "Du hast alle gefangen!"; +"New this month" = "Diesen Monat neu"; +"To catch" = "Zu fangen"; +"Leaving this month" = "Nur noch diesen Monat"; +"Caught" = "Gefangen"; + +// SettingsView +"Preferences" = "Einstellungen"; +"Island name" = "Inselname"; +"Your island name" = "Name deiner Insel"; +"Hemisphere" = "Hemisphäre"; +"North" = "Nord"; +"South" = "Süd"; +"Starting fruit" = "Frucht zu Beginn"; +"Apple" = "Apfel"; +"Cherry" = "Kirsche"; +"Orange" = "Orange"; +"Peach" = "Pfirsich"; +"Pear" = "Birne"; +"Coconut" = "Kokusnuss"; +"Nook shop" = "Nepp und Schlepp"; +"Tent" = "Zelt"; +"Nook's Cranny" = "Nook's Laden"; +"Nook's Cranny upgraded" = "Nook's Laden (ausgebaut)"; +"Able sisters" = "Schneiderei"; +"Visiting" = "zu Besuch"; +"Shop" = "Laden"; +"Residents service" = "Service-Center"; +"Building" = "Gebäude"; +"App Settings" = "App Einstellungen"; +"App Icon" = "App Icon"; +"Restore purchase" = "Einkauf wiederherstellen"; + +// UserListFormView +"Edit your list" = "Liste Bearbeiten"; +"Name of your list" = "Name der Liste"; +"List name" = "Name"; +"Can be nothing" = "Kann leer sein"; +"Icon" = "Icon"; + +// UserListDetailView +"Add %lld items" = "Füge %lld Gegenstände hinzu"; +"Edit" = "Bearbeiten"; +"Search items" = "Gegenstände suchen"; +"Items added to your list from the search will be displayed there." = "Gegenstände, die du aus der Suche heraus deiner Liste hinzugefügt hast, findest du dort."; +"No results for %@" = "Kein Ergebnis für %@"; + +// UserListSubscribeCallView +"In order to create more than one list, you need to subscribe to AC Helper+" = "Um mehr als eine Liste anlegen zu können, musst du AC Helper+ abonnieren"; +"Learn more..." = "Erfahre mehr..."; + +// CollectionListView +"Create a new list" = "Erstelle eine neue Liste"; +"Please select or go stars some items!" = "Bitte wähle oder markiere Gegenstände!"; +"When you'll stars some %@, they'll be displayed here." = "Wenn du %@ markierst, werden sie hier angezeigt."; +"Items" = "Gegenstände"; +"Critters" = "Tiere"; +"Lists" = "Listen"; + +// ItemsListView +"Clear Selection" = "Auswahl aufheben"; +"Sort items" = "Gegenstände sortieren"; +"Current Sort: %@" = "Aktuelle Sortierung: %@"; +"name" = "Name"; +"buy" = "Kaufpreis"; +"sell" = "Verkaufspreis"; +"from" = "Von"; +"set" = "Set"; +"similar" = "Ähnliche"; +"Name" = "Name"; +"Buy" = "Kaufpreis"; +"Sell" = "Verkaufspreis"; +"From" = "Von"; +"Set" = "Set"; +"Similar" = "Ähnliche"; +// ItemRowView +"unknown source" = "Herkunft unbekannt"; +// ItemDetailInfoView +"Rarity:" = "Seltenheit:"; +"Shadow size:" = "Schatten Größe:"; +"Customizable: %@" = "Veränderbar: %@"; +"Flick:" = "Carlson:"; +"Yes" = "Ja"; +"No" = "Nein"; +// ItemsCrosslineSectionView +"Preview" = "Vorschau"; +// ItemDetailSeasonView +"Seasonality" = "Saisonalität"; +// ItemDetailView +"Set items" = "Setgegenstände"; +"Simillar items" = "Ähnliche Gegenstände"; +"Thematics" = "Thematik"; +"Variants" = "Varianten"; +"Materials" = "Materialien"; +"Nookazon listings" = "Nookazon Auflistung"; +"Loading Listings..." = "Lade Auflistung..."; +"No listings found on Nookazon" = "Keine Auflistung auf Nookazon gefunden"; +"Your items lists" = "Deine Gegenstandslisten"; + +// TurnipsView +"Minmax" = "Min-Max"; +"Profits" = "Gewinne"; +"Average daily buy prices" = "Durchschnittliche tägliche Verkaufspreise"; +"Daily min-max prices" = "Tägliche Min-Max Preise"; +"Average profits" = "Durchschnittliche Gewinne"; +"Chart" = "Diagramm"; +"Mon" = "Mo"; +"Tue" = "Di"; +"Wed" = "Mi"; +"Thu" = "Do"; +"Fri" = "Fr"; +"Sat" = "Sa"; +"Your prices" = "Deine Preise"; +"Edit your in game prices" = "Bearbeite deine Spiel Preise"; +"Add your in game prices" = "Füge deine Spiel Preise hinzu"; +"Turnips prediction" = "Rüben-Progrnose"; +"To help us support the application and get turnip predictions notification, you can try out AC Helper+" = "Abonniere AC Helper+, um Benachrichtigungen zur Rüben-Prognose zu bekommen und uns bei der Entwicklung der App zu unterstützen"; +"%lld upcomingDailyNotifications" = "Du bekommst Verkaufspreis Prognosen in noch %lld weiteren täglichen Benachrichtigungen."; +"Profits estimates are computed using the average of the current period" = "Die Profite werden auf Basis des durchschnittlichen Preises der jeweiligen Periode berechnet"; +"Day" = "Tag"; +"AM" = "Vorm."; +"PM" = "Nachm."; +"Please add the amount of turnips you bought and for how much" = "Bitte trag ein, wie viele Rüben du gekauft hast und zu welchem Preis"; +"Add your in game turnip prices to see the predictions chart" = "Um das Prognose-Diagramm sehen zu können, trag die Verkaufspreise für Rüben ein"; +"Add your in game turnip prices to see predictions" = "Trag die Rüben-Verkaufspreise ein um eine Prognose sehen zu können"; +"Exchange" = "Wechselkurs"; +// TurnipsFormView +"Monday" = "Montag"; +"Tuesday" = "Dienstag"; +"Wednesday" = "Mittwoch"; +"Thursday" = "Donnerstag"; +"Friday" = "Freitag"; +"Saturday" = "Samstag"; +"Add your turnip prices" = "Füge deine Rüben Verkaufspreise hinzu"; +"Configuration" = "Konfiguration"; +"Clear all fields" = "Alle Felder leeren"; +"Receive prices predictions notification" = "Erhalte Benachrichtigungen zu Verkaufspreis Prognosen"; +"You can get daily notifications for your average turnip price by subscribing to AC Helper+" = "Mit einem AC Helper+ Abonnement erhältst du tägich Benachrichtigungen zum durchschnittlichen Rüben Verkaufspreis"; +"Preview a notification" = "Zeige Vorschau-Benachrichtigung"; +"Your in game prices" = "Deine Preise"; +"Buy price" = "Kaufpreis"; +"Amount bought" = "Gekaufte Menge"; +"The more in game buy prices you'll add the better the predictions will be. Your buy price only won't give your correct averages. Add prices from the game as you get them daily." = "Je mehr Verkaufspreise du einträgst, um so genauer kann die Prognose sein. Der Einkaufspreis alleine kann keine gute Prognose liefern. Trag also am besten täglich die Verkaufspreise ein."; +// TurnipsChartTopLegendView +"Average" = "Durchschnitt"; +"Minimum" = "Minimum"; +"MinMax" = "MinMax"; + +// IslandDetailView +"Join Island" = "Insel beitreten"; +"Island" = "Insel"; +"Description" = "Beschreibung"; +"Visitors" = "Besucher"; +"Loading Visitors...." = "Lade Besucher...."; + +// VillagersListView +"Search a villager" = "Suche einen Bewohner"; +"Personality" = "Persönlichkeit"; +"Birthday" = "Geburtstag"; +"Species" = "Spezies"; +"Gender" = "Geschlecht"; +"Catch phrase" = "Schlagwort"; +"Unknown" = "Unbekannt"; +"Villager items" = "Gegenstände des Bewohners"; + +// ListingRow +"Make an Offer" = "Angebot abgeben"; +"Need Materials" = "Benötigt Materialien"; +"No Raiting" = "Keine Bewertungen"; +"Raiting" = "Bewertung"; + +// CategoryRow +"housewares" = "Haushaltswaren"; +"miscellaneous" = "Sonstiges"; +"wall-mounted" = "Wand Dekoration"; +"wallpapers" = "Tapeten"; +"floors" = "Fußböden"; +"rugs" = "Teppiche"; +"photos" = "Fotos"; +"posters" = "Poster"; +"fencing" = "Zäune"; +"tools" = "Werkzeuge"; +"tops" = "Oberteile"; +"bottoms" = "Unterteile"; +"dresses" = "Kleider"; +"headwear" = "Kopfbedeckungen"; +"accessories" = "Accessoires"; +"socks" = "Socken"; +"shoes" = "Schuhe"; +"bags" = "Taschen"; +"umbrellas" = "Regenschirme"; +"music" = "Musik"; +"recipes" = "Anleitungen"; +"construction" = "Bau"; +"nookmiles" = "Nook Miles"; +"other" = "Anderes"; +"art" = "Kunst"; +"bugs" = "Insekten"; +"fish" = "Fische"; +"fossils" = "Fossilien"; +// CategoriesView +"Nature" = "Natur"; +"Wardrobe" = "Kleidung"; +"No results for %@" = "Kein Ergebnis für %@"; + + +// Shared +// SearchField +"Search..." = "Suchen..."; + +// to be continued diff --git a/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings new file mode 100644 index 00000000..ee9b695a Binary files /dev/null and b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings differ diff --git a/ACHNBrowserUI/ACHNBrowserUI/packages/Backend/Sources/Backend/models/Category.swift b/ACHNBrowserUI/ACHNBrowserUI/packages/Backend/Sources/Backend/models/Category.swift index 70298709..eb515016 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/packages/Backend/Sources/Backend/models/Category.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/packages/Backend/Sources/Backend/models/Category.swift @@ -17,17 +17,8 @@ public enum Category: String, CaseIterable { case umbrellas, music, recipes, construction, nookmiles, other case art, bugs, fish, fossils - public func label() -> String { - switch self { - case .fish: - return "Fishes" - case .wallMounted: - return "Wall mounted" - case .nookmiles: - return "Nook Miles" - default: - return self.rawValue.capitalized - } + public func label() -> LocalizedStringKey { + return LocalizedStringKey(self.rawValue) } public func iconName() -> String { diff --git a/ACHNBrowserUI/ACHNBrowserUI/packages/Backend/Sources/Backend/models/Villager.swift b/ACHNBrowserUI/ACHNBrowserUI/packages/Backend/Sources/Backend/models/Villager.swift index 3173d38b..4ba74512 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/packages/Backend/Sources/Backend/models/Villager.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/packages/Backend/Sources/Backend/models/Villager.swift @@ -18,9 +18,9 @@ public struct Villager: Identifiable, Codable, Equatable { public var formattedBirthday: String? { guard let birthday = birthday else { return nil } let formatter = DateFormatter() - formatter.dateFormat = "d/M" + formatter.setLocalizedDateFormatFromTemplate("d/M") let day = formatter.date(from: birthday)! - formatter.dateFormat = "dd MMMM" + formatter.setLocalizedDateFormatFromTemplate("dd MMMM") return formatter.string(from: day) } diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/about/AboutView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/about/AboutView.swift index a08f3ec2..55ccad9a 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/about/AboutView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/about/AboutView.swift @@ -15,11 +15,11 @@ struct AboutView: View { @State private var selectedSheet: Sheet.SheetType? private var versionNumber: String { - Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "Error" + Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? NSLocalizedString("Error", comment: "") } private var buildNumber: String { - Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "Error" + Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? NSLocalizedString("Error", comment: "") } private var dismissButton: some View { @@ -41,7 +41,7 @@ struct AboutView: View { .imageScale(.medium) .foregroundColor(color) .frame(width: 30) - Text(text) + Text(LocalizedStringKey(text)) .foregroundColor(.acText) .font(.body) Spacer() @@ -55,7 +55,7 @@ struct AboutView: View { .imageScale(.medium) .foregroundColor(color) .frame(width: 30) - Text(text) + Text(LocalizedStringKey(text)) .foregroundColor(.acText) .font(.body) Spacer() diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/categories/CategoriesView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/categories/CategoriesView.swift index 681bd937..e04868b0 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/categories/CategoriesView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/categories/CategoriesView.swift @@ -76,7 +76,7 @@ extension CategoriesView { .renderingMode(.original) .resizable() .frame(width: 46, height: 46) - Text(name) + Text(LocalizedStringKey(name)) .style(appStyle: .rowTitle) Spacer() Text("\(items.itemsCount(for: categories))") diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/collection/CollectionListView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/collection/CollectionListView.swift index fed182cb..1ef32993 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/collection/CollectionListView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/collection/CollectionListView.swift @@ -50,7 +50,7 @@ struct CollectionListView: View { } } .listStyle(GroupedListStyle()) - .navigationBarTitle(Text("My Stuff"), + .navigationBarTitle(Text("Collection"), displayMode: .automatic) .sheet(item: $sheet, content: { Sheet(sheetType: $0) }) @@ -97,7 +97,7 @@ struct CollectionListView: View { private var picker: some View { Picker(selection: $selectedTab, label: Text("")) { ForEach(Tabs.allCases, id: \.self) { tab in - Text(tab.rawValue.capitalized) + Text(LocalizedStringKey(tab.rawValue.capitalized)) } } .pickerStyle(SegmentedPickerStyle()) diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/critters/ActiveCrittersView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/critters/ActiveCrittersView.swift index f93fd857..6531283e 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/critters/ActiveCrittersView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/critters/ActiveCrittersView.swift @@ -83,7 +83,7 @@ struct ActiveCrittersView: View { List { Picker(selection: $selectedTab, label: Text("")) { ForEach(Tab.allCases, id: \.self) { tab in - Text(tab.rawValue).tag(tab.rawValue) + Text(LocalizedStringKey(tab.rawValue)).tag(tab.rawValue) } } .pickerStyle(SegmentedPickerStyle()) diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCrittersView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCrittersView.swift deleted file mode 100644 index 23dae238..00000000 --- a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCrittersView.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// DashboardCrittersView.swift -// ACHNBrowserUI -// -// Created by Thomas Ricouard on 23/04/2020. -// Copyright © 2020 Thomas Ricouard. All rights reserved. -// - -import SwiftUI - -struct DashboardAvailableCrittersView: View { - @EnvironmentObject private var collection: UserCollection - @ObservedObject var viewModel: DashboardViewModel - - private var numberOfBugs: String { - if !viewModel.bugs.isEmpty { - return "\(collection.caughtIn(list: viewModel.bugs))/\(viewModel.bugs.filterActive().count)" - } - return "Loading..." - } - - private var numberOfFish: String { - if !viewModel.fishes.isEmpty { - return "\(collection.caughtIn(list: viewModel.fishes))/\(viewModel.fishes.filterActive().count)" - } - return "Loading..." - } - - private var crittersView: some View { - HStack { - Spacer() - VStack { - Text(numberOfFish) - .font(.title) - .bold() - .foregroundColor(.text) - Text("Fishes") - .font(.caption) - .foregroundColor(.secondaryText) - } - Spacer() - Divider() - Spacer() - VStack { - Text(numberOfBugs) - .font(.title) - .bold() - .foregroundColor(.text) - Text("Bugs") - .font(.caption) - .foregroundColor(.secondaryText) - } - Spacer() - } - .padding(.vertical, 5) - } - - var body: some View { - Section(header: SectionHeaderView(text: "Available This Month")) { - NavigationLink(destination: ActiveCrittersView(activeFishes: viewModel.fishes.filterActive(), - activeBugs: viewModel.bugs.filterActive())) { - crittersView - } - } - } -} - -struct DashboardCrittersView_Previews: PreviewProvider { - static var previews: some View { - DashboardAvailableCrittersView(viewModel: DashboardViewModel()) - } -} diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/items/ItemsListView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/items/ItemsListView.swift index 9c19ea34..38c42cea 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/items/ItemsListView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/items/ItemsListView.swift @@ -49,7 +49,7 @@ struct ItemsListView: View { private var sortSheet: ActionSheet { var buttons: [ActionSheet.Button] = [] for sort in ItemsViewModel.Sort.allCases { - buttons.append(.default(Text(sort.rawValue.localizedCapitalized), + buttons.append(.default(Text(LocalizedStringKey(sort.rawValue.localizedCapitalized)), action: { self.viewModel.sort = sort })) @@ -66,8 +66,9 @@ struct ItemsListView: View { let title = Text("Sort items") if let currentSort = viewModel.sort { + let currentSortName = NSLocalizedString(currentSort.rawValue.localizedCapitalized, comment: "") return ActionSheet(title: title, - message: Text("Current Sort: \(currentSort.rawValue.localizedCapitalized)"), + message: Text("Current Sort: \(currentSortName)"), buttons: buttons) } diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/items/detail/ItemDetailInfoView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/items/detail/ItemDetailInfoView.swift index db6b1006..09c045c6 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/items/detail/ItemDetailInfoView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/items/detail/ItemDetailInfoView.swift @@ -60,7 +60,7 @@ struct ItemDetailInfoView: View { } } if !item.isCritter { - Text("Customizable: \(item.customize == true ? "Yes" : "no")") + Text("Customizable: \(item.customize == true ? NSLocalizedString("Yes", comment: "") : NSLocalizedString("No", comment: ""))") .foregroundColor(.acText) } HStack(spacing: 16) { @@ -75,7 +75,7 @@ struct ItemDetailInfoView: View { .fontWeight(.semibold) .foregroundColor(.acHeaderBackground) if item.isCritter { - Text("Flick: ") + Text("Flick:") .foregroundColor(.acText) .padding(.leading, 8) Text("\(Int(Float(item.sell!) * 1.5))") diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/listing/ListingRow.swift b/ACHNBrowserUI/ACHNBrowserUI/views/listing/ListingRow.swift index 461c2cd1..d8c3b4b2 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/listing/ListingRow.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/listing/ListingRow.swift @@ -64,7 +64,7 @@ struct ListingRow: View { } } if !hideDetail { - Text("\(listing.username)\(listing.discord.map { $0.isEmpty ? "" : " · \($0)" } ?? "")\(listing.rating.map { $0.isEmpty ? " · No Rating" : " · \($0[..<$0.index($0.startIndex, offsetBy: 4)]) Rating" } ?? " · No Rating")") + Text("\(listing.username)\(listing.discord.map { $0.isEmpty ? "" : " · \($0)" } ?? "")\(listing.rating.map { $0.isEmpty ? " · "+NSLocalizedString("No Rating", comment: "") : " · \($0[..<$0.index($0.startIndex, offsetBy: 4)]) "+NSLocalizedString("Rating", comment: "") } ?? " · "+NSLocalizedString("No Rating", comment: ""))") .font(.subheadline) .foregroundColor(.acSecondaryText) } diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/settings/SettingsView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/settings/SettingsView.swift index aae98cb4..edde63cd 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/settings/SettingsView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/settings/SettingsView.swift @@ -42,7 +42,7 @@ struct SettingsView: View { Picker(selection: $appUserDefaults.hemisphere, label: Text("Hemisphere")) { ForEach(Hemisphere.allCases, id: \.self) { hemispehere in - Text(hemispehere.rawValue.capitalized).tag(hemispehere) + Text(LocalizedStringKey(hemispehere.rawValue.capitalized)).tag(hemispehere) } } Picker(selection: $appUserDefaults.fruit, @@ -53,7 +53,7 @@ struct SettingsView: View { .renderingMode(.original) .resizable() .frame(width: 30, height: 30) - Text(fruit.rawValue.capitalized).tag(fruit) + Text(LocalizedStringKey(fruit.rawValue.capitalized)).tag(fruit) } } } @@ -61,21 +61,21 @@ struct SettingsView: View { Picker(selection: $appUserDefaults.nookShop, label: Text("Nook shop")) { ForEach(Infrastructure.NookShop.allCases, id: \.self) { shop in - Text(shop.rawValue).tag(shop) + Text(LocalizedStringKey(shop.rawValue)).tag(shop) } } Picker(selection: $appUserDefaults.ableSisters, label: Text("Able sisters")) { ForEach(Infrastructure.AbleSisters.allCases, id: \.self) { sisters in - Text(sisters.rawValue.capitalized).tag(sisters) + Text(LocalizedStringKey(sisters.rawValue.capitalized)).tag(sisters) } } Picker(selection: $appUserDefaults.residentService, label: Text("Residents service")) { ForEach(Infrastructure.ResidentService.allCases, id: \.self) { service in - Text(service.rawValue.capitalized).tag(service) + Text(LocalizedStringKey(service.rawValue.capitalized)).tag(service) } } } diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/shared/SectionHeaderView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/shared/SectionHeaderView.swift index 7f14a954..b7d6eb17 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/shared/SectionHeaderView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/shared/SectionHeaderView.swift @@ -27,7 +27,7 @@ struct SectionHeaderView: View { .rotationEffect(.degrees(-3)) } - Text(text) + Text(LocalizedStringKey(text)) .font(.system(.subheadline, design: .rounded)) .fontWeight(.bold) .foregroundColor(.acHeaderText) diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/subscription/SubscribeView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/subscription/SubscribeView.swift index eac008c8..3e5cd593 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/subscription/SubscribeView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/subscription/SubscribeView.swift @@ -56,13 +56,7 @@ struct SubscribeView: View { }) { Text("Tap here to preview a notification").foregroundColor(.acHeaderBackground) } - Text(""" - Subscribing to AC Helper+ is a great way to to show support to our free and open source project.♥️ - - You also get access more features, turnip predictions notifications and creating any number of items list! 📈 - - More detail below. - """) + Text("ACHelperPlusDescription") .font(.body) .foregroundColor(.acText) .frame(width: 320) @@ -75,8 +69,8 @@ struct SubscribeView: View { self.subscriptionManager.puschase(product: self.sub!) } }, label: self.subscriptionManager.subscriptionStatus == .subscribed ? - "Thanks you for your support!" : - "Subscribe for \(price) / Month") + NSLocalizedString("Thank you for your support!", comment: "") : + NSLocalizedString("Subscribe for \(price) / Month", comment: "")) .opacity(subscriptionManager.inPaymentProgress ? 0.5 : 1.0) .disabled(subscriptionManager.inPaymentProgress) @@ -95,26 +89,14 @@ struct SubscribeView: View { private var lowerPart: some View { Group { - Text(""" - About the notification feature: - Everyday at 8 and 12 you'll get a notification with the average buy price of your store. - The more in game daily prices you enter after monday morning, the better next predictions will be! - - About the list feature: - In the free application you can create only one list of items in your "My stuff" tab. - Once you'll be subscribed to AC Helper+ you'll be able to create any number of list you desire. - """) + Text("ACHelperPlusDetails") .font(.body) .foregroundColor(.acText) .frame(width: 320) .padding() .lineLimit(nil) Spacer(minLength: 16) - Text(""" - A \(price) per month purchase will be applied to your iTunes account on confirmation. - Subscriptions will automatically renew unless canceled within 24-hours before the end of the current period. - You can cancel anytime with your iTunes account settings. Any unused portion of a free trial will be forfeited if you purchase a subscription. - """) + Text("ACHelperPlusPriceAndAboDetail \(price)") .font(.caption) .foregroundColor(.acText) .frame(width: 320) @@ -123,7 +105,7 @@ struct SubscribeView: View { Spacer(minLength: 16) makeBorderedButton(action: { self.sheetURL = URL(string: "https://github.com/Dimillian/ACHNBrowserUI/blob/master/privacy-policy.md#ac-helper-privacy-policy") - }, label: "Privacy policy") + }, label: NSLocalizedString("Privacy Policy", comment: "")) Spacer(minLength: 16) makeBorderedButton(action: { diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayBirthdaysSection.swift b/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayBirthdaysSection.swift index b4f1648c..99483fb2 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayBirthdaysSection.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayBirthdaysSection.swift @@ -21,10 +21,10 @@ struct TodayBirthdaysSection: View { guard let birthday = villager.birthday else { return "" } let formatter = DateFormatter() - formatter.dateFormat = "d/M" + formatter.setLocalizedDateFormatFromTemplate("d/M") let birthdayDate = formatter.date(from: birthday)! - formatter.dateFormat = "dd" + formatter.setLocalizedDateFormatFromTemplate("dd") return formatter.string(from: birthdayDate) } @@ -32,10 +32,10 @@ struct TodayBirthdaysSection: View { guard let birthday = villager.birthday else { return "" } let formatter = DateFormatter() - formatter.dateFormat = "d/M" + formatter.setLocalizedDateFormatFromTemplate("d/M") let birthdayDate = formatter.date(from: birthday)! - formatter.dateFormat = "MMM" + formatter.setLocalizedDateFormatFromTemplate("MMM") return formatter.string(from: birthdayDate) } diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayEventsSection.swift b/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayEventsSection.swift index ae473b18..df51e41c 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayEventsSection.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayEventsSection.swift @@ -58,7 +58,7 @@ struct TodayEventsSection: View { } private func subsectionHeader(_ text: String) -> some View { - Text(text) + Text(LocalizedStringKey(text)) .font(.system(.caption, design: .rounded)) .fontWeight(.bold) .foregroundColor(Color.acSecondaryText) @@ -67,18 +67,15 @@ struct TodayEventsSection: View { private func makeCell(event: (Date, Event?)) -> some View { let formatter = DateFormatter() - formatter.dateFormat = "dd" - let day: String = formatter.string(from: event.0) - - formatter.dateFormat = "MMM" - let month: String = formatter.string(from: event.0) + formatter.setLocalizedDateFormatFromTemplate("MMM dd") + let date: String = formatter.string(from: event.0) return HStack { makeLabel(event.1!.title()) Spacer() - Text("\(month) \(day)") + Text("\(date)") .font(.system(.subheadline, design: .rounded)) .fontWeight(.bold) .foregroundColor(.acText) @@ -91,7 +88,7 @@ struct TodayEventsSection: View { } private func makeLabel(_ text: String) -> some View { - Text(text) + Text(LocalizedStringKey(text)) .font(Font.system(.headline, design: .rounded)) .fontWeight(.semibold) .lineLimit(2) diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodaySectionEditView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodaySectionEditView.swift index 80f214d1..bd87e675 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodaySectionEditView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodaySectionEditView.swift @@ -87,7 +87,7 @@ struct TodaySectionEditView: View { // @TODO: Do we need explainer text? private var footer: some View { VStack(alignment: .leading, spacing: 8) { - Text("Drag and drop").fontWeight(.bold) + Text(" to re-order sections. ") + Text("Drag and drop").fontWeight(.bold) + Text(" to re-order sections.") Text("Check or un-check").fontWeight(.bold) + Text(" rows to hide sections from the dashboard.") Text("Your top-most section will be the default detail view on iPad and Mac.") } diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayView.swift index 0f357fa7..e7c7fc66 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayView.swift @@ -100,7 +100,7 @@ struct TodayView: View { private func dateString() -> String { let f = DateFormatter() - f.dateFormat = "EEEE, MMM d" + f.setLocalizedDateFormatFromTemplate("EEEE, MMM d") return f.string(from: Date()) } } diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayWhatsNewSection.swift b/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayWhatsNewSection.swift index d892d9d7..103c728a 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayWhatsNewSection.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayWhatsNewSection.swift @@ -10,10 +10,13 @@ import SwiftUI struct TodayWhatsNewSection: View { @Binding var showWhatsNew: Bool + + let version: String = "2020.2" + var body: some View { Section(header: SectionHeaderView(text: "What's New", icon: "star.circle.fill")) { HStack { - Text("See what's new in update 2020.2") + Text("See what's new in update \(version)") .font(.system(.headline, design: .rounded)) .fontWeight(.medium) .foregroundColor(.acText) diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/turnips/TurnipsFormView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/turnips/TurnipsFormView.swift index 791c0099..b61c084f 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/turnips/TurnipsFormView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/turnips/TurnipsFormView.swift @@ -126,7 +126,7 @@ extension TurnipsFormView { private func makeWeekdayRow(_ weekday: String) -> some View { HStack { - Text(weekday) + Text(LocalizedStringKey(weekday)) Spacer(minLength: 40) TextField("AM", text: morningField(for: weekday)) .keyboardType(.numberPad) diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/turnips/TurnipsView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/turnips/TurnipsView.swift index 75b0f3c6..d390c6bd 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/turnips/TurnipsView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/turnips/TurnipsView.swift @@ -115,7 +115,7 @@ extension TurnipsView { Button(action: { self.presentedSheet = .subscription(subManager: self.subManager) }) { - Text("See more...") + Text("Learn more...") .font(.headline) .fontWeight(.bold) .foregroundColor(.white) @@ -129,17 +129,14 @@ extension TurnipsView { private var predictionsSection: some View { Section(header: SectionHeaderView(text: turnipsDisplay.title(), icon: "dollarsign.circle.fill"), footer: Text(viewModel.pendingNotifications == 0 ? "" : - """ - You'll receive prices predictions in \(viewModel.pendingNotifications - 1) upcoming - daily notifications. - """) + "\(viewModel.pendingNotifications - 1) upcomingDailyNotifications") .font(.footnote) .foregroundColor(.catalogUnselected) .lineLimit(nil)) { if viewModel.averagesPrices != nil && viewModel.minMaxPrices != nil { Picker(selection: $turnipsDisplay, label: Text("")) { ForEach(TurnipsDisplay.allCases, id: \.self) { section in - Text(section.rawValue.capitalized) + Text(LocalizedStringKey(section.rawValue.capitalized)) } } .pickerStyle(SegmentedPickerStyle()) diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/turnips/charts/TurnipsChartBottomLegendView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/turnips/charts/TurnipsChartBottomLegendView.swift index c495071f..1bab5ed3 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/turnips/charts/TurnipsChartBottomLegendView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/turnips/charts/TurnipsChartBottomLegendView.swift @@ -50,7 +50,7 @@ struct TurnipsChartBottomLegendView: View { } func weekdays(offset: Int, weekday: String, ratioX: CGFloat) -> some View { - Text(weekday) + Text(LocalizedStringKey(weekday)) .font(.callout) .fontWeight(.bold) .foregroundColor(.acText) diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/turnips/rows/TurnipsAveragePriceRow.swift b/ACHNBrowserUI/ACHNBrowserUI/views/turnips/rows/TurnipsAveragePriceRow.swift index 265af037..0edd4972 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/turnips/rows/TurnipsAveragePriceRow.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/turnips/rows/TurnipsAveragePriceRow.swift @@ -41,7 +41,7 @@ struct TurnipsAveragePriceRow: View { var body: some View { HStack { - Text(label) + Text(LocalizedStringKey(label)) .font(.body) .foregroundColor(.acText) Spacer() diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/villagers/VillagerDetailView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/villagers/VillagerDetailView.swift index 397cf34f..502d4d80 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/villagers/VillagerDetailView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/villagers/VillagerDetailView.swift @@ -52,7 +52,7 @@ struct VillagerDetailView: View { private func makeInfoCell(title: String, value: String) -> some View { HStack { - Text(title) + Text(LocalizedStringKey(title)) .foregroundColor(textColor) .font(.headline) .fontWeight(.bold) @@ -75,7 +75,7 @@ struct VillagerDetailView: View { .listRowBackground(Rectangle().fill(backgroundColor)) .padding() makeInfoCell(title: "Personality", value: villager.personality).padding() - makeInfoCell(title: "Birthday", value: villager.formattedBirthday ?? "Unknown").padding() + makeInfoCell(title: "Birthday", value: villager.formattedBirthday ?? NSLocalizedString("Unknown", comment: "")).padding() makeInfoCell(title: "Species", value: villager.species).padding() makeInfoCell(title: "Gender", value: villager.gender).padding() makeInfoCell(title: "Catch phrase", value: villager.catchPhrase ?? "").padding()