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:
@@ -5,7 +5,7 @@ use crate::app::NotedeckApp;
|
||||
use egui::{vec2, Button, Color32, Label, Layout, Rect, RichText, ThemePreference, Widget};
|
||||
use egui_extras::{Size, StripBuilder};
|
||||
use nostrdb::{ProfileRecord, Transaction};
|
||||
use notedeck::{App, AppAction, AppContext, NotedeckTextStyle, UserAccount, WalletType};
|
||||
use notedeck::{tr, App, AppAction, AppContext, NotedeckTextStyle, UserAccount, WalletType};
|
||||
use notedeck_columns::{
|
||||
column::SelectionResult, timeline::kind::ListKind, timeline::TimelineKind, Damus,
|
||||
};
|
||||
@@ -460,15 +460,16 @@ fn milestone_name() -> impl Widget {
|
||||
);
|
||||
ui.add(
|
||||
Label::new(
|
||||
RichText::new("BETA")
|
||||
RichText::new(tr!("BETA", "Beta version label"))
|
||||
.color(ui.style().visuals.noninteractive().fg_stroke.color)
|
||||
.font(font),
|
||||
)
|
||||
.selectable(false),
|
||||
)
|
||||
.on_hover_text(
|
||||
.on_hover_text(tr!(
|
||||
"Notedeck is a beta product. Expect bugs and contact us when you run into issues.",
|
||||
)
|
||||
"Beta product warning message"
|
||||
))
|
||||
.on_hover_cursor(egui::CursorIcon::Help)
|
||||
})
|
||||
.inner
|
||||
@@ -719,7 +720,10 @@ fn bottomup_sidebar(
|
||||
let resp = ui
|
||||
.add(Button::new("☀").frame(false))
|
||||
.on_hover_cursor(egui::CursorIcon::PointingHand)
|
||||
.on_hover_text("Switch to light mode");
|
||||
.on_hover_text(tr!(
|
||||
"Switch to light mode",
|
||||
"Hover text for light mode toggle button"
|
||||
));
|
||||
if resp.clicked() {
|
||||
Some(ChromePanelAction::SaveTheme(ThemePreference::Light))
|
||||
} else {
|
||||
@@ -730,7 +734,10 @@ fn bottomup_sidebar(
|
||||
let resp = ui
|
||||
.add(Button::new("🌙").frame(false))
|
||||
.on_hover_cursor(egui::CursorIcon::PointingHand)
|
||||
.on_hover_text("Switch to dark mode");
|
||||
.on_hover_text(tr!(
|
||||
"Switch to dark mode",
|
||||
"Hover text for dark mode toggle button"
|
||||
));
|
||||
if resp.clicked() {
|
||||
Some(ChromePanelAction::SaveTheme(ThemePreference::Dark))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user