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

Commit

Permalink
Merge pull request #21 from material-docs/prod
Browse files Browse the repository at this point in the history
Material Docs 0.1.9
  • Loading branch information
DanilAndreev authored Oct 15, 2020
2 parents c7cff21 + 124f7ef commit c192beb
Show file tree
Hide file tree
Showing 8 changed files with 205 additions and 89 deletions.
5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@material-docs/material-docs-documentation",
"version": "0.1.8",
"version": "0.1.9",
"private": false,
"description": "Documentation for Material Docs. material-docs - react framework for easy creating documentation site in material design style.",
"homepage": "http://material-docs.com/",
Expand Down
1 change: 1 addition & 0 deletions src/Documentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export default function Documentation() {
tooltip: "Github source code"
}
]}
onVersionClick={() => window.location = "https://github.com/material-docs/material-docs/releases"}
>
<DocsMenu dense>
<AutoDocsMenu/>
Expand Down
97 changes: 73 additions & 24 deletions src/locale/EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,80 @@
"label": "English",
"locale": {
"pages": {
"LocalizationWorkflowTutorial": {
"headers": {
"localizationProcess": "Localization process",
"localization": "Localization",
"creatingLang": "Creating a language pack",
"langAccess": "Access to the language pack",
"langTranslation": "Adding a translation",
"interfaceLocalization": "Interface localization",
"mechanismAccess": "Access to the localization engine",
"sourcesOnGitHub": "Source codes on"
},
"langStructureCaption": "Material Docs has a built-in localization mechanism. The language pack has the following structure:",
"langStructureName": "The name of the language pack. (_recommends naming according to standards, e.g. __en-us___)",
"langStructureLabel": "The nice name of the language pack will be displayed in the interface.",
"langStructureLocale": "The object that stores your localization data.",
"langStructureLoadLang": "The function to be called when the language is loaded. Needed to get localization from a remote host.",
"langStructureComment": "One of the parameters must be defined in the Lang object __: _locale_ or _loadLang_!__",
"creatingLang": "Let's create a language pack for existing pages and transfer it to",
"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",
"appliedLang": "A language field appeared in the upper right corner.",
"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.",
"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. ",
"translating": "After we have created ___defaultLanguage___, we can move on to translation.",
"translatingComment": "Use only the fields specified in the ___locale___ field of the __ default language pack__.",
"createTranslate": "Let's create a translation:",
"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 __.",
"providingLang": "Now, let's pass the ___langs___ parameter to the ```<DocsLayout />``` component:",
"languageSwitch": "Now, the language selection button on the top right of the interface is available and offers a choice of 2 languages.",
"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:",
"interfaceTranslated": "Now, the documentation interface has been translated. ",
"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. ",
"sourcesOnGitHub": "You can find the sources for this example at",
"here": "here"

},
"HostingMaterialDocsOnGHPagesTutorial": {
"headers": {
"hostingOnGH": "Хостинг Material Docs на GitHub Pages",
"projectSetup": "Настройка проекта для GitHub Pages",
"problem": "Проблема",
"solutionTheory": "Решение в теории",
"solutionPractice": "Решение на практике",
"repoCreating": "Создание репозитория",
"compilation": "Компиляция",
"ghPagesSetup": "Настройка GitHub Pages",
"basicSetup": "Базовая настройка",
"ownDomainHooking": "Привязывание собственного домена",
"nextSteps": "Дальнейшие шаги",
"ghSources": "Исходники на GitHub"
},
"prevTutorial": "Этот туториал использует проект, созданный в",
"prevLesson": "предыдущем уроке",
"overview": "Material Docs - это одно страничное React приложение, которое использует __react-router-dom__. Это означает, что\nпри переключении между страницами _URL_ меняется без перезагрузки страницы. Когда пользователь обращается на сайт, который \nхостится с помощью GitHub Pages, хостинг вернет страницу __index.thml__ или же ту, которая указана в _URL_. ",
"overview2": "Проще говоря, если мы захостим Material Docs на GitHub Pages без дополнительной настройки - при перезагрузке страницы \nбудем получать страницу __404 | Not found__.",
"suggestions": "Для того, чтоб предотвратить данную проблему, предлагается: \n* Создать страницу __404.html__, которая будет помещать путь из _URL_ в __query string__ запроса и делать редирект на \n_URL_, который ведет на __index.html__. \n* На странице __index.html__ мы будем обратно разбирать __query string__ и возвращать все на место __до того, как запустится react__.",
"jekyll": "Создайте файл __.nojekyll__ в директории __public__. Он нужен для того, чтоб GitHub Pages ну использовала фреймворк Jekyll.",
"jekyllNote": "По умолчанию, GitHub Pages использует",
"page404": "Теперь, необходимо добавить в директорию __public__ файл __404.html__ с таким содержанием:",
"segmentCount": "> Переменная ___segmentCount___ указывает количество элементов пути, которые не надо сериализовать. \n> В случае GitHub Pages - необходимо выставить значение ___segmentCount___ = 1. \n> Если вы собираетесь привязать собственный домен - посчитайте ___segmentCount___ и выставьте его.",
"pageIndex": "Далее, добавьте в файл __index.html__ в тэг _head_ следующий код:"
"hostingOnGH": "Hosting Material Docs on GitHub Pages",
"projectSetup": "Project setup for GitHub Pages",
"problem": "The problem",
"solutionTheory": "Solution in theory",
"solutionPractice": "Practice solution",
"repoCreating": "Creating a repository",
"compilation": "Compilation",
"ghPagesSetup": "Setting up GitHub Pages",
"basicSetup": "Basic setup",
"ownDomainHooking": "Linking your own domain",
"nextSteps": "Further steps",
"ghSources": "Sources on GitHub"
},
"prevTutorial": "This tutorial uses a project created in",
"prevLesson": "previous lesson",
"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_.",
"overview2": "Simply put, if we host Material Docs on GitHub Pages without additional configuration - on page reload will receive page __404 | Not found__.",
"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.",
"jekyll": "Create a __.nojekyll__ file in the __public__ directory. It is needed so that GitHub Pages does not use the Jekyll framework.",
"jekyllNote": "By default, GitHub Pages uses",
"page404": "Now, you need to add the __404.html__ file to the __public__ directory with the following content:",
"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.",
"pageIndex": "Next, add the following code to the __index.html__ file in the _head_ tag:",
"compiling": "Now, all that remains is to compile Material Docs and set up GitHub Pages :)",
"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.",
"packageSetup": "> In the __package.json__ file, add the _homepage_ field with the URL of the page on GitHub Pages.\n> Example address",
"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 ",
"for": "For",
"dirSetup": "Thus, we got an almost ready-to-publish web page in the __build__ directory.\nRename this directory to __docs__.",
"settings": "Go to the __Settings__ section of your repository and find the __GitHub Pages__ subsection there.",
"source": "In the __Source__ section, select the target branch, and in the __directory__ field, select ___ /docs___. Save the settings.",
"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__",
"hostingSettings": "Go to the domain settings and add an entry:",
"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 ._",
"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.",
"githubExample": "You can find this example on",
"here": "here"
},
"CreatingMaterialDocsTutorial": {
"headers": {
Expand All @@ -36,7 +85,7 @@
"materialDocsSetup": "Material Docs setup",
"indexSetup": "Setting up index.html",
"extraFilesDeleting": "Extra files deletion",
"creatingDocs": "Создание документации",
"creatingDocs": "Documentation creation",
"basicStructure": "Basic structure",
"creatingPage": "Creating page",
"creatingPageComponent": "Creating page component",
Expand Down
Loading

0 comments on commit c192beb

Please sign in to comment.