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

Commit c192beb

Browse files
authored
Merge pull request #21 from material-docs/prod
Material Docs 0.1.9
2 parents c7cff21 + 124f7ef commit c192beb

File tree

8 files changed

+205
-89
lines changed

8 files changed

+205
-89
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.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@material-docs/material-docs-documentation",
3-
"version": "0.1.8",
3+
"version": "0.1.9",
44
"private": false,
55
"description": "Documentation for Material Docs. material-docs - react framework for easy creating documentation site in material design style.",
66
"homepage": "http://material-docs.com/",

src/Documentation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export default function Documentation() {
103103
tooltip: "Github source code"
104104
}
105105
]}
106+
onVersionClick={() => window.location = "https://github.com/material-docs/material-docs/releases"}
106107
>
107108
<DocsMenu dense>
108109
<AutoDocsMenu/>

src/locale/EN.json

Lines changed: 73 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,80 @@
33
"label": "English",
44
"locale": {
55
"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+
},
641
"HostingMaterialDocsOnGHPagesTutorial": {
742
"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"
3180
},
3281
"CreatingMaterialDocsTutorial": {
3382
"headers": {
@@ -36,7 +85,7 @@
3685
"materialDocsSetup": "Material Docs setup",
3786
"indexSetup": "Setting up index.html",
3887
"extraFilesDeleting": "Extra files deletion",
39-
"creatingDocs": "Создание документации",
88+
"creatingDocs": "Documentation creation",
4089
"basicStructure": "Basic structure",
4190
"creatingPage": "Creating page",
4291
"creatingPageComponent": "Creating page component",

0 commit comments

Comments
 (0)