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 "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" : { "%lldx" : {
"localizations" : { "localizations" : {
"fr" : { "fr" : {
@ -1845,7 +1875,7 @@
"pt-BR" : { "pt-BR" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Ativar" "value" : "Ativo"
} }
} }
} }
@ -10429,6 +10459,16 @@
"feedback" : { "feedback" : {
"shouldTranslate" : false "shouldTranslate" : false
}, },
"File" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Arquivo"
}
}
}
},
"Files dropped on the shelf will be shared via this service" : { "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.", "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, "isCommentAutoGenerated" : true,
@ -12410,6 +12450,16 @@
} }
} }
}, },
"Image" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Imagem"
}
}
}
},
"Import" : { "Import" : {
"localizations" : { "localizations" : {
"fr" : { "fr" : {
@ -12757,6 +12807,16 @@
} }
} }
}, },
"Just now" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Agora mesmo"
}
}
}
},
"keyboard" : { "keyboard" : {
"localizations" : { "localizations" : {
"pt-BR" : { "pt-BR" : {
@ -15552,7 +15612,7 @@
"pt-BR" : { "pt-BR" : {
"stringUnit" : { "stringUnit" : {
"state" : "translated", "state" : "translated",
"value" : "Status de Monitoramente" "value" : "Status de Monitoramento"
} }
} }
} }
@ -19527,6 +19587,9 @@
} }
} }
}, },
"Rich Text" : {
"shouldTranslate" : false
},
"Right" : { "Right" : {
"localizations" : { "localizations" : {
"pt-BR" : { "pt-BR" : {
@ -22784,6 +22847,16 @@
} }
} }
}, },
"Text" : {
"localizations" : {
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Texto"
}
}
}
},
"TheDynamicIsland" : { "TheDynamicIsland" : {
"shouldTranslate" : false "shouldTranslate" : false
}, },
@ -24004,6 +24077,9 @@
}, },
"shouldTranslate" : false "shouldTranslate" : false
}, },
"URL" : {
"shouldTranslate" : false
},
"Usage" : { "Usage" : {
"comment" : "A label displayed above the CPU usage statistics.", "comment" : "A label displayed above the CPU usage statistics.",
"isCommentAutoGenerated" : true, "isCommentAutoGenerated" : true,

View file

@ -6114,7 +6114,7 @@ struct ClipboardSettings: View {
if enableClipboardManager { if enableClipboardManager {
Section { Section {
Defaults.Toggle("Show Clipboard Icon", key: .showClipboardIcon) Defaults.Toggle(String(localized: "Show Clipboard Icon"), key: .showClipboardIcon)
.settingsHighlight(id: highlightID("Show Clipboard Icon")) .settingsHighlight(id: highlightID("Show Clipboard Icon"))
HStack { HStack {
@ -6126,7 +6126,7 @@ struct ClipboardSettings: View {
} }
} }
.pickerStyle(.menu) .pickerStyle(.menu)
.frame(width: 100) .frame(width: 200)
} }
.settingsHighlight(id: highlightID("Display Mode")) .settingsHighlight(id: highlightID("Display Mode"))
@ -6140,7 +6140,7 @@ struct ClipboardSettings: View {
Text("10 items").tag(10) Text("10 items").tag(10)
} }
.pickerStyle(.menu) .pickerStyle(.menu)
.frame(width: 100) .frame(width: 200)
} }
.settingsHighlight(id: highlightID("History Size")) .settingsHighlight(id: highlightID("History Size"))
@ -6237,16 +6237,16 @@ struct ClipboardSettings: View {
let interval = Date().timeIntervalSince(date) let interval = Date().timeIntervalSince(date)
if interval < 60 { if interval < 60 {
return "Just now" return String(localized: "Just now")
} else if interval < 3600 { } else if interval < 3600 {
let minutes = Int(interval / 60) let minutes = Int(interval / 60)
return "\(minutes)m ago" return String(localized: "\(minutes)m ago")
} else if interval < 86400 { } else if interval < 86400 {
let hours = Int(interval / 3600) let hours = Int(interval / 3600)
return "\(hours)h ago" return String(localized: "\(hours)h ago")
} else { } else {
let days = Int(interval / 86400) 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) let interval = Date().timeIntervalSince(date)
if interval < 60 { if interval < 60 {
return "Just now" return String(localized: "Just now")
} else if interval < 3600 { } else if interval < 3600 {
let minutes = Int(interval / 60) let minutes = Int(interval / 60)
return "\(minutes)m ago" return String(localized: "\(minutes)m ago")
} else if interval < 86400 { } else if interval < 86400 {
let hours = Int(interval / 3600) let hours = Int(interval / 3600)
return "\(hours)h ago" return String(localized: "\(hours)h ago")
} else { } else {
let days = Int(interval / 86400) 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 { var displayName: String {
switch self { switch self {
case .text: return "Text" case .text: return String(localized: "Text")
case .url: return "URL" case .url: return String(localized: "URL")
case .file: return "File" case .file: return String(localized: "File")
case .image: return "Image" case .image: return String(localized: "Image")
case .rtf: return "Rich Text" case .rtf: return String(localized: "Rich Text")
case .unknown: return "Unknown" case .unknown: return String(localized: "Unknown")
} }
} }
} }