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

adds react context and i18n to support language selection #37

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

Conversation

pragyakallanagoudar
Copy link
Contributor

@pragyakallanagoudar pragyakallanagoudar commented Apr 17, 2023

🎉 What's new in this PR 🎉

☁️ ☁️ Description ☁️ ☁️

Uses React Context and i18n to support language selection for static pieces of text on the Home and Grants screens. Adds Portuguese as one of the supported languages. Creates a bareboned settings screen for selecting between the three languages. Also makes some spacing changes to assets/icons.tsx and adds the settings icon.

Screenshots 📲

new button for settings (does not follow design)

screen for selecting the language

after selecting Portuguese, welcome screen static text changes

this change carries over to other screens, like the Grants screen

⚡ How to review ⚡

  1. Addition of Portuguese to src/i18n/i18n.translations.ts
  2. Creation of React Context in src/LanguageContext.tsx and src/navigation/RootNavigator.tsx
  3. Creation of settings screen in src/SettingsScreen
  4. Updates to src/HomeScreen/Home.tsx and src/GrantsScreen/Grants.tsx to use i18n and React Context

🌱 Next steps 🌱

The styling of the settings button on the welcome screen, as well as the language select screen itself, needs to be change to reflect the wireframes for the app.

Relevant Links 🔗

Online sources ℹ️

https://react.dev/learn/passing-data-deeply-with-context

https://stackoverflow.com/questions/66319603/react-context-for-changing-language

Related PRs 🙌

CC: @davidqing6432

@pragyakallanagoudar pragyakallanagoudar marked this pull request as ready for review April 23, 2023 23:13
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.

1 participant