Changeset 778
- Timestamp:
- 08/04/2014 08:13:24 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/translations/lib.php
r738 r778 57 57 58 58 $_translations = array(); 59 if ( 'core' === $type ) { 60 $continue_translations = wp_cache_get( 'continue-strings', $cache_group ); 61 if ( ! $continue_translations ) { 62 // Magic numbers: 78 is wp/dev/admin. 326 is 'Continue'. 63 $continue_translations = $wpdb->get_results( 64 "SELECT locale as gp_locale, translation_0 as translation 65 FROM translate_translation_sets ts 66 INNER JOIN translate_translations t 67 ON ts.id = t.translation_set_id 68 WHERE project_id = 78 69 AND slug = 'default' 70 AND original_id = 326", OBJECT_K 71 ); 72 wp_cache_add( 'continue-strings', $continue_translations, $cache_group, $cache_time ); 73 } 74 } 75 59 76 foreach ( $translations as $translation ) { 60 77 $locale = GP_Locales::by_field( 'wp_locale', $translation->language ); … … 81 98 $_translations[ $iso ]->package = sprintf( "$base_url/%s/%s.zip", $translation->version, $translation->language ); 82 99 $_translations[ $iso ]->iso = (object) $isos; 100 101 if ( 'core' === $type ) { 102 $continue = isset( $continue_translations[ $locale->slug ] ) ? $continue_translations[ $locale->slug ]->translation : ''; 103 $_translations[ $iso ]->strings = (object) array( 'continue' => $continue ); 104 } 83 105 } 84 106 ksort( $_translations );
Note: See TracChangeset
for help on using the changeset viewer.