The PDF/A panel reports its own checks, not conformance (#6302)

Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
This commit is contained in:
eliets2andeliets2 authored and GitHub committed 2026-11-05 20:11:05 +01:00
1 parent b1c1dbdad3
commit 9ff881e533
1 file changed
+22 -2
+22 -2
View File
@@ -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}");
}
}
}