From 2ccb27177b19b21b4f76b54ccb522482f8b69ae9 Mon Sep 17 00:00:00 2001 From: peijiankang Date: Tue, 17 Jan 2023 10:13:08 +0800 Subject: [PATCH] fix translation of calendar --- 0002-fix-translation-of-calendar.patch | 36 ++++++++++++++++++++++++++ ukui-panel.spec | 7 ++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0002-fix-translation-of-calendar.patch diff --git a/0002-fix-translation-of-calendar.patch b/0002-fix-translation-of-calendar.patch new file mode 100644 index 0000000..4679f69 --- /dev/null +++ b/0002-fix-translation-of-calendar.patch @@ -0,0 +1,36 @@ +From 1727c034ae8f43ba607d75503e0d9840bdf497cd Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Tue, 17 Jan 2023 10:12:33 +0800 +Subject: [PATCH] fix translation of calendar + +--- + plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp b/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp +index 4c5e743..40686e8 100644 +--- a/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp ++++ b/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp +@@ -606,8 +606,8 @@ void LunarCalendarWidget::setLocaleCalendar() + { + + QStringList res = getLocale(); +- qDebug()<<"设置区域:"<setText("周日"); +@@ -671,6 +671,8 @@ QStringList LunarCalendarWidget::getLocale() + } + if(language.isEmpty() && propertyMap.keys().contains("Language")) { + language = propertyMap.find("Language").value().toString(); ++ if(language.isEmpty()) ++ language = QLocale::system().name(); + } + } else { + qDebug() << "reply failed"; +-- +2.33.0 + diff --git a/ukui-panel.spec b/ukui-panel.spec index 91bf62f..a1b7882 100644 --- a/ukui-panel.spec +++ b/ukui-panel.spec @@ -2,12 +2,13 @@ Name: ukui-panel Version: 3.1.0 -Release: 4 +Release: 5 Summary: ukui desktop panel License: LGPL-2.0-or-later and GPL-2.0-or-later and BSD URL: http://www.ukui.org Source0: %{name}-%{version}.tar.gz Patch01: 0001-fix-translation-problem-of-ukui-panel.patch +Patch02: 0002-fix-translation-of-calendar.patch BuildRequires: cmake BuildRequires: alsa-lib-devel @@ -59,6 +60,7 @@ Recommends: time-shutdown %prep %setup -q %patch01 -p1 +%patch02 -p1 %build mkdir build && cd build @@ -81,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/* %changelog +* Tue Jan 17 2023 peijiankang - 3.1.0-5 +- fix translation of calendar + * Mon Jan 9 2023 peijiankang - 3.1.0-4 - fix translation problem of ukui-panel