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

Translation for "You Might Not Need an Effect" #854

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 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
2 changes: 1 addition & 1 deletion src/components/Layout/Toc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function Toc({headings}: {headings: Toc}) {
<nav role="navigation" className="pt-20 sticky top-0 right-0">
{headings.length > 0 && (
<h2 className="mb-3 lg:mb-3 uppercase tracking-wide font-bold text-sm text-secondary dark:text-secondary-dark px-4 w-full">
On this page
На этой странице
</h2>
)}
<div
Expand Down
17 changes: 9 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 ? 'Пример' : 'Испытание'} {currentChallenge.order} из{' '}
{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 ? 'Скрыть подсказку' : 'Показать подсказку'}
</Button>
<Button
className="mr-2"
onClick={toggleSolution}
active={showSolution}>
<IconSolution className="mr-1.5" />{' '}
{showSolution ? 'Hide solution' : 'Show solution'}
{showSolution ? 'Скрыть решение' : 'Показать решение'}
</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 ? 'Скрыть решение' : 'Показать решение'}
</Button>
)
)}
Expand All @@ -94,7 +94,8 @@ export function Challenge({
)}
onClick={handleClickNextChallenge}
active>
Next {isRecipes ? 'Example' : 'Challenge'}
{isRecipes ? 'Следующий' : 'Следующее'}{' '}
{isRecipes ? 'Пример' : 'Испытание'}
<IconArrowSmall displayDirection="right" className="block ml-1.5" />
</Button>
)}
Expand All @@ -104,12 +105,12 @@ export function Challenge({
{showSolution && (
<div className="mt-6">
<h3 className="text-2xl font-bold text-primary dark:text-primary-dark">
Solution
Решение
</h3>
{currentChallenge.solution}
<div className="flex justify-between items-center mt-4">
<Button onClick={() => setShowSolution(false)}>
Close solution
Скрыть решение
</Button>
{hasNextChallenge && (
<Button
Expand All @@ -118,7 +119,7 @@ export function Challenge({
)}
onClick={handleClickNextChallenge}
active>
Next Challenge
Следующее Испытание
<IconArrowSmall
displayDirection="right"
className="block ml-1.5"
Expand Down
4 changes: 3 additions & 1 deletion src/components/MDX/Challenges/Challenges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ export function Challenges({
children,
isRecipes,
noTitle,
titleText = isRecipes ? 'Try out some examples' : 'Try out some challenges',
titleText = isRecipes
? 'Попробуйте несколько примеров'
: 'Выполните несколько задач',
titleId = isRecipes ? 'examples' : 'challenges',
}: ChallengesProps) {
const challenges = parseChallengeContents(children);
Expand Down
4 changes: 2 additions & 2 deletions src/components/MDX/ExpandableExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function ExpandableExample({children, excerpt, type}: ExpandableExampleProps) {
{isDeepDive && (
<>
<IconDeepDive className="inline mr-2 dark:text-purple-30 text-purple-40" />
Deep Dive
Глубокое Погружение
</>
)}
{isExample && (
Expand Down Expand Up @@ -101,7 +101,7 @@ function ExpandableExample({children, excerpt, type}: ExpandableExampleProps) {
<span className="mr-1">
<IconChevron displayDirection={isExpanded ? 'up' : 'down'} />
</span>
{isExpanded ? 'Hide Details' : 'Show Details'}
{isExpanded ? 'Скрыть подробности' : 'Показать подробности'}
</Button>
</summary>
<div
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 @@ -173,7 +173,7 @@ function YouWillLearn({
children: any;
isChapter?: boolean;
}) {
let title = isChapter ? 'In this chapter' : 'You will learn';
let title = isChapter ? 'В этой главе' : 'Вы изучите';
return <SimpleCallout title={title}>{children}</SimpleCallout>;
}

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
Подведение итогов
</H2>
{children}
</section>
Expand Down
6 changes: 3 additions & 3 deletions src/components/MDX/Sandpack/CustomPreset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const SandboxShell = memo(function SandboxShell({
return (
<>
<div
className="shadow-lg dark:shadow-lg-dark rounded-lg"
className="rounded-lg shadow-lg dark:shadow-lg-dark"
ref={containerRef}
style={{
contain: 'content',
Expand All @@ -95,7 +95,7 @@ const SandboxShell = memo(function SandboxShell({
{(isExpandable || isExpanded) && (
<button
translate="yes"
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"
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"
onClick={() => {
const nextIsExpanded = !isExpanded;
flushSync(() => {
Expand All @@ -119,7 +119,7 @@ const SandboxShell = memo(function SandboxShell({
className="inline mr-1.5 text-xl"
displayDirection={isExpanded ? 'up' : 'down'}
/>
{isExpanded ? 'Show less' : 'Show more'}
{isExpanded ? 'Скрыть' : 'Раскрыть'}
</span>
</button>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/MDX/Sandpack/DownloadButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ ${css}
onClick={downloadHTML}
title="Download Sandbox"
type="button">
<IconDownload className="inline mr-1" /> Download
<IconDownload className="inline mr-1" /> Загрузить
</button>
);
}
2 changes: 1 addition & 1 deletion src/components/MDX/Sandpack/OpenInCodeSandboxButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const OpenInCodeSandboxButton = () => {
width="1em"
height="1em"
/>
<span className="hidden md:block">Fork</span>
<span className="hidden md:block">Отрыть в песочнице</span>
</UnstyledOpenInCodeSandboxButton>
);
};
2 changes: 1 addition & 1 deletion src/components/MDX/Sandpack/ResetButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function ResetButton({onReset}: ResetButtonProps) {
onClick={onReset}
title="Reset Sandbox"
type="button">
<IconRestart className="inline ml-1 mr-1 relative" /> Reset
<IconRestart className="relative inline ml-1 mr-1" /> Сбросить
</button>
);
}
Loading