Commit a2b6bb5e authored by Aaron Wells's avatar Aaron Wells

Adding 16.04 branches to scripts.

Also updating documentation...
parent 7e36312f
...@@ -15,6 +15,20 @@ ...@@ -15,6 +15,20 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
###########################
# Mahara langpacks generation file.
#
# This script pulls the latest .po translation files from all the translation
# branches, processes them into Mahara language files, and compresses them
# into tarballs.
#
# NOTE: It contains multiple hard-coded lists of branch names to get translations
# from. Whenever there's a new Mahara series, you'll need to manually update those
# lists. Each one has been tagged with this comment:
#
# # @UPDATE when there is a new series
#
use Data::Dumper; use Data::Dumper;
use FindBin; use FindBin;
use File::Path qw(mkpath rmtree); use File::Path qw(mkpath rmtree);
...@@ -111,7 +125,8 @@ system "git fetch --quiet origin"; ...@@ -111,7 +125,8 @@ system "git fetch --quiet origin";
# For launchpad, all languages are in a single branch, so update the lot # For launchpad, all languages are in a single branch, so update the lot
system "bzr launchpad-login dev-mahara"; system "bzr launchpad-login dev-mahara";
! -d $BZRDIR && system "bzr init-repo $BZRDIR"; ! -d $BZRDIR && system "bzr init-repo $BZRDIR";
my @branches = qw(1.7_STABLE 1.8_STABLE 1.9_STABLE 1.10_STABLE 15.04_STABLE 15.10_STABLE master); # @UPDATE when there is a new series
my @branches = qw(1.7_STABLE 1.8_STABLE 1.9_STABLE 1.10_STABLE 15.04_STABLE 15.10_STABLE 16.04_STABLE master);
foreach my $branch (@branches) { foreach my $branch (@branches) {
if ( ! -d "$BZRDIR/$branch" ) { if ( ! -d "$BZRDIR/$branch" ) {
...@@ -145,14 +160,16 @@ foreach my $lang (@langkeys) { ...@@ -145,14 +160,16 @@ foreach my $lang (@langkeys) {
if ( $remote =~ m/^lp:mahara-lang/ ) { if ( $remote =~ m/^lp:mahara-lang/ ) {
$repotype = 'launchpad'; $repotype = 'launchpad';
@branches = qw(1.7_STABLE 1.8_STABLE 1.9_STABLE 1.10_STABLE 15.04_STABLE 15.10_STABLE master); # @UPDATE when there is a new series
@branches = qw(1.7_STABLE 1.8_STABLE 1.9_STABLE 1.10_STABLE 15.04_STABLE 15.10_STABLE 16.04_STABLE master);
} }
elsif ( $remote =~ m{^https://git\.mahara\.org|^https://gitlab\.com} ) { elsif ( $remote =~ m{^https://git\.mahara\.org|^https://gitlab\.com} ) {
$repotype = 'git'; $repotype = 'git';
! -d "$gitlangdir" && system "git clone --quiet $remote $gitlangdir"; ! -d "$gitlangdir" && system "git clone --quiet $remote $gitlangdir";
chdir $gitlangdir; chdir $gitlangdir;
system "git fetch --quiet"; system "git fetch --quiet";
my $remotebranchcmd = 'git branch -r | grep -v "HEAD" | grep "origin\/\(master\|1.7_STABLE\|1.8_STABLE\|1.9_STABLE\|1.10_STABLE|15.04_STABLE|15.10_STABLE\)$"'; # @UPDATE when there is a new series
my $remotebranchcmd = 'git branch -r | grep -v "HEAD" | grep "origin\/\(master\|1.7_STABLE\|1.8_STABLE\|1.9_STABLE\|1.10_STABLE|15.04_STABLE|15.10_STABLE|16.04_STABLE\)$"';
my $remotebranches = `$remotebranchcmd`; my $remotebranches = `$remotebranchcmd`;
$remotebranches =~ s/\s+/ /; $remotebranches =~ s/\s+/ /;
@branches = (); @branches = ();
......
#!/bin/bash #!/bin/bash
# Update .pot files ####################################################
# This script pulls the latest English language strings from the Mahara core project,
# converts them into .pot files, and uploads those into the branches for the
# mahara-lang project, so that they can be translated through Launchpad.
#
# NOTE: This script contains a hard-coded list of branch names to operate on.
# Whenever there is a new major release of Mahara, these lists need to be
# manually updated. The list has been tagged with this comment:
#
# # @UPDATE when there is a new series
#
# this is expected to define DATA, SCRIPTS, DOCROOT # this is expected to define DATA, SCRIPTS, DOCROOT
. /etc/mahara-langpacks.conf . /etc/mahara-langpacks.conf
...@@ -49,7 +59,8 @@ BZR=${WORK}/mahara-lang-bzr ...@@ -49,7 +59,8 @@ BZR=${WORK}/mahara-lang-bzr
cd ${GITDIR} cd ${GITDIR}
git fetch --quiet origin git fetch --quiet origin
branches="1.7_STABLE 1.8_STABLE 1.9_STABLE 1.10_STABLE 15.04_STABLE 15.10_STABLE master" # @UPDATE when there is a new series
branches="1.7_STABLE 1.8_STABLE 1.9_STABLE 1.10_STABLE 15.04_STABLE 15.10_STABLE 16.04_STABLE master"
for branch in ${branches} ; do for branch in ${branches} ; do
branchexists=`git branch | grep "${branch}$"` branchexists=`git branch | grep "${branch}$"`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment