Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
e0f20abd
Commit
e0f20abd
authored
Jan 15, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor formatting fixes
parent
d7783a3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
MessageController.php
framework/console/controllers/MessageController.php
+11
-11
No files found.
framework/console/controllers/MessageController.php
View file @
e0f20abd
...
@@ -204,15 +204,15 @@ class MessageController extends Controller
...
@@ -204,15 +204,15 @@ class MessageController extends Controller
$todo
[
$message
]
=
''
;
$todo
[
$message
]
=
''
;
}
}
ksort
(
$translated
);
ksort
(
$translated
);
foreach
(
$translated
as
$message
=>
$translation
)
{
foreach
(
$translated
as
$message
=>
$translation
)
{
if
(
!
isset
(
$merged
[
$message
])
&&
!
isset
(
$todo
[
$message
])
&&
!
$removeUnused
)
{
if
(
!
isset
(
$merged
[
$message
])
&&
!
isset
(
$todo
[
$message
])
&&
!
$removeUnused
)
{
if
(
substr
(
$translation
,
0
,
2
)
===
'@@'
&&
substr
(
$translation
,
-
2
)
===
'@@'
)
{
if
(
substr
(
$translation
,
0
,
2
)
===
'@@'
&&
substr
(
$translation
,
-
2
)
===
'@@'
)
{
$todo
[
$message
]
=
$translation
;
$todo
[
$message
]
=
$translation
;
}
else
{
}
else
{
$todo
[
$message
]
=
'@@'
.
$translation
.
'@@'
;
$todo
[
$message
]
=
'@@'
.
$translation
.
'@@'
;
}
}
}
}
}
}
$merged
=
array_merge
(
$todo
,
$merged
);
$merged
=
array_merge
(
$todo
,
$merged
);
if
(
$sort
)
{
if
(
$sort
)
{
ksort
(
$merged
);
ksort
(
$merged
);
...
@@ -220,15 +220,15 @@ class MessageController extends Controller
...
@@ -220,15 +220,15 @@ class MessageController extends Controller
if
(
false
===
$overwrite
)
{
if
(
false
===
$overwrite
)
{
$fileName
.=
'.merged'
;
$fileName
.=
'.merged'
;
}
}
if
(
$format
===
'po'
){
if
(
$format
===
'po'
){
$out_str
=
''
;
$out_str
=
''
;
foreach
(
$merged
as
$k
=>
$v
){
foreach
(
$merged
as
$k
=>
$v
){
$k
=
preg_replace
(
'/(\")|(\\\")/'
,
"
\\\"
"
,
$k
);
$k
=
preg_replace
(
'/(\")|(\\\")/'
,
"
\\\"
"
,
$k
);
$v
=
preg_replace
(
'/(\")|(\\\")/'
,
"
\\\"
"
,
$v
);
$v
=
preg_replace
(
'/(\")|(\\\")/'
,
"
\\\"
"
,
$v
);
if
(
substr
(
$v
,
0
,
2
)
===
'@@'
&&
substr
(
$v
,
-
2
)
===
'@@'
)
{
if
(
substr
(
$v
,
0
,
2
)
===
'@@'
&&
substr
(
$v
,
-
2
)
===
'@@'
)
{
$out_str
.=
"#msgid
\"
$k
\"\n
"
;
$out_str
.=
"#msgid
\"
$k
\"\n
"
;
$out_str
.=
"#msgstr
\"
$v
\"\n
"
;
$out_str
.=
"#msgstr
\"
$v
\"\n
"
;
}
else
{
}
else
{
$out_str
.=
"msgid
\"
$k
\"\n
"
;
$out_str
.=
"msgid
\"
$k
\"\n
"
;
$out_str
.=
"msgstr
\"
$v
\"\n
"
;
$out_str
.=
"msgstr
\"
$v
\"\n
"
;
}
}
...
...
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