Fix presets, config post types and Japanese translations

This commit is contained in:
Brian Miyaji
2014-01-05 20:37:08 +11:00
parent c370e352a4
commit f49ec03546
34 changed files with 1507 additions and 1914 deletions

View File

@@ -13,57 +13,26 @@
<thead>
<tr>
<th><?php _e( 'Label', 'sportspress' ); ?></th>
<th><?php _e( 'Key', 'sportspress' ); ?></th>
<th><?php _e( 'Format', 'sportspress' ); ?></th>
<th><?php _e( 'Precision', 'sportspress' ); ?></th>
<th><?php _e( 'Equation', 'sportspress' ); ?></th>
<th><?php _e( 'Sort Order', 'sportspress' ); ?></th>
<th><?php _e( 'Abbreviation', 'sportspress' ); ?></th>
</tr>
</thead>
<?php $i = 0; foreach ( $data as $row ): ?>
<tr>
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
<td class="row-title"><?php echo $row->post_title; ?></td>
<td>
<?php
$equation = get_post_meta ( $row->ID, 'sp_equation', true );
if ( $equation ):
echo str_replace(
array( '$', '+', '-', '*', '/' ),
array( '', '&plus;', '&minus;', '&times;', '&divide' ),
$equation
);
else:
echo '—';
endif;
?>
</td>
<td>
<?php
$priority = get_post_meta ( $row->ID, 'sp_priority', true );
if ( $priority ):
echo $priority . ' ' . str_replace(
array( 'DESC', 'ASC' ),
array( '&darr;', '&uarr;' ),
get_post_meta ( $row->ID, 'sp_order', true )
);
else:
echo '—';
endif;
?>
</td>
<td>
<?php
$abbreviation = get_post_meta ( $row->ID, 'sp_abbreviation', true );
if ( $abbreviation ):
echo $abbreviation;
else:
echo $row->post_title;
endif;
?>
</td>
<td><?php echo $row->post_name; ?></td>
<td><?php echo sp_get_post_format( $row->ID ); ?></td>
<td><?php echo sp_get_post_precision( $row->ID ); ?></td>
<td><?php echo sp_get_post_equation( $row->ID ); ?></td>
<td><?php echo sp_get_post_order( $row->ID ); ?></td>
</tr>
<?php $i++; endforeach; ?>
<tfoot>
<tr>
<th colspan="4"><a href="<?php echo admin_url( 'edit.php?post_type=sp_column' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Table Columns', 'sportspress' ) ); ?></a></th>
<th colspan="7"><a href="<?php echo admin_url( 'edit.php?post_type=sp_column' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Table Columns', 'sportspress' ) ); ?></a></th>
</tr>
</tfoot>
</table>
@@ -83,57 +52,26 @@
<thead>
<tr>
<th><?php _e( 'Label', 'sportspress' ); ?></th>
<th><?php _e( 'Key', 'sportspress' ); ?></th>
<th><?php _e( 'Format', 'sportspress' ); ?></th>
<th><?php _e( 'Precision', 'sportspress' ); ?></th>
<th><?php _e( 'Equation', 'sportspress' ); ?></th>
<th><?php _e( 'Sort Order', 'sportspress' ); ?></th>
<th><?php _e( 'Abbreviation', 'sportspress' ); ?></th>
</tr>
</thead>
<?php $i = 0; foreach ( $data as $row ): ?>
<tr>
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
<td class="row-title"><?php echo $row->post_title; ?></td>
<td>
<?php
$equation = get_post_meta ( $row->ID, 'sp_equation', true );
if ( $equation ):
echo str_replace(
array( '$', '+', '-', '*', '/' ),
array( '', '&plus;', '&minus;', '&times;', '&divide' ),
$equation
);
else:
echo '—';
endif;
?>
</td>
<td>
<?php
$priority = get_post_meta ( $row->ID, 'sp_priority', true );
if ( $priority ):
echo $priority . ' ' . str_replace(
array( 'DESC', 'ASC' ),
array( '&darr;', '&uarr;' ),
get_post_meta ( $row->ID, 'sp_order', true )
);
else:
echo '—';
endif;
?>
</td>
<td>
<?php
$abbreviation = get_post_meta ( $row->ID, 'sp_abbreviation', true );
if ( $abbreviation ):
echo $abbreviation;
else:
echo $row->post_title;
endif;
?>
</td>
<td><?php echo $row->post_name; ?></td>
<td><?php echo sp_get_post_format( $row->ID ); ?></td>
<td><?php echo sp_get_post_precision( $row->ID ); ?></td>
<td><?php echo sp_get_post_equation( $row->ID ); ?></td>
<td><?php echo sp_get_post_order( $row->ID ); ?></td>
</tr>
<?php $i++; endforeach; ?>
<tfoot>
<tr>
<th colspan="4"><a href="<?php echo admin_url( 'edit.php?post_type=sp_statistic' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Statistics', 'sportspress' ) ); ?></a></th>
<th colspan="7"><a href="<?php echo admin_url( 'edit.php?post_type=sp_statistic' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Statistics', 'sportspress' ) ); ?></a></th>
</tr>
</tfoot>
</table>
@@ -154,28 +92,19 @@
<tr>
<th><?php _e( 'Label', 'sportspress' ); ?></th>
<th><?php _e( 'Key', 'sportspress' ); ?></th>
<th><?php _e( 'Abbreviation', 'sportspress' ); ?></th>
<th><?php _e( 'Format', 'sportspress' ); ?></th>
</tr>
</thead>
<?php $i = 0; foreach ( $data as $row ): ?>
<tr<?php if ( $i % 2 ) echo ' class="alternate"'; ?>>
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
<td class="row-title"><?php echo $row->post_title; ?></td>
<td><?php echo $row->post_name; ?></td>
<td>
<?php
$abbreviation = get_post_meta ( $row->ID, 'sp_abbreviation', true );
if ( $abbreviation ):
echo $abbreviation;
else:
echo $row->post_title;
endif;
?>
</td>
<td><?php echo sp_get_post_format( $row->ID ); ?></td>
</tr>
<?php $i++; endforeach; ?>
<tfoot>
<tr>
<th colspan="3"><a href="<?php echo admin_url( 'edit.php?post_type=sp_result' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Results', 'sportspress' ) ); ?></a></th>
<th colspan="4"><a href="<?php echo admin_url( 'edit.php?post_type=sp_result' ); ?>"><?php printf( __( 'Edit %s', 'sportspress' ), __( 'Results', 'sportspress' ) ); ?></a></th>
</tr>
</tfoot>
</table>
@@ -196,23 +125,12 @@
<tr>
<th><?php _e( 'Label', 'sportspress' ); ?></th>
<th><?php _e( 'Key', 'sportspress' ); ?></th>
<th><?php _e( 'Abbreviation', 'sportspress' ); ?></th>
</tr>
</thead>
<?php $i = 0; foreach ( $data as $row ): ?>
<tr<?php if ( $i % 2 ) echo ' class="alternate"'; ?>>
<tr<?php if ( $i % 2 == 0 ) echo ' class="alternate"'; ?>>
<td class="row-title"><?php echo $row->post_title; ?></td>
<td><?php echo $row->post_name; ?></td>
<td>
<?php
$abbreviation = get_post_meta ( $row->ID, 'sp_abbreviation', true );
if ( $abbreviation ):
echo $abbreviation;
else:
echo $row->post_title;
endif;
?>
</td>
</tr>
<?php $i++; endforeach; ?>
<tfoot>