diff --git a/Piper/Resources/Catalogs/Localizable.xcstrings b/Piper/Resources/Catalogs/Localizable.xcstrings index f26d581..ab81321 100644 --- a/Piper/Resources/Catalogs/Localizable.xcstrings +++ b/Piper/Resources/Catalogs/Localizable.xcstrings @@ -1,12 +1,6 @@ { "sourceLanguage" : "en", "strings" : { - "Add Item" : { - - }, - "Item at %@" : { - - }, "menu-bar.item.empty.button.text" : { "localizations" : { "en" : { @@ -48,8 +42,15 @@ } } }, - "Select an item" : { - + "settings.tab-bar.repositories.text" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Repositories" + } + } + } } }, "version" : "1.0" diff --git a/Piper/Sources/UI/Enumerations/SettingsItem.swift b/Piper/Sources/UI/Enumerations/SettingsItem.swift new file mode 100644 index 0000000..71092fd --- /dev/null +++ b/Piper/Sources/UI/Enumerations/SettingsItem.swift @@ -0,0 +1,35 @@ +// +// SettingsItem.swift +// Piper ~ App +// +// Created by Javier Cicchelli on 13/10/2024. +// Copyright © 2024 Röck+Cöde. All rights reserved. +// + +enum SettingsItem: Int, Hashable { + case repositories = 0 +} + +// MARK: - CaseIterable + +extension SettingsItem: CaseIterable { + + // MARK: Computed + + var allCases: [SettingsItem] { + [.repositories] + } + +} + +// MARK: - Identifiable + +extension SettingsItem: Identifiable { + + // MARK: Computed + + var id: Int { + rawValue + } + +} diff --git a/Piper/Sources/UI/Extensions/SettingsItem+Properties.swift b/Piper/Sources/UI/Extensions/SettingsItem+Properties.swift new file mode 100644 index 0000000..80ec6b1 --- /dev/null +++ b/Piper/Sources/UI/Extensions/SettingsItem+Properties.swift @@ -0,0 +1,27 @@ +// +// SettingsItem+Properties.swift +// Piper ~ App +// +// Created by Javier Cicchelli on 13/10/2024. +// Copyright © 2024 Röck+Cöde. All rights reserved. +// + +import SwiftUI + +extension SettingsItem { + + // MARK: Computed + + var icon: String { + switch self { + case .repositories: "folder" + } + } + + var title: LocalizedStringKey { + switch self { + case .repositories: "settings.tab-bar.repositories.text" + } + } + +}