Skip to content

Commit 85d76bc

Browse files
Th3Walldeblasis
andauthored
Translated page content & Challenge, Recap, Illustration components translations (#428)
* Translated page content && Added Challenge, Recap & Illustration components translations * Apply suggestions from code review Co-authored-by: Alessandro De Blasis <[email protected]> --------- Co-authored-by: Alessandro De Blasis <[email protected]>
1 parent c258a3a commit 85d76bc

File tree

7 files changed

+89
-91
lines changed

7 files changed

+89
-91
lines changed

src/components/MDX/Challenges/Challenge.tsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function Challenge({
5050
className="text-xl text-primary dark:text-primary-dark mb-2 mt-0 font-medium"
5151
id={currentChallenge.id}>
5252
<div className="font-bold block md:inline">
53-
{isRecipes ? 'Example' : 'Challenge'} {currentChallenge.order} of{' '}
53+
{isRecipes ? 'Esempio' : 'Sfida'} {currentChallenge.order} di{' '}
5454
{totalChallenges}
5555
<span className="text-primary dark:text-primary-dark">: </span>
5656
</div>
@@ -63,14 +63,14 @@ export function Challenge({
6363
<div>
6464
<Button className="mr-2" onClick={toggleHint} active={showHint}>
6565
<IconHint className="mr-1.5" />{' '}
66-
{showHint ? 'Hide hint' : 'Show hint'}
66+
{showHint ? 'Nascondi suggerimento' : 'Mostra suggerimento'}
6767
</Button>
6868
<Button
6969
className="mr-2"
7070
onClick={toggleSolution}
7171
active={showSolution}>
7272
<IconSolution className="mr-1.5" />{' '}
73-
{showSolution ? 'Hide solution' : 'Show solution'}
73+
{showSolution ? 'Nascondi soluzione' : 'Mostra soluzione'}
7474
</Button>
7575
</div>
7676
) : (
@@ -80,7 +80,7 @@ export function Challenge({
8080
onClick={toggleSolution}
8181
active={showSolution}>
8282
<IconSolution className="mr-1.5" />{' '}
83-
{showSolution ? 'Hide solution' : 'Show solution'}
83+
{showSolution ? 'Nascondi soluzione' : 'Mostra soluzione'}
8484
</Button>
8585
)
8686
)}
@@ -94,7 +94,7 @@ export function Challenge({
9494
)}
9595
onClick={handleClickNextChallenge}
9696
active>
97-
Next {isRecipes ? 'Example' : 'Challenge'}
97+
{isRecipes ? 'Prossimo Esempio' : 'Prossima Sfida'}
9898
<IconArrowSmall displayDirection="right" className="block ml-1.5" />
9999
</Button>
100100
)}
@@ -104,12 +104,12 @@ export function Challenge({
104104
{showSolution && (
105105
<div className="mt-6">
106106
<h3 className="text-2xl font-bold text-primary dark:text-primary-dark">
107-
Solution
107+
Soluzione
108108
</h3>
109109
{currentChallenge.solution}
110110
<div className="flex justify-between items-center mt-4">
111111
<Button onClick={() => setShowSolution(false)}>
112-
Close solution
112+
Chiudi soluzione
113113
</Button>
114114
{hasNextChallenge && (
115115
<Button
@@ -118,7 +118,7 @@ export function Challenge({
118118
)}
119119
onClick={handleClickNextChallenge}
120120
active>
121-
Next Challenge
121+
Prossima Sfida
122122
<IconArrowSmall
123123
displayDirection="right"
124124
className="block ml-1.5"

src/components/MDX/Challenges/Challenges.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ export function Challenges({
7878
children,
7979
isRecipes,
8080
noTitle,
81-
titleText = isRecipes ? 'Try out some examples' : 'Try out some challenges',
82-
titleId = isRecipes ? 'examples' : 'challenges',
81+
titleText = isRecipes ? 'Prova alcuni esempi' : 'Prova alcune sfide',
82+
titleId = isRecipes ? 'Esempi' : 'Sfide',
8383
}: ChallengesProps) {
8484
const challenges = parseChallengeContents(children);
8585
const totalChallenges = challenges.length;

src/components/MDX/MDXComponents.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function AuthorCredit({
193193
<div className="sr-only group-hover:not-sr-only group-focus-within:not-sr-only hover:sr-only">
194194
<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">
195195
<cite>
196-
Illustrated by{' '}
196+
Illustrato da{' '}
197197
{authorLink ? (
198198
<a
199199
target="_blank"

src/components/MDX/Recap.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function Recap({children}: RecapProps) {
1313
return (
1414
<section>
1515
<H2 isPageAnchor id="recap">
16-
Recap
16+
Riepilogo
1717
</H2>
1818
{children}
1919
</section>

0 commit comments

Comments
 (0)