本文整理汇总了PHP中TranslationManagement::status2text方法的典型用法代码示例。如果您正苦于以下问题:PHP TranslationManagement::status2text方法的具体用法?PHP TranslationManagement::status2text怎么用?PHP TranslationManagement::status2text使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TranslationManagement
的用法示例。
在下文中一共展示了TranslationManagement::status2text方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_job_status_string
public static function get_job_status_string($status_id, $needs_update = false)
{
$job_status_text = TranslationManagement::status2text($status_id);
if ($needs_update) {
$job_status_text .= __(' - (needs update)', 'wpml-translation-management');
}
return $job_status_text;
}
示例2:
?>
><?php
echo TranslationManagement::status2text(ICL_TM_COMPLETE);
?>
</option>
<option value="<?php
echo ICL_TM_IN_PROGRESS;
?>
" <?php
if (@intval($icl_translation_filter['status']) == ICL_TM_IN_PROGRESS) {
?>
selected="selected"<?php
}
?>
><?php
echo TranslationManagement::status2text(ICL_TM_IN_PROGRESS);
?>
</option>
<option value="<?php
echo ICL_TM_WAITING_FOR_TRANSLATOR;
?>
" <?php
if (@intval($icl_translation_filter['status']) && $icl_translation_filter['status'] == ICL_TM_WAITING_FOR_TRANSLATOR) {
?>
selected="selected"<?php
}
?>
><?php
_e('Available to translate', 'wpml-translation-management');
?>
</option>
示例3: translation_queue_after_display
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
}
示例4: display
//.........这里部分代码省略.........
<?php
if (1 < @count($langs_to)) {
$to_select = new WPML_Simple_Language_Selector($this->sitepress);
echo $to_select->render(array('name' => 'filter[to]', 'please_select_text' => __('Any language', 'wpml-translation-management'), 'style' => '', 'languages' => $langs_to, 'selected' => isset($icl_translation_filter['to']) ? $icl_translation_filter['to'] : ''));
} else {
?>
<input type="hidden" name="filter[to]" value="<?php
echo esc_attr($lang_to['code']);
?>
" />
<?php
echo $this->sitepress->get_flag_img($lang_to['code']) . ' ' . $lang_to['display_name'];
?>
<?php
}
?>
</label>
<select name="filter[status]">
<option value=""><?php
_e('All statuses', 'wpml-translation-management');
?>
</option>
<option value="<?php
echo ICL_TM_COMPLETE;
?>
" <?php
if (@intval($icl_translation_filter['status']) == ICL_TM_COMPLETE) {
?>
selected="selected"<?php
}
?>
><?php
echo TranslationManagement::status2text(ICL_TM_COMPLETE);
?>
</option>
<option value="<?php
echo ICL_TM_IN_PROGRESS;
?>
" <?php
if (@intval($icl_translation_filter['status']) == ICL_TM_IN_PROGRESS) {
?>
selected="selected"<?php
}
?>
><?php
echo TranslationManagement::status2text(ICL_TM_IN_PROGRESS);
?>
</option>
<option value="<?php
echo ICL_TM_WAITING_FOR_TRANSLATOR;
?>
" <?php
if (@intval($icl_translation_filter['status']) && $icl_translation_filter['status'] == ICL_TM_WAITING_FOR_TRANSLATOR) {
?>
selected="selected"<?php
}
?>
><?php
_e('Available to translate', 'wpml-translation-management');
?>
</option>
</select>
<input class="button-secondary" type="submit" value="<?php
_e('Filter', 'wpml-translation-management');
示例5:
"><?php
echo TranslationManagement::status2text(ICL_TM_WAITING_FOR_TRANSLATOR);
?>
</option>
<option value="<?php
echo ICL_TM_IN_PROGRESS;
?>
"><?php
echo TranslationManagement::status2text(ICL_TM_IN_PROGRESS);
?>
</option>
<option value="<?php
echo ICL_TM_COMPLETE;
?>
"><?php
echo TranslationManagement::status2text(ICL_TM_COMPLETE);
?>
</option>
<option value="<?php
echo ICL_TM_DUPLICATE;
?>
"><?php
_e('Content duplication', 'wpml-translation-management');
?>
</option>
</select> <label for="filter-job-lang-from">
<?php
_e('From', 'wpml-translation-management');
?>
</label> <select id="filter-job-lang-from" name="filter[from]">
<option value=""><?php