Changeset 1139
- Timestamp:
- 01/14/2015 12:20:37 PM (10 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/views/all-locales.php
r1061 r1139 62 62 <td class="right no-right-border"> 63 63 <a href="https://translate.wordpress.org/languages/<?php echo $locale->slug; ?>"> 64 <?php echo ! empty( $percentages[ $locale->wp_locale ]) ? $percentages[ $locale->wp_locale ] . '%' : '—'; ?>64 <?php echo ( isset( $percentages[ $locale->wp_locale ] ) ) ? $percentages[ $locale->wp_locale ] . '%' : '—'; ?> 65 65 </a> 66 66 </td> … … 79 79 </table> 80 80 </div> <!-- /.translators-info --> 81 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/wp-i18n-teams.php
r1068 r1139 174 174 } 175 175 foreach ( $counts as $locale => $count ) { 176 $percentages[ $locale ] = floor( $count['current'] / $count['total'] * 100 );176 $percentages[ $locale ] = ( $count['total'] > 0 ) ? floor( $count['current'] / $count['total'] * 100 ) : 0; 177 177 } 178 178 set_transient( 'core_translation_data', $percentages, 900 );
Note: See TracChangeset
for help on using the changeset viewer.