Developer Area/Language Packs/Launchpad Branching
From Mahara Wiki
< Developer Area | Language PacksRevision as of 12:42, 24 October 2013 by Aaronw (talk | contribs) (→Create a new code branch)
Create a new code branch
Create a new code branch in the mahara-lang launchpad project for importing pot templates. This should contain a copy of the latest mahara/mahara.pot from master. Roughly, do something like this, from an existing up-to-date local copy of the mahara-lang bzr repo (If you don't have a copy of the mahara-lang bzr repo, do "bzr branch lp:mahara-lang" to do an initial checkout of it):
mkdir 1.5_STABLE cd 1.5_STABLE bzr init mkdir mahara # Copy the mahara.pot from the trunk cp ../mahara/mahara.pot mahara/ bzr add mahara/mahara.pot bzr commit bzr push lp:~mahara-lang/mahara-lang/1.5_STABLE
Check that the branch has appeared (with the mahara.pot file) under https://code.launchpad.net/mahara-lang
Create a new series
Create the new series under the mahara-lang project on launchpad at https://launchpad.net/mahara-lang/+addseries
You should set the official series branch to the one you just created (~mahara-lang/mahara-lang/1.5_STABLE). Once that's done, launchpad calls the branch by the abbreviated name lp:mahara-lang/1.5
Set up translation import and export for the new series
In the translation synchronisation settings for the 1.5 series (https://translations.launchpad.net/mahara-lang/1.5/+translations-settings), set the translation to "Import template files" from the official branch (on the trunk series, we "Import template and translation files", but it can potentially overwrite translations, so we don't do that for a stable branch).
In the export synchronisation settings, first, create a new branch called lp:~mahara-lang/mahara-lang/1.5_STABLE-export, then export translations for the series to this new branch. This should be automatically created in a day or so, once there are translations to export. This is the branch where the langpacks.mahara.org tarballs come from.
Update the scripts
Update the langpack scripts. In the mahara-scripts repo, there are two files that need to be updated with the new branch name:
mahara-langpacks/langpacks.pl (which generates langpack tarballs from lp:~mahara-lang/mahara-lang/1.5_STABLE-export)
mahara-langpacks/update-pot.pl (which pushes new changes to English strings to lp:mahara-lang/1.5 to be translated)
Just edit these files, look for the other branch names, and add 1.5_STABLE. You may also want to remove the old no-longer-supported branch at the same time, in this case, 1.2_STABLE. Once the scripts are committed, deploy the scripts by generating a new custom-site-mahara-langpacks debian package. Run
fakeroot debian/rules binary
within your mahara-scripts checkout. The resulting .deb can be installed over the existing one (currently on chatter.catalyst.net.nz).