function translation_queue_after_display() { $export_label = esc_html__('Export all jobs:', 'wpml-translation-management'); if (isset($_SESSION['translation_ujobs_filter'])) { if (!empty($_SESSION['translation_ujobs_filter']['type'])) { $post_slug = preg_replace('/^post_/', '', $_SESSION['translation_ujobs_filter']['type'], 1); $post_type = get_post_type_object($post_slug); $type = $post_type->label; } else { $type = __('All types', 'wpml-translation-management'); } $from = !empty($_SESSION['translation_ujobs_filter']['from']) ? $this->sitepress->get_display_language_name($_SESSION['translation_ujobs_filter']['from']) : __('Any language', 'wpml-translation-management'); $to = !empty($_SESSION['translation_ujobs_filter']['to']) ? $this->sitepress->get_display_language_name($_SESSION['translation_ujobs_filter']['to']) : __('Any language', 'wpml-translation-management'); $status = !empty($_SESSION['translation_ujobs_filter']['status']) && (int) $_SESSION['translation_ujobs_filter']['status'] !== ICL_TM_WAITING_FOR_TRANSLATOR ? TranslationManagement::status2text($_SESSION['translation_ujobs_filter']['status']) : (!empty($_SESSION['translation_ujobs_filter']['status']) ? __('Available to translate', 'wpml-translation-management') : 'All statuses'); $export_label = sprintf(esc_html__('Export all filtered jobs of %1$s from %2$s to %3$s in %4$s:', 'wpml-translation-management'), '<b>' . $type . '</b>', '<b>' . $from . '</b>', '<b>' . $to . '</b>', '<b>' . $status . '</b>'); } ?> <br /> <table class="widefat"> <thead><tr><th><?php esc_html_e('Import / Export XLIFF', 'wpml-translation-management'); ?> </th></tr></thead> <tbody><tr><td> <form method="post" id="translation-xliff-export-all-filtered" action=""> <label for="wpml_xliff_export_all_filtered"><?php echo $export_label; ?> </label> <select name="xliff_version" class="select"><?php echo $this->get_xliff_version_select_options(); ?> </select> <input type="submit" value="<?php esc_attr_e('Export', 'wpml-translation-management'); ?> " name="wpml_xliff_export_all_filtered" id="xliff_download" class="button-secondary action" /> <input type="hidden" value="<?php echo wp_create_nonce('xliff-export-all-filtered'); ?> " name="nonce"> </form> <hr> <form enctype="multipart/form-data" method="post" id="translation-xliff-upload" action=""> <label for="upload-xliff-file"><?php _e('Select the xliff file or zip file to upload from your computer: ', 'wpml-translation-management'); ?> </label> <input type="file" id="upload-xliff-file" name="import" /><input type="submit" value="<?php _e('Upload', 'wpml-translation-management'); ?> " name="xliff_upload" id="xliff_upload" class="button-secondary action" /> </form> </td></tr></tbody> </table> <?php }