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

Make sure strings fall back to English if missing in the Notification extension #6000

Merged
merged 2 commits into from
Apr 6, 2022

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Apr 6, 2022

This was a long running bug which become more visible following on from #5936. Instead of using NSString.localizedUserNotificationString which provides no fallback, this PR adds a localizedString(forKey:_:) method that uses similar logic to VectorL10n, but specifically requests the strings from the main app bundle.

In order for this to work, MXKLanguageBundle now always references Bundle.app instead of Bundle.main so that setupMXKLanguageBundle was called on the same bundle that the strings request goes to. I've updated VectorL10n to do the same thing - this has the happy coincidence of allowing the share extension to show in the system language as well which I don't believe it was doing before 😄

Fixes #5996

@pixlwave pixlwave requested review from a team and gileluard and removed request for a team April 6, 2022 14:54
Copy link
Contributor

@gileluard gileluard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Good catch!

@github-actions
Copy link

github-actions bot commented Apr 6, 2022

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/yBuLXE

@pixlwave pixlwave merged commit d45ec1f into hotfix/1.8.11 Apr 6, 2022
@pixlwave pixlwave deleted the doug/5996_nse_strings branch April 6, 2022 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants