get_current_language(); } if(!isset($icl_translation_filter['to_lang'])){ $icl_translation_filter['to_lang'] = isset($_GET['to_lang'])?$_GET['to_lang']:''; } if($icl_translation_filter['to_lang'] == $icl_translation_filter['from_lang']){ $icl_translation_filter['to_lang'] = false; } if(!isset($icl_translation_filter['tstatus'])){ $icl_translation_filter['tstatus'] = isset($_GET['tstatus'])?$_GET['tstatus']:'not'; } if(!isset($icl_translation_filter['sort_by']) || !$icl_translation_filter['sort_by']){ $icl_translation_filter['sort_by'] = 'p.post_date';} if(!isset($icl_translation_filter['sort_order']) || !$icl_translation_filter['sort_order']){ $icl_translation_filter['sort_order'] = 'DESC';} $sort_order_next = $icl_translation_filter['sort_order'] == 'ASC' ? 'DESC' : 'ASC'; $title_sort_link = 'admin.php?page='.WPML_TM_FOLDER.'/menu/main.php&sm=dashboard&icl_tm_action=sort&sort_by=p.post_title&sort_order='.$sort_order_next; $date_sort_link = 'admin.php?page='.WPML_TM_FOLDER.'/menu/main.php&sm=dashboard&icl_tm_action=sort&sort_by=p.post_date&sort_order='.$sort_order_next; $icl_post_statuses = array( 'publish' =>__('Published', 'wpml-translation-management'), 'draft' =>__('Draft', 'wpml-translation-management'), 'pending' =>__('Pending Review', 'wpml-translation-management'), 'future' =>__('Scheduled', 'wpml-translation-management'), 'private' =>__('Private', 'wpml-translation-management') ); // Get the document types that we can translate $icl_post_types = $sitepress->get_translatable_documents(); $icl_post_types = apply_filters('WPML_get_translatable_types', $icl_post_types); foreach ($icl_post_types as $id => $type_info) { if (is_string($type_info)) { // this is an external type returned by WPML_get_translatable_types $new_type = new stdClass(); $new_type->labels->singular_name = $type_info; $new_type->labels->name = $type_info; $new_type->external_type = 1; $icl_post_types[$id] = $new_type; } } $icl_dashboard_settings = isset($sitepress_settings['dashboard']) ? $sitepress_settings['dashboard'] : array(); $icl_translation_filter['limit_no'] = isset($_GET['show_all']) && $_GET['show_all'] ? 10000 : ICL_TM_DOCS_PER_PAGE; if(!isset($icl_translation_filter['parent_type'])) $icl_translation_filter['parent_type'] = 'any'; // Get all the documents $icl_documents = $iclTranslationManagement->get_documents($icl_translation_filter); // Get any documents from external sources. foreach ($icl_post_types as $id => $type_info) { if (isset($icl_translation_filter['type']) && $id == $icl_translation_filter['type'] && isset($type_info->external_type) && $type_info->external_type) { $icl_documents = apply_filters('WPML_get_translatable_items', $icl_documents, $id, $icl_translation_filter); } } $icl_translators = $iclTranslationManagement->get_blog_translators(); $icl_selected_posts = array(); $icl_selected_languages = array(); $icl_selected_translators = array(); if(!empty($iclTranslationManagement->dashboard_select)){ $icl_selected_posts = $iclTranslationManagement->dashboard_select['post']; $icl_selected_languages = $iclTranslationManagement->dashboard_select['translate_to']; $icl_selected_translators = $iclTranslationManagement->dashboard_select['translator']; } if(!empty($sitepress_settings['default_translators'][$icl_translation_filter['from_lang']])){ foreach($sitepress_settings['default_translators'][$icl_translation_filter['from_lang']] as $_tolang => $tr){ if($iclTranslationManagement->translator_exists($tr['id'], $icl_translation_filter['from_lang'], $_tolang, $tr['type'])){ $icl_selected_translators[$_tolang] = $tr['type'] == 'local' ? $tr['id'] : $tr['id'] . '-' . $tr['type']; } } } foreach($sitepress->get_active_languages()as $lang){ if(empty($icl_selected_translators[$lang['code']]) && !empty($sitepress_settings['icl_lang_status']) && is_array($sitepress_settings['icl_lang_status'])){ foreach($sitepress_settings['icl_lang_status'] as $lpair){ if($lpair['from']==$icl_translation_filter['from_lang'] && $lpair['to']==$lang['code'] && !empty($lpair['translators'])){ $icl_selected_translators[$lang['code']] = $lpair['translators']['0']['id'] . '-icanlocalize'; } } } } if(!defined('ICL_DONT_PROMOTE') || !ICL_DONT_PROMOTE){ $icl_translation_services = apply_filters('icl_translation_services', array()); $icl_translation_services = array_merge($icl_translation_services, TranslationManagement::icanlocalize_service_info()); if (!empty($icl_translation_services)) { $icls_output = ''; if(empty($icl_dashboard_settings['hide_icl_promo'])){ $nt_visible = ' style="display:none"'; $nt_show = ''; }else{ $nt_visible = ''; $nt_show = 'display:none;'; } $icls_output .= '' . __('Need translators?', 'wpml-translation-management') . ''; $icls_output .= '
'; foreach ($icl_translation_services as $key => $service) { $icls_output .= '
'; $icls_output .= '' . $service['name'] . ''; $icls_output .= '

