Bladeren bron

Merge pull request #304 from emanuele45/master

Some string fixes
emanuele45 12 jaren geleden
bovenliggende
commit
5d0841aec3

+ 1 - 2
Sources/ManageSmileys.php

@@ -341,8 +341,7 @@ function EditSmileySets()
 				$smcFunc['db_free_result']($request);
 				$smcFunc['db_free_result']($request);
 
 
 				$context['current_set']['can_import'] = count($smileys);
 				$context['current_set']['can_import'] = count($smileys);
-				// Setup this string to look nice.
-				$txt['smiley_set_import_multiple'] = sprintf($txt['smiley_set_import_multiple'], $context['current_set']['can_import']);
+				$context['current_set']['import_url'] = $scripturl . '?action=admin;area=smileys;sa=import;set=' . $context['current_set']['id'] . ';' . $context['session_var'] . '=' . $context['session_id']
 			}
 			}
 		}
 		}
 
 

+ 5 - 5
Sources/Post.php

@@ -860,9 +860,9 @@ function Post($post_errors = array())
 				{
 				{
 					// Since, they don't belong here. Let's inform the user that they exist..
 					// Since, they don't belong here. Let's inform the user that they exist..
 					if (!empty($topic))
 					if (!empty($topic))
-						$delete_link = '<a href="' . $scripturl . '?action=post' .(!empty($_REQUEST['msg']) ? (';msg=' . $_REQUEST['msg']) : '') . (!empty($_REQUEST['last_msg']) ? (';last_msg=' . $_REQUEST['last_msg']) : '') . ';topic=' . $topic . ';delete_temp">' . $txt['here'] . '</a>';
+						$delete_url = $scripturl . '?action=post' .(!empty($_REQUEST['msg']) ? (';msg=' . $_REQUEST['msg']) : '') . (!empty($_REQUEST['last_msg']) ? (';last_msg=' . $_REQUEST['last_msg']) : '') . ';topic=' . $topic . ';delete_temp';
 					else
 					else
-						$delete_link = '<a href="' . $scripturl . '?action=post;board=' . $board . ';delete_temp">' . $txt['here'] . '</a>';
+						$delete_url = $scripturl . '?action=post;board=' . $board . ';delete_temp';
 
 
 					// Compile a list of the files to show the user.
 					// Compile a list of the files to show the user.
 					$file_list = array();
 					$file_list = array();
@@ -876,14 +876,14 @@ function Post($post_errors = array())
 					if (!empty($_SESSION['temp_attachments']['post']['msg']))
 					if (!empty($_SESSION['temp_attachments']['post']['msg']))
 					{
 					{
 						// We have a message id, so we can link back to the old topic they were trying to edit..
 						// We have a message id, so we can link back to the old topic they were trying to edit..
-						$goback_link = '<a href="' . $scripturl . '?action=post' .(!empty($_SESSION['temp_attachments']['post']['msg']) ? (';msg=' . $_SESSION['temp_attachments']['post']['msg']) : '') . (!empty($_SESSION['temp_attachments']['post']['last_msg']) ? (';last_msg=' . $_SESSION['temp_attachments']['post']['last_msg']) : '') . ';topic=' . $_SESSION['temp_attachments']['post']['topic'] . ';additionalOptions">' . $txt['here'] . '</a>';
+						$goback_url = $scripturl . '?action=post' .(!empty($_SESSION['temp_attachments']['post']['msg']) ? (';msg=' . $_SESSION['temp_attachments']['post']['msg']) : '') . (!empty($_SESSION['temp_attachments']['post']['last_msg']) ? (';last_msg=' . $_SESSION['temp_attachments']['post']['last_msg']) : '') . ';topic=' . $_SESSION['temp_attachments']['post']['topic'] . ';additionalOptions';
 
 
-						$post_errors[] = array('temp_attachments_found', array($delete_link, $goback_link, $file_list));
+						$post_errors[] = array('temp_attachments_found', array($delete_url, $goback_url, $file_list));
 						$context['ignore_temp_attachments'] = true;
 						$context['ignore_temp_attachments'] = true;
 					}
 					}
 					else
 					else
 					{
 					{
-						$post_errors[] = array('temp_attachments_lost', array($delete_link, $file_list));
+						$post_errors[] = array('temp_attachments_lost', array($delete_url, $file_list));
 						$context['ignore_temp_attachments'] = true;
 						$context['ignore_temp_attachments'] = true;
 					}
 					}
 				}
 				}

+ 1 - 1
Sources/Register.php

