Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Tg.reactjs.org #2

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,14 @@ If your language does not have a translation and you would like to create one, p

## License
Content submitted to [reactjs.org](https://reactjs.org/) is CC-BY-4.0 licensed, as found in the [LICENSE-DOCS.md](https://github.com/open-source-explorer/reactjs.org/blob/master/LICENSE-DOCS.md) file.


## Use-case shortcut

- `nvm use 12.16.3`
- `yarn dev`
- `/Users/Student/reactjs.org/content/home/examples`
- `git add -A`
- `git commit -m "feat: add tajik translation to first block hello-example"`
- `git push https://github.com/HalimHamidov/tg.reactjs.org.git`

4 changes: 2 additions & 2 deletions content/community/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ There are many example projects created by the React community. We're keeping th

If you add a project, please commit to keeping it up to date with the latest versions of React.

## Small Examples
## Small Examples {#small-examples}

* **[Calculator](https://github.com/ahfarmer/calculator)** Implementation of the iOS calculator built in React
* **[Emoji Search](https://github.com/ahfarmer/emoji-search)** React app for searching emoji
Expand All @@ -20,7 +20,7 @@ If you add a project, please commit to keeping it up to date with the latest ver
* **[Counter App](https://github.com/arnab-datta/counter-app)** A small shopping cart example
* **[Tutorial Solutions](https://github.com/harman052/react-tutorial-solutions)** Solutions to challenges mentioned at the end of React tutorial

## Complete Apps
## Complete Apps {#complete-apps}

* **[Hacker News Clone React/GraphQL](https://github.com/clintonwoo/hackernews-react-graphql)** Hacker News clone rewritten with universal JavaScript, using React and GraphQL
* **[Builder Book](https://github.com/builderbook/builderbook)** Open-source web app to write and host documentation or sell books. Built with React, Material-UI, Next, Express, Mongoose, MongoDB
14 changes: 7 additions & 7 deletions content/footerNav.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
community:
title: Community
title: Ҷомеа

docs:
title: Docs
title: Ҳуҷҷатҳо

more:
title: More
title: Маълумоти иловагӣ
items:
- title: Tutorial
- title: Дастурамал
to: /tutorial/tutorial.html
- title: Blog
- title: Блог
to: /blog
- title: Acknowledgements
- title: Изҳори сипос
to: /acknowledgements.html
- title: React Native
to: https://reactnative.dev/
external: true

channels:
title: Channels
title: Сомонаҳо
items:
- title: GitHub
to: https://github.com/facebook/react
Expand Down
8 changes: 4 additions & 4 deletions content/headerNav.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
items:
- title: Docs
- title: Ҳуҷҷатҳо
to: /docs/getting-started.html
activeSelector: /docs/
- title: Tutorial
- title: Дастурамал
to: /tutorial/tutorial.html
activeSelector: /tutorial
- title: Blog
- title: Блог
to: /blog/
activeSelector: /blog
- title: Community
- title: Ҷомеа
to: /community/support.html
activeSelector: /community
4 changes: 2 additions & 2 deletions content/home/examples/a-simple-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ class HelloMessage extends React.Component {
render() {
return (
<div>
Hello {this.props.name}
Салом {this.props.name}
</div>
);
}
}

ReactDOM.render(
<HelloMessage name="Taylor" />,
<HelloMessage name="Сомонҷон" />,
document.getElementById('hello-example')
);
8 changes: 7 additions & 1 deletion content/home/examples/a-simple-component.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
---
title: A Simple Component
title: Компоненти оддӣ
order: 0
domid: hello-example
---

Дар компонентҳои React методи `render()`-ро татбиқ кардаанд, ки ин усул маълумоти воридшударо нишон медиҳад.
Дар ин мисол синтаксиси ба XML монанд истифода шудааст, ки JSX ном дорад. Маълумотҳои воридотиро, ки дар компонент ворид кардаанд, тавассути `render()` ирсол ва бо `this.props` дастрас кардан мумкин аст.

**Истифодаи JSX бо React ихтиёрӣ аст.** [Babel REPL](babel://es5-syntax-example)-ро нигаред, то коди Javascript-ро, ки дар марҳилаи тартибдиҳии JSX сохта шудааст, бубинед.
<!---
React components implement a `render()` method that takes input data and returns what to display. This example uses an XML-like syntax called JSX. Input data that is passed into the component can be accessed by `render()` via `this.props`.

**JSX is optional and not required to use React.** Try the [Babel REPL](babel://es5-syntax-example) to see the raw JavaScript code produced by the JSX compilation step.
--->
8 changes: 7 additions & 1 deletion content/home/marketing/component-based.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
---
title: Component-Based
title: Дар асоси компонентҳо
order: 1
---

Ҷузъҳои ҷудогонаро бисозед, ки ҳолати онҳоро идора карда шавад ва пас онҳоро барои сохтани ИК-и мураккаб истифода бурда тавонед.

Азбаски мантиқи компонентӣ бо Javascript навишта шудааст, на ин ки қолибҳо, шумо метавонед маълумоти зиёдро тавассути барномаатон ба осонӣ интиқол диҳед ва ҳолати компонентҳоро мустақил аз DOM(Документ, Обйект, Модел) нигоҳ доред.

<!---
Build encapsulated components that manage their own state, then compose them to make complex UIs.

Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM.
--->
14 changes: 12 additions & 2 deletions content/home/marketing/declarative.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
---
title: Declarative
title: Нишонҳои декларативӣ
order: 0
---

React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.
React эҷод кардани интерфейсҳои корбарии(ИК) интерактивиро осон мегардонад.
Дар ҳар як сохти барномаи худ шумо метавонед назари оддии худро тарҳрезӣ намоед, ва вақте ки маълумотҳои шумо тағйир меёбанд,
React ҷузъҳои заруриро самаранок навсозӣ карда пешниҳод менамояд.

Нишонҳои декларативии React барномаcозиро гӯё ва таҳлил(debug)-ро осонтар мегардонад.

<!---
React makes it painless to create interactive UIs.
Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.

Declarative views make your code more predictable and easier to debug.

--->
11 changes: 10 additions & 1 deletion content/home/marketing/learn-once-write-anywhere.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
---
title: Learn Once, Write Anywhere
title: Як бор биомӯзед, дар ҳама ҷо нависед
order: 2
---
Мо дар бораи қисми боқимондаи технологияи шумо маълумот надорем, барои ҳамин шумо метавонед дар React хусусиятҳои навро бидуни бознавиштани коди мавҷуда таҳия созед.

Инчунин React метавонад дар сервер бо истифодаи Node ва бунёди барномаҳои мобилӣ бо истифодаи [React Native](https://reactnative.dev/) хидмат кунад.


<!---
Learn Once, Write Anywhere

We don't make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code.

React can also render on the server using Node and power mobile apps using [React Native](https://reactnative.dev/).

--->
4 changes: 4 additions & 0 deletions content/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@
translated_name: Svenska
code: sv
status: 0
- name: Tajik
translated_name: Тоҷикӣ
code: tg
status: 0
- name: Tamil
translated_name: தமிழ்
code: ta
Expand Down
13 changes: 6 additions & 7 deletions src/components/CodeEditor/CodeEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,11 @@ class CodeEditor extends Component {
if (showBabelErrorMessage) {
errorMessage = (
<span>
Babel could not be loaded.
Babel насб карда нашуд.
<br />
<br />
This can be caused by an ad blocker. If you're using one, consider
adding reactjs.org to the whitelist so the live code examples will
work.
Ин метавонад аз сабаби басташавии реклама бошад.
Агар шумо яке аз ин хел барномаҳоро ро истифода баред, reactjs.org-ро ба руйхати сафед илова кунед, то намунаҳои код кор кунанд.
</span>
);
} else if (error != null) {
Expand Down Expand Up @@ -105,7 +104,7 @@ class CodeEditor extends Component {
color: colors.white,
}}>
<MetaTitle onDark={true}>
Live JSX Editor
Муҳаррири JSX Live
<label
css={{
fontSize: 14,
Expand Down Expand Up @@ -175,7 +174,7 @@ class CodeEditor extends Component {
cssProps={{
color: colors.white,
}}>
Error
Хатогӣ
</MetaTitle>
</div>
<pre
Expand Down Expand Up @@ -206,7 +205,7 @@ class CodeEditor extends Component {
padding: '0 10px',
backgroundColor: colors.divider,
}}>
<MetaTitle>Result</MetaTitle>
<MetaTitle>Натиҷа</MetaTitle>
</div>
<div
id={containerNodeID}
Expand Down
2 changes: 1 addition & 1 deletion src/components/LayoutHeader/DocSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class DocSearch extends Component<{}, State> {
}}
id="algolia-doc-search"
type="search"
placeholder="Search"
placeholder="Ҷустуҷӯ"
aria-label="Search docs"
/>
</form>
Expand Down
2 changes: 1 addition & 1 deletion src/components/LayoutHeader/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ const Header = ({location}: {location: Location}) => (
display: 'none',
},
}}>
Languages
Забонҳо
</span>
</Link>
<a
Expand Down
4 changes: 2 additions & 2 deletions src/components/LayoutHeader/SearchSvg.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import React from 'react';

const SearchSvg = () => (
<svg
alt="Search"
alt="Ҷустуҷӯ"
height="16"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16">
<title>Search</title>
<title>Ҷустуҷӯ</title>
<path
d={`
M6.02945,10.20327a4.17382,4.17382,0,1,1,4.17382-4.17382A4.15609,4.15609,
Expand Down
39 changes: 18 additions & 21 deletions src/pages/acknowledgements.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ const Acknowlegements = ({data, location}) => (
<Container>
<div css={sharedStyles.articleLayout.container}>
<div css={sharedStyles.articleLayout.content}>
<Header>Acknowledgements</Header>
<Header>Изҳори сипос</Header>
<TitleAndMetaTags
canonicalUrl={`${urlRoot}/acknowledgements.html`}
title="React - Acknowledgements"
/>

<div css={sharedStyles.markdown}>
<p>We'd like to thank all of our contributors:</p>
<p>Мо ба ҳамаи саҳмгузорон як чаҳон ташаккур мегӯем:</p>

<ul
css={{
Expand All @@ -44,38 +44,35 @@ const Acknowlegements = ({data, location}) => (
))}
</ul>

<p>In addition, we're grateful to</p>
<p>Алалхусус, ба саҳмгузорони зерин миннатдорем:</p>
<ul>
<li>
<a href="https://github.com/jeffbski">Jeff Barczewski</a> for
allowing us to use the{' '}
<a href="https://www.npmjs.com/package/react">react</a> package
name on npm.
<a href="https://github.com/jeffbski">Jeff Barczewski </a>
ба мо имкони истифодаи бастаи {' '}
<a href="https://www.npmjs.com/package/react">react</a> бо номи npm -ро пешниҳод кард.
</li>
<li>
<a href="https://christopheraue.net/">Christopher Aue</a> for
letting us use the{' '}
<a href="https://reactjs.com/">reactjs.com</a> domain name and
the <a href="https://twitter.com/reactjs">@reactjs</a> username
on Twitter.
<a href="https://christopheraue.net/">Christopher Aue</a> ба
мо имкон медиҳад то домени {' '}
<a href="https://reactjs.com/">reactjs.com</a> ва ҳисоб-ном дар Twitter <a href="https://twitter.com/reactjs">@reactjs</a> бемалол истифода барем.

</li>
<li>
<a href="https://github.com/ProjectMoon">ProjectMoon</a> for
letting us use the{' '}
<a href="https://www.npmjs.com/package/flux">flux</a> package
name on npm.
<a href="https://github.com/ProjectMoon">ProjectMoon</a> ба
мо имкони истифодаи бастаи бо номи {' '}
<a href="https://www.npmjs.com/package/flux">flux</a> -ро пешниҳод кард.
</li>
<li>
Shane Anderson for allowing us to use the{' '}
<a href="https://github.com/react">react</a> org on GitHub.
Shane Anderson ба мо имкон дод то истифодаи {' '}
<a href="https://github.com/react">react</a> org дар GitHub бемалол бошад.
</li>
<li>
<a href="https://github.com/voronianski">Dmitri Voronianski</a>{' '}
for letting us use the{' '}
ба мо иҷозат дод то нақшаи рангии {' '}
<a href="https://labs.voronianski.com/oceanic-next-color-scheme/">
Oceanic Next
</a>{' '}
color scheme on this website.
</a>{' '}-ро
дар сомонаи худ истифода барем.
</li>
</ul>
</div>
Expand Down
12 changes: 6 additions & 6 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Home extends Component {
return (
<Layout location={location}>
<TitleAndMetaTags
title="React &ndash; A JavaScript library for building user interfaces"
title="React &ndash; Китобхонаи JavaScript барои сохтани интерфейсҳои корбар"
canonicalUrl={createCanonicalUrl('/')}
/>
<div css={{width: '100%'}}>
Expand Down Expand Up @@ -133,7 +133,7 @@ class Home extends Component {
fontSize: 30,
},
}}>
A JavaScript library for building user interfaces
Китобхонаи JavaScript барои сохтани интерфейсҳои корбар
</p>
<Flex
valign="center"
Expand All @@ -151,12 +151,12 @@ class Home extends Component {
<ButtonLink
to="/docs/getting-started.html"
type="primary">
Get Started
Сараввал
</ButtonLink>
</CtaItem>
<CtaItem>
<ButtonLink to="/tutorial/tutorial.html" type="secondary">
Take the Tutorial
Бо Дастурамал Шинос Шавед
</ButtonLink>
</CtaItem>
</Flex>
Expand Down Expand Up @@ -294,12 +294,12 @@ class Home extends Component {
}}>
<CtaItem>
<ButtonLink to="/docs/getting-started.html" type="primary">
Get Started
Сараввал
</ButtonLink>
</CtaItem>
<CtaItem>
<ButtonLink to="/tutorial/tutorial.html" type="secondary">
Take the Tutorial
Бо Дастурамал Шинос Шавед
</ButtonLink>
</CtaItem>
</Flex>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const Languages = ({location}: Props) => (
<Container>
<div css={sharedStyles.articleLayout.container}>
<div css={sharedStyles.articleLayout.content}>
<Header>Languages</Header>
<Header>Забонҳо</Header>
<TitleAndMetaTags
canonicalUrl={`${urlRoot}/languages/`}
title="React - Languages"
Expand Down
Loading