add support Tibetan translation
This commit is contained in:
parent
9cbd31936e
commit
bba4892fad
43
0010-add-Support-Tibetan-translation.patch
Normal file
43
0010-add-Support-Tibetan-translation.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 5f3829a86969a79769dcf44c1918789d93c9b684 Mon Sep 17 00:00:00 2001
|
||||
From: tanyulong2021 <tanyulong@kylinos.cn>
|
||||
Date: Wed, 29 Jun 2022 16:27:49 +0800
|
||||
Subject: [PATCH] add Support Tibetan translation
|
||||
|
||||
---
|
||||
debian/ukui-system-monitor.install | 3 +++
|
||||
src/main.cpp | 7 ++++++-
|
||||
2 files changed, 9 insertions(+), 1 deletion(-)
|
||||
create mode 100644 debian/ukui-system-monitor.install
|
||||
|
||||
diff --git a/debian/ukui-system-monitor.install b/debian/ukui-system-monitor.install
|
||||
new file mode 100644
|
||||
index 0000000..788e6fa
|
||||
--- /dev/null
|
||||
+++ b/debian/ukui-system-monitor.install
|
||||
@@ -0,0 +1,3 @@
|
||||
+data/kylin-system-monitor /usr/share/kylin-user-guide/data/guide
|
||||
+data/png /usr/share/icons/hicolor/
|
||||
+src/translation/*.qm /usr/share/ukui-system-monitor/translations/
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index f65b25a..b9b2613 100755
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -69,9 +69,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
QString locale = QLocale::system().name();
|
||||
QTranslator translator;
|
||||
- if(locale == "zh_CN" || locale == "es" || locale == "fr" || locale == "de" || locale == "ru") {//中文 西班牙语 法语 德语 俄语
|
||||
+ if(locale == "zh_CN" || locale == "es" || locale == "fr" || locale == "de" || locale == "ru" || locale == "en_US" || locale == "bo_CN") {//中文 西班牙语 法语 德语 俄语
|
||||
+ #if 0
|
||||
if(!translator.load("ukui-system-monitor_" + locale + ".qm",
|
||||
":/translation/"))
|
||||
+ #else
|
||||
+ if(!translator.load("ukui-system-monitor_" + locale + ".qm",
|
||||
+ "/usr/share/ukui-system-monitor/translations/"))
|
||||
+ #endif
|
||||
qDebug() << "Load translation file:"<< "ukui-system-monitor_" + locale + ".qm" << " failed!";
|
||||
else
|
||||
app.installTranslator(&translator);
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
%define debug_package %{nil}
|
||||
Name: ukui-system-monitor
|
||||
Version: 1.0.1
|
||||
Release: 15
|
||||
Release: 16
|
||||
Summary: A simple system monitor written in QT
|
||||
License: GPL-3.0-or-later
|
||||
URL: http://www.ukui.org
|
||||
@ -44,6 +44,8 @@ patch8: fix-the-bug-about-process-filesystem.patch
|
||||
patch9: 0007-Fix-the-segmentfault-without-org.ukui.style.patch
|
||||
patch10: 0008-Update-changelog.patch
|
||||
patch11: 0009-desktop-add-Tibetan-name-and-introduction.patch
|
||||
patch12: 0010-add-Support-Tibetan-translation.patch
|
||||
|
||||
%description
|
||||
A simple system monitor written in QT
|
||||
|
||||
@ -61,6 +63,7 @@ A simple system monitor written in QT
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
|
||||
%build
|
||||
export PATH=%{_qt5_bindir}:$PATH
|
||||
@ -91,6 +94,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/glib-2.0/schemas/org.ukui.system-monitor.menu.gschema.xml
|
||||
|
||||
%changelog
|
||||
* Wed Jun 29 2022 tanyulong<tanyulong@kylinos.cn> - 1.0.1-16
|
||||
- add support Tibetan translation
|
||||
|
||||
* Wed Jun 29 2022 tanyulong<tanyulong@kylinos.cn> - 1.0.1-15
|
||||
- desktop add Tibetan name and introduction
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user