Kaynağa Gözat

Another batch of hard-coded text - Thanks nikop for the hint :)

Signed-off-by: emanuele <emanuele45@gmail.com>
emanuele 12 yıl önce
ebeveyn
işleme
1da27d618e

+ 1 - 1
Sources/Load.php

@@ -1163,7 +1163,7 @@ function loadMemberContext($user, $display_custom_fields = false)
 		'ip2' => htmlspecialchars($profile['member_ip2']),
 		'online' => array(
 			'is_online' => $profile['is_online'],
-			'text' => $txt[$profile['is_online'] ? 'online' : 'offline'],
+			'member_is_online' => sprintf($txt[$profile['is_online'] ? 'member_is_online' : 'member_is_offline'], $smcFunc['htmlspecialchars']($profile['real_name'])),
 			'href' => $scripturl . '?action=pm;sa=send;u=' . $profile['id_member'],
 			'link' => '<a href="' . $scripturl . '?action=pm;sa=send;u=' . $profile['id_member'] . '">' . $txt[$profile['is_online'] ? 'online' : 'offline'] . '</a>',
 			'image_href' => $settings['images_url'] . '/' . ($profile['buddy'] ? 'buddy_' : '') . ($profile['is_online'] ? 'useron' : 'useroff') . '.png',

+ 1 - 1
Themes/default/Display.template.php

@@ -405,7 +405,7 @@ function template_main()
 		{
 			if(!empty($modSettings['onlineEnable']))
 				echo '
-								<li class="poster_online"><a href="', $scripturl,'?action=pm;sa=send;u=', $message['member']['id'], '" title="', ($message['member']['online']['is_online']) ? $message['member']['name']. ' is online' : $message['member']['name']. ' is offline', '">', $txt['send_message'], ' <img src="'. $message['member']['online']['image_href']. '" alt="" /></a></li>';
+								<li class="poster_online"><a href="', $scripturl,'?action=pm;sa=send;u=', $message['member']['id'], '" title="', $message['member']['online']['member_is_online'], '">', $txt['send_message'], ' <img src="'. $message['member']['online']['image_href']. '" alt="" /></a></li>';
 			else
 				echo '
 								<li class="poster_online"><a href="', $scripturl,'?action=pm;sa=send;u=', $message['member']['id'], '">', $txt['send_message'], '</a></li>';

+ 1 - 1
Themes/default/PersonalMessage.template.php

@@ -181,7 +181,7 @@ function template_folder()
 			// Show online and offline buttons?
 			if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'])
 				echo '
-				<img src="', $message['member']['online']['image_href'], '" alt="', $message['member']['online']['text'], '" />';
+				<img src="', $message['member']['online']['image_href'], '" alt="', $message['member']['online']['member_is_online'], '" />';
 
 			echo '
 				', $message['member']['link'], '

+ 3 - 1
Themes/default/languages/index.english.php

@@ -140,7 +140,7 @@ $txt['awaiting_approval'] = 'Awaiting Approval';
 $txt['attach_awaiting_approve'] = 'Attachments awaiting approval';
 $txt['post_awaiting_approval'] = 'Note: This message is awaiting approval by a moderator.';
 $txt['there_are_unapproved_topics'] = 'There are %1$s topics and %2$s posts awaiting approval in this board. Click <a href="%3$s">here</a> to view them all.';
-$txt['sedn_message'] = 'Send message';
+$txt['send_message'] = 'Send message';
 
 $txt['msg_alert_none'] = 'No messages...';
 $txt['msg_alert_you_have'] = 'you have';
@@ -468,7 +468,9 @@ $txt['queries'] = ' queries.';
 $txt['report_to_mod_func'] = 'Use this function to inform the moderators and administrators of an abusive or wrongly posted message.<br /><em>Please note that your email address will be revealed to the moderators if you use this.</em>';
 
 $txt['online'] = 'Online';
+$txt['member_is_online'] = '%1$s is online';
 $txt['offline'] = 'Offline';
+$txt['member_is_offline'] = '%1$s is offline';
 $txt['pm_online'] = 'Personal Message (Online)';
 $txt['pm_offline'] = 'Personal Message (Offline)';
 $txt['status'] = 'Status';