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

Fix language not being set #1847

Merged
merged 5 commits into from
Sep 25, 2023
Merged

Conversation

jennantilla
Copy link
Contributor

@jennantilla jennantilla commented Sep 21, 2023

Description

One Line Summary

This fixes an issue where language was not being set as a user property when a new user is created.

Details

This issue resulted in language being set as "en" by default despite device settings.
In order to send the language we are building upon the properties map added in #1842. An additional property set there (language) will be hydrated to the properties model when the response is received.

This fixes #1843

Motivation

Ensure language matches device.

Scope

user properties during createUser

Testing

Unit testing

Added language to properties object in unit tests. Ran/passed unit tests.

Manual testing

Tested a fresh install with a Pixel 7 emulator running Android 13 with device language set to French. User is created with language code 'fr' and reflected in dashboard.

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

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

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

This change is Reviewable

@jennantilla
Copy link
Contributor Author

@nan-li noticed we needed to update LoginUserOperationExecutor tests to take in the additional parameter of MockHelper.languageContext(). See d49858c

cc @jkasten2

@nan-li nan-li changed the base branch from user-model/main to fix/timezone_id_not_set September 22, 2023 20:29
Base automatically changed from fix/timezone_id_not_set to user-model/main September 25, 2023 17:30
@jennantilla jennantilla merged commit bb041ad into user-model/main Sep 25, 2023
1 of 2 checks passed
@jennantilla jennantilla deleted the fix/language_not_set branch September 25, 2023 17:58
@jennantilla jennantilla mentioned this pull request Sep 25, 2023
jinliu9508 pushed a commit that referenced this pull request Jan 31, 2024
jinliu9508 pushed a commit that referenced this pull request Jan 31, 2024
jinliu9508 pushed a commit that referenced this pull request Feb 6, 2024
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.

None yet

3 participants