|
3 | 3 | "label": "English",
|
4 | 4 | "locale": {
|
5 | 5 | "pages": {
|
| 6 | + "LocalizationWorkflowTutorial": { |
| 7 | + "headers": { |
| 8 | + "localizationProcess": "Localization process", |
| 9 | + "localization": "Localization", |
| 10 | + "creatingLang": "Creating a language pack", |
| 11 | + "langAccess": "Access to the language pack", |
| 12 | + "langTranslation": "Adding a translation", |
| 13 | + "interfaceLocalization": "Interface localization", |
| 14 | + "mechanismAccess": "Access to the localization engine", |
| 15 | + "sourcesOnGitHub": "Source codes on" |
| 16 | + }, |
| 17 | + "langStructureCaption": "Material Docs has a built-in localization mechanism. The language pack has the following structure:", |
| 18 | + "langStructureName": "The name of the language pack. (_recommends naming according to standards, e.g. __en-us___)", |
| 19 | + "langStructureLabel": "The nice name of the language pack will be displayed in the interface.", |
| 20 | + "langStructureLocale": "The object that stores your localization data.", |
| 21 | + "langStructureLoadLang": "The function to be called when the language is loaded. Needed to get localization from a remote host.", |
| 22 | + "langStructureComment": "One of the parameters must be defined in the Lang object __: _locale_ or _loadLang_!__", |
| 23 | + "creatingLang": "Let's create a language pack for existing pages and transfer it to", |
| 24 | + "applyingLang": "Now that we have created one language pack, we can start the Material Docs localization system. To do this, you need to transfer the package to", |
| 25 | + "appliedLang": "A language field appeared in the upper right corner.", |
| 26 | + "accessingLang": "Now, let's get the text from the language pack. To do this, we will use the ```<Locale />``` component. In the parameter ___path___ specifies the path to the variable inside the _locale_ object in the language pack.", |
| 27 | + "accessingLangComment": "> Please note that localization of the ```<Markdown />``` component needs to be done differently. This component contains\n> own parameter ___locale___, with which we advise you to specify the path in the language pack. ", |
| 28 | + "translating": "After we have created ___defaultLanguage___, we can move on to translation.", |
| 29 | + "translatingComment": "Use only the fields specified in the ___locale___ field of the __ default language pack__.", |
| 30 | + "createTranslate": "Let's create a translation:", |
| 31 | + "missingFieldsComment": "Note that __translation__ contains __not all of the fields__ that are in the standard language pack. Fields that are not in the translation __ will be taken from the standard package __.", |
| 32 | + "providingLang": "Now, let's pass the ___langs___ parameter to the ```<DocsLayout />``` component:", |
| 33 | + "languageSwitch": "Now, the language selection button on the top right of the interface is available and offers a choice of 2 languages.", |
| 34 | + "interfaceTranslating": "The MaterialDocs interface is in English by default. In order to translate it, you need to add to the next\nstructure in the ___locale___ field of the language pack:", |
| 35 | + "interfaceTranslated": "Now, the documentation interface has been translated. ", |
| 36 | + "usingHooks": "You can access the localization engine using the ___useLang()___ hook or the ___withLang()___ higher-order component. We advise you to use them only as a last resort. ", |
| 37 | + "sourcesOnGitHub": "You can find the sources for this example at", |
| 38 | + "here": "here" |
| 39 | + |
| 40 | + }, |
6 | 41 | "HostingMaterialDocsOnGHPagesTutorial": {
|
7 | 42 | "headers": {
|
8 |
| - "hostingOnGH": "Хостинг Material Docs на GitHub Pages", |
9 |
| - "projectSetup": "Настройка проекта для GitHub Pages", |
10 |
| - "problem": "Проблема", |
11 |
| - "solutionTheory": "Решение в теории", |
12 |
| - "solutionPractice": "Решение на практике", |
13 |
| - "repoCreating": "Создание репозитория", |
14 |
| - "compilation": "Компиляция", |
15 |
| - "ghPagesSetup": "Настройка GitHub Pages", |
16 |
| - "basicSetup": "Базовая настройка", |
17 |
| - "ownDomainHooking": "Привязывание собственного домена", |
18 |
| - "nextSteps": "Дальнейшие шаги", |
19 |
| - "ghSources": "Исходники на GitHub" |
20 |
| - }, |
21 |
| - "prevTutorial": "Этот туториал использует проект, созданный в", |
22 |
| - "prevLesson": "предыдущем уроке", |
23 |
| - "overview": "Material Docs - это одно страничное React приложение, которое использует __react-router-dom__. Это означает, что\nпри переключении между страницами _URL_ меняется без перезагрузки страницы. Когда пользователь обращается на сайт, который \nхостится с помощью GitHub Pages, хостинг вернет страницу __index.thml__ или же ту, которая указана в _URL_. ", |
24 |
| - "overview2": "Проще говоря, если мы захостим Material Docs на GitHub Pages без дополнительной настройки - при перезагрузке страницы \nбудем получать страницу __404 | Not found__.", |
25 |
| - "suggestions": "Для того, чтоб предотвратить данную проблему, предлагается: \n* Создать страницу __404.html__, которая будет помещать путь из _URL_ в __query string__ запроса и делать редирект на \n_URL_, который ведет на __index.html__. \n* На странице __index.html__ мы будем обратно разбирать __query string__ и возвращать все на место __до того, как запустится react__.", |
26 |
| - "jekyll": "Создайте файл __.nojekyll__ в директории __public__. Он нужен для того, чтоб GitHub Pages ну использовала фреймворк Jekyll.", |
27 |
| - "jekyllNote": "По умолчанию, GitHub Pages использует", |
28 |
| - "page404": "Теперь, необходимо добавить в директорию __public__ файл __404.html__ с таким содержанием:", |
29 |
| - "segmentCount": "> Переменная ___segmentCount___ указывает количество элементов пути, которые не надо сериализовать. \n> В случае GitHub Pages - необходимо выставить значение ___segmentCount___ = 1. \n> Если вы собираетесь привязать собственный домен - посчитайте ___segmentCount___ и выставьте его.", |
30 |
| - "pageIndex": "Далее, добавьте в файл __index.html__ в тэг _head_ следующий код:" |
| 43 | + "hostingOnGH": "Hosting Material Docs on GitHub Pages", |
| 44 | + "projectSetup": "Project setup for GitHub Pages", |
| 45 | + "problem": "The problem", |
| 46 | + "solutionTheory": "Solution in theory", |
| 47 | + "solutionPractice": "Practice solution", |
| 48 | + "repoCreating": "Creating a repository", |
| 49 | + "compilation": "Compilation", |
| 50 | + "ghPagesSetup": "Setting up GitHub Pages", |
| 51 | + "basicSetup": "Basic setup", |
| 52 | + "ownDomainHooking": "Linking your own domain", |
| 53 | + "nextSteps": "Further steps", |
| 54 | + "ghSources": "Sources on GitHub" |
| 55 | + }, |
| 56 | + "prevTutorial": "This tutorial uses a project created in", |
| 57 | + "prevLesson": "previous lesson", |
| 58 | + "overview": "Material Docs - is a single page application that uses __react-router-dom__. It means that when switching between pages, _URL_ changes without reloading the page. When a user visits a site that hosted with GitHub Pages, the hosting will return the __index.thml__ page or the one specified in the _URL_.", |
| 59 | + "overview2": "Simply put, if we host Material Docs on GitHub Pages without additional configuration - on page reload will receive page __404 | Not found__.", |
| 60 | + "suggestions": "In order to prevent this problem, it is proposed:\n* Create a __404.html__ page that will put the path from _URL_ into the __query string__ of the request and redirect to _URL_, which leads to __index.html__.\n* On the __index.html__ page, we will parse the __query string__ back and put everything back in the __ position before react__ starts.", |
| 61 | + "jekyll": "Create a __.nojekyll__ file in the __public__ directory. It is needed so that GitHub Pages does not use the Jekyll framework.", |
| 62 | + "jekyllNote": "By default, GitHub Pages uses", |
| 63 | + "page404": "Now, you need to add the __404.html__ file to the __public__ directory with the following content:", |
| 64 | + "segmentCount": "> The variable ___segmentCount___ indicates the number of path elements that do not need to be serialized.\n> In the case of GitHub Pages, you need to set the value ___segmentCount___ = 1.\n> If you are going to link your own domain, count ___segmentCount___ and set it.", |
| 65 | + "pageIndex": "Next, add the following code to the __index.html__ file in the _head_ tag:", |
| 66 | + "compiling": "Now, all that remains is to compile Material Docs and set up GitHub Pages :)", |
| 67 | + "repoCreation": "Create a repository on _GitHub_ with any name, in our case - ___material-docs-example-project___. After, upload files to it using any software of your choice.", |
| 68 | + "packageSetup": "> In the __package.json__ file, add the _homepage_ field with the URL of the page on GitHub Pages.\n> Example address", |
| 69 | + "building": "In order to place the documentation on GitHub Pages, you need to compile the project. To do this, you must run\ncommand in the directory where the file is located ", |
| 70 | + "for": "For", |
| 71 | + "dirSetup": "Thus, we got an almost ready-to-publish web page in the __build__ directory.\nRename this directory to __docs__.", |
| 72 | + "settings": "Go to the __Settings__ section of your repository and find the __GitHub Pages__ subsection there.", |
| 73 | + "source": "In the __Source__ section, select the target branch, and in the __directory__ field, select ___ /docs___. Save the settings.", |
| 74 | + "hostingSetup": "> For example, we will use the subdomain ___ example.material-docs.com ___\n> _Domain management interface may differ depending on your hosting. In the example, hosting_ __Imena.ua__", |
| 75 | + "hostingSettings": "Go to the domain settings and add an entry:", |
| 76 | + "hostingComment": "> If you are not using a subdomain - instead of _example_, enter ___www___\n> _185.199.111.153 - GitHub Pages address at the time of the tutorial creation ._", |
| 77 | + "hostingSteps": "* Calculate the value of the ___segmentCount___ parameter in the __404.html__ file. ([How to do it] (#solution-in-practice))\n* In the __package.json__ file, set __your domain__ in the _homepage_ field.\n* Add a domain to the GitHub Pages settings in the domain field.", |
| 78 | + "githubExample": "You can find this example on", |
| 79 | + "here": "here" |
31 | 80 | },
|
32 | 81 | "CreatingMaterialDocsTutorial": {
|
33 | 82 | "headers": {
|
|
36 | 85 | "materialDocsSetup": "Material Docs setup",
|
37 | 86 | "indexSetup": "Setting up index.html",
|
38 | 87 | "extraFilesDeleting": "Extra files deletion",
|
39 |
| - "creatingDocs": "Создание документации", |
| 88 | + "creatingDocs": "Documentation creation", |
40 | 89 | "basicStructure": "Basic structure",
|
41 | 90 | "creatingPage": "Creating page",
|
42 | 91 | "creatingPageComponent": "Creating page component",
|
|
0 commit comments