Internationalize user-facing strings and export them for translations

Changelog-Added: Internationalized user-facing strings and exported them for translations
Signed-off-by: Terry Yiu <git@tyiu.xyz>
This commit is contained in:
2025-06-26 23:13:31 -04:00
committed by William Casarin
parent d07c3e9135
commit 3f5036bd32
37 changed files with 2198 additions and 437 deletions

View File

@@ -1,6 +1,6 @@
use egui::{Color32, RichText, Widget};
use nostrdb::ProfileRecord;
use notedeck::fonts::NamedFontFamily;
use notedeck::{fonts::NamedFontFamily, tr};
pub struct Username<'a> {
profile: Option<&'a ProfileRecord<'a>>,
@@ -52,7 +52,11 @@ impl Widget for Username<'_> {
}
}
} else {
let mut txt = RichText::new("nostrich").family(NamedFontFamily::Medium.as_family());
let mut txt = RichText::new(tr!(
"nostrich",
"Default username when profile is not available"
))
.family(NamedFontFamily::Medium.as_family());
if let Some(col) = color {
txt = txt.color(col)
}