mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-03 16:41:26 +01:00
fix(gui): translate the tray's transfer status lines (B247)
This commit is contained in:
1 parent
7384d8e97d
commit
cc9db51b78
11 files changed
+3903
-3756
No files matched your search
@@ -109,7 +109,8 @@ fn sync_line(items: &[TransferItem], jobs: &[JobItem]) -> String {
|
|||||||
&[("title", &j.title), ("done", &done), ("total", &total)],
|
&[("title", &j.title), ("done", &done), ("total", &total)],
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Some(j) => format!("{}…", j.title),
|
// Translators: {title} names a running job whose size is not known yet.
|
||||||
|
Some(j) => gettext_f("{title}…", &[("title", &j.title)]),
|
||||||
None => String::new(),
|
None => String::new(),
|
||||||
},
|
},
|
||||||
[t] => {
|
[t] => {
|
||||||
@@ -118,10 +119,19 @@ fn sync_line(items: &[TransferItem], jobs: &[JobItem]) -> String {
|
|||||||
TransferDirection::Upload => "↑",
|
TransferDirection::Upload => "↑",
|
||||||
};
|
};
|
||||||
if t.bytes_total == 0 {
|
if t.bytes_total == 0 {
|
||||||
format!("{arrow} {}…", t.name)
|
// Translators: one transfer of unknown size; {arrow} is ↑ or ↓, {name} a file name.
|
||||||
|
gettext_f("{arrow} {name}…", &[("arrow", arrow), ("name", &t.name)])
|
||||||
} else {
|
} else {
|
||||||
let pct = (t.bytes_completed * 100 / t.bytes_total.max(1)).min(100);
|
let pct = (t.bytes_completed * 100 / t.bytes_total.max(1)).min(100);
|
||||||
format!("{arrow} {} ({pct}%)", t.name)
|
// Translators: one transfer; {arrow} is ↑ or ↓, {name} a file name, {percent} how much is done.
|
||||||
|
gettext_f(
|
||||||
|
"{arrow} {name} ({percent}%)",
|
||||||
|
&[
|
||||||
|
("arrow", arrow),
|
||||||
|
("name", &t.name),
|
||||||
|
("percent", &pct.to_string()),
|
||||||
|
],
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ a live account since.
|
|||||||
|
|
||||||
| Entry | Title |
|
| Entry | Title |
|
||||||
|---|---|
|
|---|---|
|
||||||
|
| [B247](#b247--tray-status-lines-are-not-translated) | Tray status lines are not translated |
|
||||||
| [B246](#b246--signing-in-with-a-locked-keyring-freezes-the-app-window) | Signing in with a locked keyring freezes the app window |
|
| [B246](#b246--signing-in-with-a-locked-keyring-freezes-the-app-window) | Signing in with a locked keyring freezes the app window |
|
||||||
| [B245](#b245--any-child-of-the-daemon-can-answer-the-watchdog-for-it) | Any child of the daemon can answer the watchdog for it |
|
| [B245](#b245--any-child-of-the-daemon-can-answer-the-watchdog-for-it) | Any child of the daemon can answer the watchdog for it |
|
||||||
| [B244](#b244--photos-without-a-sidecar-or-a-dated-name-are-filed-under-the-upload-day) | Photos without a sidecar or a dated name are filed under the upload day |
|
| [B244](#b244--photos-without-a-sidecar-or-a-dated-name-are-filed-under-the-upload-day) | Photos without a sidecar or a dated name are filed under the upload day |
|
||||||
@@ -349,6 +350,25 @@ a live account since.
|
|||||||
|
|
||||||
Newest first.
|
Newest first.
|
||||||
|
|
||||||
|
### B247 — Tray status lines are not translated
|
||||||
|
|
||||||
|
**Status:** Fixed, not verified live
|
||||||
|
**Found:** 2026-10-16, architecture audit (`FINDINGS.md` section 3, tray strings).
|
||||||
|
**Where:** `sync_line` in `crates/pdfs-gui/src/main.rs`
|
||||||
|
|
||||||
|
**Repro:** Run the tray in German or French while one file uploads. The tray's status line reads
|
||||||
|
`↑ report.pdf (45%)`, with the percent sign as English writes it.
|
||||||
|
|
||||||
|
**Cause.** Three status lines of the tray were built with `format!`, outside gettext, so no
|
||||||
|
language could adapt them.
|
||||||
|
|
||||||
|
**Fix.** They go through `gettext_f` and are translated in every catalog. German and French put
|
||||||
|
a space before the percent sign, as they already do for the storage quota.
|
||||||
|
|
||||||
|
**Test:** `msgfmt --check --statistics` on every catalog reports only translated messages.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### B246 — Signing in with a locked keyring freezes the app window
|
### B246 — Signing in with a locked keyring freezes the app window
|
||||||
|
|
||||||
**Status:** Fixed, not verified live
|
**Status:** Fixed, not verified live
|
||||||
|
|||||||
+430
-417
File diff suppressed because it is too large.
Load diff
+430
-417
File diff suppressed because it is too large.
Load diff
+430
-417
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user