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
c12b901a
Commit
c12b901a
authored
Jul 01, 2011
by
Richard Mansfield
Browse files
Fix for php langpack creation from files without 'htdocs' in context string
parent
c15148c9
Changes
1
Show whitespace changes
Inline
Side-by-side
mahara-langpacks/po-php.pl
View file @
c12b901a
...
...
@@ -26,11 +26,11 @@ foreach my $po (@$strings) {
$content
=~
s{\\n}{\n}g
;
my
$reference
=
$po
->
reference
();
next
if
(
!
defined
$reference
);
if
(
$reference
=~
m{^
htdocs/
(\S*lang/)\S+\.utf8(/\S+)\.html$}
)
{
if
(
$reference
=~
m{^(\S*lang/)\S+\.utf8(/\S+)\.html$}
)
{
my
$filename
=
$
1
.
$lang
.
$
2
.
'
.html
';
$htmlfiles
{
$filename
}
=
$po
->
dequote
(
$content
);
}
elsif
(
$reference
=~
m{^
htdocs/
(\S*lang/)\S+\.utf8(/\S+)\.php\s+(\S+)$}
)
{
elsif
(
$reference
=~
m{^(\S*lang/)\S+\.utf8(/\S+)\.php\s+(\S+)$}
)
{
my
$key
=
$
3
;
my
$filename
=
$
1
.
$lang
.
$
2
.
'
.php
';
$phpfiles
{
$filename
}
->
{
$key
}
=
$content
;
...
...
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