[ticket/12525] Add string argument to contact and email user language variables

In language/en/common.php:
* Introduce a new language variable 'CONTACT' => 'Contact'
* Add a string argument to lang var 'CONTACT_USER' to avoid an appended
 '{USERNAME}' in template.
* Add a string argument to lang var 'SEND_EMAIL_USER' to avoid an appended
 '{USERNAME}' in template.

Also fix typos.

PHPBB3-12525
This commit is contained in:
n-aleha 2014-05-11 20:23:51 +03:00
parent f37ff48e2c
commit a114333209
8 changed files with 27 additions and 24 deletions

View file

@ -167,7 +167,8 @@ $lang = array_merge($lang, array(
'CONGRATULATIONS' => 'Congratulations to', 'CONGRATULATIONS' => 'Congratulations to',
'CONNECTION_FAILED' => 'Connection failed.', 'CONNECTION_FAILED' => 'Connection failed.',
'CONNECTION_SUCCESS' => 'Connection was successful!', 'CONNECTION_SUCCESS' => 'Connection was successful!',
'CONTACT_USER' => 'Contact', 'CONTACT' => 'Contact',
'CONTACT_USER' => 'Contact %s',
'COOKIES_DELETED' => 'All board cookies successfully deleted.', 'COOKIES_DELETED' => 'All board cookies successfully deleted.',
'CURRENT_TIME' => 'It is currently %s', 'CURRENT_TIME' => 'It is currently %s',
@ -664,7 +665,7 @@ $lang = array_merge($lang, array(
'SELECT_DESTINATION_FORUM' => 'Please select a destination forum', 'SELECT_DESTINATION_FORUM' => 'Please select a destination forum',
'SELECT_FORUM' => 'Select a forum', 'SELECT_FORUM' => 'Select a forum',
'SEND_EMAIL' => 'Email', // Used for submit buttons 'SEND_EMAIL' => 'Email', // Used for submit buttons
'SEND_EMAIL_USER' => 'Email', // Used as: {L_SEND_EMAIL_USER} {USERNAME} -> Email UserX 'SEND_EMAIL_USER' => 'Email %s',
'SEND_PRIVATE_MESSAGE' => 'Send private message', 'SEND_PRIVATE_MESSAGE' => 'Send private message',
'SETTINGS' => 'Settings', 'SETTINGS' => 'Settings',
'SIGNATURE' => 'Signature', 'SIGNATURE' => 'Signature',

View file

@ -964,8 +964,8 @@ switch ($mode)
if ($user_id) if ($user_id)
{ {
$template->assign_vars(array( $template->assign_vars(array(
'S_SEND_USER' => true, 'S_SEND_USER' => true,
'USERNAME' => $row['username'], 'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $row['username']),
'L_EMAIL_BODY_EXPLAIN' => $user->lang['EMAIL_BODY_EXPLAIN'], 'L_EMAIL_BODY_EXPLAIN' => $user->lang['EMAIL_BODY_EXPLAIN'],
'S_POST_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&u=' . $user_id)) 'S_POST_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&u=' . $user_id))
@ -1780,7 +1780,7 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f
'AGE' => $age, 'AGE' => $age,
'RANK_TITLE' => $rank_title, 'RANK_TITLE' => $rank_title,
'JOINED' => $user->format_date($data['user_regdate']), 'JOINED' => $user->format_date($data['user_regdate']),
'LAST_ACTIVE' => (empty($last_active)) ? ' - ' : $user->format_date($last_active), 'LAST_ACTIVE' => (empty($last_active)) ? ' - ' : $user->format_date($last_active),
'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0, 'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0,
'WARNINGS' => isset($data['user_warnings']) ? $data['user_warnings'] : 0, 'WARNINGS' => isset($data['user_warnings']) ? $data['user_warnings'] : 0,
@ -1800,7 +1800,7 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f
'S_WARNINGS' => ($auth->acl_getf_global('m_') || $auth->acl_get('m_warn')) ? true : false, 'S_WARNINGS' => ($auth->acl_getf_global('m_') || $auth->acl_get('m_warn')) ? true : false,
'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$user_id&sr=posts") : '', 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$user_id&sr=posts") : '',
'U_NOTES' => ($user_notes_enabled && $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $user_id, true, $user->session_id) : '', 'U_NOTES' => ($user_notes_enabled && $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $user_id, true, $user->session_id) : '',
'U_WARN' => ($warn_user_enabled && $auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $user_id, true, $user->session_id) : '', 'U_WARN' => ($warn_user_enabled && $auth->acl_get('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $user_id, true, $user->session_id) : '',
'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && $can_receive_pm) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $user_id) : '', 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && $can_receive_pm) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $user_id) : '',
@ -1810,7 +1810,9 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f
'USER_JABBER' => $data['user_jabber'], 'USER_JABBER' => $data['user_jabber'],
'USER_JABBER_IMG' => ($data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '', 'USER_JABBER_IMG' => ($data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
'L_VIEWING_PROFILE' => sprintf($user->lang['VIEWING_PROFILE'], $username), 'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $username),
'L_CONTACT_USER' => $user->lang('CONTACT_USER', $username),
'L_VIEWING_PROFILE' => $user->lang('VIEWING_PROFILE', $username),
); );
/** /**

View file

@ -1,6 +1,6 @@
<!-- INCLUDE overall_header.html --> <!-- INCLUDE overall_header.html -->
<h2 class="titlespace">{L_SEND_EMAIL_USER} {USERNAME}</h2> <h2 class="titlespace">{L_SEND_EMAIL_USER}</h2>
<form method="post" action="{S_POST_ACTION}" id="post"> <form method="post" action="{S_POST_ACTION}" id="post">

View file

@ -60,10 +60,10 @@
<div class="inner"> <div class="inner">
<div class="column1"> <div class="column1">
<h3>{L_CONTACT_USER} {USERNAME}</h3> <h3>{L_CONTACT_USER}</h3>
<dl class="details"> <dl class="details">
<!-- IF U_EMAIL --><dt>{L_EMAIL_ADDRESS}{L_COLON}</dt> <dd><a href="{U_EMAIL}">{L_SEND_EMAIL_USER} {USERNAME}</a></dd><!-- ENDIF --> <!-- IF U_EMAIL --><dt>{L_EMAIL_ADDRESS}{L_COLON}</dt> <dd><a href="{U_EMAIL}">{L_SEND_EMAIL_USER}</a></dd><!-- ENDIF -->
<!-- IF U_PM --><dt>{L_PM}{L_COLON}</dt> <dd><a href="{U_PM}">{L_SEND_PRIVATE_MESSAGE}</a></dd><!-- ENDIF --> <!-- IF U_PM --><dt>{L_PM}{L_COLON}</dt> <dd><a href="{U_PM}">{L_SEND_PRIVATE_MESSAGE}</a></dd><!-- ENDIF -->
<!-- IF U_JABBER and S_JABBER_ENABLED --><dt>{L_JABBER}{L_COLON}</dt> <dd><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_JABBER_MESSAGE}</a></dd><!-- ELSEIF USER_JABBER --><dt>{L_JABBER}{L_COLON}</dt> <dd>{USER_JABBER}</dd><!-- ENDIF --> <!-- IF U_JABBER and S_JABBER_ENABLED --><dt>{L_JABBER}{L_COLON}</dt> <dd><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_JABBER_MESSAGE}</a></dd><!-- ELSEIF USER_JABBER --><dt>{L_JABBER}{L_COLON}</dt> <dd>{USER_JABBER}</dd><!-- ENDIF -->
<!-- BEGIN custom_fields --> <!-- BEGIN custom_fields -->

View file

@ -36,7 +36,7 @@
<!-- EVENT ucp_pm_viewmessage_contact_fields_before --> <!-- EVENT ucp_pm_viewmessage_contact_fields_before -->
<!-- IF .contact --> <!-- IF .contact -->
<dd class="profile-contact"> <dd class="profile-contact">
<strong>{L_CONTACT_USER}{L_COLON}</strong> <strong>{L_CONTACT}{L_COLON}</strong>
<div class="dropdown-container dropdown-left"> <div class="dropdown-container dropdown-left">
<a href="#" class="dropdown-trigger"><span class="imageset icon_contact"></span></a> <a href="#" class="dropdown-trigger"><span class="imageset icon_contact"></span></a>
<div class="dropdown hidden"> <div class="dropdown hidden">

View file

@ -149,7 +149,7 @@
<!-- EVENT viewtopic_body_contact_fields_before --> <!-- EVENT viewtopic_body_contact_fields_before -->
<!-- IF not S_IS_BOT and .postrow.contact --> <!-- IF not S_IS_BOT and .postrow.contact -->
<dd class="profile-contact"> <dd class="profile-contact">
<strong>{L_CONTACT_USER}{L_COLON}</strong> <strong>{L_CONTACT}{L_COLON}</strong>
<div class="dropdown-container dropdown-left"> <div class="dropdown-container dropdown-left">
<a href="#" class="dropdown-trigger"><span class="imageset icon_contact"></span></a> <a href="#" class="dropdown-trigger"><span class="imageset icon_contact"></span></a>
<div class="dropdown hidden"> <div class="dropdown hidden">

View file

@ -6,7 +6,7 @@
<table class="tablebg" width="100%" cellspacing="1"> <table class="tablebg" width="100%" cellspacing="1">
<tr> <tr>
<th colspan="2">{L_SEND_EMAIL_USER} {USERNAME}</th> <th colspan="2">{L_SEND_EMAIL_USER}</th>
</tr> </tr>
<!-- IF ERROR_MESSAGE --> <!-- IF ERROR_MESSAGE -->
<tr> <tr>

View file

@ -104,7 +104,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="cat" align="center"><h4>{L_CONTACT_USER}</h4></td> <td class="cat" align="center"><h4>{L_CONTACT}</h4></td>
<td class="cat" align="center"><h4>{L_ABOUT_USER}</h4></td> <td class="cat" align="center"><h4>{L_ABOUT_USER}</h4></td>
</tr> </tr>
<!-- EVENT memberlist_view_contact_before --> <!-- EVENT memberlist_view_contact_before -->