Skip to content
This repository was archived by the owner on Nov 16, 2022. It is now read-only.

Commit 22e91ba

Browse files
committed
[HostingMaterialDocsOnGHPagesTutorial] (issue #12) Finished localization.
1 parent 0c4b8ac commit 22e91ba

File tree

4 files changed

+97
-46
lines changed

4 files changed

+97
-46
lines changed

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locale/EN.json

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,43 @@
55
"pages": {
66
"HostingMaterialDocsOnGHPagesTutorial": {
77
"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_ следующий код:"
8+
"hostingOnGH": "Hosting Material Docs on GitHub Pages",
9+
"projectSetup": "Project setup for GitHub Pages",
10+
"problem": "The problem",
11+
"solutionTheory": "Solution in theory",
12+
"solutionPractice": "Practice solution",
13+
"repoCreating": "Creating a repository",
14+
"compilation": "Compilation",
15+
"ghPagesSetup": "Setting up GitHub Pages",
16+
"basicSetup": "Basic setup",
17+
"ownDomainHooking": "Linking your own domain",
18+
"nextSteps": "Further steps",
19+
"ghSources": "Sources on GitHub"
20+
},
21+
"prevTutorial": "This tutorial uses a project created in",
22+
"prevLesson": "previous lesson",
23+
"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_.",
24+
"overview2": "Simply put, if we host Material Docs on GitHub Pages without additional configuration - on page reload will receive page __404 | Not found__.",
25+
"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.",
26+
"jekyll": "Create a __.nojekyll__ file in the __public__ directory. It is needed in order for GitHub Pages to use the Jekyll framework.",
27+
"jekyllNote": "By default, GitHub Pages uses",
28+
"page404": "Now, you need to add the __404.html__ file to the __public__ directory with the following content:",
29+
"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.",
30+
"pageIndex": "Next, add the following code to the __index.html__ file in the _head_ tag:",
31+
"compiling": "Now, all that remains is to compile Material Docs and set up GitHub Pages :)",
32+
"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.",
33+
"packageSetup": "> In the __package.json__ file, add the _homepage_ field with the URL of the page on GitHub Pages.\n> Example address",
34+
"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 ",
35+
"for": "For",
36+
"dirSetup": "Thus, we got an almost ready-to-publish web page in the __build__ directory.\nRename this directory to __docs__.",
37+
"settings": "Go to the __Settings__ section of your repository and find the __GitHub Pages__ subsection there.",
38+
"source": "In the __Source__ section, select the target branch, and in the __directory__ field, select ___ /docs___. Save the settings.",
39+
"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__",
40+
"hostingSettings": "Go to the domain settings and add an entry:",
41+
"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 ._",
42+
"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.",
43+
"githubExample": "You can find this example on",
44+
"here": "here"
3145
},
3246
"CreatingMaterialDocsTutorial": {
3347
"headers": {
@@ -36,7 +50,7 @@
3650
"materialDocsSetup": "Material Docs setup",
3751
"indexSetup": "Setting up index.html",
3852
"extraFilesDeleting": "Extra files deletion",
39-
"creatingDocs": "Создание документации",
53+
"creatingDocs": "Documentation creation",
4054
"basicStructure": "Basic structure",
4155
"creatingPage": "Creating page",
4256
"creatingPageComponent": "Creating page component",

src/locale/RU.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,46 @@
33
"label": "Русский",
44
"locale": {
55
"pages": {
6+
"HostingMaterialDocsOnGHPagesTutorial": {
7+
"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_ следующий код:",
31+
"compiling": "Теперь, осталось скомпилировать Material Docs и настроить GitHub Pages :)",
32+
"repoCreation": "Создайте репозиторий на _GitHub_ с любым названием, в нашем случае - ___material-docs-example-project___. После, \nзагрузите в него файлы с помощью любого программного обеспечения на ваше усмотрение.",
33+
"packageSetup": "> В файле __package.json__ добавьте поле _homepage_ с адресом страницы на GitHub Pages. \n> Пример адреса",
34+
"building": "Для того, чтоб разместить документацию на GitHub Pages, необходимо скомпилировать проект. Для этого, необходимо выполнить\nкоманду в директории, где находится файл ",
35+
"for": "Для",
36+
"dirSetup": "Таким образом мы получили практически готовую к публикации веб страницу в директории __build__. \nПереименуйте эту директорию в __docs__.",
37+
"settings": "Зайдите в раздел __Settings__ своего репозитория и найдите там подраздел __GitHub Pages__.",
38+
"source": "В разделе __Source__ выберите целевую ветку и в поле __директория__ выберите ___/docs___. Сохраните настройки.",
39+
"hostingSetup": "> Для примера, мы будем использовать поддомен ___example.material-docs.com___ \n> _Интерфейс управления доменом может отличаться в зависимости от вашего хостинга. В примере хостинг_ __Imena.ua__",
40+
"hostingSettings": "Заходим в настройки домена и добавляем запись:",
41+
"hostingComment": "> Если вы используете не поддомен - вместо _example_ введите ___www___ \n> _185.199.111.153 - адрес GitHub Pages на момент создания туториала._",
42+
"hostingSteps": "* Посчитайте значение параметра ___segmentCount___ в файле __404.html__. ([Как это сделать](#решение-на-практике)) \n* В файле __package.json__ выставьте __свой домен__ в поле _homepage_.\n* Добавляем домен в настройки GitHub Pages в поле для домена.",
43+
"githubExample": "Вы можете найти этот пример на",
44+
"here": "здесь"
45+
},
646
"CreatingMaterialDocsTutorial": {
747
"headers": {
848
"creatingMaterialDocs": "Создание Material Docs",

src/pages/Tutorials/HostingMaterialDocsOnGHPages/HostingMaterialDocsOnGHPages.md

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -95,45 +95,37 @@
9595
</script>
9696
<!-- End Single Page Apps for GitHub Pages -->
9797
```
98-
Теперь, осталось скомпилировать Material Docs и настроить GitHub Pages :)
98+
&{&&locale/compiling}&
9999
## &{&&locale/headers/repoCreating}&
100-
Создайте репозиторий на _GitHub_ с любым названием, в нашем случае - ___material-docs-example-project___. После,
101-
загрузите в него файлы с помощью любого программного обеспечения на ваше усмотрение.
100+
&{&&locale/repoCreation}&
102101
## &{&&locale/headers/compilation}&
103-
> В файле __package.json__ добавьте поле _homepage_ с адресом страницы на GitHub Pages.
104-
> Пример адреса ```https://YOUR_USERNAME.github.io/REPOSITORY_NAME/```
102+
&{&&locale/packageSetup}& ```https://YOUR_USERNAME.github.io/REPOSITORY_NAME/```
105103

106-
Для того, чтоб разместить документацию на GtiHub Pages, необходимо скомпилировать проект. Для этого, необходимо выполнить
107-
команду в директории, где находится файл ```package.json``` :
108-
Для __yarn__:
104+
&{&&locale/building}& ```package.json``` :
105+
&{&&locale/for}& __yarn__:
109106
```{"type": "code", "themeLight": "darcula"}
110107
$ yarn run build
111108
```
112-
Для __npm__:
109+
&{&&locale/for}& __npm__:
113110
```{"type": "code", "themeLight": "darcula"}
114111
$ npm run build
115112
```
116-
Таким образом мы получили практически готовую к публикации веб страницу в директории __build__.
117-
Переименуйте эту директорию в __docs__.
113+
&{&&locale/dirSetup}&
118114
## &{&&locale/headers/ghPagesSetup}&
119115
### &{&&locale/headers/basicSetup}&
120-
Зайдите в раздел __Settings__ своего репозитория и найдите там подраздел __GitHub Pages__.
116+
&{&&locale/settings}&
121117
![{"alt": "GitHub Pages", "src": "&&GitHubPagesInitialImage", "fullWidth": true, "frame": true}]()
122-
В разделе __Source__ выберите целевую ветку и в поле __директория__ выберите ___/docs___. Сохраните настройки.
118+
&{&&locale/source}&
123119
![{"alt": "GitHub Pages", "src": "&&GitHubPagesSetupImage", "fullWidth": true, "frame": true}]()
124120
### &{&&locale/headers/ownDomainHooking}&
125-
> Для примера, мы будем использовать поддомен ___example.material-docs.com___
126-
> _Интерфейс управления доменом может отличаться в зависимости от вашего хостинга. В примере хостинг_ __Imena.ua__
121+
&{&&locale/hostingSetup}&
127122

128-
Заходим в настройки домена и добавляем запись:
123+
&{&&locale/hostingSettings}&
129124
![{"alt": "GitHub Pages", "src": "&&DNSSetup", "fullWidth": true, "frame": true}]()
130-
> Если вы используете не поддомен - вместо _example_ введите ___www___
131-
> _185.199.111.153 - адрес GitHub Pages на момент создания туториала._
125+
&{&&locale/hostingComment}&
132126
#### &{&&locale/headers/nextSteps}&
133-
* Посчитайте значение параметра ___segmentCount___ в файле __404.html__. ([Как это сделать](#решение-на-практике))
134-
* В файле __package.json__ выставьте __свой домен__ в поле _homepage_.
135-
* Добавляем домен в настройки GitHub Pages в поле для домена.
127+
&{&&locale/hostingSteps}&
136128

137129
![{"alt": "GitHub Pages", "src": "&&GitHubPagesDNSSetup", "fullWidth": true, "frame": true}]()
138130
## &{&&locale/headers/ghSources}&
139-
Вы можете найти этот пример на GitHub [здесь](https://github.com/material-docs/material-docs-example-project/tree/hosting-on-gh-pages)
131+
&{&&locale/githubExample}& [&{&&locale/here}&](https://github.com/material-docs/material-docs-example-project/tree/hosting-on-gh-pages)

0 commit comments

Comments
 (0)