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
Typesafe i18n #887
Typesafe i18n #887
Conversation
notmd
commented
Jan 22, 2023
- Setup Typescript support for i18n
- Add missing translation
@@ -20,7 +20,6 @@ import { FiAlertTriangle, FiLayout, FiLogOut, FiSettings, FiShield } from "react | |||
interface MenuOption { | |||
name: string; | |||
href: string; | |||
desc: string; |
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.
I delete it because it isn't used anywhere
</Text> | ||
<Text as="p" className={`mt-4 text-sm ${textColorClass}`}> | ||
{t(`faq_items.a${index}`)} | ||
{t(`faq_items.a${index as 0}`)} |
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.
oof! do we need to cast to a literal?
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.
Yes, otherwise TS will complain
Will merge once the conflict has been resolved |