mirror of
https://github.com/WenPai-org/wp-china-yes.git
synced 2025-08-08 14:59:18 +08:00
feat:3.0.0版初次提交,新版将完全推倒重写
This commit is contained in:
parent
e556c4b6d9
commit
39735249ee
293 changed files with 26908 additions and 475 deletions
19
vendor/loco-translate/tpl/admin/bundle/alias.php
vendored
Normal file
19
vendor/loco-translate/tpl/admin/bundle/alias.php
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
/**
|
||||
* Special case for viewing Hello Dolly plugin
|
||||
* TODO implement package aliasing in a generic fashion as part of bundle configuration.
|
||||
*/
|
||||
$this->extend('../layout');
|
||||
?>
|
||||
|
||||
<div class="notice inline notice-info">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_attr_e('"Hello Dolly" is part of the WordPress core','loco-translate')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("This plugin doesn't have its own translation files, but can be translated in the default text domain", 'loco-translate')?>.
|
||||
</p>
|
||||
<p>
|
||||
<a href="<?php $params->e('redirect')?>"><?php esc_html_e('Go to WordPress Core','loco-translate')?></a>
|
||||
</p>
|
||||
</div>
|
163
vendor/loco-translate/tpl/admin/bundle/conf.php
vendored
Normal file
163
vendor/loco-translate/tpl/admin/bundle/conf.php
vendored
Normal file
|
@ -0,0 +1,163 @@
|
|||
<?php
|
||||
/**
|
||||
* Bundle configuration form
|
||||
*/
|
||||
$this->extend('../layout');
|
||||
?>
|
||||
|
||||
<form action="" method="post" enctype="application/x-www-form-urlencoded" id="loco-conf"><?php
|
||||
|
||||
/* @var $p Loco_mvc_ViewParams */
|
||||
foreach( $conf as $i => $p ): $id = sprintf('loco-conf-%u',$i)?>
|
||||
<div id="<?php echo $id?>">
|
||||
|
||||
<a href="#" tabindex="-1" class="has-icon icon-del"><span class="screen-reader-text">remove</span></a>
|
||||
<input type="hidden" name="<?php echo $p->prefix?>[removed]" value="" />
|
||||
|
||||
<?php
|
||||
// display package name, and slug if it differs.
|
||||
if( $p->name === $p->short ):?>
|
||||
<h2><?php $p->e('name')?></h2><?php
|
||||
else:?>
|
||||
<h2><?php $p->e('name')?> <span>(<?php $p->e('short')?>)</span></h2><?php
|
||||
endif;?>
|
||||
|
||||
<table class="form-table">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id?>-name"><?php esc_html_e('Project name','loco-translate')?></label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="<?php echo $p->prefix?>[name]" value="<?php $p->e('name')?>" id="<?php echo $id?>-name" class="regular-text" />
|
||||
<p class="description">
|
||||
<?php // Translators: Help tip for "Project name" field in advanced bundle config
|
||||
esc_html_e('Descriptive name for this set of translatable strings','loco-translate')?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id?>-domain"><?php esc_html_e('Text domain','loco-translate')?></label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="<?php echo $p->prefix?>[domain]" value="<?php $p->e('domain')?>" id="<?php echo $id?>-domain" class="regular-text" />
|
||||
<p class="description">
|
||||
<?php // Translators: Help tip for "Text domain" field in advanced bundle config
|
||||
esc_html_e('The namespace into which WordPress will load translated strings','loco-translate')?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id?>-slug"><?php esc_html_e('File prefix','loco-translate')?></label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="<?php echo $p->prefix?>[slug]" value="<?php $p->e('slug')?>" id="<?php echo $id?>-slug" class="regular-text" />
|
||||
<p class="description">
|
||||
<?php // Translators: Help tip for "File prefix" field in advanced bundle config
|
||||
esc_html_e("Usually the same as the text domain, but don't leave blank unless you mean to",'loco-translate')?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id?>-template"><?php esc_html_e('Template file','loco-translate')?></label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="<?php echo $p->prefix?>[template][path]" id="<?php echo $id?>-template" class="regular-text" value="<?php echo $p->escape( $p->template['path'] )?>" />
|
||||
<label>
|
||||
<input type="checkbox" value="1" name="<?php echo $p->prefix?>[template][locked]" <?php empty($p->template['locked']) || print('checked');?> />
|
||||
<?php esc_html_e('Locked','loco-translate')?>
|
||||
</label>
|
||||
<p class="description">
|
||||
<?php // Translators: Help tip for "Template file" field in advanced bundle config
|
||||
esc_html_e('Relative path from bundle root to the official POT file','loco-translate')?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id?>-target"><?php esc_html_e('Domain path','loco-translate')?></label>
|
||||
</th>
|
||||
<td class="twin">
|
||||
<div>
|
||||
<span class="description"><?php esc_html_e('Include','loco-translate')?>:</span>
|
||||
<textarea name="<?php echo $p->prefix?>[target][path]" id="<?php echo $id?>-target" rows="2" cols="30" class="large-text"><?php echo $p->escape( $p->target['path'] )?></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<span class="description"><?php esc_html_e('Exclude','loco-translate')?>:</span>
|
||||
<textarea name="<?php echo $p->prefix?>[target][exclude][path]" id="<?php echo $id?>-xtarget" rows="2" cols="30" class="large-text"><?php echo $p->escape( $p->target['exclude']['path'] )?></textarea>
|
||||
</div>
|
||||
<p class="description">
|
||||
<?php // Translators: Help tip for "Domain path" field in advanced bundle config
|
||||
esc_html_e('Folders within the bundle that contain author-supplied translations','loco-translate')?>. (<?php esc_html_e('no wildcards','loco-translate')?>)
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id?>-source"><?php esc_html_e('Source file paths','loco-translate')?></label>
|
||||
</th>
|
||||
<td class="twin">
|
||||
<div>
|
||||
<span class="description"><?php esc_html_e('Include','loco-translate')?>:</span>
|
||||
<textarea name="<?php echo $p->prefix?>[source][path]" id="<?php echo $id?>-source" rows="2" cols="30" class="large-text"><?php echo $p->escape( $p->source['path'] )?></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<span class="description"><?php esc_html_e('Exclude','loco-translate')?>:</span>
|
||||
<textarea name="<?php echo $p->prefix?>[source][exclude][path]" id="<?php echo $id?>-xsource" rows="2" cols="30" class="large-text"><?php echo $p->escape( $p->source['exclude']['path'] )?></textarea>
|
||||
</div>
|
||||
<p class="description">
|
||||
<?php // Translators: Help tip for "Source file paths" field in advanced bundle config
|
||||
esc_html_e('Files and folders within the bundle that contain localized PHP code','loco-translate')?>. (<?php esc_html_e('no wildcards','loco-translate')?>)
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><?php
|
||||
endforeach;?>
|
||||
|
||||
|
||||
<footer id="loco-form-foot">
|
||||
<table class="form-table">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<th scope="row">
|
||||
<label for="all-excl"><?php esc_html_e('Blocked paths','loco-translate')?>:</label>
|
||||
</th>
|
||||
<td>
|
||||
<textarea name="exclude[path]" id="all-excl" rows="3" cols="30" class="large-text"><?php echo $params->escape($excl['path'])?></textarea>
|
||||
<p class="description">
|
||||
<?php // Translators: Help tip for "Blocked paths" field in advanced bundle config
|
||||
esc_html_e('Folders within the bundle that will never be searched for files','loco-translate')?>. (<?php esc_html_e('no wildcards','loco-translate')?>)
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="submit" >
|
||||
<input type="submit" class="button-primary" value="<?php esc_html_e('Save config','loco-translate')?>" />
|
||||
<button type="button" class="button" disabled id="loco-add-butt"><?php esc_html_e('Add set','loco-translate')?></button><?php
|
||||
if( $params->parent ):?>
|
||||
<a class="button button-link has-icon icon-cog" href="<?php $parent->e('href')?>"><?php esc_html_e('Parent theme','loco-translate')?></a><?php
|
||||
endif?>
|
||||
<a class="button button-link has-icon icon-download" href="<?php $params->e('xmlUrl')?>"><?php esc_html_e('XML','loco-translate')?></a>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
<input type="hidden" name="<?php $nonce->e('name')?>" value="<?php $nonce->e('value')?>" />
|
||||
<input type="hidden" name="name" value="<?php $params->e('name')?>" />
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<?php if( 'db' === $saved ):?>
|
||||
<form action="" method="post" id="loco-reset">
|
||||
<p class="submit">
|
||||
<input type="submit" name="unconf" class="button button-danger" value="<?php esc_html_e('Reset config','loco-translate')?>" />
|
||||
<input type="hidden" name="<?php $nonce->e('name')?>" value="<?php $nonce->e('value')?>" />
|
||||
</p>
|
||||
</form><?php
|
||||
endif;
|
30
vendor/loco-translate/tpl/admin/bundle/debug.php
vendored
Normal file
30
vendor/loco-translate/tpl/admin/bundle/debug.php
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
/**
|
||||
* Show bundle diagnostics
|
||||
*/
|
||||
$this->extend('../layout');
|
||||
?>
|
||||
<p>
|
||||
<?php esc_html_e('This information is for developers to find problems in the bundle setup','loco-translate')?>.
|
||||
</p>
|
||||
<p data-vendor="<?php $meta->e('vendor')?>">
|
||||
<?php echo $meta->author?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
/* @var $notice Loco_mvc_ViewParams */
|
||||
foreach( $notices as $notice ):?>
|
||||
<div class="<?php $notice->e('style')?>">
|
||||
<p>
|
||||
<strong class="has-icon"> </strong>
|
||||
<?php $notice->e('body')?>
|
||||
</p>
|
||||
</div><?php
|
||||
endforeach;
|
||||
|
||||
if( $params->has('xml') ):?>
|
||||
<div class="notice inline notice-generic">
|
||||
<h4>Current configuration as XML:</h4>
|
||||
<pre><?php $params->e('xml')?></pre>
|
||||
</div><?php
|
||||
endif?>
|
13
vendor/loco-translate/tpl/admin/bundle/inc-po-links.php
vendored
Normal file
13
vendor/loco-translate/tpl/admin/bundle/inc-po-links.php
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* Links above PO files table
|
||||
*/
|
||||
?>
|
||||
<nav class="above-list-table"><?php
|
||||
/* @var $link Loco_mvc_ViewParams */
|
||||
foreach( $nav as $link ):?>
|
||||
<a class="has-icon icon-<?php $link->e('icon')?>" href="<?php $link->e('href')?>"><?php $link->e('name')?></a><?php
|
||||
endforeach;
|
||||
echo $this->render('../common/inc-table-filter');
|
||||
?>
|
||||
</nav>
|
108
vendor/loco-translate/tpl/admin/bundle/inc-po-table.php
vendored
Normal file
108
vendor/loco-translate/tpl/admin/bundle/inc-po-table.php
vendored
Normal file
|
@ -0,0 +1,108 @@
|
|||
<?php
|
||||
/**
|
||||
* Table of localised file pairs in a project
|
||||
*/
|
||||
|
||||
/* @var Loco_mvc_ViewParams[] $pairs */
|
||||
if( $pairs ):?>
|
||||
|
||||
<table class="wp-list-table widefat fixed striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sort-type="s">
|
||||
<?php esc_html_e('Language','loco-translate')?>
|
||||
</th>
|
||||
<th colspan="2" data-sort-type="n">
|
||||
<?php esc_html_e('Translation progress','loco-translate')?>
|
||||
</th>
|
||||
<th data-sort-type="n">
|
||||
<?php esc_html_e('Pending','loco-translate')?>
|
||||
</th>
|
||||
<th data-sort-type="s">
|
||||
<?php esc_html_e('File info','loco-translate')?>
|
||||
</th>
|
||||
<th data-sort-type="n">
|
||||
<?php esc_html_e('Last modified','loco-translate')?>
|
||||
</th>
|
||||
<th data-sort-type="s">
|
||||
<?php esc_html_e('Folder','loco-translate')?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php
|
||||
foreach( $pairs as $po ): $ispo = (bool) $po->lcode;?>
|
||||
<tr>
|
||||
<td class="has-row-actions" data-sort-value="<?php $po->e('lname')?>">
|
||||
<a href="<?php $po->e('edit')?>" class="row-title"><?php
|
||||
if( $ispo ):?>
|
||||
<span <?php echo $po->lattr?>><code><?php $po->e('lcode')?></code></span>
|
||||
<span><?php $po->e('lname')?></span><?php
|
||||
else:?>
|
||||
<span class="icon icon-file"></span>
|
||||
<span><?php esc_html_e('Template file','loco-translate')?></span><?php
|
||||
endif?>
|
||||
</a><?php
|
||||
if( $domain ):?>
|
||||
<nav class="row-actions">
|
||||
<span>
|
||||
<a href="<?php $po->e('edit')?>"><?php esc_html_e('Edit','loco-translate')?></a> |
|
||||
</span>
|
||||
<span>
|
||||
<a href="<?php $po->e('view')?>"><?php esc_html_e('View','loco-translate')?></a> |
|
||||
</span>
|
||||
<span>
|
||||
<a href="<?php $po->e('info')?>"><?php esc_html_e('Info','loco-translate')?></a> |
|
||||
</span>
|
||||
<span>
|
||||
<a href="<?php $po->e('copy')?>"><?php esc_html_e('Copy','loco-translate')?></a> |
|
||||
</span>
|
||||
<span class="trash">
|
||||
<a href="<?php $po->e('delete')?>"><?php esc_html_e('Delete','loco-translate')?></a>
|
||||
</span>
|
||||
</nav><?php
|
||||
endif?>
|
||||
</td><?php
|
||||
|
||||
if( $ispo ):?>
|
||||
<td data-sort-value="<?php echo $po->meta->getPercent()?>">
|
||||
<?php $po->meta->printProgress()?>
|
||||
</td>
|
||||
<td title="of <?php $po->n('total')?>">
|
||||
<?php echo $po->meta->getPercent()?>%
|
||||
</td>
|
||||
<td data-sort-value="<?php $po->f('todo','%u')?>">
|
||||
<?php $po->n('todo')?>
|
||||
</td><?php
|
||||
|
||||
else:?>
|
||||
<td data-sort-value="-1">
|
||||
-- <!-- no progress for template -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- no percentage for template -->
|
||||
</td>
|
||||
<td data-sort-value="-1">
|
||||
-- <!-- no pendingfor template -->
|
||||
</td><?php
|
||||
endif?>
|
||||
|
||||
<td data-sort-value="<?php $po->e('name')?>">
|
||||
<a href="<?php $po->e('info')?>"><?php $po->e('name')?></a>
|
||||
</td>
|
||||
<td data-sort-value="<?php $po->f('time','%u')?>">
|
||||
<time datetime="<?php $po->date('time','c')?>"><?php $po->date('time')?></time>
|
||||
</td>
|
||||
<td>
|
||||
<?php $po->e('store')?>
|
||||
</td>
|
||||
</tr><?php
|
||||
endforeach;?>
|
||||
</tbody>
|
||||
</table><?php
|
||||
else:?>
|
||||
<table class="wp-list-table widefat fixed striped">
|
||||
<tr>
|
||||
<td><?php self::e( __('No translations found for "%s"','loco-translate'), $domain )?></td>
|
||||
</tr>
|
||||
</table><?php
|
||||
endif;
|
121
vendor/loco-translate/tpl/admin/bundle/locale.php
vendored
Normal file
121
vendor/loco-translate/tpl/admin/bundle/locale.php
vendored
Normal file
|
@ -0,0 +1,121 @@
|
|||
<?php
|
||||
/**
|
||||
* Listing of all files within a locale, grouped by bundle
|
||||
*/
|
||||
|
||||
$this->extend('../layout');
|
||||
?>
|
||||
|
||||
<div class="notice inline notice-info">
|
||||
<h3 class="has-lang">
|
||||
<span <?php echo $locale->attr?>><code><?php $locale->e('code')?></code></span>
|
||||
<span><?php $locale->e('name')?></span>
|
||||
<span class="loco-meta">
|
||||
<span><?php echo esc_html_x('Updated','Modified time','loco-translate')?>:</span>
|
||||
<span><?php $params->date('modified')?></span>
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
foreach( $translations as $t => $group ): $type = $types[$t];?>
|
||||
<div class="loco-projects">
|
||||
<h3>
|
||||
<?php $type->e('name')?>
|
||||
</h3><?php
|
||||
echo $this->render('../common/inc-table-filter');
|
||||
?>
|
||||
<table class="wp-list-table widefat fixed striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sort-type="s">
|
||||
<?php esc_html_e('Bundle name','loco-translate')?>
|
||||
</th><?php
|
||||
if( $npofiles ):?>
|
||||
<th colspan="2" data-sort-type="n">
|
||||
<?php esc_html_e('Translation progress','loco-translate')?>
|
||||
</th>
|
||||
<th data-sort-type="n">
|
||||
<?php esc_html_e('Pending','loco-translate')?>
|
||||
</th><?php
|
||||
endif?>
|
||||
<th data-sort-type="s">
|
||||
<?php esc_html_e('File info','loco-translate')?>
|
||||
</th>
|
||||
<th data-sort-type="n">
|
||||
<?php esc_html_e('Last modified','loco-translate')?>
|
||||
</th>
|
||||
<th data-sort-type="s">
|
||||
<?php esc_html_e('Folder','loco-translate')?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php
|
||||
/* @var Loco_mvc_ViewParams $po */
|
||||
foreach( $group as $po ): ?>
|
||||
<tr>
|
||||
<td class="has-row-actions" data-sort-value="<?php $po->e('lname')?>">
|
||||
<a href="<?php $po->e('edit')?>" class="row-title">
|
||||
<?php $po->e('title')?>
|
||||
</a>
|
||||
<nav class="row-actions">
|
||||
<span>
|
||||
<a href="<?php $po->e('edit')?>"><?php esc_html_e('Edit','loco-translate')?></a> |
|
||||
</span>
|
||||
<span>
|
||||
<a href="<?php $po->e('view')?>"><?php esc_html_e('View','loco-translate')?></a> |
|
||||
</span>
|
||||
<span>
|
||||
<a href="<?php $po->e('info')?>"><?php esc_html_e('Info','loco-translate')?></a> |
|
||||
</span>
|
||||
<span>
|
||||
<a href="<?php $po->e('copy')?>"><?php esc_html_e('Copy','loco-translate')?></a> |
|
||||
</span>
|
||||
<span class="trash">
|
||||
<a href="<?php $po->e('delete')?>"><?php esc_html_e('Delete','loco-translate')?></a>
|
||||
</span>
|
||||
</nav>
|
||||
</td><?php
|
||||
if( $npofiles ):
|
||||
if( 'PO' === $po->type ):?>
|
||||
<td data-sort-value="<?php echo $po->meta->getPercent()?>">
|
||||
<?php $po->meta->printProgress()?>
|
||||
</td>
|
||||
<td title="of <?php $po->n('total')?>">
|
||||
<?php echo $po->meta->getPercent()?>%
|
||||
</td>
|
||||
<td data-sort-value="<?php $po->f('todo','%u')?>">
|
||||
<?php $po->n('todo')?>
|
||||
</td><?php
|
||||
|
||||
else:?>
|
||||
<td data-sort-value="-1">
|
||||
-- <!-- no progress for template -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- no percentage for template -->
|
||||
</td>
|
||||
<td data-sort-value="-1">
|
||||
-- <!-- no pending for template -->
|
||||
</td><?php
|
||||
endif;
|
||||
endif?>
|
||||
|
||||
<td data-sort-value="<?php $po->e('name')?>">
|
||||
<a href="<?php $po->e('info')?>"><?php $po->e('name')?></a>
|
||||
</td>
|
||||
<td data-sort-value="<?php $po->f('time','%u')?>">
|
||||
<time datetime="<?php $po->date('time','Y-m-d H:i:s')?>"><?php $po->date('time')?></time>
|
||||
</td>
|
||||
<td>
|
||||
<?php $po->e('store')?>
|
||||
</td>
|
||||
</tr><?php
|
||||
endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
<a href="<?php $type->e('href')?>" class="button button-link has-raquo"><?php $type->e('text')?></a>
|
||||
</p>
|
||||
</div><?php
|
||||
endforeach;
|
20
vendor/loco-translate/tpl/admin/bundle/setup.php
vendored
Normal file
20
vendor/loco-translate/tpl/admin/bundle/setup.php
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
/**
|
||||
* Bundle setup layout.
|
||||
* See setup/*.php for header definitions
|
||||
*/
|
||||
$this->extend('../layout');
|
||||
echo $header;
|
||||
|
||||
?>
|
||||
<div class="notice inline notice-generic">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('Author details','loco-translate')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e('If you have trouble translating this bundle, consider asking the author for help','loco-translate')?>.
|
||||
</p>
|
||||
<p>
|
||||
<?php echo $credit?>
|
||||
</p>
|
||||
</div>
|
18
vendor/loco-translate/tpl/admin/bundle/setup/author.php
vendored
Normal file
18
vendor/loco-translate/tpl/admin/bundle/setup/author.php
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
/**
|
||||
* Bundle is configured by official author
|
||||
*/
|
||||
$this->extend('../setup');
|
||||
$this->start('header');
|
||||
?>
|
||||
|
||||
<div class="notice inline notice-success">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('Official configuration','loco-translate')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("This bundle's configuration is provided by the author",'loco-translate')?>.
|
||||
<?php esc_html_e("You can make changes in the Advanced tab if you need to override the current settings",'loco-translate')?>.
|
||||
</p>
|
||||
<?php echo $this->render('inc-nav')?>
|
||||
</div>
|
81
vendor/loco-translate/tpl/admin/bundle/setup/conf.php
vendored
Normal file
81
vendor/loco-translate/tpl/admin/bundle/setup/conf.php
vendored
Normal file
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
/**
|
||||
* "auto" config options
|
||||
*/
|
||||
$this->extend('../setup');
|
||||
$this->start('header');
|
||||
|
||||
|
||||
if( $params->has('jsonFields') ):?>
|
||||
<form action="" method="post" enctype="application/x-www-form-urlencoded" class="notice inline notice-generic jsonly" id="loco-remote">
|
||||
<h3>
|
||||
<?php esc_html_e('Check config repository','loco-translate')?>
|
||||
</h3>
|
||||
<fieldset id="loco-remote-query">
|
||||
<p>
|
||||
<?php esc_html_e("We have a database of non-standard bundle configurations.\nIf we know your bundle, we'll configure it for you automatically",'loco-translate')?>
|
||||
</p>
|
||||
<p>
|
||||
<select name="vendor">
|
||||
<option value="wordpress"><?php esc_html_e('WordPress','default')?></option>
|
||||
</select>
|
||||
<input type="text" name="slug" value="<?php $params->e('vendorSlug')?>" class="regular-text" />
|
||||
</p>
|
||||
</fieldset>
|
||||
<div id="loco-remote-empty">
|
||||
<p>
|
||||
<button type="button" class="button button-primary"><?php esc_html_e('Find config','loco-translate')?></button>
|
||||
<a href="<?php $tabs[1]->e('href')?>" class="button button-link"><?php esc_html_e('Cancel','default')?></a>
|
||||
<span></span>
|
||||
</p>
|
||||
</div>
|
||||
<div id="loco-remote-found" class="jshide">
|
||||
<p>
|
||||
<input type="submit" class="button button-success" name="json-setup" value="<?php esc_attr_e('OK, Load this config','loco-translate')?>" />
|
||||
<input type="reset" class="button button-link" value="<?php esc_attr_e('Cancel','default')?>" />
|
||||
</p>
|
||||
</div>
|
||||
<?php $jsonFields->_e()?>
|
||||
</form><?php
|
||||
endif;
|
||||
|
||||
|
||||
if( $params->has('xmlFields') ):?>
|
||||
<form action="" method="post" enctype="application/x-www-form-urlencoded" class="notice inline notice-generic">
|
||||
<h3>
|
||||
<?php esc_html_e('XML setup','loco-translate')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("If you've been given a configuration file by a developer, paste the XML code here",'loco-translate')?>:
|
||||
</p>
|
||||
<fieldset>
|
||||
<textarea name="xml-content" class="large-text" rows="3" wrap="virtual"></textarea>
|
||||
</fieldset>
|
||||
<p>
|
||||
<input type="submit" class="button button-primary" name="xml-setup" value="<?php esc_html_e('Load config','loco-translate')?>" />
|
||||
<a href="<?php $tabs[1]->e('href')?>" class="button button-link"><?php esc_html_e('Cancel','default')?></a>
|
||||
</p>
|
||||
<?php $xmlFields->_e()?>
|
||||
</form><?php
|
||||
endif;
|
||||
|
||||
|
||||
if( $params->has('autoFields') ):?>
|
||||
<form action="" method="post" enctype="application/x-www-form-urlencoded" class="notice inline notice-generic">
|
||||
<h3>
|
||||
Auto setup
|
||||
</h3>
|
||||
<p>
|
||||
We can make some guesses about how this bundle is set up, but we can't guarantee they'll be right.
|
||||
</p>
|
||||
<p>
|
||||
This is not recommended unless you're a developer able to make manual changes afterwards.
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" class="button button-primary" name="auto-setup" value="Guess config" />
|
||||
</p>
|
||||
<?php $autoFields->_e()?>
|
||||
</form><?php
|
||||
endif;
|
||||
|
||||
|
20
vendor/loco-translate/tpl/admin/bundle/setup/core.php
vendored
Normal file
20
vendor/loco-translate/tpl/admin/bundle/setup/core.php
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
/**
|
||||
* Bundle is set up internally
|
||||
*/
|
||||
$this->extend('../../layout');
|
||||
?>
|
||||
|
||||
<div class="notice inline notice-success">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('Bundle auto-configured','loco-translate')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("This bundle's configuration is built into Loco",'loco-translate')?>.
|
||||
<?php esc_html_e("You can make changes in the Advanced tab if you need to override the current settings",'loco-translate')?>.
|
||||
</p>
|
||||
<p class="submit">
|
||||
<a href="<?php $tabs[2]->e('href')?>" class="button button-link has-icon icon-wrench"><?php esc_html_e('Advanced configuration','loco-translate')?></a>
|
||||
</p>
|
||||
</div>
|
||||
|
26
vendor/loco-translate/tpl/admin/bundle/setup/inc-nav.php
vendored
Normal file
26
vendor/loco-translate/tpl/admin/bundle/setup/inc-nav.php
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
/**
|
||||
* Common links below variable setup header.
|
||||
*/
|
||||
|
||||
$help = esc_url( apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/bundle-setup') );
|
||||
|
||||
if( $params->has('notices') ):?>
|
||||
<ul class="problems"><?php
|
||||
foreach( $params->notices as $text ):?>
|
||||
<li class="has-icon icon-remove">
|
||||
<?php echo $params->escape( $text )?>
|
||||
</li><?php
|
||||
endforeach?>
|
||||
</ul><?php
|
||||
endif?>
|
||||
|
||||
<p class="submit">
|
||||
<a href="<?php $tabs[2]->e('href')?>" class="button button-link has-icon icon-wrench"><?php esc_html_e('Advanced configuration','loco-translate')?></a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="<?php $tabs[1]->e('href')?>&xml=1" class="button button-link has-icon icon-upload"><?php esc_html_e('Import config from XML','loco-translate')?></a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="<?php echo $help?>" class="button button-link has-icon icon-help" target="_blank"><?php esc_html_e('Get help with this','loco-translate')?></a>
|
||||
</p>
|
18
vendor/loco-translate/tpl/admin/bundle/setup/meta.php
vendored
Normal file
18
vendor/loco-translate/tpl/admin/bundle/setup/meta.php
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
/**
|
||||
* Bundle is set up fully from self-declared metadata
|
||||
*/
|
||||
$this->extend('../setup');
|
||||
$this->start('header');
|
||||
?>
|
||||
|
||||
<div class="notice inline notice-success">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('Bundle auto-configured','loco-translate')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("This bundle's configuration has been automatically detected and seems to be fully compatible",'loco-translate')?>.
|
||||
<?php esc_html_e("You can make changes in the Advanced tab if you need to override the current settings",'loco-translate')?>.
|
||||
</p>
|
||||
<?php echo $this->render('inc-nav')?>
|
||||
</div>
|
18
vendor/loco-translate/tpl/admin/bundle/setup/none.php
vendored
Normal file
18
vendor/loco-translate/tpl/admin/bundle/setup/none.php
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
/**
|
||||
* Bundle is not set up at all
|
||||
*/
|
||||
$this->extend('../setup');
|
||||
$this->start('header');
|
||||
?>
|
||||
|
||||
<div class="notice inline notice-error">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('Unconfigured bundle','loco-translate')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e('This bundle isn\'t set up for translation in a way we understand','loco-translate')?>.
|
||||
<?php esc_html_e('It needs configuring before you can do any translations','loco-translate')?>.
|
||||
</p>
|
||||
<?php echo $this->render('inc-nav')?>
|
||||
</div>
|
18
vendor/loco-translate/tpl/admin/bundle/setup/partial.php
vendored
Normal file
18
vendor/loco-translate/tpl/admin/bundle/setup/partial.php
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
/**
|
||||
* Bundle is set up from self-declared metadata, but has some missing bits
|
||||
*/
|
||||
$this->extend('../setup');
|
||||
$this->start('header');
|
||||
?>
|
||||
|
||||
<div class="notice inline notice-warning">
|
||||
<h3 class="has-icon icon-info">
|
||||
<?php esc_html_e('Partially configured bundle','loco-translate')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("This bundle's configuration has been automatically detected, but isn't fully complete",'loco-translate')?>.
|
||||
</p>
|
||||
<?php echo $this->render('inc-nav')?>
|
||||
</div>
|
||||
|
23
vendor/loco-translate/tpl/admin/bundle/setup/saved.php
vendored
Normal file
23
vendor/loco-translate/tpl/admin/bundle/setup/saved.php
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* Bundle is saved in database, but can be reset
|
||||
*/
|
||||
$this->extend('../setup');
|
||||
$this->start('header');
|
||||
?>
|
||||
|
||||
<div class="notice inline notice-info">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('Bundle configuration saved','loco-translate')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("This bundle's configuration is saved in the WordPress database",'loco-translate')?>.
|
||||
</p>
|
||||
<form action="" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<p class="submit">
|
||||
<input type="submit" name="reset-setup" class="button button-danger" value="<?php esc_html_e('Reset config','loco-translate')?>" />
|
||||
<a href="<?php $tabs[2]->e('href')?>" class="button button-link has-icon icon-wrench"><?php esc_html_e('Edit config','loco-translate')?></a>
|
||||
</p>
|
||||
<?php $reset->_e()?>
|
||||
</form>
|
||||
</div>
|
68
vendor/loco-translate/tpl/admin/bundle/view.php
vendored
Normal file
68
vendor/loco-translate/tpl/admin/bundle/view.php
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
/**
|
||||
* Bundle overview
|
||||
*/
|
||||
$this->extend('../layout');
|
||||
|
||||
/* @var Loco_mvc_ViewParams[] $projects */
|
||||
/* @var Loco_mvc_ViewParams[] $unknown */
|
||||
if( $projects ):
|
||||
foreach( $projects as $p ): ?>
|
||||
<div class="loco-project" id="loco-<?php $p->e('id')?>"><?php
|
||||
|
||||
// display package name, and slug if it differs.
|
||||
if( $p->name === $p->short ):?>
|
||||
<h2><?php $p->e('name')?></h2><?php
|
||||
else:?>
|
||||
<h2><?php $p->e('name')?> <span>(<?php $p->e('short')?>)</span></h2><?php
|
||||
endif;
|
||||
|
||||
echo $this->render('inc-po-links', array( 'nav' => $p->nav ) );
|
||||
echo $this->render('inc-po-table', array( 'pairs' => $p->po, 'domain' => $p->domain ) );
|
||||
?>
|
||||
|
||||
</div><?php
|
||||
endforeach;
|
||||
if( $unknown ):?>
|
||||
<div class="loco-project">
|
||||
<div class="notice inline notice-info">
|
||||
<h2><?php esc_html_e('Additional files found','loco-translate')?></h2>
|
||||
<p>
|
||||
<?php
|
||||
esc_html_e("This bundle isn't fully configured, so we don't know what the following files are for",'loco-translate')?>. <?php
|
||||
// Translators: %s is a URL. Keep the <a> tag intact
|
||||
echo wp_kses(
|
||||
sprintf( __('Click the <a href="%s">setup</a> tab to complete the bundle configuration','loco-translate'), $tabs[1]->href ),
|
||||
array('a'=>array('href'=>true)), array('http','https')
|
||||
);?>.
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->render('../common/inc-table-filter');
|
||||
echo $this->render('inc-po-table', array( 'pairs' => $unknown, 'domain' => null ) )?>
|
||||
</div><?php
|
||||
endif;
|
||||
|
||||
|
||||
|
||||
// showing incompatibility message if no configured projects available
|
||||
else:?>
|
||||
<div class="loco-project">
|
||||
<div class="notice inline notice-error">
|
||||
<h2><?php $params->e('name')?> <span>(<?php esc_html_e('unconfigured','loco-translate')?>)</span></h2>
|
||||
<p>
|
||||
<?php
|
||||
esc_html_e("This bundle isn't automatically compatible and requires configuring before you can use all the functions of Loco Translate",'loco-translate')?>. <?php
|
||||
echo wp_kses(
|
||||
sprintf( __('Click the <a href="%s">setup</a> tab to complete the bundle configuration','loco-translate'), $tabs[1]->href ),
|
||||
array('a'=>array('href'=>true)), array('http','https')
|
||||
);?>.
|
||||
</p>
|
||||
</div>
|
||||
</div><?php
|
||||
if( $unknown ):?>
|
||||
<div class="loco-project">
|
||||
<?php echo $this->render('inc-po-table', array( 'pairs' => $unknown, 'domain' => null ) )?>
|
||||
</div><?php
|
||||
endif;
|
||||
endif;
|
Loading…
Add table
Add a link
Reference in a new issue