- Timestamp:
- 07/07/2014 06:27:12 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/translations/lib.php
r712 r738 60 60 $locale = GP_Locales::by_field( 'wp_locale', $translation->language ); 61 61 62 $isos = array(); 62 63 // We'll use ISO codes for sorting. 64 if ( $locale->lang_code_iso_639_1 ) { 65 $iso = $isos[1] = $locale->lang_code_iso_639_1; 66 } 67 if ( $locale->lang_code_iso_639_2 ) { 68 $iso = $isos[2] = $locale->lang_code_iso_639_2; 69 } 63 70 if ( $locale->lang_code_iso_639_3 ) { 64 $iso = $locale->lang_code_iso_639_3; 65 } elseif ( $locale->lang_code_iso_639_2 ) { 66 $iso = $locale->lang_code_iso_639_2; 67 } elseif ( $locale->lang_code_iso_639_1 ) { 68 $iso = $locale->lang_code_iso_639_1; 69 } else { 70 continue; // uhhh 71 $iso = $isos[3] = $locale->lang_code_iso_639_3; 72 } 73 74 if ( array() === $isos ) { 75 continue; // uhhhh 71 76 } 72 77 … … 75 80 $_translations[ $iso ]->native_name = $locale->native_name; 76 81 $_translations[ $iso ]->package = sprintf( "$base_url/%s/%s.zip", $translation->version, $translation->language ); 82 $_translations[ $iso ]->iso = (object) $isos; 77 83 } 78 84 ksort( $_translations );
Note: See TracChangeset
for help on using the changeset viewer.