Ticket #2069: num-i18n-cleanups.diff
| File num-i18n-cleanups.diff, 13.6 KB (added by , 20 years ago) |
|---|
-
inline-uploading.php
244 244 </div> 245 245 "; 246 246 $popups .= "<div id='popup{$ID}' class='popup'> 247 <div class='filetype'> File Type: ".str_replace('/',"/\n",$attachment['post_mime_type'])."</div>247 <div class='filetype'>".__('File Type:').' '.str_replace('/',"/\n",$attachment['post_mime_type'])."</div> 248 248 <a id=\"L{$ID}\" onclick=\"toggleOtherLink({$ID});return false;\" href=\"javascript:void()\">$__linked_to_file</a> 249 249 {$send_delete_cancel} 250 250 </div> -
update-links.php
3 3 require_once( ABSPATH . 'wp-includes/class-snoopy.php'); 4 4 5 5 if ( !get_option('use_linksupdate') ) 6 die( 'Feature disabled.');6 die(__('Feature disabled.')); 7 7 8 8 $link_uris = $wpdb->get_col("SELECT link_url FROM $wpdb->links"); 9 9 … … 41 41 $wpdb->query("UPDATE $wpdb->links SET link_updated = '$time' WHERE link_url = '$uri'"); 42 42 endforeach; 43 43 } 44 ?> 45 No newline at end of file 44 ?> -
users.php
95 95 foreach ($userids as $id) { 96 96 $user = new WP_User($id); 97 97 if ($id == $current_user->id) { 98 echo "<li>" . sprintf( 'ID #%1s: %2s <strong>The current user will not be deleted.</strong>', $id, $user->user_login) . "</li>\n";98 echo "<li>" . sprintf(__('ID #%1s: %2s <strong>The current user will not be deleted.</strong>'), $id, $user->user_login) . "</li>\n"; 99 99 } else { 100 echo "<li><input type=\"hidden\" name=\"users[]\" value=\"{$id}\" />" . sprintf( 'ID #%1s: %2s', $id, $user->user_login) . "</li>\n";100 echo "<li><input type=\"hidden\" name=\"users[]\" value=\"{$id}\" />" . sprintf(__('ID #%1s: %2s'), $id, $user->user_login) . "</li>\n"; 101 101 $go_delete = true; 102 102 } 103 103 } -
link-import.php
108 108 $query = "INSERT INTO $wpdb->links (link_url, link_name, link_target, link_category, link_description, link_owner, link_rss) 109 109 VALUES('{$urls[$i]}', '".$wpdb->escape($names[$i])."', '', $cat_id, '".$wpdb->escape($descriptions[$i])."', $user_ID, '{$feeds[$i]}')\n"; 110 110 $result = $wpdb->query($query); 111 echo sprintf(__("<p>Inserted <strong>%s</strong></p>"), $names[$i]);111 echo sprintf('<p>'.__('Inserted <strong>%s</strong>').'</p>', $names[$i]); 112 112 } 113 113 ?> 114 114 <p><?php printf(__('Inserted %1$d links into category %2$s. All done! Go <a href="%3$s">manage those links</a>.'), $link_count, $cat_id, 'link-manager.php') ?></p> -
admin-header.php
133 133 newcatSub.type = 'button'; 134 134 newcatSub.name = 'Button'; 135 135 newcatSub.id = 'catadd'; 136 newcatSub.value = '<?php _e('Add'); ?>';136 newcatSub.value = '<?php echo addslashes(__('Add')); ?>'; 137 137 newcatSub.onclick = ajaxNewCat; 138 138 139 139 ajaxcat.appendChild(newcat); … … 141 141 document.getElementById('jaxcat').appendChild(ajaxcat); 142 142 143 143 howto = document.createElement('span'); 144 howto.innerHTML = '<?php _e('Separate multiple categories with commas.'); ?>';144 howto.innerHTML = '<?php echo addslashes(__('Separate multiple categories with commas.')); ?>'; 145 145 howto.id = 'howto'; 146 146 ajaxcat.appendChild(howto); 147 147 } … … 160 160 161 161 function newCatLoading() { 162 162 var p = getResponseElement(); 163 p.innerHTML = ' Sending Data...';163 p.innerHTML = '<?php echo addslashes(__('Sending Data...')); ?>'; 164 164 } 165 165 166 166 function newCatLoaded() { 167 167 var p = getResponseElement(); 168 p.innerHTML = ' Data Sent...';168 p.innerHTML = '<?php echo addslashes(__('Data Sent...')); ?>'; 169 169 } 170 170 171 171 function newCatInteractive() { 172 172 var p = getResponseElement(); 173 p.innerHTML = ' Processing Request...';173 p.innerHTML = '<?php echo addslashes(__('Processing Request...')); ?>'; 174 174 } 175 175 176 176 function newCatCompletion() { … … 186 186 id = ids[i]; 187 187 // alert(id); 188 188 if ( id == '-1' ) { 189 p.innerHTML = " You don't have permission to do that.";189 p.innerHTML = "<?php echo addslashes(__("You don't have permission to do that.")); ?>"; 190 190 return; 191 191 } 192 192 if ( id == '0' ) { 193 p.innerHTML = " That category name is invalid. Try something else.";193 p.innerHTML = "<?php echo addslashes(__('That category name is invalid. Try something else.')); ?>"; 194 194 return; 195 195 } 196 196 -
link-categories.php
444 444 </div> 445 445 <div class="wrap"> 446 446 <h3><?php _e('Note:') ?></h3> 447 <?php printf(__('<p>Deleting a link category does not delete links from that category.<br />It will just set them back to the default category <b>%s</b>.'), get_linkcatname(1)) ?></p>447 <p><?php printf(__('Deleting a link category does not delete links from that category.<br />It will just set them back to the default category <strong>%s</strong>.'), get_linkcatname(1)) ?></p> 448 448 </div> 449 449 <?php 450 450 break; -
plugins.php
72 72 $plugins = get_plugins(); 73 73 74 74 if (empty($plugins)) { 75 _e("<p>Couldn't open plugins directory or there are no plugins available.</p>"); // TODO: make more helpful 75 echo '<p>'; 76 _e("Couldn't open plugins directory or there are no plugins available."); // TODO: make more helpful 77 echo '</p>'; 76 78 } else { 77 79 ?> 78 80 <table width="100%" cellpadding="3" cellspacing="3"> … … 100 102 <tr $style> 101 103 <td class='name'>{$plugin_data['Title']}</td> 102 104 <td class='vers'>{$plugin_data['Version']}</td> 103 <td class='desc'>{$plugin_data['Description']} <cite> By {$plugin_data['Author']}.</cite></td>105 <td class='desc'>{$plugin_data['Description']} <cite>".sprintf(__('By %s'), $plugin_data['Author']).".</cite></td> 104 106 <td class='togl'>$action</td> 105 107 </tr>"; 106 108 } -
theme-editor.php
48 48 case 'update': 49 49 50 50 if ( !current_user_can('edit_themes') ) 51 die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));51 die('<p>'.__('You have do not have sufficient permissions to edit templates for this blog.').'</p>'); 52 52 53 53 $newcontent = stripslashes($_POST['newcontent']); 54 54 $theme = urlencode($theme); … … 69 69 70 70 require_once('admin-header.php'); 71 71 if ( !current_user_can('edit_themes') ) 72 die(__('<p>You have do not have sufficient permissions to edit themes for this blog.</p>'));72 die('<p>'.__('You have do not have sufficient permissions to edit themes for this blog.').'</p>'); 73 73 74 74 update_recently_edited($file); 75 75 -
admin-functions.php
1754 1754 // Move the file to the uploads dir 1755 1755 $new_file = $uploads['path'] . "/$filename"; 1756 1756 if ( false === move_uploaded_file($file['tmp_name'], $new_file) ) 1757 die( 'The uploaded file could not be moved to $file.');1757 die(__('The uploaded file could not be moved to $file.')); 1758 1758 1759 1759 // Set correct file permissions 1760 1760 $stat = stat(dirname($new_file)); -
templates.php
37 37 case 'update': 38 38 39 39 if ( ! current_user_can('edit_files') ) 40 die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));40 die('<p>'.__('You have do not have sufficient permissions to edit templates for this blog.').'</p>'); 41 41 42 42 $newcontent = stripslashes($_POST['newcontent']); 43 43 if (is_writeable($real_file)) { … … 58 58 require_once('./admin-header.php'); 59 59 60 60 if ( ! current_user_can('edit_files') ) 61 die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));61 die('<p>'.__('You have do not have sufficient permissions to edit templates for this blog.').'</p>'); 62 62 63 63 if ( strstr( $file, 'wp-config.php' ) ) 64 die( __('<p>The config file cannot be edited or viewed through the web interface. Sorry!</p>'));64 die('<p>'.__('The config file cannot be edited or viewed through the web interface. Sorry!').'</p>'); 65 65 66 66 update_recently_edited($file); 67 67 … … 152 152 } 153 153 154 154 include("admin-footer.php"); 155 ?> 156 No newline at end of file 155 ?> -
moderation.php
32 32 case 'update': 33 33 34 34 if ( ! current_user_can('moderate_comments') ) 35 die(__('<p>Your level is not high enough to moderate comments.</p>'));35 die('<p>'.__('Your level is not high enough to moderate comments.').'</p>'); 36 36 37 37 $item_ignored = 0; 38 38 $item_deleted = 0; … … 84 84 $spam = (int) $_GET['spam']; 85 85 if ($approved) { 86 86 if ('1' == $approved) { 87 echo __("1 comment approved <br />") . "\n";87 echo __("1 comment approved") . " <br/>\n"; 88 88 } else { 89 89 echo sprintf(__("%s comments approved <br />"), $approved) . "\n"; 90 90 } 91 91 } 92 92 if ($deleted) { 93 93 if ('1' == $deleted) { 94 echo __("1 comment deleted <br />") . "\n";94 echo __("1 comment deleted") . " <br/>\n"; 95 95 } else { 96 echo sprintf(__("%s comments deleted <br />"), $deleted) . "\n";96 echo sprintf(__("%s comments deleted"), $deleted) . " <br/>\n"; 97 97 } 98 98 } 99 99 if ($spam) { 100 100 if ('1' == $spam) { 101 echo __("1 comment marked as spam <br />") . "\n";101 echo __("1 comment marked as spam") . " <br/>\n"; 102 102 } else { 103 echo sprintf(__("%s comments marked as spam <br />"), $spam) . "\n";103 echo sprintf(__("%s comments marked as spam"), $spam) . " <br/>\n"; 104 104 } 105 105 } 106 106 if ($ignored) { 107 107 if ('1' == $ignored) { 108 echo __("1 comment unchanged <br />") . "\n";108 echo __("1 comment unchanged") . " <br/>\n"; 109 109 } else { 110 echo sprintf(__("%s comments unchanged <br />"), $ignored) . "\n";110 echo sprintf(__("%s comments unchanged"), $ignored) . " <br/>\n"; 111 111 } 112 112 } 113 113 echo "</p></div>\n"; … … 206 206 <?php 207 207 } else { 208 208 // nothing to approve 209 echo __("<p>Currently there are no comments for you to moderate.</p>") . "\n";209 echo '<p>'.__("Currently there are no comments for you to moderate.") . "</p>\n"; 210 210 } 211 211 ?> 212 212 -
link-manager.php
291 291 echo " selected='selected'"; 292 292 echo ">".$row->cat_id.": ".wp_specialchars($row->cat_name); 293 293 if ($row->auto_toggle == 'Y') 294 echo ' (auto toggle)';294 echo ' '.__('(auto toggle)'); 295 295 echo "</option>\n"; 296 296 } 297 297 echo " </select>\n"; -
index.php
129 129 $rss = @fetch_rss('http://wordpress.org/development/feed/'); 130 130 if ( isset($rss->items) && 0 != count($rss->items) ) { 131 131 ?> 132 <h3> WordPress Development Blog</h3>132 <h3><?php _e('WordPress Development Blog'); ?></h3> 133 133 <?php 134 134 $rss->items = array_slice($rss->items, 0, 3); 135 135 foreach ($rss->items as $item ) { … … 169 169 170 170 <?php 171 171 require('./admin-footer.php'); 172 ?> 173 No newline at end of file 172 ?> -
link-parse-opml.php
55 55 xml_set_element_handler($xml_parser, "startElement", "endElement"); 56 56 57 57 if (!xml_parse($xml_parser, $opml, true)) { 58 echo(sprintf( "XML error: %s at line %d",58 echo(sprintf(__('XML error: %1$s at line %2$s'), 59 59 xml_error_string(xml_get_error_code($xml_parser)), 60 60 xml_get_current_line_number($xml_parser))); 61 61 } 62 62 63 63 // Free up memory used by the XML parser 64 64 xml_parser_free($xml_parser); 65 ?> 66 No newline at end of file 65 ?> -
execute-pings.php
2 2 require_once('admin.php'); 3 3 4 4 if ( ! current_user_can('edit_posts') ) 5 die ( "Cheatin' uh?");5 die (__("Cheatin' uh?")); 6 6 7 7 echo '/* No Styles Here */'; 8 8 register_shutdown_function('execute_all_pings'); -
plugin-editor.php
35 35 case 'update': 36 36 37 37 if ( !current_user_can('edit_plugins') ) 38 die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));38 die('<p>'.__('You have do not have sufficient permissions to edit templates for this blog.').'</p>'); 39 39 40 40 $newcontent = stripslashes($_POST['newcontent']); 41 41 if (is_writeable($real_file)) { … … 55 55 56 56 require_once('admin-header.php'); 57 57 if ( !current_user_can('edit_plugins') ) 58 die(__('<p>You have do not have sufficient permissions to edit plugins for this blog.</p>'));58 die('<p>'.__('You have do not have sufficient permissions to edit plugins for this blog.').'</p>'); 59 59 60 60 update_recently_edited("wp-content/plugins/$file"); 61 61