Skip to content

Commit

Permalink
✨ Add more context with accent colors
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKai77 committed Jul 9, 2024
1 parent fc87d36 commit 9b5bd61
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 58 deletions.
84 changes: 34 additions & 50 deletions Loop/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,39 @@
}
}
},
"Accent color option: Custom" : {
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Custom"
}
}
}
},
"Accent color option: System" : {
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "System"
}
}
}
},
"Accent color option: Wallpaper" : {
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Wallpaper"
}
}
}
},
"Accessibility access" : {
"localizations" : {
"en-GB" : {
Expand Down Expand Up @@ -6844,6 +6877,7 @@

},
"System" : {
"extractionState" : "stale",
"localizations" : {
"en-GB" : {
"stringUnit" : {
Expand Down Expand Up @@ -7568,53 +7602,6 @@
}
}
},
"Version %@ (%@)" : {
"extractionState" : "stale",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Version %1$@ (%2$@)"
}
},
"en-GB" : {
"stringUnit" : {
"state" : "translated",
"value" : "Version %1$@ (%2$@)"
}
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Versión %1$@ (%2$@)"
}
},
"it" : {
"stringUnit" : {
"state" : "translated",
"value" : "Versione %1$@ (%2$@)"
}
},
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Versão %1$@ (%2$@)"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "%1$@版本(%2$@)"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "%1$@版本(%2$@)"
}
}
}
},
"Version %@ (%lld)" : {
"localizations" : {
"en" : {
Expand Down Expand Up @@ -7664,9 +7651,6 @@
}
}
}
},
"Wallpaper" : {

},
"Width" : {
"localizations" : {
Expand Down
16 changes: 10 additions & 6 deletions Loop/Luminare/Theming/AccentColorConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ class AccentColorConfigurationModel: ObservableObject {

// MARK: - AccentColorOption

enum AccentColorOption: LocalizedStringKey, CaseIterable {
case system = "System"
case wallpaper = "Wallpaper"
case custom = "Custom"
enum AccentColorOption: CaseIterable {
case system
case wallpaper
case custom

var image: Image {
switch self {
Expand All @@ -94,8 +94,12 @@ enum AccentColorOption: LocalizedStringKey, CaseIterable {
}
}

var text: LocalizedStringKey {
rawValue
var text: String {
switch self {
case .system: .init(localized: "Accent color option: System", defaultValue: "System")
case .wallpaper: .init(localized: "Accent color option: Wallpaper", defaultValue: "Wallpaper")
case .custom: .init(localized: "Accent color option: Custom", defaultValue: "Custom")
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions Loop/Luminare/Theming/IconConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ struct IconVew: View {
.foregroundStyle(.secondary)

Text(nextUnlockCount == icon.unlockTime ?
.init(localized: "Loops left to unlock a new icon", defaultValue: "\(loopsLeft) Loops left") :
.init(localized: "Locked", comment: "When an app icon is locked")
.init(localized: "Loops left to unlock new icon", defaultValue: "\(loopsLeft) Loops left") :
.init(localized: "Locked", comment: "App icon is locked")
)
.font(.caption)
.foregroundColor(.secondary)
Expand Down

0 comments on commit 9b5bd61

Please sign in to comment.