Skip to content

Commit

Permalink
fix sprintf format strings
Browse files Browse the repository at this point in the history
  • Loading branch information
mantis committed Sep 28, 2013
1 parent e935cd7 commit ed6c90b
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion bug_revision_view_page.php
Expand Up @@ -135,7 +135,7 @@ function show_revision( $p_revision ) {
$t_label = '';
}

$t_by_string = sprintf( _( '%1 by %2' ), string_display_line( date( config_get( 'normal_date_format' ), $p_revision['timestamp'] ) ), string_display_line( user_get_name( $p_revision['user_id'] ) ) );
$t_by_string = sprintf( _( '%1$s by %2$s' ), string_display_line( date( config_get( 'normal_date_format' ), $p_revision['timestamp'] ) ), string_display_line( user_get_name( $p_revision['user_id'] ) ) );

?>
<tr class="spacer"><td><a id="revision-<?php echo $p_revision['id'] ?>"></a></td></tr>
Expand Down
3 changes: 1 addition & 2 deletions bug_sponsorship_list_view_inc.php
Expand Up @@ -173,8 +173,7 @@

if ( $t_total_sponsorship > 0 ) {
echo ' <span style="font-weight: normal;">(';
echo sprintf( _( 'Total Sponsorship = %1' ),
sponsorship_format_amount( $t_total_sponsorship ) );
echo sprintf( _( 'Total Sponsorship = %s' ), sponsorship_format_amount( $t_total_sponsorship ) );
echo ')</span>';
}
?>
Expand Down
2 changes: 1 addition & 1 deletion bugnote_view_inc.php
Expand Up @@ -265,7 +265,7 @@
<?php

if ( $t_total_time > 0 && access_has_bug_level( config_get( 'time_tracking_view_threshold' ), $t_bug ) ) {
echo '<p class="time-tracking-total">', sprintf ( _( 'Total time for issue = %1' ), '<span class="time-tracked">' . db_minutes_to_hhmm( $t_total_time ) . '</span>' ), '</p>';
echo '<p class="time-tracking-total">', sprintf ( _( 'Total time for issue = %s' ), '<span class="time-tracked">' . db_minutes_to_hhmm( $t_total_time ) . '</span>' ), '</p>';
}
collapse_closed( 'bugnotes' );
?>
Expand Down
2 changes: 1 addition & 1 deletion core/print_api.php
Expand Up @@ -1661,7 +1661,7 @@ function print_bug_attachment_header( $p_attachment ) {
echo '</a>';
}
echo _( '&#32;' ) . '(' . number_format( $p_attachment['size'] ) . _( '&#32;' ) . _( 'bytes' ) . ')';
echo _( '&#32;' ) . '<span class="italic">' . date( config_get( 'normal_date_format' ), $p_attachment['date_added'] ) . ', ' . sprintf( _( 'Downloaded %1 time(s)' ), $p_attachment['downloaded'] ) . '</span>';
echo _( '&#32;' ) . '<span class="italic">' . date( config_get( 'normal_date_format' ), $p_attachment['date_added'] ) . ', ' . sprintf( _( 'Downloaded %s time(s)' ), $p_attachment['downloaded'] ) . '</span>';
if ( $p_attachment['can_delete'] ) {
echo _( '&#32;' ) . '[';
print_link( 'bug_file_delete.php?file_id=' . $p_attachment['id'] . form_security_param( 'bug_file_delete' ), _( 'Delete' ), false, 'small' );
Expand Down
2 changes: 1 addition & 1 deletion manage/config_workflow_page.php
Expand Up @@ -438,7 +438,7 @@ function access_row() {
if ( ALL_PROJECTS == $t_project ) {
$t_project_title = _( 'Note: These configurations affect all projects, unless overridden at the project level.' );
} else {
$t_project_title = sprintf( _( 'Note: These configurations affect only the %1 project.' ) , string_display( project_get_name( $t_project ) ) );
$t_project_title = sprintf( _( 'Note: These configurations affect only the %s project.' ) , string_display( project_get_name( $t_project ) ) );
}
echo '<p class="bold">' . $t_project_title . '</p>' . "\n";
echo '<p>' . _( 'In the table below, the following color code applies:' ) . '<br />';
Expand Down
2 changes: 1 addition & 1 deletion manage/config_workflow_set.php
Expand Up @@ -91,7 +91,7 @@
$t_first = false;
} else {
# error default state isn't in the matrix
echo '<p>' . sprintf( _( 'The default status of %1 is not selected in the next statuses for %2. It will be ignored.' ), get_enum_element( 'status', $t_default ), get_enum_element( 'status', $t_state ) ) . '</p>';
echo '<p>' . sprintf( _( 'The default status of %1$s is not selected in the next statuses for %2$s. It will be ignored.' ), get_enum_element( 'status', $t_default ), get_enum_element( 'status', $t_state ) ) . '</p>';
$t_first = true;
}
if ( isset( $t_matrix[$t_state] ) ) {
Expand Down
4 changes: 2 additions & 2 deletions manage/plugin_page.php
Expand Up @@ -139,10 +139,10 @@ function plugin_sort( $p_plugin1, $p_plugin2 ) {
$t_author = implode( $t_author, ', ' );
}
if ( !is_blank( $t_contact ) ) {
$t_author = '<br/>' . sprintf( _( 'Author: %1' ),
$t_author = '<br/>' . sprintf( _( 'Author: %s' ),
'<a href="mailto:' . string_attribute( $t_contact ) . '">' . string_display_line( $t_author ) . '</a>' );
} else {
$t_author = '<br/>' . string_display_line( sprintf( _( 'Author: %1' ), $t_author ) );
$t_author = '<br/>' . string_display_line( sprintf( _( 'Author: %s' ), $t_author ) );
}
}

Expand Down
2 changes: 1 addition & 1 deletion manage/proj_cat_delete.php
Expand Up @@ -69,7 +69,7 @@
$t_bug_count = db_result( db_query( $t_query, array( $f_category_id ) ) );

# Confirm with the user
helper_ensure_confirmed( sprintf( _('Are you sure you want to delete this category? Category %1 contains %2 issues.'), string_display_line( $t_name ), $t_bug_count ),
helper_ensure_confirmed( sprintf( _('Are you sure you want to delete this category? Category %1$s contains %2$s issues.'), string_display_line( $t_name ), $t_bug_count ),
_( 'Delete Category' ) );

category_remove( $f_category_id );
Expand Down
2 changes: 1 addition & 1 deletion manage/tags_page.php
Expand Up @@ -170,7 +170,7 @@
<div class="field-container">
<label for="tag-name" class="required"><span><?php echo _( 'Name' ) ?></span></label>
<span class="input"><input type="text" id="tag-name" name="name" size="40" maxlength="100" />
<span><?php echo sprintf( _( '(Separate by %1)' ), config_get( 'tag_separator' ) ); ?></span>
<span><?php echo sprintf( _( '(Separate by %s)' ), config_get( 'tag_separator' ) ); ?></span>
</span>
<span class="label-style"></span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion tag_update_page.php
Expand Up @@ -75,7 +75,7 @@
<div class="form-container">
<form method="post" action="tag_update.php">
<fieldset>
<legend><span><?php echo sprintf( _( 'Update Tag: %1' ), $t_name ) ?></span></legend>
<legend><span><?php echo sprintf( _( 'Update Tag: %s' ), $t_name ) ?></span></legend>
<div class="section-link"><?php print_bracket_link( 'tag_view_page.php?tag_id='.$f_tag_id, _( 'Back to Tag' ) ); ?></div>
<input type="hidden" name="tag_id" value="<?php echo $f_tag_id ?>"/>
<?php echo form_security_field( 'tag_update' ) ?>
Expand Down
2 changes: 1 addition & 1 deletion tag_view_page.php
Expand Up @@ -67,7 +67,7 @@
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>
<h2><?php echo sprintf( _( 'Tag Details: %s' ), $t_name ) ?></h2>
<div class="section-link">
<?php print_bracket_link( 'search.php?tag_string='.urlencode($t_tag_row['name']), sprintf( _( 'Attached Issues (%s)' ), tag_stats_attached( $f_tag_id ) ) ); ?>
</div>
Expand Down

0 comments on commit ed6c90b

Please sign in to comment.