Skip to content
This repository was archived by the owner on Sep 30, 2020. It is now read-only.

Commit 0f76eef

Browse files
authored
Merge pull request #491 from ruRust/master
Begin Russian translation
2 parents c5b8acb + aeec804 commit 0f76eef

26 files changed

+457
-0
lines changed

_includes/ru-RU/example.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Этот код можно отредактировать и запустить!
2+
fn main() {
3+
// Простой целочисленный калькулятор:
4+
// `+` или `-` означает прибавление или вычитание единицы
5+
// `*` или `/` означает умножение или деление на 2
6+
7+
let program = "+ + * - /";
8+
let mut accumulator = 0;
9+
10+
for token in program.chars() {
11+
match token {
12+
'+' => accumulator += 1,
13+
'-' => accumulator -= 1,
14+
'*' => accumulator *= 2,
15+
'/' => accumulator /= 2,
16+
_ => { /* игнорируем всё остальное */ }
17+
}
18+
}
19+
20+
println!("Программа \"{}\" производит значение {}",
21+
program, accumulator);
22+
}

_includes/ru-RU/example.rs.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<pre class='rust'>
2+
<span class='kw'>fn</span> main() {
3+
<span class='comment'>// Простой целочисленный калькулятор:
4+
// `+` или `-` означает прибавление или вычитание единицы
5+
// `*` или `/` означает умножение или деление на 2</span>
6+
7+
<span class='kw'>let</span> program = <span class='string'>"+ + * - /"</span>;
8+
<span class='kw'>let</span> <span class='kw'>mut</span> accumulator = <span class='number'>0</span>;
9+
10+
<span class='kw'>for</span> token in program.chars() {
11+
<span class='kw'>match</span> token {
12+
<span class='string'>'+'</span> => accumulator <span class='op'>+=</span> <span class='number'>1</span>,
13+
<span class='string'>'-'</span> => accumulator <span class='op'>-=</span> <span class='number'>1</span>,
14+
<span class='string'>'*'</span> => accumulator <span class='op'>*=</span> <span class='number'>2</span>,
15+
<span class='string'>'/'</span> => accumulator <span class='op'>/=</span> <span class='number'>2</span>,
16+
_ => { <span class='comment'>/* игнорируем всё остальное */</span> }
17+
}
18+
}
19+
20+
<span class='prelude-val'>println!</span>(<span class='string'>"Программа \"{}\" производит значение {}"</span>,
21+
program, accumulator);
22+
}
23+
</pre>

_includes/set_platform.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"en-US": {"linux": "Linux binary", "windows": "Windows Installer", "mac": "Mac Installer"},
99
"pt": {"linux": "Binário Linux", "windows": "Instalador Windows", "mac": "Instalador Mac"},
1010
"pt-BR": {"linux": "Binário Linux", "windows": "Instalador Windows", "mac": "Instalador Mac"},
11+
"ru": {"linux": "Исполняемые файлы для Linux", "windows": "Установщик для Windows", "mac": "Установщик для Mac"},
12+
"ru-RU": {"linux": "Исполняемые файлы для Linux", "windows": "Установщик для Windows", "mac": "Установщик для Mac"},
1113
// Add more platforms here
1214
};
1315
return platforms[get_language()][platform];

_layouts/redirect.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
"en-US": "en-US",
1212
"pt": "pt-BR", // For now, since there's no pt-PT page, redirect to pt-BR
1313
"pt-BR": "pt-BR",
14+
"ru": "ru-RU",
15+
"ru-RU": "ru-RU",
1416
};
1517

1618
// look up the provided language in the map

