docusaurus/docs/es-ES/translation.html
Website Deployment Script 4546c36b7d Deploy website
Deploy website version based on 6b2f57c29c
2018-06-10 19:21:05 +00:00

236 lines
No EOL
41 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="es-ES"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>Translations &amp; Localization · Docusaurus</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="Docusaurus allows for easy translation functionality using [Crowdin](https://crowdin.com/). Los archivos de documentación escritos en inglés se cargan en Crowdin para su traducción por los usuarios de una comunidad. Las páginas de nivel superior escritas con cadenas en inglés se pueden traducir envolviendo cualquier cadena que quiera traducir en una etiqueta `&lt;translate&gt;`. Otros títulos y etiquetas también se encontrarán y se traducirán correctamente."/><meta property="og:title" content="Translations &amp; Localization · Docusaurus"/><meta property="og:type" content="website"/><meta property="og:url" content="https://docusaurus.io/index.html"/><meta property="og:description" content="Docusaurus allows for easy translation functionality using [Crowdin](https://crowdin.com/). Los archivos de documentación escritos en inglés se cargan en Crowdin para su traducción por los usuarios de una comunidad. Las páginas de nivel superior escritas con cadenas en inglés se pueden traducir envolviendo cualquier cadena que quiera traducir en una etiqueta `&lt;translate&gt;`. Otros títulos y etiquetas también se encontrarán y se traducirán correctamente."/><meta property="og:image" content="https://docusaurus.io/img/docusaurus.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://docusaurus.io/img/docusaurus.png"/><link rel="shortcut icon" href="/img/docusaurus.ico"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><link rel="alternate" type="application/atom+xml" href="https://docusaurus.io/blog/atom.xml" title="Docusaurus Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://docusaurus.io/blog/feed.xml" title="Docusaurus Blog RSS Feed"/><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','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-44373548-31', 'auto');
ga('send', 'pageview');
</script><link rel="stylesheet" href="/css/code-blocks-buttons.css"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js"></script><script type="text/javascript" src="/js/code-blocks-buttons.js"></script><script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js"></script><script>
document.addEventListener("DOMContentLoaded", function(){
addBackToTop(
{"zIndex":100}
)
});
</script><link rel="stylesheet" href="/css/prism.css"/><link rel="stylesheet" href="/css/main.css"/></head><body class="sideNavVisible doc separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/es-ES"><img class="logo" src="/img/docusaurus.svg" alt="Docusaurus"/><h2 class="headerTitleWithLogo">Docusaurus</h2></a><a href="/es-ES/versions"><h3>1.2.0</h3></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class="siteNavGroupActive"><a href="/docs/es-ES/installation" target="_self">Documentos</a></li><li class=""><a href="/es-ES/help" target="_self">Ayuda</a></li><li class=""><a href="/es-ES/users" target="_self">Users</a></li><li class=""><a href="/es-ES/about-slash" target="_self">About /</a></li><li class=""><a href="/blog" target="_self">Blog</a></li><li class=""><a href="https://github.com/facebook/docusaurus" target="_self">GitHub</a></li><span><li><a id="languages-menu" href="#"><img class="languages-icon" src="/img/language.svg"/>Español</a><div id="languages-dropdown" class="hide"><ul id="languages-dropdown-items"><li><a href="/docs/en/translation">English</a></li><li><a href="/docs/ro/translation">Română</a></li><li><a href="/docs/tr/translation">Türkçe</a></li><li><a href="/docs/zh-CN/translation">简体中文</a></li><li><a href="https://crowdin.com/project/docusaurus" target="_blank" rel="noreferrer noopener">Help Translate</a></li></ul></div></li><script>
const languagesMenuItem = document.getElementById("languages-menu");
const languagesDropDown = document.getElementById("languages-dropdown");
languagesMenuItem.addEventListener("click", function(){
if(languagesDropDown.className == "hide") {
languagesDropDown.className = "visible";
} else {
languagesDropDown.className = "hide";
}
});
</script></span><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i></i><span>Guías</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup navGroupActive"><h3>Empezando</h3><ul><li class="navListItem"><a class="navItem" href="/docs/es-ES/installation">Installation</a></li><li class="navListItem"><a class="navItem" href="/docs/es-ES/site-preparation">Site Preparation</a></li><li class="navListItem"><a class="navItem" href="/docs/es-ES/site-creation">Creating your site</a></li><li class="navListItem"><a class="navItem" href="/docs/es-ES/publishing">Publishing your site</a></li></ul></div><div class="navGroup navGroupActive"><h3>Guías</h3><ul><li class="navListItem"><a class="navItem" href="/docs/es-ES/blog">Adding a Blog</a></li><li class="navListItem"><a class="navItem" href="/docs/es-ES/custom-pages">Custom Pages</a></li><li class="navListItem"><a class="navItem" href="/docs/es-ES/search">Enabling Search</a></li><li class="navListItem"><a class="navItem" href="/docs/es-ES/navigation">Navigation and Sidebars</a></li><li class="navListItem navListItemActive"><a class="navItem navItemActive" href="/docs/es-ES/translation">Traducciones y localización</a></li><li class="navListItem"><a class="navItem" href="/docs/es-ES/versioning">Versioning</a></li></ul></div><div class="navGroup navGroupActive"><h3>Interfaz de programación de aplicaciones</h3><ul><li class="navListItem"><a class="navItem" href="/docs/es-ES/commands">CLI Commands</a></li><li class="navListItem"><a class="navItem" href="/docs/es-ES/doc-markdown">Markdown Features</a></li><li class="navListItem"><a class="navItem" href="/docs/es-ES/api-pages">Pages and Styles</a></li><li class="navListItem"><a class="navItem" href="/docs/es-ES/site-config">siteConfig.js</a></li></ul></div></div></section></div><script>
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');
const headings = document.querySelector('.toc-headings');
headings && headings.addEventListener('click', function(event) {
if (event.target.tagName === 'A') {
document.body.classList.remove('tocActive');
}
}, false);
function createToggler(togglerSelector, targetSelector, className) {
var toggler = document.querySelector(togglerSelector);
var target = document.querySelector(targetSelector);
toggler.onclick = function(event) {
event.preventDefault();
target.classList.toggle(className);
};
}
});
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/es-ES" target="_blank" rel="noreferrer noopener">Translate</a><h1>Translations &amp; Localization</h1></header><article><div><span><p>Docusaurus allows for easy translation functionality using <a href="https://crowdin.com/">Crowdin</a>. Los archivos de documentación escritos en inglés se cargan en Crowdin para su traducción por los usuarios de una comunidad. Las páginas de nivel superior escritas con cadenas en inglés se pueden traducir envolviendo cualquier cadena que quiera traducir en una etiqueta <code>&lt;translate&gt;</code>. Otros títulos y etiquetas también se encontrarán y se traducirán correctamente.</p>
<h2><a class="anchor" aria-hidden="true" id="configuraciones-de-traduccion-de-docusaurus"></a><a href="#configuraciones-de-traduccion-de-docusaurus" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Configuraciones de Traducción de Docusaurus</h2>
<p>To generate example files for translations with Docusaurus, run the <code>examples</code> script with the command line argument <code>translations</code>:</p>
<pre><code class="hljs css languages- bash">npm run examples translations
</code></pre>
<p>o</p>
<pre><code class="hljs css languages- bash">yarn examples translations
</code></pre>
<p>Esto creará los siguientes archivos:</p>
<pre><code class="hljs css languages- bash">pages/en/<span class="hljs-built_in">help</span>-with-translations.js
languages.js
../crowdin.yaml
</code></pre>
<ul>
<li>El archivo <code>pages/en/help-with-translations.js</code> incluye la misma página de ayuda inicial generada por el script <code>examples</code>, pero ahora incluye etiquetas de traducción.</li>
</ul>
<blockquote>
<p>Generally, you will use <code>help-with-translations.js</code> as a guide to enable translations in your other pages, but not actually commit the file to your repo (i.e., you can delete it). However, if you want a Help page, and you currently do not have one, you can rename this file to <code>help.js</code> and use it as a starting point.</p>
</blockquote>
<ul>
<li><p>The <code>languages.js</code> file tells Docusaurus what languages you want to enable for your site. By default, we expect English to be enabled.</p></li>
<li><p>The <code>crowdin.yaml</code> file is used to configure Crowdin integration, and is copied up one level into your Docusaurus project repo. If your Docusaurus project resides in <code>/project/website</code>, then <code>crowdin.yaml</code> will be copied to <code>/project/crowdin.yaml</code>.</p></li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="traduciendo-sus-documentos-existentes"></a><a href="#traduciendo-sus-documentos-existentes" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Traduciendo sus documentos existentes</h2>
<p>Your documentation files (e.g., the <code>.md</code> files that live in your <code>docs</code> directory) do not need to be changed or moved to support translations. They will be uploaded to Crowdin to be translated directly.</p>
<h2><a class="anchor" aria-hidden="true" id="habilitacion-de-traducciones-en-paginas"></a><a href="#habilitacion-de-traducciones-en-paginas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Habilitación de traducciones en páginas</h2>
<p>Las páginas le permiten personalizar el diseño y el contenido específico de las páginas, como una página de índice personalizada o una página de ayuda.</p>
<p>Pages with text that you want translated should be placed in <code>website/pages/en</code> directory.</p>
<p>Ajuste las cadenas que desee traducir en una etiqueta <code>&lt;translate&gt;</code> y agregue la siguiente instrucción <code>require</code> al principio del archivo:</p>
<pre><code class="hljs css languages- jsx"><span class="token operator">...</span>
<span class="token keyword">const</span> translate <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">'../../server/translate.js'</span><span class="token punctuation">)</span><span class="token punctuation">.</span>translate<span class="token punctuation">;</span>
<span class="token operator">...</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h2</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>translate</span><span class="token punctuation">></span></span>This header will be translated<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>translate</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h2</span><span class="token punctuation">></span></span>
<span class="token operator">...</span>
</code></pre>
<p>También puede incluir un atributo de descripción opcional para dar más contexto a un traductor sobre cómo traducir la cadena:</p>
<pre><code class="hljs css languages- jsx"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>translate</span> <span class="token attr-name">desc</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>flower, not verb<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Rose<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>translate</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">></span></span>
</code></pre>
<blockquote>
<p>The <code>&lt;translate&gt;</code> tag generally works well on pure strings. If you have a string like &quot;Docusaurus currently provides support to help your website use <a href="${siteConfig.baseUrl}docs/${this.props.language}/translation.html">translations</a>&quot;, wrapping the <code>&lt;translation&gt;</code> tag around that entire string will cause issues because of the markdown linking, etc. Your options are to not translate those strings, or spread a bunch of <code>&lt;translate&gt;</code> tags amongst the pure substrings of that string.</p>
</blockquote>
<h2><a class="anchor" aria-hidden="true" id="reunir-cadenas-para-traducir"></a><a href="#reunir-cadenas-para-traducir" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Reunir cadenas para traducir</h2>
<p>Las cadenas dentro de las páginas localizadas se deben extraer y proporcionar a Crowdin.</p>
<p>Add the following script to your <code>website/package.json</code> file, if it does not exist already:</p>
<pre><code class="hljs css languages- js">{
...
<span class="hljs-string">"scripts"</span>: {
<span class="hljs-string">"write-translations"</span>: <span class="hljs-string">"docusaurus-write-translations"</span>
},
...
}
</code></pre>
<p>La ejecución del script generará un archivo <code>website/i18n/en.json</code> que contiene todas las cadenas que se traducirán del inglés a otros idiomas.</p>
<p>El script incluirá texto de los siguientes lugares:</p>
<ul>
<li><code>title</code> y <code>sidebar_label</code> cadenas en los encabezados de documentos de markdown</li>
<li>nombres de categoría en <code>sidebars.json</code></li>
<li>tagline en <code>siteConfig.js</code></li>
<li>enlace de encabezado <code>label</code> cadenas en <code>siteConfig.js</code></li>
<li>cadenas incluidas en la etiqueta <code>&lt;translate&gt;</code>etiquetas en cualquier archivo <code>.js</code> dentro de <code>pages</code></li>
</ul>
<h2><a class="anchor" aria-hidden="true" id="como-se-traducen-las-cadenas"></a><a href="#como-se-traducen-las-cadenas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Cómo se traducen las cadenas</h2>
<p>Docusaurus en sí no hace ninguna traducción de un idioma a otro. En cambio, integra <a href="https://crowdin.com/"> Crowdin</a> para cargar traducciones y luego descarga los archivos adecuadamente traducidos de Crowdin.</p>
<h2><a class="anchor" aria-hidden="true" id="como-utiliza-docusaurus-las-cadenas-de-traduccion"></a><a href="#como-utiliza-docusaurus-las-cadenas-de-traduccion" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Cómo utiliza Docusaurus las cadenas de traducción</h2>
<p>Esta sección proporciona un contexto sobre cómo funcionan las traducciones en Docusaurus.</p>
<h3><a class="anchor" aria-hidden="true" id="cadenas"></a><a href="#cadenas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Cadenas</h3>
<p>Un sitio de Docusaurus tiene muchas cadenas usadas a lo largo de él que requieren localización. Sin embargo, mantener una lista de cadenas usadas en un sitio puede ser laborioso. Docusaurus simplifies this by centralizing strings.</p>
<p>La navegación del encabezado, por ejemplo, puede tener enlaces a 'Inicio' o a su 'Blog'. Esta y otras cadenas encontradas en los encabezados y barras laterales de las páginas se extraen y se colocan en <code>i18n/en.json</code>. When your files are translated, say into Spanish, a <code>i18n/es-ES.json</code> file will be downloaded from Crowdin. Luego, cuando se generen las páginas en español, Docusaurus reemplazará la versión en inglés de las cadenas correspondientes con cadenas traducidas del archivo correspondiente de cadenas localizadas (por ejemplo, en un sitio habilitado en español, 'Ayuda' se convertirá en 'Ayuda').</p>
<h3><a class="anchor" aria-hidden="true" id="archivos-de-markdown"></a><a href="#archivos-de-markdown" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Archivos de Markdown</h3>
<p>Para los propios archivos de documentación, las versiones traducidas de estos archivos se descargan y luego se procesan a través de la plantilla de diseño adecuada.</p>
<h3><a class="anchor" aria-hidden="true" id="otras-paginas"></a><a href="#otras-paginas" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Otras páginas</h3>
<p>For other pages, Docusaurus will automatically transform all <code>&lt;translate&gt;</code> tags it finds into function calls that return the translated strings from the corresponding localized file <em><code>locale.json</code></em>.</p>
<h2><a class="anchor" aria-hidden="true" id="crowdin"></a><a href="#crowdin" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Crowdin</h2>
<p>Crowdin is a company that provides translation services. For Open Source projects, Crowdin provides free string translations.</p>
<p>Create your translation project on <a href="https://crowdin.com/">Crowdin</a>. Puede usar <a href="https://support.crowdin.com/translation-process-overview/">Crowdin's guides</a> para obtener más información sobre el flujo de trabajo de las traducciones. <em>We suggest that you deselect and do not include &quot;English&quot; as a translatable language to prevent the creation of <code>en-US</code> localization files as this can lead to confusion.</em></p>
<blockquote>
<p>Ensure in your Crowdin settings, in the Translations section, that &quot;Duplicate Strings&quot; are set to <a href="https://support.crowdin.com/api/create-project/">&quot;Hide - all duplicates will share the same translation&quot;</a>. This setting will ensure that identical strings between versions share a single translation.</p>
</blockquote>
<p>Your project will need a <code>crowdin.yaml</code> file generated. If you ran <code>yarn examples translations</code> or <code>npm run examples translations</code>, this file was created for you on the same level as your <code>website</code> directory.</p>
<blockquote>
<p>You will need to install the <code>crowdin</code> command line interface. Please follow the <a href="https://support.crowdin.com/cli-tool/">installation directions</a>.</p>
</blockquote>
<p>The example below can be automatically generated by the Docusaurus cli with the <code>examples</code> script. It should be placed in the top level of your project directory to configure how and what files are uploaded/downloaded.</p>
<p>Below is an example Crowdin configuration for the respective languages: German, Spanish, French, Japanese, Korean, Bahasa Indonesia, Portuguese Brazilian, Chinese Simplified, and Chinese Traditional.</p>
<pre><code class="hljs css languages- yaml"><span class="hljs-attr">project_identifier_env:</span> <span class="hljs-string">CROWDIN_DOCUSAURUS_PROJECT_ID</span>
<span class="hljs-attr">api_key_env:</span> <span class="hljs-string">CROWDIN_DOCUSAURUS_API_KEY</span>
<span class="hljs-attr">base_path:</span> <span class="hljs-string">"./"</span>
<span class="hljs-attr">preserve_hierarchy:</span> <span class="hljs-literal">true</span>
<span class="hljs-attr">files:</span>
<span class="hljs-bullet"> -</span>
<span class="hljs-attr"> source:</span> <span class="hljs-string">'/docs/**/*.md'</span>
<span class="hljs-attr"> translation:</span> <span class="hljs-string">'/website/translated_docs/%locale%/**/%original_file_name%'</span>
<span class="hljs-attr"> languages_mapping:</span> <span class="hljs-meta">&amp;anchor</span>
<span class="hljs-attr"> locale:</span>
<span class="hljs-attr"> 'de':</span> <span class="hljs-string">'de'</span>
<span class="hljs-attr"> 'es-ES':</span> <span class="hljs-string">'es-ES'</span>
<span class="hljs-attr"> 'fr':</span> <span class="hljs-string">'fr'</span>
<span class="hljs-attr"> 'ja':</span> <span class="hljs-string">'ja'</span>
<span class="hljs-attr"> 'ko':</span> <span class="hljs-string">'ko'</span>
<span class="hljs-attr"> 'mr':</span> <span class="hljs-string">'mr-IN'</span>
<span class="hljs-attr"> 'pt-BR':</span> <span class="hljs-string">'pt-BR'</span>
<span class="hljs-attr"> 'zh-CN':</span> <span class="hljs-string">'zh-CN'</span>
<span class="hljs-attr"> 'zh-TW':</span> <span class="hljs-string">'zh-TW'</span>
</code></pre>
<p>You can go <a href="https://support.crowdin.com/configuration-file/">here</a> to learn more about customizing your <code>crowdin.yaml</code> file.</p>
<h3><a class="anchor" aria-hidden="true" id="setup-the-crowdin-scripts"></a><a href="#setup-the-crowdin-scripts" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Setup the Crowdin Scripts</h3>
<p>You will want to manually sync your files to and from Crowdin. The sync process will upload any markdown files in <code>/docs</code> as well as translatable strings in <code>website/i18n/en.json</code>. (These strings can be generated by running <code>yarn write-translations</code>.)</p>
<p>You can add the following to your <code>package.json</code> to manually trigger Crowdin.</p>
<pre><code class="hljs css languages- js"><span class="hljs-string">"scripts"</span>: {
<span class="hljs-string">"crowdin-upload"</span>: <span class="hljs-string">"crowdin --config ../crowdin.yaml upload sources --auto-update -b master"</span>,
<span class="hljs-string">"crowdin-download"</span>: <span class="hljs-string">"crowdin --config ../crowdin.yaml download -b master"</span>
},
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="sincronizacion-manual-de-archivos"></a><a href="#sincronizacion-manual-de-archivos" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Sincronización manual de archivos</h3>
<p>You will always want to upload your markdown files and translatable strings first and the download the translations section. So run the commands in this order:</p>
<pre><code class="hljs css languages- bash">CROWDIN_DOCUSAURUS_PROJECT_ID=YOUR_CROWDIN_PROJECT_ID CROWDIN_DOCUSAURUS_API_KEY=YOUR_CROWDIN_API_KEY yarn run crowdin-upload
CROWDIN_DOCUSAURUS_PROJECT_ID=YOUR_CROWDIN_PROJECT_ID CROWDIN_DOCUSAURUS_API_KEY=YOUR_CROWDIN_API_KEY yarn run crowdin-download
</code></pre>
<blockquote>
<p><code>YOUR_CROWDIN_PROJECT_ID</code> is the name of your Crowdin project. e.g., for <a href="https://crowdin.com/project/docusaurus/">https://crowdin.com/project/docusaurus/</a>, that variable would be set to <code>docusaurus</code>. <code>YOUR_CROWDIN_API_KEY</code> is a unique key that is like a password. You can find it in the <code>API</code> tab of your Crowdin project's <code>Settings</code>.</p>
<p>These commands require having an environment variable set with your Crowdin project id and api key (<code>CROWDIN_PROJECT_ID</code>, <code>CROWDIN_API_KEY</code>). You can preface them inline as done above or add them permanently to your <code>.bashrc</code> or <code>.bash_profile</code>.</p>
<p>If you run more than one localized Docusaurus project on your computer, you should change the name of the environment variables to something unique (<code>CROWDIN_PROJECTNAME_PROJECT_ID</code>, <code>CROWDIN_PROJECTNAME_API_KEY</code>).</p>
<p>Since the files are generated, you do not need to have any files in your <code>website/i18n</code> or <code>website/translated_docs</code> directory as part of your repo. So you can can add <code>website/i18n/*</code> and <code>website/translated_docs</code> to your <code>.gitignore</code> file.</p>
</blockquote>
<h3><a class="anchor" aria-hidden="true" id="automated-file-sync-using-circleci"></a><a href="#automated-file-sync-using-circleci" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Automated File Sync Using CircleCI</h3>
<p>You can automate pulling down and uploading translations for your files using the <a href="https://circleci.com">CircleCI</a> web continuous integration service.</p>
<p>First, update the <code>circle.yml</code> file in your project directory to include steps to upload English files to be translated and download translated files using the Crowdin CLI. Aquí hay un archivo de ejemplo <code>circle.yml</code>:</p>
<pre><code class="hljs css languages- yaml"><span class="hljs-attr">machine:</span>
<span class="hljs-attr"> node:</span>
<span class="hljs-attr"> version:</span> <span class="hljs-number">6.10</span><span class="hljs-number">.3</span>
<span class="hljs-attr"> npm:</span>
<span class="hljs-attr"> version:</span> <span class="hljs-number">3.10</span><span class="hljs-number">.10</span>
<span class="hljs-attr">test:</span>
<span class="hljs-attr"> override:</span>
<span class="hljs-bullet"> -</span> <span class="hljs-string">"true"</span>
<span class="hljs-attr">deployment:</span>
<span class="hljs-attr"> website:</span>
<span class="hljs-attr"> branch:</span> <span class="hljs-string">master</span>
<span class="hljs-attr"> commands:</span>
<span class="hljs-comment"># configure git user</span>
<span class="hljs-bullet"> -</span> <span class="hljs-string">git</span> <span class="hljs-string">config</span> <span class="hljs-bullet">--global</span> <span class="hljs-string">user.email</span> <span class="hljs-string">"test-site-bot@users.noreply.github.com"</span>
<span class="hljs-bullet"> -</span> <span class="hljs-string">git</span> <span class="hljs-string">config</span> <span class="hljs-bullet">--global</span> <span class="hljs-string">user.name</span> <span class="hljs-string">"Website Deployment Script"</span>
<span class="hljs-bullet"> -</span> <span class="hljs-string">echo</span> <span class="hljs-string">"machine github.com login test-site-bot password $GITHUB_TOKEN"</span> <span class="hljs-string">&gt; ~/.netrc
# install Docusaurus and generate file of English strings
- cd website &amp;&amp; npm install &amp;&amp; npm run write-translations &amp;&amp; cd ..
# crowdin install
- sudo apt-get install default-jre
- wget https://artifacts.crowdin.com/repo/deb/crowdin.deb -O crowdin.deb
- sudo dpkg -i crowdin.deb
# translations upload/download
- crowdin --config crowdin.yaml upload sources --auto-update -b master
- crowdin --config crowdin.yaml download -b master
# build and publish website
- cd website &amp;&amp; GIT_USER=test-site-bot npm run publish-gh-pages
</span></code></pre>
<p>El comando <code>crowdin</code> usa el archivo <code>crowdin.yaml</code> generado con el script <code>examples</code>. Debe colocarse en el directorio de su proyecto para configurar cómo y qué archivos se cargan/descargan.</p>
<p>Tenga en cuenta que en el archivo <code>crowdin.yaml</code>, <code>CROWDIN_PROJECT_ID</code> y <code>CROWDIN_API_KEY</code> se configuran las variables de entorno en Circle para su proyecto Crowdin. Se pueden encontrar en la configuración de tu proyecto Crowdin.</p>
<p>Ahora, Circle lo ayudará a obtener traducciones automáticamente antes de construir su sitio web. El archivo <code>crowdin.yaml</code> provisto copiará los documentos traducidos en <code>website/translated_docs/</code>, y las versiones traducidas del archivo <code>i18n/en.json</code> en <code>i18n/${language}.json</code>.</p>
<p>Si desea usar Crowdin en su máquina localmente, puede instalar la <a href="https://support.crowdin.com/cli-tool/"> herramienta Crowdin CLI</a> y ejecutar los mismos comandos que se encuentran en el archivo <code>circle.yaml</code>. La única diferencia es que debe establecer los valores <code>project_identifier</code> y <code>api_key</code> en el archivo <code>crowdin.yaml</code>, ya que no tendrá configuradas las variables de entorno Circle.</p>
<h2><a class="anchor" aria-hidden="true" id="versiones-y-traducciones"></a><a href="#versiones-y-traducciones" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Versiones y Traducciones</h2>
<p>Si desea tener traducción y versiones para su documentación, agregue la siguiente sección al final de su archivo <code>crowdin.yaml</code>:</p>
<pre><code class="hljs css languages- yaml"><span class="hljs-bullet"> -</span>
<span class="hljs-attr"> source:</span> <span class="hljs-string">'/website/versioned_docs/**/*.md'</span>
<span class="hljs-attr"> translation:</span> <span class="hljs-string">'/website/translated_docs/%locale%/**/%original_file_name%'</span>
<span class="hljs-attr"> languages_mapping:</span> <span class="hljs-meta">*anchor</span>
</code></pre>
<p>Los documentos traducidos y versionados se copiarán en el sitio web <code>website/translated_docs/${language}/${version}/</code>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="navigation">← Navigation and Sidebars</a><a class="docs-next button" href="versioning">Versioning →</a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#configuraciones-de-traduccion-de-docusaurus">Configuraciones de Traducción de Docusaurus</a></li><li><a href="#traduciendo-sus-documentos-existentes">Traduciendo sus documentos existentes</a></li><li><a href="#habilitacion-de-traducciones-en-paginas">Habilitación de traducciones en páginas</a></li><li><a href="#reunir-cadenas-para-traducir">Reunir cadenas para traducir</a></li><li><a href="#como-se-traducen-las-cadenas">Cómo se traducen las cadenas</a></li><li><a href="#como-utiliza-docusaurus-las-cadenas-de-traduccion">Cómo utiliza Docusaurus las cadenas de traducción</a><ul class="toc-headings"><li><a href="#cadenas">Cadenas</a></li><li><a href="#archivos-de-markdown">Archivos de Markdown</a></li><li><a href="#otras-paginas">Otras páginas</a></li></ul></li><li><a href="#crowdin">Crowdin</a><ul class="toc-headings"><li><a href="#setup-the-crowdin-scripts">Setup the Crowdin Scripts</a></li><li><a href="#sincronizacion-manual-de-archivos">Sincronización manual de archivos</a></li><li><a href="#automated-file-sync-using-circleci">Automated File Sync Using CircleCI</a></li></ul></li><li><a href="#versiones-y-traducciones">Versiones y Traducciones</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div><h5>Docs</h5><a href="
/docs/es-ES/installation.html">Getting Started</a><a href="
/docs/es-ES/versioning.html">Versioning</a><a href="
/docs/es-ES/translation.html">Localization</a><a href="
/docs/es-ES/search.html">Adding Search</a></div><div><h5>Community</h5><a href="/es-ES/users.html">User Showcase</a></div><div><h5>More</h5><div class="social"><a class="github-button" href="https://github.com/facebook/Docusaurus" data-count-href="/facebook/Docusaurus/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub">Docusaurus</a></div><div class="social"><a href="https://twitter.com/docusaurus" class="twitter-follow-button">Follow @docusaurus</a></div><div class="social"><div class="fb-like" data-href="https://docusaurus.io" data-layout="standard" data-share="true" data-width="225" data-show-faces="false"></div></div></div></section><a href="https://code.facebook.com/projects/" target="_blank" rel="noreferrer noopener" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2018 Facebook Inc.</span></section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'199138890728411',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
var search = docsearch({
apiKey: '3eb9507824b8be89e7a199ecaa1a9d2c',
indexName: 'docusaurus',
inputSelector: '#search_input_react'
});
</script></body></html>