add update-formats_loacle-and-language.patch
(cherry picked from commit aa25bb8f6ec6de6ae69fbf124d4f9fe94664a62d)
This commit is contained in:
parent
9a517453af
commit
1e26d65128
@ -1,6 +1,6 @@
|
|||||||
Name: ukui-control-center
|
Name: ukui-control-center
|
||||||
Version: 3.1.2
|
Version: 3.1.2
|
||||||
Release: 27
|
Release: 28
|
||||||
Summary: utilities to configure the UKUI desktop
|
Summary: utilities to configure the UKUI desktop
|
||||||
License: GPL-2+
|
License: GPL-2+
|
||||||
URL: http://www.ukui.org
|
URL: http://www.ukui.org
|
||||||
@ -26,6 +26,7 @@ Patch21: add-information-for-about.patch
|
|||||||
Patch22: cpuinfo-in-arm-system-is-null.patch
|
Patch22: cpuinfo-in-arm-system-is-null.patch
|
||||||
Patch23: add-ukcc-setlang.patch
|
Patch23: add-ukcc-setlang.patch
|
||||||
Patch24: fix-changeusertype-error.patch
|
Patch24: fix-changeusertype-error.patch
|
||||||
|
Patch25: update-formats_loacle-and-language.patch
|
||||||
|
|
||||||
Patch200: fix-build-error-of-libkscreen-qt5-5.27.6.patch
|
Patch200: fix-build-error-of-libkscreen-qt5-5.27.6.patch
|
||||||
Patch201: fix-build-error-of-clang.patch
|
Patch201: fix-build-error-of-clang.patch
|
||||||
@ -149,6 +150,12 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Sep 25 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-28
|
||||||
|
- Type:bugfix
|
||||||
|
- ID :NA
|
||||||
|
- SUG :NA
|
||||||
|
- DESC:add update-formats_loacle-and-language.patch
|
||||||
|
|
||||||
* Fri Sep 15 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-27
|
* Fri Sep 15 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-27
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
29
update-formats_loacle-and-language.patch
Normal file
29
update-formats_loacle-and-language.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
diff --git a/plugins/time-language/area/area.cpp b/plugins/time-language/area/area.cpp
|
||||||
|
index 5345b36..611bf9d 100644
|
||||||
|
--- a/plugins/time-language/area/area.cpp
|
||||||
|
+++ b/plugins/time-language/area/area.cpp
|
||||||
|
@@ -184,8 +185,7 @@ void Area::initLanguage()
|
||||||
|
HLineFrame *lineF_2 = new HLineFrame();
|
||||||
|
|
||||||
|
QStringList res = getUserDefaultLanguage();
|
||||||
|
- QString lang = res.at(1);
|
||||||
|
- int langIndex = lang.split(':').at(0) == "zh_CN.UTF-8" ? 0 : 1;
|
||||||
|
+ int langIndex= res.at(1).contains("zh_CN", Qt::CaseInsensitive) ? 0 : 1;
|
||||||
|
|
||||||
|
if (0 == langIndex) {
|
||||||
|
chineseFrame->showSelectedIcon(true);
|
||||||
|
@@ -222,9 +222,8 @@ void Area::initComponent() {
|
||||||
|
ui->countrycomboBox->addItem(tr("CN"));
|
||||||
|
|
||||||
|
QStringList res = getUserDefaultLanguage();
|
||||||
|
- QString lang = res.at(1);
|
||||||
|
- int langIndex = lang.split(':').at(0) == "zh_CN.UTF-8" ? 1 : 0;
|
||||||
|
- int formatIndex = res.at(0) == "zh_CN.UTF-8" ? 1 : 0;
|
||||||
|
+ int langIndex= res.at(1).contains("zh_CN", Qt::CaseInsensitive) ? 1 : 0;
|
||||||
|
+ int formatIndex= res.at(0).contains("zh_CN", Qt::CaseInsensitive) ? 1 : 0;
|
||||||
|
// ui->langcomboBox->setCurrentIndex(langIndex);
|
||||||
|
ui->countrycomboBox->setCurrentIndex(formatIndex);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user