Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only languages supported by Electron are declared as being supported to the OS #5717

Closed
2 tasks done
elmomalmo opened this issue Jan 5, 2022 · 11 comments
Closed
2 tasks done
Labels

Comments

@elmomalmo
Copy link

  • I have searched open and closed issues for duplicates
  • I am using Signal-Desktop as provided by the Signal team, not a 3rd-party package.

Bug Description

A macOS application contains meta data in the Resources folder that declare to the operating system what languages are supported by the application. This is achieved by the presence of <lang>.lproj folders in the ./Contents/Resources folder within the application package. Note that in the Signal application these folders are empty and only serve to declare to the OS what languages are supported.

In the Signal application package, the folders present are only those supported by Electron (presumably supported by Chrome) and not all of those supported by Signal via contributions in Transifex. This means that only a subset of the languages that Signal supports are actually available to Desktop users.

Steps to Reproduce

  1. Install Signal Desktop on macOS
  2. Go System Preferences -> Language & Region -> Apps
  3. Try to select Cymraeg — Welsh as the language for Signal.

Actual Result:

Welsh does not appear in the list of languages that can be selected despite being supported.

Expected Result:

Welsh is supported and is included in the application and it should appear in the list of languages

Additional Notes

Post installation, if an emptycy.lproj folder is added to the ./Contents/Resources folder, then Welsh becomes available in the list and – upon next launch – the UI of the application appears in Welsh. See screenshots.

Screenshots

Manually added folder:

image

image

image

Platform Info

Signal Version:

5.27.0-beta.3
production (M1)

Operating System:

macOS v12.0

Linked Device Version:

Link to Debug Log

@EvanHahn-Signal
Copy link
Contributor

Sorry about this! We'll take a look.

@unhammer
Copy link

Looks like #3871 ?

(Possible workaround while waiting for a real solution: sudo ln -s /path/to/Signal/locales/en.pak /path/to/Signal/locales/cy.pak )

@indutny-signal
Copy link
Contributor

I believe this should be fixed by 65e107f . Could you give a try to the latest beta, please?

@elmomalmo
Copy link
Author

Thanks for the quick fix. I can confirm that this is fixed in the latest beta for Windows. Looking at the code it looks like that it that it would work for darwin builds.

In testing, I am still seeing the problem in the latest beta 5.32.0-beta.1 production (M1) on MacOS 12.0 using Apple Silicon (M1).

Is there a different platform name (i.e. different to darwin) for M1 builds?

@scottnonnenberg-signal
Copy link
Contributor

@elmomalmo Could you be really specific about 'the problem?' - specifically, what is your OS locale, and then what are your locale-related environment variables? A debug log would also help us understand what's going on View -> Debug Log.

@elmomalmo
Copy link
Author

elmomalmo commented Feb 16, 2022

@scottnonnenberg-signal It's the same problem as described in the original issue report. Reading that should answer your question. Following the fix that has been put in place, the difference is that - now - it only continues to be a problem on Macs using Apple silicon. I can supply a debug log, but I don't think that it is relevant for this particular issue, since it is an issue during the build.

@elmomalmo
Copy link
Author

elmomalmo commented Feb 16, 2022

@scottnonnenberg-signal Please ignore my previous reply, I was mistaken.

The problem (see original report) still exists for all Macs. I can see where the code is going wrong.

As a result of the fix, new <lang>.lproj folders are being created in <application>.app/Contents/Frameworks/Electron Framework.framework/Resources/. This is the wrong location for the OS to pick them up.

The folders need to be created in <application>app/Contents/Resources/

To be clear, the originally described problem is fixed on Windows, but not on Mac.

See my comment on the commit 65e107f#r66806125

@EvanHahn-Signal
Copy link
Contributor

@elmomalmo Sorry about this—we'll take another look.

@indutny-signal
Copy link
Contributor

@elmomalmo could you try starting the app with /Applications/<application>.app/Contents/MacOS/<application> --lang=cy and see if it works for you? This is the way I tested this change, and it appears to be working fine on my end with new lproj files being placed alongside the ones provided by Electron natively.

@elmomalmo
Copy link
Author

elmomalmo commented Feb 24, 2022

@indutny-signal, thank you for looking into this. Running that command renders Signal using the Welsh language. Hopefully that helps you.

For what it is worth, I think that this would have worked before 65e107f

The issues isn't that Welsh isn't packaged and available in the application – it is there.

The issue is that MacOS does *not* know that Welsh is supported. The <lang>.lproj folders need to be present in the root ./Contents/Resources/ folder of the app for that to happen.

In my original issue report you will see that if I create an empty cy.lproj folder in ./Contents/Resources/ after installation, MacOS picks up on the fact that Welsh is supported and offers it as an option.

Edit: Added "*not*"

@indutny-signal
Copy link
Contributor

Gotcha. We will come up with a fix for this soon. Sorry again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

5 participants