Skip to content

Commit 82621b4

Browse files
committed
fix: 调整蓝牙文件传输通知的文案
调整蓝牙文件传输文件,适配新的通知UI Log: 调整蓝牙文件传输通知的文案 PMS: BUG-299605 Influence: notify
1 parent de33851 commit 82621b4

101 files changed

Lines changed: 2230 additions & 2227 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ pot:
132132
update-po:
133133
for po in misc/po/*.po; do \
134134
echo "Updating $$po..."; \
135-
msgmerge --update "$$po" misc/po/dde-daemon.pot; \
135+
msgmerge --update --no-fuzzy-matching "$$po" misc/po/dde-daemon.pot; \
136136
done
137137

138138
clean-po:

bluetooth1/obex_agent.go

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ var receiveBaseDir = userdir.Get(userdir.Download)
3838
type cancelReason uint32
3939

4040
const (
41-
_ cancelReason = iota
42-
CancelReasonExpired // The notification expired.
43-
CancelReasonDismiss // The notification was dismissed by the user.
44-
CancelReasonManual // The notification was closed by a call to CloseNotification.
45-
CancelReasonUndefined // Undefined/reserved reasons.
41+
_ cancelReason = iota
42+
CancelReasonExpired // The notification expired.
43+
CancelReasonDismiss // The notification was dismissed by the user.
44+
CancelReasonManual // The notification was closed by a call to CloseNotification.
45+
CancelReasonUndefined // Undefined/reserved reasons.
4646
)
4747

4848
func (c cancelReason) String() string {
@@ -217,8 +217,8 @@ func (a *obexAgent) isSessionAccepted(transfer *transferObj) (bool, error) {
217217

218218
accepted, err := a.requestReceive(transfer.deviceName, transfer.oriFilename)
219219
if err != nil || !accepted {
220-
return false, err
221-
}
220+
return false, err
221+
}
222222

223223
a.acceptedSessionsMu.Lock()
224224
if _, recheck := a.acceptedSessions[transfer.sessionPath]; !recheck {
@@ -239,7 +239,7 @@ func (a *obexAgent) isSessionAccepted(transfer *transferObj) (bool, error) {
239239
a.receiveChMu.Unlock()
240240

241241
if ch != nil {
242-
<- ch
242+
<-ch
243243
}
244244

245245
a.receiveProgress(transfer)
@@ -327,9 +327,9 @@ func (a *obexAgent) receiveProgress(transfer *transferObj) {
327327

328328
a.receiveChMu.Lock()
329329
select {
330-
case a.receiveCh <- struct{}{}:
331-
default:
332-
}
330+
case a.receiveCh <- struct{}{}:
331+
default:
332+
}
333333
a.receiveChMu.Unlock()
334334

335335
// 避免下个传输还没开始就被清空,导致需要重新询问,故加上一秒的延迟
@@ -349,7 +349,7 @@ func (a *obexAgent) receiveProgress(transfer *transferObj) {
349349

350350
var progress uint64 = math.MaxUint64
351351
err = transfer.Transferred().ConnectChanged(func(hasValue bool, value uint64) {
352-
if !hasValue || value == 0{
352+
if !hasValue || value == 0 {
353353
return
354354
}
355355

@@ -437,14 +437,17 @@ func (a *obexAgent) notifyProgress(notify notifications.Notifications, replaceID
437437
var err error
438438
if progress != 100 {
439439
actions = []string{"cancel", gettext.Tr("Cancel")}
440-
hints := map[string]dbus.Variant{"suppress-sound": dbus.MakeVariant(true)}
440+
hints := map[string]dbus.Variant{
441+
"suppress-sound": dbus.MakeVariant(true),
442+
"x-deepin-ShowInNotifyCenter": dbus.MakeVariant(false),
443+
}
441444

442445
notifyID, err = notify.Notify(0,
443446
gettext.Tr("dde-control-center"),
444447
replaceID,
445448
notifyIconBluetoothConnected,
446-
fmt.Sprintf(gettext.Tr("Receiving %[1]q from %[2]q"), filename, device),
447449
fmt.Sprintf("%d%%", progress),
450+
fmt.Sprintf(gettext.Tr("Receiving %[1]q"), filename),
448451
actions,
449452
hints,
450453
receiveFileNeverTimeout)
@@ -569,8 +572,8 @@ func (a *obexAgent) requestReceive(deviceName, filename string) (bool, error) {
569572
}
570573

571574
select {
572-
case a.cancelCh <- cancelReason(reason):
573-
default:
575+
case a.cancelCh <- cancelReason(reason):
576+
default:
574577
}
575578
})
576579
if err != nil {

misc/po/ady.po

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2026-01-13 09:49+0800\n"
11+
"POT-Creation-Date: 2026-02-03 14:27+0800\n"
1212
"PO-Revision-Date: 2020-05-29 07:18+0000\n"
1313
"Language-Team: Adyghe (https://app.transifex.com/linuxdeepin/teams/3617/"
1414
"ady/)\n"
@@ -49,7 +49,7 @@ msgstr ""
4949
msgid "Username must be between 3 and 32 characters"
5050
msgstr ""
5151

52-
#: ../../accounts1/manager.go:570
52+
#: ../../accounts1/manager.go:571
5353
#, c-format
5454
msgid "User \"%s\" existed before and its data is synced"
5555
msgstr ""
@@ -70,20 +70,20 @@ msgstr ""
7070
msgid "Audio Server changed, please log out and then log in"
7171
msgstr ""
7272

73-
#: ../../audio1/audio.go:343 ../../audio1/audio_events.go:707
74-
#: ../../bluetooth1/obex_agent.go:395 ../../bluetooth1/obex_agent.go:410
75-
#: ../../bluetooth1/obex_agent.go:437 ../../bluetooth1/obex_agent.go:474
76-
#: ../../bluetooth1/obex_agent.go:529 ../../bluetooth1/utils_notify.go:77
73+
#: ../../audio1/audio.go:343 ../../audio1/audio_events.go:719
74+
#: ../../bluetooth1/obex_agent.go:443 ../../bluetooth1/obex_agent.go:458
75+
#: ../../bluetooth1/obex_agent.go:485 ../../bluetooth1/obex_agent.go:530
76+
#: ../../bluetooth1/obex_agent.go:609 ../../bluetooth1/utils_notify.go:77
7777
#: ../../bluetooth1/utils_notify.go:143
7878
msgid "dde-control-center"
7979
msgstr ""
8080

81-
#: ../../audio1/audio_events.go:701
81+
#: ../../audio1/audio_events.go:713
8282
#, c-format
8383
msgid "%s had been disabled"
8484
msgstr ""
8585

86-
#: ../../audio1/audio_events.go:702
86+
#: ../../audio1/audio_events.go:714
8787
msgid "Open"
8888
msgstr ""
8989

@@ -147,57 +147,57 @@ msgstr ""
147147
msgid "Message notification"
148148
msgstr ""
149149

150-
#: ../../bluetooth1/obex_agent.go:391 ../../bluetooth1/utils_notify.go:130
150+
#: ../../bluetooth1/obex_agent.go:439 ../../bluetooth1/utils_notify.go:130
151151
msgid "Cancel"
152152
msgstr ""
153153

154-
#: ../../bluetooth1/obex_agent.go:398
155-
msgid "Receiving %[1]q from %[2]q"
154+
#: ../../bluetooth1/obex_agent.go:447
155+
msgid "Receiving %[1]q"
156156
msgstr ""
157157

158-
#: ../../bluetooth1/obex_agent.go:407
158+
#: ../../bluetooth1/obex_agent.go:455
159159
msgid "View"
160160
msgstr ""
161161

162-
#: ../../bluetooth1/obex_agent.go:413
162+
#: ../../bluetooth1/obex_agent.go:461
163163
msgid "You have received files from %q successfully"
164164
msgstr ""
165165

166-
#: ../../bluetooth1/obex_agent.go:414
166+
#: ../../bluetooth1/obex_agent.go:462
167167
msgid "Done"
168168
msgstr ""
169169

170-
#: ../../bluetooth1/obex_agent.go:429 ../../bluetooth1/obex_agent.go:532
170+
#: ../../bluetooth1/obex_agent.go:477 ../../bluetooth1/obex_agent.go:612
171171
msgid "Stop Receiving Files"
172172
msgstr ""
173173

174-
#: ../../bluetooth1/obex_agent.go:431
174+
#: ../../bluetooth1/obex_agent.go:479
175175
msgid "You have cancelled the file transfer"
176176
msgstr ""
177177

178-
#: ../../bluetooth1/obex_agent.go:433
178+
#: ../../bluetooth1/obex_agent.go:481
179179
#: ../../system/bluetooth1/utils_notify.go:63
180180
#: ../../system/bluetooth1/utils_notify.go:72
181181
msgid "Bluetooth connection failed"
182182
msgstr ""
183183

184-
#: ../../bluetooth1/obex_agent.go:472
184+
#: ../../bluetooth1/obex_agent.go:527
185185
msgid "Decline"
186186
msgstr ""
187187

188-
#: ../../bluetooth1/obex_agent.go:472
188+
#: ../../bluetooth1/obex_agent.go:527
189189
msgid "Receive"
190190
msgstr ""
191191

192-
#: ../../bluetooth1/obex_agent.go:477
192+
#: ../../bluetooth1/obex_agent.go:533
193193
msgid "Bluetooth File Transfer"
194194
msgstr ""
195195

196-
#: ../../bluetooth1/obex_agent.go:478
196+
#: ../../bluetooth1/obex_agent.go:534
197197
msgid "%q wants to send files to you. Receive?"
198198
msgstr ""
199199

200-
#: ../../bluetooth1/obex_agent.go:533
200+
#: ../../bluetooth1/obex_agent.go:613
201201
msgid "Receiving %q timed out"
202202
msgstr ""
203203

misc/po/af.po

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ msgid ""
1212
msgstr ""
1313
"Project-Id-Version: PACKAGE VERSION\n"
1414
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2026-01-13 09:49+0800\n"
15+
"POT-Creation-Date: 2026-02-03 14:27+0800\n"
1616
"PO-Revision-Date: 2020-05-29 07:18+0000\n"
1717
"Last-Translator: deepiner, 2021\n"
1818
"Language-Team: Afrikaans (https://app.transifex.com/linuxdeepin/teams/3617/"
@@ -54,7 +54,7 @@ msgstr ""
5454
msgid "Username must be between 3 and 32 characters"
5555
msgstr ""
5656

57-
#: ../../accounts1/manager.go:570
57+
#: ../../accounts1/manager.go:571
5858
#, c-format
5959
msgid "User \"%s\" existed before and its data is synced"
6060
msgstr ""
@@ -75,20 +75,20 @@ msgstr ""
7575
msgid "Audio Server changed, please log out and then log in"
7676
msgstr ""
7777

78-
#: ../../audio1/audio.go:343 ../../audio1/audio_events.go:707
79-
#: ../../bluetooth1/obex_agent.go:395 ../../bluetooth1/obex_agent.go:410
80-
#: ../../bluetooth1/obex_agent.go:437 ../../bluetooth1/obex_agent.go:474
81-
#: ../../bluetooth1/obex_agent.go:529 ../../bluetooth1/utils_notify.go:77
78+
#: ../../audio1/audio.go:343 ../../audio1/audio_events.go:719
79+
#: ../../bluetooth1/obex_agent.go:443 ../../bluetooth1/obex_agent.go:458
80+
#: ../../bluetooth1/obex_agent.go:485 ../../bluetooth1/obex_agent.go:530
81+
#: ../../bluetooth1/obex_agent.go:609 ../../bluetooth1/utils_notify.go:77
8282
#: ../../bluetooth1/utils_notify.go:143
8383
msgid "dde-control-center"
8484
msgstr ""
8585

86-
#: ../../audio1/audio_events.go:701
86+
#: ../../audio1/audio_events.go:713
8787
#, c-format
8888
msgid "%s had been disabled"
8989
msgstr ""
9090

91-
#: ../../audio1/audio_events.go:702
91+
#: ../../audio1/audio_events.go:714
9292
msgid "Open"
9393
msgstr "Oop"
9494

@@ -152,57 +152,57 @@ msgstr "Boodskap toegang"
152152
msgid "Message notification"
153153
msgstr "Boodskap kennisgewing"
154154

155-
#: ../../bluetooth1/obex_agent.go:391 ../../bluetooth1/utils_notify.go:130
155+
#: ../../bluetooth1/obex_agent.go:439 ../../bluetooth1/utils_notify.go:130
156156
msgid "Cancel"
157157
msgstr "Kanselleer"
158158

159-
#: ../../bluetooth1/obex_agent.go:398
160-
msgid "Receiving %[1]q from %[2]q"
159+
#: ../../bluetooth1/obex_agent.go:447
160+
msgid "Receiving %[1]q"
161161
msgstr ""
162162

163-
#: ../../bluetooth1/obex_agent.go:407
163+
#: ../../bluetooth1/obex_agent.go:455
164164
msgid "View"
165165
msgstr ""
166166

167-
#: ../../bluetooth1/obex_agent.go:413
167+
#: ../../bluetooth1/obex_agent.go:461
168168
msgid "You have received files from %q successfully"
169169
msgstr ""
170170

171-
#: ../../bluetooth1/obex_agent.go:414
171+
#: ../../bluetooth1/obex_agent.go:462
172172
msgid "Done"
173173
msgstr "Gedoen"
174174

175-
#: ../../bluetooth1/obex_agent.go:429 ../../bluetooth1/obex_agent.go:532
175+
#: ../../bluetooth1/obex_agent.go:477 ../../bluetooth1/obex_agent.go:612
176176
msgid "Stop Receiving Files"
177177
msgstr ""
178178

179-
#: ../../bluetooth1/obex_agent.go:431
179+
#: ../../bluetooth1/obex_agent.go:479
180180
msgid "You have cancelled the file transfer"
181181
msgstr ""
182182

183-
#: ../../bluetooth1/obex_agent.go:433
183+
#: ../../bluetooth1/obex_agent.go:481
184184
#: ../../system/bluetooth1/utils_notify.go:63
185185
#: ../../system/bluetooth1/utils_notify.go:72
186186
msgid "Bluetooth connection failed"
187187
msgstr ""
188188

189-
#: ../../bluetooth1/obex_agent.go:472
189+
#: ../../bluetooth1/obex_agent.go:527
190190
msgid "Decline"
191191
msgstr ""
192192

193-
#: ../../bluetooth1/obex_agent.go:472
193+
#: ../../bluetooth1/obex_agent.go:527
194194
msgid "Receive"
195195
msgstr ""
196196

197-
#: ../../bluetooth1/obex_agent.go:477
197+
#: ../../bluetooth1/obex_agent.go:533
198198
msgid "Bluetooth File Transfer"
199199
msgstr ""
200200

201-
#: ../../bluetooth1/obex_agent.go:478
201+
#: ../../bluetooth1/obex_agent.go:534
202202
msgid "%q wants to send files to you. Receive?"
203203
msgstr ""
204204

205-
#: ../../bluetooth1/obex_agent.go:533
205+
#: ../../bluetooth1/obex_agent.go:613
206206
msgid "Receiving %q timed out"
207207
msgstr ""
208208

0 commit comments

Comments
 (0)