Begin statistics creation

This commit is contained in:
Christoph Hagen
2025-08-31 16:27:32 +02:00
parent f972a2c020
commit 96bd07bdb7
33 changed files with 1406 additions and 187 deletions

View File

@@ -33,8 +33,23 @@ extension ContentLanguage: Comparable {
}
}
extension ContentLanguage {
func text(days: Int) -> String {
switch self {
case .english: return "\(days) day\(days == 1 ? "" : "s")"
case .german: return "\(days) Tag\(days == 1 ? "" : "e")"
}
}
var locale: Locale {
switch self {
case .english: Locale(identifier: "en_US")
case .german: Locale(identifier: "de_DE")
}
}
var next: ContentLanguage {
switch self {
case .english: return .german