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

Ot.language options #319

Merged
merged 3 commits into from
Feb 25, 2024
Merged

Ot.language options #319

merged 3 commits into from
Feb 25, 2024

Conversation

CerberusLatrans
Copy link
Contributor

@CerberusLatrans CerberusLatrans commented Jan 28, 2024

Checklist

  • 1. Run yarn run check
  • 2. Run yarn run test

Why

Resolves #234

Provides a dropdown button for users to switch languages (if available)

This PR

removed FlexBar component from mobileNavBar, replaced with Flex. There is still some weird alignment issue with the button, so that needs to be fixed

Screenshots

Screenshot 2024-01-28 at 3 56 13 PM Screenshot 2024-01-28 at 3 55 19 PM

Verification Steps

Ran the frontend, changed languages successfully

Copy link
Contributor

@huang0h huang0h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

key: 'es',
label: 'Español',
},
];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we be easily able to add other languages to this array? Does this just use the i18 language library/autotranslate?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! As long we have the translations for other languages, we can just add their key and appropriate label for languages here. We'll just need to make sure that the key we specify here matches what we use in src/i18n/i18n.ts where we map languages to translation files.

Copy link
Contributor

@SurabhiKeesara SurabhiKeesara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great for English and Spanish, just refer to the question about other languages

@CerberusLatrans CerberusLatrans merged commit 9bdfe01 into master Feb 25, 2024
5 checks passed
@CerberusLatrans CerberusLatrans deleted the OT.languageOptions branch February 25, 2024 19:41
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.

Add translation drop down to navigation bar
3 participants