From a88fccb349f2e97fbb7368b16ff6e5cb1d56557e Mon Sep 17 00:00:00 2001 From: Matthew Zeng Date: Thu, 19 Mar 2026 10:14:50 -0700 Subject: [PATCH] update --- codex-rs/i18n/src/lib.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/codex-rs/i18n/src/lib.rs b/codex-rs/i18n/src/lib.rs index 2963e17103..8117646836 100644 --- a/codex-rs/i18n/src/lib.rs +++ b/codex-rs/i18n/src/lib.rs @@ -234,7 +234,16 @@ fn load_locale_resources() -> io::Result { } fn resolve_locales_dir() -> io::Result { - codex_utils_cargo_bin::find_resource!(LOCALES_DIR) + let runfile_path = codex_utils_cargo_bin::find_resource!(LOCALES_DIR); + let source_path = Path::new(env!("CARGO_MANIFEST_DIR")).join(LOCALES_DIR); + + match runfile_path { + Ok(path) if path.exists() => Ok(path), + Ok(_) if source_path.exists() => Ok(source_path), + Ok(path) => Ok(path), + Err(_) if source_path.exists() => Ok(source_path), + Err(err) => Err(err), + } } fn load_bundle(