Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F107343
D182.1730866500.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D182.1730866500.diff
View Options
diff --git a/src/contents/ui/KazvIOMenu.qml b/src/contents/ui/KazvIOMenu.qml
--- a/src/contents/ui/KazvIOMenu.qml
+++ b/src/contents/ui/KazvIOMenu.qml
@@ -19,6 +19,8 @@
required property var jobId
required property bool isUpload
+ property var progress: kazvIOJob ? kazvIOJob.progress : 0
+
visible: kazvIOJob ? true : false
onKazvIOJobChanged: {
@@ -81,7 +83,12 @@
id: progressBar
objectName: 'progressBar'
Layout.fillWidth: true
- value: kazvIOJob ? kazvIOJob.progress : 0
+ value: progress
+ }
+ Label {
+ id: progressLabel
+ objectName: 'progressText'
+ text: l10n.get("kazv-io-progress", { progress: Math.floor(progress * 100) })
}
Kirigami.Action {
id: pauseAction
diff --git a/src/l10n/cmn-Hans/100-ui.ftl b/src/l10n/cmn-Hans/100-ui.ftl
--- a/src/l10n/cmn-Hans/100-ui.ftl
+++ b/src/l10n/cmn-Hans/100-ui.ftl
@@ -263,6 +263,7 @@
kazv-io-pause = 暂停
kazv-io-resume = 继续
kazv-io-cancel = 取消
+kazv-io-progress = { $progress }/100
create-room-page-title = 创建房间
create-room-page-visibility-prompt = 房间可见性:
diff --git a/src/l10n/en/100-ui.ftl b/src/l10n/en/100-ui.ftl
--- a/src/l10n/en/100-ui.ftl
+++ b/src/l10n/en/100-ui.ftl
@@ -285,6 +285,7 @@
kazv-io-pause = Pause
kazv-io-resume = Resume
kazv-io-cancel = Cancel
+kazv-io-progress = { $progress }/100
create-room-page-title = Create room
create-room-page-type-prompt = Room type:
diff --git a/src/tests/quick-tests/tst_KazvIOMenu.qml b/src/tests/quick-tests/tst_KazvIOMenu.qml
--- a/src/tests/quick-tests/tst_KazvIOMenu.qml
+++ b/src/tests/quick-tests/tst_KazvIOMenu.qml
@@ -64,9 +64,14 @@
function test_progress() {
progressBar.kazvIOJob = kazvIOJob;
const progress = findChild(progressBar, 'progressBar');
+ const progressText = findChild(progressBar, 'progressText');
compare(progress.value, kazvIOJob.progress);
+ compare(progressText.text, l10n.get("kazv-io-progress", {
+ progress: Math.floor(kazvIOJob.progress * 100)}));
kazvIOJob.progress = Math.random();
compare(progress.value, kazvIOJob.progress);
+ compare(progressText.text, l10n.get("kazv-io-progress", {
+ progress: Math.floor(kazvIOJob.progress * 100)}));
}
function test_progressBarNullJob() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 5, 8:15 PM (21 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35203
Default Alt Text
D182.1730866500.diff (2 KB)
Attached To
Mode
D182: Add progress text for download and upload and relevant test
Attached
Detach File
Event Timeline
Log In to Comment