-
Notifications
You must be signed in to change notification settings - Fork 0
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
pragyakallanagoudar
wants to merge
14
commits into
main
Choose a base branch
from
pragya/language-select
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragyakallanagoudar
force-pushed
the
pragya/language-select
branch
from
April 17, 2023 18:08
2a67ba0
to
2102399
Compare
pragyakallanagoudar
force-pushed
the
pragya/language-select
branch
from
April 23, 2023 23:02
f866223
to
746ca94
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎉 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 ⚡
src/i18n/i18n.translations.ts
src/LanguageContext.tsx
andsrc/navigation/RootNavigator.tsx
src/SettingsScreen
src/HomeScreen/Home.tsx
andsrc/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