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

Add translate Japanese #662

Merged
merged 2 commits into from
Jan 10, 2017
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/ja-JP/example.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// This code is editable and runnable!
fn main() {
// A simple integer calculator:
// `+` or `-` means add or subtract by 1
// `*` or `/` means multiply or divide by 2

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

for token in program.chars() {
match token {
'+' => accumulator += 1,
'-' => accumulator -= 1,
'*' => accumulator *= 2,
'/' => accumulator /= 2,
_ => { /* ignore everything else */ }
}
}

println!("The program \"{}\" calculates the value {}",
program, accumulator);
}
23 changes: 23 additions & 0 deletions _includes/ja-JP/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'>// A simple integer calculator:
// `+` or `-` means add or subtract by 1
// `*` or `/` means multiply or divide by 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'>/* ignore everything else */</span> }
}
}

<span class='prelude-val'>println!</span>(<span class='string'>"The program \"{}\" calculates the value {}"</span>,
program, accumulator);
}
</pre>
1 change: 1 addition & 0 deletions _layouts/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ <h2><a href="/en-US/contribute.html">Contribute</a></h2>
<footer>
<p>Our site in other languages:
<a href="/fr/">Français</a>,
<a href="/ja-JP/">日本語</a>,
<a href="/ko-KR/">한국어</a>,
<a href="/pt-BR/">Português</a>,
<a href="/ru-RU/">Русский</a>,
Expand Down
1 change: 1 addition & 0 deletions _layouts/fr/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ <h2><a href="/fr/contribute.html">Contribuer</a></h2>
<footer>
<p>Notre site dans d'autres langues&nbsp;:
<a href="/en-US/">English</a>,
<a href="/ja-JP/">日本語</a>,
<a href="/ko-KR/">한국어</a>,
<a href="/pt-BR/">Português</a>,
<a href="/ru-RU/">Русский</a>,
Expand Down
61 changes: 61 additions & 0 deletions _layouts/ja-JP/basic.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!DOCTYPE html>
<!-- Page last generated {{ site.time }} -->
<html lang="ja">
<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言語, rustlang, rust-lang, Mozilla Rust">
<meta name="description" content="Rustは速度、安全性、並行性の3つのゴールにフォーカスしたシステムプログラミング言語です。">

<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="/ja-JP/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="/en-US/documentation.html">ドキュメンテーション</a></h2>
<h2><a href="/en-US/install.html">インストール</a></h2>
<h2><a href="/en-US/community.html">コミュニティ</a></h2>
<h2><a href="/en-US/contribute.html">開発に参加する</a></h2>
</li>
</ul>
</header>

{{ content }}

<footer>
<p>他の言語のページ:
<a href="/en-US/">English</a>,
<a href="/fr/">Français</a>,
<a href="/ko-KR/">한국어</a>,
<a href="/pt-BR/">Português</a>,
<a href="/ru-RU/">Русский</a>,
<a href="/zh-CN/">简体中文</a>
</p>
</footer>

<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/ja-JP/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: ja-JP/basic
---

<div class="content">
{{ content }}
</div>
10 changes: 10 additions & 0 deletions _layouts/ja-JP/faq.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
layout: default
---

<link href='https://fonts.googleapis.com/css?family=Source+Serif+Pro:400,600' rel='stylesheet' type='text/css'>
<link href='/css/syntax-highlight.css' rel='stylesheet' type='text/css'>

<div class="faq">
{{ content }}
</div>
1 change: 1 addition & 0 deletions _layouts/ko-KR/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ <h2><a href="/ko-KR/contribute.html">기여하기</a></h2>
<p>이 사이트를 다른 언어로 보기:
<a href="/en-US/">English</a>,
<a href="/fr/">Français</a>,
<a href="/ja-JP/">日本語</a>,
<a href="/pt-BR/">Português</a>,
<a href="/ru-RU/">Русский</a>,
<a href="/zh-CN/">简体中文</a>
Expand Down
1 change: 1 addition & 0 deletions _layouts/pt-BR/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ <h2><a href="/pt-BR/contribute.html">Contribua</a></h2>
<p>Nosso site em outros idiomas:
<a href="/en-US/">English</a>,
<a href="/fr/">Français</a>,
<a href="/ja-JP/">日本語</a>,
<a href="/ko-KR/">한국어</a>,
<a href="/ru-RU/">Русский</a>,
<a href="/zh-CN/">简体中文</a>
Expand Down
1 change: 1 addition & 0 deletions _layouts/ru-RU/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ <h2><a href="/ru-RU/contribute.html">Участие</a></h2>
<p>Наш сайт на других языках:
<a href="/en-US/">English</a>,
<a href="/fr/">Français</a>,
<a href="/ja-JP/">日本語</a>,
<a href="/ko-KR/">한국어</a>,
<a href="/pt-BR/">Português</a>,
<a href="/zh-CN/">简体中文</a>
Expand Down
1 change: 1 addition & 0 deletions _layouts/zh-CN/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ <h2><a href="/zh-CN/contribute.html">贡献</a></h2>
<p>本土化页面:
<a href="/en-US/">English</a>,
<a href="/fr/">Français</a>,
<a href="/ja-JP/">日本語</a>,
<a href="/ko-KR/">한국어</a>,
<a href="/pt-BR/">Português</a>,
<a href="/ru-RU/">Русский</a>
Expand Down
Loading