diff --git a/Firebonk.xcodeproj/project.pbxproj b/Firebonk.xcodeproj/project.pbxproj index 46346a2..18ad634 100644 --- a/Firebonk.xcodeproj/project.pbxproj +++ b/Firebonk.xcodeproj/project.pbxproj @@ -7,14 +7,20 @@ objects = { /* Begin PBXBuildFile section */ + 344B1BB92970B4680047A1FF /* Localizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 344B1BB82970B4680047A1FF /* Localizer.swift */; }; + 344B1BBC2970B4E00047A1FF /* General.strings in Resources */ = {isa = PBXBuildFile; fileRef = 344B1BBE2970B4E00047A1FF /* General.strings */; }; 349639EB297061D6002B1FB8 /* FirebonkApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 349639EA297061D6002B1FB8 /* FirebonkApp.swift */; }; - 349639ED297061D6002B1FB8 /* FirebonkDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = 349639EC297061D6002B1FB8 /* FirebonkDocument.swift */; }; 349639EF297061D6002B1FB8 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 349639EE297061D6002B1FB8 /* ContentView.swift */; }; 349639F1297061D7002B1FB8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 349639F0297061D7002B1FB8 /* Assets.xcassets */; }; 349639F6297061D7002B1FB8 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 349639F5297061D7002B1FB8 /* Preview Assets.xcassets */; }; 34963A00297061D8002B1FB8 /* FirebonkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 349639FF297061D8002B1FB8 /* FirebonkTests.swift */; }; 34963A0A297061D8002B1FB8 /* FirebonkUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34963A09297061D8002B1FB8 /* FirebonkUITests.swift */; }; 34963A0C297061D8002B1FB8 /* FirebonkUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34963A0B297061D8002B1FB8 /* FirebonkUITestsLaunchTests.swift */; }; + 34963A1A297062E7002B1FB8 /* Dashboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34963A19297062E7002B1FB8 /* Dashboard.swift */; }; + 34963A1C297062F2002B1FB8 /* People.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34963A1B297062F2002B1FB8 /* People.swift */; }; + 34963A1E297062FA002B1FB8 /* Spaces.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34963A1D297062FA002B1FB8 /* Spaces.swift */; }; + 34963A2029706305002B1FB8 /* Profile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34963A1F29706305002B1FB8 /* Profile.swift */; }; + 34963A24297063F8002B1FB8 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 34963A26297063F8002B1FB8 /* Localizable.strings */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -35,9 +41,11 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 344B1BB82970B4680047A1FF /* Localizer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Localizer.swift; sourceTree = ""; }; + 344B1BBD2970B4E00047A1FF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/General.strings; sourceTree = ""; }; + 344B1BBF2970B4E30047A1FF /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/General.strings; sourceTree = ""; }; 349639E7297061D6002B1FB8 /* Firebonk.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Firebonk.app; sourceTree = BUILT_PRODUCTS_DIR; }; 349639EA297061D6002B1FB8 /* FirebonkApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirebonkApp.swift; sourceTree = ""; }; - 349639EC297061D6002B1FB8 /* FirebonkDocument.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirebonkDocument.swift; sourceTree = ""; }; 349639EE297061D6002B1FB8 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 349639F0297061D7002B1FB8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 349639F2297061D7002B1FB8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -48,6 +56,12 @@ 34963A05297061D8002B1FB8 /* FirebonkUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FirebonkUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 34963A09297061D8002B1FB8 /* FirebonkUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirebonkUITests.swift; sourceTree = ""; }; 34963A0B297061D8002B1FB8 /* FirebonkUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirebonkUITestsLaunchTests.swift; sourceTree = ""; }; + 34963A19297062E7002B1FB8 /* Dashboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dashboard.swift; sourceTree = ""; }; + 34963A1B297062F2002B1FB8 /* People.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = People.swift; sourceTree = ""; }; + 34963A1D297062FA002B1FB8 /* Spaces.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Spaces.swift; sourceTree = ""; }; + 34963A1F29706305002B1FB8 /* Profile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Profile.swift; sourceTree = ""; }; + 34963A25297063F8002B1FB8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 34963A272970642A002B1FB8 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -75,6 +89,21 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 344B1BC02970BA6F0047A1FF /* Utils */ = { + isa = PBXGroup; + children = ( + 344B1BC12970BA790047A1FF /* API */, + ); + path = Utils; + sourceTree = ""; + }; + 344B1BC12970BA790047A1FF /* API */ = { + isa = PBXGroup; + children = ( + ); + path = API; + sourceTree = ""; + }; 349639DE297061D6002B1FB8 = { isa = PBXGroup; children = ( @@ -98,12 +127,11 @@ 349639E9297061D6002B1FB8 /* Firebonk */ = { isa = PBXGroup; children = ( - 349639EA297061D6002B1FB8 /* FirebonkApp.swift */, - 349639EC297061D6002B1FB8 /* FirebonkDocument.swift */, - 349639EE297061D6002B1FB8 /* ContentView.swift */, - 349639F0297061D7002B1FB8 /* Assets.xcassets */, - 349639F2297061D7002B1FB8 /* Info.plist */, - 349639F3297061D7002B1FB8 /* Firebonk.entitlements */, + 344B1BC02970BA6F0047A1FF /* Utils */, + 34963A28297064D2002B1FB8 /* App */, + 34963A2929706503002B1FB8 /* Views */, + 34963A2A29706510002B1FB8 /* SupportingFiles */, + 34963A2129706390002B1FB8 /* i18n */, 349639F4297061D7002B1FB8 /* Preview Content */, ); path = Firebonk; @@ -134,6 +162,54 @@ path = FirebonkUITests; sourceTree = ""; }; + 34963A18297062B5002B1FB8 /* Tabs */ = { + isa = PBXGroup; + children = ( + 34963A19297062E7002B1FB8 /* Dashboard.swift */, + 34963A1B297062F2002B1FB8 /* People.swift */, + 34963A1D297062FA002B1FB8 /* Spaces.swift */, + 34963A1F29706305002B1FB8 /* Profile.swift */, + ); + path = Tabs; + sourceTree = ""; + }; + 34963A2129706390002B1FB8 /* i18n */ = { + isa = PBXGroup; + children = ( + 344B1BB82970B4680047A1FF /* Localizer.swift */, + 34963A26297063F8002B1FB8 /* Localizable.strings */, + 344B1BBE2970B4E00047A1FF /* General.strings */, + ); + path = i18n; + sourceTree = ""; + }; + 34963A28297064D2002B1FB8 /* App */ = { + isa = PBXGroup; + children = ( + 349639EA297061D6002B1FB8 /* FirebonkApp.swift */, + 349639EE297061D6002B1FB8 /* ContentView.swift */, + ); + path = App; + sourceTree = ""; + }; + 34963A2929706503002B1FB8 /* Views */ = { + isa = PBXGroup; + children = ( + 34963A18297062B5002B1FB8 /* Tabs */, + ); + path = Views; + sourceTree = ""; + }; + 34963A2A29706510002B1FB8 /* SupportingFiles */ = { + isa = PBXGroup; + children = ( + 349639F0297061D7002B1FB8 /* Assets.xcassets */, + 349639F3297061D7002B1FB8 /* Firebonk.entitlements */, + 349639F2297061D7002B1FB8 /* Info.plist */, + ); + path = SupportingFiles; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -220,6 +296,7 @@ knownRegions = ( en, Base, + de, ); mainGroup = 349639DE297061D6002B1FB8; productRefGroup = 349639E8297061D6002B1FB8 /* Products */; @@ -239,6 +316,8 @@ buildActionMask = 2147483647; files = ( 349639F6297061D7002B1FB8 /* Preview Assets.xcassets in Resources */, + 344B1BBC2970B4E00047A1FF /* General.strings in Resources */, + 34963A24297063F8002B1FB8 /* Localizable.strings in Resources */, 349639F1297061D7002B1FB8 /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -264,9 +343,13 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 349639ED297061D6002B1FB8 /* FirebonkDocument.swift in Sources */, 349639EB297061D6002B1FB8 /* FirebonkApp.swift in Sources */, + 34963A1A297062E7002B1FB8 /* Dashboard.swift in Sources */, + 34963A2029706305002B1FB8 /* Profile.swift in Sources */, 349639EF297061D6002B1FB8 /* ContentView.swift in Sources */, + 34963A1E297062FA002B1FB8 /* Spaces.swift in Sources */, + 344B1BB92970B4680047A1FF /* Localizer.swift in Sources */, + 34963A1C297062F2002B1FB8 /* People.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -302,11 +385,33 @@ }; /* End PBXTargetDependency section */ +/* Begin PBXVariantGroup section */ + 344B1BBE2970B4E00047A1FF /* General.strings */ = { + isa = PBXVariantGroup; + children = ( + 344B1BBD2970B4E00047A1FF /* en */, + 344B1BBF2970B4E30047A1FF /* de */, + ); + name = General.strings; + sourceTree = ""; + }; + 34963A26297063F8002B1FB8 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 34963A25297063F8002B1FB8 /* en */, + 34963A272970642A002B1FB8 /* de */, + ); + name = Localizable.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + /* Begin XCBuildConfiguration section */ 34963A0D297061D8002B1FB8 /* Debug */ = { 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++20"; @@ -365,6 +470,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++20"; @@ -417,7 +523,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = Firebonk/Firebonk.entitlements; + CODE_SIGN_ENTITLEMENTS = Firebonk/SupportingFiles/Firebonk.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Firebonk/Preview Content\""; @@ -425,7 +531,7 @@ ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = Firebonk/Info.plist; + INFOPLIST_FILE = Firebonk/SupportingFiles/Info.plist; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; @@ -443,7 +549,7 @@ "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 13.1; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = de.plutodev.apps.Firebonk; + PRODUCT_BUNDLE_IDENTIFIER = de.plutodev.apps.firebonk; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; @@ -458,7 +564,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = Firebonk/Firebonk.entitlements; + CODE_SIGN_ENTITLEMENTS = Firebonk/SupportingFiles/Firebonk.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Firebonk/Preview Content\""; @@ -466,7 +572,7 @@ ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = Firebonk/Info.plist; + INFOPLIST_FILE = Firebonk/SupportingFiles/Info.plist; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; @@ -484,7 +590,7 @@ "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 13.1; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = de.plutodev.apps.Firebonk; + PRODUCT_BUNDLE_IDENTIFIER = de.plutodev.apps.firebonk; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; diff --git a/Firebonk/App/ContentView.swift b/Firebonk/App/ContentView.swift new file mode 100644 index 0000000..0fd0b4c --- /dev/null +++ b/Firebonk/App/ContentView.swift @@ -0,0 +1,41 @@ +// +// ContentView.swift +// Firebonk +// +// Created by Patrick Müller on 12.01.23. +// + +import SwiftUI + +struct ContentView: View { + + var body: some View { + TabView { + Dashboard() + // Badge can show e.g. number of notifications or new posts + //.badge(2) + .tabItem { + Label("dashboard".localized(tableName: "General"), systemImage: "house.fill") + } + People() + .tabItem { + Label("people".localized(tableName: "General"), systemImage: "person.3.fill") + } + Spaces() + .tabItem { + Label("spaces".localized(tableName: "General"), systemImage: "circle.circle") + } + Profile() + .tabItem{ + Label("profile".localized(tableName: "General"), systemImage: "person") + } + } + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + .preferredColorScheme(.dark) + } +} diff --git a/Firebonk/FirebonkApp.swift b/Firebonk/App/FirebonkApp.swift similarity index 61% rename from Firebonk/FirebonkApp.swift rename to Firebonk/App/FirebonkApp.swift index 5ee8861..6d771c0 100644 --- a/Firebonk/FirebonkApp.swift +++ b/Firebonk/App/FirebonkApp.swift @@ -10,8 +10,8 @@ import SwiftUI @main struct FirebonkApp: App { var body: some Scene { - DocumentGroup(newDocument: FirebonkDocument()) { file in - ContentView(document: file.$document) + WindowGroup { + ContentView() } } } diff --git a/Firebonk/ContentView.swift b/Firebonk/ContentView.swift deleted file mode 100644 index ddba09b..0000000 --- a/Firebonk/ContentView.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ContentView.swift -// Firebonk -// -// Created by Patrick Müller on 12.01.23. -// - -import SwiftUI - -struct ContentView: View { - @Binding var document: FirebonkDocument - - var body: some View { - TextEditor(text: $document.text) - } -} - -struct ContentView_Previews: PreviewProvider { - static var previews: some View { - ContentView(document: .constant(FirebonkDocument())) - } -} diff --git a/Firebonk/Info.plist b/Firebonk/Info.plist deleted file mode 100644 index 730eeb1..0000000 --- a/Firebonk/Info.plist +++ /dev/null @@ -1,39 +0,0 @@ - - - - - CFBundleDocumentTypes - - - CFBundleTypeRole - Editor - LSItemContentTypes - - com.example.plain-text - - NSUbiquitousDocumentUserActivityType - $(PRODUCT_BUNDLE_IDENTIFIER).example-document - - - UTImportedTypeDeclarations - - - UTTypeConformsTo - - public.plain-text - - UTTypeDescription - Example Text - UTTypeIdentifier - com.example.plain-text - UTTypeTagSpecification - - public.filename-extension - - exampletext - - - - - - diff --git a/Firebonk/Assets.xcassets/AccentColor.colorset/Contents.json b/Firebonk/SupportingFiles/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from Firebonk/Assets.xcassets/AccentColor.colorset/Contents.json rename to Firebonk/SupportingFiles/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/Firebonk/Assets.xcassets/AppIcon.appiconset/Contents.json b/Firebonk/SupportingFiles/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Firebonk/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Firebonk/SupportingFiles/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/Firebonk/Assets.xcassets/Contents.json b/Firebonk/SupportingFiles/Assets.xcassets/Contents.json similarity index 100% rename from Firebonk/Assets.xcassets/Contents.json rename to Firebonk/SupportingFiles/Assets.xcassets/Contents.json diff --git a/Firebonk/Firebonk.entitlements b/Firebonk/SupportingFiles/Firebonk.entitlements similarity index 100% rename from Firebonk/Firebonk.entitlements rename to Firebonk/SupportingFiles/Firebonk.entitlements diff --git a/Firebonk/SupportingFiles/Info.plist b/Firebonk/SupportingFiles/Info.plist new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/Firebonk/SupportingFiles/Info.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Firebonk/Views/Tabs/Dashboard.swift b/Firebonk/Views/Tabs/Dashboard.swift new file mode 100644 index 0000000..41386c2 --- /dev/null +++ b/Firebonk/Views/Tabs/Dashboard.swift @@ -0,0 +1,20 @@ +// +// Dashboard.swift +// Firebonk +// +// Created by Patrick Müller on 12.01.23. +// + +import SwiftUI + +struct Dashboard: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +struct Dashboard_Previews: PreviewProvider { + static var previews: some View { + Dashboard() + } +} diff --git a/Firebonk/Views/Tabs/People.swift b/Firebonk/Views/Tabs/People.swift new file mode 100644 index 0000000..21688df --- /dev/null +++ b/Firebonk/Views/Tabs/People.swift @@ -0,0 +1,20 @@ +// +// People.swift +// Firebonk +// +// Created by Patrick Müller on 12.01.23. +// + +import SwiftUI + +struct People: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +struct People_Previews: PreviewProvider { + static var previews: some View { + People() + } +} diff --git a/Firebonk/Views/Tabs/Profile.swift b/Firebonk/Views/Tabs/Profile.swift new file mode 100644 index 0000000..3b6b32c --- /dev/null +++ b/Firebonk/Views/Tabs/Profile.swift @@ -0,0 +1,20 @@ +// +// Profile.swift +// Firebonk +// +// Created by Patrick Müller on 12.01.23. +// + +import SwiftUI + +struct Profile: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +struct Profile_Previews: PreviewProvider { + static var previews: some View { + Profile() + } +} diff --git a/Firebonk/Views/Tabs/Spaces.swift b/Firebonk/Views/Tabs/Spaces.swift new file mode 100644 index 0000000..54e3f8e --- /dev/null +++ b/Firebonk/Views/Tabs/Spaces.swift @@ -0,0 +1,20 @@ +// +// Spaces.swift +// Firebonk +// +// Created by Patrick Müller on 12.01.23. +// + +import SwiftUI + +struct Spaces: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +struct Spaces_Previews: PreviewProvider { + static var previews: some View { + Spaces() + } +} diff --git a/Firebonk/i18n/Localizer.swift b/Firebonk/i18n/Localizer.swift new file mode 100644 index 0000000..9c1951e --- /dev/null +++ b/Firebonk/i18n/Localizer.swift @@ -0,0 +1,30 @@ +// +// Localizer.swift +// Firebonk +// +// Created by Patrick Müller on 12.01.23. +// + +import Foundation + +private class Localizer { + + static let sharedInstance = Localizer() + + func localize(string: String, tableName: String, plural: Bool) -> String { + var localizedString: String + if plural{ + localizedString = NSLocalizedString(string, tableName: tableName, value:"**\(self)**", comment: "plural") + }else{ + localizedString = NSLocalizedString(string, tableName: tableName, value:"**\(self)**", comment: "") + } + + return localizedString + } +} + +extension String { + func localized(tableName: String = "Localizable", plural: Bool = false) -> String { + return Localizer.sharedInstance.localize(string: self, tableName: tableName, plural: plural) + } +} diff --git a/Firebonk/i18n/de.lproj/General.strings b/Firebonk/i18n/de.lproj/General.strings new file mode 100644 index 0000000..9bf241f --- /dev/null +++ b/Firebonk/i18n/de.lproj/General.strings @@ -0,0 +1,13 @@ +/* + General.strings + Firebonk + + Created by Patrick Müller on 12.01.23. + +*/ + +/* Tab Names */ +"dashboard" = "Dashboard"; +"people" = "Personen"; +"spaces" = "Spaces"; +"profile" = "Profil"; diff --git a/Firebonk/i18n/de.lproj/Localizable.strings b/Firebonk/i18n/de.lproj/Localizable.strings new file mode 100644 index 0000000..b1e3c69 --- /dev/null +++ b/Firebonk/i18n/de.lproj/Localizable.strings @@ -0,0 +1,7 @@ +/* + Localizable.strings + Firebonk + + Created by Patrick Müller on 12.01.23. + +*/ diff --git a/Firebonk/i18n/en.lproj/General.strings b/Firebonk/i18n/en.lproj/General.strings new file mode 100644 index 0000000..57848fd --- /dev/null +++ b/Firebonk/i18n/en.lproj/General.strings @@ -0,0 +1,13 @@ +/* + General.strings + Firebonk + + Created by Patrick Müller on 12.01.23. + +*/ + +/* Tab Names */ +"dashboard" = "Dashboard"; +"people" = "People"; +"spaces" = "Spaces"; +"profile" = "Profile"; diff --git a/Firebonk/i18n/en.lproj/Localizable.strings b/Firebonk/i18n/en.lproj/Localizable.strings new file mode 100644 index 0000000..b1e3c69 --- /dev/null +++ b/Firebonk/i18n/en.lproj/Localizable.strings @@ -0,0 +1,7 @@ +/* + Localizable.strings + Firebonk + + Created by Patrick Müller on 12.01.23. + +*/