From 3cb0a8f41c278849d6528183689242d20efce82f Mon Sep 17 00:00:00 2001 From: Matthew Jackson <1085847+MattJackson@users.noreply.github.com> Date: Fri, 17 Jul 2026 21:50:09 -0700 Subject: [PATCH] remove user-facing English from the library (KeyOrigin::name, hddvd Title) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Library holds ZERO user-facing English (CLAUDE.md). Removed KeyOrigin::name()'s English prose — apps map the typed enum (freemkv gets key_origin_label); diag logs the enum's Debug repr. hddvd unnamed-title fallback 'Title N' -> neutral TITLE_N identifier (UDF volume-label style). --- src/diag.rs | 2 +- src/disc/hddvd.rs | 4 +++- src/disc/mod.rs | 15 +++------------ 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/diag.rs b/src/diag.rs index 8c4ed1e..57ef041 100644 --- a/src/diag.rs +++ b/src/diag.rs @@ -530,7 +530,7 @@ fn dump_aacs(disc: &Disc) { a.bus_encryption, a.mkb_version, a.disc_hash, - a.key_source.name(), + a.key_source, a.vuk.is_some(), a.unit_keys.len(), a.uk_ro.len(), diff --git a/src/disc/hddvd.rs b/src/disc/hddvd.rs index 9252dc3..86de2fc 100644 --- a/src/disc/hddvd.rs +++ b/src/disc/hddvd.rs @@ -522,8 +522,10 @@ fn compose_xpl_titles( }) .collect(); titles.push(DiscTitle { + // Language-neutral identifier (no user-facing English in the library): + // matches the UDF `TITLE_*` volume-label style. Apps localize display. playlist: if t.name.is_empty() { - format!("Title {}", t.number) + format!("TITLE_{}", t.number) } else { t.name.clone() }, diff --git a/src/disc/mod.rs b/src/disc/mod.rs index 170ee82..05d482a 100644 --- a/src/disc/mod.rs +++ b/src/disc/mod.rs @@ -1440,18 +1440,9 @@ pub enum KeyOrigin { ExternalUk, } -impl KeyOrigin { - pub fn name(&self) -> &'static str { - match self { - KeyOrigin::DeviceKey => "MKB + device key", - KeyOrigin::ProcessingKey => "MKB + processing key", - KeyOrigin::KeyDbDerived => "KEYDB (derived)", - KeyOrigin::KeyDb => "KEYDB", - KeyOrigin::KeyDbUnitKeys => "KEYDB (unit keys)", - KeyOrigin::ExternalUk => "external UK", - } - } -} +// No `KeyOrigin::name()`: the library holds ZERO user-facing English (CLAUDE.md). +// `KeyOrigin` is a typed enum; applications map its variants to display text +// (see freemkv's `disc_info::key_origin_label`). // ─── Disc scanning ──────────────────────────────────────────────────────────