diff --git a/content/strings.yml b/content/strings.yml new file mode 100644 index 00000000000..cbd84e16b29 --- /dev/null +++ b/content/strings.yml @@ -0,0 +1,50 @@ +"Babel could not be loaded": "" +"This can be caused by an ad blocker. If you're using one, consider adding reactjs.org to the whitelist so the live code examples will work.": "" +"Loading code example...": "" +"When you encounter an error, you'll receive a link to this page for that specific error and we'll show you the full error text.": "" +"The full text of the error you just encountered is:": "" +"Edit this page": "" +"We couldn't find what you were looking for.": "" +"Page Not Found": "" +"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.": "" +"Get Started": "" +"Take the Tutorial": "" +"A JavaScript library for building user interfaces": "" +"The React documentation is available in the following languages:": "" +"In Progress": "" +"Needs Contributors": "" +"Don't see your language above?": "" +"Let us know": "" +"Contribute": "" +"Redirecting to Codepen...": "" +"Not automatically redirecting?": "" +"All posts ...": "" +"Recent Posts": "" +"Previous article": "" +"Next article": "" +"Acknowledgements": "" +"We'd like to thank all of our contributors:": "" +"In addition, we're grateful to": "" +"<0>Jeff Barczewski for allowing us to use the <1>react package name on npm.": "" +"<0>Christopher Aue for letting us use the <1>reactjs.com domain name and the <2>@reactjs username on Twitter.": "" +"<0>ProjectMoon for letting us use the <1>flux package name on npm.": "" +"Shane Anderson for allowing us to use the <1>react org on GitHub.": "" +"<0>Dmitri Voronianski for letting us use the <1>Oceanic Next color scheme on this website.": "" +"All Posts": "" +"Versions": "" +"React Versions": "" +"A complete release history for React is available <0>on GitHub.": "" +"Documentation for recent releases can also be found below.": "" +"See our FAQ for information about <0>our versioning policy and commitment to stability.": "" +"Changelog": "" +"Documentation": "" +"JSX Compiler Service": "" +"This tool has been removed as JSXTransformer has been deprecated.": "" +"We recommend using another tool such as <0>the Babel REPL.": "" +"Code of Conduct": "" +"Languages": "" +"Search": "" +"Search docs": "" +"titleTemplate": "%s – React" +"blogTitleTemplate": "%s – React Blog" +"defaultTitle": "" \ No newline at end of file diff --git a/src/components/CodeEditor/CodeEditor.js b/src/components/CodeEditor/CodeEditor.js index 2abb8ad4b2d..474b8d5dc88 100644 --- a/src/components/CodeEditor/CodeEditor.js +++ b/src/components/CodeEditor/CodeEditor.js @@ -10,6 +10,7 @@ import Remarkable from 'remarkable'; import {LiveEditor, LiveProvider} from 'react-live'; import {colors, media} from 'theme'; import MetaTitle from 'templates/components/MetaTitle'; +import Translatable from '../Translatable'; // Replace unicode to text for other languages const unicodeToText = text => @@ -62,12 +63,14 @@ class CodeEditor extends Component { if (showBabelErrorMessage) { errorMessage = ( - Babel could not be loaded. + Babel could not be loaded.

- This can be caused by an ad blocker. If you're using one, consider - adding reactjs.org to the whitelist so the live code examples will - work. + + This can be caused by an ad blocker. If you're using one, consider + adding reactjs.org to the whitelist so the live code examples will + work. +
); } else if (error != null) { diff --git a/src/components/CodeExample/CodeExample.js b/src/components/CodeExample/CodeExample.js index bc5d6ed10f8..27f9a563f74 100644 --- a/src/components/CodeExample/CodeExample.js +++ b/src/components/CodeExample/CodeExample.js @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import {colors, media} from 'theme'; import CodeEditor from '../CodeEditor/CodeEditor'; +import Translatable from '../Translatable'; class CodeExample extends Component { render() { @@ -61,7 +62,9 @@ class CodeExample extends Component { {loaded ? ( ) : ( -

Loading code example...

+

+ Loading code example... +

)} ); diff --git a/src/components/ErrorDecoder/ErrorDecoder.js b/src/components/ErrorDecoder/ErrorDecoder.js index d179a09be14..d3ca18ee222 100644 --- a/src/components/ErrorDecoder/ErrorDecoder.js +++ b/src/components/ErrorDecoder/ErrorDecoder.js @@ -8,6 +8,7 @@ import React from 'react'; import type {Node} from 'react'; +import Translatable from '../Translatable'; function replaceArgs(msg: string, argList: Array): string { let argIdx = 0; @@ -69,8 +70,10 @@ function ErrorResult(props: {|code: ?string, msg: string|}) { if (!code) { return (

- When you encounter an error, you'll receive a link to this page for that - specific error and we'll show you the full error text. + + When you encounter an error, you'll receive a link to this page for + that specific error and we'll show you the full error text. +

); } @@ -78,7 +81,11 @@ function ErrorResult(props: {|code: ?string, msg: string|}) { return (

- The full text of the error you just encountered is: + + + The full text of the error you just encountered is: + +

{urlify(errorMsg)} diff --git a/src/components/LayoutFooter/Footer.js b/src/components/LayoutFooter/Footer.js index a87d33ce86d..173e5187bc1 100644 --- a/src/components/LayoutFooter/Footer.js +++ b/src/components/LayoutFooter/Footer.js @@ -19,6 +19,7 @@ import {sectionListCommunity, sectionListDocs} from 'utils/sectionList'; import navFooter from '../../../content/footerNav.yml'; import ossLogoPng from 'images/oss_logo.png'; +import Translatable from 'components/Translatable'; const Footer = ({layoutHasSidebar = false}: {layoutHasSidebar: boolean}) => (