You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by frederic <fr...@ancestris.org> on 2017/11/24 06:25:36 UTC

How to customize Mac menu nowadays ?

Hi, 

I am using Netbeans to develop and promote the Ancestris application.

I have an issue with customizing the main menu bar on Mac.

The system menu remains in english and I cannot control what appears
and localize it. 


You can see than iOS adds an "ancestris" item in the menu bar that we
do not have on Windows or Linux. The name starts with a small capital
letter (I cannot change it). It is taken from the netbeans application
name which cannot have capitalized letters.

Secondly, the drop-down menu that appears is in english. I would like
to be able to localize it, we have many other different languages.

Thirdly, the menu items in the drop down menu do nothing. I would like
to hide/show them selectively and control the piece of code that they
call.

I have tried many things found on the Internet including Netbeans
stackoverflow. But none works to get me to what I have described above.
It appears the solutions found on the internet older than a year or two
no longer work.

Any know current solution for this would be greatly appreciated !

Thank you,
Fred

Re: How to customize Mac menu nowadays ?

Posted by Marco Rossi <ma...@markreds.it>.
As just said by Emilian, Apple discourages non standard menus and gives these guidelines to developers to make their applications GUI clear and straightforward. Anyway you you can customize the menu items conforming to your needs.

To hide the platform menu items you don’t need you can tweak the layer.xml file in your modules. For example, in mine I hide and reordered some of them:

<folder name="Menu">
        <folder name="File">
            <attr name="position" intvalue="10" />
            <file name="org-openide-actions-SaveAllAction.shadow_hidden"/>
            <file name="org-openide-actions-SaveAsAction.shadow_hidden"/>
            <file name="org-openide-actions-SaveAction.shadow_hidden"/>
        </folder>
        <folder name="Edit">
            <attr name="position" intvalue="20" />
            <file name="org-netbeans-modules-search-FindInFilesAction-separatorBefore.instance_hidden"/>
            <file name="org-netbeans-modules-search-FindInFilesAction.shadow_hidden"/>
            <file name="org-netbeans-modules-search-ReplaceInFilesAction.shadow_hidden"/>
        </folder>
        <folder name="View">
            <attr name="position" intvalue="30" />
            <file name="org-netbeans-core-actions-HTMLViewAction.shadow_hidden"/>
        </folder>
        <folder name="Tools">
            <attr name="position" intvalue="40" />
            <folder name="Controller">
                <attr name="position" intvalue="400"/>
                <attr name="displayName" bundlevalue="com.cemit.isnet.core.Bundle#LBL_Controller"/>
            </folder>
        </folder>
        <folder name="Window">
            <attr name="position" intvalue="50" />
            <file name="ProgressListAction.shadow_hidden"/>
            <file name="SwitchToRecentDocumentAction.shadow_hidden"/>
        </folder>
        <folder name="Help">
            <attr name="position" intvalue="60" />
        </folder>
        <file name="GoTo_hidden"/>
        <file name="Refactoring_hidden"/>
        <file name="RunProject_hidden"/>
        <file name="Source_hidden"/>
   </folder>

In the same way you can also create new ones, like my submenu Controller inside Tools menu.

At this point you can create new actions (File > New file > Module Development > Action) and register them where you want. By this way you could, for example, create a new Preferences action and get to open your custom window. Maybe someone here more experienced then me could suggest you a better way, for example how to override the default platform actions.
But always keep in mind the Apple guidelines aforementioned. In the case of “Preferences” action, this is usually under the “application” menu, while in other platforms it could be under the “Edit” menu or “Tools” menu. Netbeans platform manage this automatically for you and if you replace the standard menu item with your one as I suggested, you should manage this behavior by yourself if you release your application for other platforms other then OS X.
In addition you could customize the platform preferences window by adding your custom preferences panels (see File > New file > Module Development > Options panel).

I hope I understand and answered what you’ve requested.

