Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Submenu for 18n #11326

Closed
nyssance opened this issue Oct 12, 2024 · 1 comment · Fixed by #11390
Closed

[feat] Submenu for 18n #11326

nyssance opened this issue Oct 12, 2024 · 1 comment · Fixed by #11390

Comments

@nyssance
Copy link

Describe the problem

Such as quit() about() should add a parameter for text.

Describe the solution you'd like

  pub fn paste(mut self) -> Self {
    self
      .items
      .push(PredefinedMenuItem::paste(self.manager, None).map(|i| i.kind()));
    self
  }

PredefinedMenuItem have text parameter, but now always pass None. If user want to i18n, must rewrite all code.

Alternatives considered

No response

Additional context

No response

@amrbashir
Copy link
Member

for now, you can use submenu.item(&PredefindeMenuItem::paste(&app, Some(text))) https://docs.rs/tauri/latest/tauri/menu/struct.SubmenuBuilder.html#method.item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants