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

Begin Russian translation #491

Merged
merged 3 commits into from
Aug 29, 2016
Merged
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
22 changes: 22 additions & 0 deletions _includes/ru-RU/example.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Этот код можно отредактировать и запустить!
fn main() {
// Простой целочисленный калькулятор:
// `+` или `-` означает прибавление или вычитание единицы
// `*` или `/` означает умножение или деление на 2

let program = "+ + * - /";
let mut accumulator = 0;

for token in program.chars() {
match token {
'+' => accumulator += 1,
'-' => accumulator -= 1,
'*' => accumulator *= 2,
'/' => accumulator /= 2,
_ => { /* игнорируем всё остальное */ }
}
}

println!("Программа \"{}\" производит значение {}",
program, accumulator);
}
23 changes: 23 additions & 0 deletions _includes/ru-RU/example.rs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<pre class='rust'>
<span class='kw'>fn</span> main() {
<span class='comment'>// Простой целочисленный калькулятор:
// `+` или `-` означает прибавление или вычитание единицы
// `*` или `/` означает умножение или деление на 2</span>

<span class='kw'>let</span> program = <span class='string'>"+ + * - /"</span>;
<span class='kw'>let</span> <span class='kw'>mut</span> accumulator = <span class='number'>0</span>;

<span class='kw'>for</span> token in program.chars() {
<span class='kw'>match</span> token {
<span class='string'>'+'</span> => accumulator <span class='op'>+=</span> <span class='number'>1</span>,
<span class='string'>'-'</span> => accumulator <span class='op'>-=</span> <span class='number'>1</span>,
<span class='string'>'*'</span> => accumulator <span class='op'>*=</span> <span class='number'>2</span>,
<span class='string'>'/'</span> => accumulator <span class='op'>/=</span> <span class='number'>2</span>,
_ => { <span class='comment'>/* игнорируем всё остальное */</span> }
}
}

<span class='prelude-val'>println!</span>(<span class='string'>"Программа \"{}\" производит значение {}"</span>,
program, accumulator);
}
</pre>
2 changes: 2 additions & 0 deletions _includes/set_platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"en-US": {"linux": "Linux binary", "windows": "Windows Installer", "mac": "Mac Installer"},
"pt": {"linux": "Binário Linux", "windows": "Instalador Windows", "mac": "Instalador Mac"},
"pt-BR": {"linux": "Binário Linux", "windows": "Instalador Windows", "mac": "Instalador Mac"},
"ru": {"linux": "Исполняемые файлы для Linux", "windows": "Установщик для Windows", "mac": "Установщик для Mac"},
"ru-RU": {"linux": "Исполняемые файлы для Linux", "windows": "Установщик для Windows", "mac": "Установщик для Mac"},
// Add more platforms here
};
return platforms[get_language()][platform];
Expand Down
2 changes: 2 additions & 0 deletions _layouts/redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"en-US": "en-US",
"pt": "pt-BR", // For now, since there's no pt-PT page, redirect to pt-BR
"pt-BR": "pt-BR",
"ru": "ru-RU",
"ru-RU": "ru-RU",
};

// look up the provided language in the map
Expand Down
50 changes: 50 additions & 0 deletions _layouts/ru-RU/basic.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<!-- Page last generated {{ site.time }} -->
<html lang="ru-RU">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ page.title }}</title>
<meta name="keywords" content="Rust, Rust programming language, язык программирования Rust, rustlang, rust-lang, Mozilla Rust">
<meta name="description" content="Безумно быстрый системный язык программирования без segfault'ов и с гарантиями потокобезопасности.">

<link rel="stylesheet" href="/css/bootstrap.css">
<link rel="stylesheet" href="/css/style.css">
</head>

<body class="container">
<a href="https://github.com/rust-lang/rust">
<img class="ribbon" style="display: none" src="/logos/forkme.png" alt="Fork me on GitHub" width="298" height="298">
</a>

<header>
<ul class="row menu">
<li class="col-xs-12 col-md-2">
<a href="/index.html">
<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" />
</a>
</li>
<li class="col-xs-12 col-md-10 menu">
<h2><a href="/documentation.html">Документация</a></h2>
<h2><a href="/community.html">Сообщество</a></h2>
<h2><a href="/downloads.html">Загрузки</a></h2>
<h2><a href="/contribute.html">Участие</a></h2>
</li>
</ul>
</header>

{{ content }}

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-58390457-1', 'auto');
ga('send', 'pageview');

</script>
</body>
</html>
7 changes: 7 additions & 0 deletions _layouts/ru-RU/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: ru-RU/basic
---

<div class="content">
{{ content }}
</div>
9 changes: 9 additions & 0 deletions _layouts/ru-RU/untranslated.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
layout: ru-RU/basic
---

<div class="content">
<b>Внимание</b>: эта страница ещё не переведена на русский язык.
Вы можете <a href={{ page.url | replace: ".html", ".md" | prepend: "https://github.com/rust-lang/rust-www/edit/master/" }}>помочь с переводом</a>
или читать <a href={{ page.url | replace: "/ru-RU/", "/en-US/" }}>английскую версию</a>.
</div>
4 changes: 4 additions & 0 deletions ru-RU/community.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: ru-RU/untranslated
title: The Rust Community &middot; The Rust Programming Language
---
4 changes: 4 additions & 0 deletions ru-RU/conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: ru-RU/untranslated
title: The Rust Code of Conduct &middot; The Rust Programming Language
---
4 changes: 4 additions & 0 deletions ru-RU/contribute-bugs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: ru-RU/untranslated
title: Contributing to Rust &mdash; finding, triaging and fixing issues &middot; The Rust Programming Language
---
4 changes: 4 additions & 0 deletions ru-RU/contribute-community.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: ru-RU/untranslated
title: Contributing to Rust &mdash; community building &middot; The Rust Programming Language
---
4 changes: 4 additions & 0 deletions ru-RU/contribute-compiler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: ru-RU/untranslated
title: Contributing to Rust &mdash; language, compiler, and the standard library &middot; The Rust Programming Language
---
4 changes: 4 additions & 0 deletions ru-RU/contribute-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: ru-RU/untranslated
title: Contributing to Rust &mdash; documentation &middot; The Rust Programming Language
---
4 changes: 4 additions & 0 deletions ru-RU/contribute-libs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: ru-RU/untranslated
title: Contributing to Rust &mdash; libraries &middot; The Rust Programming Language
---
4 changes: 4 additions & 0 deletions ru-RU/contribute-tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: ru-RU/untranslated
title: Contributing to Rust &mdash; tooling, IDEs and infrastructure &middot; The Rust Programming Language
---
4 changes: 4 additions & 0 deletions ru-RU/contribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: ru-RU/untranslated
title: Contributing to Rust &middot; The Rust Programming Language
---
4 changes: 4 additions & 0 deletions ru-RU/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: ru-RU/untranslated
title: Rust Documentation &middot; The Rust Programming Language
---
205 changes: 205 additions & 0 deletions ru-RU/downloads.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
---
layout: ru-RU/untranslated
title: Downloads &middot; The Rust Programming Language
---
<h1>Downloads</h1>

<hr>

<div class="row install">
<div class="col-md-4 side-header">
<h2 id="stable">{{ site.stable }}&nbsp;</h2>
<h3>{{ site.stable_date }}</h3>
<p>
The
<a href="http://blog.rust-lang.org{{ site.stable_blog }}">
current stable release of Rust
</a>
, updated every six weeks and backwards-compatible.
</p>
</div>
<div class="col-md-8">
<table class="table-features table-installers"><tbody>
<tr>
<td class="inst-type">Linux (.tar.gz)</td>
<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>
<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>
</tr>
<tr>
<td class="inst-type">Mac (.pkg)</td>
<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>
<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>
</tr>
<tr>
<td class="inst-type">Windows (<a href="#win-foot">GNU ABI <sup>†</sup></a>) (.msi)</td>
<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>
<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>
</tr>
<tr>
<td class="inst-type">Windows (<a href="#win-foot">MSVC ABI <sup>†</sup></a>) (.msi) </td>
<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>
<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>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td class="inst-type"></td>
<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>
</tr>
</tbody></table>
</div>
</div>

<div class="row">
<div class="col-md-10 col-md-offset-1">
<p>An easy way to install the stable binaries for Linux and Mac is to run this in your shell:</p>
<pre><code>curl -sSf https://static.rust-lang.org/rustup.sh | sh</code></pre>
</div>
</div>

<hr/>

<div class="row install">
<div class="col-md-4 side-header">
<h2 id="beta">Beta&nbsp; ({{ site.beta }})</h2>
<p>
A preview of the upcoming stable release, intended for testing by
crate authors. Updated every six weeks and as needed.
</p>
<p><em>Scheduled for stable release<br/>{{ site.beta_date }}</em>.<p>
</div>
<div class="col-md-8">
<table class="table-features table-installers"><tbody>
<tr>
<td class="inst-type">Linux (.tar.gz)</td>
<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>
<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>
</tr>
<tr>
<td class="inst-type">Mac (.pkg)</td>
<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>
<td><a href="https://static.rust-lang.org/dist/rust-beta-i686-apple-darwin.pkg"><div class="inst-button">32-bit</div></a></td>
</tr>
<tr>
<td class="inst-type">Windows (<a href="#win-foot">GNU ABI <sup>†</sup></a>) (.msi)</td>
<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>
<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>
</tr>
<tr>
<td class="inst-type">Windows (<a href="#win-foot">MSVC ABI <sup>†</sup></a>) (.msi) </td>
<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>
<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>
<td></td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td class="inst-type"></td>
<td colspan="2"><a href="https://static.rust-lang.org/dist/rustc-beta-src.tar.gz"><div class="inst-button">Source</div></a></td>
</tr>
</tbody></table>
</div>
</div>

<div class="row">
<div class="col-md-10 col-md-offset-1">
<p>An easy way to install the beta binaries for Linux and Mac is to run this in your shell:</p>
<pre><code>curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=beta</code></pre>
</div>
</div>

<hr/>

<div class="row install">
<div class="col-md-4 side-header">
<h2 id="nightly">Nightly&nbsp; ({{ site.nightly }})</h2>
<p>
The current development branch.
It includes
<a href="https://doc.rust-lang.org/book/nightly-rust.html">unstable features</a>
that are not available in the betas or stable releases.
</p>
</div>
<div class="col-md-8">
<table class="table-features table-installers"><tbody>
<tr>
<td class="inst-type">Linux (.tar.gz)</td>
<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>
<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>
</tr>
<tr>
<td class="inst-type">Mac (.pkg)</td>
<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>
<td><a href="https://static.rust-lang.org/dist/rust-nightly-i686-apple-darwin.pkg"><div class="inst-button">32-bit</div></a></td>
</tr>
<tr>
<td class="inst-type">Windows (<a href="#win-foot">GNU ABI <sup>†</sup></a>) (.msi)</td>
<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>
<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>
</tr>
<tr>
<td class="inst-type">Windows (<a href="#win-foot">MSVC ABI <sup>†</sup></a>) (.msi) </td>
<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>
<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>
<td></td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td class="inst-type"></td>
<td colspan="2"><a href="https://static.rust-lang.org/dist/rustc-nightly-src.tar.gz"><div class="inst-button">Source</div></a></td>
</tr>
</tbody></table>
</div>
</div>

<div class="row">
<div class="col-md-10 col-md-offset-1">
<p>An easy way to install the nightly binaries for Linux and Mac is to run this in your shell:</p>
<pre><code>curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly</code></pre>
</div>
</div>

<hr/>

<div class="row">
<div class="col-md-12">
<p>
Discover other downloads in <a href="https://static.rust-lang.org/dist/index.html">the archives.</a>
</p>
</div>
</div>

<hr/>

<div class="row">
<div class="col-md-12">
<a id="win-foot"></a>
<p>
<em>†</em>
There are two prominent
<a href="https://en.wikipedia.org/wiki/Application_binary_interface">ABIs</a>
in use on Windows: the native (MSVC) ABI used by
<a href="https://www.visualstudio.com">Visual Studio</a>,
and the GNU ABI used by the
<a href="https://gcc.gnu.org/">GCC toolchain</a>.
Which version of Rust you need depends largely on what C/C++ libraries you want to interoperate with:
for interop with software produced by Visual Studio use the MSVC build of Rust; for interop with
GNU software built using the
<a href="https://msys2.github.io/">MinGW/MSYS2 toolchain</a>
use the GNU build.
</p>
<p>
MSVC builds of Rust additionally require the Microsoft Visual
C++ build tools for Visual Studio 2013 or later.
The easiest way to acquire the build tools is by installing
<a href="http://landinghub.visualstudio.com/visual-cpp-build-tools">
Microsoft Visual C++ Build Tools 2015</a>
which provides just the Visual C++ build tools.
Alternately, you can <a href="https://www.visualstudio.com/downloads/">install</a>
Visual Studio 2015 or Visual Studio 2013 and during install select the "C++ tools".
No additional software installation is necessary for basic use of the GNU build.
</p>
<p>
Rust's support for the GNU ABI is more mature, and is recommended for typical
uses.
</p>
</div>
</div>
4 changes: 4 additions & 0 deletions ru-RU/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: faq
title: Frequently Asked Questions &middot; The Rust Programming Language
---
4 changes: 4 additions & 0 deletions ru-RU/friends.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: ru-RU/untranslated
title: Friends of Rust &middot; The Rust Programming Language
---
Loading