_layouts/ru-RU/basic.html

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!DOCTYPE html>
2+
<!-- Page last generated {{ site.time }} -->
3+
<html lang="ru-RU">
4+
<head>
5+
<meta charset="utf-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
<title>{{ page.title }}</title>
9+
<meta name="keywords" content="Rust, Rust programming language, язык программирования Rust, rustlang, rust-lang, Mozilla Rust">
10+
<meta name="description" content="Безумно быстрый системный язык программирования без segfault'ов и с гарантиями потокобезопасности.">
11+
12+
<link rel="stylesheet" href="/css/bootstrap.css">
13+
<link rel="stylesheet" href="/css/style.css">
14+
</head>
15+
16+
<body class="container">
17+
<a href="https://github.com/rust-lang/rust">
18+
<img class="ribbon" style="display: none" src="/logos/forkme.png" alt="Fork me on GitHub" width="298" height="298">
19+
</a>
20+
21+
<header>
22+
<ul class="row menu">
23+
<li class="col-xs-12 col-md-2">
24+
<a href="/index.html">
25+
<img class="img-responsive" src="/logos/rust-logo-blk.svg" onerror="this.src='/logos/rust-logo-256x256-blk.png'" height="128" width="128" alt="Rust logo" />
26+
</a>
27+
</li>
28+
<li class="col-xs-12 col-md-10 menu">
29+
<h2><a href="/documentation.html">Документация</a></h2>
30+
<h2><a href="/community.html">Сообщество</a></h2>
31+
<h2><a href="/downloads.html">Загрузки</a></h2>
32+
<h2><a href="/contribute.html">Участие</a></h2>
33+
</li>
34+
</ul>
35+
</header>
36+
37+
{{ content }}
38+
39+
<script>
40+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
41+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
42+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
43+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
44+
45+
ga('create', 'UA-58390457-1', 'auto');
46+
ga('send', 'pageview');
47+
48+
</script>
49+
</body>
50+
</html>

_layouts/ru-RU/default.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: ru-RU/basic
3+
---
4+
5+
<div class="content">
6+
{{ content }}
7+
</div>

_layouts/ru-RU/untranslated.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
layout: ru-RU/basic
3+
---
4+
5+
<div class="content">
6+
<b>Внимание</b>: эта страница ещё не переведена на русский язык.
7+
Вы можете <a href={{ page.url | replace: ".html", ".md" | prepend: "https://github.com/rust-lang/rust-www/edit/master/" }}>помочь с переводом</a>
8+
или читать <a href={{ page.url | replace: "/ru-RU/", "/en-US/" }}>английскую версию</a>.
9+
</div>

ru-RU/community.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
layout: ru-RU/untranslated
3+
title: The Rust Community &middot; The Rust Programming Language
4+
---

ru-RU/conduct.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
layout: ru-RU/untranslated
3+
title: The Rust Code of Conduct &middot; The Rust Programming Language
4+
---

ru-RU/contribute-bugs.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
layout: ru-RU/untranslated
3+
title: Contributing to Rust &mdash; finding, triaging and fixing issues &middot; The Rust Programming Language
4+
---

ru-RU/contribute-community.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
layout: ru-RU/untranslated
3+
title: Contributing to Rust &mdash; community building &middot; The Rust Programming Language
4+
---

ru-RU/contribute-compiler.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
layout: ru-RU/untranslated
3+
title: Contributing to Rust &mdash; language, compiler, and the standard library &middot; The Rust Programming Language
4+
---

ru-RU/contribute-docs.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
layout: ru-RU/untranslated
3+
title: Contributing to Rust &mdash; documentation &middot; The Rust Programming Language
4+
---

ru-RU/contribute-libs.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
layout: ru-RU/untranslated
3+
title: Contributing to Rust &mdash; libraries &middot; The Rust Programming Language
4+
---

ru-RU/contribute-tools.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
layout: ru-RU/untranslated
3+
title: Contributing to Rust &mdash; tooling, IDEs and infrastructure &middot; The Rust Programming Language
4+
---

ru-RU/contribute.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
layout: ru-RU/untranslated
3+
title: Contributing to Rust &middot; The Rust Programming Language
4+
---

ru-RU/documentation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
layout: ru-RU/untranslated
3+
title: Rust Documentation &middot; The Rust Programming Language
4+
---

