From afbdede88e859920fdc3182d72688c6e5f397601 Mon Sep 17 00:00:00 2001 From: Martin Ball Date: Sun, 1 Nov 2026 18:05:09 +0000 Subject: [PATCH] CP4.2: from_tag docs name ProofLang::Pack Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FypgCX8LsYYE8fsj4byBm2 --- crates/proof/src/lang.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/proof/src/lang.rs b/crates/proof/src/lang.rs index 5e8c88bc..e1b8f944 100644 --- a/crates/proof/src/lang.rs +++ b/crates/proof/src/lang.rs @@ -106,7 +106,8 @@ impl ProofLang { /// The proofing language of a BCP 47 tag (`pl-PL`, `en_GB`, `PL`…). The primary subtag /// counts, and for English and Spanish the region too ([`ProofLang::english`], /// [`ProofLang::spanish`]). No tag (or an empty one) is English, WordCraft's default editing - /// language. + /// language. Any other valid language tag is [`ProofLang::Pack`] with its [`PackLocale`]; + /// `x-none`, `und`, `zxx`, `mul`, `mis` and malformed tags are [`ProofLang::Other`]. pub fn from_tag(tag: Option<&str>) -> ProofLang { let Some(tag) = tag.map(str::trim).filter(|t| !t.is_empty()) else { return ProofLang::En }; let primary = tag.split(['-', '_']).next().unwrap_or("");