diff --git a/locales/en-US/wasm.ftl b/locales/en-US/wasm.ftl new file mode 100644 index 000000000..08237c965 --- /dev/null +++ b/locales/en-US/wasm.ftl @@ -0,0 +1,87 @@ +### Translation file for https://www.rust-lang.org/what/wasm + +## Web-Assembly (templates/what/wasm.hbs) + +wasm-page-title = Web­Assembly + + +## Why Rust? (templates/components/what/wasm/pitch.hbs) + +wasm-why-rust-heading = Why Rust? + +wasm-why-rust-predictable-alt = Gears +wasm-why-rust-predictable-heading = Predictable performance +wasm-why-rust-predictable-description = + No unpredictable garbage collection pauses. No JIT compiler performance cliffs. Just low-level control coupled with high-level ergonomics. + +wasm-why-rust-small-code-alt = A microscope +wasm-why-rust-small-code-heading = Small code size +wasm-why-rust-small-code-description = + Small code size means faster page loads. Rust-generated .wasm doesn’t include extra bloat, like a garbage collector. Advanced optimizations and tree shaking remove dead code. + +wasm-why-rust-amenities-alt = Luggage +wasm-why-rust-amenities-heading = Modern amenities +wasm-why-rust-amenities-description = + A lively ecosystem of libraries to help you hit the ground running. Expressive, zero-cost abstractions. And a welcoming community to help you learn. + + +## Get started! (templates/components/what/wasm/get-started.hbs) + +wasm-get-started-heading = Get started! + +wasm-get-started-wasm-alt = WebAssembly Logo +wasm-get-started-wasm-description = + Learn more about the fast, safe, and open virtual machine called WebAssembly, and read its standard. +wasm-get-started-wasm-link = Learn More + +wasm-get-started-book-alt = wasm ferris +wasm-get-started-book-description = + Learn how to build, debug, profile, and deploy WebAssembly applications using Rust! +wasm-get-started-book-link = Read The Book + +wasm-get-started-mdn-alt = MDN logo +wasm-get-started-mdn-description = + Learn more about WebAssembly on the Mozilla Developer Network. +wasm-get-started-mdn-link = Check it out + + +## Plays well with JavaScript (templates/components/what/wasm/js.hbs) + +wasm-js-heading = Plays well with JavaScript + +wasm-js-augment-heading = Augment, don’t replace +wasm-js-augment-description = + The dream of WebAssembly is not to kill JavaScript but to work alongside of it, to help super charge processing-heavy or low-level tasks — tasks that benefit from Rust’s focus on performance. + +wasm-js-toolchains-heading = Works with familiar toolchains +wasm-js-toolchains-description = + Publish Rust WebAssembly packages to package registries like npm. Bundle and ship them with webpack, Parcel, and others. Maintain them with tools like npm audit and Greenkeeper. + +wasm-js-interop-heading = Seamless interop +wasm-js-interop-description = + Automatically generate binding code between Rust, WebAssembly, and JavaScript APIs. Take advantage of libraries like web-sys that provide pre-packaged bindings for the entire web platform. + + +## Production use (templates/components/what/wasm/production.hbs) + +wasm-production-heading = Production use + +wasm-production-cloudflare-alt = cloudflare logo +wasm-production-cloudflare-quote = + We can compile Rust to WASM, and call it from Serverless functions woven into the very fabric of the Internet. That’s huge and I can’t wait to do more of it. +wasm-production-cloudflare-attribution = + – Steven Pack, Serverless Rust with Cloudflare Workers + +wasm-production-mozilla-alt = firefox +# If an opening square bracket is the first character on a line, it must be escaped like this: {"["}. See https://projectfluent.org/fluent/guide/special.html +wasm-production-mozilla-quote = + The JavaScript implementation [of the source-map library] has accumulated convoluted code in the name of performance, and we replaced it with idiomatic Rust. Rust does not force us to choose between clearly expressing intent and runtime performance. +wasm-production-mozilla-attribution = + – Nick Fitzgerald, Oxidizing Source Maps with Rust and WebAssembly + +wasm-production-dropbox-alt = dropbox +# If an opening square bracket is the first character on a line, it must be escaped like this: {"["}. See https://projectfluent.org/fluent/guide/special.html +wasm-production-dropbox-quote = + {"["}Rust’s] properties make it easy to embed the DivANS codec in a webpage with WASM, as shown above. +wasm-production-dropbox-attribution = + – Daniel Reiter Horn and Jongmin Baek, Building Better Compression Together with DivANS diff --git a/templates/components/what/wasm/get-started.hbs b/templates/components/what/wasm/get-started.hbs index c8c368211..f379ebfda 100644 --- a/templates/components/what/wasm/get-started.hbs +++ b/templates/components/what/wasm/get-started.hbs @@ -1,46 +1,44 @@
-

Get started!

+

{{text wasm-get-started-heading}}

- WebAssembly Logo

- Learn more about the fast, safe, and open virtual machine called - WebAssembly, and read its standard. + {{text wasm-get-started-wasm-description}}

- Learn More + {{text wasm-get-started-wasm-link}}
- wasm ferris

