Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] How to make the Mac generated menu entries language specific in RCP?

Thanks Lakshmi . I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=578406

We see the same problem with macOS BigSur as well, assuming that this
is the version which is 2-3 years old. I don't have access to the
client machine so I cannot check at the moment.

On Thu, Jan 27, 2022 at 11:06 AM Lakshmi P Shanmugam
<lshanmug@xxxxxxxxxx> wrote:
>
> Hi Lars,
>
> I didn't check on macOS Monterey, but the DefaultApp.nib files under locale folders seem to be missing on macOS BigSur as well. Do you see the same problem with the application on BigSur? Can you please open a SWT bug for this issue?
>
> Looks like the missing strings were never added to the properties file for localization, so that needs to be fixed too.
>
> Thanks & Regards,
> Lakshmi P Shanmugam
>
> On 25/01/22, 1:17 PM, "eclipse-dev on behalf of Lars Vogel" <eclipse-dev-bounces@xxxxxxxxxxx on behalf of lars.vogel@xxxxxxxxxxx> wrote:
>
>     Thanks, Nikita.
>
>     The same problem was reported for https://github.com/buchen/portfolio/
>
>     https://github.com/buchen/portfolio/issues/2652#issuecomment-1020562104
>     indicates that this is a problem with SWT.
>
>     Quote:
>     ---------------
>     When i look at Display.java from
>     org.eclipse.swt.cocoa.macosx.aarch64_3.117.0.v20210906-0842.jar the
>     code searches for a DefaultApp.nib file (Line 5657) to create the
>     system menu. But the current MacOS Monterey doesn't provide this file.
>     This happened in the past with older versions of MacOS (see
>     https://bugs.eclipse.org/bugs/show_bug.cgi?id=520176 ).
>
>     In Display.java there is a fallback, when the DefaultApp.nib is not
>     found. ( createMainMenu() ). This fallback uses
>     SWT.getMessage("Preferences...") and looks in the properties file of
>     the language pack (org.eclipse.swt.nl_de_4.21.0.v20210925020001.jar).
>     But there is no entry for the key "Preferences...". And so the english
>     text is used.
>
>     I don't know if I'm right, but to me this looks like a problem of SWT
>     and/or MacOS.
>     ---------------
>
>     What do you think?
>
>     Best regards, Lars
>
>     On Tue, Jan 25, 2022 at 10:32 AM Nikita Nemkin <nikita@xxxxxxxxx> wrote:
>     >
>     > Hi Lars,
>     >
>     > You could try the -AppleLanguage "(de)" command line argument to set
>     > the language of native localized strings. Note the parentheses, the
>     > value is actually a list of preferred languages.
>     >
>     > -nl won't work because there is no API to set the current application
>     > language on macOS.
>     > Instead, the current language is derived from a list of preferred user
>     > languages (the AppleLanguage setting) and a list of languages that the
>     > main bundle supports (the CFBundleLocalizations key). The read-only
>     > API for this is Bundle.main.preferredLocalizations.first.
>     >
>     > AppleLanguage can be set globally and per application in the System
>     > Preferences or overridden on the command line like the above example.
>     >
>     > Another related setting is AppleLocale, which affects number/date
>     > formatting etc. It also can be overridden on the command line, for
>     > example: -AppleLocale de_DE.
>     >
>     > I believe command line overrides are intended for localization testing
>     > only and shouldn't be used in production.
>     >
>     >
>     > On Wed, Jan 19, 2022 at 5:25 PM Lars Vogel <lars.vogel@xxxxxxxxxxx> wrote:
>     > >
>     > > Hello,
>     > >
>     > > We tried Alex suggestions with the help of the
>     > > https://github.com/buchen/fix-info-plist-maven-plugin  plug-in and the
>     > > generated info.plist contains the following entries:
>     > >
>     > > <key>CFBundleLocalizations</key>
>     > >     <array>
>     > >         <string>English</string>
>     > >         <string>French</string>
>     > >         <string>German</string>
>     > >     </array>
>     > >
>     > > See attachment for the complete file.
>     > >
>     > > We also tried with the language keys, as we saw that
>     > > https://www.portfolio-performance.info/  uses these keys. Unfortunately
>     > > this app also does not translate the About, Preferences, Hide, Show
>     > > all, Services. See attached screenshot.
>     > >
>     > > <key>CFBundleLocalizations</key>
>     > >     <array>
>     > >         <string>en</string>
>     > >         <string>fr</string>
>     > >         <string>de</string>
>     > >     </array>
>     > >
>     > > For testing we added the "-nl de" as a fixed program argument.
>     > >
>     > > Does anyone know what we are missing?
>     > >
>     > > Best regards, Lars
>     > >
>     > > --
>     > > Eclipse Platform project co-lead
>     > > CEO vogella GmbH
>     > >
>     > > Haindaalwisch 17a, 22395 Hamburg
>     > > Amtsgericht Hamburg: HRB 127058
>     > > Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
>     > > USt-IdNr.: DE284122352
>     > > Fax (040) 5247 6322, Email: lars.vogel@xxxxxxxxxxx, Web: http://www.vogella.com
>     > > _______________________________________________
>     > > eclipse-dev mailing list
>     > > eclipse-dev@xxxxxxxxxxx
>     > > To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/eclipse-dev
>     >
>     >
>     >
>     > --
>     > Best regards,
>     > Nikita Nemkin
>     > _______________________________________________
>     > eclipse-dev mailing list
>     > eclipse-dev@xxxxxxxxxxx
>     > To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/eclipse-dev
>
>
>
>     --
>     Eclipse Platform project co-lead
>     CEO vogella GmbH
>
>     Haindaalwisch 17a, 22395 Hamburg
>     Amtsgericht Hamburg: HRB 127058
>     Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
>     USt-IdNr.: DE284122352
>     Fax (040) 5247 6322, Email: lars.vogel@xxxxxxxxxxx, Web: http://www.vogella.com
>     _______________________________________________
>     eclipse-dev mailing list
>     eclipse-dev@xxxxxxxxxxx
>     To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/eclipse-dev
>
> _______________________________________________
> eclipse-dev mailing list
> eclipse-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/eclipse-dev



-- 
Eclipse Platform project co-lead
CEO vogella GmbH

Haindaalwisch 17a, 22395 Hamburg
Amtsgericht Hamburg: HRB 127058
Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
USt-IdNr.: DE284122352
Fax (040) 5247 6322, Email: lars.vogel@xxxxxxxxxxx, Web: http://www.vogella.com


Back to the top