Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
scripts
mahara-scripts
Commits
88e40f3d
Commit
88e40f3d
authored
May 30, 2011
by
Richard Mansfield
Browse files
Add mi repo; add repository type to saved state
parent
50c8c882
Changes
1
Show whitespace changes
Inline
Side-by-side
mahara-langpacks/langpacks.pl
View file @
88e40f3d
...
...
@@ -43,7 +43,7 @@ make_path $TARBALLS;
print
STDERR
"
Checking langpacks for updates:
"
.
`
date
\
"+%Y-%m-%d %H:%M:%S
\
"
`;
my
@langs
=
qw(ar ca cs da de en_us es eu fi fr he it ja ko nl no_nb sl zh_tw)
;
my
@langs
=
qw(ar ca cs da de en_us es eu fi fr he it ja ko
mi
nl no_nb sl zh_tw)
;
my
$last
;
my
$savefile
=
"
$TARBALLS
/mahara-langpacks.last
";
...
...
@@ -129,6 +129,8 @@ foreach my $lang (@langs) {
if
(
-
f
$pofile
)
{
$last
->
{
$lang
}
->
{
branches
}
->
{
$localbranch
}
->
{
type
}
=
'
po
';
print
STDERR
"
$lang
$localbranch
: using .po file
\n
";
# Check utf8ness of .po file?
...
...
@@ -150,6 +152,8 @@ foreach my $lang (@langs) {
}
else
{
$last
->
{
$lang
}
->
{
branches
}
->
{
$localbranch
}
->
{
type
}
=
'
mahara
';
print
STDERR
"
$lang
$localbranch
: sanitising
\n
";
# sanitise langpack
...
...
@@ -193,7 +197,7 @@ foreach my $lang (@langs) {
if
(
$last
->
{
$lang
}
->
{
branches
}
->
{
$localbranch
}
->
{
status
}
==
0
)
{
my
$strip
=
$cleanbranchdir
;
$strip
=~
s{
$
/}{}
;
$strip
=~
s{
^
/}{
^
}
;
system
"
tar --transform
\"
s,
$strip
,
$lang
.utf8,
\"
-zcf
$tarball
$cleanbranchdir
";
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment