Ticket #3224: i18n-upload-js.diff
File i18n-upload-js.diff, 8.9 KB (added by , 18 years ago) |
---|
-
wp-admin/upload-js.php
72 72 var params = $H(this.params); 73 73 params.ID = ''; 74 74 params.action = ''; 75 h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title=' Browse your files' class='back'>« Back</a>";75 h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='<?php echo addslashes(__('Browse your files')); ?>' class='back'>« <?php echo addslashes(__('Back')); ?></a>"; 76 76 } else { 77 h += "<a href='#' onclick='theFileList.cancelView()' title=' Browse your files' class='back'>« Back</a>";77 h += "<a href='#' onclick='theFileList.cancelView()' title='<?php echo addslashes(__('Browse your files')); ?>' class='back'>« <?php echo addslashes(__('Back')); ?></a>"; 78 78 } 79 79 h += "<div id='file-title'>" 80 80 if ( !this.currentImage.isImage ) 81 h += "<h2><a href='" + this.currentImage.src + "' onclick='return false;' title=' Direct link to file'>" + this.currentImage.title + "</a></h2>";81 h += "<h2><a href='" + this.currentImage.src + "' onclick='return false;' title='<?php echo addslashes(__('Direct link to file')); ?>'>" + this.currentImage.title + "</a></h2>"; 82 82 else 83 83 h += "<h2>" + this.currentImage.title + "</h2>"; 84 84 h += " — <span>"; 85 h += "<a href='#' onclick='theFileList.editView(" + id + ")'> Edit</a>"85 h += "<a href='#' onclick='theFileList.editView(" + id + ")'><?php echo addslashes(__('Edit')); ?></a>" 86 86 h += "</span>"; 87 87 h += '</div>' 88 88 h += "<div id='upload-file-view' class='alignleft'>"; 89 89 if ( this.currentImage.isImage ) { 90 h += "<a href='" + this.currentImage.src + "' onclick='return false;' title=' Direct link to file'>";90 h += "<a href='" + this.currentImage.src + "' onclick='return false;' title='<?php echo addslashes(__('Direct link to file')); ?>'>"; 91 91 h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />"; 92 92 h += "</a>"; 93 93 } else … … 97 97 h += "<form name='uploadoptions' id='uploadoptions' class='alignleft'>"; 98 98 h += "<table>"; 99 99 if ( this.currentImage.thumb ) { 100 h += "<tr><th style='padding-bottom:.5em'> Show:</th><td style='padding-bottom:.5em'>";101 h += "<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' checked='checked' /> Thumbnail</label><br />";102 h += "<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> Full size</label>";100 h += "<tr><th style='padding-bottom:.5em'><?php echo addslashes(__('Show:')); ?></th><td style='padding-bottom:.5em'>"; 101 h += "<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' checked='checked' /> <?php echo addslashes(__('Thumbnail')); ?></label><br />"; 102 h += "<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> <?php echo addslashes(__('Full size')); ?></label>"; 103 103 h += "</td></tr>"; 104 104 } 105 105 106 h += "<tr><th> Link to:</th><td>";107 h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> File</label><br />";108 h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> Page</label><br />";109 h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> None</label>";106 h += "<tr><th><?php echo addslashes(__('Link to:')); ?></th><td>"; 107 h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> <?php echo addslashes(__('File')); ?></label><br />"; 108 h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> <?php echo addslashes(__('Page')); ?></label><br />"; 109 h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> <?php echo addslashes(__('None')); ?></label>"; 110 110 h += "</td></tr>"; 111 111 112 112 h += "<tr><td colspan='2'><p class='submit'>"; 113 h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value=' Send to editor»' />";113 h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='<?php echo addslashes(__('Send to editor')); ?> »' />"; 114 114 h += "</p></td></tr></table>"; 115 115 h += "</form>"; 116 116 … … 134 134 var params = $H(this.params); 135 135 params.ID = ''; 136 136 params.action = ''; 137 h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title=' Browse your files' class='back'>« Back</a>";137 h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='<?php echo addslashes(__('Browse your files')); ?>' class='back'>« <?php echo addslashes(__('Back')); ?></a>"; 138 138 } else { 139 h += "<a href='#' onclick='theFileList.cancelView()' title=' Browse your files' class='back'>« Back</a>";139 h += "<a href='#' onclick='theFileList.cancelView()' title='<?php echo addslashes(__('Browse your files')); ?>' class='back'>« <?php echo addslashes(__('Back')); ?></a>"; 140 140 } 141 141 h += "<div id='file-title'>" 142 142 if ( !this.currentImage.isImage ) 143 h += "<h2><a href='" + this.currentImage.src + "' onclick='return false;' title=' Direct link to file'>" + this.currentImage.title + "</a></h2>";143 h += "<h2><a href='" + this.currentImage.src + "' onclick='return false;' title='<?php echo addslashes(__('Direct link to file')); ?>'>" + this.currentImage.title + "</a></h2>"; 144 144 else 145 145 h += "<h2>" + this.currentImage.title + "</h2>"; 146 146 h += " — <span>"; … … 149 149 h += '</div>' 150 150 h += "<div id='upload-file-view' class='alignleft'>"; 151 151 if ( this.currentImage.isImage ) { 152 h += "<a href='" + this.currentImage.src + "' onclick='return false;' title=' Direct link to file'>";152 h += "<a href='" + this.currentImage.src + "' onclick='return false;' title='<?php echo addslashes(__('Direct link to file')); ?>'>"; 153 153 h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />"; 154 154 h += "</a>"; 155 155 } else … … 158 158 159 159 160 160 h += "<table><col /><col class='widefat' /><tr>" 161 h += "<th scope='row'><label for='url'> URL</label></th>";161 h += "<th scope='row'><label for='url'><?php echo addslashes(__('URL')); ?></label></th>"; 162 162 h += "<td><input type='text' id='url' class='readonly' value='" + this.currentImage.src + "' readonly='readonly' /></td>"; 163 163 h += "</tr><tr>"; 164 h += "<th scope='row'><label for='post_title'> Title</label></th>";164 h += "<th scope='row'><label for='post_title'><?php echo addslashes(__('Title')); ?></label></th>"; 165 165 h += "<td><input type='text' id='post_title' name='post_title' value='" + this.currentImage.title + "' /></td>"; 166 166 h += "</tr><tr>"; 167 h += "<th scope='row'><label for='post_content'> Description</label></th>";167 h += "<th scope='row'><label for='post_content'><?php echo addslashes(__('Description')); ?></label></th>"; 168 168 h += "<td><textarea name='post_content' id='post_content'>" + this.currentImage.description + "</textarea></td>"; 169 h += "</tr><tr id='buttons' class='submit'><td colspan='2'><input type='button' id='delete' name='delete' class='delete alignleft' value=' Delete File' onclick='theFileList.deleteFile(" + id + ");' />";169 h += "</tr><tr id='buttons' class='submit'><td colspan='2'><input type='button' id='delete' name='delete' class='delete alignleft' value='<?php echo addslashes(__('Delete File')); ?>' onclick='theFileList.deleteFile(" + id + ");' />"; 170 170 h += "<input type='hidden' name='from_tab' value='" + this.tab + "' />"; 171 171 h += "<input type='hidden' name='action' id='action-value' value='save' />"; 172 172 h += "<input type='hidden' name='ID' value='" + id + "' />"; 173 173 h += "<input type='hidden' name='_wpnonce' value='" + this.nonce + "' />"; 174 h += "<div class='submit'><input type='submit' value=' Save»' /></div>";174 h += "<div class='submit'><input type='submit' value='<?php echo addslashes(__('Save')); ?> »' /></div>"; 175 175 h += "</td></tr></table></form>"; 176 176 177 177 new Insertion.Top('upload-content', h); … … 243 243 }, 244 244 245 245 deleteFile: function(id) { 246 if ( confirm(" Are you sure you want to delete the file '" + this.currentImage.title + "'?\nClick ok to delete or cancel to go back.")) {246 if ( confirm("<?php printf(addslashes(__("Are you sure you want to delete the file %s?\nClick ok to delete or cancel to go back.")), '" + this.currentImage.title + "'); ?>") { 247 247 $('action-value').value = 'delete'; 248 248 $('upload-file').submit(); 249 249 return true;