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

Translated page content & Challenge, Recap, Illustration components translations #428

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/components/MDX/Challenges/Challenge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function Challenge({
className="text-xl text-primary dark:text-primary-dark mb-2 mt-0 font-medium"
id={currentChallenge.id}>
<div className="font-bold block md:inline">
{isRecipes ? 'Example' : 'Challenge'} {currentChallenge.order} of{' '}
{isRecipes ? 'Esempio' : 'Sfida'} {currentChallenge.order} di{' '}
{totalChallenges}
<span className="text-primary dark:text-primary-dark">: </span>
</div>
Expand All @@ -63,14 +63,14 @@ export function Challenge({
<div>
<Button className="mr-2" onClick={toggleHint} active={showHint}>
<IconHint className="mr-1.5" />{' '}
{showHint ? 'Hide hint' : 'Show hint'}
{showHint ? 'Nascondi suggerimento' : 'Mostra suggerimento'}
</Button>
<Button
className="mr-2"
onClick={toggleSolution}
active={showSolution}>
<IconSolution className="mr-1.5" />{' '}
{showSolution ? 'Hide solution' : 'Show solution'}
{showSolution ? 'Nascondi soluzione' : 'Mostra soluzione'}
</Button>
</div>
) : (
Expand All @@ -80,7 +80,7 @@ export function Challenge({
onClick={toggleSolution}
active={showSolution}>
<IconSolution className="mr-1.5" />{' '}
{showSolution ? 'Hide solution' : 'Show solution'}
{showSolution ? 'Nascondi soluzione' : 'Mostra soluzione'}
</Button>
)
)}
Expand All @@ -94,7 +94,7 @@ export function Challenge({
)}
onClick={handleClickNextChallenge}
active>
Next {isRecipes ? 'Example' : 'Challenge'}
{isRecipes ? 'Prossimo Esempio' : 'Prossima Sfida'}
<IconArrowSmall displayDirection="right" className="block ml-1.5" />
</Button>
)}
Expand All @@ -104,12 +104,12 @@ export function Challenge({
{showSolution && (
<div className="mt-6">
<h3 className="text-2xl font-bold text-primary dark:text-primary-dark">
Solution
Soluzione
</h3>
{currentChallenge.solution}
<div className="flex justify-between items-center mt-4">
<Button onClick={() => setShowSolution(false)}>
Close solution
Chiudi soluzione
</Button>
{hasNextChallenge && (
<Button
Expand All @@ -118,7 +118,7 @@ export function Challenge({
)}
onClick={handleClickNextChallenge}
active>
Next Challenge
Prossima Sfida
<IconArrowSmall
displayDirection="right"
className="block ml-1.5"
Expand Down
4 changes: 2 additions & 2 deletions src/components/MDX/Challenges/Challenges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ export function Challenges({
children,
isRecipes,
noTitle,
titleText = isRecipes ? 'Try out some examples' : 'Try out some challenges',
titleId = isRecipes ? 'examples' : 'challenges',
titleText = isRecipes ? 'Prova alcuni esempi' : 'Prova alcune sfide',
titleId = isRecipes ? 'Esempi' : 'Sfide',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
titleId = isRecipes ? 'Esempi' : 'Sfide',
titleId = isRecipes ? 'esempi' : 'sfide',

}: ChallengesProps) {
const challenges = parseChallengeContents(children);
const totalChallenges = challenges.length;
Expand Down
2 changes: 1 addition & 1 deletion src/components/MDX/MDXComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function AuthorCredit({
<div className="sr-only group-hover:not-sr-only group-focus-within:not-sr-only hover:sr-only">
<p className="bg-card dark:bg-card-dark text-center text-sm text-secondary dark:text-secondary-dark leading-tight dark:text-secondary-dark p-2 rounded-lg absolute left-1/2 -top-4 -translate-x-1/2 -translate-y-full group-hover:flex group-hover:opacity-100 after:content-[''] after:absolute after:left-1/2 after:top-[95%] after:-translate-x-1/2 after:border-8 after:border-x-transparent after:border-b-transparent after:border-t-card after:dark:border-t-card-dark opacity-0 transition-opacity duration-300">
<cite>
Illustrated by{' '}
Illustrato da{' '}
{authorLink ? (
<a
target="_blank"
Expand Down
2 changes: 1 addition & 1 deletion src/components/MDX/Recap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function Recap({children}: RecapProps) {
return (
<section>
<H2 isPageAnchor id="recap">
Recap
Riepilogo
</H2>
{children}
</section>
Expand Down
Loading