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:
@@ -25,7 +25,7 @@ use notedeck_ui::{
|
||||
NoteOptions, ProfilePic,
|
||||
};
|
||||
|
||||
use notedeck::{name::get_display_name, supported_mime_hosted_at_url, NoteAction, NoteContext};
|
||||
use notedeck::{name::get_display_name, supported_mime_hosted_at_url, tr, NoteAction, NoteContext};
|
||||
use tracing::error;
|
||||
|
||||
pub struct PostView<'a, 'd> {
|
||||
@@ -180,7 +180,13 @@ impl<'a, 'd> PostView<'a, 'd> {
|
||||
};
|
||||
|
||||
let textedit = TextEdit::multiline(&mut self.draft.buffer)
|
||||
.hint_text(egui::RichText::new("Write a banger note here...").weak())
|
||||
.hint_text(
|
||||
egui::RichText::new(tr!(
|
||||
"Write a banger note here...",
|
||||
"Placeholder for note input field"
|
||||
))
|
||||
.weak(),
|
||||
)
|
||||
.frame(false)
|
||||
.desired_width(ui.available_width())
|
||||
.layouter(&mut layouter);
|
||||
@@ -605,7 +611,7 @@ fn render_post_view_media(
|
||||
|
||||
fn post_button(interactive: bool) -> impl egui::Widget {
|
||||
move |ui: &mut egui::Ui| {
|
||||
let button = egui::Button::new("Post now");
|
||||
let button = egui::Button::new(tr!("Post now", "Button label to post a note"));
|
||||
if interactive {
|
||||
ui.add(button)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user