Skip to content

Commit

Permalink
Merge pull request rust-lang#711 from brson/www
Browse files Browse the repository at this point in the history
Improve browser detection and install instructions
  • Loading branch information
brson authored Feb 2, 2017
2 parents a2de8ef + 6628dae commit c5c0754
Show file tree
Hide file tree
Showing 13 changed files with 263 additions and 124 deletions.
2 changes: 2 additions & 0 deletions _includes/rustup.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ function detect_platform() {
if (os == "unknown") {
if (navigator.appVersion.indexOf("Win")!=-1) {os = "win";}
if (navigator.appVersion.indexOf("Mac")!=-1) {os = "unix";}
// rust-www/#692 - FreeBSD epiphany!
if (navigator.appVersion.indexOf("FreeBSD")!=-1) {os = "unix";}
}

return os;
Expand Down
50 changes: 0 additions & 50 deletions _includes/set_platform.js

This file was deleted.

4 changes: 3 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,9 @@ footer a {
letter-spacing: 0.1rem;
}

#platform-instructions-unknown div {
/* This is the box that prints navigator.platform, navigator.appVersion values */
#platform-instructions-unknown > div:first-of-type {
font-size: 1rem;
line-height: 2rem;
}

Expand Down
31 changes: 25 additions & 6 deletions en-US/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,38 @@ <h1 class="rustup">Install Rust</h1>
</div>

<div id="platform-instructions-unknown" class="instructions" style="display: none;">
<!-- unrecognized platform: ask for help -->
<p>I don't recognize your platform.</p>
<p>
Rust runs on Windows, Linux, Mac OS X, FreeBSD and NetBSD. If
you are on one of these platforms and are seeing this then please
<a href="https://github.com/rust-lang/rust-www/issues/new">report an issue</a>,
along with the following values:
<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>
</p>

<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>

<!-- duplicate the default cross-platform instructions -->
<div>
<p>To install Rust, if you are running Unix,<br/>run the following
in your terminal, then follow the onscreen instructions.</p>
<pre>curl https://sh.rustup.rs -sSf | sh</pre>
</div>

<hr/>

<div>
<p>
If you are running Windows,<br/>download and run
<a href="https://win.rustup.rs">rustup&#x2011;init.exe</a>
then follow the onscreen instructions.
</p>
</div>
</div>

<div id="platform-instructions-default" class="instructions">
Expand Down
49 changes: 31 additions & 18 deletions es-ES/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,45 @@ <h1 class="rustup">Instalar Rust</h1>
</div>

<div id="platform-instructions-unknown" class="instructions" style="display: none;">
<!-- unrecognized platform: ask for help -->
<p>No reconozco tu plataforma.</p>
<p>
Rust runs on Windows, Linux, Mac OS X, FreeBSD and NetBSD. If
you are on one of these platforms and are seeing this then please
<a href="https://github.com/rust-lang/rust-www/issues/new">report an issue</a>,
along with the following values:
<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>
</p>
<p>
Rust se puede ejecutar en Windows, Linux, Max OS X, FreeBSD y
NetBSD. Si estas en una de estas plataformas y estás viendo esto,
por favor
<a href="https://github.com/rust-lang/rust-www/issues/new">reporta un error</a>,
con la siguientes información:
<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>
</p>

<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>

<!-- duplicate the default cross-platform instructions -->
<div>
<p>Para instalar Rust en Unix,<br/>ejecuta lo siguiente en tu
terminal y sigue las instrucciones en pantalla.</p>
<pre>curl https://sh.rustup.rs -sSf | sh</pre>
</div>

<hr/>

<div>
<p>
If you are running Windows,<br/>download and run
<a href="https://win.rustup.rs">rustup&#x2011;init.exe</a>
then follow the onscreen instructions.
</p>
<p>
Si estas en Windows,<br/>descarga y ejecuta
<a href="https://win.rustup.rs">rustup&#x2011;init.exe</a>
luego sigue las instrucciones en pantalla.
</p>
</div>

</div>

<div id="platform-instructions-default" class="instructions">
Expand Down
34 changes: 27 additions & 7 deletions fr-FR/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,39 @@ <h1 class="rustup">Installer Rust</h1>
</div>

<div id="platform-instructions-unknown" class="instructions" style="display: none;">
<!-- unrecognized platform: ask for help -->
<p>Je ne reconnais pas votre plate-forme.</p>
<p>
Rust tourne sur Windows, Linux, Mac OS X, FreeBSD et NetBSD. Si
vous êtes sur une de ces plate-formes et que vous voyez ceci, alors, s'il vous plaît,
<a href="https://github.com/rust-lang/rust-www/issues/new">signalez un problème</a>,
avec les valeurs suivantes :
<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>
avec les valeurs suivantes:
</p>

