jpexs-decompiler
jpexs-decompiler copied to clipboard
Added localization support for context menu.
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操作系统下,添加右键关联的上下文菜单没有使用本地化功能,因此我添加了相关逻辑。
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 this is kinda unrelated but what about https://github.com/openjdk/wakefield for wayland support
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.
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.
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.