mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 12:32:14 +09:00
라이믹스 코어의 언어 함수를 사용
This commit is contained in:
parent
a94420908d
commit
c54ef2a08b
1 changed files with 19 additions and 21 deletions
|
|
@ -407,29 +407,27 @@ class ncenterliteModel extends ncenterlite
|
||||||
*/
|
*/
|
||||||
public function getNotificationText($notification)
|
public function getNotificationText($notification)
|
||||||
{
|
{
|
||||||
global $lang;
|
|
||||||
|
|
||||||
// Get the type of notification.
|
// Get the type of notification.
|
||||||
switch ($notification->type)
|
switch ($notification->type)
|
||||||
{
|
{
|
||||||
// Document.
|
// Document.
|
||||||
case 'D':
|
case 'D':
|
||||||
$type = $lang->ncenterlite_document;
|
$type = lang('ncenterlite_document');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Comment.
|
// Comment.
|
||||||
case 'C':
|
case 'C':
|
||||||
$type = $lang->ncenterlite_comment;
|
$type = lang('ncenterlite_comment');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Message.
|
// Message.
|
||||||
case 'E':
|
case 'E':
|
||||||
$type = $lang->ncenterlite_type_message;
|
$type = lang('ncenterlite_type_message');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Test.
|
// Test.
|
||||||
case 'T':
|
case 'T':
|
||||||
$type = $lang->ncenterlite_type_test;
|
$type = lang('ncenterlite_type_test');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Custom string.
|
// Custom string.
|
||||||
|
|
@ -438,16 +436,16 @@ class ncenterliteModel extends ncenterlite
|
||||||
|
|
||||||
// Insert member
|
// Insert member
|
||||||
case 'I':
|
case 'I':
|
||||||
$type = $lang->cmd_signup;
|
$type = lang('cmd_signup');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Custom language.
|
// Custom language.
|
||||||
case 'Y':
|
case 'Y':
|
||||||
return $lang->{$notification->target_body};
|
return lang($notification->target_body);
|
||||||
|
|
||||||
// Custom language with string interpolation.
|
// Custom language with string interpolation.
|
||||||
case 'Z':
|
case 'Z':
|
||||||
return vsprintf($lang->{$notification->target_body}, array(
|
return vsprintf(lang($notification->target_body), array(
|
||||||
$notification->target_member_srl, // %1$d
|
$notification->target_member_srl, // %1$d
|
||||||
$notification->target_nick_name, // %2$s
|
$notification->target_nick_name, // %2$s
|
||||||
$notification->target_user_id, // %3$s
|
$notification->target_user_id, // %3$s
|
||||||
|
|
@ -468,63 +466,63 @@ class ncenterliteModel extends ncenterlite
|
||||||
{
|
{
|
||||||
// Comment on your document.
|
// Comment on your document.
|
||||||
case 'C':
|
case 'C':
|
||||||
$str = sprintf($lang->ncenterlite_commented, $notification->target_nick_name, $type, $notification->target_summary);
|
$str = sprintf(lang('ncenterlite_commented'), $notification->target_nick_name, $type, $notification->target_summary);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Comment on a board.
|
// Comment on a board.
|
||||||
case 'A':
|
case 'A':
|
||||||
$str = sprintf($lang->ncenterlite_commented_board, $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
|
$str = sprintf(lang('ncenterlite_commented_board'), $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Mentioned.
|
// Mentioned.
|
||||||
case 'M':
|
case 'M':
|
||||||
$str = sprintf($lang->ncenterlite_mentioned, $notification->target_nick_name, $notification->target_browser, $notification->target_summary, $type);
|
$str = sprintf(lang('ncenterlite_mentioned'), $notification->target_nick_name, $notification->target_browser, $notification->target_summary, $type);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Message arrived.
|
// Message arrived.
|
||||||
case 'E':
|
case 'E':
|
||||||
$str = sprintf($lang->ncenterlite_message_mention, $notification->target_nick_name, $notification->target_summary);
|
$str = sprintf(lang('ncenterlite_message_mention'), $notification->target_nick_name, $notification->target_summary);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Test notification.
|
// Test notification.
|
||||||
case 'T':
|
case 'T':
|
||||||
$str = sprintf($lang->ncenterlite_test_noti, $notification->target_nick_name);
|
$str = sprintf(lang('ncenterlite_test_noti'), $notification->target_nick_name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// New document on a board.
|
// New document on a board.
|
||||||
case 'P':
|
case 'P':
|
||||||
$str = sprintf($lang->ncenterlite_board, $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
|
$str = sprintf(lang('ncenterlite_board'), $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// New document.
|
// New document.
|
||||||
case 'S':
|
case 'S':
|
||||||
if($notification->target_browser)
|
if($notification->target_browser)
|
||||||
{
|
{
|
||||||
$str = sprintf($lang->ncenterlite_board, $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
|
$str = sprintf(lang('ncenterlite_board'), $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$str = sprintf($lang->ncenterlite_article, $notification->target_nick_name, $notification->target_summary);
|
$str = sprintf(lang('ncenterlite_article'), $notification->target_nick_name, $notification->target_summary);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Voted.
|
// Voted.
|
||||||
case 'V':
|
case 'V':
|
||||||
$str = sprintf($lang->ncenterlite_vote, $notification->target_nick_name, $notification->target_summary, $type);
|
$str = sprintf(lang('ncenterlite_vote'), $notification->target_nick_name, $notification->target_summary, $type);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Admin notification.
|
// Admin notification.
|
||||||
case 'B':
|
case 'B':
|
||||||
$str = sprintf($lang->ncenterlite_admin_content_message, $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
|
$str = sprintf(lang('ncenterlite_admin_content_message'), $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'I':
|
case 'I':
|
||||||
$str = sprintf($lang->ncenterlite_insert_member_message, $notification->target_nick_name);
|
$str = sprintf(lang('ncenterlite_insert_member_message'), $notification->target_nick_name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Other.
|
// Other.
|
||||||
default:
|
default:
|
||||||
$str = $lang->ncenterlite;
|
$str = lang('ncenterlite');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $str;
|
return $str;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue