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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
2a6bc68c
Commit
2a6bc68c
authored
Feb 23, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fixes.
parent
c229ba72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
MessageSource.php
framework/i18n/MessageSource.php
+3
-1
MissingTranslationEvent.php
framework/i18n/MissingTranslationEvent.php
+3
-4
No files found.
framework/i18n/MessageSource.php
View file @
2a6bc68c
...
...
@@ -114,8 +114,10 @@ class MessageSource extends Component
'language'
=>
$language
,
]);
$this
->
trigger
(
self
::
EVENT_MISSING_TRANSLATION
,
$event
);
if
(
$event
->
translatedMessage
!==
false
)
{
if
(
$event
->
translatedMessage
!==
null
)
{
return
$this
->
_messages
[
$key
][
$message
]
=
$event
->
translatedMessage
;
}
else
{
return
$this
->
_messages
[
$key
][
$message
]
=
false
;
}
}
return
false
;
...
...
framework/i18n/MissingTranslationEvent.php
View file @
2a6bc68c
...
...
@@ -23,11 +23,10 @@ class MissingTranslationEvent extends Event
*/
public
$message
;
/**
* @var string|boolean the translated message. An event handler may overwrite this property
* with a translated version of [[message]] if possible. Defaults to false meaning no translation
* is available.
* @var string the translated message. An event handler may overwrite this property
* with a translated version of [[message]] if possible. If not set (null), it means the message is not translated.
*/
public
$translatedMessage
=
false
;
public
$translatedMessage
;
/**
* @var string the category that the message belongs to
*/
...
...
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