Skip to content

Commit e5fbfc7

Browse files
authored
Merge pull request #854 from boldurean/RU-you-might-not-need-an-effect
Translation for "You Might Not Need an Effect"
2 parents 951189b + b70ed05 commit e5fbfc7

File tree

12 files changed

+210
-203
lines changed

12 files changed

+210
-203
lines changed

src/components/MDX/Challenges/Challenge.tsx

Lines changed: 16 additions & 15 deletions
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 ? 'Пример' : 'Испытание'} {currentChallenge.order} из{' '}
5454
{totalChallenges}
5555
<span className="text-primary dark:text-primary-dark">: </span>
5656
</div>
@@ -61,16 +61,17 @@ export function Challenge({
6161
<div className="flex justify-between items-center mt-4">
6262
{currentChallenge.hint ? (
6363
<div>
64-
<Button className="me-2" onClick={toggleHint} active={showHint}>
65-
<IconHint className="me-1.5" />{' '}
66-
{showHint ? 'Hide hint' : 'Show hint'}
64+
65+
<Button className="mr-2" onClick={toggleHint} active={showHint}>
66+
<IconHint className="mr-1.5" />{' '}
67+
{showHint ? 'Скрыть подсказку' : 'Показать подсказку'}
6768
</Button>
6869
<Button
6970
className="me-2"
7071
onClick={toggleSolution}
7172
active={showSolution}>
72-
<IconSolution className="me-1.5" />{' '}
73-
{showSolution ? 'Hide solution' : 'Show solution'}
73+
<IconSolution className="mr-1.5" />{' '}
74+
{showSolution ? 'Скрыть решение' : 'Показать решение'}
7475
</Button>
7576
</div>
7677
) : (
@@ -79,12 +80,12 @@ export function Challenge({
7980
className="me-2"
8081
onClick={toggleSolution}
8182
active={showSolution}>
82-
<IconSolution className="me-1.5" />{' '}
83-
{showSolution ? 'Hide solution' : 'Show solution'}
83+
84+
<IconSolution className="mr-1.5" />{' '}
85+
{showSolution ? 'Скрыть решение' : 'Показать решение'}
8486
</Button>
8587
)
8688
)}
87-
8889
{hasNextChallenge && (
8990
<Button
9091
className={cn(
@@ -94,22 +95,22 @@ export function Challenge({
9495
)}
9596
onClick={handleClickNextChallenge}
9697
active>
97-
Next {isRecipes ? 'Example' : 'Challenge'}
98-
<IconArrowSmall displayDirection="end" className="block ms-1.5" />
98+
{isRecipes ? 'Следующий' : 'Следующее'}{' '}
99+
{isRecipes ? 'Пример' : 'Испытание'}
100+
<IconArrowSmall displayDirection="right" className="block ml-1.5" />
99101
</Button>
100102
)}
101103
</div>
102104
{showHint && currentChallenge.hint}
103-
104105
{showSolution && (
105106
<div className="mt-6">
106107
<h3 className="text-2xl font-bold text-primary dark:text-primary-dark">
107-
Solution
108+
Решение
108109
</h3>
109110
{currentChallenge.solution}
110111
<div className="flex justify-between items-center mt-4">
111112
<Button onClick={() => setShowSolution(false)}>
112-
Close solution
113+
Скрыть решение
113114
</Button>
114115
{hasNextChallenge && (
115116
<Button
@@ -118,7 +119,7 @@ export function Challenge({
118119
)}
119120
onClick={handleClickNextChallenge}
120121
active>
121-
Next Challenge
122+
Следующее Испытание
122123
<IconArrowSmall
123124
displayDirection="end"
124125
className="block ms-1.5"

src/components/MDX/Challenges/Challenges.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ export function Challenges({
8181
children,
8282
isRecipes,
8383
noTitle,
84-
titleText = isRecipes ? 'Try out some examples' : 'Try out some challenges',
84+
titleText = isRecipes
85+
? 'Попробуйте несколько примеров'
86+
: 'Выполните несколько задач',
8587
titleId = isRecipes ? 'examples' : 'challenges',
8688
}: ChallengesProps) {
8789
const challenges = parseChallengeContents(children);

src/components/MDX/ExpandableExample.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ function ExpandableExample({children, excerpt, type}: ExpandableExampleProps) {
7070
})}>
7171
{isDeepDive && (
7272
<>
73-
<IconDeepDive className="inline me-2 dark:text-purple-30 text-purple-40" />
74-
Deep Dive
73+
<IconDeepDive className="inline mr-2 dark:text-purple-30 text-purple-40" />
74+
Глубокое Погружение
7575
</>
7676
)}
7777
{isExample && (
@@ -101,7 +101,7 @@ function ExpandableExample({children, excerpt, type}: ExpandableExampleProps) {
101101
<span className="me-1">
102102
<IconChevron displayDirection={isExpanded ? 'up' : 'down'} />
103103
</span>
104-
{isExpanded ? 'Hide Details' : 'Show Details'}
104+
{isExpanded ? 'Скрыть подробности' : 'Показать подробности'}
105105
</Button>
106106
</summary>
107107
<div

src/components/MDX/MDXComponents.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,9 @@ function YouWillLearn({
241241
children: any;
242242
isChapter?: boolean;
243243
}) {
244+
244245
let title = isChapter ? 'В этой главе' : 'Вы узнаете';
246+
245247
return <SimpleCallout title={title}>{children}</SimpleCallout>;
246248
}
247249

src/components/MDX/Recap.tsx

Lines changed: 1 addition & 1 deletion
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+
Подведение итогов
1717
</H2>
1818
{children}
1919
</section>

src/components/MDX/Sandpack/CustomPreset.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const SandboxShell = memo(function SandboxShell({
5959
return (
6060
<>
6161
<div
62-
className="shadow-lg dark:shadow-lg-dark rounded-lg"
62+
className="rounded-lg shadow-lg dark:shadow-lg-dark"
6363
ref={containerRef}
6464
style={{
6565
contain: 'content',
@@ -79,7 +79,7 @@ const SandboxShell = memo(function SandboxShell({
7979
{(isExpandable || isExpanded) && (
8080
<button
8181
translate="yes"
82-
className="sandpack-expand flex text-base justify-between dark:border-card-dark bg-wash dark:bg-card-dark items-center z-10 p-1 w-full order-2 xl:order-last border-b-1 relative top-0"
82+
className="relative top-0 z-10 flex items-center justify-between order-2 w-full p-1 text-base sandpack-expand dark:border-card-dark bg-wash dark:bg-card-dark xl:order-last border-b-1"
8383
onClick={() => {
8484
const nextIsExpanded = !isExpanded;
8585
flushSync(() => {
@@ -103,7 +103,7 @@ const SandboxShell = memo(function SandboxShell({
103103
className="inline me-1.5 text-xl"
104104
displayDirection={isExpanded ? 'up' : 'down'}
105105
/>
106-
{isExpanded ? 'Show less' : 'Show more'}
106+
{isExpanded ? 'Скрыть' : 'Раскрыть'}
107107
</span>
108108
</button>
109109
)}

src/components/MDX/Sandpack/DownloadButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ ${css}
102102
onClick={downloadHTML}
103103
title="Download Sandbox"
104104
type="button">
105-
<IconDownload className="inline me-1" /> Download
105+
<IconDownload className="inline mr-1" /> Загрузить
106106
</button>
107107
);
108108
}

src/components/MDX/Sandpack/OpenInCodeSandboxButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const OpenInCodeSandboxButton = () => {
1515
width="1em"
1616
height="1em"
1717
/>
18-
<span className="hidden md:block">Fork</span>
18+
<span className="hidden md:block">Отрыть в песочнице</span>
1919
</UnstyledOpenInCodeSandboxButton>
2020
);
2121
};

src/components/MDX/Sandpack/ResetButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function ResetButton({onReset}: ResetButtonProps) {
1515
onClick={onReset}
1616
title="Reset Sandbox"
1717
type="button">
18-
<IconRestart className="inline mx-1 relative" /> Reset
18+
<IconRestart className="relative inline ml-1 mr-1" /> Сбросить
1919
</button>
2020
);
2121
}

0 commit comments

Comments
 (0)