' . $service['description'] . '

'; $icls_output .= '' . __('Hide this', 'wpml-translation-management') . ' '; $icls_output .= '' . __('Get quote','wpml-translation-management') . ' '; $icls_output .= '
'; } $icls_output .= '
'; } }else{ $icls_output = ""; } ?>
   

 
 
 


get_active_languages() as $lang): if($lang['code']==$icl_translation_filter['from_lang']) continue;?> get_active_languages() as $lang): if($lang['code']==$icl_translation_filter['from_lang']) continue;?> class="alternate"> needs_update ? ICL_TM_NEEDS_UPDATE : intval($doc->status); ?> get_active_languages() as $lang): if($lang['code']==$icl_translation_filter['from_lang']) continue;?> $_prop_up)) $doc->$_prop_up = false; if(!isset($doc->$_prop_st)) $doc->$_prop_st = ICL_TM_NOT_TRANSLATED; switch(intval($doc->$_prop_st)){ case ICL_TM_NOT_TRANSLATED : $tst_title = esc_attr(__('Not translated','wpml-translation-management')); break; case ICL_TM_WAITING_FOR_TRANSLATOR : $tst_title = esc_attr(__('Waiting for translator','wpml-translation-management')); break; case ICL_TM_IN_PROGRESS : $tst_title = esc_attr(__('In progress','wpml-translation-management')); break; case ICL_TM_DUPLICATE : $tst_title = esc_attr(__('Duplicate','wpml-translation-management')); break; case ICL_TM_COMPLETE : $tst_title = esc_attr(__('Complete','wpml-translation-management')); break; default: $tst_title = ''; } $docst = ($doc->$_prop_up && $icl_translation_filter['tstatus']=='not') ? ICL_TM_NEEDS_UPDATE : intval($doc->$_prop_st); if($doc->$_prop_up){ $tst_title .= ' - ' . esc_attr(__('needs update','wpml-translation-management')); } ?>
/>     note <?php echo $icl_translation_filter['to_lang'] ?> <?php echo $lang['code'] ?>
/>     note <?php echo $icl_translation_filter['to_lang'] ?> <?php echo $lang['code'] ?>
post_id, $icl_selected_posts))) echo 'checked="checked"'?> /> post_id); ?> estimate_word_count($doc, $icl_translation_filter['from_lang']); $wc += $iclTranslationManagement->estimate_custom_field_word_count($doc->post_id, $icl_translation_filter['from_lang']); ?>  
is_translation){ $note = get_post_meta($doc->post_id, '_icl_translator_note', true); if($note){ $note_text = __('Edit note for the translators', 'wpml-translation-management'); $note_icon = 'edit_translation.png'; }else{ $note_text = __('Add note for the translators', 'wpml-translation-management'); $note_icon = 'add_translation.png'; } } ?>
disabled="disabled" /> post_id) ?>
post_type]->labels->singular_name != "" ? $icl_post_types[$doc->post_type]->labels->singular_name : $icl_post_types[$doc->post_type]->labels->name; ?> post_status])) echo $icl_post_statuses[$doc->post_status]; else echo $doc->post_status?> <?php echo $_st ?> <?php echo $tst_title ?>
ICL_TM_DOCS_PER_PAGE){ echo '' . sprintf(__('Show %d documents per page', 'wpml-translation-management'), ICL_TM_DOCS_PER_PAGE) . ''; } // pagination $page_links = paginate_links( array( 'base' => add_query_arg('paged', '%#%' ), 'format' => '', 'prev_text' => '«', 'next_text' => '»', 'total' => $wp_query->max_num_pages, 'current' => $_GET['paged'], 'add_args' => isset($icl_translation_filter)?$icl_translation_filter:array() )); ?>
0')?> '); ?>
found_posts > ICL_TM_DOCS_PER_PAGE){ echo '' . __('show all', 'wpml-translation-management') . ''; } ?> ' . __( 'Displaying %s–%s of %s', 'wpml-translation-management' ) . '%s', number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ), number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ), number_format_i18n( $wp_query->found_posts ), $page_links ); echo $page_links_text; ?>
    get_active_languages()as $lang):?>
  •  
    translators_dropdown(array( 'from' => $icl_translation_filter['from_lang'], 'to' => $lang['code'], 'name' => 'translator['.$lang['code'].']', 'selected' => isset($icl_selected_translators[$lang['code']]) ? $icl_selected_translators[$lang['code']] : 0, 'services' => array('local', 'icanlocalize') )); ?>     |  
disabled="disabled" />

get_icl_manually_tranlations_box('icl_cyan_box'); // shows only when translation polling is on and there are translations in progress ?> icl_account_configured() && $sitepress_settings['icl_html_status']): ?>