zeroclaw-labs/zeroclaw · error · anyhow::Error
locale '{locale}' is not in the locales.toml registry; known
Error message
locale '{locale}' is not in the locales.toml registry; known: {} What it means
Error "locale '{locale}' is not in the locales.toml registry; known: {}" thrown in zeroclaw-labs/zeroclaw.
Source
Thrown at src/main.rs:3304
cmd = cmd.mut_subcommand(name, |sub| apply_cmd_translations(sub, &child_prefix));
}
cmd
}
#[cfg(feature = "agent-runtime")]
fn validated_locale(locale: &str) -> Result<String> {
let ok_shape = !locale.is_empty()
&& locale.len() <= 16
&& locale
.chars()
.all(|c| c.is_ascii_alphanumeric() || c == '-');
if !ok_shape {
bail!("invalid locale code '{locale}'");
}
let known = zeroclaw_runtime::i18n::available_locales();
if !known.iter().any(|o| o.code == locale) {
let codes: Vec<&str> = known.iter().map(|o| o.code.as_str()).collect();
bail!(
"locale '{locale}' is not in the locales.toml registry; known: {}",
codes.join(", ")
);
}
Ok(locale.to_string())
}
#[cfg(feature = "agent-runtime")]
async fn fetch_locales(locale: &str, catalog: Option<&str>) -> Result<()> {
let locale = validated_locale(locale)?;
let selected: Vec<&(&str, &str, &str)> = match catalog {
None => zeroclaw_config::schema::FTL_CATALOGS.iter().collect(),
Some(list) => {
let names: Vec<&str> = list
.split(',')
.map(str::trim)
.filter(|s| !s.is_empty())View on GitHub (pinned to 88bb9c8533)
Solutions
- Choose one of the known locales printed in the error message.
- Add the locale to locales.toml registry first if you intend to introduce a new one.
When it happens
Trigger: Thrown at src/main.rs:3304 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/10f164c3bfad0e96.
Report an issue: GitHub.