Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: cweekwidget uses locale to replace tr #193

Merged
merged 2 commits into from
Nov 14, 2024
Merged
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
6 changes: 5 additions & 1 deletion calendar-client/src/customWidget/cweekwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "constants.h"
#include <QLocale>
#include <QPainter>
#include <QDate>

CWeekWidget::CWeekWidget(QWidget *parent) : QPushButton(parent)
, m_firstDay(CalendarManager::getInstance()->getFirstDayOfWeek())
Expand Down Expand Up @@ -69,7 +70,10 @@ void CWeekWidget::paintEvent(QPaintEvent *event)
}

QStringList weekStr;
weekStr << tr("Sun") << tr("Mon") << tr("Tue") << tr("Wed") << tr("Thu") << tr("Fri") << tr("Sat");
for (auto i : { 7, 1, 2, 3, 4, 5, 6 }) {
QString weekDayName = locale.dayName(i, QLocale::NarrowFormat);
weekStr << weekDayName;
}
myml marked this conversation as resolved.
Show resolved Hide resolved

//绘制周一到周日
for (int i = Qt::Monday; i <= Qt::Sunday; ++i) {
Expand Down
15 changes: 15 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
dde-calendar (5.14.9) UNRELEASED; urgency=medium

[ transifex-integration[bot] ]
* i18n: Translate dde-calendar_en_US.ts in ro
* i18n: Translate dde-calendar-service_en_US.ts in ro
* i18n: Translate dde-calendar_en_US.ts in sq
* i18n: Translate dde-calendar-service_en_US.ts in sq
* i18n: Translate dde-calendar-service_en_US.ts in zh_CN
* i18n: Removing dde-calendar-service_en_US.ts in zh_CN

[ myml ]
* feat: cweekwidget uses locale to replace tr

-- myml <[email protected]> Sun, 29 Sep 2024 15:42:47 +0800

dde-calendar (5.14.8) unstable; urgency=medium

* chore: Update linglong build script.
Expand Down
Loading