Ticket #9794: 9794.7.diff
File 9794.7.diff, 2.8 KB (added by , 15 years ago) |
---|
-
wp-includes/functions.php
3114 3114 if ( ! $mo_loaded ) { 3115 3115 $locale = get_locale(); 3116 3116 $mofile = WP_LANG_DIR . "/continents-cities-$locale.mo"; 3117 load_textdomain(' default', $mofile);3117 load_textdomain('continents-cities', $mofile); 3118 3118 $mo_loaded = true; 3119 3119 } 3120 3120 … … 3133 3133 3134 3134 usort($zonen, create_function( 3135 3135 '$a, $b', ' 3136 $a_continent = translate($a["continent"] );3137 $b_continent = translate($b["continent"] );3138 $a_city = translate($a["city"] );3139 $b_city = translate($b["city"] );3140 $a_subcity = translate($a["subcity"] );3141 $b_subcity = translate($b["subcity"] );3136 $a_continent = translate($a["continent"], "continents-cities"); 3137 $b_continent = translate($b["continent"], "continents-cities"); 3138 $a_city = translate($a["city"], "continents-cities"); 3139 $b_city = translate($b["city"], "continents-cities"); 3140 $a_subcity = translate($a["subcity"], "continents-cities"); 3141 $b_subcity = translate($b["subcity"], "continents-cities"); 3142 3142 if ( $a_continent == $b_continent && $a_city == $b_city ) 3143 3143 return strnatcasecmp($a_subcity, $b_subcity); 3144 3144 elseif ( $a_continent == $b_continent ) … … 3156 3156 extract($zone); 3157 3157 if ( empty($selectcontinent) && !empty($city) ) { 3158 3158 $selectcontinent = $continent; 3159 $structure .= '<optgroup label="'. esc_attr( translate( $continent ) ) .'">' . "\n"; // continent3159 $structure .= '<optgroup label="'. esc_attr( translate( $continent, "continents-cities" ) ) .'">' . "\n"; // continent 3160 3160 } elseif ( !empty($selectcontinent) && $selectcontinent != $continent ) { 3161 3161 $structure .= "</optgroup>\n"; 3162 3162 $selectcontinent = ''; … … 3168 3168 3169 3169 if ( !empty($city) ) { 3170 3170 $display = str_replace('_',' ',$city); 3171 $display = translate($display );3171 $display = translate($display, "continents-cities"); 3172 3172 if ( !empty($subcity) ) { 3173 3173 $display_subcity = str_replace('_', ' ', $subcity); 3174 $display_subcity = translate($display_subcity );3174 $display_subcity = translate($display_subcity, "continents-cities"); 3175 3175 $city = $city . '/'. $subcity; 3176 3176 $display = $display . '/' . $display_subcity; 3177 3177 } … … 3179 3179 $display = strtr($display, '+-', '-+'); 3180 3180 $structure .= "\t<option ".((($continent.'/'.$city)==$selectedzone)?'selected="selected"':'')." value=\"".($continent.'/'.$city)."\">$pad".$display."</option>\n"; //Timezone 3181 3181 } else { 3182 $structure .= "<option ".(($continent==$selectedzone)?'selected="selected"':'')." value=\"".$continent."\">" . translate($continent ) . "</option>\n"; //Timezone3182 $structure .= "<option ".(($continent==$selectedzone)?'selected="selected"':'')." value=\"".$continent."\">" . translate($continent, "continents-cities") . "</option>\n"; //Timezone 3183 3183 } 3184 3184 } 3185 3185