Changeset 1203565
- Timestamp:
- 07/21/2015 10:49:28 PM (11 years ago)
- Location:
- lingotek-translation
- Files:
-
- 85 added
- 8 edited
-
tags/1.0.3 (added)
-
tags/1.0.3/admin (added)
-
tags/1.0.3/admin/actions.php (added)
-
tags/1.0.3/admin/admin.php (added)
-
tags/1.0.3/admin/content-table.php (added)
-
tags/1.0.3/admin/filters-columns.php (added)
-
tags/1.0.3/admin/filters-media.php (added)
-
tags/1.0.3/admin/filters-post.php (added)
-
tags/1.0.3/admin/filters-term.php (added)
-
tags/1.0.3/admin/manage (added)
-
tags/1.0.3/admin/manage/view-string-groups.php (added)
-
tags/1.0.3/admin/manage/view-strings.php (added)
-
tags/1.0.3/admin/post-actions.php (added)
-
tags/1.0.3/admin/profiles-table.php (added)
-
tags/1.0.3/admin/settings (added)
-
tags/1.0.3/admin/settings.php (added)
-
tags/1.0.3/admin/settings/connect-account.php (added)
-
tags/1.0.3/admin/settings/view-account.php (added)
-
tags/1.0.3/admin/settings/view-content.php (added)
-
tags/1.0.3/admin/settings/view-defaults.php (added)
-
tags/1.0.3/admin/settings/view-edit-profile.php (added)
-
tags/1.0.3/admin/settings/view-preferences.php (added)
-
tags/1.0.3/admin/settings/view-profiles.php (added)
-
tags/1.0.3/admin/settings/view-utilities.php (added)
-
tags/1.0.3/admin/string-actions.php (added)
-
tags/1.0.3/admin/strings-table.php (added)
-
tags/1.0.3/admin/table-string.php (added)
-
tags/1.0.3/admin/term-actions.php (added)
-
tags/1.0.3/admin/tutorial (added)
-
tags/1.0.3/admin/tutorial/content.php (added)
-
tags/1.0.3/admin/tutorial/credits.php (added)
-
tags/1.0.3/admin/tutorial/faq.php (added)
-
tags/1.0.3/admin/tutorial/features.php (added)
-
tags/1.0.3/admin/tutorial/img (added)
-
tags/1.0.3/admin/tutorial/img/add-languages.png (added)
-
tags/1.0.3/admin/tutorial/img/add-page.png (added)
-
tags/1.0.3/admin/tutorial/img/add-page2.png (added)
-
tags/1.0.3/admin/tutorial/img/automatic-translation.gif (added)
-
tags/1.0.3/admin/tutorial/img/automatic-translation.png (added)
-
tags/1.0.3/admin/tutorial/img/check-status.png (added)
-
tags/1.0.3/admin/tutorial/img/content-types.png (added)
-
tags/1.0.3/admin/tutorial/img/dashboard.png (added)
-
tags/1.0.3/admin/tutorial/img/polylang-compatible.png (added)
-
tags/1.0.3/admin/tutorial/img/pro-translation.png (added)
-
tags/1.0.3/admin/tutorial/img/professional-translation.png (added)
-
tags/1.0.3/admin/tutorial/img/ready-to-upload.png (added)
-
tags/1.0.3/admin/tutorial/img/request-translations.png (added)
-
tags/1.0.3/admin/tutorial/img/translation-profiles.png (added)
-
tags/1.0.3/admin/tutorial/img/translations-downloaded.png (added)
-
tags/1.0.3/admin/tutorial/img/translations-ready-for-download.png (added)
-
tags/1.0.3/admin/tutorial/img/translations-underway.png (added)
-
tags/1.0.3/admin/tutorial/img/workbench-full.png (added)
-
tags/1.0.3/admin/tutorial/img/workbench.png (added)
-
tags/1.0.3/admin/utilities.php (added)
-
tags/1.0.3/admin/view-dashboard.php (added)
-
tags/1.0.3/admin/view-manage.php (added)
-
tags/1.0.3/admin/view-network.php (added)
-
tags/1.0.3/admin/view-tutorial.php (added)
-
tags/1.0.3/css (added)
-
tags/1.0.3/css/admin.css (added)
-
tags/1.0.3/img (added)
-
tags/1.0.3/img/lingotek-chevrons-blue.png (added)
-
tags/1.0.3/img/lingotek-icon.png (added)
-
tags/1.0.3/img/lingotek-white.png (added)
-
tags/1.0.3/include (added)
-
tags/1.0.3/include/api.php (added)
-
tags/1.0.3/include/callback.php (added)
-
tags/1.0.3/include/dashboard.php (added)
-
tags/1.0.3/include/group-post.php (added)
-
tags/1.0.3/include/group-string.php (added)
-
tags/1.0.3/include/group-term.php (added)
-
tags/1.0.3/include/group.php (added)
-
tags/1.0.3/include/http.php (added)
-
tags/1.0.3/include/model.php (added)
-
tags/1.0.3/include/pointer.php (added)
-
tags/1.0.3/js (added)
-
tags/1.0.3/js/defaults.js (added)
-
tags/1.0.3/js/progress.js (added)
-
tags/1.0.3/js/updater.js (added)
-
tags/1.0.3/languages (added)
-
tags/1.0.3/languages/wp-lingotek-fr_FR.mo (added)
-
tags/1.0.3/languages/wp-lingotek-fr_FR.po (added)
-
tags/1.0.3/lingotek.php (added)
-
tags/1.0.3/readme.txt (added)
-
tags/1.0.3/uninstall.php (added)
-
trunk/admin/actions.php (modified) (1 diff)
-
trunk/admin/admin.php (modified) (2 diffs)
-
trunk/admin/filters-columns.php (modified) (3 diffs)
-
trunk/admin/post-actions.php (modified) (1 diff)
-
trunk/css/admin.css (modified) (1 diff)
-
trunk/js/updater.js (modified) (11 diffs)
-
trunk/lingotek.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lingotek-translation/trunk/admin/actions.php
r1202583 r1203565 273 273 274 274 $document = $this->lgtm->get_group($this->type, $id); 275 $id = $document->desc_array['lingotek']['source']; 275 276 276 277 if ($this->lgtm->can_upload($this->type, $id) || (isset($document->source) && 'string' != $this->type && $this->lgtm->can_upload($this->type, $document->source))) { -
lingotek-translation/trunk/admin/admin.php
r1202665 r1203565 45 45 //The main array consists of 46 46 //ids and nonces. Each id has a source language, languages with statuses, and a workbench link 47 $content_metadata = [];47 $content_metadata = array(); 48 48 foreach($object_ids as $object_id) { 49 49 $id = $object_id; … … 53 53 $content_metadata[$id]['source'] = $source_language; 54 54 $content_metadata[$id]['doc_id'] = $document->document_id; 55 $content_metadata[$id][$source_language]['status'] = $document->status; 55 $content_metadata[$id]['source_id'] = $document->source; 56 $target_status = $document->status == 'edited' || $document->status == null ? 'edited' : 'current'; 57 $content_metadata[$id][$source_language]['status'] = $document->source == $object_id ? $document->status : $target_status; 56 58 if(is_array($document->translations)){ 57 59 foreach($document->translations as $locale => $translation_status){ -
lingotek-translation/trunk/admin/filters-columns.php
r1200580 r1203565 64 64 * @param int $object_id id of the current object in row 65 65 */ 66 protected function _column($type, $column, $object_id ) {66 protected function _column($type, $column, $object_id, $custom_data = NULL) { 67 67 $action = 'post' == $type ? 'inline-save' : 'inline-save-tax'; 68 68 $inline = defined('DOING_AJAX') && $_REQUEST['action'] == $action && isset($_POST['inline_lang_choice']); … … 72 72 73 73 if (false === strpos($column, 'language_') || !$lang) { 74 return ''; 74 if ($custom_data) { 75 return $custom_data; 76 } 77 else { 78 return ''; 79 } 75 80 } 76 81 … … 168 173 * @param int term_id 169 174 */ 170 public function term_column($ empty, $column, $term_id) {175 public function term_column($custom_data, $column, $term_id) { 171 176 $this->content_type = $GLOBALS['taxonomy']; 172 return $this->_column('term', $column, $term_id); 177 if (!$custom_data) { 178 return $this->_column('term', $column, $term_id); 179 } 180 else { 181 return $this->_column('term', $column, $term_id, $custom_data); 182 } 173 183 } 174 184 } -
lingotek-translation/trunk/admin/post-actions.php
r1200580 r1203565 95 95 public function manage_actions() { 96 96 global $typenow; 97 printf('<div id="auto-update" class="hidden"></div>');98 97 $post_type = 'load-upload.php' == current_filter() ? 'attachment' : $typenow; 99 98 -
lingotek-translation/trunk/css/admin.css
r1193542 r1203565 15 15 display: none; 16 16 } 17 17 .ui-dialog { 18 box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24),0 17px 50px 0 rgba(0, 0, 0, 0.19); 19 padding: 10px; 20 font-weight: 700; 21 } 22 .ui-dialog button { 23 position:absolute; 24 right: 0; 25 top: 0; 26 float: right; 27 background-color: #0091CD; 28 color: white; 29 border:none; 30 outline:none; 31 } 32 .ui-dialog button:hover { 33 background-color: #007fb4; 34 } 18 35 /* icons color */ 19 36 .lingotek-color { -
lingotek-translation/trunk/js/updater.js
r1202665 r1203565 13 13 var taxonomy_type = url.substring(begin); 14 14 } 15 16 15 17 16 if($('.edit-tags-php').length > 0){ … … 42 41 }); 43 42 },10000); 44 45 43 46 44 function update_indicators(data){ … … 50 48 $('.lingotek-download').remove(); 51 49 for(var key in data){ 50 var source_id = key != data[key]['source_id'] ? data[key]['source_id'] : key; 52 51 var tr = $(tr_id + key); 53 52 if(data[key]['source'] === false){ 54 updateUploadBulkLink(tr, data, key, 'upload' , 'Upload this item to Lingotek TMS', 'Upload to Lingotek');53 updateUploadBulkLink(tr, data, source_id, 'upload' , 'Upload this item to Lingotek TMS', 'Upload to Lingotek'); 55 54 continue; 56 55 } … … 59 58 } 60 59 for(var locale in data[key]){ 61 if(locale === 'source' || locale === 'doc_id' ){60 if(locale === 'source' || locale === 'doc_id' || locale === 'source_id'){ 62 61 continue; 63 62 } … … 77 76 else { 78 77 var request_link = $('<a></a>').attr('href', relative_url 79 + '/post.php?post= ' + key78 + '/post.php?post=' + source_id 80 79 + '&action=edit'); 81 80 } … … 85 84 } 86 85 else { 87 $(td).find('.lingotek-color').remove(); 88 var request_link = $('<a></a>').attr('href', data[key][locale]['workbench_link']) 89 .attr('title','Current') 90 .attr('target','_blank') 91 .addClass('lingotek-color dashicons dashicons-edit'); 92 $(td).append(request_link); 86 updateWorkbenchIcon(td, data, key, locale, 'Current', 'edit'); 93 87 } 94 88 break; 95 89 case 'pending': 96 $(td).find('.pll_icon_edit').remove();97 90 updateGenericBulkLink(tr, data, key, 'status' , 'Update translations status of this item in Lingotek TMS', 'Update translations status '); 98 $(td).find('.lingotek-color').remove(); 99 var request_link = $('<a></a>').attr('href', data[key][locale]['workbench_link']) 100 .attr('title','In Progress') 101 .attr('target','_blank') 102 .addClass('lingotek-color dashicons dashicons-clock'); 103 $(td).append(request_link); 91 updateWorkbenchIcon(td, data, key, locale, 'In Progress', 'clock'); 104 92 break; 105 93 case 'importing': … … 109 97 break; 110 98 case 'not-current' : 111 $(td).find('.pll_icon_edit').remove(); 112 $(td).find('.lingotek-color').remove(); 113 var request_link = $('<a></a>').attr('href', data[key][locale]['workbench_link']) 114 .attr('title','The target translation is no longer current as the source content has been updated') 115 .attr('target','_blank') 116 .addClass('lingotek-color dashicons dashicons-edit'); 117 $(td).append(request_link); 99 updateWorkbenchIcon(td, data, key, locale, 'The target translation is no longer current as the source content has been updated', 'edit'); 118 100 break; 119 101 case 'edited': 120 102 $(td).find('.pll_icon_edit').remove(); 121 updateUploadBulkLink(tr, data, key, 'upload' , 'Upload this item to Lingotek TMS', 'Upload to Lingotek'); 122 $(td).find('.lingotek-color').remove(); 123 var request_link = $('<a></a>').attr('href', relative_url 124 + page_params + 'post= ' + key 125 + '&locale=' + locale 126 + '&action=lingotek-upload' 127 + '&noheader=1' 128 + '&_wpnonce=' + data['upload_nonce']) 129 .attr('title','Upload Now') 130 .addClass('lingotek-color dashicons dashicons-upload'); 131 $(td).append(request_link); 103 updateUploadBulkLink(tr, data, source_id, 'upload' , 'Upload this item to Lingotek TMS', 'Upload to Lingotek'); 104 updateUploadIndicator(td, data, source_id, locale); 132 105 break; 133 106 case 'ready': … … 140 113 $(td).find('.lingotek-color').remove(); 141 114 $(td).find('.pll_icon_edit').remove(); 142 update Indicator(td, data, key, locale, 'upload', 'Upload Now', 'upload');115 updateUploadIndicator(td, data, key, locale); 143 116 } 144 117 else if ($(td).find('.pll_icon_add').length > 0 && data[key][data[key]['source']]['status'] === 'none'){ 145 118 break; 146 119 } 147 else if(source !== false && data[key][source]['status'] === 'current' ){120 else if(source !== false && data[key][source]['status'] === 'current' && key == data[key]['source_id']){ 148 121 $(td).find('.pll_icon_add').remove(); 149 122 $(td).find('.pll_icon_edit').remove(); … … 164 137 } 165 138 } 139 140 function updateWorkbenchIcon(td, data, key, locale, title, icon){ 141 $(td).find('.pll_icon_edit').remove(); 142 $(td).find('.lingotek-color').remove(); 143 var request_link = $('<a></a>').attr('href', data[key][locale]['workbench_link']) 144 .attr('title',title) 145 .attr('target','_blank') 146 .addClass('lingotek-color dashicons dashicons-' + icon); 147 $(td).append(request_link); 148 } 149 166 150 function updateGenericBulkLink(tr, data, key, action, title, text){ 167 151 var row_actions = $(tr).find('.row-actions'); … … 183 167 } 184 168 } 169 185 170 function updateUploadBulkLink(tr, data, key, action, title, text){ 186 171 var row_actions = $(tr).find('.row-actions'); … … 204 189 } 205 190 } 191 192 function updateUploadIndicator(td, data, key, locale){ 193 $(td).find('.lingotek-color').remove(); 194 var request_link = $('<a></a>').attr('href', relative_url 195 + page_params + 'post=' + key 196 + '&locale=' + locale 197 + '&action=lingotek-upload' 198 + '&noheader=1' 199 + '&_wpnonce=' + data['upload_nonce']) 200 .attr('title','Upload Now') 201 .addClass('lingotek-color dashicons dashicons-upload'); 202 $(td).append(request_link); 203 } 204 206 205 function updateIndicator(td, data, key, locale, action, title, dashicon){ 207 206 $(td).find('.lingotek-color').remove(); -
lingotek-translation/trunk/lingotek.php
r1202665 r1203565 3 3 Plugin name: Lingotek Translation 4 4 Plugin URI: http://lingotek.com/wordpress#utm_source=wpadmin&utm_medium=plugin&utm_campaign=wplingotektranslationplugin 5 Version: 1.0. 35 Version: 1.0.4 6 6 Author: Lingotek and Frédéric Demarle 7 7 Author uri: http://lingotek.com … … 16 16 exit(); 17 17 18 define('LINGOTEK_VERSION', '1.0. 3'); // plugin version (should match above meta)18 define('LINGOTEK_VERSION', '1.0.4'); // plugin version (should match above meta) 19 19 define('LINGOTEK_MIN_PLL_VERSION', '1.7.4.2'); 20 20 define('LINGOTEK_BASENAME', plugin_basename(__FILE__)); // plugin name as known by WP -
lingotek-translation/trunk/readme.txt
r1202665 r1203565 5 5 Requires at least: 3.8 6 6 Tested up to: 4.2 7 Stable tag: 1.0. 37 Stable tag: 1.0.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 116 116 == Changelog == 117 117 118 = 1.0.4 (2015-07-21) = 119 120 * Plugin and PHP compatability improvements 121 118 122 = 1.0.3 (2015-07-20) = 119 123
Note: See TracChangeset
for help on using the changeset viewer.