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

Menu: functional change between Fyne 2.5.0 and Fyne 2.5.2 #5242

Closed
2 tasks done
Klaus-Tockloth opened this issue Nov 6, 2024 · 5 comments
Closed
2 tasks done

Menu: functional change between Fyne 2.5.0 and Fyne 2.5.2 #5242

Klaus-Tockloth opened this issue Nov 6, 2024 · 5 comments
Labels
duplicate This issue or pull request already exists

Comments

@Klaus-Tockloth
Copy link

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

With Fyne 2.5.0 I see this correct menu (only 'Quit'):
Bildschirmfoto 2024-11-06 um 11 59 46

With Fyne 2.5.2 I see a menu with an additional, unwanted and undefined menu entry "Beenden":
Bildschirmfoto 2024-11-06 um 12 00 23

Questions:

  • Was there a functional change between Fyne v2.5.0 and Fyne v2.5.2?
  • Is there a workaround to avoid the above behavior?

BTW: "Beenden" is the german translation for "Quit".

How to reproduce

Code snippet:

// menu items for 'File' menu entry
fileQuit := fyne.NewMenuItem("Quit",
	func() {
		logger.Println(Format(TRANSACTION, INFO, MESSAGE, "user action: activate 'File -> Quit'"))
		if isApplicationClosable {
			application.Quit()
		}
	})
fileMenu := fyne.NewMenu("File", fileQuit)

Screenshots

No response

Example code

See above.

Fyne version

v2.5.0 versus v2.5.2

Go compiler version

v1.23.2

Operating system and version

Windows

Additional Information

No response

@Klaus-Tockloth Klaus-Tockloth added the unverified A bug that has been reported but not verified label Nov 6, 2024
@Klaus-Tockloth
Copy link
Author

Maybe related to #5158

@andydotxyz
Copy link
Member

It will be because we added the German translation. This should be fixed if you update your code so that

fileQuit := fyne.NewMenuItem("Quit",

becomes

fileQuit := fyne.NewMenuItem(land.L("Quit"),

That way your Quit is going to match the system (translated) one.

@Klaus-Tockloth
Copy link
Author

	// menu items for 'File' menu entry
	fileQuit := fyne.NewMenuItem(lang.L("Quit"),
		func() {
			slog.Info("user action: activate 'File -> Quit'")
			if isApplicationClosable {
				application.Quit()
			}
		})
	fileMenu := fyne.NewMenu("File", fileQuit)

With the above correction I get to this:

Bildschirmfoto 2024-11-07 um 08 37 41

This is better (only one menu entry) but not what I want. My international application is "english only" and should not have translated parts (in this case "Beenden"). How to achieve this?

@andydotxyz
Copy link
Member

Oh I realise now that this was a duplicate of #5158

@andydotxyz andydotxyz added duplicate This issue or pull request already exists and removed unverified A bug that has been reported but not verified labels Nov 15, 2024
@Klaus-Tockloth
Copy link
Author

Concerning the question "Windows menu: How to avoid /disable any translation?" I opened this separate issue: #5269

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants