Ticket #1121: 1121.patch
File 1121.patch, 2.0 KB (added by , 10 years ago) |
---|
-
trunk/api.wordpress.org/public_html/translations/lib.php
51 51 } 52 52 53 53 require_once WPORGPATH . 'translate/glotpress/locales/locales.php'; 54 // Add some language variants to locales until GlotPress supports them. 55 $GLOBALS['gp_locales'] = new GP_Locales; 56 $de_formal = clone GP_Locales::by_field( 'wp_locale', 'de_DE' ); 57 $de_formal->english_name = 'German (Formal)'; 58 $de_formal->native_name = 'Deutsch (Sie)'; 59 $de_formal->slug = 'de/formal'; 60 $de_formal->wp_locale = 'de_DE_formal'; 61 $GLOBALS['gp_locales']->locales['de/formal'] = $de_formal; 62 63 $pt_informal = clone GP_Locales::by_field( 'wp_locale', 'pt_PT' ); 64 $pt_informal->english_name = 'Portuguese (Portugal/Informal)'; 65 $pt_informal->native_name = 'Português (informal)'; 66 $pt_informal->slug = 'pt/informal'; 67 $pt_informal->wp_locale = 'pt_PT_informal'; 68 $GLOBALS['gp_locales']->locales['pt/formal'] = $pt_informal; 69 54 70 $base_url = is_ssl() ? 'https' : 'http'; 55 71 $base_url .= '://downloads.wordpress.org/translation/'; 56 72 $base_url .= ( $type == 'core' ) ? 'core' : "$type/$domain"; … … 61 77 if ( ! $continue_translations ) { 62 78 // Magic numbers: 78 is wp/dev/admin. 326 is 'Continue'. 63 79 $continue_translations = $wpdb->get_results( 64 "SELECT locale as gp_locale, translation_0 as translation 80 "SELECT 81 IF(ts.slug <> 'default', CONCAT(ts.locale, '/', ts.slug), ts.locale) as gp_locale, 82 translation_0 as translation 65 83 FROM translate_translation_sets ts 66 84 INNER JOIN translate_translations t 67 85 ON ts.id = t.translation_set_id 68 86 WHERE project_id = 78 69 AND slug = 'default'70 87 AND original_id = 326", OBJECT_K 71 88 ); 72 89 wp_cache_add( 'continue-strings', $continue_translations, $cache_group, $cache_time ); … … 246 263 247 264 return $translations; 248 265 } 249