mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-02 03:37:48 +02:00
docs(v1): fixing few typos and enhancing few sentences clarity (#3082)
This commit is contained in:
parent
3cfbf4b70d
commit
6a511b805a
5 changed files with 9 additions and 9 deletions
|
@ -210,7 +210,7 @@ You can find the full list of supported themes in the Highlight.js [`styles`](ht
|
|||
|
||||
### Registering additional languages
|
||||
|
||||
While Highlight.js provides support for [many popular languages out of the box](https://highlightjs.org/static/demo/), you may find the need to register additional language support. For these cases, we provide an escape valve by exposing the `hljs` constant as part of the `highlight` config key. This in turn allows you to call [`registerLanguage`](http://highlightjs.readthedocs.io/en/latest/api.html#registerlanguage-name-language):
|
||||
While Highlight.js provides support for [many popular languages out of the box](https://highlightjs.org/static/demo/), you may find the need to register additional language support. For these cases, we provide an escape valve by exposing the `hljs` constant as part of the `highlight` config key. This, in turn, allows you to call [`registerLanguage`](http://highlightjs.readthedocs.io/en/latest/api.html#registerlanguage-name-language):
|
||||
|
||||
```js
|
||||
{
|
||||
|
|
|
@ -96,7 +96,7 @@ blogSidebarTitle: { default: 'Recent posts', all: 'All blog posts' },
|
|||
|
||||
Docusaurus provides an RSS feed for your blog posts. Both RSS and Atom feed formats are supported. This data is automatically added to your website page's HTML `<HEAD>` tag.
|
||||
|
||||
A summary of the post's text is provided in the RSS feed up to the `<!--truncate-->`. If no `<!--truncate-->` tag is found, then all text up to 250 characters is used.
|
||||
A summary of the post's text is provided in the RSS feed up to the `<!--truncate-->`. If no `<!--truncate-->` tag is found, then all text up to 250 characters are used.
|
||||
|
||||
## Social Buttons
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ You configure the contents of the sidebar, and the order of its documents, in th
|
|||
|
||||
> Until you add your document to `website/sidebars.json`, they will only be accessible via a direct URL. The doc will not show up in any sidebar.
|
||||
|
||||
Within `sidebars.json`, add the `id` you used in the document header to existing sidebar/category. In the below case, `docs` is the name of the sidebar and `Getting Started` is a category within the sidebar.
|
||||
Within `sidebars.json`, add the `id` you used in the document header to the existing sidebar/category. In the below case, `docs` is the name of the sidebar and `Getting Started` is a category within the sidebar.
|
||||
|
||||
```js
|
||||
{
|
||||
|
@ -234,7 +234,7 @@ If search is enabled on your site, your search bar will appear to the right of y
|
|||
|
||||
### Languages Dropdown
|
||||
|
||||
If translations are enabled on your site, the language dropdown will appear to the right of your links (and to the left of the search bar, if search is enabled). If you want to put the language selection drop down between links in the header, add a languages entry in the `headerLinks` config array:
|
||||
If translations are enabled on your site, the language dropdown will appear to the right of your links (and to the left of the search bar, if search is enabled). If you want to put the language selection dropdown between links in the header, add a languages entry in the `headerLinks` config array:
|
||||
|
||||
```js
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@ Pages allow you to customize the layout and specific content of pages like a cus
|
|||
|
||||
Pages with text that you want translated should be placed in `website/pages/en` directory.
|
||||
|
||||
Wrap strings you want translated in a `<translate>` tag, and add the following `require` statement to the top of the file:
|
||||
Wrap strings that you want translated in a `<translate>` tag, and add the following `require` statement to the top of the file:
|
||||
|
||||
```jsx
|
||||
...
|
||||
|
@ -138,7 +138,7 @@ See the generated `website/i18n/en.json` for an example.
|
|||
|
||||
## How Strings Get Translated
|
||||
|
||||
Docusaurus itself does not do any translation from one language to another. Instead, it integrates [Crowdin](https://crowdin.com/) to upload translations and then downloads the appropriately translated files from Crowdin.
|
||||
Docusaurus itself does not do any translation from one language to another. Instead, it integrates [Crowdin](https://crowdin.com/) to upload translations and then download the appropriately translated files from Crowdin.
|
||||
|
||||
## How Docusaurus Uses String Translations
|
||||
|
||||
|
@ -162,7 +162,7 @@ For other pages, Docusaurus will automatically transform all `<translate>` tags
|
|||
|
||||
Crowdin is a company that provides translation services. For Open Source projects, Crowdin provides free string translations.
|
||||
|
||||
Create your translation project on [Crowdin](https://crowdin.com/). You can use [Crowdin's guides](https://support.crowdin.com/translation-process-overview/) to learn more about the translations work flow. _We suggest that you deselect and do not include "English" as a translatable language to prevent the creation of `en-US` localization files as this can lead to confusion._
|
||||
Create your translation project on [Crowdin](https://crowdin.com/). You can use [Crowdin's guides](https://support.crowdin.com/translation-process-overview/) to learn more about the translations workflow. _We suggest that you deselect and do not include "English" as a translatable language to prevent the creation of `en-US` localization files as this can lead to confusion._
|
||||
|
||||
> Ensure in your Crowdin settings, in the Translations section, that "Duplicate Strings" are set to ["Hide - all duplicates will share the same translation"](https://support.crowdin.com/api/create-project/). This setting will ensure that identical strings between versions share a single translation.
|
||||
|
||||
|
@ -213,7 +213,7 @@ You can add the following to your `package.json` to manually trigger Crowdin.
|
|||
|
||||
### Manual File Sync
|
||||
|
||||
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:
|
||||
You will always want to upload your markdown files and translatable strings first and download the translations section. So run the commands in this order:
|
||||
|
||||
```bash
|
||||
CROWDIN_DOCUSAURUS_PROJECT_ID=YOUR_CROWDIN_PROJECT_ID CROWDIN_DOCUSAURUS_API_KEY=YOUR_CROWDIN_API_KEY yarn run crowdin-upload
|
||||
|
|
|
@ -15,7 +15,7 @@ yarn examples versions
|
|||
|
||||
This creates the `pages/en/versions.js` file.
|
||||
|
||||
You can edit this file later on to customize how you display the versions.
|
||||
You can edit this file, later on, to customize how you display the versions.
|
||||
|
||||
Add the following script to your `package.json` file if it doesn't already exist:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue