feat: add admin/profile UI, i18n (fr/de/pt), fix CI pipelines
- Add admin panel link and profile modal in user menu dropdown - Add French, German and Portuguese locale support (full translations) - Register new locales across JS frontend and Rust backend - Create CI pipeline (fmt, clippy, test, audit, build) - Fix docker-build.yml (cache, real tests, reduced timeout) - Fix docker-publish.yml (multi-arch via QEMU, latest tag, pre-publish tests) - Add dependabot.yml for automated dependency updates
This commit is contained in:
@@ -16,6 +16,9 @@ impl From<Locale> for LocaleDto {
|
||||
let (code, name) = match locale {
|
||||
Locale::English => ("en", "English"),
|
||||
Locale::Spanish => ("es", "Español"),
|
||||
Locale::French => ("fr", "Français"),
|
||||
Locale::German => ("de", "Deutsch"),
|
||||
Locale::Portuguese => ("pt", "Português"),
|
||||
};
|
||||
|
||||
Self {
|
||||
|
||||
@@ -456,6 +456,15 @@ impl AppServiceFactory {
|
||||
if let Err(e) = i18n_service.load_translations(Locale::Spanish).await {
|
||||
tracing::warn!("Failed to load Spanish translations: {}", e);
|
||||
}
|
||||
if let Err(e) = i18n_service.load_translations(Locale::French).await {
|
||||
tracing::warn!("Failed to load French translations: {}", e);
|
||||
}
|
||||
if let Err(e) = i18n_service.load_translations(Locale::German).await {
|
||||
tracing::warn!("Failed to load German translations: {}", e);
|
||||
}
|
||||
if let Err(e) = i18n_service.load_translations(Locale::Portuguese).await {
|
||||
tracing::warn!("Failed to load Portuguese translations: {}", e);
|
||||
}
|
||||
tracing::info!("Translations preloaded");
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@ pub type I18nResult<T> = Result<T, I18nError>;
|
||||
pub enum Locale {
|
||||
English,
|
||||
Spanish,
|
||||
French,
|
||||
German,
|
||||
Portuguese,
|
||||
}
|
||||
|
||||
impl Locale {
|
||||
@@ -30,6 +33,9 @@ impl Locale {
|
||||
match self {
|
||||
Locale::English => "en",
|
||||
Locale::Spanish => "es",
|
||||
Locale::French => "fr",
|
||||
Locale::German => "de",
|
||||
Locale::Portuguese => "pt",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +44,9 @@ impl Locale {
|
||||
match code.to_lowercase().as_str() {
|
||||
"en" => Some(Locale::English),
|
||||
"es" => Some(Locale::Spanish),
|
||||
"fr" => Some(Locale::French),
|
||||
"de" => Some(Locale::German),
|
||||
"pt" => Some(Locale::Portuguese),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ impl I18nService for FileSystemI18nService {
|
||||
}
|
||||
|
||||
async fn available_locales(&self) -> Vec<Locale> {
|
||||
vec![Locale::English, Locale::Spanish]
|
||||
vec![Locale::English, Locale::Spanish, Locale::French, Locale::German, Locale::Portuguese]
|
||||
}
|
||||
|
||||
async fn is_supported(&self, locale: Locale) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user