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

Introduce language functions on User model #1171

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ElwynVdb
Copy link

@ElwynVdb ElwynVdb commented Apr 25, 2024

Description

This pull request introduces setLanguage and getLanguage on the user class + namespace, to set the language

Details

Systems Affected

  • WebSDK
  • Backend
  • Dashboard

Checklist

  • All the automated tests pass or I explained why that is not possible
  • I have personally tested this on my machine or explained why that is not possible
  • I have included test coverage for these changes or explained why they are not needed

Validation

  • Changes were tested in conjunction with the a running local dev server.

Benefits

  • Being able to set the within the front-end SDK without needing to manually send a request to the API or use the back-end SDK

Tests

  • Introduced a getLanguage test in user.test.ts

This change is Reviewable

@veewee
Copy link

veewee commented May 3, 2024

@jkasten2 / @rgomezp

Would this be something you are interested in merging?

It's a feature we want to use in our project:

When registering, the browser language is selected by default. However, we can tell from our user settings what language is preferred. There current workaround is to call the REST API manually instead of using a built-in SDK function.

Let us know if we can do anything to help you getting this into this repository.

(we provided a second PR on react-onesignal to have a wrapper in there as well : OneSignal/react-onesignal#143)

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