Changeset 1907909
- Timestamp:
- 07/11/2018 09:45:56 PM (8 years ago)
- Location:
- lingotek-translation
- Files:
-
- 151 added
- 11 edited
-
assets/screenshot-5.png (added)
-
tags/1.3.7 (added)
-
tags/1.3.7/admin (added)
-
tags/1.3.7/admin/actions.php (added)
-
tags/1.3.7/admin/admin.php (added)
-
tags/1.3.7/admin/content-table.php (added)
-
tags/1.3.7/admin/custom-fields-table.php (added)
-
tags/1.3.7/admin/filters-columns.php (added)
-
tags/1.3.7/admin/filters-media.php (added)
-
tags/1.3.7/admin/filters-post.php (added)
-
tags/1.3.7/admin/filters-term.php (added)
-
tags/1.3.7/admin/import (added)
-
tags/1.3.7/admin/import.php (added)
-
tags/1.3.7/admin/import/FormatConverter.php (added)
-
tags/1.3.7/admin/import/StandardImportObject.php (added)
-
tags/1.3.7/admin/import/import-table.php (added)
-
tags/1.3.7/admin/import/view-content.php (added)
-
tags/1.3.7/admin/import/view-settings.php (added)
-
tags/1.3.7/admin/manage (added)
-
tags/1.3.7/admin/manage/view-content.php (added)
-
tags/1.3.7/admin/manage/view-custom-fields.php (added)
-
tags/1.3.7/admin/manage/view-edit-profile.php (added)
-
tags/1.3.7/admin/manage/view-profiles.php (added)
-
tags/1.3.7/admin/manage/view-string-groups.php (added)
-
tags/1.3.7/admin/manage/view-strings.php (added)
-
tags/1.3.7/admin/post-actions.php (added)
-
tags/1.3.7/admin/profiles-table.php (added)
-
tags/1.3.7/admin/settings (added)
-
tags/1.3.7/admin/settings.php (added)
-
tags/1.3.7/admin/settings/connect-account.php (added)
-
tags/1.3.7/admin/settings/view-account.php (added)
-
tags/1.3.7/admin/settings/view-defaults.php (added)
-
tags/1.3.7/admin/settings/view-preferences.php (added)
-
tags/1.3.7/admin/settings/view-utilities.php (added)
-
tags/1.3.7/admin/string-actions.php (added)
-
tags/1.3.7/admin/strings-table.php (added)
-
tags/1.3.7/admin/table-string.php (added)
-
tags/1.3.7/admin/term-actions.php (added)
-
tags/1.3.7/admin/tutorial (added)
-
tags/1.3.7/admin/tutorial/content.php (added)
-
tags/1.3.7/admin/tutorial/credits.php (added)
-
tags/1.3.7/admin/tutorial/faq.php (added)
-
tags/1.3.7/admin/tutorial/features.php (added)
-
tags/1.3.7/admin/tutorial/img (added)
-
tags/1.3.7/admin/tutorial/img/add-languages.png (added)
-
tags/1.3.7/admin/tutorial/img/add-page.png (added)
-
tags/1.3.7/admin/tutorial/img/add-page2.png (added)
-
tags/1.3.7/admin/tutorial/img/automatic-translation.gif (added)
-
tags/1.3.7/admin/tutorial/img/automatic-translation.png (added)
-
tags/1.3.7/admin/tutorial/img/change-account-settings.png (added)
-
tags/1.3.7/admin/tutorial/img/check-status.png (added)
-
tags/1.3.7/admin/tutorial/img/combined-selection.png (added)
-
tags/1.3.7/admin/tutorial/img/content-types.png (added)
-
tags/1.3.7/admin/tutorial/img/dashboard.png (added)
-
tags/1.3.7/admin/tutorial/img/higher-res-buy-now.png (added)
-
tags/1.3.7/admin/tutorial/img/payment-portal.png (added)
-
tags/1.3.7/admin/tutorial/img/polylang-compatible.png (added)
-
tags/1.3.7/admin/tutorial/img/pro-translation.png (added)
-
tags/1.3.7/admin/tutorial/img/professional-translation-icon.png (added)
-
tags/1.3.7/admin/tutorial/img/professional-translation.png (added)
-
tags/1.3.7/admin/tutorial/img/purchased.png (added)
-
tags/1.3.7/admin/tutorial/img/quote-calculator.png (added)
-
tags/1.3.7/admin/tutorial/img/ready-to-upload.png (added)
-
tags/1.3.7/admin/tutorial/img/redirected-to-payment-portal-screen.png (added)
-
tags/1.3.7/admin/tutorial/img/redirected-to-payment-portal.png (added)
-
tags/1.3.7/admin/tutorial/img/request-translations.png (added)
-
tags/1.3.7/admin/tutorial/img/selecting-lingotek-prof-workflow.png (added)
-
tags/1.3.7/admin/tutorial/img/selection-workflow-from-list.png (added)
-
tags/1.3.7/admin/tutorial/img/translation-profiles.png (added)
-
tags/1.3.7/admin/tutorial/img/translation-services.png (added)
-
tags/1.3.7/admin/tutorial/img/translations-downloaded.png (added)
-
tags/1.3.7/admin/tutorial/img/translations-ready-for-download.png (added)
-
tags/1.3.7/admin/tutorial/img/translations-underway.png (added)
-
tags/1.3.7/admin/tutorial/img/with-payment-method.png (added)
-
tags/1.3.7/admin/tutorial/img/workbench-full.png (added)
-
tags/1.3.7/admin/tutorial/img/workbench.png (added)
-
tags/1.3.7/admin/tutorial/img/workflow-select.png (added)
-
tags/1.3.7/admin/utilities.php (added)
-
tags/1.3.7/admin/view-dashboard.php (added)
-
tags/1.3.7/admin/view-manage.php (added)
-
tags/1.3.7/admin/view-network.php (added)
-
tags/1.3.7/admin/view-tutorial.php (added)
-
tags/1.3.7/admin/workflows (added)
-
tags/1.3.7/admin/workflows/credit-card-to-path.php (added)
-
tags/1.3.7/admin/workflows/professional-translation-workflow.php (added)
-
tags/1.3.7/admin/workflows/workflow-factory.php (added)
-
tags/1.3.7/admin/workflows/workflow.php (added)
-
tags/1.3.7/admin/wp-import.php (added)
-
tags/1.3.7/css (added)
-
tags/1.3.7/css/admin.css (added)
-
tags/1.3.7/css/workflow (added)
-
tags/1.3.7/css/workflow/professional-workflow-style.css (added)
-
tags/1.3.7/error.log (added)
-
tags/1.3.7/img (added)
-
tags/1.3.7/img/blue-radio-button.svg (added)
-
tags/1.3.7/img/checkmark-green.svg (added)
-
tags/1.3.7/img/credit-cards (added)
-
tags/1.3.7/img/credit-cards/alipay.svg (added)
-
tags/1.3.7/img/credit-cards/amex.svg (added)
-
tags/1.3.7/img/credit-cards/default.svg (added)
-
tags/1.3.7/img/credit-cards/diners.svg (added)
-
tags/1.3.7/img/credit-cards/discover.svg (added)
-
tags/1.3.7/img/credit-cards/hipercard.svg (added)
-
tags/1.3.7/img/credit-cards/jcb.svg (added)
-
tags/1.3.7/img/credit-cards/maestro.svg (added)
-
tags/1.3.7/img/credit-cards/mastercard.svg (added)
-
tags/1.3.7/img/credit-cards/paypal.svg (added)
-
tags/1.3.7/img/credit-cards/unionpay.svg (added)
-
tags/1.3.7/img/credit-cards/visa.svg (added)
-
tags/1.3.7/img/credit-dots.svg (added)
-
tags/1.3.7/img/error.svg (added)
-
tags/1.3.7/img/human-translation.svg (added)
-
tags/1.3.7/img/lingotek-chevrons-blue.png (added)
-
tags/1.3.7/img/lingotek-icon.png (added)
-
tags/1.3.7/img/lingotek-logo-white.png (added)
-
tags/1.3.7/img/lingotek-white.png (added)
-
tags/1.3.7/img/loading.gif (added)
-
tags/1.3.7/img/loading_mini.gif (added)
-
tags/1.3.7/img/minimum-help.svg (added)
-
tags/1.3.7/img/minimum-warning.svg (added)
-
tags/1.3.7/img/questionmark.svg (added)
-
tags/1.3.7/img/right-arrow.svg (added)
-
tags/1.3.7/img/translation-logo.png (added)
-
tags/1.3.7/include (added)
-
tags/1.3.7/include/api.php (added)
-
tags/1.3.7/include/callback.php (added)
-
tags/1.3.7/include/dashboard.php (added)
-
tags/1.3.7/include/group-post.php (added)
-
tags/1.3.7/include/group-string.php (added)
-
tags/1.3.7/include/group-term.php (added)
-
tags/1.3.7/include/group.php (added)
-
tags/1.3.7/include/http.php (added)
-
tags/1.3.7/include/logger.php (added)
-
tags/1.3.7/include/model.php (added)
-
tags/1.3.7/include/plugins-compat.php (added)
-
tags/1.3.7/include/pointer.php (added)
-
tags/1.3.7/js (added)
-
tags/1.3.7/js/defaults.js (added)
-
tags/1.3.7/js/progress.js (added)
-
tags/1.3.7/js/updater.js (added)
-
tags/1.3.7/js/workflow (added)
-
tags/1.3.7/js/workflow/professional-workflow-account.js (added)
-
tags/1.3.7/js/workflow/professional-workflow-defaults.js (added)
-
tags/1.3.7/js/workflow/professional-workflow.js (added)
-
tags/1.3.7/js/workflow/workflow.js (added)
-
tags/1.3.7/languages (added)
-
tags/1.3.7/languages/wp-lingotek-fr_FR.mo (added)
-
tags/1.3.7/languages/wp-lingotek-fr_FR.po (added)
-
tags/1.3.7/lingotek.php (added)
-
tags/1.3.7/readme.txt (added)
-
tags/1.3.7/uninstall.php (added)
-
trunk/admin/actions.php (modified) (1 diff)
-
trunk/admin/filters-columns.php (modified) (1 diff)
-
trunk/admin/manage/view-edit-profile.php (modified) (2 diffs)
-
trunk/admin/manage/view-profiles.php (modified) (1 diff)
-
trunk/admin/strings-table.php (modified) (1 diff)
-
trunk/admin/term-actions.php (modified) (1 diff)
-
trunk/include/group-string.php (modified) (2 diffs)
-
trunk/include/group.php (modified) (1 diff)
-
trunk/include/model.php (modified) (4 diffs)
-
trunk/lingotek.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lingotek-translation/trunk/admin/actions.php
r1827884 r1907909 253 253 self::$icons[ $name ]['icon'], self::$icons[ $name ]['title'] . "\n" . $api_error, $additional); 254 254 } 255 255 256 256 /** 257 257 * Outputs an upload icon -
lingotek-translation/trunk/admin/filters-columns.php
r1694568 r1907909 119 119 // post ready for upload. 120 120 if ( $this->lgtm->can_upload( $type, $object_id ) && $object_id === $id ) { 121 121 122 return $disabled ? ('post' === $type ? parent::post_column( $column, $object_id ) : parent::term_column( '', $column, $object_id )) 122 123 : ($document && (count( $document->desc_array ) >= 3) ? $actions->upload_icon( $object_id, true ) : $actions->upload_icon( $object_id )); 123 124 } // if language is set to copy and profile is manual. 124 elseif ( ('post' === $type) && ((isset( $source_profile['targets'][ $language->slug ] ) && 'copy' === $source_profile['targets'][ $language->slug ]) || (isset( $profile['targets'][ $language->slug ] ) && 'copy' === $profile['targets'][ $language->slug ] ) && isset( $document->source )) ) { 125 if ( isset( $document->desc_array[ $language->slug ] ) ) { 126 return 'post' === $type ? parent::post_column( $column, $object_id ) : parent::term_column( '', $column, $object_id ); 127 } else { 128 if ( $document ) { 129 return $actions->copy_icon( $document->source, $language->slug ); 130 } else { 131 return $actions->copy_icon( $object_id, $language->slug ); 132 } 133 } 125 elseif ( ('post' === $type || 'term' === $type) && ((isset( $source_profile['targets'][ $language->slug ] ) && 'copy' === $source_profile['targets'][ $language->slug ]) || (isset( $profile['targets'][ $language->slug ] ) && 'copy' === $profile['targets'][ $language->slug ] ) && isset( $document->source )) ) { 126 127 if ( isset( $document->desc_array[ $language->slug ] ) ) { 128 return ('post' === $type) ? parent::post_column( $column, $object_id ) : parent::term_column( '', $column, $object_id ); 129 } else { 130 if ( $document ) { 131 return $actions->copy_icon( $document->source, $language->slug ); 132 } else { 133 return $actions->copy_icon( $object_id, $language->slug ); 134 } 135 } 134 136 } // translation disabled. 135 137 elseif ( ( isset( $document->source ) && $document->is_disabled_target( $source_language, $language ) && ! isset( $document->translations[ $language->locale ] ) ) || !Lingotek::is_allowed_tms_locale($language->lingotek_locale) ) { 136 138 return 'post' === $type ? parent::post_column( $column, $object_id ) : parent::term_column( '', $column, $object_id ); 137 139 } // source post is uploaded. 138 elseif ( isset( $document->source ) && $document->source === $id ) {139 // source ready for upload.140 if ( $this->lgtm->can_upload( $type, $id ) ) {141 return $actions->upload_icon( $id );142 }143 144 // importing source.145 if ( $id === $object_id && 'importing' === $document->status ) {140 elseif ( isset( $document->source ) && $document->source === $id ) { 141 // source ready for upload. 142 if ( $this->lgtm->can_upload( $type, $id ) ) { 143 return $actions->upload_icon( $id ); 144 } 145 146 // importing source. 147 if ( $id === $object_id && 'importing' === $document->status ) { 146 148 return Lingotek_Actions::importing_icon( $document ); 147 149 } 148 150 149 // uploaded.150 return 'post' === $type ? Lingotek_Post_actions::uploaded_icon( $id ) : Lingotek_Term_actions::uploaded_icon( $id );151 } // translations.151 // uploaded. 152 return 'post' === $type ? Lingotek_Post_actions::uploaded_icon( $id ) : Lingotek_Term_actions::uploaded_icon( $id ); 153 } // translations. 152 154 elseif ( isset( $document->translations[ $language->locale ] ) || (isset( $document->source ) && 'current' === $document->status) ) { 153 155 return Lingotek_Actions::translation_icon( $document, $language ); 154 } elseif ( ( 'term' === $type && ! isset( $document->translations[ $language->locale ] ) && $document->source !== $object_id ) || !Lingotek::is_allowed_tms_locale($language->lingotek_locale) ) { 156 } elseif ( ( 'term' === $type && ! isset( $document->translations[ $language->locale ] ) && $document->source !== $object_id ) || !Lingotek::is_allowed_tms_locale($language->lingotek_locale) ) { 155 157 return parent::term_column( '', $column, $object_id ); 156 158 } // translations exist but are not managed by Lingotek TMS. -
lingotek-translation/trunk/admin/manage/view-edit-profile.php
r1730742 r1907909 23 23 $profile = isset($_GET['profile']) && array_key_exists($_GET['profile'], $profiles) ? $profiles[$_GET['profile']] : array(); 24 24 $disabled = isset($profile['profile']) && in_array($profile['profile'], array('automatic', 'manual')) ? 'disabled="disabled"' : ''; 25 26 25 // Code to determine which filter scenario will be displayed. (Not configured, defaults, custom filters) 27 26 $primary_filter_id = array_search('okf_json@with-html-subfilter.fprm', $settings['primary_filter_id']['options']); … … 193 192 </td> 194 193 </tr> 195 196 194 <?php 197 195 } ?> 198 </table><?php submit_button(__('Save Changes', 'lingotek-translation'), 'primary', 'submit', false); ?> 199 196 </table> 197 198 <?php $metadata = array( 199 "author_email" => "Author Email", 200 "author_name" => "Author Name", 201 "division" => "Business Division", 202 "unit" => "Business Unit", 203 "campaign_id" => "Campaign ID", 204 "channel" => "Channel", 205 "contact_email" => "Contact Email", 206 "contact_name" => "Contact Name", 207 "description" => "Content Description", 208 "domain" => "Domain", 209 "style_id" => "External Style ID", 210 "purchase_order" => "Purchase Order", 211 "reference_url" => "Reference URL", 212 "region" => "Region", 213 "require_review" => "Require Review" 214 ) ?> 215 <h3><?php _e('Document Metadata', 'lingotek-translation'); ?></h3> 216 <table class="form-table"> 217 <?php 218 foreach ($metadata as $key => $data){ 219 $index = array_search($key,array_keys($metadata)); 220 if ($index == 0){ 221 printf('<tr>'); 222 } 223 if ($index %3 == 0){ 224 printf('</tr>'); 225 printf('<tr>'); 226 } 227 if (isset($profile[$key])){ 228 printf('<th> %s <br><input type="text" name="%s" value="%s"></th>', $data ,$key, $profile[$key]); 229 } 230 else{ 231 printf('<th> %s <br><input type="text" name="%s"></th>', $data, $key); 232 } 233 } 234 ?> 235 </table> 236 237 <?php submit_button(__('Save Changes', 'lingotek-translation'), 'primary', 'submit', false); ?> 200 238 <?php 201 239 if (!empty($profile['profile']) && !in_array($profile['profile'], array('automatic', 'manual', 'disabled')) && empty($profile['usage'])) -
lingotek-translation/trunk/admin/manage/view-profiles.php
r1730742 r1907909 34 34 $profiles[$profile_id]['name'] = strip_tags($_POST['name']); 35 35 36 foreach (array('upload', 'download', 'project_id', 'workflow_id', 'primary_filter_id', 'secondary_filter_id' ) as $key) {37 if (isset($_POST[$key]) && in_array($_POST[$key], array_keys($settings[$key]['options'])))36 foreach (array('upload', 'download', 'project_id', 'workflow_id', 'primary_filter_id', 'secondary_filter_id','author_email', 'author_name','division','unit','campaign_id','channel','contact_email','contact_name','description','domain','style_id','purchase_order','reference_url','region','require_review') as $key) { 37 if (isset($_POST[$key]) ) 38 38 $profiles[$profile_id][$key] = $_POST[$key]; 39 39 -
lingotek-translation/trunk/admin/strings-table.php
r1694568 r1907909 102 102 if ( isset( $errors[ $item['context'] ] ) ) { 103 103 $api_error = Lingotek_Actions::retrieve_api_error( $errors[ $item['context'] ] ); 104 echo esc_html( Lingotek_Actions::display_error_icon( 'error', $api_error ));104 echo Lingotek_Actions::display_error_icon( 'error', $api_error ); 105 105 } 106 106 } -
lingotek-translation/trunk/admin/term-actions.php
r1818525 r1907909 160 160 break; 161 161 162 case 'lingotek-copy': 163 check_admin_referer( 'lingotek-copy' ); 164 $term_to_copy = get_term( (int) filter_input( INPUT_GET, 'term' ) ); 165 $target = filter_input( INPUT_GET, 'target' ); 166 $this->lgtm->copy_term( $term_to_copy, $target, $taxnow); 167 break; 168 162 169 default: 163 170 if (!$this->_manage_actions($action)) -
lingotek-translation/trunk/include/group-string.php
r1694568 r1907909 113 113 } 114 114 } 115 115 116 116 /* 117 117 * returns the content to translate … … 129 129 return json_encode($arr); 130 130 } 131 131 132 132 /* 133 133 * requests translations to Lingotek TMS -
lingotek-translation/trunk/include/group.php
r1827884 r1907909 209 209 */ 210 210 protected function _request_translations($source_language) { 211 211 212 212 $type_id; 213 213 $client = new Lingotek_API(); -
lingotek-translation/trunk/include/model.php
r1818525 r1907909 231 231 PLL()->model->post->set_language($new_post_id, $cp_lang); 232 232 wp_set_object_terms($new_post_id, $document->term_id, 'post_translations'); 233 $GLOBALS['polylang']->sync-> copy_taxonomies($document->source, $new_post_id, $cp_lang->slug);234 $GLOBALS['polylang']->sync-> copy_post_metas($document->source, $new_post_id, $cp_lang->slug);233 $GLOBALS['polylang']->sync->taxonomies->copy($document->source, $new_post_id, $cp_lang->slug); 234 $GLOBALS['polylang']->sync->post_metas->copy($document->source, $new_post_id, $cp_lang->slug); 235 235 Lingotek_Group_Post::copy_or_ignore_metas($post->ID, $new_post_id); 236 236 $document->desc_array[$target] = $new_post_id; … … 246 246 public function copy_term($term, $target, $taxonomy) { 247 247 self::$copying_term = true; 248 $document = $this->get_group('term', $term->term_id); 248 $document = $this->get_group('term', $term->term_id); 249 249 $cp_lang = $this->pllm->get_language($target); 250 250 $cp_term = (array) $term; … … 318 318 'external_url' => $external_url, 319 319 ); 320 320 foreach (array('author_email', 'author_name','division','unit','campaign_id','channel','contact_email','contact_name','description','domain','style_id','purchase_order','reference_url','region','require_review') as $key) { 321 if (isset($profile[$key]) ) 322 $params[$key] = $profile[$key]; 323 } 321 324 $filter_ids = array(); 322 325 if (self::get_profile_option('primary_filter_id', $post->post_type, $language, false, $post_id)) { … … 407 410 // If a translation profile has targets set to copy then copy them 408 411 $targets_to_copy = $this->targets_to_be_copied($profile); 409 if (!empty($targets_to_copy) ) {412 if (!empty($targets_to_copy) && $upload == 'automatic') { 410 413 foreach ($targets_to_copy as $target) { 411 414 $this->copy_term($term, $target, $taxonomy); -
lingotek-translation/trunk/lingotek.php
r1827884 r1907909 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.3. 75 Version: 1.3.8 6 6 Author: Lingotek and Frédéric Demarle 7 7 Author uri: http://lingotek.com … … 17 17 } 18 18 19 define( 'LINGOTEK_VERSION', '1.3. 7' ); // plugin version (should match above meta).19 define( 'LINGOTEK_VERSION', '1.3.8' ); // plugin version (should match above meta). 20 20 define( 'LINGOTEK_MIN_PLL_VERSION', '1.8' ); 21 21 define( 'LINGOTEK_BASENAME', plugin_basename( __FILE__ ) ); // plugin name as known by WP. -
lingotek-translation/trunk/readme.txt
r1827884 r1907909 5 5 Requires at least: 3.8 6 6 Tested up to: 4.9 7 Stable tag: 1.3. 77 Stable tag: 1.3.8 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 120 120 3. Use translation profiles. One of the most time-consuming activities of any multilingual web-site project is managing the ongoing flow of changes and additions to site content and configurations. Translation profiles were created to allow you to create and save and re-use your translation settings. 121 121 4. Content type profiles. Manually choosing which content to upload and download is rarely what a content administrator wants to do, and automating the upload of every change is not workable because there are various types of content. Each type of translatable content can be assigned to a customizable profile. For example, by default, we like to have Posts use an Automatic profile so that content will automatically be uploaded for translation and the resulting translations automatically be downloaded back into WordPress. 122 5. The Lingotek Translation plugin provides the ability to Copy, Translate, and Ignore each specific custom field. Our plugin supports Wordpress custom fields and advanced custom fields. 122 123 123 124 == Changelog == 125 126 = 1.3.8 (2018-7-11) = 127 128 * Added document metadata fields to translation profiles 129 * Added manual copying of categories and tags 130 * Fixed other minor bugs 124 131 125 132 = 1.3.7 (2018-2-23) =
Note: See TracChangeset
for help on using the changeset viewer.