update upstream version 1.1.0

This commit is contained in:
tanyulong2021 2022-12-06 16:58:50 +08:00
parent 65da7ee01f
commit 231df49353
5 changed files with 9 additions and 383 deletions

View File

@ -1,304 +0,0 @@
From bf02969975fd8a4a4d20ad5f6aaca8ce3a140c75 Mon Sep 17 00:00:00 2001
From: lvfei <lvfei@kylinos.cn>
Date: Fri, 9 Sep 2022 15:46:04 +0800
Subject: [PATCH] add-and-update-some-zangwen-translate
---
translations/generate_translations_qm.sh | 4 +-
translations/kylin-calculator_bo_CN.ts | 154 +++++++++++++++++++----
2 files changed, 133 insertions(+), 25 deletions(-)
diff --git a/translations/generate_translations_qm.sh b/translations/generate_translations_qm.sh
index 62fa6b5..2359710 100755
--- a/translations/generate_translations_qm.sh
+++ b/translations/generate_translations_qm.sh
@@ -4,5 +4,5 @@ ts_file_list=(`ls translations/*.ts`)
for ts in "${ts_file_list[@]}"
do
- lrelease "${ts}"
-done
\ No newline at end of file
+ lrelease-qt5 "${ts}"
+done
diff --git a/translations/kylin-calculator_bo_CN.ts b/translations/kylin-calculator_bo_CN.ts
index ba74419..8bcc783 100644
--- a/translations/kylin-calculator_bo_CN.ts
+++ b/translations/kylin-calculator_bo_CN.ts
@@ -1,15 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="bo_CN">
+<context>
+ <name>Calc</name>
+ <message>
+ <source>The expression is empty!</source>
+ <translation>མཚོན་པའི་རྣམ་པ།!</translation>
+ </message>
+ <message>
+ <source>Expression error!</source>
+ <translation>མཚོན་ཚུལ་ནོར་སྐྱོན།!</translation>
+ </message>
+ <message>
+ <source>Missing left parenthesis!</source>
+ <translation>གཡོན་ལྷུང་ཨང་གྲངས་ཆད་སྐྱོན་ཤོར་བ།!</translation>
+ </message>
+ <message>
+ <source>The value is too large!</source>
+ <translation>རིན་ཐང་དེ་འདྲ་ཆེ་དྲགས་པ།!</translation>
+ </message>
+ <message>
+ <source>Miss operand!</source>
+ <translation>བཀོལ་སྤྱོད་གྲངས་མེད།!</translation>
+ </message>
+ <message>
+ <source>Operator undefined!</source>
+ <translation>རྩིས་རྟགས་ལ་མཚན་ཉིད་བཞག་པ།!</translation>
+ </message>
+ <message>
+ <source>Divisor cannot be 0!</source>
+ <translation>ཁ་ཤས་ནི་0ཡིན།!</translation>
+ </message>
+ <message>
+ <source>The shifted right operand is negative!</source>
+ <translation type="vanished">གཡས་སྤོས་བཀོལ་སྤྱོད་ཀྱི་གྲངས་ཀ་ལ་མཚོན་ན།!</translation>
+ </message>
+ <message>
+ <source>Right operand error!</source>
+ <translation>གཡས་སྤོས་བཀོལ་སྤྱོད་ཀྱི་གྲངས་ཀ་ལ་མཚོན་ན།!</translation>
+ </message>
+</context>
<context>
<name>FuncList</name>
<message>
<source>Unit converter</source>
- <translation></translation>
+ <translation>ཕབ་རྩིས་ཆས།</translation>
</message>
<message>
<source>exchange rate</source>
- <translation>དངུལ་བརྗེས་འཛའ་ཐང་།འཛའ་ཐང་།</translation>
+ <translation>འཛའ་ཐང་།</translation>
</message>
<message>
<source>standard</source>
@@ -24,6 +63,17 @@
<translation>ཚན་རིག</translation>
</message>
</context>
+<context>
+ <name>IntelModeList</name>
+ <message>
+ <source>standard</source>
+ <translation>ཚད་གཞི།</translation>
+ </message>
+ <message>
+ <source>scientific</source>
+ <translation>ཚན་རིག</translation>
+ </message>
+</context>
<context>
<name>MainWindow</name>
<message>
@@ -36,19 +86,19 @@
</message>
<message>
<source>input too long</source>
- <translation>ནང་འཇུག་རིང་བ།</translation>
+ <translation>ནང་འཇུག་དུས་ཚོད་རིང་བ།</translation>
</message>
<message>
<source>exchange rate</source>
- <translation>དངུལ་བརྗེས་འཛའ་ཐང་།འཛའ་ཐང་།</translation>
+ <translation>འཛའ་ཐང་།</translation>
</message>
<message>
<source>Input error!</source>
- <translation>ནང་འཇུག!</translation>
+ <translation>ནང་འཇུག་ནོར་འཁྲུལ་བྱུང་བ།!</translation>
</message>
<message>
<source>Error!</source>
- <translation>སྐྱོན་ཆ་སཆུགས་ཤིང་ནོར་བ་ནོར་འཁྲུལ་!</translation>
+ <translation>ནོར་འཁྲུལ།!</translation>
</message>
<message>
<source>standard</source>
@@ -56,7 +106,7 @@
</message>
<message>
<source>calculator</source>
- <translation>རྩིས་ཆས།རྩིས་རྒྱག་འཕྲུལ་ཆས།</translation>
+ <translation>རྩིས་ཆས།(_C)</translation>
</message>
<message>
<source>Calculator</source>
@@ -68,14 +118,29 @@
</message>
</context>
<context>
- <name>QObject</name>
+ <name>ProgramDisplay</name>
<message>
- <source>Chinese Yuan</source>
- <translation type="vanished">མི་དམངས</translation>
+ <source>input too long!</source>
+ <translation>ནང་འཇུག་རིང་བ།!</translation>
</message>
+</context>
+<context>
+ <name>ProgramModel</name>
<message>
- <source>US Dollar</source>
- <translation type="vanished">མེ་སྒོར།</translation>
+ <source>Input error!</source>
+ <translation>ནང་འཇུག་ནོར་འཁྲུལ་བྱུང་བ།!</translation>
+ </message>
+ <message>
+ <source>DisplayBinary</source>
+ <translation type="vanished">ཁྱད་པ་གཉིས་ལྡན་པ།</translation>
+ </message>
+ <message>
+ <source>HideBinary</source>
+ <translation>ཏང་གཉིས་དང་།</translation>
+ </message>
+ <message>
+ <source>ShowBinary</source>
+ <translation>ཁྱད་པ་གཉིས་ལྡན་པ།</translation>
</message>
</context>
<context>
@@ -90,7 +155,7 @@
</message>
<message>
<source>Exchange Rate</source>
- <translation>དངུལ་བརྗེས་འཛའ་ཐང་།འཛའ་ཐང་།</translation>
+ <translation>འཛའ་ཐང་།</translation>
</message>
<message>
<source>Standard</source>
@@ -98,26 +163,61 @@
</message>
<message>
<source>StayTop</source>
- <translation>རྩེ་མོ།</translation>
+ <translation>མགོར་འཇོག་པ།</translation>
</message>
<message>
<source>Scientific</source>
<translation>ཚན་རིག</translation>
</message>
+ <message>
+ <source>standard</source>
+ <translation>ཚད་གཞི།</translation>
+ </message>
+ <message>
+ <source>scientific</source>
+ <translation>ཚན་རིག</translation>
+ </message>
+ <message>
+ <source>Programmer</source>
+ <translation>བྱ་རིམ་པ།</translation>
+ </message>
+ <message>
+ <source>Maximize</source>
+ <translation>ཆེས་ཆེ་བ།</translation>
+ </message>
+</context>
+<context>
+ <name>ToolBar</name>
+ <message>
+ <source>DisplayBinary</source>
+ <translation type="vanished">ཁྱད་པ་གཉིས་ལྡན་པ།</translation>
+ </message>
+ <message>
+ <source>HideBinary</source>
+ <translation>ཏང་གཉིས་དང་།</translation>
+ </message>
+ <message>
+ <source>ShowBinary</source>
+ <translation>ཁྱད་པ་གཉིས་ལྡན་པ།</translation>
+ </message>
</context>
<context>
<name>ToolModelOutput</name>
<message>
<source>US Dollar</source>
- <translation>མེ་སྒོར།</translation>
+ <translation>ཨ་སྒོར།</translation>
</message>
<message>
<source>Rate update</source>
- <translation>དངུལ་བརྗེས་འཛའ་ཐང་།</translation>
+ <translation>འཛའ་ཐང་རིམ་འགྱུར།</translation>
</message>
<message>
<source>Chinese Yuan</source>
- <translation>མི་དམངས</translation>
+ <translation>མི་དམངས་ཤོག་སྒོར།</translation>
+ </message>
+ <message>
+ <source>Error!</source>
+ <translation>ནོར་འཁྲུལ།!</translation>
</message>
</context>
<context>
@@ -128,11 +228,11 @@
</message>
<message>
<source>search</source>
- <translation>བཤེར་འཚོལ།</translation>
+ <translation type="vanished">བཤེར་འཚོལ།</translation>
</message>
<message>
<source>currency</source>
- <translation>དངོས་རྫས</translation>
+ <translation>དངུལ་ལོར།</translation>
</message>
</context>
<context>
@@ -155,7 +255,7 @@
</message>
<message>
<source>Quit</source>
- <translation>ཕྱིར་འདོན་པ།</translation>
+ <translation>ཕྱིར་འབུད།</translation>
</message>
<message>
<source>About</source>
@@ -171,15 +271,15 @@
</message>
<message>
<source>Exchange Rate</source>
- <translation>དངུལ་བརྗེས་འཛའ་ཐང་།འཛའ་ཐང་།</translation>
+ <translation>འཛའ་ཐང་།</translation>
</message>
<message>
<source>Service &amp; Support: </source>
- <translation>ཞབས་ཞུ། &amp; ཤོག: </translation>
+ <translation>ཞབས་ཞུ་དང་རྒྱབ་སྐྱོར་ཚོགས་པ།:</translation>
</message>
<message>
<source>Version: </source>
- <translation>དཔར་གཞི་: </translation>
+ <translation>པར་གཞི།:</translation>
</message>
<message>
<source>Standard</source>
@@ -193,5 +293,13 @@
<source>Scientific</source>
<translation>ཚན་རིག</translation>
</message>
+ <message>
+ <source>Programmer</source>
+ <translation>བྱ་རིམ་པ།</translation>
+ </message>
+ <message>
+ <source>Calculator is a lightweight calculator based on Qt5, which provides standard calculation, scientific calculation and exchange rate conversion.</source>
+ <translation>ས་པ་ནི་Qt5ཡི་ཚད་དམའ་བའི་གནས་ཚུལ་ལ་གཞིགས་ཏེ་ཚད་གཞི་ལྟར་རྩིས་རྒྱག་པ་དང་།ཚན་རིག་དང་མཐུན་པ།དངུལ་བརྗེས་འཛའ་ཐང་།.</translation>
+ </message>
</context>
</TS>
--
2.27.0

