Skip to content

Commit

Permalink
fix sprintf statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mantis committed Sep 28, 2013
1 parent 7bca308 commit e935cd7
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bug_actiongroup_page.php
Expand Up @@ -213,7 +213,7 @@
case 'CUSTOM' :
$t_custom_field_def = custom_field_get_definition( $t_custom_field_id );
/* TODO L10N: translation support for custom field names */
$t_question_title = sprintf( _('Update %1'), $t_custom_field_def['name'] );
$t_question_title = sprintf( _('Update %s'), $t_custom_field_def['name'] );
$t_button_title = $t_question_title;
$t_form = "custom_field_$t_custom_field_id";
break;
Expand Down
2 changes: 1 addition & 1 deletion bugnote_view_inc.php
Expand Up @@ -176,7 +176,7 @@
echo '<span class="small bugnote-last-modified">' . _('Last edited:') . _( '&#32;' ) . date( $t_normal_date_format, $t_bugnote->last_modified ) . '</span><br />';
$t_revision_count = bug_revision_count( $f_bug_id, REV_BUGNOTE, $t_bugnote->id );
if ( $t_revision_count >= 1) {
$t_view_num_revisions_text = sprintf( _( 'View %1 revisions' ), $t_revision_count );
$t_view_num_revisions_text = sprintf( _( 'View %s revisions' ), $t_revision_count );
echo '<span class="small bugnote-revisions-link"><a href="bug_revision_view_page.php?bugnote_id=' . $t_bugnote->id . '">' . $t_view_num_revisions_text . '</a></span><br />';
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/columns_api.php
Expand Up @@ -1142,7 +1142,7 @@ function print_column_attachment_count( $p_bug, $p_columns_target = COLUMNS_TARG

if ( $t_attachment_count > 0 ) {
$t_href = string_get_bug_view_url( $p_bug->id ) . '#attachments';
$t_href_title = sprintf( _( 'View %1 attachment(s) for issue #%2' ), $t_attachment_count, $p_bug->id );
$t_href_title = sprintf( _( 'View %1$d attachment(s) for issue #%2$d' ), $t_attachment_count, $p_bug->id );
if ( config_get( 'show_attachment_indicator' ) ) {
$t_alt_text = $t_attachment_count . _( '&#32;' ) . _( 'attachment(s)' );
echo "<a href=\"$t_href\" title=\"$t_href_title\"><img src=\"" . helper_mantis_url( 'themes/' . config_get( 'theme' ) . '/images/attachment.png' ) . "\" alt=\"$t_alt_text\" title=\"$t_alt_text\" /></a>";
Expand Down
4 changes: 2 additions & 2 deletions core/email_api.php
Expand Up @@ -427,9 +427,9 @@ function email_signup( $p_user_id, $p_password, $p_confirm_hash, $p_admin_name =
$t_subject = '[' . config_get( 'window_title' ) . '] ' . _( 'Account registration' );

if( !empty( $p_admin_name ) ) {
$intro_text = sprintf( _('The user %1 has created an account for you with username %2. In order to complete your registration, visit the following URL (make sure it is entered as the single line) and set your own access password:'), $p_admin_name, $t_username );
$intro_text = sprintf( _('The user %1$s has created an account for you with username %2$s. In order to complete your registration, visit the following URL (make sure it is entered as the single line) and set your own access password:'), $p_admin_name, $t_username );
} else {
$intro_text = sprintf( _('Thank you for registering. You have an account with username %1. In order to complete your registration, visit the following URL (make sure it is entered as the single line) and set your own access password:'), $t_username );
$intro_text = sprintf( _('Thank you for registering. You have an account with username %s. In order to complete your registration, visit the following URL (make sure it is entered as the single line) and set your own access password:'), $t_username );
}

$t_message = $intro_text . "\n\n" . string_get_confirm_hash_url( $p_user_id, $p_confirm_hash ) . "\n\n" . _( 'If you did not request any registration, ignore this message and nothing will happen.' ) . "\n\n" . _( 'Do not reply to this message' );
Expand Down
2 changes: 1 addition & 1 deletion core/html_api.php
Expand Up @@ -618,7 +618,7 @@ function html_footer( $p_file = null ) {

# Print the page memory usage
if ( config_get( 'show_memory_usage' ) ) {
$t_page_memory_usage = sprintf( _( 'Memory usage: %1 KiB' ), number_format( memory_get_peak_usage() / 1024 ) );
$t_page_memory_usage = sprintf( _( 'Memory usage: %1$d KiB' ), number_format( memory_get_peak_usage() / 1024 ) );
echo "\t<p id=\"page-memory-usage\">$t_page_memory_usage</p>\n";
}

Expand Down
2 changes: 1 addition & 1 deletion core/print_api.php
Expand Up @@ -330,7 +330,7 @@ function print_reporter_option_list( $p_user_id, $p_project_id = null ) {
*/
function print_tag_attach_form( $p_bug_id, $p_string = '' ) {
?>
<small><?php echo sprintf( _( '(Separate by %1)' ), config_get( 'tag_separator' ) )?></small>
<small><?php echo sprintf( _( '(Separate by %s)' ), config_get( 'tag_separator' ) )?></small>
<form method="post" action="tag_attach.php">
<?php echo form_security_field( 'tag_attach' )?>
<input type="hidden" name="bug_id" value="<?php echo $p_bug_id?>" />
Expand Down
2 changes: 1 addition & 1 deletion roadmap_page.php
Expand Up @@ -344,7 +344,7 @@ function print_project_header_roadmap( $p_project_name ) {

if ( $t_issues_planned > 0 ) {
echo '<br />';
echo sprintf( _( '%1 of %2 issue(s) resolved. Progress (%3%%).' ), $t_issues_resolved, $t_issues_planned, $t_progress );
echo sprintf( _( '%1$d of %2$d issue(s) resolved. Progress (%3$d%%).' ), $t_issues_resolved, $t_issues_planned, $t_progress );
echo '<br /></tt>';
}
}
Expand Down
2 changes: 1 addition & 1 deletion tag_update_page.php
Expand Up @@ -70,7 +70,7 @@
throw new MantisBT\Exception\Access\AccessDenied();
}

html_page_top( sprintf( _( 'Update Tag: %1' ), $t_name ) );
html_page_top( sprintf( _( 'Update Tag: %s' ), $t_name ) );
?>
<div class="form-container">
<form method="post" action="tag_update.php">
Expand Down
4 changes: 2 additions & 2 deletions tag_view_page.php
Expand Up @@ -64,12 +64,12 @@
&& access_has_global_level( config_get( 'tag_edit_own_threshold' ) );


html_page_top( sprintf( _( 'Tag Details: %1' ), $t_name ) ); ?>
html_page_top( sprintf( _( 'Tag Details: %s' ), $t_name ) ); ?>

<div id="tag-view-div" class="form-container">
<h2><?php echo sprintf( _( 'Tag Details: %1' ), $t_name ) ?></h2>
<div class="section-link">
<?php print_bracket_link( 'search.php?tag_string='.urlencode($t_tag_row['name']), sprintf( _( 'Attached Issues (%1)' ), tag_stats_attached( $f_tag_id ) ) ); ?>
<?php print_bracket_link( 'search.php?tag_string='.urlencode($t_tag_row['name']), sprintf( _( 'Attached Issues (%s)' ), tag_stats_attached( $f_tag_id ) ) ); ?>
</div>
<div class="field-container">
<span class="display-label"><span><?php echo _( 'Tag ID' ) ?></span></span>
Expand Down

0 comments on commit e935cd7

Please sign in to comment.