- Learn how to build, debug, profile, and deploy WebAssembly - applications using Rust! + {{text wasm-get-started-book-description}}

- Read The Book + {{text wasm-get-started-book-link}}
- MDN logo

- Learn more about WebAssembly on the Mozilla Developer Network. + {{text wasm-get-started-mdn-description}}

- Check it out + {{text wasm-get-started-mdn-link}}
diff --git a/templates/components/what/wasm/js.hbs b/templates/components/what/wasm/js.hbs index c5e8c8c4b..c814ffd17 100644 --- a/templates/components/what/wasm/js.hbs +++ b/templates/components/what/wasm/js.hbs @@ -1,34 +1,26 @@
-

Plays well with JavaScript

+

{{text wasm-js-heading}}

-

Augment, don’t replace

+

{{text wasm-js-augment-heading}}

- The dream of WebAssembly is not to kill JavaScript but to work - alongside of it, to help super charge processing-heavy or low-level - tasks — tasks that benefit from Rust’s focus on performance. + {{text wasm-js-augment-description}}

-

Works with familiar toolchains

+

{{text wasm-js-toolchains-heading}}

- - Publish Rust WebAssembly packages to package registries like npm. - Bundle and ship them with webpack, Parcel, and others. - Maintain them with tools like npm audit and Greenkeeper. + {{text wasm-js-toolchains-description}}

-

Seamless interop

+

{{text wasm-js-interop-heading}}

- Automatically generate binding code between Rust, WebAssembly, and JavaScript APIs. - Take advantage of libraries like web-sys - that - provide pre-packaged bindings for the entire web platform. + {{text wasm-js-interop-description}}

diff --git a/templates/components/what/wasm/pitch.hbs b/templates/components/what/wasm/pitch.hbs index 6820f4ba3..5fa4efd85 100644 --- a/templates/components/what/wasm/pitch.hbs +++ b/templates/components/what/wasm/pitch.hbs @@ -1,49 +1,43 @@
-

Why Rust?

+

{{text wasm-why-rust-heading}}

- Gears
-

Predictable performance

+

{{text wasm-why-rust-predictable-heading}}

- No unpredictable garbage collection pauses. No JIT compiler - performance cliffs. Just low-level control coupled with high-level - ergonomics. + {{text wasm-why-rust-predictable-description}}

- A microscope
-

Small code size

+

{{text wasm-why-rust-small-code-heading}}

- Small code size means faster page loads. Rust-generated - .wasm doesn’t include extra bloat, like a garbage - collector. Advanced optimizations and tree shaking remove dead code. + {{text wasm-why-rust-small-code-description}}

- Luggage
-

Modern amenities

+

{{text wasm-why-rust-amenities-heading}}

- A lively ecosystem of libraries to help you hit the - ground running. Expressive, zero-cost abstractions. - And a welcoming community to help you learn. + {{text wasm-why-rust-amenities-description}}

diff --git a/templates/components/what/wasm/production.hbs b/templates/components/what/wasm/production.hbs index 90f1b1c58..87e9f100f 100644 --- a/templates/components/what/wasm/production.hbs +++ b/templates/components/what/wasm/production.hbs @@ -1,62 +1,60 @@
-

Production use

+

{{text wasm-production-heading}}

- cloudflare logo + {{text wasm-production-cloudflare-alt}}
- We can compile Rust to WASM, and call it from Serverless functions woven into the very fabric of the Internet. That’s huge and I can’t wait to do more of it. + {{text wasm-production-cloudflare-quote}}

- – Steven Pack, - - Serverless Rust with Cloudflare Workers - - + {{#text wasm-production-cloudflare-attribution}} + {{#textparam href}} + https://blog.cloudflare.com/cloudflare-workers-as-a-serverless-rust-platform/ + {{/textparam}} + {{/text}}

- The JavaScript implementation [of the source-map library] - has accumulated convoluted code in the name of performance, and we - replaced it with idiomatic Rust. Rust does not force us to choose - between clearly expressing intent and runtime performance. + {{text wasm-production-mozilla-quote}}

- – Nick Fitzgerald, - - Oxidizing Source Maps with Rust and WebAssembly - + {{#text wasm-production-mozilla-attribution}} + {{#textparam href}} + https://hacks.mozilla.org/2018/01/oxidizing-source-maps-with-rust-and-webassembly/ + {{/textparam}} + {{/text}}

- dropbox + {{text wasm-production-dropbox-alt}}
- [Rust’s] properties make it easy to embed the DivANS codec in a - webpage with WASM, as shown above. + {{text wasm-production-dropbox-quote}}

- – Daniel Reiter Horn and Jongmin Baek, - - Building Better Compression Together with DivANS - + {{#text wasm-production-dropbox-attribution}} + {{#textparam href}} + https://blogs.dropbox.com/tech/2018/06/building-better-compression-together-with-divans/ + {{/textparam}} + {{/text}}

diff --git a/templates/what/wasm.hbs b/templates/what/wasm.hbs index b60b1b93b..8dbae870f 100644 --- a/templates/what/wasm.hbs +++ b/templates/what/wasm.hbs @@ -2,7 +2,7 @@
-

Web­Assembly

+

{{text wasm-page-title}}