jpexs-decompiler icon indicating copy to clipboard operation
jpexs-decompiler copied to clipboard

Added localization support for context menu.

Open Liushui-Miaomiao opened this issue 1 year ago • 1 comments

Hi, I found that in Windows operating system, the context menu associated with adding right click is not using the localization function, so I added the relevant logic.

你好,我发现在Windows操作系统下,添加右键关联的上下文菜单没有使用本地化功能,因此我添加了相关逻辑。

Liushui-Miaomiao avatar Oct 01 '24 16:10 Liushui-Miaomiao

Hi, The AppResources resource bundle is meant for strings inside the ffdec library - the directory /lib_src/ffdec_lib/src. On the other hand, adding to context menu is not part of the ffdec library - it is GUI part (the /src directory). Please move the localization item to proper file - it should be in src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties where I place all GUI related translations which are not part of any dialog.

Then you can use AppStrings.translate("xxx"); instead of AppResources.translate("xxx");

Also I am not sure translating this string is a good idea, since it should be updated in Windows registry after user changes language in the GUI, which is not in this case. User would need to disable association and then enable it again.

jindrapetrik avatar Oct 01 '24 17:10 jindrapetrik

@jindrapetrik this is kinda unrelated but what about https://github.com/openjdk/wakefield for wayland support

Twig6943 avatar Dec 01 '24 15:12 Twig6943

Yes, it is very unrelated. Your comment belongs to the proper issue in the issue tracker: https://www.free-decompiler.com/flash/issues/2346-wayland-support

Do not spam pull requests here, thanks.

jindrapetrik avatar Dec 01 '24 15:12 jindrapetrik

Before answering, I'm very sorry that I have been neglecting to manage this pull request since I saw your comment.

This pull request is my first attempt to use it. I just made simple modifications based on the original, so this solution is an immature submission. (I'm sorry that I don't have a deep understanding of this project code and I'm also a novice in GIT)

This submission should be closed, right?

I'm very sorry for the trouble.

Liushui-Miaomiao avatar Dec 02 '24 00:12 Liushui-Miaomiao

Don't be sorry, it's a good submission, just needs some polishing. I will think about the solution of the language switching and maybe implement something later myself... But it has low priority for me, thanks for understanding.

jindrapetrik avatar Dec 07 '24 19:12 jindrapetrik