Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
scripts
mahara-scripts
Commits
7cd7564b
Commit
7cd7564b
authored
Nov 26, 2012
by
Hugh Davenport
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix up po script
parent
879cc6d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
mahara-langpacks/po-php.pl
mahara-langpacks/po-php.pl
+5
-2
No files found.
mahara-langpacks/po-php.pl
View file @
7cd7564b
...
...
@@ -14,6 +14,7 @@ use File::Path qw(mkpath);
use
File::
Basename
qw(fileparse)
;
use
Locale::
PO
;
use
FindBin
;
use
autodie
;
my
(
$inputfile
,
$outputdir
,
$lang
)
=
@ARGV
;
...
...
@@ -129,13 +130,15 @@ $langshort =~ s/^([a-zA-Z_]+)\.utf8/$1/;
if
(
!
defined
$plural
)
{
# If there was no "Plural-Forms:" po header, read plural forms
# rule from hardcoded list in pluralforms.pl
open
(
my
$fh
,
'
<
',
"
perl
$FindBin
::Bin/pluralforms.pl
$langshort
");
open
(
my
$fh
,
'
-|
',
"
perl
$FindBin
::Bin/pluralforms.pl
$langshort
");
$plural
=
<
$fh
>
;
close
$fh
;
}
if
(
defined
$plural
&&
$plural
=~
m/\S+/
)
{
open
(
my
$fh
,
'
>>
',
"
$outputdir
/lang/
$lang
/langconfig.php
");
my
$dir
=
$outputdir
.
'
/lang/
'
.
$lang
;
mkpath
(
$dir
);
open
(
my
$fh
,
'
>>
',
"
$dir
/langconfig.php
");
$plural
=~
s{[']+}{}g
;
my
$pluralphp
=
$plural
;
$pluralphp
=~
s{n}{\$n}g
;
...
...
Write
Preview
Markdown
is supported
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