From 9ff881e533be68ae1a9f8d556dea79d6df39a30a Mon Sep 17 00:00:00 2001 From: eliets2 Date: Thu, 5 Nov 2026 21:11:05 +0200 Subject: [PATCH] The PDF/A panel reports its own checks, not conformance (#6302) Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com> --- crates/ui-egui/src/dialogs/standards_ui.rs | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/dialogs/standards_ui.rs b/crates/ui-egui/src/dialogs/standards_ui.rs index 11c0d1fd50..de6052b05c 100644 --- a/crates/ui-egui/src/dialogs/standards_ui.rs +++ b/crates/ui-egui/src/dialogs/standards_ui.rs @@ -35,7 +35,10 @@ impl PdfCraftApp { self.pdfa_verify(); let left = self.pdfa.issues.as_ref().map_or(0, Vec::len); self.notify(if left == 0 { - crate::i18n::fmt(tl!("The document now conforms to {level}; save it to keep the changes"), &[("level", level.label())]) + crate::i18n::fmt( + tl!("PdfCraft's checks now find no problems for {level}. This is not a validator result. Save to keep the changes."), + &[("level", level.label())], + ) } else if left == 1 { crate::i18n::fmt(tl!("Fixed what could be fixed; 1 problem remains"), &[]) } else { @@ -91,7 +94,10 @@ pub(crate) fn body(ui: &mut egui::Ui, app: &mut PdfCraftApp, t: &Tokens) -> bool ui.label(egui::RichText::new(tl!("Verify to see what the document needs.")).color(t.text_muted)); } Some(v) if v.is_empty() => { - ui.label(crate::i18n::fmt(tl!("No problems found: the document conforms to {level}."), &[("level", app.pdfa.level.label())])); + ui.label(crate::i18n::fmt( + tl!("PdfCraft's checks found no problems for {level}. This is not a validator result."), + &[("level", app.pdfa.level.label())], + )); } Some(v) => { for i in v { @@ -129,3 +135,17 @@ pub(crate) fn body(ui: &mut egui::Ui, app: &mut PdfCraftApp, t: &Tokens) -> bool } close } + +#[cfg(test)] +mod wording_tests { + /// The Standards panel reports what PdfCraft's own checks found; only a run of an external + /// validator can state the stronger thing, and none is recorded here. + #[test] + fn no_standards_panel_wording_claims_conformance() { + let source = include_str!("standards_ui.rs"); + // Built in pieces so that this file does not match itself. + for phrase in [concat!("conform", "s to"), concat!("now ", "conforms")] { + assert!(!source.contains(phrase), "a standards message makes a claim only a validator run can make: {phrase}"); + } + } +}