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?
  • From: Lakshmi P Shanmugam <lshanmug@xxxxxxxxxx>
  • Date: Thu, 27 Jan 2022 10:05:50 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CPXfVXRNLbeFb3vdLYmaw59TznPgGCb6IyBccEadOFw=; b=FLQpqgS0UFSKS+UJItZkROBA9J/nCltd+DJyvOG6L9gBfeGCKp5f6Nfp4CDr9jTOE81YgA8CSFFL8UpZPQTzGIjIgtIr8aUm02g2v9RjDNBkIYImh3YmWva0I9XWJQf3msjFeTxWElDd+b1Y+RRPUHWMme0Eq2uFYPGIUJBSz9bwYFnCdOt9Undcjv2WfFie10V6AJcW1rVJ9J/QCCQDaL7AjtHjRbbWERDlr8Atm55WdutbljiA7vqHr4KxVPIBP8+D9OVpeqHXNt/4seOy+pe0mcvTJ0+Cds/ZM3pIxh5XqWREwRDGrGmI7W9Ellz9nw8XhMMOaTbMwEIpY/1HYg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S7WoGf25L0Oao3JFVAxjHljGcEiiyshV8/bWZReWLLCcgmeG2FBvc1SwHeS/zXUWdaQ9M8sHNdFxtzX6thJCQmuBMgzJlTvXM2t338Q3okB7DcVOdXi2y/rdSWIoSIVJBpgrb3jagI+5h8Kqjup+Fb5kajPeq4UtOoqAoZfvfQBgn7dXIB7Oomx+0tMcXTkBTxla0bc57YH0y2jw4EWk0jI2hxF+FKw9G2XY3rjFxRCOPfJR8wpRgz7II2uDQmRKrNJaBMa2CJSAEDEkipDKm2dLWRrrmcyUEgFlKXMlqwmB/xfVu6YsITPMrudkvDiUiPTMwfS9gOFFM3mzrG6JFQ==
  • Delivered-to: eclipse-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/eclipse-dev/>
  • List-help: <mailto:eclipse-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/eclipse-dev>, <mailto:eclipse-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/eclipse-dev>, <mailto:eclipse-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHYE2V2znj99RWKzkihHO+wqY3MMA==
  • Thread-topic: [eclipse-dev] How to make the Mac generated menu entries language specific in RCP?

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


Back to the top