You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Jerome Lelasseux <le...@yahoo.com.INVALID> on 2020/12/16 14:53:53 UTC
Localization issue with MenuBar(DataFolder) + declarative action
registrations
Hi
I use the menuBar(DataFolder) constructor to automatically build a MenuBar from actions registered in the layer.xml:
menuBar = new MenuBar(DataFolder.findFolder(FileUtil.getConfigFile("MyMenuBar")));
And below is an example of the ImportMix action in the "MixFile" submenu:
@ActionID(category = "MixConsole", id = "org.jjazz.ui.mixconsole.actions.importmix")
@ActionRegistration(displayName = "#CTL_ImportMix", lazy = true)
@ActionReferences(
{
@ActionReference(path = "MyMenuBar/MixFile", position = 200)
})
public class ImportMix extends AbstractAction
This works well and I can localize the ImportMix action name.
However how to localize the submenu name ? ("MixFile" in the example)
Re: Netbeans menus File, Edit... do not get localized
Posted by Jerome Lelasseux <le...@yahoo.com.INVALID>.
Thanks Boris. Yes this is what I've started to do using the branding localization. I don't reuse many Netbeans menu items, so it should be ok.
The problem I have now is how to deal with the ISO-8859-1 encoding required for Bundle*.properties, because I use Crowdin and it generates UTF-8 files... I'll post a separate email.
Le lundi 21 décembre 2020 à 00:43:52 UTC+1, Boris Heithecker <bo...@gmx.net> a écrit :
Hi Jerome,NetBeans 12.0 has no built-in localization. If you need it, you'll have to compile your own localization module reusing translation from pre-9.0 editions. Go to https://github.com/apache/netbeans-l10n and see how this can be done, using the german translations (locale_de) as a template. Boris
On Fri, 18 Dec 2020 at 23:45, Jerome Lelasseux <le...@yahoo.com.invalid> wrote:
When I run my RCP application with
run.args.extra=--locale fr:FR
I get my own UI menu items localized but not Netbeans ones remain in english, like bar menu headers "File" or "Edit", the action "Exit", etc.
What do I miss ?
I use Netbeans 12.0
--
Boris Heithecker
Dr. Boris Heithecker
Lüneburger Str. 30
28870 Ottersberg
Festnetz: +49 4205 315834
Mobil: +49 170 6137015
Re: Netbeans menus File, Edit... do not get localized
Posted by Boris Heithecker <bo...@gmx.net>.
Hi Jerome,
NetBeans 12.0 has no built-in localization. If you need it, you'll have to
compile your own localization module reusing translation from pre-9.0
editions.
Go to https://github.com/apache/netbeans-l10n and see how this can be done,
using the german translations (locale_de) as a template.
Boris
On Fri, 18 Dec 2020 at 23:45, Jerome Lelasseux <le...@yahoo.com.invalid>
wrote:
> When I run my RCP application with
>
> run.args.extra=--locale fr:FR
>
> I get my own UI menu items localized but not Netbeans ones remain in
> english, like bar menu headers "File" or "Edit", the action "Exit", etc.
>
> What do I miss ?
>
>
> I use Netbeans 12.0
>
--
Boris Heithecker
Dr. Boris Heithecker
Lüneburger Str. 30
28870 Ottersberg
Festnetz: +49 4205 315834
Mobil: +49 170 6137015
Netbeans menus File, Edit... do not get localized
Posted by Jerome Lelasseux <le...@yahoo.com.INVALID>.
When I run my RCP application with
run.args.extra=--locale fr:FR
I get my own UI menu items localized but not Netbeans ones remain in english, like bar menu headers "File" or "Edit", the action "Exit", etc.
What do I miss ?
I use Netbeans 12.0