Skip to content

Commit cf2cf80

Browse files
committed
feat: translate UI text and titles to Portuguese for better localization
1 parent f330d95 commit cf2cf80

7 files changed

Lines changed: 19 additions & 18 deletions

File tree

src/components/MDX/Challenges/Challenge.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function Challenge({
5757
className="text-xl text-primary dark:text-primary-dark mb-2 mt-0 font-medium"
5858
id={currentChallenge.id}>
5959
<div className="font-bold block md:inline">
60-
{isRecipes ? 'Example' : 'Challenge'} {currentChallenge.order} of{' '}
60+
{isRecipes ? 'Exemplo' : 'Desafio'} {currentChallenge.order} de{' '}
6161
{totalChallenges}
6262
<span className="text-primary dark:text-primary-dark">: </span>
6363
</div>
@@ -69,15 +69,15 @@ export function Challenge({
6969
{currentChallenge.hint ? (
7070
<div>
7171
<Button className="me-2" onClick={toggleHint} active={showHint}>
72-
<IconHint className="me-1.5" />{' '}
73-
{showHint ? 'Hide hint' : 'Show hint'}
72+
<IconHint />{' '}
73+
{showHint ? 'Ocultar dica' : 'Exibir dica'}
7474
</Button>
7575
<Button
7676
className="me-2"
7777
onClick={toggleSolution}
7878
active={showSolution}>
79-
<IconSolution className="me-1.5" />{' '}
80-
{showSolution ? 'Hide solution' : 'Show solution'}
79+
<IconSolution />{' '}
80+
{showSolution ? 'Ocultar Solução' : 'Exibir Solução'}
8181
</Button>
8282
</div>
8383
) : (
@@ -86,8 +86,8 @@ export function Challenge({
8686
className="me-2"
8787
onClick={toggleSolution}
8888
active={showSolution}>
89-
<IconSolution className="me-1.5" />{' '}
90-
{showSolution ? 'Hide solution' : 'Show solution'}
89+
<IconSolution />{' '}
90+
{showSolution ? 'Ocultar Solução' : 'Exibir Solução'}
9191
</Button>
9292
)
9393
)}
@@ -111,12 +111,12 @@ export function Challenge({
111111
{showSolution && (
112112
<div className="mt-6">
113113
<h3 className="text-2xl font-bold text-primary dark:text-primary-dark">
114-
Solution
114+
Solução
115115
</h3>
116116
{currentChallenge.solution}
117117
<div className="flex justify-between items-center mt-4">
118118
<Button onClick={() => setShowSolution(false)}>
119-
Close solution
119+
Fechar solução
120120
</Button>
121121
{hasNextChallenge && (
122122
<Button
@@ -125,7 +125,7 @@ export function Challenge({
125125
)}
126126
onClick={handleClickNextChallenge}
127127
active>
128-
Next Challenge
128+
Próximo desafio
129129
<IconArrowSmall
130130
displayDirection="end"
131131
className="block ms-1.5"

src/components/MDX/Challenges/Challenges.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ export function Challenges({
8888
children,
8989
isRecipes,
9090
noTitle,
91-
titleText = isRecipes ? 'Try out some examples' : 'Try out some challenges',
92-
titleId = isRecipes ? 'examples' : 'challenges',
91+
titleText = isRecipes ? 'Experimente alguns exemplos' : 'Experimente alguns exemplos',
92+
titleId = isRecipes ? 'exemplos' : 'desafios',
9393
}: ChallengesProps) {
9494
const challenges = parseChallengeContents(children);
9595
const totalChallenges = challenges.length;

src/components/MDX/Sandpack/ClearButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ export function ClearButton({onClear}: ClearButtonProps) {
2020
<button
2121
className="text-sm text-primary dark:text-primary-dark inline-flex items-center hover:text-link duration-100 ease-in transition mx-1"
2222
onClick={onClear}
23-
title="Clear all edits and reload sandbox"
23+
title="Limpar todas as edições e recarregar a sandbox."
2424
type="button">
2525
<IconClose className="inline mx-1 relative" />
26-
<span className="hidden md:block">Clear</span>
26+
<span className="hidden md:block">Limpar</span>
2727
</button>
2828
);
2929
}

src/components/MDX/Sandpack/NavigationBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export function NavigationBar({
117117
*
118118
* Plus, it should only prompt if there's any file changes
119119
*/
120-
if (sandpack.editorState === 'dirty' && confirm('Clear all your edits?')) {
120+
if (sandpack.editorState === 'dirty' && confirm('Limpar todas as alterações?')) {
121121
sandpack.resetAllFiles();
122122
}
123123
refresh();

src/components/MDX/Sandpack/ReloadButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function ReloadButton({onReload}: ReloadButtonProps) {
2323
title="Keep your edits and reload sandbox"
2424
type="button">
2525
<IconRestart className="inline mx-1 relative" />
26-
<span className="hidden md:block">Reload</span>
26+
<span className="hidden md:block">Recarregar</span>
2727
</button>
2828
);
2929
}

src/content/learn/describing-the-ui.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,8 @@ Uma árvore de dependências é frequentemente usada por ferramentas de compila
552552

553553
<LearnMore path="/learn/understanding-your-ui-as-a-tree">
554554

555-
Leia **[Sua interface de usuário como uma árvore](/learn/understanding-your-ui-as-a-tree)** Aprenda como criar árvores de dependências de renderização e de módulos para um aplicativo React e como elas são modelos mentais úteis para melhorar a experiência do usuário e o desempenho.
555+
Leia **[Sua interface de usuário como uma árvore](/learn/understanding-your-ui-as-a-tree)** para aprender como criar árvores de renderização e de dependências de módulos para um aplicativo React e como elas são modelos mentais úteis para melhorar a experiência do usuário e o desempenho.
556+
556557
</LearnMore>
557558

558559

src/sidebarLearn.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
{
8787
"title": "Descrevendo a IU",
8888
"path": "/learn/describing-the-ui",
89-
"tags": ["foundation"],
89+
"tags": [],
9090
"routes": [
9191
{
9292
"title": "Seu Primeiro Componente",

0 commit comments

Comments
 (0)