Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mahara-scripts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
mahara
mahara-scripts
Commits
50c8c882
Commit
50c8c882
authored
May 30, 2011
by
Richard Mansfield
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore po entries with no reference; ignore htdocs directory in .po refs
parent
0e4d5b1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
mahara-langpacks/po-php.pl
mahara-langpacks/po-php.pl
+3
-2
No files found.
mahara-langpacks/po-php.pl
View file @
50c8c882
...
...
@@ -25,11 +25,12 @@ foreach my $po (@$strings) {
my
$content
=
$po
->
msgstr
();
$content
=~
s{\\n}{\n}g
;
my
$reference
=
$po
->
reference
();
if
(
$reference
=~
m{^(\S*lang/)\S+\.utf8(/\S+)\.html$}
)
{
next
if
(
!
defined
$reference
);
if
(
$reference
=~
m{^htdocs/(\S*lang/)\S+\.utf8(/\S+)\.html$}
)
{
my
$filename
=
$
1
.
$lang
.
$
2
.
'
.html
';
$htmlfiles
{
$filename
}
=
$po
->
dequote
(
$content
);
}
elsif
(
$reference
=~
m{^(\S*lang/)\S+\.utf8(/\S+)\.php (\S+)$}
)
{
elsif
(
$reference
=~
m{^
htdocs/
(\S*lang/)\S+\.utf8(/\S+)\.php (\S+)$}
)
{
my
$key
=
$
3
;
my
$filename
=
$
1
.
$lang
.
$
2
.
'
.php
';
$phpfiles
{
$filename
}
->
{
$key
}
=
$content
;
...
...
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