!77 [sync] PR-74: update 0002-fix-translation-of-calendar.patch
From: @openeuler-sync-bot Reviewed-by: @peijiankang Signed-off-by: @peijiankang
This commit is contained in:
commit
b784b599b3
@ -1,33 +1,27 @@
|
|||||||
From 1727c034ae8f43ba607d75503e0d9840bdf497cd Mon Sep 17 00:00:00 2001
|
From 364e77f821d31c1cff7dc9bf83d1cbe47b60e7e9 Mon Sep 17 00:00:00 2001
|
||||||
From: peijiankang <peijiankang@kylinos.cn>
|
From: peijiankang <peijiankang@kylinos.cn>
|
||||||
Date: Tue, 17 Jan 2023 10:12:33 +0800
|
Date: Thu, 29 Jun 2023 17:45:28 +0800
|
||||||
Subject: [PATCH] fix translation of calendar
|
Subject: [PATCH] fix translation of calendar
|
||||||
|
|
||||||
---
|
---
|
||||||
plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp | 6 ++++--
|
plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp | 4 ++++
|
||||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
diff --git a/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp b/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp
|
diff --git a/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp b/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp
|
||||||
index 4c5e743..40686e8 100644
|
index 4c5e743..1c4d931 100644
|
||||||
--- a/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp
|
--- a/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp
|
||||||
+++ b/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp
|
+++ b/plugin-calendar/lunarcalendarwidget/lunarcalendarwidget.cpp
|
||||||
@@ -606,8 +606,8 @@ void LunarCalendarWidget::setLocaleCalendar()
|
@@ -668,9 +668,13 @@ QStringList LunarCalendarWidget::getLocale()
|
||||||
{
|
propertyMap = reply.value();
|
||||||
|
if (propertyMap.keys().contains("FormatsLocale")) {
|
||||||
QStringList res = getLocale();
|
formats = propertyMap.find("FormatsLocale").value().toString();
|
||||||
- qDebug()<<"设置区域:"<<res.at(0);
|
+ if(formats.isEmpty())
|
||||||
- int isCN = res.at(0) == "zh_CN.UTF-8" ? 1 : 0;
|
+ formats = QLocale::system().name() + ".UTF-8";
|
||||||
+ qDebug()<<"设置区域:"<<res.at(1);
|
|
||||||
+ int isCN = res.at(1).contains("zh_CN", Qt::CaseSensitive);
|
|
||||||
if(isCN){
|
|
||||||
if (FirstdayisSun) {
|
|
||||||
labWeeks.at(0)->setText("周日");
|
|
||||||
@@ -671,6 +671,8 @@ QStringList LunarCalendarWidget::getLocale()
|
|
||||||
}
|
}
|
||||||
if(language.isEmpty() && propertyMap.keys().contains("Language")) {
|
if(language.isEmpty() && propertyMap.keys().contains("Language")) {
|
||||||
language = propertyMap.find("Language").value().toString();
|
language = propertyMap.find("Language").value().toString();
|
||||||
+ if(language.isEmpty())
|
+ if(language.isEmpty())
|
||||||
+ language = QLocale::system().name();
|
+ language = QLocale::system().name() + ".UTF-8";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "reply failed";
|
qDebug() << "reply failed";
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
Name: ukui-panel
|
Name: ukui-panel
|
||||||
Version: 3.1.0
|
Version: 3.1.0
|
||||||
Release: 10
|
Release: 11
|
||||||
Summary: ukui desktop panel
|
Summary: ukui desktop panel
|
||||||
License: LGPL-2.0-or-later and GPL-2.0-or-later and BSD
|
License: LGPL-2.0-or-later and GPL-2.0-or-later and BSD
|
||||||
URL: http://www.ukui.org
|
URL: http://www.ukui.org
|
||||||
@ -90,6 +90,12 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_datadir}/*
|
%{_datadir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 07 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.0-11
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: update 0002-fix-translation-of-calendar.patch
|
||||||
|
|
||||||
* Thu Jul 27 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.0-10
|
* Thu Jul 27 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.0-10
|
||||||
- Type:update
|
- Type:update
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user