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

Change the example on the localized page to the latest version #782

Merged
merged 5 commits into from
Apr 26, 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
16 changes: 12 additions & 4 deletions _includes/example.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
fn main() {
let greetings = ["Hello", "Hola", "Bonjour",
"こんにちは", "您好"];
"Ciao", "こんにちは", "안녕하세요",
"Cześć", "Olá", "Здравствуйте",
"chào bạn", "您好"];

for (num, greeting) in greetings.iter().enumerate() {
println!("{}", greeting);
print!("{} : ", greeting);
match num {
0 => println!("This code is editable and runnable!"),
1 => println!("Este código es editable y ejecutable!"),
2 => println!("Ce code est modifiable et exécutable!"),
3 => println!("このコードは編集して実行出来ます!"),
4 => println!("这段代码是可以编辑并且能够运行的!"),
3 => println!("Questo codice è modificabile e eseguibile!"),
4 => println!("このコードは編集して実行出来ます!"),
5 => println!("여기에서 코드를 수정하고 실행할 수 있습니다!"),
6 => println!("Ten kod można edytować oraz uruchomić!"),
7 => println!("Esse código é editável e executável!"),
8 => println!("Этот код можно отредактировать и запустить!"),
9 => println!("Bạn có thể edit và run code trực tiếp!"),
10 => println!("这段代码是可以编辑并且能够运行的!"),
_ => {},
}
}
Expand Down
2 changes: 1 addition & 1 deletion _includes/zh-CN/example.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 这个代码是可以编辑并且能够运行的
// 这段代码是可以编辑并且能够运行的
fn main() {
// 一个简易计算器
// `+` 或 `-` 意味着加减1
Expand Down
4 changes: 2 additions & 2 deletions fr-FR/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ <h2>Fonctionnalités</h2>
<div class="col-md-8">
<div id="active-code">
<button type="button" class="btn btn-primary btn-sm" id="run-code">Exécuter</button>
<div id="editor">{% include fr-FR/example.rs %}</div>
<div id="editor">{% include example.rs %}</div>
<div id="result">
<a id="playlink"><i class="icon-link-ext"></i></a>
</div>
</div>
<div id="static-code">{% include fr-FR/example.rs.html %}</div>
<div id="static-code">{% include example.rs.html %}</div>
<div class="more-examples">
<a href="http://rustbyexample.com/">Plus d’exemples</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions it-IT/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ <h2>Caratteristiche:</h2>
<div class="col-md-8">
<div id="active-code">
<button type="button" class="btn btn-primary btn-sm" id="run-code">Esegui</button>
<div id="editor">{% include it-IT/example.rs %}</div>
<div id="editor">{% include example.rs %}</div>
<div id="result" data-msg-running="Running...">
<a id="playlink"><i class="icon-link-ext"></i></a>
</div>
</div>
<div id="static-code">{% include it-IT/example.rs.html %}</div>
<div id="static-code">{% include example.rs.html %}</div>
<div class="more-examples">
<a href="http://rustbyexample.com/">Ulteriori esempi</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions ja-JP/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ <h2>特徴</h2>
<div class="col-md-8">
<div id="active-code">
<button type="button" class="btn btn-primary btn-sm" id="run-code">実行</button>
<div id="editor">{% include ja-JP/example.rs %}</div>
<div id="editor">{% include example.rs %}</div>
<div id="result" data-msg-running="実行中...">
<a id="playlink"><i class="icon-link-ext"></i></a>
</div>
</div>
<div id="static-code">{% include ja-JP/example.rs.html %}</div>
<div id="static-code">{% include example.rs.html %}</div>
<div class="more-examples">
<a href="http://rustbyexample.com/">他の例</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions ko-KR/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ <h2>기능</h2>
<div class="col-md-8">
<div id="active-code">
<button type="button" class="btn btn-primary btn-sm" id="run-code">실행</button>
<div id="editor">{% include ko-KR/example.rs %}</div>
<div id="editor">{% include example.rs %}</div>
<div id="result" data-msg-running="실행 중...">
<a id="playlink"><i class="icon-link-ext"></i></a>
</div>
</div>
<div id="static-code">{% include ko-KR/example.rs.html %}</div>
<div id="static-code">{% include example.rs.html %}</div>
<div class="more-examples">
<a href="http://rustbyexample.com/">더 많은 예제</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions pl-PL/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ <h2>Zawiera</h2>
<div class="col-md-8">
<div id="active-code">
<button type="button" class="btn btn-primary btn-sm" id="run-code">Uruchom</button>
<div id="editor">{% include pl-PL/example.rs %}</div>
<div id="editor">{% include example.rs %}</div>
<div id="result" data-msg-running="Uruchamiam...">
<a id="playlink"><i class="icon-link-ext"></i></a>
</div>
</div>
<div id="static-code">{% include pl-PL/example.rs.html %}</div>
<div id="static-code">{% include example.rs.html %}</div>
<div class="more-examples">
<a href="http://rustbyexample.com/">Więcej przykładów</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions pt-BR/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ <h2>Apresentando</h2>
<div class="col-md-8">
<div id="active-code">
<button type="button" class="btn btn-primary btn-sm" id="run-code">Executar</button>
<div id="editor">{% include pt-BR/example.rs %}</div>
<div id="editor">{% include example.rs %}</div>
<div id="result" data-msg-running="Executando...">
<a id="playlink"><i class="icon-link-ext"></i></a>
</div>
</div>
<div id="static-code">{% include pt-BR/example.rs.html %}</div>
<div id="static-code">{% include example.rs.html %}</div>
<div class="more-examples">
<a href="http://rustbyexample.com/">Mais exemplos</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions ru-RU/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ <h2>Возможности</h2>
<div class="col-md-8">
<div id="active-code">
<button type="button" class="btn btn-primary btn-sm" id="run-code">Запустить</button>
<div id="editor">{% include ru-RU/example.rs %}</div>
<div id="editor">{% include example.rs %}</div>
<div id="result">
<a id="playlink"><i class="icon-link-ext"></i></a>
</div>
</div>
<div id="static-code">{% include ru-RU/example.rs.html %}</div>
<div id="static-code">{% include example.rs.html %}</div>
<div class="more-examples">
<a href="http://rustbyexample.com/">Больше примеров</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions vi-VN/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ <h2>Các tính năng</h2>
<div class="col-md-8">
<div id="active-code">
<button type="button" class="btn btn-primary btn-sm" id="run-code">Chạy thử Rust</button>
<div id="editor">{% include vi-VN/example.rs %}</div>
<div id="editor">{% include example.rs %}</div>
<div id="result" data-msg-running="Đang chạy, chờ chút...">
<a id="playlink"><i class="icon-link-ext"></i></a>
</div>
</div>
<div id="static-code">{% include vi-VN/example.rs.html %}</div>
<div id="static-code">{% include example.rs.html %}</div>
<div class="more-examples">
<a href="http://rustbyexample.com/">Khám phá chân trời mới</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions zh-CN/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ <h2>特点</h2>
<div class="col-md-8">
<div id="active-code">
<button type="button" class="btn btn-primary btn-sm" id="run-code">运行</button>
<div id="editor">{% include zh-CN/example.rs %}</div>
<div id="editor">{% include example.rs %}</div>
<div id="result" data-msg-running="运行中...">
<a id="playlink"><i class="icon-link-ext"></i></a>
</div>
</div>
<div id="static-code">{% include zh-CN/example.rs.html %}</div>
<div id="static-code">{% include example.rs.html %}</div>
<div class="more-examples">
<a href="https://play.rust-lang.org/?gist=a22cc6240ff70436cb3ff29c8c1a36df&version=nightly&backtrace=2">使用母语编程</a>
<a href="http://rustbyexample.com/">更多例子</a>
Expand Down