> Il giorno 25 nov 2017, alle ore 00:16, Emilian Bold <em...@protonmail.ch> ha scritto:
> 
> The macOS HIG https://developer.apple.com/library/content//documentation/UserExperience/Conceptual/OSXHIGuidelines/MenuBarMenus.html#//apple_ref/doc/uid/20000957-CH29-SW3 doesn't seem to encourage / allow customization there.
> 
> I don't believe you can change anything. The actions are either handled by macOS or by the NetBeans Platform. You already have the about window the options window. There is really nothing to tweak.
> 
> --emi
> 
>> -------- Original Message --------
>> Subject: Re: How to customize Mac menu nowadays ?
>> Local Time: November 24, 2017 10:05 PM
>> UTC Time: November 24, 2017 8:05 PM
>> From: frederic@ancestris.org
>> To: users@netbeans.incubator.apache.org
>> 
>> Marco,
>> 
>> Thank you very much for you reply, I will try this. I have step 1 already done, but missing steps 2 and 3.
>> 
>> I understand that what you indicate below will ensure I have the Mac menu in the user language. I will try.
>> 
>> But how do you customize the links between the menu item buttons and the java actions of my application ? (for instance, that "Preferences" in the Mac menu will open up my preferences window, that "Services |>" is hidden because I do no need it in my application, etc ?
>> 
>> Thanks in advance,
>> Fred
>> 
>> 
>> Le vendredi 24 novembre 2017 à 10:01 +0100, Marco Rossi a écrit :
>>> In my custom application I got the localization I wanted for both application and OS X main menu bar by adding the following key-value pair in platform.properties file:
>>> 
>>> run.args.extra=--locale it:IT
>>> 
>>> (where italian is my default preferred language).
>>> 
>>> To customize the main menu title is more complex but not impossibile. I got it by adding the following changes:
>>> 
>>> 1. add key-value pair "app.name=${branding.token}” to project.properties file.
>>> 
>>> 2. Change the ant build script file in the “build-mac” target by adding the following lines:
>>> 	<copy file="${basedir}/harness/etc/Info.plist" tofile="${dist.dir}/${app.title}.app/Contents/Info.plist">
>>>           <filterchain>
>>>               <replacestring from="$${app.name}" to="${app.name}"/>
>>>               <replacestring from="$${app.version}" to="${app.version}"/>
>>>               <replacestring from="$${app.title}" to="${app.title}"/>
>>>               <replacestring from="$${app.icon}" to="master.png"/>
>>>               <replacestring from="$${branding.token}" to="${branding.token}"/>
>>>               <replacestring from="$${app.title}" to="${app.title}"/>
>>>           </filterchain>
>>>       </copy>
>>> 
>>> 3. In your project source directory create the /harness/etc/Info.plist file with the following contents:
>>> 
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
>>> <plist version="0.9">
>>> <dict>
>>> 
>>>   <key>CFBundleName</key>
>>>   <string>${app.title}</string>
>>> 
>>>   <key>CFBundleVersion</key>
>>>   <string>${app.version}</string>
>>> 
>>>   <key>CFBundleExecutable</key>
>>>   <string>${app.name}</string>
>>> 
>>>   <key>CFBundlePackageType</key>
>>>   <string>APPL</string>
>>> 
>>>   <key>CFBundleShortVersionString</key>
>>>   <string>${app.version}</string>
>>> 
>>>   <key>CFBundleSignature</key>
>>>   <string>????</string>
>>> 
>>>   <key>CFBundleInfoDictionaryVersion</key>
>>>   <string>6.0</string>
>>> 
>>>   <key>CFBundleIconFile</key>
>>>   <string>${app.name}.icns</string>
>>> </dict>
>>> </plist>
>>> 
>>> Please note that in this way you will get the customized menu bar only when you build the final application package (Package as > Mac OS X Application), not while debugging from the Netbeans IDE. Also note that the script customizes the application bundle icon used by Finder.
>>> 
>>> Hope this will helps you. I done this a long time ago and I don’t remember where I found these guidelines but remember that I got some headaches before it works as I wanted.
>>> 
>>> 
>>> 
>>>> 
>>>> Il giorno 24 nov 2017, alle ore 08:31, Emilian Bold <em...@protonmail.ch> ha scritto:
>>>> 
>>>> I'm not entirely certain you can localize that menu. It might just use the language of macOS. Did you try switching your macOS language and see if it impacts the NetBeans Platform app too?
>>>> 
>>>> About should open your about window, preferences should open the Platform options window. Does none of that work?
>>>> 
>>>> Some of the related code is in the applemenu module which is part of the platform.
>>>> 
>>>> --emi
>>>> 
>>>> 
>>>>> 
>>>>> -------- Original Message --------
>>>>> Subject: How to customize Mac menu nowadays ?
>>>>> Local Time: November 24, 2017 8:25 AM
>>>>> UTC Time: November 24, 2017 6:25 AM
>>>>> From: frederic@ancestris.org
>>>>> To: users@netbeans.incubator.apache.org
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> I am using Netbeans to develop and promote the Ancestris application.
>>>>> 
>>>>> I have an issue with customizing the main menu bar on Mac.
>>>>> 
>>>>> The system menu remains in english and I cannot control what appears and localize it.
>>>>> 
>>>>> 
>>>>> 
>>>>> You can see than iOS adds an "ancestris" item in the menu bar that we do not have on Windows or Linux. The name starts with a small capital letter (I cannot change it). It is taken from the netbeans application name which cannot have capitalized letters.
>>>>> 
>>>>> Secondly, the drop-down menu that appears is in english. I would like to be able to localize it, we have many other different languages.
>>>>> 
>>>>> Thirdly, the menu items in the drop down menu do nothing. I would like to hide/show them selectively and control the piece of code that they call.
>>>>> 
>>>>> I have tried many things found on the Internet including Netbeans stackoverflow. But none works to get me to what I have described above. It appears the solutions found on the internet older than a year or two no longer work.
>>>>> 
>>>>> Any know current solution for this would be greatly appreciated !
>>>>> 
>>>>> Thank you,
>>>>> Fred
>>>>> 
>>>>> 
>>>>> 
>>>> 
>> 


Re: How to customize Mac menu nowadays ?

Posted by Emilian Bold <em...@protonmail.ch>.
The macOS HIG https://developer.apple.com/library/content//documentation/UserExperience/Conceptual/OSXHIGuidelines/MenuBarMenus.html#//apple_ref/doc/uid/20000957-CH29-SW3 doesn't seem to encourage / allow customization there.

I don't believe you can change anything. The actions are either handled by macOS or by the NetBeans Platform. You already have the about window the options window. There is really nothing to tweak.

--emi

>-------- Original Message --------
>Subject: Re: How to customize Mac menu nowadays ?
>Local Time: November 24, 2017 10:05 PM
>UTC Time: November 24, 2017 8:05 PM
>From: frederic@ancestris.org
>To: users@netbeans.incubator.apache.org
>
>Marco,
>
>Thank you very much for you reply, I will try this. I have step 1 already done, but missing steps 2 and 3.
>
>I understand that what you indicate below will ensure I have the Mac menu in the user language. I will try.
>
>But how do you customize the links between the menu item buttons and the java actions of my application ? (for instance, that "Preferences" in the Mac menu will open up my preferences window, that "Services |>" is hidden because I do no need it in my application, etc ?
>
>Thanks in advance,
>Fred
>
>
>Le vendredi 24 novembre 2017 à 10:01 +0100, Marco Rossi a écrit :
>>In my custom application I got the localization I wanted for both application and OS X main menu bar by adding the following key-value pair in platform.properties file:
>>
>>run.args.extra=--locale it:IT
>>
>>(where italian is my default preferred language).
>>
>>To customize the main menu title is more complex but not impossibile. I got it by adding the following changes:
>>
>>1. add key-value pair "app.name=${branding.token}” to project.properties file.
>>
>>2. Change the ant build script file in the “build-mac” target by adding the following lines:
>>	<copy file="${basedir}/harness/etc/Info.plist" tofile="${dist.dir}/${app.title}.app/Contents/Info.plist">
>>            <filterchain>
>>                <replacestring from="$${app.name}" to="${app.name}"/>
>>                <replacestring from="$${app.version}" to="${app.version}"/>
>>                <replacestring from="$${app.title}" to="${app.title}"/>
>>                <replacestring from="$${app.icon}" to="master.png"/>
>>                <replacestring from="$${branding.token}" to="${branding.token}"/>
>>                <replacestring from="$${app.title}" to="${app.title}"/>
>>            </filterchain>
>>        </copy>
>>
>>3. In your project source directory create the /harness/etc/Info.plist file with the following contents:
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
>><plist version="0.9">
>>  <dict>
>>
>>    <key>CFBundleName</key>
>>    <string>${app.title}</string>
>>    
>>    <key>CFBundleVersion</key>
>>    <string>${app.version}</string>
>>    
>>    <key>CFBundleExecutable</key>
>>    <string>${app.name}</string>
>>    
>>    <key>CFBundlePackageType</key>
>>    <string>APPL</string>
>>    
>>    <key>CFBundleShortVersionString</key>
>>    <string>${app.version}</string>
>>    
>>    <key>CFBundleSignature</key>
>>    <string>????</string>
>>    
>>    <key>CFBundleInfoDictionaryVersion</key>
>>    <string>6.0</string>
>>    
>>    <key>CFBundleIconFile</key>
>>    <string>${app.name}.icns</string>
>>  </dict>
>></plist>
>>
>>Please note that in this way you will get the customized menu bar only when you build the final application package (Package as > Mac OS X Application), not while debugging from the Netbeans IDE. Also note that the script customizes the application bundle icon used by Finder.
>>
>>Hope this will helps you. I done this a long time ago and I don’t remember where I found these guidelines but remember that I got some headaches before it works as I wanted.
>>
>>
>>
>>>
>>>Il giorno 24 nov 2017, alle ore 08:31, Emilian Bold <em...@protonmail.ch> ha scritto:
>>>
>>>I'm not entirely certain you can localize that menu. It might just use the language of macOS. Did you try switching your macOS language and see if it impacts the NetBeans Platform app too?
>>>
>>>About should open your about window, preferences should open the Platform options window. Does none of that work?
>>>
>>>Some of the related code is in the applemenu module which is part of the platform.
>>>
>>>--emi
>>>
>>>
>>>>
>>>>-------- Original Message --------
>>>>Subject: How to customize Mac menu nowadays ?
>>>>Local Time: November 24, 2017 8:25 AM
>>>>UTC Time: November 24, 2017 6:25 AM
>>>>From: frederic@ancestris.org
>>>>To: users@netbeans.incubator.apache.org
>>>>
>>>>Hi,
>>>>
>>>>I am using Netbeans to develop and promote the Ancestris application.
>>>>
>>>>I have an issue with customizing the main menu bar on Mac.
>>>>
>>>>The system menu remains in english and I cannot control what appears and localize it.
>>>>
>>>>
>>>>
>>>>You can see than iOS adds an "ancestris" item in the menu bar that we do not have on Windows or Linux. The name starts with a small capital letter (I cannot change it). It is taken from the netbeans application name which cannot have capitalized letters.
>>>>
>>>>Secondly, the drop-down menu that appears is in english. I would like to be able to localize it, we have many other different languages.
>>>>
>>>>Thirdly, the menu items in the drop down menu do nothing. I would like to hide/show them selectively and control the piece of code that they call.
>>>>
>>>>I have tried many things found on the Internet including Netbeans stackoverflow. But none works to get me to what I have described above. It appears the solutions found on the internet older than a year or two no longer work.
>>>>
>>>>Any know current solution for this would be greatly appreciated !
>>>>
>>>>Thank you,
>>>>Fred
>>>>
>>>>
>>>>
>>>
>

Re: How to customize Mac menu nowadays ?

Posted by frederic <fr...@ancestris.org>.
Marco,
Thank you very much for you reply, I will try this. I have step 1
already done, but missing steps 2 and 3.
I understand that what you indicate below will ensure I have the Mac
menu in the user language. I will try.
But how do you customize the links between the menu item buttons and
the java actions of my application ? (for instance, that "Preferences"
in the Mac menu will open up my preferences window, that "Services |>"
is hidden because I do no need it in my application, etc ?
Thanks in advance,Fred

Le vendredi 24 novembre 2017 à 10:01 +0100, Marco Rossi a écrit :
> In my custom application I got the localization I wanted for both
> application and OS X main menu bar by adding the following key-value
> pair in platform.properties file:
> 
> run.args.extra=--locale it:IT
> 
> (where italian is my default preferred language).
> 
> To customize the main menu title is more complex but not impossibile.
> I got it by adding the following changes:
> 
> 1. add key-value pair "app.name=${branding.token}” to
> project.properties file.
> 
> 2. Change the ant build script file in the “build-mac” target by
> adding the following lines:
> 	<copy file="${basedir}/harness/etc/Info.plist"
> tofile="${dist.dir}/${app.title}.app/Contents/Info.plist">
>             <filterchain>
>                 <replacestring from="$${app.name}" to="${app.name}"/>
>                 <replacestring from="$${app.version}"
> to="${app.version}"/>
>                 <replacestring from="$${app.title}"
> to="${app.title}"/>
>                 <replacestring from="$${app.icon}" to="master.png"/>
>                 <replacestring from="$${branding.token}"
> to="${branding.token}"/>
>                 <replacestring from="$${app.title}"
> to="${app.title}"/>
>             </filterchain>
>         </copy>
> 
> 3. In your project source directory create the
> /harness/etc/Info.plist file with the following contents:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE plist SYSTEM
> "file://localhost/System/Library/DTDs/PropertyList.dtd">
> <plist version="0.9">
>   <dict>
> 
>     <key>CFBundleName</key>
>     <string>${app.title}</string>
>     
>     <key>CFBundleVersion</key>
>     <string>${app.version}</string>
>     
>     <key>CFBundleExecutable</key>
>     <string>${app.name}</string>
>     
>     <key>CFBundlePackageType</key>
>     <string>APPL</string>
>     
>     <key>CFBundleShortVersionString</key>
>     <string>${app.version}</string>
>     
>     <key>CFBundleSignature</key>
>     <string>????</string>
>     
>     <key>CFBundleInfoDictionaryVersion</key>
>     <string>6.0</string>
>     
>     <key>CFBundleIconFile</key>
>     <string>${app.name}.icns</string>
>   </dict>
> </plist>
> 
> Please note that in this way you will get the customized menu bar
> only when you build the final application package (Package as > Mac
> OS X Application), not while debugging from the Netbeans IDE. Also
> note that the script customizes the application bundle icon used by
> Finder.
> 
> Hope this will helps you. I done this a long time ago and I don’t
> remember where I found these guidelines but remember that I got some
> headaches before it works as I wanted.
> 
> 
> > Il giorno 24 nov 2017, alle ore 08:31, Emilian Bold <emilian.bold@p
> > rotonmail.ch> ha scritto:
> > 
> > I'm not entirely certain you can localize that menu. It might just
> > use the language of macOS. Did you try switching your macOS
> > language and see if it impacts the NetBeans Platform app too?
> > 
> > About should open your about window, preferences should open the
> > Platform options window. Does none of that work?
> > 
> > Some of the related code is in the applemenu module which is part
> > of the platform.
> > 
> > --emi
> > 
> > > -------- Original Message --------
> > > Subject: How to customize Mac menu nowadays ?
> > > Local Time: November 24, 2017 8:25 AM
> > > UTC Time: November 24, 2017 6:25 AM
> > > From: frederic@ancestris.org
> > > To: users@netbeans.incubator.apache.org
> > > 
> > > Hi,
> > > 
> > > I am using Netbeans to develop and promote the Ancestris
> > > application.
> > > 
> > > I have an issue with customizing the main menu bar on Mac.
> > > 
> > > The system menu remains in english and I cannot control what
> > > appears and localize it.
> > > 
> > > 
> > > 
> > > You can see than iOS adds an "ancestris" item in the menu bar
> > > that we do not have on Windows or Linux. The name starts with a
> > > small capital letter (I cannot change it). It is taken from the
> > > netbeans application name which cannot have capitalized letters.
> > > 
> > > Secondly, the drop-down menu that appears is in english. I would
> > > like to be able to localize it, we have many other different
> > > languages.
> > > 
> > > Thirdly, the menu items in the drop down menu do nothing. I would
> > > like to hide/show them selectively and control the piece of code
> > > that they call.
> > > 
> > > I have tried many things found on the Internet including Netbeans
> > > stackoverflow. But none works to get me to what I have described
> > > above. It appears the solutions found on the internet older than
> > > a year or two no longer work.
> > > 
> > > Any know current solution for this would be greatly appreciated !
> > > 
> > > Thank you,
> > > Fred
> > > 

UNSUBSCRIBE

Posted by Pedro Matos Gonçalves <pe...@gmail.com>.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: How to customize Mac menu nowadays ?

Posted by Patrik Karlsson <pa...@gmail.com>.
2017-12-04 13:13 GMT+01:00 Neil C Smith <ne...@apache.org>:

> These things are set with Java API's aren't they?  What about a
> non-NetBeans Java application?
>

I have the very same problem on my non-platform applications too.
For them I'm using https://ymasory.github.io/OrangeExtensions/ in order to
get the functionality of the menu items, but the locale is always English.

Re: How to customize Mac menu nowadays ?

Posted by Neil C Smith <ne...@apache.org>.
On Mon, Dec 4, 2017 at 11:55 AM Emilian Bold <em...@protonmail.ch>
wrote:

> * native macOS apps, like Finder, have the Finder menu in my language,
> including 'Services'.
> * NetBeans 8.2 as installed from the macOS package has 'Services' there in
> English all the time. So, somehow, NetBeans forces that language to English
> instead of leaving the OS default.
>

These things are set with Java API's aren't they?  What about a
non-NetBeans Java application?

Best wishes,

Neil
-- 
Neil C Smith
Artist & Technologist
www.neilcsmith.net

Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org

Re: How to customize Mac menu nowadays ?

Posted by Emilian Bold <em...@protonmail.ch>.
Seems like a launcher bug on macOS.

Please report it on https://issues.apache.org/jira/projects/NETBEANS/summary

I also see it on my machine:

* native macOS apps, like Finder, have the Finder menu in my language, including 'Services'.
* NetBeans 8.2 as installed from the macOS package has 'Services' there in English all the time. So, somehow, NetBeans forces that language to English instead of leaving the OS default.

--emi

>-------- Original Message --------
>Subject: Re: How to customize Mac menu nowadays ?
>Local Time: December 3, 2017 3:05 PM
>UTC Time: December 3, 2017 1:05 PM
>From: marco@markreds.it
>To: users@netbeans.incubator.apache.org
>
>No, Emilian, even if Italian is my default system language in Mac OS X, some submenu items in the "My Application" top menu remain in english. The same issue is encountered by Frederic with his application localized in another locale. All other menu items are correctly localized in the language set by the JVM parameter "--locale xx:XX" passed as argument.
>
> We would like to know if it is possible to localize them.
>
>
> Il giorno 03/dic/2017, alle ore 12.37, Emilian Bold ha scritto:
>>I don't understand the problem here. Is you app not detecting the current macOS locale?
>>If the user has macOS in English clearly that system menu is in English in every other app.
>>NetBeans Platform is actually more flexible since the use is able to switch language while keeping macOS in another language. Try doing that with Safari.
>>--emi
>>>-------- Original Message --------
>>> Subject: Re: How to customize Mac menu nowadays ?
>>> Local Time: December 3, 2017 11:21 AM
>>> UTC Time: December 3, 2017 9:21 AM
>>> From: frederic@ancestris.org
>>> To: users@netbeans.incubator.apache.org
>>>Hummm. Thanks a lot Marco.
>>>Are we the only ones developping non english speaking java applications on MacOS ? I cannot beleive nobody encountered this issue before...
>>>Best regards,
>>> Fred
>>>Le vendredi 01 décembre 2017 à 08:42 +0100, Marco Rossi a écrit :
>>>>No, it doesn’t work :-( I tried both creating German.lproj and Italian.lproj that is my default system language. Also tried with other variants as “it.lproj" for example but with not success.
>>>>>Il giorno 30 nov 2017, alle ore 19:50, frederic  ha scritto:
>>>>>Hi Marco,
>>>>>Thank you. These links are good to have !
>>>>> Then, all relies on being able to get the localization to work before I can customize the event handlers. (if I cannot translate them, I am better off hiding them)
>>>>>I have just found this link below on the internet : have you tried it before or would you be able to try if please  ? (I do not have MacOS on my machine).
>>>>> In particular this : test.app/Contents/Resources/German.lproj
>>>>> This shold get your menu in German... Does it work ?
>>>>>https://stackoverflow.com/questions/28560911/internationalization-of-native-mac-menu-bar
>>>>>Best regards,
>>>>> Fred
>>>>>Le jeudi 30 novembre 2017 à 09:36 +0100, Marco Rossi a écrit :
>>>>>>I tried with my application and get the same result: all the menus are localized according to the --locale it:IT, except for these submenu items (they are displayed in english).
>>>>>>I googled to find more information about how Java applications integrates themselves into OS X; I think indeed that this is not a Netbeans related issue, even if in Netbeans exists the module org.netbeans.modules.applemenu that should help a RCP application to integrate better when running into a OS X environment.
>>>>>>Found at https://www.fenestrated.net/mirrors/Apple Technotes (As of 2002)/tn/tn2031.html an old technical note about java runtime properties for OS X but nothing about the language. The same for this article from Oracle site: http://www.oracle.com/technetwork/articles/java/javatomac-140486.html
>>>>>>As just said by Emilian, they are system’s submenu items, but I think it should be the way to get them localized.
>>>>>>Ah, during my searches I found also this page at http://moomoohk.github.io/snippets/java_osx.html with very other useful information about to get a better integration with more OS X recent features (when it is possibile, off course). Here you will find some suggestions to how you could override the default event handler  with your customized one (for example, the preferences menu item).
>>>>>>>Il giorno 29 nov 2017, alle ore 22:09, frederic  ha scritto:
>>>>>>> Hi Marco,
>>>>>>>Regarding the language displayed for the application menu below, are you sure the java argument --locale it:IT works ?
>>>>>>>Apparently, a Mac user tried "--locale fr:FR" and got the ancestris menu in English.
>>>>>>>Did he do something wrong ?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>Thanks again,
>>>>>>> Fred
>>>>>>>Le vendredi 24 novembre 2017 à 10:01 +0100, Marco Rossi a écrit :In my custom application I got the localization I wanted for both application and OS X main menu bar by adding the following key-value pair in platform.properties file:
>>>>>>>>run.args.extra=--locale it:IT
>>>>>>>>
>

Re: How to customize Mac menu nowadays ?

Posted by Marco Rossi <ma...@markreds.it>.
No, Emilian, even if Italian is my default system language in Mac OS X, some submenu items in the "My Application" top menu remain in english. The same issue is encountered by Frederic with his application localized in another locale. All other menu items are correctly localized in the language set by the JVM parameter "--locale xx:XX" passed as argument.

We would like to know if it is possible to localize them. 


Il giorno 03/dic/2017, alle ore 12.37, Emilian Bold ha scritto:

> I don't understand the problem here. Is you app not detecting the current macOS locale?
> 
> If the user has macOS in English clearly that system menu is in English in every other app.
> 
> NetBeans Platform is actually *more* flexible since the use is able to switch language while keeping macOS in another language. Try doing that with Safari.
> 
> --emi
> 
>> -------- Original Message --------
>> Subject: Re: How to customize Mac menu nowadays ?
>> Local Time: December 3, 2017 11:21 AM
>> UTC Time: December 3, 2017 9:21 AM
>> From: frederic@ancestris.org
>> To: users@netbeans.incubator.apache.org
>> 
>> Hummm. Thanks a lot Marco.
>> 
>> Are we the only ones developping non english speaking java applications on MacOS ? I cannot beleive nobody encountered this issue before...
>> 
>> Best regards,
>> Fred
>> 
>> Le vendredi 01 décembre 2017 à 08:42 +0100, Marco Rossi a écrit :
>>> No, it doesn’t work :-( I tried both creating German.lproj and Italian.lproj that is my default system language. Also tried with other variants as “it.lproj" for example but with not success.
>>> 
>>>> Il giorno 30 nov 2017, alle ore 19:50, frederic  ha scritto:
>>>> 
>>>> Hi Marco,
>>>> 
>>>> Thank you. These links are good to have !
>>>> Then, all relies on being able to get the localization to work before I can customize the event handlers. (if I cannot translate them, I am better off hiding them)
>>>> 
>>>> 
>>>> I have just found this link below on the internet : have you tried it before or would you be able to try if please  ? (I do not have MacOS on my machine).
>>>> In particular this : test.app/Contents/Resources/German.lproj
>>>> This shold get your menu in German... Does it work ?
>>>> https://stackoverflow.com/questions/28560911/internationalization-of-native-mac-menu-bar
>>>> 
>>>> 
>>>> Best regards,
>>>> Fred
>>>> 
>>>> Le jeudi 30 novembre 2017 à 09:36 +0100, Marco Rossi a écrit :
>>>>> I tried with my application and get the same result: all the menus are localized according to the --locale it:IT, except for these submenu items (they are displayed in english).
>>>>> 
>>>>> I googled to find more information about how Java applications integrates themselves into OS X; I think indeed that this is not a Netbeans related issue, even if in Netbeans exists the module org.netbeans.modules.applemenu that should help a RCP application to integrate better when running into a OS X environment.
>>>>> 
>>>>> Found at https://www.fenestrated.net/mirrors/Apple%20Technotes%20(As%20of%202002)/tn/tn2031.html an old technical note about java runtime properties for OS X but nothing about the language. The same for this article from Oracle site: http://www.oracle.com/technetwork/articles/java/javatomac-140486.html
>>>>> 
>>>>> As just said by Emilian, they are system’s submenu items, but I think it should be the way to get them localized.
>>>>> 
>>>>> Ah, during my searches I found also this page at http://moomoohk.github.io/snippets/java_osx.html with very other useful information about to get a better integration with more OS X recent features (when it is possibile, off course). Here you will find some suggestions to how you could override the default event handler  with your customized one (for example, the preferences menu item).
>>>>> 
>>>>>> Il giorno 29 nov 2017, alle ore 22:09, frederic  ha scritto:
>>>>>> Hi Marco,
>>>>>> 
>>>>>> Regarding the language displayed for the application menu below, are you sure the java argument --locale it:IT works ?
>>>>>> 
>>>>>> Apparently, a Mac user tried "--locale fr:FR" and got the ancestris menu in English.
>>>>>> 
>>>>>> Did he do something wrong ?
>>>>>> 
>>>>>> 
>>>>>>>>>>>>> 
>>>>>> 
>>>>>> Thanks again,
>>>>>> Fred
>>>>>> 
>>>>>> Le vendredi 24 novembre 2017 à 10:01 +0100, Marco Rossi a écrit :In my custom application I got the localization I wanted for both application and OS X main menu bar by adding the following key-value pair in platform.properties file:
>>>>>>> run.args.extra=--locale it:IT
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>>> 


Re: How to customize Mac menu nowadays ?

Posted by Emilian Bold <em...@protonmail.ch>.
I don't understand the problem here. Is you app not detecting the current macOS locale?

If the user has macOS in English clearly that system menu is in English in every other app.

NetBeans Platform is actually *more* flexible since the use is able to switch language while keeping macOS in another language. Try doing that with Safari.

--emi

>-------- Original Message --------
>Subject: Re: How to customize Mac menu nowadays ?
>Local Time: December 3, 2017 11:21 AM
>UTC Time: December 3, 2017 9:21 AM
>From: frederic@ancestris.org
>To: users@netbeans.incubator.apache.org
>
>Hummm. Thanks a lot Marco.
>
>Are we the only ones developping non english speaking java applications on MacOS ? I cannot beleive nobody encountered this issue before...
>
>Best regards,
>Fred
>
>Le vendredi 01 décembre 2017 à 08:42 +0100, Marco Rossi a écrit :
>>No, it doesn’t work :-( I tried both creating German.lproj and Italian.lproj that is my default system language. Also tried with other variants as “it.lproj" for example but with not success.
>>
>>>Il giorno 30 nov 2017, alle ore 19:50, frederic  ha scritto:
>>>
>>>Hi Marco,
>>>
>>>Thank you. These links are good to have !
>>>Then, all relies on being able to get the localization to work before I can customize the event handlers. (if I cannot translate them, I am better off hiding them)
>>>
>>>
>>>I have just found this link below on the internet : have you tried it before or would you be able to try if please  ? (I do not have MacOS on my machine).
>>>In particular this : test.app/Contents/Resources/German.lproj
>>>This shold get your menu in German... Does it work ?
>>>https://stackoverflow.com/questions/28560911/internationalization-of-native-mac-menu-bar
>>>
>>>
>>>Best regards,
>>>Fred
>>>
>>>Le jeudi 30 novembre 2017 à 09:36 +0100, Marco Rossi a écrit :
>>>>I tried with my application and get the same result: all the menus are localized according to the --locale it:IT, except for these submenu items (they are displayed in english).
>>>>
>>>>I googled to find more information about how Java applications integrates themselves into OS X; I think indeed that this is not a Netbeans related issue, even if in Netbeans exists the module org.netbeans.modules.applemenu that should help a RCP application to integrate better when running into a OS X environment.
>>>>
>>>>Found at https://www.fenestrated.net/mirrors/Apple%20Technotes%20(As%20of%202002)/tn/tn2031.html an old technical note about java runtime properties for OS X but nothing about the language. The same for this article from Oracle site: http://www.oracle.com/technetwork/articles/java/javatomac-140486.html
>>>>
>>>>As just said by Emilian, they are system’s submenu items, but I think it should be the way to get them localized.
>>>>
>>>>Ah, during my searches I found also this page at http://moomoohk.github.io/snippets/java_osx.html with very other useful information about to get a better integration with more OS X recent features (when it is possibile, off course). Here you will find some suggestions to how you could override the default event handler  with your customized one (for example, the preferences menu item).
>>>>
>>>>>Il giorno 29 nov 2017, alle ore 22:09, frederic  ha scritto:
>>>>>Hi Marco,
>>>>>
>>>>>Regarding the language displayed for the application menu below, are you sure the java argument --locale it:IT works ?
>>>>>
>>>>>Apparently, a Mac user tried "--locale fr:FR" and got the ancestris menu in English.
>>>>>
>>>>>Did he do something wrong ?
>>>>>
>>>>>
>>>>>> >>>>>>
>>>>>
>>>>>Thanks again,
>>>>>Fred
>>>>>
>>>>>Le vendredi 24 novembre 2017 à 10:01 +0100, Marco Rossi a écrit :In my custom application I got the localization I wanted for both application and OS X main menu bar by adding the following key-value pair in platform.properties file:
>>>>>>run.args.extra=--locale it:IT
>>>>>>
>>>>>>
>>>>>
>>>>>

Re: How to customize Mac menu nowadays ?

Posted by frederic <fr...@ancestris.org>.
Hummm. Thanks a lot Marco.
Are we the only ones developping non english speaking java applications
on MacOS ? I cannot beleive nobody encountered this issue before...
Best regards,Fred
Le vendredi 01 décembre 2017 à 08:42 +0100, Marco Rossi a écrit :
> No, it doesn’t work :-( I tried both creating German.lproj and
> Italian.lproj that is my default system language. Also tried with
> other variants as “it.lproj" for example but with not success.
> > Il giorno 30 nov 2017, alle ore 19:50, frederic <frederic@ancestris
> > .org> ha scritto:
> > 
> > Hi Marco,
> > Thank you. These links are good to have !Then, all relies on being
> > able to get the localization to work before I can customize the
> > event handlers. (if I cannot translate them, I am better off hiding
> > them)
> > 
> > I have just found this link below on the internet : have you tried
> > it before or would you be able to try if please  ? (I do not have
> > MacOS on my machine).In particular this :
> > test.app/Contents/Resources/German.lprojThis shold get your menu in
> > German... Does it work ?https://stackoverflow.com/questions/2856091
> > 1/internationalization-of-native-mac-menu-bar
> > 
> > Best regards,Fred
> > Le jeudi 30 novembre 2017 à 09:36 +0100, Marco Rossi a écrit :
> > > I tried with my application and get the same result: all the
> > > menus are localized according to the --locale it:IT, except for
> > > these submenu items (they are displayed in english).
> > > 
> > > I googled to find more information about how Java applications
> > > integrates themselves into OS X; I think indeed that this is not
> > > a Netbeans related issue, even if in Netbeans exists the module
> > > org.netbeans.modules.applemenu that should help a RCP application
> > > to integrate better when running into a OS X environment.
> > > 
> > > Found at https://www.fenestrated.net/mirrors/Apple%20Technotes%20
> > > (As%20of%202002)/tn/tn2031.html an old technical note about java
> > > runtime properties for OS X but nothing about the language. The
> > > same for this article from Oracle site: http://www.oracle.com/tec
> > > hnetwork/articles/java/javatomac-140486.html
> > > 
> > > As just said by Emilian, they are system’s submenu items, but I
> > > think it should be the way to get them localized.
> > > 
> > > Ah, during my searches I found also this page at http://moomoohk.
> > > github.io/snippets/java_osx.html with very other useful
> > > information about to get a better integration with more OS X
> > > recent features (when it is possibile, off course). Here you will
> > > find some suggestions to how you could override the default event
> > > handler  with your customized one (for example, the preferences
> > > menu item).
> > > 
> > > > Il giorno 29 nov 2017, alle ore 22:09, frederic <frederic@ances
> > > > tris.org> ha scritto:
> > > > Hi Marco, 
> > > > 
> > > > Regarding the language displayed for the application menu
> > > > below, are you sure the java argument --locale it:IT works ?
> > > > 
> > > > Apparently, a Mac user tried "--locale fr:FR" and got the
> > > > ancestris menu in English.
> > > > 
> > > > Did he do something wrong ?
> > > > 
> > > > 
> > > > > <ancestris_capture.png> 
> > > > 
> > > > 
> > > > Thanks again,
> > > > Fred
> > > > 
> > > >  Le vendredi 24 novembre 2017 à 10:01 +0100, Marco Rossi a
> > > > écrit :In my custom application I got the localization I wanted
> > > > for both application and OS X main menu bar by adding the
> > > > following key-value pair in platform.properties file:
> > > > > run.args.extra=--locale it:IT

Re: How to customize Mac menu nowadays ?

Posted by Marco Rossi <ma...@markreds.it>.
No, it doesn’t work :-( I tried both creating German.lproj and Italian.lproj that is my default system language. Also tried with other variants as “it.lproj" for example but with not success.

> Il giorno 30 nov 2017, alle ore 19:50, frederic <fr...@ancestris.org> ha scritto:
> 
> Hi Marco,
> 
> Thank you. These links are good to have !
> Then, all relies on being able to get the localization to work before I can customize the event handlers. (if I cannot translate them, I am better off hiding them)
> 
> 
> I have just found this link below on the internet : have you tried it before or would you be able to try if please  ? (I do not have MacOS on my machine).
> In particular this : test.app/Contents/Resources/German.lproj
> This shold get your menu in German... Does it work ?
> https://stackoverflow.com/questions/28560911/internationalization-of-native-mac-menu-bar <https://stackoverflow.com/questions/28560911/internationalization-of-native-mac-menu-bar>
> 
> 
> Best regards,
> Fred
> 
> Le jeudi 30 novembre 2017 à 09:36 +0100, Marco Rossi a écrit :
>> I tried with my application and get the same result: all the menus are localized according to the --locale it:IT, except for these submenu items (they are displayed in english).
>> 
>> I googled to find more information about how Java applications integrates themselves into OS X; I think indeed that this is not a Netbeans related issue, even if in Netbeans exists the module org.netbeans.modules.applemenu that should help a RCP application to integrate better when running into a OS X environment.
>> 
>> Found at https://www.fenestrated.net/mirrors/Apple%20Technotes%20(As%20of%202002)/tn/tn2031.html <https://www.fenestrated.net/mirrors/Apple%20Technotes%20(As%20of%202002)/tn/tn2031.html> an old technical note about java runtime properties for OS X but nothing about the language. The same for this article from Oracle site: http://www.oracle.com/technetwork/articles/java/javatomac-140486.html <http://www.oracle.com/technetwork/articles/java/javatomac-140486.html>
>> 
>> As just said by Emilian, they are system’s submenu items, but I think it should be the way to get them localized.
>> 
>> Ah, during my searches I found also this page at http://moomoohk.github.io/snippets/java_osx.html <http://moomoohk.github.io/snippets/java_osx.html> with very other useful information about to get a better integration with more OS X recent features (when it is possibile, off course). Here you will find some suggestions to how you could override the default event handler  with your customized one (for example, the preferences menu item).
>> 
>>> Il giorno 29 nov 2017, alle ore 22:09, frederic <frederic@ancestris.org <ma...@ancestris.org>> ha scritto:
>>> Hi Marco,
>>> 
>>> Regarding the language displayed for the application menu below, are you sure the java argument --locale it:IT works ?
>>> 
>>> Apparently, a Mac user tried "--locale fr:FR" and got the ancestris menu in English.
>>> 
>>> Did he do something wrong ?
>>> 
>>> 
>>>> <ancestris_capture.png>
>>> 
>>> 
>>> 
>>> Thanks again,
>>> Fred
>>> 
>>> Le vendredi 24 novembre 2017 à 10:01 +0100, Marco Rossi a écrit :In my custom application I got the localization I wanted for both application and OS X main menu bar by adding the following key-value pair in platform.properties file:
>>>> run.args.extra=--locale it:IT
>>> 
>>> 
>> 


Re: How to customize Mac menu nowadays ?

Posted by frederic <fr...@ancestris.org>.
Hi Marco,
Thank you. These links are good to have !Then, all relies on being able
to get the localization to work before I can customize the event
handlers. (if I cannot translate them, I am better off hiding them)

I have just found this link below on the internet : have you tried it
before or would you be able to try if please  ? (I do not have MacOS on
my machine).In particular this :
test.app/Contents/Resources/German.lprojThis shold get your menu in
German... Does it work ?https://stackoverflow.com/questions/28560911/in
ternationalization-of-native-mac-menu-bar

Best regards,Fred
Le jeudi 30 novembre 2017 à 09:36 +0100, Marco Rossi a écrit :
> I tried with my application and get the same result: all the menus
> are localized according to the --locale it:IT, except for these
> submenu items (they are displayed in english).
> 
> I googled to find more information about how Java applications
> integrates themselves into OS X; I think indeed that this is not a
> Netbeans related issue, even if in Netbeans exists the module
> org.netbeans.modules.applemenu that should help a RCP application to
> integrate better when running into a OS X environment.
> 
> Found at https://www.fenestrated.net/mirrors/Apple%20Technotes%20(As%
> 20of%202002)/tn/tn2031.html an old technical note about java runtime
> properties for OS X but nothing about the language. The same for this
> article from Oracle site: http://www.oracle.com/technetwork/articles/
> java/javatomac-140486.html
> 
> As just said by Emilian, they are system’s submenu items, but I think
> it should be the way to get them localized.
> 
> Ah, during my searches I found also this page at http://moomoohk.gith
> ub.io/snippets/java_osx.html with very other useful information about
> to get a better integration with more OS X recent features (when it
> is possibile, off course). Here you will find some suggestions to how
> you could override the default event handler  with your customized
> one (for example, the preferences menu item).
> 
> > Il giorno 29 nov 2017, alle ore 22:09, frederic <frederic@ancestris
> > .org> ha scritto:
> > Hi Marco, 
> > 
> > Regarding the language displayed for the application menu below,
> > are you sure the java argument --locale it:IT works ?
> > 
> > Apparently, a Mac user tried "--locale fr:FR" and got the ancestris
> > menu in English.
> > 
> > Did he do something wrong ?
> > 
> > 
> > > <ancestris_capture.png> 
> > 
> > 
> > Thanks again,
> > Fred
> > 
> >  Le vendredi 24 novembre 2017 à 10:01 +0100, Marco Rossi a
> > écrit :In my custom application I got the localization I wanted for
> > both application and OS X main menu bar by adding the following
> > key-value pair in platform.properties file:
> > > run.args.extra=--locale it:IT

Re: How to customize Mac menu nowadays ?

Posted by Marco Rossi <ma...@markreds.it>.
I tried with my application and get the same result: all the menus are localized according to the --locale it:IT, except for these submenu items (they are displayed in english).

I googled to find more information about how Java applications integrates themselves into OS X; I think indeed that this is not a Netbeans related issue, even if in Netbeans exists the module org.netbeans.modules.applemenu that should help a RCP application to integrate better when running into a OS X environment.

Found at https://www.fenestrated.net/mirrors/Apple%20Technotes%20(As%20of%202002)/tn/tn2031.html <https://www.fenestrated.net/mirrors/Apple%20Technotes%20(As%20of%202002)/tn/tn2031.html> an old technical note about java runtime properties for OS X but nothing about the language. The same for this article from Oracle site: http://www.oracle.com/technetwork/articles/java/javatomac-140486.html <http://www.oracle.com/technetwork/articles/java/javatomac-140486.html>

As just said by Emilian, they are system’s submenu items, but I think it should be the way to get them localized.

Ah, during my searches I found also this page at http://moomoohk.github.io/snippets/java_osx.html <http://moomoohk.github.io/snippets/java_osx.html> with very other useful information about to get a better integration with more OS X recent features (when it is possibile, off course). Here you will find some suggestions to how you could override the default event handler  with your customized one (for example, the preferences menu item).

> Il giorno 29 nov 2017, alle ore 22:09, frederic <fr...@ancestris.org> ha scritto:
> 
> Hi Marco,
> 
> Regarding the language displayed for the application menu below, are you sure the java argument --locale it:IT works ?
> 
> Apparently, a Mac user tried "--locale fr:FR" and got the ancestris menu in English.
> 
> Did he do something wrong ?
> 
> 
>> <ancestris_capture.png>
> 
> 
> 
> Thanks again,
> Fred
> 
> Le vendredi 24 novembre 2017 à 10:01 +0100, Marco Rossi a écrit :In my custom application I got the localization I wanted for both application and OS X main menu bar by adding the following key-value pair in platform.properties file:
>> run.args.extra=--locale it:IT
> 
> 


Re: How to customize Mac menu nowadays ?

Posted by frederic <fr...@ancestris.org>.
Hi Marco, 
Regarding the language displayed for the application menu below, are
you sure the java argument --locale it:IT works ?
Apparently, a Mac user tried "--locale fr:FR" and got the ancestris
menu in English.
Did he do something wrong ?

>  

Thanks again,Fred
 Le vendredi 24 novembre 2017 à 10:01 +0100, Marco Rossi a écrit :In my
custom application I got the localization I wanted for both application
and OS X main menu bar by adding the following key-value pair in
platform.properties file:
> run.args.extra=--locale it:IT

Re: How to customize Mac menu nowadays ?

Posted by Marco Rossi <ma...@markreds.it>.
In my custom application I got the localization I wanted for both application and OS X main menu bar by adding the following key-value pair in platform.properties file:

run.args.extra=--locale it:IT

(where italian is my default preferred language).

To customize the main menu title is more complex but not impossibile. I got it by adding the following changes:

1. add key-value pair "app.name=${branding.token}” to project.properties file.

2. Change the ant build script file in the “build-mac” target by adding the following lines:
	<copy file="${basedir}/harness/etc/Info.plist" tofile="${dist.dir}/${app.title}.app/Contents/Info.plist">
            <filterchain>
                <replacestring from="$${app.name}" to="${app.name}"/>
                <replacestring from="$${app.version}" to="${app.version}"/>
                <replacestring from="$${app.title}" to="${app.title}"/>
                <replacestring from="$${app.icon}" to="master.png"/>
                <replacestring from="$${branding.token}" to="${branding.token}"/>
                <replacestring from="$${app.title}" to="${app.title}"/>
            </filterchain>
        </copy>

3. In your project source directory create the /harness/etc/Info.plist file with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
  <dict>

    <key>CFBundleName</key>
    <string>${app.title}</string>
    
    <key>CFBundleVersion</key>
    <string>${app.version}</string>
    
    <key>CFBundleExecutable</key>
    <string>${app.name}</string>
    
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    
    <key>CFBundleShortVersionString</key>
    <string>${app.version}</string>
    
    <key>CFBundleSignature</key>
    <string>????</string>
    
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    
    <key>CFBundleIconFile</key>
    <string>${app.name}.icns</string>
  </dict>
</plist>

Please note that in this way you will get the customized menu bar only when you build the final application package (Package as > Mac OS X Application), not while debugging from the Netbeans IDE. Also note that the script customizes the application bundle icon used by Finder.

Hope this will helps you. I done this a long time ago and I don’t remember where I found these guidelines but remember that I got some headaches before it works as I wanted.


> Il giorno 24 nov 2017, alle ore 08:31, Emilian Bold <em...@protonmail.ch> ha scritto:
> 
> I'm not entirely certain you can localize that menu. It might just use the language of macOS. Did you try switching your macOS language and see if it impacts the NetBeans Platform app too?
> 
> About should open your about window, preferences should open the Platform options window. Does none of that work?
> 
> Some of the related code is in the applemenu module which is part of the platform.
> 
> --emi
> 
>> -------- Original Message --------
>> Subject: How to customize Mac menu nowadays ?
>> Local Time: November 24, 2017 8:25 AM
>> UTC Time: November 24, 2017 6:25 AM
>> From: frederic@ancestris.org
>> To: users@netbeans.incubator.apache.org
>> 
>> Hi,
>> 
>> I am using Netbeans to develop and promote the Ancestris application.
>> 
>> I have an issue with customizing the main menu bar on Mac.
>> 
>> The system menu remains in english and I cannot control what appears and localize it.
>> 
>> 
>> 
>> You can see than iOS adds an "ancestris" item in the menu bar that we do not have on Windows or Linux. The name starts with a small capital letter (I cannot change it). It is taken from the netbeans application name which cannot have capitalized letters.
>> 
>> Secondly, the drop-down menu that appears is in english. I would like to be able to localize it, we have many other different languages.
>> 
>> Thirdly, the menu items in the drop down menu do nothing. I would like to hide/show them selectively and control the piece of code that they call.
>> 
>> I have tried many things found on the Internet including Netbeans stackoverflow. But none works to get me to what I have described above. It appears the solutions found on the internet older than a year or two no longer work.
>> 
>> Any know current solution for this would be greatly appreciated !
>> 
>> Thank you,
>> Fred
>> 


Re: How to customize Mac menu nowadays ?

Posted by Emilian Bold <em...@protonmail.ch>.
I'm not entirely certain you can localize that menu. It might just use the language of macOS. Did you try switching your macOS language and see if it impacts the NetBeans Platform app too?

About should open your about window, preferences should open the Platform options window. Does none of that work?

Some of the related code is in the applemenu module which is part of the platform.

--emi

>-------- Original Message --------
>Subject: How to customize Mac menu nowadays ?
>Local Time: November 24, 2017 8:25 AM
>UTC Time: November 24, 2017 6:25 AM
>From: frederic@ancestris.org
>To: users@netbeans.incubator.apache.org
>
>Hi,
>
>I am using Netbeans to develop and promote the Ancestris application.
>
>I have an issue with customizing the main menu bar on Mac.
>
>The system menu remains in english and I cannot control what appears and localize it.
>
>
>
>You can see than iOS adds an "ancestris" item in the menu bar that we do not have on Windows or Linux. The name starts with a small capital letter (I cannot change it). It is taken from the netbeans application name which cannot have capitalized letters.
>
>Secondly, the drop-down menu that appears is in english. I would like to be able to localize it, we have many other different languages.
>
>Thirdly, the menu items in the drop down menu do nothing. I would like to hide/show them selectively and control the piece of code that they call.
>
>I have tried many things found on the Internet including Netbeans stackoverflow. But none works to get me to what I have described above. It appears the solutions found on the internet older than a year or two no longer work.
>
>Any know current solution for this would be greatly appreciated !
>
>Thank you,
>Fred
>