Skip to content

Commit

Permalink
desktop: Add translatable string for recents menu entry
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepycatcoding committed Apr 29, 2024
1 parent 404c89a commit b6a46e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions desktop/assets/texts/en-US/main_menu.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ file-menu-open-quick = Open...
file-menu-open-advanced = Open Advanced...
file-menu-close = Close
file-menu-reload = Reload
file-menu-recents = Recents
file-menu-recents-empty = No recent entries
file-menu-preferences = Preferences...
file-menu-exit = Exit
Expand Down
4 changes: 2 additions & 2 deletions desktop/src/gui/menu_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ impl MenuBar {
ui.separator();

let recent_menu_response = ui
.menu_button("Recents", |ui| {
.menu_button(text(locale, "file-menu-recents"), |ui| {
if self
.cached_recents
.as_ref()
.map(|x| x.is_empty())
.unwrap_or(true)
{
ui.label("No recent entries");
ui.label(text(locale, "file-menu-recents-empty"));
}

if let Some(recents) = &self.cached_recents {
Expand Down

0 comments on commit b6a46e2

Please sign in to comment.