| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="Asciidoctor 1.5.4"><meta name="author" content="mitm"><title>Wiki Translation Repositories</title><link rel="stylesheet" href="./asciidoctor.css">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
- <link rel="stylesheet" href="./coderay-asciidoctor.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css"></head><body class="article toc2 toc-left"><div id="header"><div id="toolbar"><a href="https://github.com/jMonkeyEngine/wiki/edit/master/src/docs/asciidoc/wiki/wiki_translation.adoc"><i class="fa fa-pencil-square" aria-hidden="true"></i></a><a href="https://github.com/jMonkeyEngine/wiki/new/master/src/docs/asciidoc/wiki/"><i class="fa fa-plus-square" aria-hidden="true"></i></a><input dir="auto" style="position: relative; vertical-align: top;" spellcheck="false" autocomplete="off" class="searchbox__input aa-input" id="doc-search" name="search" placeholder="Search in the doc" required="required" type="search"></div><h1>Wiki Translation Repositories</h1><div class="details"><span class="author" id="author">mitm</span><br><span id="revnumber">version ,</span> <span id="revdate">2017-09-08T23:24:11.262Z</span></div><div id="toc" class="toc2"><div id="toctitle">Table of Contents</div><ul class="sectlevel1"><li><a href="#prerequisites">Prerequisites</a></li><li><a href="#github-travis-ci-setup">GitHub/Travis CI Setup</a><ul class="sectlevel2"><li><a href="#using-git-command-line-to-finish">Using Git Command Line to finish</a></li><li><a href="#using-atom-editor-to-finish">Using Atom Editor to finish</a></li><li><a href="#changing-wiki-specific-attributes">Changing Wiki Specific Attributes</a></li></ul></li><li><a href="#conclusion">Conclusion</a></li></ul></div></div><div id="content"><div id="preamble"><div class="sectionbody"><div class="paragraph"><p>Official translations of the wiki are not practical due to varying dialects, dodgy translator programs, and the increased workload needed to officially support the translations. A different approach is to have monkeys, who wish to contribute to the community, run their own translation of the wiki.</p></div>
- <div class="paragraph"><p>This tutorial will go into the details of how to setup a copy of the wiki on <a href="https://github.com/">GitHub</a> that looks and feels like the official wiki, including <a href="https://github.com/marketplace/travis-ci">Travis-CI</a> automatically converting your AsciiDoc content to HTML, then publishing those files on each commit.</p></div>
- <div class="paragraph"><p>You are not required to translate every page or even mirror changes to the official wiki. What is required is a linked wiki be robust enough to actually help other monkeys and that the content is kept current. If it’s deemed worthy, a link to your repository, whether its stored on your own domain or not, will be added to the main page of the wiki under the <a href="../documentation.html#languages">Languages</a> topic.</p></div>
- <div class="admonitionblock warning"><table><tr><td class="icon"><i class="fa icon-warning" title="Warning"></i></td><td class="content"><div class="paragraph"><p>Although this is a tutorial on setting up and configuring your own copy of the official wiki, you still must adhere to the <a href="../bsd_license.html">jMonkeyEngine licensing</a>.</p></div>
- <div class="paragraph"><p>This includes the use of a domain name that includes the jMonkeyEngine name.</p></div></td></tr></table></div></div></div>
- <div class="sect1"><h2 id="prerequisites">Prerequisites</h2><div class="sectionbody"><div class="paragraph"><p>For this tutorial you can either setup with Git, or the Atom Editor, which uses basic GitHub commands by default. You will be <strong>loosely</strong> implementing the instructions from <a href="https://github.com/steveklabnik/automatically_update_github_pages_with_travis_example">Steve Klabnik</a>.</p></div>
- <div class="paragraph"><p>You will need to meet these requirements to continue:</p></div>
- <div class="ulist"><ul><li><p>A <a href="https://github.com/">GitHub</a> account.</p></li><li><p>Either <a href="https://help.github.com/articles/set-up-git/">Git</a> or the <a href="../wiki/atom_editor.html">Atom Editor</a> installed on your system.</p></li></ul></div>
- <div class="admonitionblock note"><table><tr><td class="icon"><i class="fa icon-note" title="Note"></i></td><td class="content">The Atom editor also has a <a href="https://atom.io/packages/git-plus">Git Plus</a> package that uses Git if it’s already on your system. Open <code><span class="menuseq"><span class="menu">File</span> ▸ <span class="menuitem">Settings</span></span></code> and enter “git” into the search box to locate and install.</td></tr></table></div>
- <div class="admonitionblock tip"><table><tr><td class="icon"><i class="fa icon-tip" title="Tip"></i></td><td class="content"><div class="paragraph"><p>For a list of git commands, use one of these:</p></div>
- <div class="ulist"><ul><li><p><a href="https://services.github.com/on-demand/resources/cheatsheets/">Git Cheat Sheets</a></p></li><li><p><a href="http://rogerdudler.github.io/git-guide/">git - the simple guide</a></p></li></ul></div>
- <div class="paragraph"><p>See also Travis-CI:</p></div>
- <div class="ulist"><ul><li><p><a href="https://docs.travis-ci.com/user/getting-started/">Getting Started</a></p></li></ul></div></td></tr></table></div></div></div>
- <div class="sect2"><h3 id="github-travis-ci-setup">GitHub/Travis CI Setup</h3><div class="paragraph"><p>This topic applies to both Git and the Atom Editor. You must do this before you do anything else.</p></div>
- <div class="olist arabic"><div class="title">Github</div>
- <ol class="arabic"><li><p>Create a <a href="https://help.github.com/articles/creating-a-new-repository/">new repository</a> on <a href="https://github.com/">github.com</a> for your wiki. (NOT a fork)</p><div class="olist loweralpha"><ol class="loweralpha" type="a"><li><p>Enter a unique name for your repository.</p></li></ol></div></li><li><p>After your repository has been created, you will need to add a new “gh-pages” <a href="https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/">branch</a>.</p><div class="olist loweralpha"><ol class="loweralpha" type="a"><li><p>This will automatically setup your repository for compiling “gh-pages”.</p></li><li><p>After creating the “gh-pages” branch, from your repositories main page, click the <span class="icon"><i class="fa fa-cog"></i></span> <b class="button">Settings</b> link and scroll down to the “GitHub Pages” panel for more configuration options and to see your sites new URL.</p><div class="admonitionblock note"><table><tr><td class="icon"><i class="fa icon-note" title="Note"></i></td><td class="content"><div class="paragraph"><p>There are two URLs you will need for configuration.</p></div>
- <div class="ulist"><ul><li><p>Your <code><strong>gh-pages</strong></code> URL: https://username.github.io/repo-name/</p></li><li><p>Your <code><strong>repository</strong></code> URL: https://github.com/username/repo-name</p></li></ul></div>
- <div class="paragraph"><p>This is how they will be referred to in this tutorial.</p></div></td></tr></table></div></li></ol></div></li><li><p>Setup GH_TOKEN variable:</p><div class="olist loweralpha"><ol class="loweralpha" type="a"><li><p>You need to generate a <a href="https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/">GH_TOKEN</a> in github.com, and set up Environment Variables in travis-ci.org or travis-ci.com, depending on whether your repository is public or not. This variable will be used in the deploy_ghpages.sh file.</p></li><li><p>Describe it however you wish and then you will need to check some boxes. Check these ones:</p><div class="ulist checklist"><ul class="checklist"><li><p><i class="fa fa-check-square-o"></i> public_repo</p><div class="openblock"><div class="content"><div class="paragraph"><p>If your repository is private, you can set repo instead.</p></div>
- <div class="paragraph"><p>GitHub will create the token and show a page with the value.</p></div>
- <div class="admonitionblock warning"><table><tr><td class="icon"><i class="fa icon-warning" title="Warning"></i></td><td class="content"><strong>THIS IS THE ONLY TIME YOU GET TO SEE THIS SO DON’T CLICK AWAY IMMEDIATELY!</strong></td></tr></table></div>
- <div class="paragraph"><p>You will need to copy this token into someplace you trust. It’ll never be shown to you after this time, so it’s important to double-check your work. You can always regenerate a new token, but then you will have to change any script or apps that use it.</p></div></div></div></li></ul></div></li></ol></div></li></ol></div>
- <div class="olist arabic"><div class="title">Travis CI</div>
- <ol class="arabic"><li><p>Click your name icon and select <code><span class="menuseq"><span class="menu">Settings</span> ▸ <span class="submenu">Billing</span> ▸ <span class="menuitem">Marketplace</span></span></code> or the “Marketplace” link at the top of the page header.</p></li><li><p>Click the “Travis-CI” link. If you don’t see one listed, find it using the search box.</p></li><li><p>Scroll to the bottom of the page and under “Pricing and setup” select the “Open Source” option if this is a public_repo or the payment plan of your choice.</p><div class="olist loweralpha"><ol class="loweralpha" type="a"><li><p>When ready, select the <b class="button">Install</b> button.</p></li><li><p>Click through until you are redirected to the Travis-Ci website.</p></li></ol></div></li><li><p>On Travis-CI, flick the repository switch on for your gh-pages project.</p><div class="admonitionblock tip"><table><tr><td class="icon"><i class="fa icon-tip" title="Tip"></i></td><td class="content">You can’t see your project on the list? Click on the Sync account button (top right) and it should be OK.</td></tr></table></div></li><li><p>Click the <span class="icon"><i class="fa fa-cog"></i></span> cog to go to the settings tab and configure it.</p><div class="olist loweralpha"><ol class="loweralpha" type="a"><li><p>Check some options on General:</p><div class="olist lowerroman"><ol class="lowerroman" type="i"><li><p>check the Build only if .travis.yml is present option.</p></li><li><p>Check the Build pushed options.</p></li></ol></div></li><li><p>Create some Environment Variables that will be used in .travis.yml file:</p><div class="olist lowerroman"><ol class="lowerroman" type="i"><li><p>GH_TOKEN: the token created on previous step.</p><div class="admonitionblock warning"><table><tr><td class="icon"><i class="fa icon-warning" title="Warning"></i></td><td class="content">Uncheck the Display value in build log option. This is the default action.</td></tr></table></div></li></ol></div></li></ol></div></li></ol></div>
- <div class="sect2"><h3 id="using-git-command-line-to-finish">Using Git Command Line to finish</h3><div class="olist arabic"><ol class="arabic"><li><p>Clone the <a href="https://github.com/jMonkeyEngine/wiki">wiki</a> or your fork of the wiki and your new repository. Cloning and pushing takes some time due to the size of the wiki. Be patient.</p><div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code>$ git clone https://github.com/jMonkeyEngine/wiki.git
- $ git clone https://github.com/user/repository.git
- $ cd repository
- $ git checkout master</code></pre></div></div></li><li><p>Copy everything from the localized wiki repository to the localized new repository, especially these files:</p><div class="olist loweralpha"><ol class="loweralpha" type="a"><li><p>.travis.yml</p></li><li><p>build.gradle</p></li><li><p>deploy_ghpages.sh</p></li><li><p>gradlew</p><div class="openblock"><div class="content"><div class="paragraph"><p><code>Travis CI</code> will execute <code>./gradlew asciidoctor</code> and <code>./deploy_ghpages.sh</code> after you push your commits.</p></div>
- <div class="admonitionblock important"><table><tr><td class="icon"><i class="fa icon-important" title="Important"></i></td><td class="content">If you have ever forked the official wiki, I suggest you rename it to origin_wiki or official_wiki. Then, you can still contribute to the official wiki with that fork.</td></tr></table></div></div></div></li></ol></div></li><li><p>Give gradlew, deploy_ghpages.sh permission to be executed. If you don’t do this, travis-ci.org will fail, due to no permission.</p><div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code>git update-index --chmod=+x deploy_ghpages.sh
- git update-index --chmod=+x gradlew
- git push</code></pre></div></div></li><li><p>At this point you need to change the wiki specific attributes to complete the setup.</p><div class="ulist"><ul><li><p>See <a href="../wiki/wiki_translation.html#Changing-Wiki-Specific-Attributes">Changing Wiki Specific Attributes</a></p></li></ul></div></li></ol></div></div>
- <div class="sect2"><h3 id="using-atom-editor-to-finish">Using Atom Editor to finish</h3><div class="paragraph"><p>This topic assumes you have already downloaded, installed and configured the <a href="../wiki\atom_editor.html">Atom Editor</a> as well as cloned the <a href="https://github.com/jMonkeyEngine/wiki">wiki</a> or your fork of the wiki and it’s open in the Atom Editor.</p></div>
- <div class="olist arabic"><ol class="arabic"><li><p>In the Atom Editor, select <code><span class="menuseq"><span class="menu">File</span> ▸ <span class="menuitem">New Window</span></span></code> or <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>N</kbd>.</p><div class="olist loweralpha"><ol class="loweralpha" type="a"><li><p>Delete the new page that opens by default.</p></li></ol></div></li><li><p>In the new window, select <code><span class="menuseq"><span class="menu">Packages</span> ▸ <span class="submenu">Command Palette</span> ▸ <span class="menuitem">Toggle</span></span></code> or <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>.</p><div class="olist loweralpha"><ol class="loweralpha" type="a"><li><p>Enter “github” into the search box.</p></li><li><p>Select the <b class="button">GitHub Clone</b> button.</p></li><li><p>Enter the URL to your <code><strong>repository</strong></code>.</p></li><li><p>When ready, click the <b class="button">Clone</b> button.</p></li></ol></div></li><li><p>Copy everything from the localized wiki repository to the localized new repository, especially these files:</p><div class="olist loweralpha"><ol class="loweralpha" type="a"><li><p>.travis.yml</p></li><li><p>build.gradle</p></li><li><p>deploy_ghpages.sh</p></li><li><p>gradlew</p></li></ol></div></li><li><p>Give gradlew, deploy_ghpages.sh permission to be executed. If you don’t do this, travis-ci.org will fail, due to no permission.</p><div class="olist loweralpha"><ol class="loweralpha" type="a"><li><p>If you use Git Plus, select <code><span class="menuseq"><span class="menu">Packages</span> ▸ <span class="submenu">Git Plus</span> ▸ <span class="menuitem">Run</span></span></code> and enter these arguments.</p><div class="listingblock"><div class="title">Using Git Plus</div>
- <div class="content"><pre class="CodeRay highlight"><code>git update-index --chmod=+x deploy_ghpages.sh
- git update-index --chmod=+x gradlew
- git push</code></pre></div></div></li><li><p>If you dont have Git, then edit the <code>travis.yml</code> file and add this after the <code>branches:</code> command.</p><div class="listingblock"><div class="title">No Git Installed</div>
- <div class="content"><pre class="CodeRay highlight"><code>branches:
- except:
- - gh-pages
- # No git, change permissions here.
- before_install:
- - chmod +x deploy_ghpages.sh
- - chmod +x gradlew</code></pre></div></div></li></ol></div></li><li><p>At this point you need to change the wiki specific attributes to complete the setup.</p><div class="ulist"><ul><li><p>See <a href="../wiki/wiki_translation.html#Changing-Wiki-Specific-Attributes">Changing Wiki Specific Attributes</a></p></li></ul></div></li></ol></div></div>
- <div class="sect2"><h3 id="changing-wiki-specific-attributes">Changing Wiki Specific Attributes</h3><div class="admonitionblock important"><table><tr><td class="icon"><i class="fa icon-important" title="Important"></i></td><td class="content"><div class="paragraph"><p>These changes will make your copy of the wiki, including all links, 100% dependent on your <code><strong>gh-pages</strong></code> branch. You’re on your own after this point so if you want selective links to still point to the official wiki, it’s up to you to determine which.</p></div>
- <div class="paragraph"><p>At minimum, you still have to change the attributes “endpoint-url”, “wiki_link_edit_prefix”, and “wiki_link_create_prefix” in the “<strong>build.gradle</strong>” file.</p></div></td></tr></table></div>
- <div class="olist arabic"><div class="title">Git CommandLine</div>
- <ol class="arabic"><li><p>Using <a href="https://git-scm.com/docs/git-grep">Git Grep</a> or the command line editor of your choice, find and replace the following:</p><div class="olist loweralpha"><ol class="loweralpha" type="a"><li><p>Find the official wiki <code><strong>gh-pages</strong></code> address of <code>https://jmonkeyengine.github.io/wiki</code>.</p></li><li><p>Replace it with your <code><strong>gh-pages</strong></code> address <code>https://username.github.io/repo-name</code>.</p></li><li><p>Find the official wiki <code><strong>repository</strong></code> address of <code>https://github.com/jMonkeyEngine/wiki</code>.</p></li><li><p>Replace it with your <code><strong>repository</strong></code> address of <code>https://github.com/username/repo-name</code>.</p></li></ol></div></li><li><p>Change the <a href="https://docs.travis-ci.com/user/status-images/">build status link</a> for your repository in the README.adoc page.</p><div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code>image:https://travis-ci.org/jMonkeyEngine/wiki.svg?branch=master["Build Status", link="https://travis-ci.org/jMonkeyEngine/wiki"]</code></pre></div></div></li><li><p>After you have done all the above, commit and push to your wiki repository.</p></li></ol></div>
- <div class="olist arabic"><div class="title">Atom Editor</div>
- <ol class="arabic"><li><p>Select <code><span class="menuseq"><span class="menu">Find</span> ▸ <span class="menuitem">Find in Project</span></span></code> or <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>F</kbd>.</p><div class="olist loweralpha"><ol class="loweralpha" type="a"><li><p>Enter the official wiki <code><strong>gh-pages</strong></code> address of <code>https://jmonkeyengine.github.io/wiki</code> into the search box and then select the <b class="button">Find All</b> button.</p></li><li><p>Enter your <code><strong>gh-pages</strong></code> address <code>https://username.github.io/repo-name</code> in the “Replace All” box and when ready, select the <b class="button">Replace All</b> button.</p></li><li><p>Enter the official wiki <code><strong>repository</strong></code> address of <code>https://github.com/jMonkeyEngine/wiki</code> into the search box and then select the <b class="button">Find All</b> button.</p></li><li><p>Enter your <code><strong>repository</strong></code> address of <code>https://github.com/username/repo-name</code> in the “Replace All” box and when ready, select the <b class="button">Replace All</b> button.</p></li></ol></div></li><li><p>Change the <a href="https://docs.travis-ci.com/user/status-images/">build status link</a> for your repository in the README.adoc page.</p><div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code>image:https://travis-ci.org/jMonkeyEngine/wiki.svg?branch=master["Build Status", link="https://travis-ci.org/jMonkeyEngine/wiki"]</code></pre></div></div></li><li><p>After you have done all the above, <code><span class="menuseq"><span class="menu">File</span> ▸ <span class="menuitem">Save All</span></span></code>.</p></li><li><p>Open the Git panel, <code><span class="menuseq"><span class="menu">Packages</span> ▸ <span class="submenu">GitHub</span> ▸ <span class="menuitem">Toggle Git Tab</span></span></code> or <kbd>Ctrl</kbd> + <kbd>9</kbd>.</p><div class="olist loweralpha"><ol class="loweralpha" type="a"><li><p>Stage All.</p></li><li><p>Enter a “initial commit” message.</p></li><li><p>Commit and push to your wiki repository. You can see the result after a few minutes.</p></li></ol></div></li></ol></div></div></div>
- <div class="sect1"><h2 id="conclusion">Conclusion</h2><div class="sectionbody"><div class="paragraph"><p>Travis should have built your copy of the wiki and moved all the .html to your “gh-pages” branch. If this didn’t happen, then something is wrong with your setup. Examine the logs of your repository from your Travis-CI account to help you troubleshoot where you went wrong. You can expand any of the command tags by clicking on them to get a more in-depth reveal of the logged info.</p></div>
- <div class="paragraph"><p>When you feel your repository is ready, create a thread on the <a href="https://hub.jmonkeyengine.org/">forum</a> requesting it be added to the official wiki. If approved, create a pull request of the wiki <a href="https://github.com/jMonkeyEngine/wiki/blob/master/src/docs/asciidoc/documentation.adoc">main page</a> adding your repository link under the “Languages” topic.</p></div>
- <div class="paragraph"><p>Thanks for your interest in removing the language barrier that may prevent other monkeys from learning more about the jMonkeyEngine.</p></div></div></div></div><div id="footer"><div id="footer-text">Version <br>Last updated 2018-02-28 16:23:40 +00:00</div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script><script>docsearch({
- apiKey: 'a736b6d93de805e26ec2f49b55013fbd',
- indexName: 'jmonkeyengine',
- inputSelector: '#doc-search',
- debug: false // Set debug to true if you want to inspect the dropdown
- });</script></body></html>
|