mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
#24105 - Quite compliacted lang changes, translators will complain :|
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8474 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
2c5e12876b
commit
976e83351a
2 changed files with 45 additions and 21 deletions
|
@ -3215,7 +3215,7 @@ function obtain_users_online($forum_id = 0)
|
|||
*/
|
||||
function obtain_users_online_string($online_users, $forum_id = 0)
|
||||
{
|
||||
global $db, $user, $auth;
|
||||
global $config, $db, $user, $auth;
|
||||
|
||||
$user_online_link = $online_userlist = '';
|
||||
|
||||
|
@ -3256,34 +3256,45 @@ function obtain_users_online_string($online_users, $forum_id = 0)
|
|||
{
|
||||
$online_userlist = $user->lang['REGISTERED_USERS'] . ' ' . $online_userlist;
|
||||
}
|
||||
else
|
||||
else if ($config['load_online_guests'])
|
||||
{
|
||||
$l_online = ($online_users['guests_online'] === 1) ? $user->lang['BROWSING_FORUM_GUEST'] : $user->lang['BROWSING_FORUM_GUESTS'];
|
||||
$online_userlist = sprintf($l_online, $online_userlist, $online_users['guests_online']);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$online_userlist = sprintf($user->lang['BROWSING_FORUM'], $online_userlist);
|
||||
}
|
||||
// Build online listing
|
||||
$vars_online = array(
|
||||
'ONLINE' => array('total_online', 'l_t_user_s'),
|
||||
'REG' => array('visible_online', 'l_r_user_s'),
|
||||
'HIDDEN' => array('hidden_online', 'l_h_user_s'),
|
||||
'GUEST' => array('guests_online', 'l_g_user_s')
|
||||
'ONLINE' => array('total_online', 'l_t_user_s', 0),
|
||||
'REG' => array('visible_online', 'l_r_user_s', !$config['load_online_guests']),
|
||||
'HIDDEN' => array('hidden_online', 'l_h_user_s', $config['load_online_guests']),
|
||||
'GUEST' => array('guests_online', 'l_g_user_s', 0)
|
||||
);
|
||||
|
||||
foreach ($vars_online as $l_prefix => $var_ary)
|
||||
{
|
||||
if ($var_ary[2])
|
||||
{
|
||||
$l_suffix = '_AND';
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_suffix = '';
|
||||
}
|
||||
switch ($online_users[$var_ary[0]])
|
||||
{
|
||||
case 0:
|
||||
${$var_ary[1]} = $user->lang[$l_prefix . '_USERS_ZERO_TOTAL'];
|
||||
${$var_ary[1]} = $user->lang[$l_prefix . '_USERS_ZERO_TOTAL' . $l_suffix];
|
||||
break;
|
||||
|
||||
case 1:
|
||||
${$var_ary[1]} = $user->lang[$l_prefix . '_USER_TOTAL'];
|
||||
${$var_ary[1]} = $user->lang[$l_prefix . '_USER_TOTAL' . $l_suffix];
|
||||
break;
|
||||
|
||||
default:
|
||||
${$var_ary[1]} = $user->lang[$l_prefix . '_USERS_TOTAL'];
|
||||
${$var_ary[1]} = $user->lang[$l_prefix . '_USERS_TOTAL' . $l_suffix];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3292,7 +3303,13 @@ function obtain_users_online_string($online_users, $forum_id = 0)
|
|||
$l_online_users = sprintf($l_t_user_s, $online_users['total_online']);
|
||||
$l_online_users .= sprintf($l_r_user_s, $online_users['visible_online']);
|
||||
$l_online_users .= sprintf($l_h_user_s, $online_users['hidden_online']);
|
||||
|
||||
if ($config['load_online_guests'])
|
||||
{
|
||||
$l_online_users .= sprintf($l_g_user_s, $online_users['guests_online']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return array(
|
||||
'online_userlist' => $online_userlist,
|
||||
|
|
|
@ -106,6 +106,7 @@ $lang = array_merge($lang, array(
|
|||
'BOARD_DISABLE' => 'Sorry but this board is currently unavailable.',
|
||||
'BOARD_DISABLED' => 'This board is currently disabled.',
|
||||
'BOARD_UNAVAILABLE' => 'Sorry but the board is temporarily unavailable, please try again in a few minutes.',
|
||||
'BROWSING_FORUM' => 'Users browsing this forum: %1$s',
|
||||
'BROWSING_FORUM_GUEST' => 'Users browsing this forum: %1$s and %2$d guest',
|
||||
'BROWSING_FORUM_GUESTS' => 'Users browsing this forum: %1$s and %2$d guests',
|
||||
'BYTES' => 'Bytes',
|
||||
|
@ -246,11 +247,14 @@ $lang = array_merge($lang, array(
|
|||
'G_GLOBAL_MODERATORS' => 'Global moderators',
|
||||
|
||||
'HIDDEN_USERS_ONLINE' => '%d hidden users online',
|
||||
'HIDDEN_USERS_TOTAL' => '%d hidden and ',
|
||||
'HIDDEN_USERS_TOTAL' => '%d hidden',
|
||||
'HIDDEN_USERS_TOTAL_AND' => '%d hidden and ',
|
||||
'HIDDEN_USERS_ZERO_ONLINE' => '0 hidden users online',
|
||||
'HIDDEN_USERS_ZERO_TOTAL' => '0 hidden and ',
|
||||
'HIDDEN_USERS_ZERO_TOTAL' => '0 hidden',
|
||||
'HIDDEN_USERS_ZERO_TOTAL_AND' => '0 hidden and ',
|
||||
'HIDDEN_USER_ONLINE' => '%d hidden user online',
|
||||
'HIDDEN_USER_TOTAL' => '%d hidden and ',
|
||||
'HIDDEN_USER_TOTAL' => '%d hidden',
|
||||
'HIDDEN_USER_TOTAL_AND' => '%d hidden and ',
|
||||
'HIDE_GUESTS' => 'Hide guests',
|
||||
'HIDE_ME' => 'Hide my online status this session',
|
||||
'HOURS' => 'Hours',
|
||||
|
@ -446,10 +450,13 @@ $lang = array_merge($lang, array(
|
|||
'REGISTERED_USERS' => 'Registered users:',
|
||||
'REG_USERS_ONLINE' => 'There are %d registered users and ',
|
||||
'REG_USERS_TOTAL' => '%d registered, ',
|
||||
'REG_USERS_TOTAL_AND' => '%d registered and ',
|
||||
'REG_USERS_ZERO_ONLINE' => 'There are 0 registered users and ',
|
||||
'REG_USERS_ZERO_TOTAL' => '0 registered, ',
|
||||
'REG_USERS_ZERO_TOTAL_AND' => '0 registered and ',
|
||||
'REG_USER_ONLINE' => 'There is %d registered user and ',
|
||||
'REG_USER_TOTAL' => '%d registered, ',
|
||||
'REG_USER_TOTAL_AND' => '%d registered and ',
|
||||
'REMOVE' => 'Remove',
|
||||
'REMOVE_INSTALL' => 'Please delete, move or rename the install directory before you use your board. If this directory is still present, only the Administration Control Panel (ACP) will be accessible.',
|
||||
'REPLIES' => 'Replies',
|
||||
|
|
Loading…
Add table
Reference in a new issue