Fix strings detections and translates the entire "Clipboard Manager" section and change the width to work better with all languages

This commit is contained in:
Felipe Giacomini Cocco 2026-02-05 14:57:27 -03:00
commit df66586602
3 changed files with 95 additions and 19 deletions

View file

@ -1003,6 +1003,36 @@
},
"shouldTranslate" : false
},
"%lldd ago" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "%lldd atrás"
}
}
}
},
"%lldh ago" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "%lldh atrás"
}
}
}
},
"%lldm ago" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "%lldm atrás"
}
}
}
},
"%lldx" : {
"localizations" : {
"fr" : {
@ -1845,7 +1875,7 @@
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ativar"
"value" : "Ativo"
}
}
}
@ -10429,6 +10459,16 @@
"feedback" : {
"shouldTranslate" : false
},
"File" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Arquivo"
}
}
}
},
"Files dropped on the shelf will be shared via this service" : {
"comment" : "A description below the currently selected quick share provider, explaining that files dropped on the shelf will be shared via that provider.",
"isCommentAutoGenerated" : true,
@ -12410,6 +12450,16 @@
}
}
},
"Image" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Imagem"
}
}
}
},
"Import" : {
"localizations" : {
"fr" : {
@ -12757,6 +12807,16 @@
}
}
},
"Just now" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Agora mesmo"
}
}
}
},
"keyboard" : {
"localizations" : {
"pt-BR" : {
@ -15552,7 +15612,7 @@
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Status de Monitoramente"
"value" : "Status de Monitoramento"
}
}
}
@ -19527,6 +19587,9 @@
}
}
},
"Rich Text" : {
"shouldTranslate" : false
},
"Right" : {
"localizations" : {
"pt-BR" : {
@ -22784,6 +22847,16 @@
}
}
},
"Text" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Texto"
}
}
}
},
"TheDynamicIsland" : {
"shouldTranslate" : false
},
@ -24004,6 +24077,9 @@
},
"shouldTranslate" : false
},
"URL" : {
"shouldTranslate" : false
},
"Usage" : {
"comment" : "A label displayed above the CPU usage statistics.",
"isCommentAutoGenerated" : true,

View file

@ -6114,7 +6114,7 @@ struct ClipboardSettings: View {
if enableClipboardManager {
Section {
Defaults.Toggle("Show Clipboard Icon", key: .showClipboardIcon)
Defaults.Toggle(String(localized: "Show Clipboard Icon"), key: .showClipboardIcon)
.settingsHighlight(id: highlightID("Show Clipboard Icon"))
HStack {
@ -6126,7 +6126,7 @@ struct ClipboardSettings: View {
}
}
.pickerStyle(.menu)
.frame(width: 100)
.frame(width: 200)
}
.settingsHighlight(id: highlightID("Display Mode"))
@ -6140,7 +6140,7 @@ struct ClipboardSettings: View {
Text("10 items").tag(10)
}
.pickerStyle(.menu)
.frame(width: 100)
.frame(width: 200)
}
.settingsHighlight(id: highlightID("History Size"))
@ -6237,16 +6237,16 @@ struct ClipboardSettings: View {
let interval = Date().timeIntervalSince(date)
if interval < 60 {
return "Just now"
return String(localized: "Just now")
} else if interval < 3600 {
let minutes = Int(interval / 60)
return "\(minutes)m ago"
return String(localized: "\(minutes)m ago")
} else if interval < 86400 {
let hours = Int(interval / 3600)
return "\(hours)h ago"
return String(localized: "\(hours)h ago")
} else {
let days = Int(interval / 86400)
return "\(days)d ago"
return String(localized: "\(days)d ago")
}
}
}
@ -6413,16 +6413,16 @@ struct ScreenAssistantSettings: View {
let interval = Date().timeIntervalSince(date)
if interval < 60 {
return "Just now"
return String(localized: "Just now")
} else if interval < 3600 {
let minutes = Int(interval / 60)
return "\(minutes)m ago"
return String(localized: "\(minutes)m ago")
} else if interval < 86400 {
let hours = Int(interval / 3600)
return "\(hours)h ago"
return String(localized: "\(hours)h ago")
} else {
let days = Int(interval / 86400)
return "\(days)d ago"
return String(localized: "\(days)d ago")
}
}
}

View file

@ -155,12 +155,12 @@ enum ClipboardItemType: String, CaseIterable, Codable {
var displayName: String {
switch self {
case .text: return "Text"
case .url: return "URL"
case .file: return "File"
case .image: return "Image"
case .rtf: return "Rich Text"
case .unknown: return "Unknown"
case .text: return String(localized: "Text")
case .url: return String(localized: "URL")
case .file: return String(localized: "File")
case .image: return String(localized: "Image")
case .rtf: return String(localized: "Rich Text")
case .unknown: return String(localized: "Unknown")
}
}
}