feat:3.0.0版初次提交,新版将完全推倒重写

This commit is contained in:
sunxiyuan 2020-07-13 18:44:03 +08:00
parent e556c4b6d9
commit 39735249ee
293 changed files with 26908 additions and 475 deletions

View file

@ -0,0 +1,19 @@
<?php
/**
* File is actually a directory
*/
$this->extend('../layout');
?>
<div class="notice inline notice-error">
<h3 class="has-icon">
<?php esc_html_e('File is a directory','loco-translate')?>
</h3>
<p>
<?php esc_html_e("This page was expecting a file, but the path is actually a directory",'loco-translate')?>:
</p>
<p>
<code><?php $info->e('relpath')?></code>
</p>
</div>

View file

@ -0,0 +1,19 @@
<?php
/**
* File path not found
*/
$this->extend('../layout');
?>
<div class="notice inline notice-error">
<h3 class="has-icon">
<?php esc_html_e('File not found','loco-translate')?>
</h3>
<p>
<?php esc_html_e("Either this file is missing or the server doesn't have permission to access it",'loco-translate')?>:
</p>
<p>
<code class="path"><?php $params->e('path')?></code>
</p>
</div>

View file

@ -0,0 +1,17 @@
<?php
/**
* File security issue
*/
$this->extend('../layout');
?>
<div class="notice inline notice-error">
<h3 class="has-icon">
<?php esc_html_e('File access disallowed','loco-translate')?>
</h3>
<p>
<?php esc_html_e("Access to this file is blocked for security reasons",'loco-translate')?>:
<strong><?php $params->e('reason')?></strong>
</p>
</div>

View file

@ -0,0 +1,35 @@
<?php
/*
* Generic admin page error template
*/
$this->extend('../layout');
/* @var Loco_mvc_View $this */
/* @var Loco_error_Exception $error */
?>
<h1><?php echo esc_html( $error->getTitle() )?></h1>
<div class="notice inline notice-error">
<h3 class="has-icon">
<?php self::e( $error->getMessage() )?>
</h3><?php
/* @var Loco_mvc_FileParams $file */
if( $params->has('file') && $file->line ):?>
<p>
<code class="path"><?php $file->e('relpath')?>#<?php $file->e('line')?></code>
</p><?php
endif?>
</div>
<?php
/* @var Loco_mvc_ViewParams[] $trace */
if( $this->has('trace') ):
echo "<!-- DEBUG:\n";
foreach( $trace as $f ):
echo ' ',($f->has('class')?$f['class'].'::':''), $f->e('function'),' ', $f->e('file'),':',$f->e('line'), "\n";
endforeach;
echo " -->\n";
endif;

View file

@ -0,0 +1,26 @@
<?php
/**
* Information page when a file has no backups.
*/
$this->extend('../layout');
$help = esc_url( apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/settings') );
?>
<div class="notice inline notice-warning">
<h3><?php
esc_html_e('No previous file revisions','loco-translate')?>
</h3>
<p><?php
if( $enabled ):
esc_html_e('Backup files will be written when you save translations from Loco Translate editor','loco-translate');
else:
esc_html_e('File backups are disabled in your plugin settings','loco-translate');
endif?>.
</p>
<p class="submit">
<a href="<?php echo $help?>#po" target="_blank"><?php esc_html_e('Documentation','loco-translate')?></a>
<span>|</span>
<a href="<?php $this->route('config')->e('href')?>"><?php esc_html_e('Settings','loco-translate')?></a>
</p>
</div>

View file

@ -0,0 +1,17 @@
<?php
/*
* Full screen error when there are no installed files for a given locale
*/
$this->extend('../layout');
?>
<div class="notice inline notice-error">
<h3 class="has-icon">
<?php esc_html_e('No files found for this language','loco-translate')?>
</h3>
<p>
It may not be installed properly.
See <a href="https://codex.wordpress.org/Installing_WordPress_in_Your_Language">Installing WordPress in your language</a>.
</p>
</div>

View file

@ -0,0 +1,29 @@
<?php
/**
* Tokenizer extension required.
* Warning should also appear in the usual notices location. This page is just for information.
*/
$this->extend('../layout');
?>
<div class="notice inline notice-info">
<h3 class="has-icon">
<?php esc_html_e('About the Tokenizer','loco-translate')?>
</h3>
<p>
<?php
// Translators: change "en" in the URL to your language if it's available at http://php.net/docs.php
echo wp_kses(
__('Loco requires the <a href="http://php.net/manual/en/book.tokenizer.php" target="_blank">Tokenizer extension</a> to scan PHP source code for translatable strings','loco-translate'),
array('a'=>array('href'=>true,'target'=>true)), array('http','https')
);?>.
</p>
<p><?php
// Translators: %s is a URL. Keep the <a> tag intact
$help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/templates');
echo wp_kses(
sprintf( __('You can still translate any bundle that has a <a href="%s" target="_blank">template</a>','loco-translate'), $help ),
array('a'=>array('href'=>true,'target'=>true)), array('https')
);?>.
</p>
</div>