@@ -639,7 +639,7 @@ function Activate()
 		elseif ($row['validation_code'] == '')
 		elseif ($row['validation_code'] == '')
 		{
 		{
 			loadLanguage('Profile');
 			loadLanguage('Profile');
-			fatal_error($txt['registration_not_approved'] . ' <a href="' . $scripturl . '?action=activate;user=' . $row['member_name'] . '">' . $txt['here'] . '</a>.', false);
+			fatal_error(sprintf($txt['registration_not_approved'], $scripturl . '?action=activate;user=' . $row['member_name']), false);
 		}
 		}
 
 
 		$context['sub_template'] = 'retry_activate';
 		$context['sub_template'] = 'retry_activate';

+ 2 - 2
Sources/Reminder.php

@@ -110,9 +110,9 @@ function RemindPick()
 	{
 	{
 		// Awaiting approval...
 		// Awaiting approval...
 		if (trim($row['validation_code']) == '')
 		if (trim($row['validation_code']) == '')
-			fatal_error($txt['registration_not_approved'] . ' <a href="' . $scripturl . '?action=activate;user=' . $_POST['user'] . '">' . $txt['here'] . '</a>.', false);
+			fatal_error(sprintf($txt['registration_not_approved'], $scripturl . '?action=activate;user=' . $_POST['user']), false);
 		else
 		else
-			fatal_error($txt['registration_not_activated'] . ' <a href="' . $scripturl . '?action=activate;user=' . $_POST['user'] . '">' . $txt['here'] . '</a>.', false);
+			fatal_error(sprintf($txt['registration_not_activated'], $scripturl . '?action=activate;user=' . $_POST['user']), false);
 	}
 	}
 
 
 	// You can't get emailed if you have no email address.
 	// You can't get emailed if you have no email address.

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

@@ -85,7 +85,7 @@ function template_modifyset()
 		{
 		{
 			echo '
 			echo '
 			<div class="information">
 			<div class="information">
-				', $context['current_set']['can_import'] == 1 ? $txt['smiley_set_import_single'] : $txt['smiley_set_import_multiple'], ' <a href="', $scripturl, '?action=admin;area=smileys;sa=import;set=', $context['current_set']['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['here'], '</a> ', $context['current_set']['can_import'] == 1 ? $txt['smiley_set_to_import_single'] : $txt['smiley_set_to_import_multiple'], '
+				', $context['current_set']['can_import'] == 1 ? sprintf($txt['smiley_set_import_single'], $context['current_set']['import_url']) : sprintf($txt['smiley_set_import_multiple'], $context['current_set']['can_import'], $context['current_set']['import_url']), '
 			</div>';
 			</div>';
 		}
 		}
 
 

+ 2 - 4
Themes/default/languages/ManageSmileys.english.php

@@ -57,10 +57,8 @@ $txt['smiley_set_new'] = 'Create new Smiley set';
 $txt['smiley_set_modify_existing'] = 'Modify existing Smiley set';
 $txt['smiley_set_modify_existing'] = 'Modify existing Smiley set';
 $txt['smiley_set_modify'] = 'Modify';
 $txt['smiley_set_modify'] = 'Modify';
 $txt['smiley_set_import_directory'] = 'Import smileys already in this directory';
 $txt['smiley_set_import_directory'] = 'Import smileys already in this directory';
-$txt['smiley_set_import_single'] = 'There is one smiley in this smiley set not yet imported. Click';
-$txt['smiley_set_import_multiple'] = 'There are %1$d smileys in the directory that have not yet been imported. Click';
-$txt['smiley_set_to_import_single'] = 'to import it now.';
-$txt['smiley_set_to_import_multiple'] = 'to import them now.';
+$txt['smiley_set_import_single'] = 'There is one smiley in this smiley set not yet imported. Click <a href="%1$s">here</a> to import it now.';
+$txt['smiley_set_import_multiple'] = 'There are %1$d smileys in the directory that have not yet been imported. Click <a href="%2$s">here</a> to import them now.';
 
 
 $txt['smileys_location'] = 'Location';
 $txt['smileys_location'] = 'Location';
 $txt['smileys_location_form'] = 'Post form';
 $txt['smileys_location_form'] = 'Post form';

+ 2 - 2
Themes/default/languages/Post.english.php

@@ -218,8 +218,8 @@ $txt['php_upload_error_6'] = 'Unable to save. Missing a temporary directory. Ple
 $txt['php_upload_error_7'] = 'Failed to write file to disk. This is a PHP related error. Please contact your host if this problem continues.';
 $txt['php_upload_error_7'] = 'Failed to write file to disk. This is a PHP related error. Please contact your host if this problem continues.';
 $txt['php_upload_error_8'] = 'A PHP extension stopped the file upload. This is a PHP related error. Please contact your host if this problem continues.';
 $txt['php_upload_error_8'] = 'A PHP extension stopped the file upload. This is a PHP related error. Please contact your host if this problem continues.';
 $txt['error_temp_attachments_new'] = 'There are attachments which you had previously attached but not posted. These attachments are still attached to this post. This post does need to be submitted before these attachments are either saved or removed. You can do that <a href="#postAttachment">here</a>';
 $txt['error_temp_attachments_new'] = 'There are attachments which you had previously attached but not posted. These attachments are still attached to this post. This post does need to be submitted before these attachments are either saved or removed. You can do that <a href="#postAttachment">here</a>';
