Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dayflow/Dayflow.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
"zh-Hans",
Base,
);
mainGroup = C4C1D2982DB56805007D5A55;
Expand Down
10 changes: 5 additions & 5 deletions Dayflow/Dayflow/Views/Components/ProviderCardComponents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ struct FlexibleProviderCard: View {
private var titleSection: some View {
HStack {
Spacer()
Text(title)
Text(LocalizedStringKey(title))
.font(.custom("Figtree", size: 18))
.fontWeight(.semibold)
.foregroundColor(.black.opacity(0.9))
Expand Down Expand Up @@ -155,7 +155,7 @@ struct FlexibleProviderCard: View {
Image(systemName: "checkmark.circle.fill")
.font(.system(size: 12))
.foregroundColor(.green)
Text(customStatusText ?? "Currently selected")
Text(LocalizedStringKey(customStatusText ?? "Currently selected"))
.font(.custom("Figtree", size: 12))
.fontWeight(.medium)
.foregroundColor(.black.opacity(0.6))
Expand Down Expand Up @@ -184,7 +184,7 @@ struct FlexibleProviderCard: View {
DayflowSurfaceButton(
action: buttonAction,
content: {
Text(buttonTitle)
Text(LocalizedStringKey(buttonTitle))
.font(.custom("Figtree", size: 14))
.fontWeight(.semibold)
.foregroundColor(buttonForegroundColor)
Expand Down Expand Up @@ -290,7 +290,7 @@ struct BadgeView: View {

var body: some View {
HStack(spacing: 4 * scale) {
Text(text)
Text(LocalizedStringKey(text))
.font(Font.custom("Figtree", size: 10 * scale * fontScale).weight(textWeight))
.kerning(kerningValue * scale * fontScale)
.foregroundColor(textColor)
Expand Down Expand Up @@ -534,7 +534,7 @@ struct FeatureRowView: View {
)
.frame(width: 16 * scale)

Text(feature.text)
Text(LocalizedStringKey(feature.text))
.font(.custom("Figtree", size: 14 * scale * fontScale))
.foregroundColor(.black.opacity(0.75))
.fixedSize(horizontal: false, vertical: true)
Expand Down
4 changes: 2 additions & 2 deletions Dayflow/Dayflow/Views/Onboarding/APIKeyInputView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ struct APIKeyInputView: View {

var body: some View {
VStack(alignment: .leading, spacing: 16) {
Text(title)
Text(LocalizedStringKey(title))
.font(.custom("Figtree", size: 16))
.fontWeight(.semibold)
.foregroundColor(.black.opacity(0.9))

Text(subtitle)
Text(LocalizedStringKey(subtitle))
.font(.custom("Figtree", size: 14))
.foregroundColor(.black.opacity(0.6))

Expand Down
8 changes: 4 additions & 4 deletions Dayflow/Dayflow/Views/Onboarding/LLMProviderSetupView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct LLMProviderSetupView: View {

// Title in the content area
HStack {
Text(headerTitle)
Text(LocalizedStringKey(headerTitle))
.font(.custom("Figtree", size: 32))
.fontWeight(.semibold)
.foregroundColor(.black.opacity(0.9))
Expand Down Expand Up @@ -142,7 +142,7 @@ struct LLMProviderSetupView: View {
action: handleContinue,
content: {
HStack(spacing: 6) {
Text(nextButtonText).font(.custom("Figtree", size: 14)).fontWeight(.semibold)
Text(LocalizedStringKey(nextButtonText)).font(.custom("Figtree", size: 14)).fontWeight(.semibold)
if nextButtonText == "Next" {
Image(systemName: "chevron.right").font(.system(size: 12, weight: .medium))
}
Expand Down Expand Up @@ -417,12 +417,12 @@ struct LLMProviderSetupView: View {
case .information(let title, let description):
VStack(alignment: .leading, spacing: 24) {
VStack(alignment: .leading, spacing: 16) {
Text(title)
Text(LocalizedStringKey(title))
.font(.custom("Figtree", size: 24))
.fontWeight(.semibold)
.foregroundColor(.black.opacity(0.9))
if !description.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
Text(description)
Text(LocalizedStringKey(description))
.font(.custom("Figtree", size: 14))
.foregroundColor(.black.opacity(0.6))
.fixedSize(horizontal: false, vertical: true)
Expand Down
2 changes: 1 addition & 1 deletion Dayflow/Dayflow/Views/Onboarding/SetupSidebarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ struct SetupSidebarItem: View {
}
.frame(width: 20, height: 20) // Fixed frame for consistent centering

Text(title)
Text(LocalizedStringKey(title))
.font(.custom("Figtree", size: 15))
.fontWeight(isSelected ? .semibold : .medium)
.foregroundColor(textColor)
Expand Down
4 changes: 2 additions & 2 deletions Dayflow/Dayflow/Views/Onboarding/TerminalCommandView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ struct TerminalCommandView: View {
@State private var isCopied = false
var body: some View {
VStack(alignment: .leading, spacing: 12) {
Text(title)
Text(LocalizedStringKey(title))
.font(.custom("Figtree", size: 16))
.fontWeight(.semibold)
.foregroundColor(.black.opacity(0.9))

Text(subtitle)
Text(LocalizedStringKey(subtitle))
.font(.custom("Figtree", size: 14))
.foregroundColor(.black.opacity(0.6))

Expand Down
20 changes: 10 additions & 10 deletions Dayflow/Dayflow/Views/UI/Settings/SettingsComponents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ struct SettingsSection<Content: View, Trailing: View>: View {
VStack(alignment: .leading, spacing: 0) {
HStack(alignment: .firstTextBaseline, spacing: 16) {
VStack(alignment: .leading, spacing: 4) {
Text(title)
Text(LocalizedStringKey(title))
.font(.custom("Figtree", size: 17))
.fontWeight(.semibold)
.foregroundColor(SettingsStyle.text)
if let subtitle {
Text(subtitle)
Text(LocalizedStringKey(subtitle))
.font(.custom("Figtree", size: 12))
.foregroundColor(SettingsStyle.secondary)
.fixedSize(horizontal: false, vertical: true)
Expand Down Expand Up @@ -129,13 +129,13 @@ struct SettingsRow<Trailing: View>: View {
VStack(alignment: .leading, spacing: 0) {
HStack(alignment: .center, spacing: 16) {
VStack(alignment: .leading, spacing: 3) {
Text(label)
Text(LocalizedStringKey(label))
.font(.custom("Figtree", size: 14))
.fontWeight(.semibold)
.foregroundColor(SettingsStyle.text)
.fixedSize(horizontal: false, vertical: true)
if let subtitle {
Text(subtitle)
Text(LocalizedStringKey(subtitle))
.font(.custom("Figtree", size: 12))
.foregroundColor(SettingsStyle.secondary)
.fixedSize(horizontal: false, vertical: true)
Expand Down Expand Up @@ -193,7 +193,7 @@ struct SettingsPrimaryButton: View {
Image(systemName: systemImage)
.font(.system(size: 12, weight: .semibold))
}
Text(title)
Text(LocalizedStringKey(title))
.font(.custom("Figtree", size: 13))
.fontWeight(.semibold)
}
Expand Down Expand Up @@ -224,7 +224,7 @@ struct SettingsSecondaryButton: View {
Image(systemName: systemImage)
.font(.system(size: 11, weight: .semibold))
}
Text(title)
Text(LocalizedStringKey(title))
.font(.custom("Figtree", size: 13))
.fontWeight(.semibold)
}
Expand All @@ -250,7 +250,7 @@ struct SettingsLinkButton: View {
var body: some View {
Button(action: action) {
HStack(spacing: 5) {
Text(title)
Text(LocalizedStringKey(title))
.font(.custom("Figtree", size: 13))
.fontWeight(.semibold)
if let systemImage {
Expand Down Expand Up @@ -306,7 +306,7 @@ struct SettingsStatusDot: View {
Circle()
.fill(color)
.frame(width: 8, height: 8)
Text(label)
Text(LocalizedStringKey(label))
.font(.custom("Figtree", size: 13))
.fontWeight(.semibold)
.foregroundColor(color)
Expand Down Expand Up @@ -348,7 +348,7 @@ struct SettingsBadge: View {
var isAccent: Bool = false

var body: some View {
Text(text)
Text(LocalizedStringKey(text))
.font(.custom("Figtree", size: 10))
.fontWeight(.bold)
.kerning(0.6)
Expand All @@ -371,7 +371,7 @@ struct SettingsBadge: View {
struct SettingsMetadata: View {
let text: String
var body: some View {
Text(text)
Text(LocalizedStringKey(text))
.font(.custom("Figtree", size: 13))
.foregroundColor(SettingsStyle.secondary)
}
Expand Down
17 changes: 15 additions & 2 deletions Dayflow/Dayflow/Views/UI/Settings/SettingsStorageTabView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,22 @@ struct SettingsStorageTabView: View {
let option = StorageSettingsViewModel.storageOptions[pending.index]
let categoryName = pending.category.displayName
return Alert(
title: Text("Lower \(categoryName) limit?"),
title: Text(
String(
format: NSLocalizedString("Lower %@ limit?", comment: "Confirm lowering storage cap"),
categoryName
)
),
message: Text(
"Reducing the \(categoryName) limit to \(option.label) will immediately delete the oldest \(categoryName) data to stay under the new cap."
String(
format: NSLocalizedString(
"Reducing the %@ limit to %@ will immediately delete the oldest %@ data to stay under the new cap.",
comment: "Confirm lowering storage cap and deleting oldest files"
),
categoryName,
option.label,
categoryName
)
),
primaryButton: .destructive(Text("Confirm")) {
viewModel.applyLimit(for: pending.category, index: pending.index)
Expand Down
20 changes: 14 additions & 6 deletions Dayflow/Dayflow/Views/UI/Settings/StorageSettingsViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,20 @@ final class StorageSettingsViewModel: ObservableObject {
func storageFooterText() -> String {
let recordingsText =
recordingsLimitBytes == Int64.max
? "Unlimited" : usageFormatter.string(fromByteCount: recordingsLimitBytes)
? NSLocalizedString("Unlimited", comment: "No storage cap")
: usageFormatter.string(fromByteCount: recordingsLimitBytes)
let timelapsesText =
timelapsesLimitBytes == Int64.max
? "Unlimited" : usageFormatter.string(fromByteCount: timelapsesLimitBytes)
return
"Recording cap: \(recordingsText) • Timelapse cap: \(timelapsesText). Lowering a cap immediately deletes the oldest files for that type. Timeline card text stays preserved. Please avoid deleting files manually so you do not remove Dayflow's database."
? NSLocalizedString("Unlimited", comment: "No storage cap")
: usageFormatter.string(fromByteCount: timelapsesLimitBytes)
return String(
format: NSLocalizedString(
"Recording cap: %@ • Timelapse cap: %@. Lowering a cap immediately deletes the oldest files for that type. Timeline card text stays preserved. Please avoid deleting files manually so you do not remove Dayflow's database.",
comment: "Storage footer explaining caps and deletion behavior"
),
recordingsText,
timelapsesText
)
}

func handleLimitSelection(for category: StorageCategory, index: Int) {
Expand Down Expand Up @@ -248,8 +256,8 @@ enum StorageCategory {

var displayName: String {
switch self {
case .recordings: return "Recordings"
case .timelapses: return "Timelapses"
case .recordings: return NSLocalizedString("Recordings", comment: "Storage category")
case .timelapses: return NSLocalizedString("Timelapses", comment: "Storage category")
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions Dayflow/Dayflow/zh-Hans.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"CFBundleName" = "Dayflow";
"CFBundleDisplayName" = "Dayflow";
Loading