Developer Area/Mahara manual setup: Difference between revisions
From Mahara Wiki
< Developer Area
No edit summary |
|||
Line 10: | Line 10: | ||
cd code | cd code | ||
git clone git:// | git clone git://git.mahara.org/user-manual/manual.git manual1504 | ||
2. Create a new local branch for the new version of the manual | 2. Create a new local branch for the new version of the manual | ||
Line 26: | Line 26: | ||
[remote "origin"] | [remote "origin"] | ||
fetch = +refs/heads/*:refs/remotes/origin/* | fetch = +refs/heads/*:refs/remotes/origin/* | ||
url = git@ | url = git@git.mahara.org:user-manual/manual.git | ||
[branch "15.04_STABLE"] | [branch "15.04_STABLE"] | ||
remote = origin | remote = origin | ||
Line 32: | Line 32: | ||
4. Publish the new branch on | 4. Publish the new branch on git.mahara.org | ||
git push origin 15.04_STABLE:refs/heads/15.04_STABLE | git push origin 15.04_STABLE:refs/heads/15.04_STABLE | ||
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 | 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 git.mahara.org. | ||
=Setting up the translation export branch for Launchpad= | =Setting up the translation export branch for Launchpad= | ||
Line 81: | Line 81: | ||
=Add new manual to the package for generating it on the server= | =Add new manual to the package for generating it on the server= | ||
Once the new user manual has been set up and pushed to | Once the new user manual has been set up and pushed to git.mahara.org, the server also needs to know that this version of the manual needs to be generated. The correct repository for that is [https://git.mahara.org/user-manual/manual-packaging https://git.mahara.org/user-manual/manual-packaging]. There, the file '''maharadocs.cron.daily''' needs to be updated to include the following line. | ||
make -C $INSTALLDIR update html epub latexpdf MAHARA=15.04 >> $LOGFILE 2>&1 | make -C $INSTALLDIR update html epub latexpdf MAHARA=15.04 >> $LOGFILE 2>&1 | ||
This change then needs to be applied to the server itself. The server is managed by [http://catalyst.net.nz Catalyst IT]. | This change then needs to be applied to the server itself. The server is managed by [http://catalyst.net.nz Catalyst IT]. |
Revision as of 17:21, 2 Haziran 2015
Introduction
The Mahara user manual uses a number of tools to generate the end product. The presentation by Kristina Hoeppner illustrates the process and tools used briefly.
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 15.04 as an example. Any reference to 1.9 would need to be replaced with the version that you are creating the manual branch for.
Setting up a new local and remote branch
1. Do a checkout of the code in the new folder for the manual:
cd code git clone git://git.mahara.org/user-manual/manual.git manual1504
2. Create a new local branch for the new version of the manual
git branch git checkout -b 15.04_STABLE
3. 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 "15.04_STABLE"] remote = origin merge = refs/heads/15.04_STABLE
4. Publish the new branch on git.mahara.org
git push origin 15.04_STABLE:refs/heads/15.04_STABLE
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 git.mahara.org.
Setting up the translation export branch for Launchpad
This part is the tricky bit as Launchpad uses bzr for version control. There is a good tutorial on how to work with bzr that can help anyone get started.
The following steps are a bit incomplete, but will hopefully fleshed out in the future.
1. Assumption: Folder code/manual-export/manual-export exists.
2. Create the new folder "15.04_STABLE-export".
3. Generate the potfiles in your manual folder.
cd code/manual1504 sphinx-build -b gettext source potfiles
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.
5. Create the bzr files
cd manual-export bzr init manual-export/15.04_STABLE-export/
6. Enter your potfiles export folder and commit the folders.
cd manual-export/15.04_STABLE-export/ bzr add potfiles/ bzr commit write commit message
7. Push your newly created branch to Launchpad
bzr push lp:~mahara-lang/mahara-manual/15.04_STABLE-export
8. Go to Launchpad and set up the export branch for your translation: https://translations.launchpad.net/mahara-manual/15.04/+translations-settings
Under "Exporting translations to branch" click the "Edit" button. Then type into the field / search for the branch: ~mahara-lang/mahara-manual/15.04_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]
Add new manual to the package for generating it on the server
Once the new user manual has been set up and pushed to git.mahara.org, the server also needs to know that this version of the manual needs to be generated. The correct repository for that is https://git.mahara.org/user-manual/manual-packaging. There, the file maharadocs.cron.daily needs to be updated to include the following line.
make -C $INSTALLDIR update html epub latexpdf MAHARA=15.04 >> $LOGFILE 2>&1
This change then needs to be applied to the server itself. The server is managed by Catalyst IT.