notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit bf58fdce1fbbab79b24b01719e44c25bcb3bdad2
parent 419102959f652b1855b26014b415557a359614f0
Author: Terry Yiu <git@tyiu.xyz>
Date:   Thu, 24 Jul 2025 23:38:13 -0400

Internationalize ShowNoteClientOptions labels

Changelog-Fixed: Internationalize ShowNoteClientOptions labels
Signed-off-by: Terry Yiu <git@tyiu.xyz>

Diffstat:
Massets/translations/en-US/main.ftl | 9+++++++++
Massets/translations/en-XA/main.ftl | 9+++++++++
Mcrates/notedeck_columns/src/ui/settings.rs | 23++++++++++++++++++++++-
3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/assets/translations/en-US/main.ftl b/assets/translations/en-US/main.ftl @@ -79,6 +79,9 @@ Banner_52ef = Banner # Beta version label BETA_8e5d = BETA +# Option in settings section to show the source client label at the bottom of the note +Bottom_33c8 = Bottom + # Broadcast the note to all connected relays Broadcast_fe43 = Broadcast @@ -241,6 +244,9 @@ Find_User_bd12 = Find User # Title for hashtags column Hashtags_f8e0 = Hashtags +# Option in settings section to hide the source client label in note display +Hide_281d = Hide + # Title for Home column Home_8c19 = Home @@ -535,6 +541,9 @@ Thread_0f20 = Thread # Link text for thread references thread_ad1f = thread +# Option in settings section to show the source client label at the top of the note +Top_6aeb = Top + # Title for universe column Universe_e01e = Universe diff --git a/assets/translations/en-XA/main.ftl b/assets/translations/en-XA/main.ftl @@ -79,6 +79,9 @@ Banner_52ef = {"["}Bàññér{"]"} # Beta version label BETA_8e5d = {"["}BÉTÀ{"]"} +# Option in settings section to show the source client label at the bottom of the note +Bottom_33c8 = {"["}Bóttóm{"]"} + # Broadcast the note to all connected relays Broadcast_fe43 = {"["}Bróàdçàst{"]"} @@ -241,6 +244,9 @@ Find_User_bd12 = {"["}Fíñd Úsér{"]"} # Title for hashtags column Hashtags_f8e0 = {"["}Hàshtàgs{"]"} +# Option in settings section to hide the source client label in note display +Hide_281d = {"["}Hídé{"]"} + # Title for Home column Home_8c19 = {"["}Hómé{"]"} @@ -535,6 +541,9 @@ Thread_0f20 = {"["}Thréàd{"]"} # Link text for thread references thread_ad1f = {"["}thréàd{"]"} +# Option in settings section to show the source client label at the top of the note +Top_6aeb = {"["}Tóp{"]"} + # Title for universe column Universe_e01e = {"["}Úñívérsé{"]"} diff --git a/crates/notedeck_columns/src/ui/settings.rs b/crates/notedeck_columns/src/ui/settings.rs @@ -115,6 +115,27 @@ impl<'a> SettingsView<'a> { } } + /// Get the localized label for ShowNoteClientOptions + fn get_show_note_client_label(&mut self, option: ShowNoteClientOptions) -> String { + match option { + ShowNoteClientOptions::Hide => tr!( + self.i18n, + "Hide", + "Option in settings section to hide the source client label in note display" + ), + ShowNoteClientOptions::Top => tr!( + self.i18n, + "Top", + "Option in settings section to show the source client label at the top of the note" + ), + ShowNoteClientOptions::Bottom => tr!( + self.i18n, + "Bottom", + "Option in settings section to show the source client label at the bottom of the note" + ), + }.to_string() + } + pub fn ui(&mut self, ui: &mut egui::Ui) -> Option<SettingsAction> { let id = ui.id(); let mut action = None; @@ -402,7 +423,7 @@ impl<'a> SettingsView<'a> { ShowNoteClientOptions::Top, ShowNoteClientOptions::Bottom, ] { - let label = option.clone().to_string(); + let label = self.get_show_note_client_label(option); if ui .selectable_value(