From c286a4425451f085314ecc4aecde304e610a4481 Mon Sep 17 00:00:00 2001 From: myml Date: Fri, 27 Sep 2024 13:21:40 +0800 Subject: [PATCH 1/2] feat: cweekwidget uses locale to replace tr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cweekwidget组件使用locale.toString替换tr手动翻译 一来可以使用qt自己的翻译支持的语言更广泛, 且能减少翻译工作量 二来避免翻译人员在不知道显示场景下使用长翻译而不是缩写 Bug: https://pms.uniontech.com/bug-view-271483.html --- calendar-client/src/customWidget/cweekwidget.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/calendar-client/src/customWidget/cweekwidget.cpp b/calendar-client/src/customWidget/cweekwidget.cpp index 8ce21a8ca..39337286b 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,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; + } //绘制周一到周日 for (int i = Qt::Monday; i <= Qt::Sunday; ++i) { From beb2f6b458ee3fced3d3a33fb73dc3735e4af288 Mon Sep 17 00:00:00 2001 From: myml Date: Tue, 8 Oct 2024 15:57:19 +0800 Subject: [PATCH 2/2] chore: Release 5.14.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 发布5.14.9版本 Log: 修复翻译错误 --- debian/changelog | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/debian/changelog b/debian/changelog index 06dd9fa7d..7a53c9b7b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Sun, 29 Sep 2024 15:42:47 +0800 + dde-calendar (5.14.8) unstable; urgency=medium * chore: Update linglong build script.