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

@@ -3,7 +3,7 @@ use egui::{
};
use enostr::Pubkey;
use nostrdb::{Ndb, Transaction};
use notedeck::{Accounts, Images};
use notedeck::{tr, Accounts, Images};
use notedeck_ui::colors::PINK;
use notedeck_ui::app_images;
@@ -171,7 +171,7 @@ fn scroll_area() -> ScrollArea {
fn add_account_button() -> Button<'static> {
Button::image_and_text(
app_images::add_account_image().fit_to_exact_size(Vec2::new(48.0, 48.0)),
RichText::new(" Add account")
RichText::new(tr!("Add account", "Button label to add a new account"))
.size(16.0)
// TODO: this color should not be hard coded. Find some way to add it to the visuals
.color(PINK),
@@ -180,5 +180,8 @@ fn add_account_button() -> Button<'static> {
}
fn sign_out_button() -> egui::Button<'static> {
egui::Button::new(RichText::new("Sign out"))
egui::Button::new(RichText::new(tr!(
"Sign out",
"Button label to sign out of account"
)))
}