ru-RU/downloads.html

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
---
2+
layout: ru-RU/untranslated
3+
title: Downloads &middot; The Rust Programming Language
4+
---
5+
<h1>Downloads</h1>
6+
7+
<hr>
8+
9+
<div class="row install">
10+
<div class="col-md-4 side-header">
11+
<h2 id="stable">{{ site.stable }}&nbsp;</h2>
12+
<h3>{{ site.stable_date }}</h3>
13+
<p>
14+
The
15+
<a href="http://blog.rust-lang.org{{ site.stable_blog }}">
16+
current stable release of Rust
17+
</a>
18+
, updated every six weeks and backwards-compatible.
19+
</p>
20+
</div>
21+
<div class="col-md-8">
22+
<table class="table-features table-installers"><tbody>
23+
<tr>
24+
<td class="inst-type">Linux (.tar.gz)</td>
25+
<td><a href="https://static.rust-lang.org/dist/rust-{{ site.stable }}-x86_64-unknown-linux-gnu.tar.gz"><div class="inst-button">64-bit</div></a></td>
26+
<td><a href="https://static.rust-lang.org/dist/rust-{{ site.stable }}-i686-unknown-linux-gnu.tar.gz"><div class="inst-button">32-bit</div></a></td>
27+
</tr>
28+
<tr>
29+
<td class="inst-type">Mac (.pkg)</td>
30+
<td><a href="https://static.rust-lang.org/dist/rust-{{ site.stable }}-x86_64-apple-darwin.pkg"><div class="inst-button">64-bit</div></a></td>
31+
<td><a href="https://static.rust-lang.org/dist/rust-{{ site.stable }}-i686-apple-darwin.pkg"><div class="inst-button">32-bit</div></a></td>
32+
</tr>
33+
<tr>
34+
<td class="inst-type">Windows (<a href="#win-foot">GNU ABI <sup></sup></a>) (.msi)</td>
35+
<td><a href="https://static.rust-lang.org/dist/rust-{{ site.stable }}-x86_64-pc-windows-gnu.msi"><div class="inst-button">64-bit</div></a></td>
36+
<td><a href="https://static.rust-lang.org/dist/rust-{{ site.stable }}-i686-pc-windows-gnu.msi"><div class="inst-button">32-bit</div></a></td>
37+
</tr>
38+
<tr>
39+
<td class="inst-type">Windows (<a href="#win-foot">MSVC ABI <sup></sup></a>) (.msi) </td>
40+
<td><a href="https://static.rust-lang.org/dist/rust-{{ site.stable }}-x86_64-pc-windows-msvc.msi"><div class="inst-button">64-bit</div></a></td>
41+
<td><a href="https://static.rust-lang.org/dist/rust-{{ site.stable }}-i686-pc-windows-msvc.msi"><div class="inst-button">32-bit</div></a></td>
42+
</tr>
43+
<tr><td>&nbsp;</td></tr>
44+
<tr>
45+
<td class="inst-type"></td>
46+
<td colspan="2"><a href="https://static.rust-lang.org/dist/rustc-{{ site.stable }}-src.tar.gz"><div class="inst-button">Source</div></a></td>
47+
</tr>
48+
</tbody></table>
49+
</div>
50+
</div>
51+
52+
<div class="row">
53+
<div class="col-md-10 col-md-offset-1">
54+
<p>An easy way to install the stable binaries for Linux and Mac is to run this in your shell:</p>
55+
<pre><code>curl -sSf https://static.rust-lang.org/rustup.sh | sh</code></pre>
56+
</div>
57+
</div>
58+
59+
<hr/>
60+
61+
<div class="row install">
62+
<div class="col-md-4 side-header">
63+
<h2 id="beta">Beta&nbsp; ({{ site.beta }})</h2>
64+
<p>
65+
A preview of the upcoming stable release, intended for testing by
66+
crate authors. Updated every six weeks and as needed.
67+
</p>
68+
<p><em>Scheduled for stable release<br/>{{ site.beta_date }}</em>.<p>
69+
</div>
70+
<div class="col-md-8">
71+
<table class="table-features table-installers"><tbody>
72+
<tr>
73+
<td class="inst-type">Linux (.tar.gz)</td>
74+
<td><a href="https://static.rust-lang.org/dist/rust-beta-x86_64-unknown-linux-gnu.tar.gz"><div class="inst-button">64-bit</div></a></td>
75+
<td><a href="https://static.rust-lang.org/dist/rust-beta-i686-unknown-linux-gnu.tar.gz"><div class="inst-button">32-bit</div></a></td>
76+
</tr>
77+
<tr>
78+
<td class="inst-type">Mac (.pkg)</td>
79+
<td><a href="https://static.rust-lang.org/dist/rust-beta-x86_64-apple-darwin.pkg"><div class="inst-button">64-bit</div></a></td>
80+
<td><a href="https://static.rust-lang.org/dist/rust-beta-i686-apple-darwin.pkg"><div class="inst-button">32-bit</div></a></td>
81+
</tr>
82+
<tr>
83+
<td class="inst-type">Windows (<a href="#win-foot">GNU ABI <sup></sup></a>) (.msi)</td>
84+
<td><a href="https://static.rust-lang.org/dist/rust-beta-x86_64-pc-windows-gnu.msi"><div class="inst-button">64-bit</div></a></td>
85+
<td><a href="https://static.rust-lang.org/dist/rust-beta-i686-pc-windows-gnu.msi"><div class="inst-button">32-bit</div></a></td>
86+
</tr>
87+
<tr>
88+
<td class="inst-type">Windows (<a href="#win-foot">MSVC ABI <sup></sup></a>) (.msi) </td>
89+
<td><a href="https://static.rust-lang.org/dist/rust-beta-x86_64-pc-windows-msvc.msi"><div class="inst-button">64-bit</div></a></td>
90+
<td><a href="https://static.rust-lang.org/dist/rust-beta-i686-pc-windows-msvc.msi"><div class="inst-button">32-bit</div></a></td>
91+
<td></td>
92+
</tr>
93+
<tr><td>&nbsp;</td></tr>
94+
<tr>
95+
<td class="inst-type"></td>
96+
<td colspan="2"><a href="https://static.rust-lang.org/dist/rustc-beta-src.tar.gz"><div class="inst-button">Source</div></a></td>
97+
</tr>
98+
</tbody></table>
99+
</div>
100+
</div>
101+
102+
<div class="row">
103+
<div class="col-md-10 col-md-offset-1">
104+
<p>An easy way to install the beta binaries for Linux and Mac is to run this in your shell:</p>
105+
<pre><code>curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=beta</code></pre>
106+
</div>
107+
</div>
108+
109+
<hr/>
110+
111+
<div class="row install">
112+
<div class="col-md-4 side-header">
113+
<h2 id="nightly">Nightly&nbsp; ({{ site.nightly }})</h2>
114+
<p>
115+
The current development branch.
116+
It includes
117+
<a href="https://doc.rust-lang.org/book/nightly-rust.html">unstable features</a>
118+
that are not available in the betas or stable releases.
119+
</p>
120+
</div>
121+
<div class="col-md-8">
122+
<table class="table-features table-installers"><tbody>
123+
<tr>
124+
<td class="inst-type">Linux (.tar.gz)</td>
125+
<td><a href="https://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz"><div class="inst-button">64-bit</div></a></td>
126+
<td><a href="https://static.rust-lang.org/dist/rust-nightly-i686-unknown-linux-gnu.tar.gz"><div class="inst-button">32-bit</div></a></td>
127+
</tr>
128+
<tr>
129+
<td class="inst-type">Mac (.pkg)</td>
130+
<td><a href="https://static.rust-lang.org/dist/rust-nightly-x86_64-apple-darwin.pkg"><div class="inst-button">64-bit</div></a></td>
131+
<td><a href="https://static.rust-lang.org/dist/rust-nightly-i686-apple-darwin.pkg"><div class="inst-button">32-bit</div></a></td>
132+
</tr>
133+
<tr>
134+
<td class="inst-type">Windows (<a href="#win-foot">GNU ABI <sup></sup></a>) (.msi)</td>
135+
<td><a href="https://static.rust-lang.org/dist/rust-nightly-x86_64-pc-windows-gnu.msi"><div class="inst-button">64-bit</div></a></td>
136+
<td><a href="https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-gnu.msi"><div class="inst-button">32-bit</div></a></td>
137+
</tr>
138+
<tr>
139+
<td class="inst-type">Windows (<a href="#win-foot">MSVC ABI <sup></sup></a>) (.msi) </td>
140+
<td><a href="https://static.rust-lang.org/dist/rust-nightly-x86_64-pc-windows-msvc.msi"><div class="inst-button">64-bit</div></a></td>
141+
<td><a href="https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-msvc.msi"><div class="inst-button">32-bit</div></a></td>
142+
<td></td>
143+
</tr>
144+
<tr><td>&nbsp;</td></tr>
145+
<tr>
146+
<td class="inst-type"></td>
147+
<td colspan="2"><a href="https://static.rust-lang.org/dist/rustc-nightly-src.tar.gz"><div class="inst-button">Source</div></a></td>
148+
</tr>
149+
</tbody></table>
150+
</div>
151+
</div>
152+
153+
<div class="row">
154+
<div class="col-md-10 col-md-offset-1">
155+
<p>An easy way to install the nightly binaries for Linux and Mac is to run this in your shell:</p>
156+
<pre><code>curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly</code></pre>
157+
</div>
158+
</div>
159+
160+
<hr/>
161+
162+
<div class="row">
163+
<div class="col-md-12">
164+
<p>
165+
Discover other downloads in <a href="https://static.rust-lang.org/dist/index.html">the archives.</a>
166+
</p>
167+
</div>
168+
</div>
169+
170+
<hr/>
171+
172+
<div class="row">
173+
<div class="col-md-12">
174+
<a id="win-foot"></a>
175+
<p>
176+
<em></em>
177+
There are two prominent
178+
<a href="https://en.wikipedia.org/wiki/Application_binary_interface">ABIs</a>
179+
in use on Windows: the native (MSVC) ABI used by
180+
<a href="https://www.visualstudio.com">Visual Studio</a>,
181+
and the GNU ABI used by the
182+
<a href="https://gcc.gnu.org/">GCC toolchain</a>.
183+
Which version of Rust you need depends largely on what C/C++ libraries you want to interoperate with:
184+
for interop with software produced by Visual Studio use the MSVC build of Rust; for interop with
185+
GNU software built using the
186+
<a href="https://msys2.github.io/">MinGW/MSYS2 toolchain</a>
187+
use the GNU build.
188+
</p>
189+
<p>
190+
MSVC builds of Rust additionally require the Microsoft Visual
191+
C++ build tools for Visual Studio 2013 or later.
192+
The easiest way to acquire the build tools is by installing
193+
<a href="http://landinghub.visualstudio.com/visual-cpp-build-tools">
194+
Microsoft Visual C++ Build Tools 2015</a>
195+
which provides just the Visual C++ build tools.
196+
Alternately, you can <a href="https://www.visualstudio.com/downloads/">install</a>
197+
Visual Studio 2015 or Visual Studio 2013 and during install select the "C++ tools".
198+
No additional software installation is necessary for basic use of the GNU build.
199+
</p>
200+
<p>
201+
Rust's support for the GNU ABI is more mature, and is recommended for typical
202+
uses.
203+
</p>
204+
</div>
205+
</div>

ru-RU/faq.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
layout: faq
3+
title: Frequently Asked Questions &middot; The Rust Programming Language
4+
---

ru-RU/friends.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
layout: ru-RU/untranslated
3+
title: Friends of Rust &middot; The Rust Programming Language
4+
---

0 commit comments

Comments
 (0)