Commit 60cb17b3 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

components/calendar: add sublabel to `Accessible.description`

CCBUG: 429892
parent e94e21f2
Pipeline #209685 passed with stage
in 6 minutes and 8 seconds
......@@ -28,7 +28,11 @@ PlasmaComponents3.AbstractButton {
readonly property date thisDate: new Date(yearNumber, typeof monthNumber !== "undefined" ? monthNumber - 1 : 0, typeof dayNumber !== "undefined" ? dayNumber : 1)
Accessible.name: thisDate.toLocaleDateString(Qt.locale(), Locale.LongFormat)
Accessible.description: (model.eventCount !== undefined && model.eventCount > 0) ? i18ndp("plasmashellprivateplugin", "%1 event", "%1 events", model.eventCount) : i18nd("plasmashellprivateplugin", "No events")
Accessible.description: {
const eventDescription = (model.eventCount !== undefined && model.eventCount > 0) ? i18ndp("plasmashellprivateplugin", "%1 event", "%1 events", model.eventCount) : i18nd("plasmashellprivateplugin", "No events");
const subLabelDescription = model.subLabel || model.subDayLabel || "";
return `${eventDescription} ${subLabelDescription ? `; ${subLabelDescription}` : ""}`;
}
readonly property bool today: {
const today = root.today;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment