forked from openwallet-foundation/bifold-wallet
-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: add supported languages to ConfigurationContext #14
Open
fc-santos
wants to merge
14
commits into
main
Choose a base branch
from
feat/add-supported-languages-to-configuration-context
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.
Open
feat: add supported languages to ConfigurationContext #14
fc-santos
wants to merge
14
commits into
main
from
feat/add-supported-languages-to-configuration-context
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
Signed-off-by: fc-santos <[email protected]>
jcdrouin21
reviewed
Oct 18, 2023
Comment on lines
31
to
35
for (const pl of possibleLanguages) { | ||
if (supportedLanguagesKeys.includes(pl.id)) { | ||
languages.push(pl) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'aime mieux le filter je pense ? C'est plus clean que de faire un array vide qu'on ajoute ceux qu'on veut, non ?
Signed-off-by: fc-santos <[email protected]>
The ConfigurationContext still has a supportedLanguage prop that now is of type Locales[]. It's also possible now pass a defaultLanguage (optional) in the initLanguage function. It was always English by default before. The languages array in the Language screen is not hardcoded anymore and in the Settings Screen the currentLanguage doesn't use anymore the hardcoded languages array. In the supportedLanguages prop from ConfigurationContext you can pass the locales you want to support (ex: [Locales.en, Locales.fr]) Eventually it would be a nice feature to add where in the Settings screen if the wallet you are working on supports only one language (ex: Portuguese), it would make sense to not display in the App Setttins the Language option to switch the (Only show the Biometrics and Change PIN). Signed-off-by: fc-santos <[email protected]>
https://github.com/MCN-ING/aries-mobile-agent-react-native into feat/add-supported-languages-to-configuration-context
…n-context Signed-off-by: Filipe Santos <[email protected]>
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.
Summary of Changes
Currently, all wallets need to support the three languages configured in the bifold (English, French and Portuguese). The aim of this PR is to enable you to change the default languages, so that you can choose only those you want to support.
Related Issues
N/A
Pull Request Checklist
Tick all boxes below to demonstrate that you have completed the respective task. If the item does not apply to your this PR check it anyway to make it apparent that there's nothing to do.
Signed-off-by
line (we use the DCO GitHub app to enforce this);If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!
Pro Tip 🤓
PR template adapted from the Python attrs project.