Actions

Difference between revisions of "Developer Area/Mahara manual setup"

From Mahara Wiki

< Developer Area
(Created page with "=Introduction= The [http://manual.mahara.org Mahara user manual] uses a number of tools to generate the end product. The [http://www.slideshare.net/4nitsirk/catalyst-pizza-thurs…")
 
(Update instructions to remove old info that has been superceded by our automatic process)
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Introduction=
+
===Introduction===
  
The [http://manual.mahara.org Mahara user manual] uses a number of tools to generate the end product. The [http://www.slideshare.net/4nitsirk/catalyst-pizza-thursdaytalkmaharamanual20120607 presentation by Kristina Hoeppner] illustrates the process and tools used briefly.
+
The [https://manual.mahara.org Mahara manual] uses [https://www.sphinx-doc.org/ Sphinx] and a custom theme. It is hosted by Catalyst. It is an open source project though and can be contributed to. The [https://git.mahara.org/user-manual/manual code] is accessible. At the moment, you can't register on that Git repository. If you'd like to contribute, you can:
  
The following are notes for setting up a new branch for the user manual. It requires that Sphinx is already installed. The example below uses Mahara version 1.9 as an example. Any reference to 1.9 would need to be replaced with the version that you are creating the manual branch for.
+
*[https://bugs.launchpad.net/mahara-manual/+filebug Send a change request via our tracker]
 +
*Send [mailto:info@mahara.org a mail] with your change or ask to have access to the repository
  
=Setting up a new local and remote branch=
+
The Mahara manual can be cloned, and you can make changes yourself. If you host it on your own, you can change the URL in your Mahara instance in 'Administration menu → Configure site → Menus'. Keep the overall structure of the manual pages though so that links within Mahara can refer to the correct section in the manual.
  
1. Do a checkout of the code in the new folder for the manual:
+
The steps outlined below are typically done by Catalyst to set up a new version of the overall manual and set up the translation branches.
  
  cd code
+
The example below uses Mahara version 21.10 as reference. Any reference to it would need to be replaced with the version that you are creating the manual branch for.
  git clone git://gitorious.org/mahara/mahara.git manual19
 
  
2. Create a new local branch for the new version of the manual
+
=== Translating the Mahara manual ===
 +
If you want to translate the Mahara manual, you can do so directly via [https://translations.launchpad.net/mahara-manual Launchpad] and do not need to install anything on your computer.
  
  git branch
+
You would only need to set up the manual on your computer if you wanted to make changes to it or create your own version of it.
  git checkout -b 1.9_STABLE
 
  
3. Replace the information in .git/config with the following.
+
===Setup===
  
  [core]
+
1. Clone the repository to your computer
    repositoryformatversion = 0
 
    filemode = true
 
    bare = false
 
    logallrefupdates = true
 
  [remote "origin"]
 
    fetch = +refs/heads/*:refs/remotes/origin/*
 
    url = [email protected]:mahara/manual.git
 
  [branch "1.9_STABLE"]
 
    remote = origin
 
    merge = refs/heads/1.9_STABLE
 
  
4. Publish the new branch on Gitorious
+
  cd ~
 +
  mkdir code
 +
  cd code
 +
  git clone https://git.mahara.org/user-manual/manual.git
  
  git push origin 1.9_STABLE:refs/heads/1.9_STABLE
+
2. [https://git.mahara.org/user-manual/manual-build Follow the instructions] to get the install running. Docker is required.
  
5. Make initial changes to index.php, config.py, mahara/links.html to reflect that you are now dealing with a new version of the manual. Commit the changes and push them to Gitorious.
+
That Readme file outlines how to preview the manual locally, pull in the translations, and get the output, which you could then push to a server and publish your own manual.
  
 +
===Create a new branch (Catalyst)===
  
=Setting up the translation export branch for Launchpad=
+
1. Create a new local branch for the new version of the manual
  
This part is the tricky bit as Launchpad uses bzr for version control. There is a [http://doc.bazaar.canonical.com/latest/en/mini-tutorial/ good tutorial on how to work with bzr] that can help anyone get started.
+
  git branch
 +
  git checkout -b 21.10_STABLE
  
The following steps are a bit incomplete, but will hopefully fleshed out in the future.
+
2. Replace the information in .git/config with the following.
  
1. Assumption: Folder code/manual-export/manual-export exists.
+
  [core]
 
+
    repositoryformatversion = 0
2. Create the new folder "1.9_STABLE-export".
+
    filemode = true
 
+
    bare = false
3. Generate the potfiles in your manual folder.
+
    logallrefupdates = true
 
+
  [remote "origin"]
  cd code/manual19
+
    fetch = +refs/heads/*:refs/remotes/origin/*
  sphinx-build -b gettext source potfiles
+
    url = git@git.mahara.org:user-manual/manual.git
 
+
  [branch "21.10_STABLE"]
4. Go back to the export folder. If the potfiles generation doesn't produce folders in which the potfiles are listed (sometimes it does, sometimes it doesn't), create a folder for each potfile. The folder name needs to match the potfile name (minus the extension). The folders will be empty and don't have the actual potfiles in them. Your folder 1.9_STABLE-export should contain the sub folder "potfiles" and in there a folder for each potfile that has the name of the potfile, but the potfile is not in it.
+
    remote = origin
 
+
    merge = refs/heads/21.10_STABLE
5. Create the bzr files
 
 
 
  cd manual-export
 
  bzr init manual-export/1.9_STABLE-export/
 
  
6. Enter your potfiles export folder and commit the folders.
 
  
  cd manual-export/1.9_STABLE-export/
+
3. Publish the new branch to git.mahara.org
  bzr add potfiles/
 
  bzr commit
 
  write commit message
 
  
7. Push your newly created branch to Launchpad
+
  git push origin 21.10_STABLE:refs/heads/21.10_STABLE
  
  bzr push lp:~mahara-lang/mahara-manual/1.9_STABLE-export
+
4. Make initial changes to index.php, manual-build/conf-common.py.
  
8. Go to Launchpad and set up the export branch for your translation: https://translations.launchpad.net/mahara-manual/1.9/+translations-settings
+
===Include in build process and set up translation branches in Launchpad===
 +
The manual is built automatically for the versions defined and translations are updated automatically as well when new text has appeared.
  
  Under "Exporting translations to branch" click the "Edit" button. Then type into the field / search for the branch:
+
Typically, the most recent version is updated weekly and older versions may be updated monthly if there are changes. If a translator did a big push to update the translation, the versions in question can be updated manually via the pipelines rather than running a scheduled task.
  ~mahara-lang/mahara-manual/1.9_STABLE-export
 
  confirm the branch
 
  
9. Upload the potfiles into the import branch. Make sure that you set the path to "potfiles/[name of the potfile folder]/[potfile]
+
'''Catalyst only:''' Follow the Readme file on the Catalyst internal GitLab instance for the 'manual-builder' project.

Latest revision as of 21:29, 12 April 2023

Introduction

The Mahara manual uses Sphinx and a custom theme. It is hosted by Catalyst. It is an open source project though and can be contributed to. The code is accessible. At the moment, you can't register on that Git repository. If you'd like to contribute, you can:

The Mahara manual can be cloned, and you can make changes yourself. If you host it on your own, you can change the URL in your Mahara instance in 'Administration menu → Configure site → Menus'. Keep the overall structure of the manual pages though so that links within Mahara can refer to the correct section in the manual.

The steps outlined below are typically done by Catalyst to set up a new version of the overall manual and set up the translation branches.

The example below uses Mahara version 21.10 as reference. Any reference to it would need to be replaced with the version that you are creating the manual branch for.

Translating the Mahara manual

If you want to translate the Mahara manual, you can do so directly via Launchpad and do not need to install anything on your computer.

You would only need to set up the manual on your computer if you wanted to make changes to it or create your own version of it.

Setup

1. Clone the repository to your computer

 cd ~
 mkdir code
 cd code
 git clone https://git.mahara.org/user-manual/manual.git

2. Follow the instructions to get the install running. Docker is required.

That Readme file outlines how to preview the manual locally, pull in the translations, and get the output, which you could then push to a server and publish your own manual.

Create a new branch (Catalyst)

1. Create a new local branch for the new version of the manual

 git branch
 git checkout -b 21.10_STABLE

2. Replace the information in .git/config with the following.

 [core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
  [remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = [email protected]:user-manual/manual.git
  [branch "21.10_STABLE"]
    remote = origin
    merge = refs/heads/21.10_STABLE


3. Publish the new branch to git.mahara.org

 git push origin 21.10_STABLE:refs/heads/21.10_STABLE 

4. Make initial changes to index.php, manual-build/conf-common.py.

Include in build process and set up translation branches in Launchpad

The manual is built automatically for the versions defined and translations are updated automatically as well when new text has appeared.

Typically, the most recent version is updated weekly and older versions may be updated monthly if there are changes. If a translator did a big push to update the translation, the versions in question can be updated manually via the pipelines rather than running a scheduled task.

Catalyst only: Follow the Readme file on the Catalyst internal GitLab instance for the 'manual-builder' project.