<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>

<!-- duplicate the default cross-platform instructions -->
<div>
<p>Pour installer Rust, si vous êtes sur Unix,<br/>lancez la commande suivante
dans votre terminal, puis suivez les instructions affichées à l'écran.</p>
<pre>curl https://sh.rustup.rs -sSf | sh</pre>
</div>

<hr/>

<div>
<p>
Si vous êtes sur Windows,<br/>téléchargez et exécutez
<a href="https://win.rustup.rs">rustup&#x2011;init.exe</a>
et suivez les instructions affichées à l'écran.
</p>
</div>

</div>

<div id="platform-instructions-default" class="instructions">
Expand Down
31 changes: 25 additions & 6 deletions it-IT/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,38 @@ <h1 class="rustup">Installa Rust</h1>
</div>

<div id="platform-instructions-unknown" class="instructions" style="display: none;">
<!-- unrecognized platform: ask for help -->
<p>Non ho riconosciuto la tua piattaforma.</p>
<p>
Rust é disponibile per Windows, Linux, Mac OS X, FreeBSD and NetBSD. Se
sei su una di queste piattaforme e vedi questo messaggio per favore
<a href="https://github.com/rust-lang/rust-www/issues/new">segnala un problema</a>,
insieme a questi valori
<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>
</p>

<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>

<!-- duplicate the default cross-platform instructions -->
<div>
<p>Per installare Rust, su sistemi Unix,<br/>esegui il seguente comando
nel tuo terminale e poi segui le istruzioni.</p>
<pre>curl https://sh.rustup.rs -sSf | sh</pre>
</div>

<hr/>

<div>
<p>
Se sei su Windows,<br/>scarica e esegui
<a href="https://win.rustup.rs">rustup&#x2011;init.exe</a>
poi segui le istruzioni a schermo.
</p>
</div>
</div>

<div id="platform-instructions-default" class="instructions">
Expand Down
31 changes: 25 additions & 6 deletions ja-JP/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,38 @@ <h1 class="rustup">Install Rust</h1>
</div>

<div id="platform-instructions-unknown" class="instructions" style="display: none;">
<!-- unrecognized platform: ask for help -->
<p>I don't recognize your platform.</p>
<p>
Rust runs on Windows, Linux, Mac OS X, FreeBSD and NetBSD. If
you are on one of these platforms and are seeing this then please
<a href="https://github.com/rust-lang/rust-www/issues/new">report an issue</a>,
along with the following values:
<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>
</p>

<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>

<!-- duplicate the default cross-platform instructions -->
<div>
<p>To install Rust, if you are running Unix,<br/>run the following
in your terminal, then follow the onscreen instructions.</p>
<pre>curl https://sh.rustup.rs -sSf | sh</pre>
</div>

<hr/>

<div>
<p>
If you are running Windows,<br/>download and run
<a href="https://win.rustup.rs">rustup&#x2011;init.exe</a>
then follow the onscreen instructions.
</p>
</div>
</div>

<div id="platform-instructions-default" class="instructions">
Expand Down
31 changes: 25 additions & 6 deletions ko-KR/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,38 @@ <h1 class="rustup">Install Rust</h1>
</div>

<div id="platform-instructions-unknown" class="instructions" style="display: none;">
<!-- unrecognized platform: ask for help -->
<p>I don't recognize your platform.</p>
<p>
Rust runs on Windows, Linux, Mac OS X, FreeBSD and NetBSD. If
you are on one of these platforms and are seeing this then please
<a href="https://github.com/rust-lang/rust-www/issues/new">report an issue</a>,
along with the following values:
<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>
</p>

<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>

<!-- duplicate the default cross-platform instructions -->
<div>
<p>To install Rust, if you are running Unix,<br/>run the following
in your terminal, then follow the onscreen instructions.</p>
<pre>curl https://sh.rustup.rs -sSf | sh</pre>
</div>

<hr/>

<div>
<p>
If you are running Windows,<br/>download and run
<a href="https://win.rustup.rs">rustup&#x2011;init.exe</a>
then follow the onscreen instructions.
</p>
</div>
</div>

<div id="platform-instructions-default" class="instructions">
Expand Down
Loading

0 comments on commit c5c0754

Please sign in to comment.