From aa96eecc7911e15f780f89cd7774c961882b92ed Mon Sep 17 00:00:00 2001 From: Jared Wolff Date: Thu, 5 Mar 2026 12:53:15 -0500 Subject: [PATCH] fix: restore locales_path after removing embed-assets commit The embed-assets commit made locales_path optional, and main.rs was updated to pass None. Removing that commit restored the PathBuf signature but left main.rs passing None. Restore the original locales_path initialization. --- src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 15796d87..cb6fbf5f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,7 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; use std::net::SocketAddr; +use std::path::PathBuf; use std::sync::Arc; use std::time::Duration; @@ -89,8 +90,14 @@ async fn main() -> Result<(), Box> { None }; + // Ensure locales directory exists for i18n + let locales_path = PathBuf::from("./static/locales"); + if !locales_path.exists() { + std::fs::create_dir_all(&locales_path).expect("Failed to create locales directory"); + } + // Build all services via the factory - let factory = AppServiceFactory::with_config(storage_path, None, config.clone()); + let factory = AppServiceFactory::with_config(storage_path, locales_path, config.clone()); let app_state = factory.build_app_state(db_pools).await .expect("Failed to build application state. If running in Docker, ensure the storage volume is writable by the oxicloud user (UID 1001)");