瀏覽代碼

#90 new language workflow (#93)

Vaclav Elias 3 年之前
父節點
當前提交
83ef78a22d
共有 2 個文件被更改,包括 53 次插入0 次删除
  1. 5 0
      GETTINGSTARTED.md
  2. 48 0
      NewLanguageWorkflow.md

+ 5 - 0
GETTINGSTARTED.md

@@ -4,6 +4,7 @@ This addresses the following topics:
 * [Contribution Terms](#Terms)
 * [Contribution Terms](#Terms)
 * [Contribution Workflow](#Workflow)
 * [Contribution Workflow](#Workflow)
 * [Edit and Build Locally](#Build)
 * [Edit and Build Locally](#Build)
+* [New Language](#NewLanguage)
 * [Pages Organization](#Organization)
 * [Pages Organization](#Organization)
 * [Doc Guidelines](#Guidelines)
 * [Doc Guidelines](#Guidelines)
 
 
@@ -71,6 +72,10 @@ to build only the manual in that case).
 - For more details about the MarkDown format, see [GitHub MarkDown Guide](https://guides.github.com/features/mastering-markdown/) or this [Tutorial](http://www.markdowntutorial.com/).
 - For more details about the MarkDown format, see [GitHub MarkDown Guide](https://guides.github.com/features/mastering-markdown/) or this [Tutorial](http://www.markdowntutorial.com/).
 - For more details about _DocFX_, see [DocFX Getting Started Page](https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html)
 - For more details about _DocFX_, see [DocFX Getting Started Page](https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html)
 
 
+# <a name="NewLanguage"> New Language
+   
+If you are interested in translating the documentation to a language that is not yet supported, please read these [New Language Workflow](NewLanguageWorkflow.md) instructions.
+   
 # <a name="Organization"> Pages Organization 
 # <a name="Organization"> Pages Organization 
 
 
 Articles should be organized in folders. Media and code files should be stored in folders named _media_ and _code_
 Articles should be organized in folders. Media and code files should be stored in folders named _media_ and _code_

+ 48 - 0
NewLanguageWorkflow.md

@@ -0,0 +1,48 @@
+# New Language Workflow
+
+As the [Contribution Workflow](https://github.com/stride3d/stride-docs/blob/master/GETTINGSTARTED.md#Workflow) suggests, you should create an [issue](https://github.com/stride3d/stride-docs/issues) first, where you can mention your intention and where we can keep a track of conversation on this subject. You can also ping us in our [Discord Documentation](https://discord.com/channels/500285081265635328/500295611581464576) channel once the issue was created.
+
+Assuming that your request was approved, as an example, let's add a Spanish language. We will use code **es**.
+
+1. Clone the repo ```git lfs clone https://github.com/stride3d/stride-docs.git```
+   - Make sure LFS (Large File Storage) is used
+1. Create your working branch from the main branch
+   - If you make big updates, it is better to keep your updates in this new branch, so you can keep your main branch in the sync with the main repository
+1. Copy **\en\manual** folder to **\es\manual**
+1. Copy **\en\index.md** file to **\es\index.md**
+1. Translate whatever you need in the **\es** folder
+    - make sure you don't change file names
+    - make sure that all folders and pages from the **\es\manual** folder which are not translated are deleted, this is very important, because the default **\en\manual** pages will be copied automatically through the ps1 script. This way when we update the **en** version, it will also automatically update all **\es\manual** pages which are not translated. The ps1 script then overwrites all **en** pages with translated **es** pages
+1. Update **\build.bat** - add ```&& Call ./es-build.bat```
+1. Update **\build_manual_only.bat** - add ```& Call ./es-build.bat```
+1. Update **\web.config** - add ```|es```
+1. Update **\build\web.config**  - add ```|es```
+1. Update **\en\template\styles\main.js** - add ```|es```
+1. Update **\en\template\partials\navbar.tmpl.partial** - add data-language es
+1. Duplicate **\jp-build.ps1** to **\es-build.ps1**
+    - Update content jp to es
+    - Update ```'doc-no-translated'``` with ```'doc-no-translated doc-no-translated-es'```
+        - Note: We keep also the original ```doc-no-translated``` because it is used in the docs generator logic
+1. Update **\en\template\styles\main.css**
+    - Duplicate class ```.doc-no-translated::after```, and place the new one **below**, rename it to ```.doc-no-translated-es::after```
+    - Translate the text to es
+1. Duplicate **\jp-build.bat** to **\es-build.bat**
+    - Update content jp to es
+1. Duplicate **\run_local_website_jp.bat** to **\run_local_website_es.bat**
+    - Update content jp to es
+1. Test the build with **build.bat** if you also have Stride repository, or just **build_manual_only.bat**, or **es-build.bat**
+1. Run **run_local_website.bat**. It opens the local version of the doc in your browser
+1. Test that you can switch the languages in the top menu
+1. If all is working as expected, submit PR
+
+## Current Language Contributors 
+
+Please notify these contributors if any changes need to be made
+- EN language: Anyone in our Discord Documentation channel
+- RU language: @\~FallenParadise\~ in our Discord Documentation channel
+- JP language: Anyone in our Discord Documentation channel
+
+## Troubleshooting
+
+1. Program 'docfx.exe' failed to run: The specified executable is not a valid application for this OS platform
+   - Check the file size. If the repository was cloned without **LFS**, the files in **\\deps\\docfx\\** might be just a reference. Clone again with LFS.