diff --git a/calendar-client/src/customWidget/cweekwidget.cpp b/calendar-client/src/customWidget/cweekwidget.cpp index 8ce21a8c..12b30a11 100644 --- a/calendar-client/src/customWidget/cweekwidget.cpp +++ b/calendar-client/src/customWidget/cweekwidget.cpp @@ -7,6 +7,7 @@ #include "constants.h" #include #include +#include CWeekWidget::CWeekWidget(QWidget *parent) : QPushButton(parent) , m_firstDay(CalendarManager::getInstance()->getFirstDayOfWeek()) @@ -69,7 +70,13 @@ void CWeekWidget::paintEvent(QPaintEvent *event) } QStringList weekStr; - weekStr << tr("Sun") << tr("Mon") << tr("Tue") << tr("Wed") << tr("Thu") << tr("Fri") << tr("Sat"); + for (int i = 0; i < 8; i++) { + // 2024/8/15 星期四是deepin23的发布日期 + // 减4是从周日开始将所有星期名字都写到weekStr,取代之前手动翻译方式 + QDate date(2024, 8, 15 - 4 + i); + QString weekDayName = locale.toString(date, "ddd"); + weekStr<