Add a compile-time i18n system with 270 translation keys across 5 locales (EN, DE, FR, ES, PT). Translations are embedded via include_str! and parsed lazily into flat HashMaps with English fallback for missing keys. - Add src/i18n module with Locale enum, t()/tw() lookup functions, and tests - Add JSON translation files for all 5 locales under assets/i18n/ - Provide locale Signal via Dioxus context in App, persisted to localStorage - Replace all hardcoded UI strings across 33 component/page files - Add compact locale picker (globe icon + ISO alpha-2 code) in sidebar header - Add click-outside backdrop dismissal for locale dropdown Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Sharang Parnerkar <parnerkarsharang@gmail.com> Reviewed-on: #12
28 lines
926 B
Rust
28 lines
926 B
Rust
use dioxus::prelude::*;
|
|
|
|
use crate::i18n::{t, Locale};
|
|
|
|
/// Agents page placeholder for the LangGraph agent builder.
|
|
///
|
|
/// Shows a "Coming Soon" card with a disabled launch button.
|
|
/// Will eventually integrate with the LangGraph framework.
|
|
#[component]
|
|
pub fn AgentsPage() -> Element {
|
|
let locale = use_context::<Signal<Locale>>();
|
|
let l = *locale.read();
|
|
|
|
rsx! {
|
|
section { class: "placeholder-page",
|
|
div { class: "placeholder-card",
|
|
div { class: "placeholder-icon", "A" }
|
|
h2 { "{t(l, \"developer.agents_title\")}" }
|
|
p { class: "placeholder-desc",
|
|
"{t(l, \"developer.agents_desc\")}"
|
|
}
|
|
button { class: "btn-primary", disabled: true, "{t(l, \"developer.launch_agents\")}" }
|
|
span { class: "placeholder-badge", "{t(l, \"common.coming_soon\")}" }
|
|
}
|
|
}
|
|
}
|
|
}
|