-$txt['error_temp_attachments_found'] = 'The following attachments were found which you had previously attached to another post but not posted. It is advisable that you do not post until these are either removed or that post has been submited.<br />Click %1$s to remove those attachments. Or %2$s to return to that post.%3$s';
-$txt['error_temp_attachments_lost'] = 'The following attachments were found which you had previously attached to another post but not posted. It is advisable that you do not upload any more attachments until these are removed or that post has been submitedd.<br />Click %1$s to remove these attachments.%2$s';
+$txt['error_temp_attachments_found'] = 'The following attachments were found which you had previously attached to another post but not posted. It is advisable that you do not post until these are either removed or that post has been submited.<br />Click <a href="%1$s">here</a> to remove those attachments. Or <a href="%2$s">here</a> to return to that post.%3$s';
+$txt['error_temp_attachments_lost'] = 'The following attachments were found which you had previously attached to another post but not posted. It is advisable that you do not upload any more attachments until these are removed or that post has been submitted.<br />Click <a href="%1$s">here</a> to remove these attachments.%2$s';
 $txt['error_temp_attachments_gone'] = 'Those attachments have now been removed and you have been returned to the page you were previously on';
 $txt['error_temp_attachments_gone'] = 'Those attachments have now been removed and you have been returned to the page you were previously on';
 $txt['error_temp_attachments_flushed'] = 'Please note that any files which had been previously attached but not posted have now been removed.';
 $txt['error_temp_attachments_flushed'] = 'Please note that any files which had been previously attached but not posted have now been removed.';
 $txt['error_topic_already_announced'] = 'Please note that this topic has already been announced.';
 $txt['error_topic_already_announced'] = 'Please note that this topic has already been announced.';

+ 2 - 2
Themes/default/languages/Profile.english.php

@@ -233,8 +233,8 @@ $txt['reminder_set_password'] = 'Set Password';
 $txt['reminder_password_set'] = 'Password successfully set';
 $txt['reminder_password_set'] = 'Password successfully set';
 $txt['reminder_error'] = '%1$s failed to answer their secret question correctly when attempting to change a forgotten password.';
 $txt['reminder_error'] = '%1$s failed to answer their secret question correctly when attempting to change a forgotten password.';
 
 
-$txt['registration_not_approved'] = 'Sorry, this account has not yet been approved. If you need to change your email address please click';
-$txt['registration_not_activated'] = 'Sorry, this account has not yet been activated. If you need to resend the activation email please click';
+$txt['registration_not_approved'] = 'Sorry, this account has not yet been approved. If you need to change your email address please click <a href="%1$s">here</a>.';
+$txt['registration_not_activated'] = 'Sorry, this account has not yet been activated. If you need to resend the activation email please click <a href="%1$s">here</a>';
 
 
 $txt['primary_membergroup'] = 'Primary Membergroup';
 $txt['primary_membergroup'] = 'Primary Membergroup';
 $txt['additional_membergroups'] = 'Additional Membergroups';
 $txt['additional_membergroups'] = 'Additional Membergroups';

+ 4 - 4
Themes/default/languages/index.english.php

@@ -353,10 +353,10 @@ $txt['latest_member'] = 'Latest Member';
 $txt['total_cats'] = 'Total Categories';
 $txt['total_cats'] = 'Total Categories';
 $txt['latest_post'] = 'Latest Post';
 $txt['latest_post'] = 'Latest Post';
 
 
-$txt['you_have'] = 'You\'ve got';
-$txt['click'] = 'Click';
-$txt['here'] = 'here';
-$txt['to_view'] = 'to view them.';
+$txt['you_have'] = 'You\'ve got'; //Deprecated
+$txt['click'] = 'Click'; //Deprecated
+$txt['here'] = 'here'; //Deprecated
+$txt['to_view'] = 'to view them.'; //Deprecated
 $txt['you_have_no_msg'] = 'You don\'t have any message...';
 $txt['you_have_no_msg'] = 'You don\'t have any message...';
 $txt['you_have_one_msg'] = 'You\'ve got 1 message... Click <a href="%1$s">here</a> to view it';
 $txt['you_have_one_msg'] = 'You\'ve got 1 message... Click <a href="%1$s">here</a> to view it';
 $txt['you_have_many_msgs'] = 'You\'ve got %2$d messages... Click <a href="%1$s">here</a> to view them';
 $txt['you_have_many_msgs'] = 'You\'ve got %2$d messages... Click <a href="%1$s">here</a> to view them';