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

Implement Language Metadata Filtering #188

Merged
merged 3 commits into from
Jul 26, 2024
Merged

Conversation

nomadbitcoin
Copy link
Contributor

@nomadbitcoin nomadbitcoin commented Jul 24, 2024

Changes:

  • Added filtering for language-specific metadata across all views.
  • If metadata for the selected language is missing, standard content is displayed and a toast notification informs the user.

Closes #181

Copy link

vercel bot commented Jul 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web3-bootcamp-platform ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2024 6:58pm

@@ -39,7 +39,7 @@ export function CourseCard({ course }) {
<Button auto color={''} bordered rounded icon={<BiTimeFive />}>
<Text weight={'bold'} size={'$xs'}>
{' '}
{course.duration}{' '}
<RenderField object={course} field="duration" isHtml={true} maxSize={200} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this field HTML? Text only is OK here I believe

@@ -50,7 +50,7 @@ export function CourseCard({ course }) {
</Button>
</Link>
<Button color={'success'} rounded flat size={'xs'}>
{course.difficulty}
<RenderField object={course} field="difficulty" isHtml={true} maxSize={200} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@@ -2,13 +2,10 @@ import { useTranslation } from 'react-i18next'

export default function RenderField({ object, field, isHtml, maxSize }) {
const { i18n } = useTranslation()
let content
const defaultLanguage = 'en'
Copy link
Contributor

Choose a reason for hiding this comment

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

Should not have hardcoded default language to 'en'. This config should come from i18n definitions.

@danicuki danicuki merged commit 295b18a into main Jul 26, 2024
3 of 5 checks passed
@nomadbitcoin nomadbitcoin deleted the feat/translate-all-views branch August 15, 2024 02:02
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.

Implement Language Metadata for all Views
2 participants