View File

@ -1,72 +0,0 @@
From f29558cc9b85835f8a3d4cbbab52809528a7766e Mon Sep 17 00:00:00 2001
From: lvfei <lvfei@kylinos.cn>
Date: Tue, 27 Sep 2022 15:35:26 +0800
Subject: [PATCH] update desktop file and add sdk translate
---
kylin-calculator.desktop | 3 +++
main.cpp | 22 ++++++++++++++++------
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/kylin-calculator.desktop b/kylin-calculator.desktop
index 47c91bf..f8b3f5a 100644
--- a/kylin-calculator.desktop
+++ b/kylin-calculator.desktop
@@ -2,8 +2,11 @@
Name=Calculator
Name[zh_CN]=计算器
Name[bo_CN]=རྩིས་ཆས།
+Name[zh_HK]=計算器
GenericName[bo_CN]=རྩིས་ཆས།
GenericName=Calculator
+GenericName[zh_CN]=计算器
+GenericName[zh_HK]=計算器
Keywords=calculator
Exec=/usr/bin/kylin-calculator %u
Icon=kylin-calculator
diff --git a/main.cpp b/main.cpp
index 914b56f..5d44560 100644
--- a/main.cpp
+++ b/main.cpp
@@ -117,22 +117,32 @@ int main(int argc, char *argv[])
/* 加载翻译文件 */
QString tranPath("/usr/share/kylin-calculator/translations/");
QString tranQtPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
-
QTranslator *tran = new QTranslator;
QTranslator *tranQt = new QTranslator;
-
- if (tran->load(QLocale() , QString("kylin-calculator") , QString("_") , tranPath)) {
+ if (tran->load(QLocale(), QString("kylin-calculator"), QString("_"), tranPath)) {
QApplication::installTranslator(tran);
} else {
qDebug() << "Waring : load translation file fail";
}
-
- if (tranQt->load(QLocale() , QString("qt") , QString("_") , tranQtPath)) {
+ if (tranQt->load(QLocale(), QString("qt"), QString("_"), tranQtPath)) {
QApplication::installTranslator(tranQt);
} else {
- qDebug() << "Load translations file" << QLocale() << "failed!";
+ qDebug() << "Waring : load qt translation file fail";
}
+ // 加载sdk控件翻译
+ QTranslator trans;
+ QString locale = QLocale::system().name();
+ if (locale == "zh_CN") {
+ if (trans.load(":/translations/gui_zh_CN.qm")) {
+ a.installTranslator(&trans);
+ }
+ } else if (locale == "bo_CN") {
+ if (trans.load(":/translations/gui_bo_CN.qm")) {
+ a.installTranslator(&trans);
+ }
+ }
+
/* 实例 */
LogicCenter::getInstance();
--
2.27.0

Binary file not shown.

Binary file not shown.

View File

@ -1,13 +1,12 @@
%define debug_package %{nil}
Name: kylin-calculator
Version: 1.0.34
Release: 4
Version: 1.1.0
Release: 1
Summary: Calculator tool for UKUI
License: LGPL-3.0-or-later and GPL-3.0-or-later
URL: http://www.ukui.org
Source0: %{name}-%{version}.tar.gz
Patch01: 0001-add-and-update-some-zangwen-translate.patch
Patch02: 0001-update-desktop-file-and-add-sdk-translate.patch
BuildRequires: qt5-qtbase-devel
BuildRequires: qtchooser
@ -18,7 +17,8 @@ BuildRequires: pkgconf
BuildRequires: gsl-devel
BuildRequires: qt5-qtx11extras-devel
BuildRequires: gsettings-qt-devel
BuildRequires: qt5-linguist
BuildRequires: gmp-devel
BuildRequires: ukui-interface
# Requires: NetworkManager
@ -31,8 +31,6 @@ BuildRequires: qt5-linguist
%prep
%setup -q
%patch01 -p1
%patch02 -p1
%build
%{qmake_qt5} %{_qt5_qmake_flags} CONFIG+=enable-by-default kylin-calculator.pro
@ -67,8 +65,12 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/glib-2.0/schemas/org.ukui.log4qt.kylin-calculator.gschema.xml
%{_datadir}/kylin-calculator/translations/kylin-calculator_zh_CN.qm
%{_datadir}/kylin-calculator/translations/kylin-calculator_bo_CN.qm
%{_datadir}/kylin-user-guide/data/guide/kylin-calculator/*
%changelog
* Mon Oct 24 2022 tanyulong <tanyulong@kylinos.cn> - 1.1.0-1
- update upstream version 1.1.0
* Tue Sep 27 2022 lvfei <lvfei@kylinos.cn> - 1.0.34-4
- Type:bugfix
- CVE: