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

[UI/UX] Refactor and enable seasonal splash messages #5009

Merged
merged 3 commits into from
Dec 19, 2024

Conversation

Fontbane
Copy link
Contributor

@Fontbane Fontbane commented Dec 18, 2024

What are the changes the user will see?

  • Seasonal splash messages will show up in the appropriate time period if splashes for that season exist for their language
  • There are currently 3 "seasons" for splash messages:
    • Halloween from October 15 to October 31
    • Xmas from December 16 to December 31
    • NewYears from December 31 to the following year's January 14
  • Seasonal splash message weights bumped from 10 to 20

Why am I making these changes?

  • We can now be festive and jolly
  • Makes it easier for each locale to have different splash messages without having to localize a reference which may not work
  • Puts less pressure on translation team

What are the changes from a developer perspective?

  • Instead of returning a list of locale keys defined in splash-messages.ts, i18next is used to get all the splash texts for the user's language at once as a json object. Then, all the keys that exist in the "common" category are put in a list, and then if the time matches with a season, all the keys found in that season are pushed to the list. THIS REQUIRES THE LATEST CHANGES FROM THE LOCALE REPO. This way, the game will only choose splash texts that are defined in the language.
  • Sets USE_SEASONAL_SPLASH_MESSAGES to true
  • Updates data/splash_messages test to reflect these changes

Screenshots/Videos

Screenshot_991

How to test the changes?

Checklist

  • I'm using beta as my base branch
  • There is no overlap with another PR?
  • The PR is self-contained and cannot be split into smaller PRs?
  • Have I provided a clear explanation of the changes?
  • Have I tested the changes manually?
  • Are all unit tests still passing? (npm run test)
    • Have I created new automated tests (npm run create-test) or updated existing tests related to the PR's changes?
  • Have I provided screenshots/videos of the changes (if applicable)?
    • Have I made sure that any UI change works for both UI themes (default and legacy)?

Are there any localization additions or changes? If so:

  • Has a locales PR been created on the locales repo?
    • If so, please leave a link to it here: PR-locale PR#79 MERGED
  • Has the translation team been contacted for proofreading/translation?

@Madmadness65 Madmadness65 added UI/UX User interface/-experience related Refactor Rewriting existing code related labels Dec 19, 2024
@Fontbane Fontbane marked this pull request as ready for review December 19, 2024 16:47
@Fontbane Fontbane requested a review from a team as a code owner December 19, 2024 16:47
@DayKev DayKev merged commit 806585f into pagefaultgames:beta Dec 19, 2024
13 checks passed
DayKev added a commit that referenced this pull request Dec 19, 2024
DayKev added a commit that referenced this pull request Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Rewriting existing code related UI/UX User interface/-experience related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants