diff --git a/assets/translations/en-US/main.ftl b/assets/translations/en-US/main.ftl index ed23388e..2abe0cf0 100644 --- 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 index db6b8fc0..32b49941 100644 --- 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 index c1e2522b..148b3bb9 100644 --- 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 { 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(