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

Update deprecated navigator.appVersion function #6167

Merged
merged 5 commits into from
Jan 28, 2025
Merged

Conversation

acwhite211
Copy link
Member

@acwhite211 acwhite211 commented Jan 28, 2025

Fixes #6129

It seems this line is causing the weblate localization workflow to fail:

const altKeyName = globalThis.navigator?.appVersion.includes('Mac')
? 'Option'
: 'Alt';

Example error: https://github.com/specify/specify7/actions/runs/12128718100/job/33815688425

The navigator.appVersion function has been deprecated and can be replaced with navigator.userAgent in order to get platform information, like the user's OS. This change will also handle both browser and non-browser environments.

Once this is merged into production, the weblate localization workflow will run again and we can see if any other issues occur.

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)

Testing instructions

No testing now, need to merge into production and test the weblate localization workflows.

Triggered by dacec9e on branch refs/heads/issue-6129
@CarolineDenis CarolineDenis requested a review from a team January 28, 2025 17:37
@CarolineDenis CarolineDenis requested a review from a team January 28, 2025 17:38
@acwhite211 acwhite211 merged commit 425040a into production Jan 28, 2025
12 checks passed
@acwhite211 acwhite211 deleted the issue-6129 branch January 28, 2025 18:22
@melton-jason
Copy link
Contributor

melton-jason commented Jan 28, 2025

The fix introduced in this PR has actually already been addressed and implemented in a PR! 😅: #5389

Could we merge that PR as well? There is still some value in its implementation, so it probably shouldn't be closed

@CarolineDenis
Copy link
Contributor

@melton-jason, yes we should

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Fix failing tests in prod || Weblate fixes
5 participants