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

Typesafe i18n #887

Merged
merged 4 commits into from Jan 23, 2023
Merged

Typesafe i18n #887

merged 4 commits into from Jan 23, 2023

Conversation

notmd
Copy link
Collaborator

@notmd 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;
Copy link
Collaborator Author

@notmd notmd Jan 22, 2023

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}`)}
Copy link
Collaborator

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?

Copy link
Collaborator Author

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

@fozziethebeat
Copy link
Collaborator

Will merge once the conflict has been resolved

@fozziethebeat fozziethebeat merged commit cb7b3e1 into LAION-AI:main Jan 23, 2023
@notmd notmd deleted the typesafe_i18n branch January 25, 2023 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants