From 6de5670bd43c2f1b499a802b913573fc390033d4 Mon Sep 17 00:00:00 2001 From: Jan van Heesch Date: Fri, 8 May 2020 22:50:52 +0200 Subject: [PATCH 01/16] Changes due to code review --- .../Backend/environments/UserCollection.swift | 11 +++-------- .../viewModels/DashboardViewModel.swift | 7 +------ .../DashboardCollectionProgressSection.swift | 17 +---------------- 3 files changed, 5 insertions(+), 30 deletions(-) diff --git a/ACHNBrowserUI/ACHNBrowserUI/packages/Backend/Sources/Backend/environments/UserCollection.swift b/ACHNBrowserUI/ACHNBrowserUI/packages/Backend/Sources/Backend/environments/UserCollection.swift index f64db87b..55553a02 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/packages/Backend/Sources/Backend/environments/UserCollection.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/packages/Backend/Sources/Backend/environments/UserCollection.swift @@ -55,17 +55,12 @@ public class UserCollection: ObservableObject { caught += 1 } } - return caught - } - - public func collectedIn(list: [Item]) -> Int { - var collected = 0 for item in items { - if list.contains(item) { - collected += 1 + if list.contains(item) && !item.name.contains("(fake)") { + caught += 1 } } - return collected + return caught } public func toggleItem(item: Item) -> Bool { diff --git a/ACHNBrowserUI/ACHNBrowserUI/viewModels/DashboardViewModel.swift b/ACHNBrowserUI/ACHNBrowserUI/viewModels/DashboardViewModel.swift index 0afef184..22239758 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/viewModels/DashboardViewModel.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/viewModels/DashboardViewModel.swift @@ -28,12 +28,7 @@ class DashboardViewModel: ObservableObject { self?.fishes = items[.fish] ?? [] self?.bugs = items[.bugs] ?? [] self?.fossils = items[.fossils] ?? [] - self?.art = [] - items[.art]?.forEach { art in - if(art.sell ?? 0 > 0) { - self?.art.append(art) - } - } + self?.art = items[.art]?.filter({ !$0.name.contains("(fake)") }) ?? [] } fetchIsland() fetchListings() diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCollectionProgressSection.swift b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCollectionProgressSection.swift index 51bd146d..db585b0c 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCollectionProgressSection.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCollectionProgressSection.swift @@ -30,21 +30,6 @@ struct DashboardCollectionProgressSection: View { } } - private func makeArtProgressView(icon: String, art: [Item]) -> some View { - HStack { - Image(icon) - .resizable() - .frame(width: 20, height: 20) - ProgressView(progress: CGFloat(collection.collectedIn(list: art)) / CGFloat(art.count), - trackColor: .catalogUnselected, - progressColor: .grass) - Text("\(collection.collectedIn(list: art))/\(art.count)") - .font(.caption) - .bold() - .foregroundColor(.text) - } - } - var body: some View { Section(header: SectionHeaderView(text: "Collection Progress")) { VStack(alignment: .leading) { @@ -55,7 +40,7 @@ struct DashboardCollectionProgressSection: View { makeProgressView(icon: "Fish19", critters: viewModel.fishes) makeProgressView(icon: "Ins62", critters: viewModel.bugs) makeProgressView(icon: "icon-fossil", critters: viewModel.fossils) - makeArtProgressView(icon: "icon-leaf", art: viewModel.art) + makeProgressView(icon: "icon-leaf", critters: viewModel.art) } else { Text("Loading...") .foregroundColor(.secondary) From 8392b7b87302ecc763422cfce7e897a63f681189 Mon Sep 17 00:00:00 2001 From: Jan van Heesch Date: Sat, 9 May 2020 04:26:31 +0200 Subject: [PATCH 02/16] Initial draft of localization --- .../ACHNBrowserUI.xcodeproj/project.pbxproj | 17 +++ .../de.lproj/Localizable.strings | 118 +++++++++++++++++ .../en.lproj/Localizable.strings | 119 ++++++++++++++++++ .../ACHNBrowserUI/views/about/AboutView.swift | 32 ++--- .../views/critters/ActiveCrittersView.swift | 8 +- .../DashboardAvailableCrittersSection.swift | 2 +- .../DashboardCollectionProgressSection.swift | 2 +- .../dashboard/DashboardEventTextView.swift | 2 +- .../DashboardNookazonListingSection.swift | 2 +- .../views/dashboard/DashboardView.swift | 10 +- .../ACHNBrowserUI/views/home/TabbarView.swift | 10 +- .../views/settings/SettingsView.swift | 4 +- .../views/subscription/SubscribeView.swift | 30 +---- 13 files changed, 296 insertions(+), 60 deletions(-) create mode 100644 ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings create mode 100644 ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings diff --git a/ACHNBrowserUI/ACHNBrowserUI.xcodeproj/project.pbxproj b/ACHNBrowserUI/ACHNBrowserUI.xcodeproj/project.pbxproj index 96bd52d4..96fee7f5 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 */; }; @@ -354,6 +355,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 = ""; }; @@ -824,6 +827,7 @@ 69AF8C5B243E2841001DD9CB /* LaunchScreen.storyboard */, 69AF8C5E243E2841001DD9CB /* Info.plist */, 69AF8C58243E2841001DD9CB /* Preview Content */, + 3DF14B2D24664B2600438646 /* Localizable.strings */, ); path = ACHNBrowserUI; sourceTree = ""; @@ -1121,6 +1125,7 @@ knownRegions = ( en, Base, + de, ); mainGroup = 69AF8C44243E283D001DD9CB; packageReferences = ( @@ -1215,6 +1220,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 */, @@ -1404,6 +1410,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 = ( @@ -1427,6 +1442,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"; @@ -1487,6 +1503,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..dd570d0b --- /dev/null +++ b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings @@ -0,0 +1,118 @@ +/* + Localizable.strings + ACHNBrowserUI + + Created by Jan on 09.05.20. + Copyright © 2020 Thomas Ricouard. All rights reserved. +*/ + +"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."; +"Able sisters" = "Schneiderei"; +"About" = "Über"; +"AC Helper+" = "AC Helper+"; +"App Icon" = "App Icon"; +"Average" = "Durchschnitt"; +"Close" = "Schließen"; +"Description" = "Beschreibung"; +"Dismiss" = "Abbrechen"; +"Hemisphere" = "Hemisphäre"; +"Island" = "Insel"; +"Island name" = "Inselname"; +"Loading Listings..." = "Loading Listings..."; +"Loading Visitors...." = "Lade Besucher...."; +"Loading..." = "Lade..."; +"Make an Offer" = "Angebot abgeben"; +"Minimum" = "Minimum"; +"MinMax" = "MinMax"; +"name-en" = "name-en"; +"Need Materials" = "Need Materials"; +"No listings found on Nookazon" = "No listings found on Nookazon"; +"Nook shop" = "Nooks Laden"; +"Please select or go stars some items!" = "Please select or go stars some items!"; +"Residents service" = "Service-Center"; +"Save" = "Speichern"; +"Starting fruit" = "Inselfrucht"; +"Tap here to preview a notification" = "Tippe hier für eine Vorschau"; +"To help us support the application and get turnip predictions notification, you can try out AC Helper+" = "To help us support the application and get turnip predictions notification, you can try out AC Helper+"; +"unknown source" = "unknown source"; +"Upgrade to +" = "Upgrade auf +"; +"Visitors" = "Besucher"; +"You caught them all!" = "Du hast alle gefangen!"; +"You're subscribed to AC Helper+" = "You're subscribed to AC Helper+"; +"Your island name" = "Name deiner Insel"; + +// copy and paste "export" of Text() and similar SwiftUI functions +// ActiveCittersView +"Active Critters" = "Aktive Tierchen"; +// DashboardView +"EEEE, dd MMMM" = "EEEE, dd. MMMM"; +"Dashboard" = "Startseite"; +"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 average buy prices should be " = "Der heutige durchschnittliche Kaufpreis sollte bei "; +" for this morning and " = " heute Morgen und bei "; +" for this afternoon" = " heute Nachmittag liegen"; +// DashboardEventTextView +"dd MMMM" = "dd. MMMM"; +"Today is %@!" = "Heute ist %@!"; +"Today events are " = "Heutigen Events sind "; +" and " = " und "; +"No events today." = "Heute keine Events."; +"Next event: %@!" = "Nächstes Event: %@!"; +// DashboardAvailableCrittersSection +"%lld new fishes" = "%lld neue Fische"; +"%lld new bugs" = "%lld neue Insekten"; +// SettingsView +"Restore purchase" = "Einkäufe wiederherstellen"; +"Preferences" = "Einstellungen"; +// to be continued + + +// Generated export of NSLocalizedString +"Acknowledgements" = "Danksagungen"; +"App Settings" = "App Einstellungen"; +"App version" = "App Version"; +"Available This Month" = "Diesen Monat Verfügbar"; +"Caught" = "Gefangen"; +"Catalog" = "Katalog"; +"Christian & Ninji for the turnip predictions algorithm" = "Christian & Ninji für den Rüben Prognose Algorithmus"; +"Collection Progress" = "Sammelfortschritt"; +"Error" = "Fehler"; +"Game patch data" = "Spielversion Daten"; +"Leaving this month" = "Leaving this month"; +"My Stuff" = "Meine Sachen"; +"New this month" = "New this month"; +"Nookazon for the marketplace" = "Nookazon für den Marktplatz"; +"Our amazing contributors" = "Unsere großartigen Mitwirkenden"; +"Privacy Policy" = "Datenschutzbestimmungen"; +"Rate the app on the App Store" = "Bewerte die App im App Store"; +"Recent Nookazon Listings" = "Neuste Verkäufe auf Nookazon"; +"Shihab / JPEGuin for the icon" = "Shihab / JPEGuin für das Icon"; +"Souce code / report an issue" = "Quell Code / Fehler melden"; +"Subscribe for %@ / Month" = "Abonnieren für %@ / Monat"; +"Term of Use" = "Nutzungsbedingungen"; +"Thank you for your support!" = "Danke für deine Unterstützung!"; +"The app" = "Die App"; +"The NookPlaza API by Azarro" = "Die NookPlaza API von Azarro"; +"To catch" = "To catch"; +"Today" = "Heute"; +"Today on %@" = "Heute auf %@"; +"Top Turnip Island" = "Top Turnip Island"; +"Turnip predictions" = "Rüben Prognose"; +"Turnip.exchange" = "Turnip.exchange"; +"Turnips" = "Rüben"; +"Villager birthday" = "Geburtstag"; +"Villagers" = "Bewohner"; diff --git a/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings new file mode 100644 index 00000000..d92913e7 --- /dev/null +++ b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings @@ -0,0 +1,119 @@ +/* + Localizable.strings + ACHNBrowserUI + + Created by Jan on 09.05.20. + Copyright © 2020 Thomas Ricouard. All rights reserved. +*/ + +"ACHelperPlusDescription" = "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."; +"ACHelperPlusDetails" = "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."; +"ACHelperPlusPriceAndAboDetail %@" = "A %@ 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."; +"Able sisters" = "Able sisters"; +"About" = "About"; +"AC Helper+" = "AC Helper+"; +"App Icon" = "App Icon"; +"Average" = "Average"; +"Close" = "Close"; +"Description" = "Description"; +"Dismiss" = "Dismiss"; +"Hemisphere" = "Hemisphere"; +"Island" = "Island"; +"Island name" = "Island name"; +"Loading Listings..." = "Loading Listings..."; +"Loading Visitors...." = "Loading Visitors...."; +"Loading..." = "Loading..."; +"Make an Offer" = "Make an Offer"; +"Minimum" = "Minimum"; +"MinMax" = "MinMax"; +"name-en" = "name-en"; +"Need Materials" = "Need Materials"; +"No listings found on Nookazon" = "No listings found on Nookazon"; +"Nook shop" = "Nook shop"; +"Please select or go stars some items!" = "Please select or go stars some items!"; +"Residents service" = "Residents service"; +"Save" = "Save"; +"Starting fruit" = "Starting fruit"; +"Tap here to preview a notification" = "Tap here to preview a notification"; +"To help us support the application and get turnip predictions notification, you can try out AC Helper+" = "To help us support the application and get turnip predictions notification, you can try out AC Helper+"; +"unknown source" = "unknown source"; +"Upgrade to +" = "Upgrade to +"; +"Visitors" = "Visitors"; +"You caught them all!" = "You caught them all!"; +"You're subscribed to AC Helper+" = "You're subscribed to AC Helper+"; +"Your island name" = "Your island name"; + +// copy and paste "export" of Text() and similar SwiftUI functions +// ActiveCittersView +"Active Critters" = "Active Critters"; +// DashboardView +"EEEE, dd MMMM" = "EEEE, dd MMMM"; +"Dashboard" = "Startseite"; +"Today is sunday, don't forget to buy more turnips and fill your buy price" = "Today is sunday, don't forget to buy more turnips and fill your buy price"; +"Today average buy prices should be " = "Today average buy prices should be "; +" for this morning and " = " for this morning and "; +" for this afternoon" = " for this afternoon"; +// DashboardEventTextView +"dd MMMM" = "dd MMMM"; +"Today is %@!" = "Today is %@!"; +"Today events are " = "Today events are "; +" and " = " and "; +"No events today." = "No events today."; +"Next event: %@!" = "Next event: %@!"; +// DashboardAvailableCrittersSection +"%lld new fishes" = "%lld new fishes"; +"%lld new bugs" = "%lld new bugs"; +// SettingsView +"Restore purchase" = "Restore purchase"; +"Preferences" = "Preferences"; +// to be continued + + +// Generated export of NSLocalizedString +"Acknowledgements" = "Acknowledgements"; +"App Settings" = "App Settings"; +"App version" = "App version"; +"Available This Month" = "Available This Month"; +"Caught" = "Caught"; +"Catalog" = "Catalog"; +"Christian & Ninji for the turnip predictions algorithm" = "Christian & Ninji for the turnip predictions algorithm"; +"Collection Progress" = "Collection Progress"; +"Error" = "Error"; +"Game patch data" = "Game patch data"; +"Leaving this month" = "Leaving this month"; +"My Stuff" = "My Stuff"; +"New this month" = "New this month"; +"Nookazon for the marketplace" = "Nookazon for the marketplace"; +"Our amazing contributors" = "Our amazing contributors"; +"Privacy Policy" = "Privacy Policy"; +"Rate the app on the App Store" = "Rate the app on the App Store"; +"Recent Nookazon Listings" = "Recent Nookazon Listings"; +"Shihab / JPEGuin for the icon" = "Shihab / JPEGuin for the icon"; +"Souce code / report an issue" = "Souce code / report an issue"; +"Subscribe for %@ / Month" = "Subscribe for %@ / Month"; +"Term of Use" = "Term of Use"; +"Thank you for your support!" = "Thanks you for your support!"; +"The app" = "The app"; +"The NookPlaza API by Azarro" = "The NookPlaza API by Azarro"; +"To catch" = "To catch"; +"Today" = "Today"; +"Today on %@" = "Today on %@"; +"Top Turnip Island" = "Top Turnip Island"; +"Turnip predictions" = "Turnip predictions"; +"Turnip.exchange" = "Turnip.exchange"; +"Turnips" = "Turnips"; +"Villager birthday" = "Villager birthday"; +"Villagers" = "Villagers"; + diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/about/AboutView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/about/AboutView.swift index dc245058..7967c2d0 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/about/AboutView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/about/AboutView.swift @@ -14,11 +14,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 { @@ -63,57 +63,57 @@ struct AboutView: View { var body: some View { NavigationView { List { - Section(header: SectionHeaderView(text: "The app")) { + Section(header: SectionHeaderView(text: NSLocalizedString("The app", comment: ""))) { makeRow(image: "chevron.left.slash.chevron.right", - text: "Souce code / report an issue", color: .bell) + text: NSLocalizedString("Souce code / report an issue", comment: ""), color: .bell) .onTapGesture { self.selectedSheet = .safari(URL(string: "https://github.com/Dimillian/ACHNBrowserUI")!) } makeRow(image: "star.fill", - text: "Rate the app on the App Store", color: .bell) + text: NSLocalizedString("Rate the app on the App Store", comment: ""), color: .bell) .onTapGesture { UIApplication.shared.open(URL(string: "https://itunes.apple.com/app/id1508764244")!, options: [:], completionHandler: nil) } - makeRow(image: "lock", text: "Privacy Policy", color: .bell).onTapGesture { + makeRow(image: "lock", text: NSLocalizedString("Privacy Policy", comment: ""), color: .bell).onTapGesture { self.selectedSheet = .safari(URL(string: "https://github.com/Dimillian/ACHNBrowserUI/blob/master/privacy-policy.md#ac-helper-privacy-policy")!) } - makeRow(image: "person", text: "Term of Use", color: .bell).onTapGesture { + makeRow(image: "person", text: NSLocalizedString("Term of Use", comment: ""), color: .bell).onTapGesture { self.selectedSheet = .safari(URL(string: "https://github.com/Dimillian/ACHNBrowserUI/blob/master/term-of-use.md#ac-helper-term-of-use")!) } makeDetailRow(image: "tag", - text: "App version", + text: NSLocalizedString("App version", comment: ""), detail: "\(versionNumber) (\(buildNumber))", color: .bell) makeDetailRow(image: "gamecontroller", - text: "Game patch data", + text: NSLocalizedString("Game patch data", comment: ""), detail: "1.2.0", color: .bell) } - Section(header: SectionHeaderView(text: "Acknowledgements")) { - makeRow(image: "suit.heart.fill", text: "Our amazing contributors", color: .red) + Section(header: SectionHeaderView(text: NSLocalizedString("Acknowledgements", comment: ""))) { + makeRow(image: "suit.heart.fill", text: NSLocalizedString("Our amazing contributors", comment: ""), color: .red) .onTapGesture { self.selectedSheet = .safari(URL(string: "https://github.com/Dimillian/ACHNBrowserUI/graphs/contributors")!) } - makeRow(image: "suit.heart.fill", text: "The NookPlaza API by Azarro", color: .red) + makeRow(image: "suit.heart.fill", text: NSLocalizedString("The NookPlaza API by Azarro", comment: ""), color: .red) .onTapGesture { self.selectedSheet = .safari(URL(string: "https://nookplaza.net/")!) } - makeRow(image: "suit.heart.fill", text: "Turnip.exchange", color: .red) + makeRow(image: "suit.heart.fill", text: NSLocalizedString("Turnip.exchange", comment: ""), color: .red) .onTapGesture { self.selectedSheet = .safari(URL(string: "https://turnip.exchange/")!) } - makeRow(image: "suit.heart.fill", text: "Nookazon for the marketplace", color: .red) + makeRow(image: "suit.heart.fill", text: NSLocalizedString("Nookazon for the marketplace", comment: ""), color: .red) .onTapGesture { self.selectedSheet = .safari(URL(string: "https://nookazon.com/")!) } - makeRow(image: "suit.heart.fill", text: "Shihab / JPEGuin for the icon", color: .red) + makeRow(image: "suit.heart.fill", text: NSLocalizedString("Shihab / JPEGuin for the icon", comment: ""), color: .red) .onTapGesture { self.selectedSheet = .safari(URL(string: "https://twitter.com/JPEGuin")!) } makeRow(image: "suit.heart.fill", - text: "Christian & Ninji for the turnip predictions algorithm", + text: NSLocalizedString("Christian & Ninji for the turnip predictions algorithm", comment: ""), color: .red) .onTapGesture { self.selectedSheet = .safari(URL(string: "https://elxris.github.io/Turnip-Calculator/")!) diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/critters/ActiveCrittersView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/critters/ActiveCrittersView.swift index 2c1ef5fb..fe883c76 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/critters/ActiveCrittersView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/critters/ActiveCrittersView.swift @@ -55,13 +55,13 @@ struct ActiveCritterSections: View { var body: some View { Group { - makeSectionOrPlaceholder(title: "New this month", + makeSectionOrPlaceholder(title: NSLocalizedString("New this month", comment: ""), critters: newThisMonth(critters: selectedTab == .fishes ? activeFishes : activeBugs)) - makeSectionOrPlaceholder(title: "To catch", + makeSectionOrPlaceholder(title: NSLocalizedString("To catch", comment: ""), critters: toCatchCritter(critters: selectedTab == .fishes ? activeFishes : activeBugs)) - makeSectionOrPlaceholder(title: "Leaving this month", + makeSectionOrPlaceholder(title: NSLocalizedString("Leaving this month", comment: ""), critters: leavingThisMonth(critters: selectedTab == .fishes ? activeFishes : activeBugs)) - Section(header: SectionHeaderView(text: "Caught")) { + Section(header: SectionHeaderView(text: NSLocalizedString("Caught", comment: ""))) { ForEach(caughtCritters(critters: selectedTab == .fishes ? activeFishes : activeBugs), content: sectionContent) } diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardAvailableCrittersSection.swift b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardAvailableCrittersSection.swift index db224f7d..a5904108 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardAvailableCrittersSection.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardAvailableCrittersSection.swift @@ -59,7 +59,7 @@ struct DashboardAvailableCrittersSection: View { } var body: some View { - Section(header: SectionHeaderView(text: "Available This Month")) { + Section(header: SectionHeaderView(text: NSLocalizedString("Available This Month", comment: ""))) { NavigationLink(destination: ActiveCrittersView(activeFishes: viewModel.fishes.filterActive(), activeBugs: viewModel.bugs.filterActive())) { crittersView diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCollectionProgressSection.swift b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCollectionProgressSection.swift index db585b0c..4788f3d7 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCollectionProgressSection.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCollectionProgressSection.swift @@ -31,7 +31,7 @@ struct DashboardCollectionProgressSection: View { } var body: some View { - Section(header: SectionHeaderView(text: "Collection Progress")) { + Section(header: SectionHeaderView(text: NSLocalizedString("Collection Progress", comment: ""))) { VStack(alignment: .leading) { if !viewModel.fishes.isEmpty && !viewModel.bugs.isEmpty && diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardEventTextView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardEventTextView.swift index 4f5a22e6..3ca39f5c 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardEventTextView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardEventTextView.swift @@ -16,7 +16,7 @@ struct DashboardEventTextView: View { func makeDateBadge(date: Date) -> some View { let formatter = DateFormatter() - formatter.dateFormat = "dd MMMM" + formatter.setLocalizedDateFormatFromTemplate("dd MMMM") return Text(formatter.string(from: date)) .foregroundColor(.white) .font(.caption) diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardNookazonListingSection.swift b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardNookazonListingSection.swift index cc507746..e0006442 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardNookazonListingSection.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardNookazonListingSection.swift @@ -15,7 +15,7 @@ struct DashboardNookazonListingSection: View { @ObservedObject var viewModel: DashboardViewModel var body: some View { - Section(header: SectionHeaderView(text: "Recent Nookazon Listings")) { + Section(header: SectionHeaderView(text: NSLocalizedString("Recent Nookazon Listings", comment: ""))) { if viewModel.recentListings == nil { Text("Loading...") .foregroundColor(.secondary) diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardView.swift index 4739dc57..af27715d 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardView.swift @@ -43,12 +43,12 @@ struct DashboardView: View { } private var todayText: String { - "Today\(!userDefaults.islandName.isEmpty ? " on \(userDefaults.islandName)" : "")" + !userDefaults.islandName.isEmpty ? NSLocalizedString("Today on \(userDefaults.islandName)", comment: "") : NSLocalizedString("Today", comment: "") } private func makeDateView() -> some View { let formatter = DateFormatter() - formatter.dateFormat = "EEEE, dd MMMM" + formatter.setLocalizedDateFormatFromTemplate("EEEE, dd MMMM") let dateString = formatter.string(from: Date()) return Section(header: SectionHeaderView(text: todayText)) { VStack(alignment: .leading) { @@ -60,7 +60,7 @@ struct DashboardView: View { } private func makeBirthdayView() -> some View { - Section(header: SectionHeaderView(text: "Villager birthday")) { + Section(header: SectionHeaderView(text: NSLocalizedString("Villager birthday", comment: ""))) { ForEach(villagersViewModel.todayBirthdays) { villager in NavigationLink(destination: VillagerDetailView(villager: villager), label: { @@ -71,7 +71,7 @@ struct DashboardView: View { } private func makeTurnipsPredictionsView() -> some View { - Section(header: SectionHeaderView(text: "Turnip predictions")) { + Section(header: SectionHeaderView(text: NSLocalizedString("Turnip predictions", comment: ""))) { Group { if turnipsPredictionsService.predictions?.todayAverages?.isEmpty == true { Text("Today is sunday, don't forget to buy more turnips and fill your buy price") @@ -95,7 +95,7 @@ struct DashboardView: View { } private func makeTopTurnipSection() -> some View { - Section(header: SectionHeaderView(text: "Top Turnip Island")) { + Section(header: SectionHeaderView(text: NSLocalizedString("Top Turnip Island", comment: ""))) { if viewModel.island == nil { Text("Loading...") .foregroundColor(.secondary) diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/home/TabbarView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/home/TabbarView.swift index d6346fe6..67e7bf2c 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/home/TabbarView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/home/TabbarView.swift @@ -23,19 +23,19 @@ struct TabbarView: View { TabView(selection: $uiState.selectedTab) { Group { DashboardView().tabItem{ - self.tabbarItem(text: "Dashboard", image: "icon-bells") + self.tabbarItem(text: NSLocalizedString("Dashboard", comment: ""), image: "icon-bells") }.tag(UIState.Tab.dashboard) CategoriesView(categories: Category.items()).tabItem{ - self.tabbarItem(text: "Catalog", image: "icon-leaf") + self.tabbarItem(text: NSLocalizedString("Catalog", comment: ""), image: "icon-leaf") }.tag(UIState.Tab.items) TurnipsView().tabItem { - tabbarItem(text: "Turnips", image: "icon-turnip") + tabbarItem(text: NSLocalizedString("Turnips", comment: ""), image: "icon-turnip") }.tag(UIState.Tab.turnips) VillagersListView().environmentObject(UserCollection.shared).tabItem{ - self.tabbarItem(text: "Villagers", image: "icon-villager") + self.tabbarItem(text: NSLocalizedString("Villagers", comment: ""), image: "icon-villager") }.tag(UIState.Tab.villagers) CollectionListView().tabItem{ - self.tabbarItem(text: "My Stuff", image: "icon-cardboard") + self.tabbarItem(text: NSLocalizedString("My Stuff", comment: ""), image: "icon-cardboard") }.tag(UIState.Tab.collection) } }.accentColor(.white) diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/settings/SettingsView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/settings/SettingsView.swift index 8e6ea60a..09ba2947 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/views/settings/SettingsView.swift +++ b/ACHNBrowserUI/ACHNBrowserUI/views/settings/SettingsView.swift @@ -26,7 +26,7 @@ struct SettingsView: View { var body: some View { NavigationView { Form { - Section(header: SectionHeaderView(text: "Island")) { + Section(header: SectionHeaderView(text: NSLocalizedString("Island", comment: ""))) { HStack { Text("Island name") Spacer() @@ -75,7 +75,7 @@ struct SettingsView: View { } } - Section(header: SectionHeaderView(text: "App Settings")) { + Section(header: SectionHeaderView(text: NSLocalizedString("App Settings", comment: ""))) { if UIApplication.shared.supportsAlternateIcons && UIDevice.current.userInterfaceIdiom != .pad { NavigationLink(destination: AppIconPickerView()) { Text("App Icon") diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/subscription/SubscribeView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/subscription/SubscribeView.swift index bfe439a8..f56c709e 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(.bell) } - 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(.text) .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(.text) .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(.text) .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: { From b5024e7783998758bc5775a78a8c3d52d7a87c2e Mon Sep 17 00:00:00 2001 From: Jan van Heesch Date: Sat, 9 May 2020 15:36:10 +0200 Subject: [PATCH 03/16] localization progress: - more text strings added to english localization - translated Dashboard, Settings, AC Helper+, About to German - modified a few helper classes for localization support (needs review!) - changed DateFormatter to localizable date formats --- .../de.lproj/Localizable.strings | 114 +++++++++++++----- .../en.lproj/Localizable.strings | Bin 10438 -> 14040 bytes .../views/settings/SettingsView.swift | 10 +- .../TodayBirthdaysSection.swift | 8 +- .../todayDashboard/TodayEventsSection.swift | 13 +- .../todayDashboard/TodaySectionEditView.swift | 2 +- .../todayDashboard/TodayWhatsNewSection.swift | 5 +- 7 files changed, 101 insertions(+), 51 deletions(-) diff --git a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings index e3e1f6a4..8e48226b 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings +++ b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings @@ -21,7 +21,6 @@ Wenn du dir AC Helper+ holst, kannst du beliebig viele Listen erstellen und unte "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."; -"Able sisters" = "Schneiderei"; "About" = "Über"; "AC Helper+" = "AC Helper+"; "App Icon" = "App Icon"; @@ -29,9 +28,7 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "Close" = "Schließen"; "Description" = "Beschreibung"; "Dismiss" = "Abbrechen"; -"Hemisphere" = "Hemisphäre"; "Island" = "Insel"; -"Island name" = "Inselname"; "Loading Listings..." = "Loading Listings..."; "Loading Visitors...." = "Lade Besucher...."; "Loading..." = "Lade..."; @@ -41,11 +38,8 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "name-en" = "name-en"; "Need Materials" = "Need Materials"; "No listings found on Nookazon" = "No listings found on Nookazon"; -"Nook shop" = "Nooks Laden"; "Please select or go stars some items!" = "Please select or go stars some items!"; -"Residents service" = "Service-Center"; "Save" = "Speichern"; -"Starting fruit" = "Inselfrucht"; "Tap here to preview a notification" = "Tippe hier für eine Vorschau"; "To help us support the application and get turnip predictions notification, you can try out AC Helper+" = "To help us support the application and get turnip predictions notification, you can try out AC Helper+"; "unknown source" = "unknown source"; @@ -53,36 +47,98 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "Visitors" = "Besucher"; "You caught them all!" = "Du hast alle gefangen!"; "You're subscribed to AC Helper+" = "You're subscribed to AC Helper+"; -"Your island name" = "Name deiner Insel"; // copy and paste "export" of Text() and similar SwiftUI functions +// 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"; +"My Stuff" = "Meine Sachen"; + // TodayView "Change Section Order" = "Ändere die Reihenfolge"; -"EEEE, dd MMMM" = "EEEE, dd. MMMM"; // 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!"; + // ActiveCittersView "Active Critters" = "Aktive Tierchen"; -// DashboardView -"EEEE, dd MMMM" = "EEEE, dd. MMMM"; -"Dashboard" = "Startseite"; -"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 average buy prices should be " = "Der heutige durchschnittliche Kaufpreis sollte bei "; -" for this morning and " = " heute Morgen und bei "; -" for this afternoon" = " heute Nachmittag liegen"; -// DashboardEventTextView -"dd MMMM" = "dd. MMMM"; -"Today is %@!" = "Heute ist %@!"; -"Today events are " = "Heutigen Events sind "; -" and " = " und "; -"No events today." = "Heute keine Events."; -"Next event: %@!" = "Nächstes Event: %@!"; -// DashboardAvailableCrittersSection -"%lld new fishes" = "%lld neue Fische"; -"%lld new bugs" = "%lld neue Insekten"; + // SettingsView -"Restore purchase" = "Einkäufe wiederherstellen"; "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"; +"Restore purchase" = "Einkauf wiederherstellen"; + // to be continued @@ -92,13 +148,10 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "App version" = "App Version"; "Available This Month" = "Diesen Monat Verfügbar"; "Caught" = "Gefangen"; -"Catalog" = "Katalog"; "Christian & Ninji for the turnip predictions algorithm" = "Christian & Ninji für den Rüben Prognose Algorithmus"; -"Collection Progress" = "Sammelfortschritt"; "Error" = "Fehler"; "Game patch data" = "Spielversion Daten"; "Leaving this month" = "Leaving this month"; -"My Stuff" = "Meine Sachen"; "New this month" = "New this month"; "Nookazon for the marketplace" = "Nookazon für den Marktplatz"; "Our amazing contributors" = "Unsere großartigen Mitwirkenden"; @@ -118,6 +171,3 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "Top Turnip Island" = "Top Turnip Island"; "Turnip predictions" = "Rüben Prognose"; "Turnip.exchange" = "Turnip.exchange"; -"Turnips" = "Rüben"; -"Villager birthday" = "Geburtstag"; -"Villagers" = "Bewohner"; diff --git a/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings index a6392197812da3b398b2d228a2d0cb80df526581..425fd5da6a7111b17c39487cd39ba9e5a99b719f 100644 GIT binary patch literal 14040 zcmd^`+io1k5r*elH+hAX09%P2QI3%SIlw_^N|qGp1c{1aAU7+K5@}OQhD%zK-zaaA zN61B<#mWEm&r;Rw%r2LblNbpIE_b@CtLxNt>ft}XzutY+UFs(Kx!WCf&$?-M(Cv5M z>F-m0+wC^Gd3VwsYi!oN(09Xbc3a);?tb^VW)8bo8sF8oC*2**8)8e(yTWp!&mCcZ z+P%@|A2l-5-^2F#N%tG!|D^ksK0nppjkjwLyCcD~>x*trI40d+^$QHYlWtq1huuqI zo9pS3;GXIERL{rSZ9`+5qW(aC693PGmt8d5{nIpyBCh57p1NBVL6OE#^ul4kg7z1JVW+7eSvzl3ztkL(WKZiD+|2%5V<&B=nK(Ss6MJC+ zXecCyCT7CH^YbAto339b1#LBtg!U8sh1qoX#d&0P!!$qn6Ry*G8 zu*YNRen)h{q3z+64o-NsB)kLm zga@*Pd2cj#@^;lsPp|c~+~$yj<;Kd(;^LA{=TLKDJ!6`>)3^*d)-%V+WFdmV*TBQL5*% zueM(q_giCFB36V)>hlQS%g$_a8#ck&oJ)$F{PWM_!?*UjsaE_< zsUE>fYyk0lvxz?QU3g%K^qYR7G#H6({E5i!`8C~m)P8^jtIBSM5{uw{MP{j$5(q771D zN37(z_5o*l5AZv_;CJIJJkxH+4br??zIb&aaz>Xt30Q`y3D1rs>^*|AI6-)z)v`rj zcmw;1x%MRX+V+qGk=$HI1a-s-Pe&}y^X#05NLc0WQ)7t``y6wS1(7Uh9kU~_6TkDc zrEaU8hd1IBJG)2^Rio2lMp5CnwDz{Bi#+CI*?+_}taqY3%{Ew9EzZP>8YwD#f85Yp z+Vil^Q+>XLThq&G8Bi*4G2r7&YWfFnEP)`kfWn#c@O57nILASe#Sr z>l-<3(zF^XFp&dCj0(Skm#{~-4x0ElD}yM1!7h{(y`uMQ&5jhrYVCNYUjDk_b! z46RD&e~Bw=ia7pFvyNB#w4FO+tCqJK%9x%=(^TH}hLO1vDZ{@nhcJdkubeA~GhXpk z(;PJb`CD{0oIkzPzWAsE)g_5({S|eGt7qq{pKp-6V4usg`^A0V9S_u8QeWk|_9N4v zo0BKxNSqQ`i8ojD`C9XMvXjPn+_p`E=+JG2OOvm>kQIF=vQhWca__M@Q?Mmi>MnA? z7e#i9?wrbdb8m7*Kk4T(&;5B19vXD!b7 zBT<9)fHBp{|HW5YqPIl@*4xj-`lE(SJ{DzFb+;PIm~MzGD%whYj2I#~Ca<_A=+Fca zqH2jeJF#4Bm3Km;VEjf>cJ_t8xu%gAPyFk^2K~`T51RIxoUyY-4qT;@-vR5K1bgY9 z*FK;B4(z7f5eiRCTse{?=%?V_7bzds(MdgB24dntTZeVwM>z2lWtEW`qH`+khnmBu zxvImr(Vwmy|G20^Qj2H%bMZmM+Y=}Fnf_VF2QNa@Q!_SaedKw%DlJS_Vp#`vJ*;W- z=izkxS(L_>YzFUM&nmq=;s|G&N`EM!u~idUM}J+?wl2JRek|SKJ*(fTV`Ey~YB7y9 z^uXxHZOVRa$TMCn{VoEeh^Iow?FXiO4GmAyg2<}RyXOyRclio&Qj2K0?-*-=Mq-&@eyLGG53w!$U&=%GZl-Z`-_i-MI1nB3)9U`6qZVy_# zcJ~~gn*Fmej(-@urWWa8O_6I@Q}s46G?bKFWKHY>e%nyqWYWdLerjf7N>)LR*)g7^ z_7{h?Oh1zwALmGm@X6bGaOP)meb^wCUG~VMha4S~i>(^t^GivQ8gj0<06#-M1Hv|9 zsN`;Z);xg=`+Rk_hcV2~j|1t0NMJm)pa73hpOn-46T-})yTJM)@ABLKP8rC-(zSXYT^|JY} z<-DWh?!&iTN#z~cP26GDd9Th|m#8uZ7ykKtNMpP$K75aQBoAVqlA7^ZuOtGvs!jMh zW~j%4;{AnMHPo?yq6YxBIE~!SlWV$99Pi$(f-BFyb@)Ki!)Q}GafnTVc*0Bmz`-X;LBxvK^OuQCy%RQ-R>$ssK4&&{~zmCd^u{p1z z-%d4?*mIgYwj7}Ht!{jdOz#1zRJrzd0zmPbFGnEeF z6uxWt&Prl16{{e@7#`Y@&$+&B)6zTDE;|h_Aa7}e{0lomH}v%CZBX0<-B)(RI}F^L zaU1_#gQcsFU*{b9olUy3Gr_%TTHk5slUs00Ir+isuZFaQ>?7R0uAaYQ@>?^Du_4ZF zVDP&#Xq_`WT)#LU`!Dv6oYP^GbUne<_oBnD(XtiZft#7QiA<{cqXD_sq|GVfZ3=2C z?i}tn4ScQ7%q1fOtF>_4^JAa&cFwn+yusiYy{E`iDfv(CYEEy85-QZ{kL#GBZb=4y z!-Ct)6Y<3RgRUK>g@g0pjLlsQ&Og>%YeeeRMJ=xfZOpEa&cnDGDlqkH(4oG$Q9ahl zB2VI7SR!BbX5qu*Et&N(n1TngRr)4K9vmU9@G@8s9T|J7ntxq};x^FBC&3Oeleh{Ly*hVQ)9y)U}b zI}-i&^-K4Aq8>E=1M*P4(_1ZG;YIv5Wy%HV_Pyl$;0P+nIN{vYA9bIpA@)VJ>u#NU z9aLe}cAcNT3x=SezWeFu7@X5*Fg0U7eb_5VnT@aXj%07VUmQ{NiK0g3XxV(M9`+7` zUiT6>iTzr&R;k-f=ky+kRndJ|2Se_krzGtVymh<}9Ug}F+wc&)OSUO{Nz^vjud^yYV{l;m7u>x9od5s; delta 1006 zcmah{&rcIk5T1p`Ko=U=ZrKPGUYC^qOzTAxAT&m$2M-OR;iM)dR9aF>Y*$4ujT}6A zAb$Pr&D?yu1royKRtwRYJvpq0;C(qb5jvak*Cp0xGSr(jHgH2{5WAN;c|QA{#5ZX7^sJ-%%6PDietHaHfe8>Pqh~2UN~3C|EN{E zOY7Y`jqocAUiM?qJfNPQf}Z}21O2RhkUlzvr@DqG adTLbOFR?JW)y{_Coj!3w_JzLC=cRwZ1k|Vi diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/settings/SettingsView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/settings/SettingsView.swift index 20bb9a87..d73b2454 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/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/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) From 17c5e1a140c9b6bfd3977ba7c3bb932176cb9af2 Mon Sep 17 00:00:00 2001 From: Jan van Heesch Date: Sat, 9 May 2020 15:42:53 +0200 Subject: [PATCH 04/16] Translated ActiveCrittersView to German --- .../de.lproj/Localizable.strings | 14 ++++++++------ .../en.lproj/Localizable.strings | Bin 14040 -> 14116 bytes .../views/critters/ActiveCrittersView.swift | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings index 8e48226b..14384e5e 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings +++ b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings @@ -45,7 +45,6 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "unknown source" = "unknown source"; "Upgrade to +" = "Upgrade auf +"; "Visitors" = "Besucher"; -"You caught them all!" = "Du hast alle gefangen!"; "You're subscribed to AC Helper+" = "You're subscribed to AC Helper+"; // copy and paste "export" of Text() and similar SwiftUI functions @@ -112,7 +111,14 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "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!"; // ActiveCittersView -"Active Critters" = "Aktive Tierchen"; +"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"; @@ -147,12 +153,9 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "App Settings" = "App Einstellungen"; "App version" = "App Version"; "Available This Month" = "Diesen Monat Verfügbar"; -"Caught" = "Gefangen"; "Christian & Ninji for the turnip predictions algorithm" = "Christian & Ninji für den Rüben Prognose Algorithmus"; "Error" = "Fehler"; "Game patch data" = "Spielversion Daten"; -"Leaving this month" = "Leaving this month"; -"New this month" = "New this month"; "Nookazon for the marketplace" = "Nookazon für den Marktplatz"; "Our amazing contributors" = "Unsere großartigen Mitwirkenden"; "Privacy Policy" = "Datenschutzbestimmungen"; @@ -165,7 +168,6 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "Thank you for your support!" = "Danke für deine Unterstützung!"; "The app" = "Die App"; "The NookPlaza API by Azarro" = "Die NookPlaza API von Azarro"; -"To catch" = "To catch"; "Today" = "Heute"; "Today on %@" = "Heute auf %@"; "Top Turnip Island" = "Top Turnip Island"; diff --git a/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings index 425fd5da6a7111b17c39487cd39ba9e5a99b719f..e803c49d6265e11a0169535f8a1a9b6dcaeba176 100644 GIT binary patch delta 139 zcmcbSyCiQziQwjIf_|djN(^ocnGD4Y84RgFQi(xQ0^^XfgSbzSm?oQ=`cp`caegG&ZZK-(%aXqZh+CSwcx@a)W`!<}`yRESqag GV;BLiL?Uwl delta 63 zcmV-F0KosGZrE+GbP Date: Sat, 9 May 2020 16:03:39 +0200 Subject: [PATCH 05/16] improved localization files - sorted entries of Subscribe-, About- and SettingsView - removed obsolet entries --- .../de.lproj/Localizable.strings | 93 +++++++++--------- .../en.lproj/Localizable.strings | Bin 14116 -> 13628 bytes 2 files changed, 45 insertions(+), 48 deletions(-) diff --git a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings index 14384e5e..45c129a5 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings +++ b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings @@ -6,28 +6,8 @@ Copyright © 2020 Thomas Ricouard. All rights reserved. */ -"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."; -"About" = "Über"; -"AC Helper+" = "AC Helper+"; -"App Icon" = "App Icon"; "Average" = "Durchschnitt"; -"Close" = "Schließen"; "Description" = "Beschreibung"; -"Dismiss" = "Abbrechen"; "Island" = "Insel"; "Loading Listings..." = "Loading Listings..."; "Loading Visitors...." = "Lade Besucher...."; @@ -39,7 +19,6 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "Need Materials" = "Need Materials"; "No listings found on Nookazon" = "No listings found on Nookazon"; "Please select or go stars some items!" = "Please select or go stars some items!"; -"Save" = "Speichern"; "Tap here to preview a notification" = "Tippe hier für eine Vorschau"; "To help us support the application and get turnip predictions notification, you can try out AC Helper+" = "To help us support the application and get turnip predictions notification, you can try out AC Helper+"; "unknown source" = "unknown source"; @@ -48,6 +27,11 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "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."; @@ -110,6 +94,44 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "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"; @@ -143,33 +165,8 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "Shop" = "Laden"; "Residents service" = "Service-Center"; "Building" = "Gebäude"; +"App Settings" = "App Einstellungen"; +"App Icon" = "App Icon"; "Restore purchase" = "Einkauf wiederherstellen"; // to be continued - - -// Generated export of NSLocalizedString -"Acknowledgements" = "Danksagungen"; -"App Settings" = "App Einstellungen"; -"App version" = "App Version"; -"Available This Month" = "Diesen Monat Verfügbar"; -"Christian & Ninji for the turnip predictions algorithm" = "Christian & Ninji für den Rüben Prognose Algorithmus"; -"Error" = "Fehler"; -"Game patch data" = "Spielversion Daten"; -"Nookazon for the marketplace" = "Nookazon für den Marktplatz"; -"Our amazing contributors" = "Unsere großartigen Mitwirkenden"; -"Privacy Policy" = "Datenschutzbestimmungen"; -"Rate the app on the App Store" = "Bewerte die App im App Store"; -"Recent Nookazon Listings" = "Neuste Verkäufe auf Nookazon"; -"Shihab / JPEGuin for the icon" = "Shihab / JPEGuin für das Icon"; -"Souce code / report an issue" = "Quell Code / Fehler melden"; -"Subscribe for %@ / Month" = "Abonnieren für %@ / Monat"; -"Term of Use" = "Nutzungsbedingungen"; -"Thank you for your support!" = "Danke für deine Unterstützung!"; -"The app" = "Die App"; -"The NookPlaza API by Azarro" = "Die NookPlaza API von Azarro"; -"Today" = "Heute"; -"Today on %@" = "Heute auf %@"; -"Top Turnip Island" = "Top Turnip Island"; -"Turnip predictions" = "Rüben Prognose"; -"Turnip.exchange" = "Turnip.exchange"; diff --git a/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings index e803c49d6265e11a0169535f8a1a9b6dcaeba176..c13125a8601177a8432bce08c34d384676675550 100644 GIT binary patch delta 217 zcmZ3IwvrK9vxft|;P=Ub_XhJ?i zDMJYZOnEn__GAfDy~%0DO_N_3woN`_C^vbJq0Zze6T8W4^z0_L7${7xG0>arq^C65 zO3z@jj$zScH`9j6G9p})dCWy7|1i^;yuzSmvWl_IWEo?x$%pjwChyW;u-HS5eR7tb N*W@3ZT9Z9=D*zfJMVSBq delta 503 zcmZvY!Al!K7{$NQDA`mc#4HhO?7HG6>uQ=q5R5VQW*gLkuHZ>fV~ir35G|;Ph-bmW z6OW$!14c@*)`gZ>BF|3FV3TJS}%c#z?nnfJ|)H*e-*?accbRyhCE>0iZ5L1Ysa zs_`6-GikJ`6vA2(d6mPEmhyL0xe-Op@b3afz(3Tk+Won~r)FGcwq`>TlFuB5jLWik ztePyyCf6c+%d#a^sj#<6Rgn_sDVdQ8?w81|%c|_WurnlTRGzFz2)A}0e%oo(GM!js zBFi2^LnNXZ;!2s+2EJRddPo1?q4OkNJ^GaW;enXKfo)>fP9f_Y;ICc7NwNSpnZrb~ z@L`&lF0qKCC(w>xDx#aT7-gCA&S{e=BMkP>8N-uPz)d2H>%><~$0NvFi}*v|Q)>_N zi8Q?aeO1AI_#?WaLEUAjBA>cV=XyLt`s53GV*2bG%{%GNxlUKfxblPF;qj?;^-VVT lRSVQbGOsD$WpSi*<>H~c7agrFc Date: Sun, 10 May 2020 00:24:27 +0200 Subject: [PATCH 06/16] more German translation - Tabbar: changed My Stuff to Collection - CollectionView: changed name to "Collection" (same name as in tab bar) - translated UserListView and CollectionView --- .../de.lproj/Localizable.strings | 28 +++++++++++++++++- .../en.lproj/Localizable.strings | Bin 13628 -> 15686 bytes .../views/collection/CollectionListView.swift | 4 +-- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings index 45c129a5..63db6e2e 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings +++ b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings @@ -45,7 +45,7 @@ "Catalog" = "Katalog"; "Turnips" = "Rüben"; "Villagers" = "Bewohner"; -"My Stuff" = "Meine Sachen"; +"Collection" = "Sammlung"; // TodayView "Change Section Order" = "Ändere die Reihenfolge"; @@ -169,4 +169,30 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "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"; + // to be continued diff --git a/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings index c13125a8601177a8432bce08c34d384676675550..6053d5698f4802c7af8a237557bc0d0abd27b35e 100644 GIT binary patch delta 1734 zcmcgsO=}cE5UsrkL*FZ&Ubmm1=sU)%^OszO|^HQI5+QJ;vo6As!+`MnigzeM%=(LzoA&i(P?` zZ*lqt=P@9~-+|5d0w^M_QG(bh?jO@0$5V3x{^cC-m9RGX7}X1aODl9Hw|ekZBV@5- zG8!R#K?kU7MEfNY6If<>NvJ;PFH`R<>`|j-d@)V4eP02(Kpux6)TjI&DBs0}j_EG1 zxB)51%e~a*dr4}xEshaqStZ3?d5XXZx;jAhVW8O_wtkyjj7Xe%YSJ&jN=P*^x}V`} zsJ}Jpbyna6Uw^*Te8FnV=`~7Epg0@p0ILjt*CU|+hmMxCG8cqEhO=?^-wQvSG zX5a|OIcnR3mFJ;DcfGvM;yckrDXF8W4_49OHTuuwcO)Fg(E7%E{8 z9y1oS$d~2G7CX4Nu$FP=sY&s%$|M>WxTAkn7xcJ&b?B6H4(R%4HDXkKy?RkUiCP!B zXn0pYif$;g0?8BN3~!+q&Q83~Td%}Vf=apO6ORv9J|G^P2CWfs%>zO=6 Z`qNT%g~eC4i@$Az|72PD<$7Ud`8Pr1E$aXP delta 58 wcmX?BwI^#s1GlCxLnVU(Loh=LLn%WV5GnzAwm_`JfF`qfBX_apWHnm_0I0bQi2wiq 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()) From 8ebeac74b474702c790cd2e54264deb107fc681d Mon Sep 17 00:00:00 2001 From: Jan van Heesch Date: Sun, 10 May 2020 11:24:00 +0200 Subject: [PATCH 07/16] translated ItemList to German --- .../de.lproj/Localizable.strings | 40 +++++++++++++++++- .../en.lproj/Localizable.strings | Bin 15686 -> 17440 bytes .../views/items/ItemsListView.swift | 5 ++- .../items/detail/ItemDetailInfoView.swift | 4 +- 4 files changed, 43 insertions(+), 6 deletions(-) diff --git a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings index 63db6e2e..57ce0276 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings +++ b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings @@ -9,7 +9,6 @@ "Average" = "Durchschnitt"; "Description" = "Beschreibung"; "Island" = "Insel"; -"Loading Listings..." = "Loading Listings..."; "Loading Visitors...." = "Lade Besucher...."; "Loading..." = "Lade..."; "Make an Offer" = "Angebot abgeben"; @@ -17,7 +16,6 @@ "MinMax" = "MinMax"; "name-en" = "name-en"; "Need Materials" = "Need Materials"; -"No listings found on Nookazon" = "No listings found on Nookazon"; "Please select or go stars some items!" = "Please select or go stars some items!"; "Tap here to preview a notification" = "Tippe hier für eine Vorschau"; "To help us support the application and get turnip predictions notification, you can try out AC Helper+" = "To help us support the application and get turnip predictions notification, you can try out AC Helper+"; @@ -195,4 +193,42 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "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"; +// 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"; + // to be continued diff --git a/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings index 6053d5698f4802c7af8a237557bc0d0abd27b35e..635c658490b9f64671af0a911a99d2e93109e64f 100644 GIT binary patch delta 1537 zcmah}&r2IY6nI#fnHmz>^1iX;Tc+(ug3aSR(c+^w>1HU)pIJ27=2}yR|``-7xU$gf|XD8nEt#?!SaPG-M_2TBCfA)u% zr-TA(QA`UI;y0lN{sTIo9F?g?O+5P)QHkn!;?o8&A?;8b{u0gL`#!F!*y@Oi5M4t2 zi>j;XbXaZSTH=y^)Gh&>RRt zT$g{TMAB9*zJ_kZPL<}Yy-P^SZi_ydq&eLd{OQZcR$uXLQh9K5YR?tYV$`o#NrXM?8mZyD1c`}(F;sNox@tC$LmQP>CJ8Y-kw!G^*mXGVJb MkDNNh0uHmX0j2?yWJ5fYt``cEW+? 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 840c4401..28311592 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))") From d2780712111d6fecf3186ffc1675e233fb5d69a1 Mon Sep 17 00:00:00 2001 From: Jan van Heesch Date: Sun, 10 May 2020 11:26:46 +0200 Subject: [PATCH 08/16] missed ItemRowView in last commit --- .../de.lproj/Localizable.strings | 2 ++ .../en.lproj/Localizable.strings | Bin 17440 -> 17544 bytes 2 files changed, 2 insertions(+) diff --git a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings index 57ce0276..39c6939b 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings +++ b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings @@ -209,6 +209,8 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "From" = "Von"; "Set" = "Set"; "Similar" = "Ähnliche"; +// ItemRowView +"unknown source" = "Herkunft unbekannt"; // ItemDetailInfoView "Rarity:" = "Seltenheit:"; "Shadow size:" = "Schatten Größe:"; diff --git a/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings index 635c658490b9f64671af0a911a99d2e93109e64f..f5bb1150e9e3b5784b4ffb6d5024d2f7402e1ffa 100644 GIT binary patch delta 32 ncmZ3`!PwEsxZ#-{ZxBO1LpehjLncEiL-}M|Hs8%R>^xWjuvH2v delta 18 ZcmeC^WL(g}xZ#=IWCKT@%~AGxtN=#!2A==` From 7354f35ad8b5be6e7e3b10a76213b7c7df2f8e9f Mon Sep 17 00:00:00 2001 From: Jan van Heesch Date: Sun, 10 May 2020 11:30:17 +0200 Subject: [PATCH 09/16] translated Shared View to German okay, only SearchView has text inside that needs to translate... thank you for already making it LocalizedStringKey <3 --- .../de.lproj/Localizable.strings | 4 ++++ .../en.lproj/Localizable.strings | Bin 17544 -> 17650 bytes 2 files changed, 4 insertions(+) diff --git a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings index 39c6939b..840ff781 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings +++ b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings @@ -233,4 +233,8 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "No listings found on Nookazon" = "Keine Auflistung auf Nookazon gefunden"; "Your items lists" = "Deine Gegenstandslisten"; +// Shared +// SearchField +"Search..." = "Suchen..."; + // to be continued diff --git a/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings index f5bb1150e9e3b5784b4ffb6d5024d2f7402e1ffa..f52026e41ce97e6527e859ed5f4e7472aeb85035 100644 GIT binary patch delta 111 zcmeC^Wc<|0xFNwMQJ+DdL4hHdA%h{2p@<=sA%%epC;|~n1&bvE<=hxDfpR%uStX!q Vgp3{o2r2>1umxf)a+AYd3<1h>6XyT` delta 13 Ucmey=$=K1!xFNx1@+lV$04lWwtN;K2 From 32d5eb33590b85c7c0a4138fabd809d3310e8bab Mon Sep 17 00:00:00 2001 From: Jan van Heesch Date: Sun, 10 May 2020 11:47:13 +0200 Subject: [PATCH 10/16] removed dashboard folder due to corrupted merge --- .../DashboardAvailableCrittersSection.swift | 75 --------- .../DashboardCollectionProgressSection.swift | 59 ------- .../dashboard/DashboardCrittersView.swift | 72 --------- .../dashboard/DashboardEventTextView.swift | 63 -------- .../DashboardNookazonListingSection.swift | 59 ------- .../views/dashboard/DashboardView.swift | 145 ------------------ 6 files changed, 473 deletions(-) delete mode 100644 ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardAvailableCrittersSection.swift delete mode 100644 ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCollectionProgressSection.swift delete mode 100644 ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCrittersView.swift delete mode 100644 ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardEventTextView.swift delete mode 100644 ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardNookazonListingSection.swift delete mode 100644 ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardView.swift diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardAvailableCrittersSection.swift b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardAvailableCrittersSection.swift deleted file mode 100644 index a5904108..00000000 --- a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardAvailableCrittersSection.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// DashboardAvailableCrittersSection.swift -// ACHNBrowserUI -// -// Created by Thomas Ricouard on 23/04/2020. -// Copyright © 2020 Thomas Ricouard. All rights reserved. -// - -import SwiftUI -import Backend - -struct DashboardAvailableCrittersSection: 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 newFishes: Int { - viewModel.fishes.filterActive().filter{ $0.isNewThisMonth() }.count - } - - private var newBugs: Int { - viewModel.bugs.filterActive().filter{ $0.isNewThisMonth() }.count - } - - private var crittersView: some View { - HStack { - Spacer() - VStack { - Text(numberOfFish).style(appStyle: .title) - Text("\(newFishes) new fishes") - .font(.caption) - .foregroundColor(.secondaryText) - } - Spacer() - Divider() - Spacer() - VStack { - Text(numberOfBugs).style(appStyle: .title) - Text("\(newBugs) new bugs") - .font(.caption) - .foregroundColor(.secondaryText) - } - Spacer() - } - .padding(.vertical, 5) - } - - var body: some View { - Section(header: SectionHeaderView(text: NSLocalizedString("Available This Month", comment: ""))) { - NavigationLink(destination: ActiveCrittersView(activeFishes: viewModel.fishes.filterActive(), - activeBugs: viewModel.bugs.filterActive())) { - crittersView - } - } - } -} - -struct DashboardCrittersView_Previews: PreviewProvider { - static var previews: some View { - DashboardAvailableCrittersSection(viewModel: DashboardViewModel()) - } -} diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCollectionProgressSection.swift b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCollectionProgressSection.swift deleted file mode 100644 index 4788f3d7..00000000 --- a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardCollectionProgressSection.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// DashboardCollectionProgressSection.swift -// ACHNBrowserUI -// -// Created by Thomas Ricouard on 23/04/2020. -// Copyright © 2020 Thomas Ricouard. All rights reserved. -// - -import SwiftUI -import Backend -import UI - -struct DashboardCollectionProgressSection: View { - @EnvironmentObject private var collection: UserCollection - @ObservedObject var viewModel: DashboardViewModel - - - private func makeProgressView(icon: String, critters: [Item]) -> some View { - HStack { - Image(icon) - .resizable() - .frame(width: 20, height: 20) - ProgressView(progress: CGFloat(collection.caughtIn(list: critters)) / CGFloat(critters.count), - trackColor: .catalogUnselected, - progressColor: .grass) - Text("\(collection.caughtIn(list: critters))/\(critters.count)") - .font(.caption) - .bold() - .foregroundColor(.text) - } - } - - var body: some View { - Section(header: SectionHeaderView(text: NSLocalizedString("Collection Progress", comment: ""))) { - VStack(alignment: .leading) { - if !viewModel.fishes.isEmpty && - !viewModel.bugs.isEmpty && - !viewModel.fossils.isEmpty && - !viewModel.art.isEmpty { - makeProgressView(icon: "Fish19", critters: viewModel.fishes) - makeProgressView(icon: "Ins62", critters: viewModel.bugs) - makeProgressView(icon: "icon-fossil", critters: viewModel.fossils) - makeProgressView(icon: "icon-leaf", critters: viewModel.art) - } else { - Text("Loading...") - .foregroundColor(.secondary) - } - } - .padding(.vertical, 10) - } - .accentColor(.grass) - } -} - -struct DashboardCollectionProgressVIew_Previews: PreviewProvider { - static var previews: some View { - DashboardCollectionProgressSection(viewModel: DashboardViewModel()) - } -} 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/dashboard/DashboardEventTextView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardEventTextView.swift deleted file mode 100644 index 3ca39f5c..00000000 --- a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardEventTextView.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// DashboardEventTextView.swift -// ACHNBrowserUI -// -// Created by Eric Lewis on 4/20/20. -// Copyright © 2020 Thomas Ricouard. All rights reserved. -// - -import SwiftUI -import ACNHEvents -import Backend - -struct DashboardEventTextView: View { - let todayEvents = Date().events(for: AppUserDefaults.shared.hemisphere == .north ? .north : .south) - let nextEvent = Event.nextEvent() - - func makeDateBadge(date: Date) -> some View { - let formatter = DateFormatter() - formatter.setLocalizedDateFormatFromTemplate("dd MMMM") - return Text(formatter.string(from: date)) - .foregroundColor(.white) - .font(.caption) - .fontWeight(.bold) - .padding(8) - .background(Color.grass) - .cornerRadius(20) - } - - var body: some View { - Group { - VStack(alignment: .leading) { - if !todayEvents.isEmpty && todayEvents.count == 1 { - Text("Today is \(todayEvents.first!.title())!") - } else if todayEvents.count > 1 { - Text("Today events are ") + - Text("\(todayEvents.first!.title())") - .foregroundColor(.bell) - .fontWeight(.semibold) + - Text(" and ") + - Text("\(todayEvents.last!.title())") - .foregroundColor(.bell) - .fontWeight(.semibold) - } else { - Text("No events today.") - } - if nextEvent.1 != nil && !todayEvents.contains(nextEvent.1!) { - HStack { - Text("Next event: \(nextEvent.1!.title())!") - Spacer() - makeDateBadge(date: nextEvent.0) - } - } - } - } - .foregroundColor(.secondaryText) - } -} - -struct EventTextView_Previews: PreviewProvider { - static var previews: some View { - DashboardEventTextView() - } -} diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardNookazonListingSection.swift b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardNookazonListingSection.swift deleted file mode 100644 index e0006442..00000000 --- a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardNookazonListingSection.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// DashboardNookazonListingSection.swift -// ACHNBrowserUI -// -// Created by Thomas Ricouard on 23/04/2020. -// Copyright © 2020 Thomas Ricouard. All rights reserved. -// - -import SwiftUI -import Backend -import UI - -struct DashboardNookazonListingSection: View { - @Binding var selectedSheet: Sheet.SheetType? - @ObservedObject var viewModel: DashboardViewModel - - var body: some View { - Section(header: SectionHeaderView(text: NSLocalizedString("Recent Nookazon Listings", comment: ""))) { - if viewModel.recentListings == nil { - Text("Loading...") - .foregroundColor(.secondary) - } - viewModel.recentListings.map { listings in - ScrollView(.horizontal, showsIndicators: false) { - HStack(spacing: 20) { - ForEach(listings) { listing in - Button(action: { - self.selectedSheet = .safari(URL.nookazon(listing: listing)!) - }) { - VStack { - ItemImage(path: listing.img?.absoluteString, size: 80) - Text(listing.name!) - .font(.headline) - .foregroundColor(.text) - } - .padding() - .background( - RoundedRectangle(cornerRadius: 8, style: .continuous) - .fill(Color.dialogue) - .shadow(radius: 4) - ) - .padding(.vertical, 10) - } - } - } - .padding() - } - .listRowInsets(.init(top: 0, leading: 0, bottom: 0, trailing: 0)) - } - } - } -} - -struct DashboardNookazonListingSection_Previews: PreviewProvider { - static var previews: some View { - DashboardNookazonListingSection(selectedSheet: .constant(nil), - viewModel: DashboardViewModel()) - } -} diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardView.swift deleted file mode 100644 index af27715d..00000000 --- a/ACHNBrowserUI/ACHNBrowserUI/views/dashboard/DashboardView.swift +++ /dev/null @@ -1,145 +0,0 @@ -// -// DashboardView.swift -// ACHNBrowserUI -// -// Created by Eric Lewis on 4/18/20. -// Copyright © 2020 Thomas Ricouard. All rights reserved. -// - -import SwiftUI -import Combine -import UIKit -import Backend -import UI - -struct DashboardView: View { - @EnvironmentObject private var uiState: UIState - @EnvironmentObject private var collection: UserCollection - @ObservedObject private var userDefaults = AppUserDefaults.shared - @ObservedObject private var viewModel = DashboardViewModel() - @ObservedObject private var villagersViewModel = VillagersViewModel() - @ObservedObject private var turnipsPredictionsService = TurnipsPredictionService.shared - - @State var selectedSheet: Sheet.SheetType? - - private var preferenceButton: some View { - Button(action: { - self.selectedSheet = .settings(subManager: SubcriptionManager.shared) - }, label: { - Image(systemName: "slider.horizontal.3").imageScale(.medium) - }) - .safeHoverEffectBarItem(position: .trailing) - } - - private var aboutButton: some View { - Button(action: { - self.selectedSheet = .about - }, label: { - Image(systemName: "info.circle").imageScale(.large) - }) - .padding(10) - .safeHoverEffect() - .offset(x:-10) - } - - private var todayText: String { - !userDefaults.islandName.isEmpty ? NSLocalizedString("Today on \(userDefaults.islandName)", comment: "") : NSLocalizedString("Today", comment: "") - } - - private func makeDateView() -> some View { - let formatter = DateFormatter() - formatter.setLocalizedDateFormatFromTemplate("EEEE, dd MMMM") - let dateString = formatter.string(from: Date()) - return Section(header: SectionHeaderView(text: todayText)) { - VStack(alignment: .leading) { - Text(dateString).style(appStyle: .title) - DashboardEventTextView().padding(.top, 4) - } - .padding(.vertical, 5) - } - } - - private func makeBirthdayView() -> some View { - Section(header: SectionHeaderView(text: NSLocalizedString("Villager birthday", comment: ""))) { - ForEach(villagersViewModel.todayBirthdays) { villager in - NavigationLink(destination: VillagerDetailView(villager: villager), - label: { - VillagerRowView(villager: villager) - }) - } - } - } - - private func makeTurnipsPredictionsView() -> some View { - Section(header: SectionHeaderView(text: NSLocalizedString("Turnip predictions", comment: ""))) { - Group { - if turnipsPredictionsService.predictions?.todayAverages?.isEmpty == true { - Text("Today is sunday, don't forget to buy more turnips and fill your buy price") - } else { - Text("Today average buy prices should be ") + - Text("\(turnipsPredictionsService.predictions!.todayAverages![0])") - .foregroundColor(.bell) - .fontWeight(.semibold) + - Text(" for this morning and ") + - Text("\(turnipsPredictionsService.predictions!.todayAverages![1])") - .foregroundColor(.bell) - .fontWeight(.semibold) + - Text(" for this afternoon") - } - } - .foregroundColor(.text) - .onTapGesture { - self.uiState.selectedTab = .turnips - } - } - } - - private func makeTopTurnipSection() -> some View { - Section(header: SectionHeaderView(text: NSLocalizedString("Top Turnip Island", comment: ""))) { - if viewModel.island == nil { - Text("Loading...") - .foregroundColor(.secondary) - } - viewModel.island.map { - TurnipIslandRow(island: $0) - } - } - } - - var body: some View { - NavigationView { - List { - makeDateView() - DashboardAvailableCrittersSection(viewModel: viewModel) - DashboardCollectionProgressSection(viewModel: viewModel) - if !villagersViewModel.todayBirthdays.isEmpty { - makeBirthdayView() - } - if turnipsPredictionsService.predictions?.todayAverages != nil { - makeTurnipsPredictionsView() - } - if viewModel.island != nil { - makeTopTurnipSection() - } - DashboardNookazonListingSection(selectedSheet: $selectedSheet, - viewModel: viewModel) - } - .listStyle(GroupedListStyle()) - .environment(\.horizontalSizeClass, .regular) - .navigationBarTitle("Dashboard") - .navigationBarItems(leading: aboutButton, - trailing: preferenceButton) - ActiveCrittersView(activeFishes: viewModel.fishes.filterActive(), - activeBugs: viewModel.bugs.filterActive()) - } - .sheet(item: $selectedSheet, content: { - Sheet(sheetType: $0) - }) - } -} - -struct DashboardView_Previews: PreviewProvider { - static var previews: some View { - DashboardView() - } -} From c128761923c899a7de3f7fb68e17a80cd8d0b612 Mon Sep 17 00:00:00 2001 From: Jan van Heesch Date: Sun, 10 May 2020 12:53:42 +0200 Subject: [PATCH 11/16] translated Turnips to German - Part I --- .../de.lproj/Localizable.strings | 44 +++++++++++++++++- .../en.lproj/Localizable.strings | Bin 17650 -> 22122 bytes .../views/turnips/TurnipsFormView.swift | 2 +- .../views/turnips/TurnipsView.swift | 7 +-- .../turnips/rows/TurnipsAveragePriceRow.swift | 2 +- 5 files changed, 47 insertions(+), 8 deletions(-) diff --git a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings index 840ff781..0504f609 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings +++ b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings @@ -18,7 +18,6 @@ "Need Materials" = "Need Materials"; "Please select or go stars some items!" = "Please select or go stars some items!"; "Tap here to preview a notification" = "Tippe hier für eine Vorschau"; -"To help us support the application and get turnip predictions notification, you can try out AC Helper+" = "To help us support the application and get turnip predictions notification, you can try out AC Helper+"; "unknown source" = "unknown source"; "Upgrade to +" = "Upgrade auf +"; "Visitors" = "Besucher"; @@ -233,6 +232,49 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "No listings found on Nookazon" = "Keine Auflistung auf Nookazon gefunden"; "Your items lists" = "Deine Gegenstandslisten"; +// TurnipsView +"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."; + // Shared // SearchField "Search..." = "Suchen..."; diff --git a/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings index f52026e41ce97e6527e859ed5f4e7472aeb85035..15a0822af65e69317a089482a431fc54f41ff6ee 100644 GIT binary patch delta 3135 zcmd^BOHWfl6rM_ph!qucX=-D71yR8OF@VMwS_EC8s6;|yVy=Lt2^7+T*j1Oto#t#z zT)9`H@(WzL(tqIIr3(``#_!B=?#wNvvQRgsY3`jlk2#NTzH`4mj(vF@JmI zcTQW68EsfD!LF$K@C?*LtXJT*pl0Ef^?h{#|4y}i3ppW2LC1kz%j!OSttuT46+4=% z;Z7LKWwn5lOVF~XxqISoLM+S{u7xnpTh<+9^ z2)gnPey-7>Y>Lh%lRZ+NW7@`t^LdTBf<|^U`;Upt3CUyY6I`_KPh{vzGI@0pUM=E$ zoKQx)3L5LHdgW{EakVAd6*P<`T*EbJ^Qn1ymCewPuHG9K27lhOK!)#G#Q~#Pi!`Su z9GR>{G8vIzMc12Bh2R$&Rsm_wk&(raEFwo=SH{Pi%P|HyzPhJ1^RQ&y05)8c``Beb zFW|Y3=Mt=E)dIa}N>~5cY4y?Gt^`-O$!@dQ13p&^yN$@U_OQ$F+Bju<(>>#$e2Eb-M^!{RpaxK% z$nc@-Lta%#cdiDa(Ot<>2)GQ$MB!Y!FWSP#MV!Cc!jV-&cjgc#>QWsep>S6s7DC>& zK}B~(Q;3|sTkSp>g_}iUQqvdiRM=M`nCT70A{0YGn?F@H%bbin2`WoWtCTuvu`qVtwZKL{)COwI_P}^8@hUu0m zg~#2zCKxWWe87ObyUIFNp&C2N0{5eb>$_Vj$7EHZ4+n>7WaqxW=KIc>7W#InjgG{R z$0jKi@1vHn_Vm^x8)H5fVI$<^jP#JiM$zL+L}u$bN}s*-crHTQE-_opMmoBS^gY`} zqh9+k*H&t3MsEN-Fu9vCaZmSz#~@=T=ro^^%5i@hEzX2J$it4_y_-^ JjHkz*{{(_2LjC{% delta 23 fcmaF0hVfG;ap0qGC7sUT6;hf(Qyx diff --git a/ACHNBrowserUI/ACHNBrowserUI/views/turnips/TurnipsFormView.swift b/ACHNBrowserUI/ACHNBrowserUI/views/turnips/TurnipsFormView.swift index 55b0d32f..c0e890f7 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..b0b9b10d 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,10 +129,7 @@ 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)) { 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() From 006cb1c8bfb1aed681f8c2751b6cc6c558f94bb7 Mon Sep 17 00:00:00 2001 From: Jan van Heesch Date: Sun, 10 May 2020 13:14:55 +0200 Subject: [PATCH 12/16] Translated Turnips Chart to German --- .../de.lproj/Localizable.strings | 10 ++++++---- .../en.lproj/Localizable.strings | Bin 22122 -> 22224 bytes .../views/turnips/TurnipsView.swift | 2 +- .../charts/TurnipsChartBottomLegendView.swift | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings index 0504f609..ffbd3c62 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings +++ b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings @@ -6,15 +6,11 @@ Copyright © 2020 Thomas Ricouard. All rights reserved. */ -"Average" = "Durchschnitt"; "Description" = "Beschreibung"; "Island" = "Insel"; "Loading Visitors...." = "Lade Besucher...."; "Loading..." = "Lade..."; "Make an Offer" = "Angebot abgeben"; -"Minimum" = "Minimum"; -"MinMax" = "MinMax"; -"name-en" = "name-en"; "Need Materials" = "Need Materials"; "Please select or go stars some items!" = "Please select or go stars some items!"; "Tap here to preview a notification" = "Tippe hier für eine Vorschau"; @@ -233,6 +229,8 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "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"; @@ -274,6 +272,10 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "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"; // Shared // SearchField diff --git a/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings index 15a0822af65e69317a089482a431fc54f41ff6ee..6ce62fe0c3a42a2a7ad38cb085f0b03bdd7abebd 100644 GIT binary patch delta 146 zcmaF0hVjB$#tnRon{60<7$=)B%Wc+SUS)6T%aF;C$B@gA$WXzc#Gt@n3&ctc5K&zq z4H36y-~x&UFcdN5Go%4^lrR)ej`ftByvSK%vVybHW)A0bLX$&$MWme>GJsl&fC@r@ iN(&f#7*ZM1fjEyLW%5ZU>B%yT3X?mS!X{q}odN*%N+b;c delta 80 zcmcbxmhsgZ#tnRolXrybZRTV2VVwLdG)!HIA&()EA(tVQK^KVg7?c some View { - Text(weekday) + Text(LocalizedStringKey(weekday)) .font(.callout) .fontWeight(.bold) .foregroundColor(.acText) From cbedcacd3863f9f14c15390e4201bacabaae8061 Mon Sep 17 00:00:00 2001 From: Jan van Heesch Date: Sun, 10 May 2020 13:18:57 +0200 Subject: [PATCH 13/16] Translated Turnips to German part II (turnips.exchange View; disabled but strings are there) --- .../de.lproj/Localizable.strings | 12 +++++++----- .../en.lproj/Localizable.strings | Bin 22224 -> 22326 bytes 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings index ffbd3c62..e4da4cd2 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings +++ b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings @@ -6,17 +6,12 @@ Copyright © 2020 Thomas Ricouard. All rights reserved. */ -"Description" = "Beschreibung"; -"Island" = "Insel"; -"Loading Visitors...." = "Lade Besucher...."; -"Loading..." = "Lade..."; "Make an Offer" = "Angebot abgeben"; "Need Materials" = "Need Materials"; "Please select or go stars some items!" = "Please select or go stars some items!"; "Tap here to preview a notification" = "Tippe hier für eine Vorschau"; "unknown source" = "unknown source"; "Upgrade to +" = "Upgrade auf +"; -"Visitors" = "Besucher"; "You're subscribed to AC Helper+" = "You're subscribed to AC Helper+"; // copy and paste "export" of Text() and similar SwiftUI functions @@ -277,6 +272,13 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "Minimum" = "Minimum"; "MinMax" = "MinMax"; +// IslandDetailView +"Join Island" = "Insel beitreten"; +"Island" = "Insel"; +"Description" = "Beschreibung"; +"Visitors" = "Besucher"; +"Loading Visitors...." = "Lade Besucher...."; + // Shared // SearchField "Search..." = "Suchen..."; diff --git a/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings index 6ce62fe0c3a42a2a7ad38cb085f0b03bdd7abebd..50a0e627a7d25cf15ee0d2c56b54471c1aefbdc8 100644 GIT binary patch delta 133 zcmcbxmT}uU#tnRolgk+SCO=>ln*7g!2S{^l=3`1?+PsKmQ6RS`Loq`RLn1>SL&{`( zdr3_%hJ1!hAWwk-NrpiQ$hQSzB?h?sZ)dfiR=ZOPCi0PF@w(0|4za7^46H From 7cce1f0df29d32490fe4c9bc54e1f7a084bbf31e Mon Sep 17 00:00:00 2001 From: Jan van Heesch Date: Sun, 10 May 2020 13:28:38 +0200 Subject: [PATCH 14/16] translated Villagers to German --- .../de.lproj/Localizable.strings | 12 ++++++++++-- .../en.lproj/Localizable.strings | Bin 22326 -> 22602 bytes .../Sources/Backend/models/Villager.swift | 4 ++-- .../views/villagers/VillagerDetailView.swift | 4 ++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings index e4da4cd2..9662c0e6 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings +++ b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings @@ -8,9 +8,7 @@ "Make an Offer" = "Angebot abgeben"; "Need Materials" = "Need Materials"; -"Please select or go stars some items!" = "Please select or go stars some items!"; "Tap here to preview a notification" = "Tippe hier für eine Vorschau"; -"unknown source" = "unknown source"; "Upgrade to +" = "Upgrade auf +"; "You're subscribed to AC Helper+" = "You're subscribed to AC Helper+"; @@ -279,6 +277,16 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "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"; + // Shared // SearchField "Search..." = "Suchen..."; diff --git a/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings index 50a0e627a7d25cf15ee0d2c56b54471c1aefbdc8..24d6f8cf10a5d19c5afe4565aedfb74285df5299 100644 GIT binary patch delta 361 zcmdnCj`7q6#tk6o4!RhB7o&zl|gnv4}G$F<3Kj0m%TcS$}P%Ss^T0JMqa(JVKK<@Ni9L;Ss2Z zsS9Q(0IEy|nx4u~4AiHizIgms+4Mlu1BfI3}4@P2>)z}3l3mFSdUKBP3089r+ AP5=M^ delta 42 zcmV+_0M-A>umQHN0kGHslLkl*lkhc|lh^^8lhQgKlgc_Olac})vy1{RQ 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() From 6730d4ea8de2587f451c9de93dd9c1a6776177a5 Mon Sep 17 00:00:00 2001 From: Jan van Heesch Date: Sun, 10 May 2020 14:41:04 +0200 Subject: [PATCH 15/16] translated Listings and Categories to German --- .../de.lproj/Localizable.strings | 43 +++++++++++++++++- .../en.lproj/Localizable.strings | Bin 22602 -> 24276 bytes .../Sources/Backend/models/Category.swift | 13 +----- .../views/categories/CategoriesView.swift | 2 +- .../views/listing/ListingRow.swift | 2 +- 5 files changed, 45 insertions(+), 15 deletions(-) diff --git a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings index 9662c0e6..5e79ae64 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings +++ b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings @@ -6,8 +6,6 @@ Copyright © 2020 Thomas Ricouard. All rights reserved. */ -"Make an Offer" = "Angebot abgeben"; -"Need Materials" = "Need Materials"; "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+"; @@ -287,6 +285,47 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden. "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..."; diff --git a/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings index 24d6f8cf10a5d19c5afe4565aedfb74285df5299..e1c15e16d55df42540bcd528753e6d657c09d525 100644 GIT binary patch delta 1508 zcmZ`(J#QL85S?ornI0(}6gCl}@K@~Et`F`o$iN{uWTo0akZym7ExEQO zw`tO(NR`sR!*6zOxg8)n9o)Wo^F2Gi?xR1C(S0X+_#3@k)DLM$b1LvVp=&y$oNlRR zhf%|(QL%lDa}#J{zkRGXmM5^iMogcnMzQA@aMz?Y+QZYN7Gwow@RQSwet2)t9spS& zjtt%t$TED#(D;Hkrp`vG_#M0Wd(ar+Net4+N_u7BNRt#t%&=QF@PWood*T93gCMR- zMstl3S}-G;f;dGGGnIo^*HTgK!*PyBYqS+A%o(b5t?ZsH5yvoa&BZM6h9x{zs2H0% z4mU(QK3&0mkQwUMLnV1os@k@pU*X2j0|$^JgD{Bi0VYP7HC^KfB8)B=g-d6wcn2%E zuv1eG506sl`s)fV^Z{52r5HN?p9NWU)+C~lpaMK>b3ELzq5H0?VfOz+5Or4S(Txi2 zJit7QTc{H_cMTLwSY3pyXW@Y7Um&3@Fsogcxw{<7?ZpO}XpP-f93s#vucH7H7GF}H z1|IdQ((ic_Xo1js$Y=s$fp8Y~xmCCS4!2Bsh9TZ3%<%Iw!6`?j_Q AWdHyG delta 22 ecmcbzm+{mF#tj~flik86Z1!M$7CPA@t_J{gzX`(t 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/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/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) } From 6d49d91c33c9ce4c213f98819b77f1d5b6c79f56 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Sun, 10 May 2020 15:04:30 +0200 Subject: [PATCH 16/16] Fixes --- .../de.lproj/Localizable.strings | 2 +- .../en.lproj/Localizable.strings | Bin 24276 -> 24280 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings index 5e79ae64..7558389d 100644 --- a/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings +++ b/ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings @@ -64,7 +64,7 @@ "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 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."; diff --git a/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings b/ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings index e1c15e16d55df42540bcd528753e6d657c09d525..ee9b695a2c713a2b5abbd55405c79c6fe3b93ac4 100644 GIT binary patch delta 51 zcmcbzm+{74#tjt$jCzwF@`+CF5$FK2HgZXB))73V%IG=yyP5XnKk5>bt;|IjeKz}> Hx2gjG1Q`;b delta 51 zcmV-30L=f`y#ds{0kC)wlj05(la3IGld=jJvoI0LC6fX@5|a!!8UbUI0Vo%fJ~tEr JY_n50g(n3C5qJOq