Translate the spooled sheet count in print confirmations

Fixes #3317

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
NetterSilver
2026-10-20 21:14:01 +02:00
co-authored by Claude Haiku 5.5
parent d1b0bfc3f9
commit c2fa8763e3
24 changed files with 41 additions and 0 deletions
+1
View File
@@ -2598,6 +2598,7 @@
Submitting print job… Изпращане на задание за печат…
Print job submitted. Заданието за печат е изпратено.
Print job submitted: {receipt} Заданието за печат е изпратено: {receipt}
Print job submitted: spooled {count} sheet(s) Заданието за печат е изпратено: подадени {count} листа към спулера
Print failed: the printing worker stopped. Печатът е неуспешен: процесът на печат спря.
Print settings Настройки за печат
Submit print job Изпращане на задание за печат
Can't render this file because it contains an unexpected character in line 7 and column 25.
+1
View File
@@ -2601,6 +2601,7 @@ preview Title Ukázka
Submitting print job… Odesílání tiskové úlohy…
Print job submitted. Tisková úloha odeslána.
Print job submitted: {receipt} Tisková úloha odeslána: {receipt}
Print job submitted: spooled {count} sheet(s) Tisková úloha odeslána: do tiskové fronty předáno listů: {count}
Print failed: the printing worker stopped. Tisk se nezdařil: proces tisku se zastavil.
Print settings Nastavení tisku
Submit print job Odeslat tiskovou úlohu
Can't render this file because it contains an unexpected character in line 7 and column 25.
+1
View File
@@ -2215,6 +2215,7 @@
Submitting print job… Druckauftrag wird gesendet…
Print job submitted. Druckauftrag gesendet.
Print job submitted: {receipt} Druckauftrag gesendet: {receipt}
Print job submitted: spooled {count} sheet(s) Druckauftrag gesendet: {count} Blatt an den Spooler übergeben
Print failed: the printing worker stopped. Drucken fehlgeschlagen: Der Druckvorgang wurde angehalten.
Print settings Druckeinstellungen
Submit print job Druckauftrag senden
Can't render this file because it contains an unexpected character in line 6 and column 25.
+1
View File
@@ -2582,6 +2582,7 @@ preview Title Título
Submitting print job… Enviando trabajo de impresión…
Print job submitted. Trabajo de impresión enviado.
Print job submitted: {receipt} Trabajo de impresión enviado: {receipt}
Print job submitted: spooled {count} sheet(s) Trabajo de impresión enviado: {count} hoja(s) en cola de impresión
Print failed: the printing worker stopped. La impresión falló: el proceso de impresión se detuvo.
Print settings Configuración de impresión
Submit print job Enviar trabajo de impresión
Can't render this file because it contains an unexpected character in line 6 and column 25.
+1
View File
@@ -2250,6 +2250,7 @@
Submitting print job… Prinditöö saatmine…
Print job submitted. Prinditöö saadetud.
Print job submitted: {receipt} Prinditöö saadetud: {receipt}
Print job submitted: spooled {count} sheet(s) Printimistöö saadetud: prindijärjekorda lisati lehti: {count}
Print failed: the printing worker stopped. Printimine nurjus: printimisprotsess peatus.
Print settings Printimisseaded
Submit print job Saada prinditöö
Can't render this file because it contains an unexpected character in line 847 and column 23.
+1
View File
@@ -2223,6 +2223,7 @@
Submitting print job… Envoi du travail d'impression…
Print job submitted. Travail d'impression envoyé.
Print job submitted: {receipt} Travail d'impression envoyé : {receipt}
Print job submitted: spooled {count} sheet(s) Travail d’impression envoyé : {count} feuille(s) mise(s) en file d’attente
Print failed: the printing worker stopped. L'impression a échoué : le processus d'impression s'est arrêté.
Print settings Paramètres d'impression
Submit print job Envoyer le travail d'impression
Can't render this file because it contains an unexpected character in line 7 and column 25.
+1
View File
@@ -1672,6 +1672,7 @@ template Letter Pismo
Print failed: {error} Ispis nije uspio: {error}
Print job submitted. Zadatak ispisa je poslan.
Print job submitted: {receipt} Zadatak ispisa je poslan: {receipt}
Print job submitted: spooled {count} sheet(s) Zadatak ispisa je poslan: u red za ispis poslano listova: {count}
Print the page color Ispiši boju stranice
Print to PDF Ispiši u PDF
Print\nLayout Izgled\nispisa
Can't render this file because it contains an unexpected character in line 6 and column 25.
+1
View File
@@ -2605,6 +2605,7 @@
Submitting print job… Nyomtatási feladat küldése…
Print job submitted. Nyomtatási feladat elküldve.
Print job submitted: {receipt} Nyomtatási feladat elküldve: {receipt}
Print job submitted: spooled {count} sheet(s) A nyomtatási feladat elküldve: {count} lap a nyomtatási sorba került
Print failed: the printing worker stopped. A nyomtatás sikertelen: a nyomtatási folyamat leállt.
Print settings Nyomtatási beállítások
Submit print job Nyomtatási feladat küldése
Can't render this file because it contains an unexpected character in line 6 and column 25.
+1
View File
@@ -2592,6 +2592,7 @@ preview Title Esempio
Submitting print job… Invio del lavoro di stampa in corso…
Print job submitted. Lavoro di stampa inviato.
Print job submitted: {receipt} Lavoro di stampa inviato: {receipt}
Print job submitted: spooled {count} sheet(s) Lavoro di stampa inviato: {count} foglio/i messo/i in coda
Print failed: the printing worker stopped. Stampa non riuscita: il processo di stampa si è interrotto.
Print settings Impostazioni di stampa
Submit print job Invia lavoro di stampa
Can't render this file because it contains an unexpected character in line 6 and column 25.
+1
View File
@@ -2216,6 +2216,7 @@
Submitting print job… 印刷ジョブを送信しています…
Print job submitted. 印刷ジョブを送信しました。
Print job submitted: {receipt} 印刷ジョブを送信しました:{receipt}
Print job submitted: spooled {count} sheet(s) 印刷ジョブを送信しました: {count} 枚をスプールしました
Print failed: the printing worker stopped. 印刷に失敗しました:印刷ワーカーが停止しました。
Print settings 印刷設定
Submit print job 印刷ジョブの送信
Can't render this file because it contains an unexpected character in line 925 and column 23.
+1
View File
@@ -1097,6 +1097,7 @@
Submitting print job… 인쇄 작업 전송 중…
Print job submitted. 인쇄 작업을 전송했습니다.
Print job submitted: {receipt} 인쇄 작업을 전송했습니다: {receipt}
Print job submitted: spooled {count} sheet(s) 인쇄 작업을 보냈습니다: {count}장을 스풀했습니다
Print failed: the printing worker stopped. 인쇄 실패: 인쇄 작업자가 중지되었습니다.
Couldn't open {path}: {error} {path}을(를) 열 수 없습니다: {error}
Column Selection 열 선택
Can't render this file because it contains an unexpected character in line 931 and column 23.
+1
View File
@@ -2616,6 +2616,7 @@ preview Title Tytuł
Submitting print job… Wysyłanie zadania drukowania…
Print job submitted. Zadanie drukowania wysłane.
Print job submitted: {receipt} Zadanie drukowania wysłane: {receipt}
Print job submitted: spooled {count} sheet(s) Zadanie drukowania wysłane: liczba arkuszy przekazanych do spoolera: {count}
Print failed: the printing worker stopped. Drukowanie nie powiodło się: proces drukowania został zatrzymany.
Print settings Ustawienia drukowania
Submit print job Wyślij zadanie drukowania
Can't render this file because it contains an unexpected character in line 6 and column 25.
+1
View File
@@ -2228,6 +2228,7 @@
Submitting print job… Enviando trabalho de impressão…
Print job submitted. Trabalho de impressão enviado.
Print job submitted: {receipt} Trabalho de impressão enviado: {receipt}
Print job submitted: spooled {count} sheet(s) Trabalho de impressão enviado: {count} folha(s) na fila de impressão
Print failed: the printing worker stopped. A impressão falhou: o processo de impressão parou.
Print settings Configurações de impressão
Submit print job Enviar trabalho de impressão
Can't render this file because it contains an unexpected character in line 6 and column 25.
+1
View File
@@ -2607,6 +2607,7 @@ preview Title Пример
Submitting print job… Отправка задания на печать…
Print job submitted. Задание на печать отправлено.
Print job submitted: {receipt} Задание на печать отправлено: {receipt}
Print job submitted: spooled {count} sheet(s) Задание печати отправлено: в очередь передано листов: {count}
Print failed: the printing worker stopped. Печать не удалась: процесс печати остановлен.
Print settings Параметры печати
Submit print job Отправить задание на печать
Can't render this file because it contains an unexpected character in line 7 and column 25.
+1
View File
@@ -2226,6 +2226,7 @@
Submitting print job… Slanje zadatka za štampanje…
Print job submitted. Zadatak za štampanje je poslat.
Print job submitted: {receipt} Zadatak za štampanje je poslat: {receipt}
Print job submitted: spooled {count} sheet(s) Zadatak za štampu je poslat: u red za štampu poslato listova: {count}
Print failed: the printing worker stopped. Štampanje nije uspelo: proces štampanja je zaustavljen.
Print settings Podešavanja štampanja
Submit print job Pošalji zadatak za štampanje
Can't render this file because it contains an unexpected character in line 6 and column 25.
+1
View File
@@ -2230,6 +2230,7 @@
Submitting print job… Слање задатка за штампање…
Print job submitted. Задатак за штампање је послат.
Print job submitted: {receipt} Задатак за штампање је послат: {receipt}
Print job submitted: spooled {count} sheet(s) Задатак за штампу је послат: у ред за штампу послато листова: {count}
Print failed: the printing worker stopped. Штампање није успело: процес штампања је заустављен.
Print settings Подешавања штампања
Submit print job Пошаљи задатак за штампање
Can't render this file because it contains an unexpected character in line 11 and column 25.
+1
View File
@@ -2529,6 +2529,7 @@ preview Title Titel
Submitting print job… Skickar utskriften…
Print job submitted. Utskriften har skickats.
Print job submitted: {receipt} Utskriften har skickats: {receipt}
Print job submitted: spooled {count} sheet(s) Utskriftsjobbet skickades: {count} ark lades i utskriftskön
Print failed: the printing worker stopped. Utskriften misslyckades: utskriftsprocessen avbröts.
Wait for the print job to finish submitting before closing. Vänta tills utskriften har skickats innan du stänger.
Find “{text}” in the document Sök efter ”{text}” i dokumentet
Can't render this file because it contains an unexpected character in line 7 and column 25.
+8
View File
@@ -1560,3 +1560,11 @@ fn bundled_interface_fonts_cover_vietnamese_letters() {
}
assert!(!lang("vi").uses_cjk());
}
/// #3317: the spooler's English receipt is not spliced into a translated sentence.
#[test]
fn spooled_print_receipt_is_translated() {
let german = lang("de");
let msg = crate::printing::feedback(&crate::printing::Feedback::Submitted("spooled 2 sheet(s)".into()), |s| tr(german, s).to_owned());
assert_eq!(msg, "Druckauftrag gesendet: 2 Blatt an den Spooler übergeben");
}
+1
View File
@@ -2606,6 +2606,7 @@ preview Title Örnek
Submitting print job… Yazdırma işi gönderiliyor…
Print job submitted. Yazdırma işi gönderildi.
Print job submitted: {receipt} Yazdırma işi gönderildi: {receipt}
Print job submitted: spooled {count} sheet(s) Yazdırma işi gönderildi: {count} sayfa kuyruğa alındı
Print failed: the printing worker stopped. Yazdırma başarısız oldu: yazdırma işlemi durdu.
Print settings Yazdırma ayarları
Submit print job Yazdırma işini gönder
Can't render this file because it contains an unexpected character in line 799 and column 23.
+1
View File
@@ -2228,6 +2228,7 @@
Submitting print job… Надсилання завдання на друк…
Print job submitted. Завдання на друк надіслано.
Print job submitted: {receipt} Завдання на друк надіслано: {receipt}
Print job submitted: spooled {count} sheet(s) Завдання друку надіслано: у чергу передано аркушів: {count}
Print failed: the printing worker stopped. Друк не вдався: процес друку зупинився.
Print settings Параметри друку
Submit print job Надіслати завдання на друк
Can't render this file because it contains an unexpected character in line 6 and column 31.
+1
View File
@@ -2552,6 +2552,7 @@
Submitting print job… Đang gửi lệnh in…
Print job submitted. Đã gửi lệnh in.
Print job submitted: {receipt} Đã gửi lệnh in: {receipt}
Print job submitted: spooled {count} sheet(s) Đã gửi lệnh in: đã đưa {count} tờ vào hàng đợi
Print failed: the printing worker stopped. In thất bại: tiến trình in đã dừng.
Print settings Cài đặt in
Submit print job Gửi lệnh in
Can't render this file because it contains an unexpected character in line 7 and column 25.
+1
View File
@@ -2228,6 +2228,7 @@
Submitting print job… 正在提交打印作业…
Print job submitted. 打印作业已提交。
Print job submitted: {receipt} 打印作业已提交:{receipt}
Print job submitted: spooled {count} sheet(s) 打印作业已发送:已将 {count} 张纸送入后台处理
Print failed: the printing worker stopped. 打印失败:打印工作线程已停止。
Print settings 打印设置
Submit print job 提交打印作业
Can't render this file because it contains an unexpected character in line 7 and column 25.
+1
View File
@@ -2217,6 +2217,7 @@
Submitting print job… 正在提交列印工作…
Print job submitted. 列印工作已提交。
Print job submitted: {receipt} 列印工作已提交:{receipt}
Print job submitted: spooled {count} sheet(s) 列印工作已傳送:已將 {count} 張紙送入背景處理
Print failed: the printing worker stopped. 列印失敗:列印工作執行緒已停止。
Print settings 列印設定
Submit print job 提交列印工作
Can't render this file because it contains an unexpected character in line 926 and column 23.
+11
View File
@@ -101,6 +101,13 @@ pub fn settings(state: &mut State, params: &serde_json::Value, discover: Option<
}))
}
const SPOOLED: &str = "Print job submitted: spooled {count} sheet(s)";
/// The sheet count of the Windows backend's English receipt `spooled N sheet(s)`.
fn spooled_sheets(receipt: &str) -> Option<usize> {
receipt.trim().strip_prefix("spooled ")?.strip_suffix(" sheet(s)")?.parse().ok()
}
pub fn feedback(message: &Feedback, translate: impl Fn(&str) -> String) -> String {
match message {
Feedback::FindingPrinters => translate("Finding printers…"),
@@ -108,6 +115,10 @@ pub fn feedback(message: &Feedback, translate: impl Fn(&str) -> String) -> Strin
Feedback::DiscoveryFailed => translate("Printer discovery failed."),
Feedback::Submitting => translate("Submitting print job…"),
Feedback::Submitted(receipt) if receipt.trim().is_empty() => translate("Print job submitted."),
Feedback::Submitted(receipt) if spooled_sheets(receipt).is_some_and(|_| translate(SPOOLED) != SPOOLED) => {
let count = spooled_sheets(receipt).unwrap_or_default();
translate(SPOOLED).replace("{count}", &count.to_string())
}
Feedback::Submitted(receipt) => translate("Print job submitted: {receipt}").replace("{receipt}", receipt),
Feedback::Failed(error) => translate("Print failed: {error}").replace("{error}", error),
Feedback::WorkerStopped => translate("Print failed: the printing worker stopped."),