mirror of
https://github.com/WenPai-org/wp-china-yes.git
synced 2025-08-04 20:19:53 +08:00
feat:提供i18n支持
This commit is contained in:
parent
f10986e350
commit
45e77a673a
117 changed files with 2455 additions and 550 deletions
|
@ -0,0 +1 @@
|
|||
{"translation-revision-date":"2020-06-23 00:57:46+0000","generator":"GlotPress\/3.0.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=1; plural=0;","lang":"zh_CN"},"%s string updated":["%s\u5b57\u7b26\u4e32\u5df2\u66f4\u65b0"],"%s string translated via %s":["\u5df2\u7ffb\u8bd1%s\u4e2a\u5b57\u7b26\u4e32\u7531%s"],"1 string marked Fuzzy":["%s\u5b57\u7b26\u4e32\u88ab\u6807\u8bb0\u4e3a\u6a21\u7cca"],"Translation job aborted with one string remaining":["\u7ffb\u8bd1\u5de5\u4f5c\u4e2d\u6b62\uff0c\u5269\u4e0b%s\u5b57\u7b26\u4e32"],"1 new string added":["\u6dfb\u52a0\u4e86%s \u4e2a\u65b0\u5b57\u7b26\u4e32"],"1 obsolete string removed":["\u5220\u9664\u4e86%s \u4e2a\u8fc7\u65f6\u7684\u5b57\u7b26\u4e32"],"1 string":["%s \u4e2a\u5b57\u7b26\u4e32"]}},"comment":{"reference":"pub\/js\/min\/editor.js"}}
|
BIN
languages/wp-china-yes-zh_CN.mo
Normal file
BIN
languages/wp-china-yes-zh_CN.mo
Normal file
Binary file not shown.
1889
languages/wp-china-yes-zh_CN.po
Normal file
1889
languages/wp-china-yes-zh_CN.po
Normal file
File diff suppressed because it is too large
Load diff
|
@ -126,7 +126,7 @@ function loco_check_extension( $name ) {
|
|||
$cache[ $name ] = true;
|
||||
}
|
||||
else {
|
||||
Loco_error_AdminNotices::warn( sprintf( __('Loco requires the "%s" PHP extension. Ask your hosting provider to install it','loco-translate'), $name ) );
|
||||
Loco_error_AdminNotices::warn( sprintf( __('Loco requires the "%s" PHP extension. Ask your hosting provider to install it','wp-china-yes'), $name ) );
|
||||
$class = 'Loco_compat_'.ucfirst($name).'Extension.php';
|
||||
$cache[$name] = class_exists($class);
|
||||
}
|
||||
|
|
|
@ -301,7 +301,7 @@ class Loco_Locale implements JsonSerializable {
|
|||
}
|
||||
}
|
||||
else {
|
||||
$this->setName( __('Invalid locale','loco-translate') );
|
||||
$this->setName( __('Invalid locale','wp-china-yes') );
|
||||
}
|
||||
return $this->getName();
|
||||
}
|
||||
|
@ -380,7 +380,7 @@ class Loco_Locale implements JsonSerializable {
|
|||
// handle languages with no plural forms, where n is always 0
|
||||
if( ! isset($raw[1][1]) ){
|
||||
// Translators: Plural category for languages that have no plurals
|
||||
$raw[1] = array( _x('All forms','Plural category','loco-translate') );
|
||||
$raw[1] = array( _x('All forms','Plural category','wp-china-yes') );
|
||||
$raw[0] = '0';
|
||||
}
|
||||
// else translate all implemented plural forms
|
||||
|
@ -388,17 +388,17 @@ class Loco_Locale implements JsonSerializable {
|
|||
else {
|
||||
$forms = array(
|
||||
// Translators: Plural category for zero quantity
|
||||
'zero' => _x('Zero','Plural category','loco-translate'),
|
||||
'zero' => _x('Zero','Plural category','wp-china-yes'),
|
||||
// Translators: Plural category for singular quantity
|
||||
'one' => _x('One','Plural category','loco-translate'),
|
||||
'one' => _x('One','Plural category','wp-china-yes'),
|
||||
// Translators: Plural category used in some multi-plural languages
|
||||
'two' => _x('Two','Plural category','loco-translate'),
|
||||
'two' => _x('Two','Plural category','wp-china-yes'),
|
||||
// Translators: Plural category used in some multi-plural languages
|
||||
'few' => _x('Few','Plural category','loco-translate'),
|
||||
'few' => _x('Few','Plural category','wp-china-yes'),
|
||||
// Translators: Plural category used in some multi-plural languages
|
||||
'many' => _x('Many','Plural category','loco-translate'),
|
||||
'many' => _x('Many','Plural category','wp-china-yes'),
|
||||
// Translators: General plural category not covered by other forms
|
||||
'other' => _x('Other','Plural category','loco-translate'),
|
||||
'other' => _x('Other','Plural category','wp-china-yes'),
|
||||
);
|
||||
foreach( $raw[1] as $k => $v ){
|
||||
if( isset($forms[$v]) ){
|
||||
|
|
|
@ -38,10 +38,10 @@ class Loco_admin_Navigation extends ArrayIterator {
|
|||
'href' => Loco_mvc_AdminRouter::generate($type),
|
||||
) );
|
||||
if( 'theme' === $type ){
|
||||
$link['name'] = __('Themes','loco-translate');
|
||||
$link['name'] = __('Themes','wp-china-yes');
|
||||
}
|
||||
else {
|
||||
$link['name'] = __('Plugins','loco-translate');
|
||||
$link['name'] = __('Plugins','wp-china-yes');
|
||||
}
|
||||
$nav[] = $link;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ class Loco_admin_RootController extends Loco_admin_list_BaseController {
|
|||
public function render(){
|
||||
|
||||
// translators: home screen title where %s is the version number
|
||||
$this->set('title', sprintf( __('Loco Translate %s','loco-translate'), loco_plugin_version() ) );
|
||||
$this->set('title', sprintf( __('Loco Translate %s','wp-china-yes'), loco_plugin_version() ) );
|
||||
|
||||
// Show currently active theme on home page
|
||||
$theme = Loco_package_Theme::create(null);
|
||||
|
@ -81,7 +81,7 @@ class Loco_admin_RootController extends Loco_admin_list_BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
$this->set('title', __('Welcome to Loco Translate','loco-translate') );
|
||||
$this->set('title', __('Welcome to Loco Translate','wp-china-yes') );
|
||||
|
||||
return $this->view('admin/root');
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ abstract class Loco_admin_bundle_BaseController extends Loco_mvc_AdminController
|
|||
protected function saveBundle(){
|
||||
$custom = new Loco_config_CustomSaved;
|
||||
if( $custom->setBundle($this->bundle)->persist() ){
|
||||
Loco_error_AdminNotices::success( __('Configuration saved','loco-translate') );
|
||||
Loco_error_AdminNotices::success( __('Configuration saved','wp-china-yes') );
|
||||
}
|
||||
// invalidate bundle in memory so next fetch is re-configured from DB
|
||||
$this->bundle = null;
|
||||
|
@ -50,7 +50,7 @@ abstract class Loco_admin_bundle_BaseController extends Loco_mvc_AdminController
|
|||
protected function resetBundle(){
|
||||
$option = $this->bundle->getCustomConfig();
|
||||
if( $option && $option->remove() ){
|
||||
Loco_error_AdminNotices::success( __('Configuration reset','loco-translate') );
|
||||
Loco_error_AdminNotices::success( __('Configuration reset','wp-china-yes') );
|
||||
// invalidate bundle in memory so next fetch falls back to auto-config
|
||||
$this->bundle = null;
|
||||
}
|
||||
|
@ -92,12 +92,12 @@ abstract class Loco_admin_bundle_BaseController extends Loco_mvc_AdminController
|
|||
$tabs = new Loco_admin_Navigation;
|
||||
$this->set( 'tabs', $tabs );
|
||||
$actions = array (
|
||||
'view' => __('Overview','loco-translate'),
|
||||
'setup' => __('Setup','loco-translate'),
|
||||
'conf' => __('Advanced','loco-translate'),
|
||||
'view' => __('Overview','wp-china-yes'),
|
||||
'setup' => __('Setup','wp-china-yes'),
|
||||
'conf' => __('Advanced','wp-china-yes'),
|
||||
);
|
||||
if( loco_debugging() ){
|
||||
$actions['debug'] = __('Debug','loco-translate');
|
||||
$actions['debug'] = __('Debug','wp-china-yes');
|
||||
}
|
||||
$suffix = $this->get('action');
|
||||
$prefix = strtolower( $this->get('type') );
|
||||
|
|
|
@ -13,7 +13,7 @@ class Loco_admin_bundle_ConfController extends Loco_admin_bundle_BaseController
|
|||
$this->enqueueScript('config');
|
||||
$bundle = $this->getBundle();
|
||||
// translators: where %s is a plugin or theme
|
||||
$this->set( 'title', sprintf( __('Configure %s','loco-translate'),$bundle->getName() ) );
|
||||
$this->set( 'title', sprintf( __('Configure %s','wp-china-yes'),$bundle->getName() ) );
|
||||
|
||||
$post = Loco_mvc_PostParams::get();
|
||||
// always set a nonce for current bundle
|
||||
|
@ -52,7 +52,7 @@ class Loco_admin_bundle_ConfController extends Loco_admin_bundle_BaseController
|
|||
*/
|
||||
public function getHelpTabs(){
|
||||
return array (
|
||||
__('Advanced tab','loco-translate') => $this->viewSnippet('tab-bundle-conf'),
|
||||
__('Advanced tab','wp-china-yes') => $this->viewSnippet('tab-bundle-conf'),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ class Loco_admin_bundle_ConfController extends Loco_admin_bundle_BaseController
|
|||
if( $parent && $parent->hasProject($project) ){
|
||||
// warn if child theme uses parent theme's text domain (but allowing to render so we don't get an empty form.
|
||||
if( $project === $default ){
|
||||
Loco_error_AdminNotices::warn( __("Child theme declares the same Text Domain as the parent theme",'loco-translate') );
|
||||
Loco_error_AdminNotices::warn( __("Child theme declares the same Text Domain as the parent theme",'wp-china-yes') );
|
||||
}
|
||||
// else safe to remove parent theme configuration as it should be held in its own bundle
|
||||
else {
|
||||
|
@ -137,7 +137,7 @@ class Loco_admin_bundle_ConfController extends Loco_admin_bundle_BaseController
|
|||
$this->set( 'xmlUrl', Loco_mvc_AjaxRouter::generate( 'DownloadConf', $args ) );
|
||||
$this->set( 'manUrl', apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/bundle-config') );
|
||||
|
||||
$this->prepareNavigation()->add( __('Advanced configuration','loco-translate') );
|
||||
$this->prepareNavigation()->add( __('Advanced configuration','wp-china-yes') );
|
||||
return $this->view('admin/bundle/conf', compact('conf','base','name','excl') );
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ class Loco_admin_bundle_DebugController extends Loco_admin_bundle_BaseController
|
|||
*/
|
||||
public function render(){
|
||||
|
||||
$this->prepareNavigation()->add( __('Bundle diagnostics','loco-translate') );
|
||||
$this->prepareNavigation()->add( __('Bundle diagnostics','wp-china-yes') );
|
||||
|
||||
$bundle = $this->getBundle();
|
||||
$debugger = new Loco_package_Debugger($bundle);
|
||||
|
|
|
@ -113,7 +113,7 @@ class Loco_admin_bundle_LocaleController extends Loco_mvc_AdminController {
|
|||
) );
|
||||
}
|
||||
|
||||
$title = __( 'Installed languages', 'loco-translate' );
|
||||
$title = __( 'Installed languages', 'wp-china-yes' );
|
||||
$breadcrumb = new Loco_admin_Navigation;
|
||||
$breadcrumb->add( $title, Loco_mvc_AdminRouter::generate('lang') );
|
||||
//$breadcrumb->add( $locale->getName() );
|
||||
|
@ -126,25 +126,25 @@ class Loco_admin_bundle_LocaleController extends Loco_mvc_AdminController {
|
|||
|
||||
// files may be available for language even if not installed (i.e. no core files on disk)
|
||||
if( ! $installed || ! isset($translations['core']) && 'en_US' !== $tag ){
|
||||
Loco_error_AdminNotices::warn( __('No core translation files are installed for this language','loco-translate') )
|
||||
->addLink('https://codex.wordpress.org/Installing_WordPress_in_Your_Language', __('Documentation','loco-translate') );
|
||||
Loco_error_AdminNotices::warn( __('No core translation files are installed for this language','wp-china-yes') )
|
||||
->addLink('https://codex.wordpress.org/Installing_WordPress_in_Your_Language', __('Documentation','wp-china-yes') );
|
||||
}
|
||||
|
||||
// Translated type labels and "See all <type>" links
|
||||
$types = array(
|
||||
'core' => new Loco_mvc_ViewParams( array(
|
||||
'name' => __('WordPress Core','loco-translate'),
|
||||
'text' => __('See all core translations','loco-translate'),
|
||||
'name' => __('WordPress Core','wp-china-yes'),
|
||||
'text' => __('See all core translations','wp-china-yes'),
|
||||
'href' => Loco_mvc_AdminRouter::generate('core')
|
||||
) ),
|
||||
'theme' => new Loco_mvc_ViewParams( array(
|
||||
'name' => __('Themes','loco-translate'),
|
||||
'text' => __('See all themes','loco-translate'),
|
||||
'name' => __('Themes','wp-china-yes'),
|
||||
'text' => __('See all themes','wp-china-yes'),
|
||||
'href' => Loco_mvc_AdminRouter::generate('theme')
|
||||
) ),
|
||||
'plugin' => new Loco_mvc_ViewParams( array(
|
||||
'name' => __('Plugins','loco-translate'),
|
||||
'text' => __('See all plugins','loco-translate'),
|
||||
'name' => __('Plugins','wp-china-yes'),
|
||||
'text' => __('See all plugins','wp-china-yes'),
|
||||
'href' => Loco_mvc_AdminRouter::generate('plugin')
|
||||
) ),
|
||||
);
|
||||
|
|
|
@ -12,7 +12,7 @@ class Loco_admin_bundle_SetupController extends Loco_admin_bundle_BaseController
|
|||
$bundle = $this->getBundle();
|
||||
|
||||
// translators: where %s is a plugin or theme
|
||||
$this->set( 'title', sprintf( __('Set up %s','loco-translate'),$bundle->getName() ) );
|
||||
$this->set( 'title', sprintf( __('Set up %s','wp-china-yes'),$bundle->getName() ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@ class Loco_admin_bundle_SetupController extends Loco_admin_bundle_BaseController
|
|||
*/
|
||||
public function getHelpTabs(){
|
||||
return array (
|
||||
__('Setup tab','loco-translate') => $this->viewSnippet('tab-bundle-setup'),
|
||||
__('Setup tab','wp-china-yes') => $this->viewSnippet('tab-bundle-setup'),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ class Loco_admin_bundle_SetupController extends Loco_admin_bundle_BaseController
|
|||
*/
|
||||
public function render(){
|
||||
|
||||
$this->prepareNavigation()->add( __('Bundle setup','loco-translate') );
|
||||
$this->prepareNavigation()->add( __('Bundle setup','wp-china-yes') );
|
||||
$bundle = $this->getBundle();
|
||||
$action = 'setup:'.$bundle->getId();
|
||||
|
||||
|
@ -111,7 +111,7 @@ class Loco_admin_bundle_SetupController extends Loco_admin_bundle_BaseController
|
|||
$n += count($files);
|
||||
}
|
||||
if( $n ){
|
||||
$notices[] = sprintf( _n("One file can't be matched to a known set of strings","%s files can't be matched to a known set of strings",$n,'loco-translate'), number_format($n) );
|
||||
$notices[] = sprintf( _n("One file can't be matched to a known set of strings","%s files can't be matched to a known set of strings",$n,'wp-china-yes'), number_format($n) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ class Loco_admin_bundle_ViewController extends Loco_admin_bundle_BaseController
|
|||
// always offer msginit even if we find out later we can't extract any strings
|
||||
$p['nav'][] = new Loco_mvc_ViewParams( array(
|
||||
'href' => $this->getProjectLink('msginit', $project ),
|
||||
'name' => __('New language','loco-translate'),
|
||||
'name' => __('New language','wp-china-yes'),
|
||||
'icon' => 'add',
|
||||
) );
|
||||
|
||||
|
@ -105,7 +105,7 @@ class Loco_admin_bundle_ViewController extends Loco_admin_bundle_BaseController
|
|||
$meta = Loco_gettext_Metadata::load($pot);
|
||||
$p['nav'][] = new Loco_mvc_ViewParams( array(
|
||||
'href' => $this->getResourceLink('file-view', $project, $meta ),
|
||||
'name' => __('View template','loco-translate'),
|
||||
'name' => __('View template','wp-china-yes'),
|
||||
'icon' => 'file',
|
||||
) );
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ class Loco_admin_bundle_ViewController extends Loco_admin_bundle_BaseController
|
|||
$meta = Loco_gettext_Metadata::load($pot);
|
||||
$p['nav'][] = new Loco_mvc_ViewParams( array(
|
||||
'href' => $this->getResourceLink('file-edit', $project, $meta ),
|
||||
'name' => __('Edit template','loco-translate'),
|
||||
'name' => __('Edit template','wp-china-yes'),
|
||||
'icon' => 'pencil',
|
||||
) );
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ class Loco_admin_bundle_ViewController extends Loco_admin_bundle_BaseController
|
|||
else {
|
||||
$p['nav'][] = new Loco_mvc_ViewParams( array(
|
||||
'href' => $this->getProjectLink('xgettext', $project ),
|
||||
'name' => __('Create template','loco-translate'),
|
||||
'name' => __('Create template','wp-china-yes'),
|
||||
'icon' => 'add',
|
||||
) );
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ class Loco_admin_config_ApisController extends Loco_admin_config_BaseController
|
|||
*/
|
||||
public function init(){
|
||||
parent::init();
|
||||
$this->set( 'title', __('API keys','loco-translate') );
|
||||
$this->set( 'title', __('API keys','wp-china-yes') );
|
||||
|
||||
// collect support API keys
|
||||
$apis = array();
|
||||
|
@ -40,7 +40,7 @@ class Loco_admin_config_ApisController extends Loco_admin_config_BaseController
|
|||
}
|
||||
if( $filter ){
|
||||
Loco_data_Settings::get()->populate($data,$filter)->persistIfDirty();
|
||||
Loco_error_AdminNotices::success( __('Settings saved','loco-translate') );
|
||||
Loco_error_AdminNotices::success( __('Settings saved','wp-china-yes') );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ class Loco_admin_config_ApisController extends Loco_admin_config_BaseController
|
|||
*/
|
||||
public function render(){
|
||||
|
||||
$title = __('Plugin settings','loco-translate');
|
||||
$title = __('Plugin settings','wp-china-yes');
|
||||
$breadcrumb = new Loco_admin_Navigation;
|
||||
$breadcrumb->add( $title );
|
||||
|
||||
|
|
|
@ -15,13 +15,13 @@ abstract class Loco_admin_config_BaseController extends Loco_mvc_AdminController
|
|||
$tabs = new Loco_admin_Navigation;
|
||||
$this->set( 'tabs', $tabs );
|
||||
$actions = array (
|
||||
'' => __('Site options','loco-translate'),
|
||||
'user' => __('User options','loco-translate'),
|
||||
'apis' => __('API keys','loco-translate'),
|
||||
'version' => __('Version','loco-translate'),
|
||||
'' => __('Site options','wp-china-yes'),
|
||||
'user' => __('User options','wp-china-yes'),
|
||||
'apis' => __('API keys','wp-china-yes'),
|
||||
'version' => __('Version','wp-china-yes'),
|
||||
);
|
||||
if( loco_debugging() ){
|
||||
$actions['debug'] = __('Debug','loco-translate');
|
||||
$actions['debug'] = __('Debug','wp-china-yes');
|
||||
}
|
||||
$suffix = (string) $this->get('action');
|
||||
foreach( $actions as $action => $name ){
|
||||
|
@ -39,7 +39,7 @@ abstract class Loco_admin_config_BaseController extends Loco_mvc_AdminController
|
|||
public function getHelpTabs(){
|
||||
return array (
|
||||
__('Overview','default') => $this->viewSnippet('tab-config'),
|
||||
__('API keys','loco-translate') => $this->viewSnippet('tab-config-apis'),
|
||||
__('API keys','wp-china-yes') => $this->viewSnippet('tab-config-apis'),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ class Loco_admin_config_DebugController extends Loco_admin_config_BaseController
|
|||
*/
|
||||
public function init(){
|
||||
parent::init();
|
||||
$this->set( 'title', __('Debug','loco-translate') );
|
||||
$this->set( 'title', __('Debug','wp-china-yes') );
|
||||
}
|
||||
|
||||
|
||||
|
@ -44,7 +44,7 @@ class Loco_admin_config_DebugController extends Loco_admin_config_BaseController
|
|||
*/
|
||||
public function render(){
|
||||
|
||||
$title = __('System diagnostics','loco-translate');
|
||||
$title = __('System diagnostics','wp-china-yes');
|
||||
$breadcrumb = new Loco_admin_Navigation;
|
||||
$breadcrumb->add( $title );
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ class Loco_admin_config_PrefsController extends Loco_admin_config_BaseController
|
|||
*/
|
||||
public function init(){
|
||||
parent::init();
|
||||
$this->set( 'title', __('User options','loco-translate') );
|
||||
$this->set( 'title', __('User options','wp-china-yes') );
|
||||
|
||||
// user preference options
|
||||
$opts = Loco_data_Preferences::get();
|
||||
|
@ -23,7 +23,7 @@ class Loco_admin_config_PrefsController extends Loco_admin_config_BaseController
|
|||
$post = Loco_mvc_PostParams::get();
|
||||
if( $post->has('opts') ){
|
||||
$opts->populate( $post->opts )->persist();
|
||||
Loco_error_AdminNotices::success( __('Settings saved','loco-translate') );
|
||||
Loco_error_AdminNotices::success( __('Settings saved','wp-china-yes') );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ class Loco_admin_config_PrefsController extends Loco_admin_config_BaseController
|
|||
*/
|
||||
public function render(){
|
||||
|
||||
$title = __('Plugin settings','loco-translate');
|
||||
$title = __('Plugin settings','wp-china-yes');
|
||||
$breadcrumb = new Loco_admin_Navigation;
|
||||
$breadcrumb->add( $title );
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class Loco_admin_config_SettingsController extends Loco_admin_config_BaseControl
|
|||
$opts->populate( $post->opts )->persist();
|
||||
$perms->populate( $post->has('caps') ? $post->caps : array() );
|
||||
// done update
|
||||
Loco_error_AdminNotices::success( __('Settings saved','loco-translate') );
|
||||
Loco_error_AdminNotices::success( __('Settings saved','wp-china-yes') );
|
||||
// remove saved params from session if persistent options unset
|
||||
if( ! $opts['fs_persist'] ){
|
||||
$session = Loco_data_Session::get();
|
||||
|
@ -63,9 +63,9 @@ class Loco_admin_config_SettingsController extends Loco_admin_config_BaseControl
|
|||
}
|
||||
// allow/deny warning levels
|
||||
$this->set('verbose', new Loco_mvc_ViewParams( array(
|
||||
0 => __('Allow','loco-translate'),
|
||||
1 => __('Allow (with warning)','loco-translate'),
|
||||
2 => __('Disallow','loco-translate'),
|
||||
0 => __('Allow','wp-china-yes'),
|
||||
1 => __('Allow (with warning)','wp-china-yes'),
|
||||
2 => __('Disallow','wp-china-yes'),
|
||||
) ) );
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ class Loco_admin_config_SettingsController extends Loco_admin_config_BaseControl
|
|||
*/
|
||||
public function render(){
|
||||
|
||||
$title = __('Plugin settings','loco-translate');
|
||||
$title = __('Plugin settings','wp-china-yes');
|
||||
$breadcrumb = new Loco_admin_Navigation;
|
||||
$breadcrumb->add( $title );
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ class Loco_admin_config_VersionController extends Loco_admin_config_BaseControll
|
|||
*/
|
||||
public function init(){
|
||||
parent::init();
|
||||
$this->set( 'title', __('Version','loco-translate') );
|
||||
$this->set( 'title', __('Version','wp-china-yes') );
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@ class Loco_admin_config_VersionController extends Loco_admin_config_BaseControll
|
|||
*/
|
||||
public function render(){
|
||||
|
||||
$title = __('Plugin settings','loco-translate');
|
||||
$title = __('Plugin settings','wp-china-yes');
|
||||
$breadcrumb = new Loco_admin_Navigation;
|
||||
$breadcrumb->add( $title );
|
||||
|
||||
|
|
|
@ -102,12 +102,12 @@ abstract class Loco_admin_file_BaseController extends Loco_admin_bundle_BaseCont
|
|||
$tabs = new Loco_admin_Navigation;
|
||||
$this->set( 'tabs', $tabs );
|
||||
$actions = array (
|
||||
'file-edit' => __('Editor','loco-translate'),
|
||||
'file-view' => __('Source','loco-translate'),
|
||||
'file-info' => __('File info','loco-translate'),
|
||||
'file-diff' => __('Restore','loco-translate'),
|
||||
'file-move' => $localised ? __('Relocate','loco-translate') : null,
|
||||
'file-delete' => __('Delete','loco-translate'),
|
||||
'file-edit' => __('Editor','wp-china-yes'),
|
||||
'file-view' => __('Source','wp-china-yes'),
|
||||
'file-info' => __('File info','wp-china-yes'),
|
||||
'file-diff' => __('Restore','wp-china-yes'),
|
||||
'file-move' => $localised ? __('Relocate','wp-china-yes') : null,
|
||||
'file-delete' => __('Delete','wp-china-yes'),
|
||||
);
|
||||
|
||||
$suffix = $this->get('action');
|
||||
|
@ -126,7 +126,7 @@ abstract class Loco_admin_file_BaseController extends Loco_admin_bundle_BaseCont
|
|||
$args = array( 'bundle' => $bundle->getHandle(), 'domain' => $project->getId() );
|
||||
$this->set( 'msginit', new Loco_mvc_ViewParams( array (
|
||||
'href' => Loco_mvc_AdminRouter::generate( $prefix.'-msginit', $args ),
|
||||
'text' => __('New language','loco-translate'),
|
||||
'text' => __('New language','wp-china-yes'),
|
||||
) ) );
|
||||
}
|
||||
catch( Exception $e ){
|
||||
|
|
|
@ -54,7 +54,7 @@ class Loco_admin_file_DeleteController extends Loco_admin_file_BaseController {
|
|||
// flash message for display after redirect
|
||||
try {
|
||||
$n = count( $files );
|
||||
Loco_data_Session::get()->flash('success', sprintf( _n('File deleted','%u files deleted',$n,'loco-translate'),$n) );
|
||||
Loco_data_Session::get()->flash('success', sprintf( _n('File deleted','%u files deleted',$n,'wp-china-yes'),$n) );
|
||||
Loco_data_Session::close();
|
||||
}
|
||||
catch( Exception $e ){
|
||||
|
@ -73,7 +73,7 @@ class Loco_admin_file_DeleteController extends Loco_admin_file_BaseController {
|
|||
}
|
||||
// set page title before render sets inline title
|
||||
$bundle = $this->getBundle();
|
||||
$this->set('title', sprintf( __('Delete %s','loco-translate'), $file->basename() ).' ‹ '.$bundle->getName() );
|
||||
$this->set('title', sprintf( __('Delete %s','wp-china-yes'), $file->basename() ).' ‹ '.$bundle->getName() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,12 +91,12 @@ class Loco_admin_file_DeleteController extends Loco_admin_file_BaseController {
|
|||
$files = $this->expandFiles( $file );
|
||||
$info = Loco_mvc_FileParams::create($file);
|
||||
$this->set( 'info', $info );
|
||||
$this->set( 'title', sprintf( __('Delete %s','loco-translate'), $info->name ) );
|
||||
$this->set( 'title', sprintf( __('Delete %s','wp-china-yes'), $info->name ) );
|
||||
|
||||
// warn about additional files that will be deleted along with this
|
||||
if( $deps = array_slice($files,1) ){
|
||||
$count = count($deps);
|
||||
$this->set('warn', sprintf( _n( 'One dependent file will also be deleted', '%u dependent files will also be deleted', $count, 'loco-translate' ), $count ) );
|
||||
$this->set('warn', sprintf( _n( 'One dependent file will also be deleted', '%u dependent files will also be deleted', $count, 'wp-china-yes' ), $count ) );
|
||||
$infos = array();
|
||||
foreach( $deps as $depfile ){
|
||||
$infos[] = Loco_mvc_FileParams::create( $depfile );
|
||||
|
|
|
@ -47,7 +47,7 @@ class Loco_admin_file_DiffController extends Loco_admin_file_BaseController {
|
|||
}
|
||||
// replacing source file last in case of failures
|
||||
$pofile->putContents( $source );
|
||||
Loco_error_AdminNotices::success( __('File restored','loco-translate') );
|
||||
Loco_error_AdminNotices::success( __('File restored','wp-china-yes') );
|
||||
// prune to configured level after success
|
||||
$backups->prune( $num_backups );
|
||||
$backups = null;
|
||||
|
@ -58,7 +58,7 @@ class Loco_admin_file_DiffController extends Loco_admin_file_BaseController {
|
|||
$target->normalize( loco_constant('WP_CONTENT_DIR') );
|
||||
$api->authorizeDelete( $target );
|
||||
$target->unlink();
|
||||
Loco_error_AdminNotices::success( __('File deleted','loco-translate') );
|
||||
Loco_error_AdminNotices::success( __('File deleted','wp-china-yes') );
|
||||
}
|
||||
else {
|
||||
throw new Loco_error_Exception('Nothing selected');
|
||||
|
@ -71,7 +71,7 @@ class Loco_admin_file_DiffController extends Loco_admin_file_BaseController {
|
|||
}
|
||||
|
||||
$bundle = $this->getBundle();
|
||||
$this->set('title', sprintf( __('Restore %s','loco-translate'), $pofile->basename() ).' ‹ '.$bundle->getName() );
|
||||
$this->set('title', sprintf( __('Restore %s','wp-china-yes'), $pofile->basename() ).' ‹ '.$bundle->getName() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -89,7 +89,7 @@ class Loco_admin_file_DiffController extends Loco_admin_file_BaseController {
|
|||
$info = Loco_mvc_FileParams::create($file);
|
||||
$info['mtime'] = $file->modified();
|
||||
$this->set( 'master', $info );
|
||||
$this->set( 'title', sprintf( __('Restore %s','loco-translate'), $info->name ) );
|
||||
$this->set( 'title', sprintf( __('Restore %s','wp-china-yes'), $info->name ) );
|
||||
|
||||
$enabled = Loco_data_Settings::get()->num_backups;
|
||||
$this->set( 'enabled', $enabled );
|
||||
|
@ -133,7 +133,7 @@ class Loco_admin_file_DiffController extends Loco_admin_file_BaseController {
|
|||
$min = count($files) + 1;
|
||||
if( $enabled < $min ){
|
||||
$notice = Loco_error_AdminNotices::info('We recommend enabling more backups before restoring');
|
||||
$notice->addLink( apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/settings#po'), __('Documentation','loco-translate') )
|
||||
$notice->addLink( apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/settings#po'), __('Documentation','wp-china-yes') )
|
||||
->addLink( Loco_mvc_AdminRouter::generate('config').'#loco--num-backups', __('Settings') );
|
||||
}*/
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
|
|||
$file = $this->get('file');
|
||||
$bundle = $this->getBundle();
|
||||
// translators: %1$s is the file name, %2$s is the bundle name
|
||||
$this->set('title', sprintf( __('Editing %1$s in %2$s','loco-translate'), $file->basename(), $bundle ) );
|
||||
$this->set('title', sprintf( __('Editing %1$s in %2$s','wp-china-yes'), $file->basename(), $bundle ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -128,18 +128,18 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
|
|||
$potdata = Loco_gettext_Data::load( $potfile );
|
||||
/*
|
||||
if( ! $potdata->equalSource($data) ){
|
||||
Loco_error_AdminNotices::debug( sprintf( __("Translations don't match template. Run sync to update from %s",'loco-translate'), $potfile->basename() ) );
|
||||
Loco_error_AdminNotices::debug( sprintf( __("Translations don't match template. Run sync to update from %s",'wp-china-yes'), $potfile->basename() ) );
|
||||
}*/
|
||||
}
|
||||
catch( Exception $e ){
|
||||
// translators: Where %s is the name of the invalid POT file
|
||||
Loco_error_AdminNotices::warn( sprintf( __('Translation template is invalid (%s)','loco-translate'), $potfile->basename() ) );
|
||||
Loco_error_AdminNotices::warn( sprintf( __('Translation template is invalid (%s)','wp-china-yes'), $potfile->basename() ) );
|
||||
$potfile = null;
|
||||
}
|
||||
}
|
||||
// else template doesn't exist, so sync will be done to source code
|
||||
else {
|
||||
// Loco_error_AdminNotices::debug( sprintf( __('Template file not found (%s)','loco-translate'), $potfile->basename() ) );
|
||||
// Loco_error_AdminNotices::debug( sprintf( __('Template file not found (%s)','wp-china-yes'), $potfile->basename() ) );
|
||||
$potfile = null;
|
||||
}
|
||||
}
|
||||
|
@ -171,9 +171,9 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
|
|||
}
|
||||
// translators: Warning when POT file is opened in the file editor. It can be disabled in settings.
|
||||
else if( 1 === $settings->pot_protect ){
|
||||
Loco_error_AdminNotices::warn( __("This is NOT a translation file. Manual editing of source strings is not recommended.",'loco-translate') )
|
||||
->addLink( Loco_mvc_AdminRouter::generate('config').'#loco--pot-protect', __('Settings','loco-translate') )
|
||||
->addLink( apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/templates'), __('Documentation','loco-translate') );
|
||||
Loco_error_AdminNotices::warn( __("This is NOT a translation file. Manual editing of source strings is not recommended.",'wp-china-yes') )
|
||||
->addLink( Loco_mvc_AdminRouter::generate('config').'#loco--pot-protect', __('Settings','wp-china-yes') )
|
||||
->addLink( apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/templates'), __('Documentation','wp-china-yes') );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,26 +197,26 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
|
|||
) ) );
|
||||
$this->set( 'ui', new Loco_mvc_ViewParams( array(
|
||||
// Translators: button for adding a new string when manually editing a POT file
|
||||
'add' => _x('Add','Editor','loco-translate'),
|
||||
'add' => _x('Add','Editor','wp-china-yes'),
|
||||
// Translators: button for removing a string when manually editing a POT file
|
||||
'del' => _x('Remove','Editor','loco-translate'),
|
||||
'help' => __('Help','loco-translate'),
|
||||
'del' => _x('Remove','Editor','wp-china-yes'),
|
||||
'help' => __('Help','wp-china-yes'),
|
||||
// Translators: Button that saves translations to disk
|
||||
'save' => _x('Save','Editor','loco-translate'),
|
||||
'save' => _x('Save','Editor','wp-china-yes'),
|
||||
// Translators: Button that runs in-editor sync/operation
|
||||
'sync' => _x('Sync','Editor','loco-translate'),
|
||||
'sync' => _x('Sync','Editor','wp-china-yes'),
|
||||
// Translators: Button that reloads current screen
|
||||
'revert' => _x('Revert','Editor','loco-translate'),
|
||||
'revert' => _x('Revert','Editor','wp-china-yes'),
|
||||
// Translators: Button that opens window for auto-translating
|
||||
'auto' => _x('Auto','Editor','loco-translate'),
|
||||
'auto' => _x('Auto','Editor','wp-china-yes'),
|
||||
// Translators: Button for downloading a PO, MO or POT file
|
||||
'download' => _x('Download','Editor','loco-translate'),
|
||||
'download' => _x('Download','Editor','wp-china-yes'),
|
||||
// Translators: Placeholder text for text filter above editor
|
||||
'filter' => __('Filter translations','loco-translate'),
|
||||
'filter' => __('Filter translations','wp-china-yes'),
|
||||
// Translators: Button that toggles invisible characters
|
||||
'invs' => _x('Toggle invisibles','Editor','loco-translate'),
|
||||
'invs' => _x('Toggle invisibles','Editor','wp-china-yes'),
|
||||
// Translators: Button that toggles between "code" and regular text editing modes
|
||||
'code' => _x('Toggle code view','Editor','loco-translate'),
|
||||
'code' => _x('Toggle code view','Editor','wp-china-yes'),
|
||||
) ) );
|
||||
|
||||
// Download form params
|
||||
|
|
|
@ -124,7 +124,7 @@ class Loco_admin_file_InfoController extends Loco_admin_file_BaseController {
|
|||
try {
|
||||
$data = Loco_gettext_Data::load($file);
|
||||
$head = $data->getHeaders();
|
||||
$author = $head->trimmed('Last-Translator') or $author = __('Unknown author','loco-translate');
|
||||
$author = $head->trimmed('Last-Translator') or $author = __('Unknown author','wp-china-yes');
|
||||
$this->set( 'author', $author );
|
||||
// date headers may not be same as file modification time (files copied to server etc..)
|
||||
$podate = $head->trimmed( $locale ? 'PO-Revision-Date' : 'POT-Creation-Date' );
|
||||
|
@ -155,14 +155,14 @@ class Loco_admin_file_InfoController extends Loco_admin_file_BaseController {
|
|||
if( $debugging ){
|
||||
// missing or invalid headers are tollerated but developers should be notified
|
||||
if( $debugging && ! count($head) ){
|
||||
$debug[] = __('File does not have a valid header','loco-translate');
|
||||
$debug[] = __('File does not have a valid header','wp-china-yes');
|
||||
}
|
||||
// Language header sanity checks, raising developer (debug) warnings
|
||||
if( $locale ){
|
||||
if( $value = $head['Language'] ){
|
||||
$check = (string) Loco_Locale::parse($value);
|
||||
if( $check !== $code ){
|
||||
$debug[]= sprintf( __('Language header is "%s" but file name contains "%s"','loco-translate'), $value, $code );
|
||||
$debug[]= sprintf( __('Language header is "%s" but file name contains "%s"','wp-china-yes'), $value, $code );
|
||||
}
|
||||
}
|
||||
if( $value = $head['Plural-Forms'] ){
|
||||
|
|
|
@ -76,11 +76,11 @@ class Loco_admin_file_MoveController extends Loco_admin_file_BaseController {
|
|||
// flash messages for display after redirect
|
||||
try {
|
||||
if( $count ) {
|
||||
Loco_data_Session::get()->flash( 'success', sprintf( _n( 'File moved', '%u files moved', $total, 'loco-translate' ), $total ) );
|
||||
Loco_data_Session::get()->flash( 'success', sprintf( _n( 'File moved', '%u files moved', $total, 'wp-china-yes' ), $total ) );
|
||||
}
|
||||
if( $total > $count ){
|
||||
$diff = $total - $count;
|
||||
Loco_data_Session::get()->flash( 'error', sprintf( _n( 'One file could not be moved', '%u files could not be moved', $diff, 'loco-translate' ), $diff ) );
|
||||
Loco_data_Session::get()->flash( 'error', sprintf( _n( 'One file could not be moved', '%u files could not be moved', $diff, 'wp-china-yes' ), $diff ) );
|
||||
}
|
||||
Loco_data_Session::close();
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ class Loco_admin_file_MoveController extends Loco_admin_file_BaseController {
|
|||
}
|
||||
// set page title before render sets inline title
|
||||
$bundle = $this->getBundle();
|
||||
$this->set('title', sprintf( __('Move %s','loco-translate'), $file->basename() ).' ‹ '.$bundle->getName() );
|
||||
$this->set('title', sprintf( __('Move %s','wp-china-yes'), $file->basename() ).' ‹ '.$bundle->getName() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -124,7 +124,7 @@ class Loco_admin_file_MoveController extends Loco_admin_file_BaseController {
|
|||
$custom = is_null($project) || $this->get('custom') || 'po' !== $file->extension() || ! $locale->isValid();
|
||||
// common page elements:
|
||||
$this->set('files',$files->expand() );
|
||||
$this->set('title', sprintf( __('Move %s','loco-translate'), $file->filename() ) );
|
||||
$this->set('title', sprintf( __('Move %s','wp-china-yes'), $file->filename() ) );
|
||||
$this->enqueueScript('move');
|
||||
// set info for existing file location
|
||||
$content_dir = loco_constant('WP_CONTENT_DIR');
|
||||
|
|
|
@ -13,7 +13,7 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|||
$this->enqueueStyle('poinit');
|
||||
//
|
||||
$bundle = $this->getBundle();
|
||||
$this->set('title', __('New language','loco-translate').' ‹ '.$bundle );
|
||||
$this->set('title', __('New language','wp-china-yes').' ‹ '.$bundle );
|
||||
}
|
||||
|
||||
|
||||
|
@ -92,7 +92,7 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|||
|
||||
$breadcrumb = $this->prepareNavigation();
|
||||
// "new" tab is confusing when no project-scope navigation
|
||||
// $this->get('tabs')->add( __('New PO','loco-translate'), '', true );
|
||||
// $this->get('tabs')->add( __('New PO','wp-china-yes'), '', true );
|
||||
|
||||
// bundle mandatory, but project optional
|
||||
$bundle = $this->getBundle();
|
||||
|
@ -101,14 +101,14 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|||
$project = $this->getProject();
|
||||
$slug = $project->getSlug();
|
||||
$domain = (string) $project->getDomain();
|
||||
$subhead = sprintf( __('Initializing new translations in "%s"','loco-translate'), $slug?$slug:$domain );
|
||||
$subhead = sprintf( __('Initializing new translations in "%s"','wp-china-yes'), $slug?$slug:$domain );
|
||||
}
|
||||
catch( Loco_error_Exception $e ){
|
||||
$project = null;
|
||||
$subhead = __('Initializing new translations in unknown set','loco-translate');
|
||||
$subhead = __('Initializing new translations in unknown set','wp-china-yes');
|
||||
}
|
||||
|
||||
$title = __('New language','loco-translate');
|
||||
$title = __('New language','wp-china-yes');
|
||||
$this->set('subhead', $subhead );
|
||||
|
||||
// navigate up to bundle listing page
|
||||
|
@ -190,7 +190,7 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|||
if( $potfile && $potfile->exists() ){
|
||||
$meta = Loco_gettext_Metadata::load($potfile);
|
||||
$total = $meta->getTotal();
|
||||
$summary = sprintf( _n('One string found in %2$s','%s strings found in %s',$total,'loco-translate'), number_format($total), $potfile->basename() );
|
||||
$summary = sprintf( _n('One string found in %2$s','%s strings found in %s',$total,'wp-china-yes'), number_format($total), $potfile->basename() );
|
||||
$this->set( 'pot', new Loco_mvc_ViewParams( array(
|
||||
'name' => $potfile->basename(),
|
||||
'path' => $meta->getPath(false),
|
||||
|
@ -209,7 +209,7 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|||
else {
|
||||
$this->set( 'ext', new Loco_mvc_ViewParams( array(
|
||||
'link' => Loco_mvc_AdminRouter::generate( $this->get('type').'-xgettext', $_GET ),
|
||||
'text' => __('Create template','loco-translate'),
|
||||
'text' => __('Create template','wp-china-yes'),
|
||||
) ) );
|
||||
// if forcing source extraction show brief description of source files
|
||||
if( $this->get('extract') ){
|
||||
|
@ -218,13 +218,13 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|||
return $this->view('admin/errors/no-tokenizer');
|
||||
}
|
||||
$nfiles = count( $project->findSourceFiles() );
|
||||
$summary = sprintf( _n('1 source file will be scanned for translatable strings','%s source files will be scanned for translatable strings',$nfiles,'loco-translate'), number_format_i18n($nfiles) );
|
||||
$summary = sprintf( _n('1 source file will be scanned for translatable strings','%s source files will be scanned for translatable strings',$nfiles,'wp-china-yes'), number_format_i18n($nfiles) );
|
||||
}
|
||||
// else prompt for template creation before continuing
|
||||
else {
|
||||
$this->set( 'skip', new Loco_mvc_ViewParams( array(
|
||||
'link' => Loco_mvc_AdminRouter::generate( $this->get('_route'), $_GET + array( 'extract' => '1' ) ),
|
||||
'text' => __('Skip template','loco-translate'),
|
||||
'text' => __('Skip template','wp-china-yes'),
|
||||
) ) );
|
||||
// POT could still be defined, it might just not exist yet
|
||||
if( $potfile ){
|
||||
|
@ -234,7 +234,7 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|||
else {
|
||||
$this->set( 'conf', new Loco_mvc_ViewParams( array(
|
||||
'link' => Loco_mvc_AdminRouter::generate( $this->get('type').'-conf', array_intersect_key($_GET,array('bundle'=>'')) ),
|
||||
'text' => __('Assign template','loco-translate'),
|
||||
'text' => __('Assign template','wp-china-yes'),
|
||||
) ) );
|
||||
}
|
||||
return $this->view('admin/init/init-prompt');
|
||||
|
@ -313,7 +313,7 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|||
|
||||
$this->set('help', new Loco_mvc_ViewParams( array(
|
||||
'href' => apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/msginit'),
|
||||
'text' => __("What's this?",'loco-translate'),
|
||||
'text' => __("What's this?",'wp-china-yes'),
|
||||
) ) );
|
||||
|
||||
// file system prompts will be handled when paths are selected (i.e. we don't have one yet)
|
||||
|
|
|
@ -13,7 +13,7 @@ class Loco_admin_init_InitPotController extends Loco_admin_bundle_BaseController
|
|||
$this->enqueueStyle('poinit');
|
||||
//
|
||||
$bundle = $this->getBundle();
|
||||
$this->set('title', __('New template','loco-translate').' ‹ '.$bundle );
|
||||
$this->set('title', __('New template','wp-china-yes').' ‹ '.$bundle );
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@ class Loco_admin_init_InitPotController extends Loco_admin_bundle_BaseController
|
|||
|
||||
$breadcrumb = $this->prepareNavigation();
|
||||
// "new" tab is confusing when no project-scope navigation
|
||||
// $this->get('tabs')->add( __('New POT','loco-translate'), '', true );
|
||||
// $this->get('tabs')->add( __('New POT','wp-china-yes'), '', true );
|
||||
|
||||
$bundle = $this->getBundle();
|
||||
$project = $this->getProject();
|
||||
|
@ -65,7 +65,7 @@ class Loco_admin_init_InitPotController extends Loco_admin_bundle_BaseController
|
|||
|
||||
// POT should actually not exist at this stage. It should be edited instead.
|
||||
if( $pot->exists() ){
|
||||
throw new Loco_error_Exception( __('Template file already exists','loco-translate') );
|
||||
throw new Loco_error_Exception( __('Template file already exists','wp-china-yes') );
|
||||
}
|
||||
|
||||
// Bundle may deliberately lock template to avoid end-user tampering
|
||||
|
@ -113,8 +113,8 @@ class Loco_admin_init_InitPotController extends Loco_admin_bundle_BaseController
|
|||
$this->set('pot', Loco_mvc_FileParams::create( $pot ) );
|
||||
$this->set('dir', Loco_mvc_FileParams::create( $dir ) );
|
||||
|
||||
$title = __('New template file','loco-translate');
|
||||
$subhead = sprintf( __('New translations template for "%s"','loco-translate'), $project );
|
||||
$title = __('New template file','wp-china-yes');
|
||||
$subhead = sprintf( __('New translations template for "%s"','wp-china-yes'), $project );
|
||||
$this->set('subhead', $subhead );
|
||||
|
||||
// navigate up to bundle listing page
|
||||
|
|
|
@ -64,9 +64,9 @@ abstract class Loco_admin_list_BaseController extends Loco_mvc_AdminController {
|
|||
|
||||
/*/ tab between the types of bundles
|
||||
$types = array (
|
||||
'' => __('Home','loco-translate'),
|
||||
'theme' => __('Themes','loco-translate'),
|
||||
'plugin' => __('Plugins','loco-translate'),
|
||||
'' => __('Home','wp-china-yes'),
|
||||
'theme' => __('Themes','wp-china-yes'),
|
||||
'plugin' => __('Plugins','wp-china-yes'),
|
||||
);
|
||||
$current = $this->get('_route');
|
||||
$tabs = new Loco_admin_Navigation;
|
||||
|
|
|
@ -32,7 +32,7 @@ class Loco_admin_list_LocalesController extends Loco_mvc_AdminController {
|
|||
*/
|
||||
public function render(){
|
||||
|
||||
$this->set( 'title', __( 'Installed languages', 'loco-translate' ) );
|
||||
$this->set( 'title', __( 'Installed languages', 'wp-china-yes' ) );
|
||||
|
||||
$used = array();
|
||||
$locales = array();
|
||||
|
|
|
@ -9,7 +9,7 @@ class Loco_admin_list_PluginsController extends Loco_admin_list_BaseController {
|
|||
public function render(){
|
||||
|
||||
$this->set( 'type', 'plugin' );
|
||||
$this->set( 'title', __( 'Translate plugins', 'loco-translate' ) );
|
||||
$this->set( 'title', __( 'Translate plugins', 'wp-china-yes' ) );
|
||||
|
||||
foreach( Loco_package_Plugin::get_plugins() as $handle => $data ){
|
||||
try {
|
||||
|
|
|
@ -11,7 +11,7 @@ class Loco_admin_list_ThemesController extends Loco_admin_list_BaseController {
|
|||
public function render(){
|
||||
|
||||
$this->set('type', 'theme' );
|
||||
$this->set('title', __( 'Translate themes', 'loco-translate' ) );
|
||||
$this->set('title', __( 'Translate themes', 'wp-china-yes' ) );
|
||||
|
||||
/* @var $theme WP_Theme */
|
||||
foreach( wp_get_themes() as $theme ){
|
||||
|
|
|
@ -44,7 +44,7 @@ class Loco_ajax_DiffController extends Loco_mvc_AjaxController {
|
|||
|
||||
if( $tablesrc === $emptysrc ){
|
||||
// translators: Where %s is a file name
|
||||
$message = __('Revisions are identical, you can delete %s','loco-translate');
|
||||
$message = __('Revisions are identical, you can delete %s','wp-china-yes');
|
||||
$this->set( 'error', sprintf( $message, $rhs->basename() ) );
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -98,20 +98,20 @@ class Loco_ajax_FsConnectController extends Loco_mvc_AjaxController {
|
|||
$this->set( 'valid', $this->api->getOutputCredentials() );
|
||||
$this->set( 'creds', $this->api->getInputCredentials() );
|
||||
$this->set( 'method', $this->api->getFileSystem()->method );
|
||||
$this->set( 'success', __('Connected to remote file system','loco-translate') );
|
||||
$this->set( 'success', __('Connected to remote file system','wp-china-yes') );
|
||||
// warning when writing to this location is risky (overwrites during wp update)
|
||||
if( Loco_data_Settings::get()->fs_protect && $file->getUpdateType() ){
|
||||
if( 'create' === $type ){
|
||||
$message = __('This file may be overwritten or deleted when you update WordPress','loco-translate');
|
||||
$message = __('This file may be overwritten or deleted when you update WordPress','wp-china-yes');
|
||||
}
|
||||
else if( 'delete' === $type ){
|
||||
$message = __('This directory is managed by WordPress, be careful what you delete','loco-translate');
|
||||
$message = __('This directory is managed by WordPress, be careful what you delete','wp-china-yes');
|
||||
}
|
||||
else if( 'move' === $type ){
|
||||
$message = __('This directory is managed by WordPress. Removed files may be restored during updates','loco-translate');
|
||||
$message = __('This directory is managed by WordPress. Removed files may be restored during updates','wp-china-yes');
|
||||
}/*
|
||||
else {
|
||||
$message = __('Changes to this file may be overwritten or deleted when you update WordPress','loco-translate');
|
||||
$message = __('Changes to this file may be overwritten or deleted when you update WordPress','wp-china-yes');
|
||||
}*/
|
||||
$this->set('warning',$message);
|
||||
}
|
||||
|
@ -121,16 +121,16 @@ class Loco_ajax_FsConnectController extends Loco_mvc_AjaxController {
|
|||
$this->set( 'prompt', $html );
|
||||
// supporting text based on file operation type explains why auth is required
|
||||
if( 'create' === $type ){
|
||||
$message = __('Creating this file requires permission','loco-translate');
|
||||
$message = __('Creating this file requires permission','wp-china-yes');
|
||||
}
|
||||
else if( 'delete' === $type ){
|
||||
$message = __('Deleting this file requires permission','loco-translate');
|
||||
$message = __('Deleting this file requires permission','wp-china-yes');
|
||||
}
|
||||
else if( 'move' === $type ){
|
||||
$message = __('This move operation requires permission','loco-translate');
|
||||
$message = __('This move operation requires permission','wp-china-yes');
|
||||
}
|
||||
else {
|
||||
$message = __('Saving this file requires permission','loco-translate');
|
||||
$message = __('Saving this file requires permission','wp-china-yes');
|
||||
}
|
||||
// message is printed before default text, so needs delimiting.
|
||||
$this->set('message',$message.'.');
|
||||
|
|
|
@ -57,13 +57,13 @@ class Loco_ajax_MsginitController extends Loco_ajax_common_BundleController {
|
|||
// Target MO probably doesn't exist, but we don't want to overwrite it without asking
|
||||
$mofile = $pofile->cloneExtension('mo');
|
||||
if( $mofile->exists() ){
|
||||
throw new Loco_error_Exception( __('MO file exists for this language already. Delete it first','loco-translate') );
|
||||
throw new Loco_error_Exception( __('MO file exists for this language already. Delete it first','wp-china-yes') );
|
||||
}
|
||||
|
||||
/*/ Same for JSON file, but WordPress >= only 5
|
||||
$jsfile = function_exists('wp_set_script_translations') ? $pofile->cloneExtension('json') : null;
|
||||
if( $jsfile && $jsfile->exists() ){
|
||||
throw new Loco_error_Exception( __('JSON file exists for this language already. Delete it first','loco-translate') );
|
||||
throw new Loco_error_Exception( __('JSON file exists for this language already. Delete it first','wp-china-yes') );
|
||||
}*/
|
||||
|
||||
// Permit forcing of any parsable file as strings template
|
||||
|
|
|
@ -71,7 +71,7 @@ class Loco_ajax_SaveController extends Loco_ajax_common_BundleController {
|
|||
}
|
||||
catch( Exception $e ){
|
||||
Loco_error_AdminNotices::debug( $e->getMessage() );
|
||||
$message = __('Failed to create backup file in "%s". Check file permissions or disable backups','loco-translate');
|
||||
$message = __('Failed to create backup file in "%s". Check file permissions or disable backups','wp-china-yes');
|
||||
Loco_error_AdminNotices::warn( sprintf( $message, $pofile->getParent()->basename() ) );
|
||||
}
|
||||
}
|
||||
|
@ -168,14 +168,14 @@ class Loco_ajax_SaveController extends Loco_ajax_common_BundleController {
|
|||
}
|
||||
catch( Exception $e ){
|
||||
Loco_error_AdminNotices::debug( $e->getMessage() );
|
||||
Loco_error_AdminNotices::warn( __('PO file saved, but MO file compilation failed','loco-translate') );
|
||||
Loco_error_AdminNotices::warn( __('PO file saved, but MO file compilation failed','wp-china-yes') );
|
||||
$this->set( 'mobytes', 0 );
|
||||
// prevent further compilation if MO failed
|
||||
$compile = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Loco_error_AdminNotices::success( __('POT file saved','loco-translate') );
|
||||
Loco_error_AdminNotices::success( __('POT file saved','wp-china-yes') );
|
||||
}
|
||||
|
||||
/*/ Compile JSON translations for WordPress >= 5
|
||||
|
@ -213,7 +213,7 @@ class Loco_ajax_SaveController extends Loco_ajax_common_BundleController {
|
|||
}
|
||||
catch( Exception $e ){
|
||||
Loco_error_AdminNotices::debug( $e->getMessage() );
|
||||
Loco_error_AdminNotices::warn( __('JSON compilation failed','loco-translate') );
|
||||
Loco_error_AdminNotices::warn( __('JSON compilation failed','wp-china-yes') );
|
||||
}
|
||||
$this->set( 'jsbytes', $bytes );
|
||||
}*/
|
||||
|
|
|
@ -44,7 +44,7 @@ class Loco_ajax_SyncController extends Loco_mvc_AjaxController {
|
|||
}
|
||||
catch( Exception $e ){
|
||||
// translators: Where %s is the name of the invalid POT file
|
||||
throw new Loco_error_ParseException( sprintf( __('Translation template is invalid (%s)','loco-translate'), $potfile->basename() ) );
|
||||
throw new Loco_error_ParseException( sprintf( __('Translation template is invalid (%s)','wp-china-yes'), $potfile->basename() ) );
|
||||
}
|
||||
}
|
||||
// else sync with source code
|
||||
|
@ -59,7 +59,7 @@ class Loco_ajax_SyncController extends Loco_mvc_AjaxController {
|
|||
$maximum = Loco_mvc_FileParams::renderBytes( wp_convert_hr_to_bytes( Loco_data_Settings::get()->max_php_size ) );
|
||||
$largest = Loco_mvc_FileParams::renderBytes( $extr->getMaxPhpSize() );
|
||||
// Translators: Where %2$s is the maximum size of a file that will be included and %3$s is the largest encountered
|
||||
$text = _n('One file has been skipped because it\'s %3$s. (Max is %2$s). Check all strings are present before saving.','%s files over %2$s have been skipped. (Largest is %3$s). Check all strings are present before saving.',$n,'loco-translate');
|
||||
$text = _n('One file has been skipped because it\'s %3$s. (Max is %2$s). Check all strings are present before saving.','%s files over %2$s have been skipped. (Largest is %3$s). Check all strings are present before saving.',$n,'wp-china-yes');
|
||||
$text = sprintf( $text, number_format($n), $maximum, $largest );
|
||||
// not failing, just warning. Nothing will be saved until user saves editor state
|
||||
Loco_error_AdminNotices::warn( $text );
|
||||
|
|
|
@ -59,7 +59,7 @@ class Loco_ajax_XgettextController extends Loco_ajax_common_BundleController {
|
|||
|
||||
// put flash message into session to be displayed on redirected page
|
||||
try {
|
||||
Loco_data_Session::get()->flash('success', __('Template file created','loco-translate') );
|
||||
Loco_data_Session::get()->flash('success', __('Template file created','wp-china-yes') );
|
||||
Loco_data_Session::close();
|
||||
}
|
||||
catch( Exception $e ){
|
||||
|
|
|
@ -84,7 +84,7 @@ class Loco_api_WordPressFileSystem {
|
|||
public function authorizeCreate( Loco_fs_File $file ){
|
||||
$this->preAuthorize($file);
|
||||
if( $file->exists() ){
|
||||
throw new Loco_error_WriteException( sprintf( __('%s already exists in this folder','loco-translate'), $file->basename() ) );
|
||||
throw new Loco_error_WriteException( sprintf( __('%s already exists in this folder','wp-china-yes'), $file->basename() ) );
|
||||
}
|
||||
return $file->creatable() || $this->authorize($file);
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ abstract class Loco_compat_PosixExtension {
|
|||
}
|
||||
}
|
||||
// translators: used when user name of web server process is unknown
|
||||
return __('the web server','loco-translate');
|
||||
return __('the web server','wp-china-yes');
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ class Loco_config_FormModel extends Loco_config_ArrayModel {
|
|||
continue;
|
||||
}
|
||||
if( empty($conf['domain']) ){
|
||||
throw new InvalidArgumentException( __('Text Domain cannot be empty','loco-translate') );
|
||||
throw new InvalidArgumentException( __('Text Domain cannot be empty','wp-china-yes') );
|
||||
}
|
||||
$domains[ $conf['domain'] ][] = $project = $dom->createElement('project');
|
||||
// project attributes
|
||||
|
|
|
@ -39,7 +39,7 @@ class Loco_config_XMLModel extends Loco_config_Model {
|
|||
public function loadXml( $source ){
|
||||
|
||||
if( ! $source ){
|
||||
throw new Loco_error_XmlParseException( __('XML supplied is empty','loco-translate') );
|
||||
throw new Loco_error_XmlParseException( __('XML supplied is empty','wp-china-yes') );
|
||||
}
|
||||
|
||||
$dom = $this->getDom();
|
||||
|
|
|
@ -154,7 +154,7 @@ class Loco_data_Permissions {
|
|||
*/
|
||||
public function getRoleName( $id ){
|
||||
if( 'translator' === $id ){
|
||||
$label = _x( 'Translator', 'User role', 'loco-translate' );
|
||||
$label = _x( 'Translator', 'User role', 'wp-china-yes' );
|
||||
}
|
||||
else {
|
||||
$names = self::wp_roles()->role_names;
|
||||
|
|
|
@ -181,9 +181,9 @@ class Loco_data_Settings extends Loco_data_Serializable {
|
|||
$updated = true;
|
||||
// feature alerts:
|
||||
if( '2.4.' === substr($new,0,4) && '2.4.' !== substr($old,0,4) ){
|
||||
Loco_error_AdminNotices::info( __('Loco Translate 2.4 supports third party translation providers. Set up your API keys in the plugin settings!','loco-translate') )
|
||||
->addLink( Loco_mvc_AdminRouter::generate('config-apis'), __('Settings','loco-translate') )
|
||||
->addLink( apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/providers'), __('Documentation','loco-translate') );
|
||||
Loco_error_AdminNotices::info( __('Loco Translate 2.4 supports third party translation providers. Set up your API keys in the plugin settings!','wp-china-yes') )
|
||||
->addLink( Loco_mvc_AdminRouter::generate('config-apis'), __('Settings','wp-china-yes') )
|
||||
->addLink( apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/providers'), __('Documentation','wp-china-yes') );
|
||||
}
|
||||
}
|
||||
return $updated;
|
||||
|
|
|
@ -16,7 +16,7 @@ class Loco_error_Debug extends Loco_error_Exception {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function getTitle(){
|
||||
return __('Debug','loco-translate');
|
||||
return __('Debug','wp-china-yes');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ class Loco_error_Exception extends Exception implements JsonSerializable {
|
|||
* @return string
|
||||
*/
|
||||
public function getTitle(){
|
||||
return __('Error','loco-translate');
|
||||
return __('Error','wp-china-yes');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ class Loco_error_Notice extends Loco_error_Exception {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function getTitle(){
|
||||
return __('Notice','loco-translate');
|
||||
return __('Notice','wp-china-yes');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ class Loco_error_Success extends Loco_error_Exception {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function getTitle(){
|
||||
return __('OK','loco-translate');
|
||||
return __('OK','wp-china-yes');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ class Loco_error_Warning extends Loco_error_Exception {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function getTitle(){
|
||||
return __('Warning','loco-translate');
|
||||
return __('Warning','wp-china-yes');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ class Loco_error_WriteException extends Loco_error_Exception {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function getTitle(){
|
||||
return __('Permission denied','loco-translate');
|
||||
return __('Permission denied','wp-china-yes');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
class Loco_error_XmlParseException extends Loco_error_Exception {
|
||||
|
||||
public function getTitle(){
|
||||
return __('XML parse error','loco-translate');
|
||||
return __('XML parse error','wp-china-yes');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ class Loco_fs_FileWriter {
|
|||
Loco_error_AdminNotices::warn($reason);
|
||||
}
|
||||
}
|
||||
throw new Loco_error_WriteException( __('Failed to connect to remote server','loco-translate') );
|
||||
throw new Loco_error_WriteException( __('Failed to connect to remote server','wp-china-yes') );
|
||||
}
|
||||
$this->fs = $fs;
|
||||
return $this;
|
||||
|
@ -129,7 +129,7 @@ class Loco_fs_FileWriter {
|
|||
public function chmod( $mode, $recursive = false ){
|
||||
$this->authorize();
|
||||
if( ! $this->fs->chmod( $this->getPath(), $mode, $recursive ) ){
|
||||
throw new Loco_error_WriteException( sprintf( __('Failed to chmod %s','loco-translate'), $this->file->basename() ) );
|
||||
throw new Loco_error_WriteException( sprintf( __('Failed to chmod %s','wp-china-yes'), $this->file->basename() ) );
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ class Loco_fs_FileWriter {
|
|||
// bugs in WP file system "exists" methods means we must force $overwrite=true; so checking file existence first
|
||||
if( $copy->exists() ){
|
||||
Loco_error_AdminNotices::debug(sprintf('Cannot copy %s to %s (target already exists)',$source,$target));
|
||||
throw new Loco_error_WriteException( __('Refusing to copy over an existing file','loco-translate') );
|
||||
throw new Loco_error_WriteException( __('Refusing to copy over an existing file','wp-china-yes') );
|
||||
}
|
||||
// ensure target directory exists, although in most cases copy will be in situ
|
||||
$parent = $copy->getParent();
|
||||
|
@ -157,7 +157,7 @@ class Loco_fs_FileWriter {
|
|||
// perform WP file system copy method
|
||||
if( ! $this->fs->copy($source,$target,true) ){
|
||||
Loco_error_AdminNotices::debug(sprintf('Failed to copy %s to %s via "%s" method',$source,$target,$this->fs->method));
|
||||
throw new Loco_error_WriteException( sprintf( __('Failed to copy %s to %s','loco-translate'), basename($source), basename($target) ) );
|
||||
throw new Loco_error_WriteException( sprintf( __('Failed to copy %s to %s','wp-china-yes'), basename($source), basename($target) ) );
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@ -195,7 +195,7 @@ class Loco_fs_FileWriter {
|
|||
public function delete( $recursive = false ){
|
||||
$this->authorize();
|
||||
if( ! $this->fs->delete( $this->getPath(), $recursive ) ){
|
||||
throw new Loco_error_WriteException( sprintf( __('Failed to delete %s','loco-translate'), $this->file->basename() ) );
|
||||
throw new Loco_error_WriteException( sprintf( __('Failed to delete %s','wp-china-yes'), $this->file->basename() ) );
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@ -211,7 +211,7 @@ class Loco_fs_FileWriter {
|
|||
$this->authorize();
|
||||
$file = $this->file;
|
||||
if( $file->isDirectory() ){
|
||||
throw new Loco_error_WriteException( sprintf( __('"%s" is a directory, not a file','loco-translate'), $file->basename() ) );
|
||||
throw new Loco_error_WriteException( sprintf( __('"%s" is a directory, not a file','wp-china-yes'), $file->basename() ) );
|
||||
}
|
||||
// file having no parent directory is likely an error, like a relative path.
|
||||
$dir = $file->getParent();
|
||||
|
@ -236,17 +236,17 @@ class Loco_fs_FileWriter {
|
|||
// provide useful reason for failure if possible
|
||||
if( $file->exists() && ! $file->writable() ){
|
||||
Loco_error_AdminNotices::debug( sprintf('File not writable via "%s" method, check permissions on %s',$fs->method,$path) );
|
||||
throw new Loco_error_WriteException( __("Permission denied to update file",'loco-translate') );
|
||||
throw new Loco_error_WriteException( __("Permission denied to update file",'wp-china-yes') );
|
||||
}
|
||||
// directory path should exist or have thrown error earlier.
|
||||
// directory path may not be writable by same fs context
|
||||
if( ! $dir->writable() ){
|
||||
Loco_error_AdminNotices::debug( sprintf('Directory not writable via "%s" method; check permissions for %s',$fs->method,$dir) );
|
||||
throw new Loco_error_WriteException( __("Parent directory isn't writable",'loco-translate') );
|
||||
throw new Loco_error_WriteException( __("Parent directory isn't writable",'wp-china-yes') );
|
||||
}
|
||||
// else reason for failure is not established
|
||||
Loco_error_AdminNotices::debug( sprintf('Unknown write failure via "%s" method; check %s',$fs->method,$path) );
|
||||
throw new Loco_error_WriteException( __('Failed to save file','loco-translate').': '.$file->basename() );
|
||||
throw new Loco_error_WriteException( __('Failed to save file','wp-china-yes').': '.$file->basename() );
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@ -277,7 +277,7 @@ class Loco_fs_FileWriter {
|
|||
foreach( $stack as $path ){
|
||||
if( ! $fs->mkdir($path,$mode) ){
|
||||
Loco_error_AdminNotices::debug( sprintf('mkdir(%s,%03o) failed via "%s" method;',var_export($path,1),$mode,$fs->method) );
|
||||
throw new Loco_error_WriteException( __('Failed to create directory','loco-translate') );
|
||||
throw new Loco_error_WriteException( __('Failed to create directory','wp-china-yes') );
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -285,7 +285,7 @@ class Loco_fs_FileWriter {
|
|||
$here = $parent;
|
||||
}
|
||||
// refusing to create directory when the entire path is missing. e.g. "/bad"
|
||||
throw new Loco_error_WriteException( __('Failed to build directory path','loco-translate') );
|
||||
throw new Loco_error_WriteException( __('Failed to build directory path','wp-china-yes') );
|
||||
}
|
||||
|
||||
|
||||
|
@ -296,17 +296,17 @@ class Loco_fs_FileWriter {
|
|||
*/
|
||||
public function authorize(){
|
||||
if( $this->disabled() ){
|
||||
throw new Loco_error_WriteException( __('File modification is disallowed by your WordPress config','loco-translate') );
|
||||
throw new Loco_error_WriteException( __('File modification is disallowed by your WordPress config','wp-china-yes') );
|
||||
}
|
||||
$opts = Loco_data_Settings::get();
|
||||
// deny system file changes (fs_protect = 2)
|
||||
if( 1 < $opts->fs_protect && $this->file->getUpdateType() ){
|
||||
throw new Loco_error_WriteException( __('Modification of installed files is disallowed by the plugin settings','loco-translate') );
|
||||
throw new Loco_error_WriteException( __('Modification of installed files is disallowed by the plugin settings','wp-china-yes') );
|
||||
}
|
||||
// deny POT modification (pot_protect = 2)
|
||||
// this assumes that templates all have .pot extension, which isn't guaranteed. UI should prevent saving of wrongly files like "default.po"
|
||||
if( 'pot' === $this->file->extension() && 1 < $opts->pot_protect ){
|
||||
throw new Loco_error_WriteException( __('Modification of POT (template) files is disallowed by the plugin settings','loco-translate') );
|
||||
throw new Loco_error_WriteException( __('Modification of POT (template) files is disallowed by the plugin settings','wp-china-yes') );
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
|
|
@ -60,16 +60,16 @@ class Loco_fs_LocaleDirectory extends Loco_fs_Directory {
|
|||
case 'theme':
|
||||
case 'plugin':
|
||||
// Translators: Refers to bundled plugin or theme translation files - i.e. those supplied by the author
|
||||
return _x('Author','File location','loco-translate');
|
||||
return _x('Author','File location','wp-china-yes');
|
||||
case 'wplang':
|
||||
// Translators: Refers to system-installed translation files - i.e. those under WP_LANG_DIR
|
||||
return _x('System','File location','loco-translate');
|
||||
return _x('System','File location','wp-china-yes');
|
||||
case 'custom':
|
||||
// Translators: Refers to translation files in Loco's custom/protected directory
|
||||
return _x('Custom','File location','loco-translate');
|
||||
return _x('Custom','File location','wp-china-yes');
|
||||
case 'other':
|
||||
// Translators: Refers to translation files in an alternative location that isn't Author, System or Custom.
|
||||
return _x('Other','File location','loco-translate');
|
||||
return _x('Other','File location','wp-china-yes');
|
||||
}
|
||||
|
||||
throw new InvalidArgumentException('Invalid location type: '.$id );
|
||||
|
|
|
@ -190,7 +190,7 @@ class Loco_gettext_Metadata extends Loco_data_Transient {
|
|||
*/
|
||||
public function getTotalSummary(){
|
||||
$total = $this->getTotal();
|
||||
return sprintf( _n('1 string','%s strings',$total,'loco-translate'), number_format($total) );
|
||||
return sprintf( _n('1 string','%s strings',$total,'wp-china-yes'), number_format($total) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -200,12 +200,12 @@ class Loco_gettext_Metadata extends Loco_data_Transient {
|
|||
*/
|
||||
public function getProgressSummary(){
|
||||
$extra = array();
|
||||
$stext = sprintf( __('%s%% translated','loco-translate'), $this->getPercent() ).', '.$this->getTotalSummary();
|
||||
$stext = sprintf( __('%s%% translated','wp-china-yes'), $this->getPercent() ).', '.$this->getTotalSummary();
|
||||
if( $num = $this->countFuzzy() ){
|
||||
$extra[] = sprintf( __('%s fuzzy','loco-translate'), number_format($num) );
|
||||
$extra[] = sprintf( __('%s fuzzy','wp-china-yes'), number_format($num) );
|
||||
}
|
||||
if( $num = $this->countUntranslated() ){
|
||||
$extra[] = sprintf( __('%s untranslated','loco-translate'), number_format($num) );
|
||||
$extra[] = sprintf( __('%s untranslated','wp-china-yes'), number_format($num) );
|
||||
}
|
||||
if( $extra ){
|
||||
$stext .= ' ('.implode(', ', $extra).')';
|
||||
|
|
|
@ -60,10 +60,10 @@ class Loco_hooks_AdminHooks extends Loco_hooks_Hookable {
|
|||
if( function_exists('wp_add_privacy_policy_content') ) {
|
||||
$url = apply_filters('loco_external','https://localise.biz/wordpress/plugin/privacy');
|
||||
wp_add_privacy_policy_content(
|
||||
__('Loco Translate','loco-translate'),
|
||||
esc_html( __("This plugin doesn't collect any data from public website visitors.",'loco-translate') ).'<br />'.
|
||||
__('Loco Translate','wp-china-yes'),
|
||||
esc_html( __("This plugin doesn't collect any data from public website visitors.",'wp-china-yes') ).'<br />'.
|
||||
wp_kses(
|
||||
sprintf( __('Administrators and auditors may wish to review Loco\'s <a href="%s">plugin privacy notice</a>.','loco-translate'), esc_url($url) ),
|
||||
sprintf( __('Administrators and auditors may wish to review Loco\'s <a href="%s">plugin privacy notice</a>.','wp-china-yes'), esc_url($url) ),
|
||||
array('a'=>array('href'=>true)), array('https')
|
||||
)
|
||||
);
|
||||
|
@ -78,7 +78,7 @@ class Loco_hooks_AdminHooks extends Loco_hooks_Hookable {
|
|||
// This earliest we need translations, and admin user locale should be set by now
|
||||
if( $this->router ){
|
||||
$domainPath = dirname( loco_plugin_self() ).'/languages';
|
||||
load_plugin_textdomain( 'loco-translate', false, $domainPath );
|
||||
load_plugin_textdomain( 'wp-china-yes', false, $domainPath );
|
||||
}
|
||||
// Unhook failure notice that would fire if this hook was not successful
|
||||
remove_action( 'admin_notices', array(__CLASS__,'print_hook_failure') );
|
||||
|
|
|
@ -118,7 +118,7 @@ class Loco_hooks_LoadHelper extends Loco_hooks_Hookable {
|
|||
public function filter_load_textdomain_mofile( $mopath, $domain ){
|
||||
// 2.0.14 changed text domain from "loco" to "loco-translate"
|
||||
// so if file doesn't exist, there's no harm in trying the legacy file name
|
||||
if( 'loco-translate' === $domain && ! file_exists($mopath) ){
|
||||
if( 'wp-china-yes' === $domain && ! file_exists($mopath) ){
|
||||
$mopath = str_replace('/loco-translate-','/loco-',$mopath);
|
||||
}
|
||||
return $mopath;
|
||||
|
|
|
@ -11,158 +11,158 @@ class Loco_js_Strings extends Loco_hooks_TranslateBuffer {
|
|||
public function compile(){
|
||||
|
||||
// When text filtering reduces to an empty view
|
||||
__("Nothing matches the text filter",'loco-translate');
|
||||
__("Nothing matches the text filter",'wp-china-yes');
|
||||
|
||||
/* Where %s is the name of the POT template file. Message appears after sync
|
||||
* xgettext: javascript-format */
|
||||
__("Merged from %s",'loco-translate');
|
||||
__("Merged from %s",'wp-china-yes');
|
||||
|
||||
// Message appears after sync operation
|
||||
__("Merged from source code",'loco-translate');
|
||||
__("Merged from source code",'wp-china-yes');
|
||||
|
||||
/* Summary of new strings after running in-editor Sync
|
||||
* xgettext: javascript-format */
|
||||
_n("1 new string added","%s new strings added",0,'loco-translate');
|
||||
_n("1 new string added","%s new strings added",0,'wp-china-yes');
|
||||
|
||||
/* Summary of existing strings that no longer exist after running in-editor Sync
|
||||
* xgettext: javascript-format */
|
||||
_n("1 obsolete string removed","%s obsolete strings removed",0,'loco-translate');
|
||||
_n("1 obsolete string removed","%s obsolete strings removed",0,'wp-china-yes');
|
||||
|
||||
/* Summary of existing translations where the source text has changed slightly
|
||||
* xgettext: javascript-format */
|
||||
_n("1 string marked Fuzzy","%s strings marked Fuzzy",0,'loco-translate');
|
||||
_n("1 string marked Fuzzy","%s strings marked Fuzzy",0,'wp-china-yes');
|
||||
|
||||
/* Message appears after sync operation, where %s refers to a POT file.
|
||||
* xgettext: javascript-format */
|
||||
__("Strings up to date with %s",'loco-translate');
|
||||
__("Strings up to date with %s",'wp-china-yes');
|
||||
|
||||
// Message appears after sync operation.
|
||||
__("Strings up to date with source code",'loco-translate');
|
||||
__("Strings up to date with source code",'wp-china-yes');
|
||||
|
||||
// xgettext: javascript-format
|
||||
__("%s unique source strings.",'loco-translate');
|
||||
__("%s unique source strings.",'wp-china-yes');
|
||||
|
||||
/* characters meaning individual unicode characters of source text
|
||||
* xgettext: javascript-format */
|
||||
__("%s characters will be sent for translation.",'loco-translate');
|
||||
__("%s characters will be sent for translation.",'wp-china-yes');
|
||||
|
||||
/* %s%% is a percentage, e.g. 50%
|
||||
* xgettext: javascript-format */
|
||||
__("Translation progress %s%%",'loco-translate');
|
||||
__("Translation progress %s%%",'wp-china-yes');
|
||||
|
||||
// xgettext: javascript-format
|
||||
_n("Translation job aborted with one string remaining","Translation job aborted with %s strings remaining",0,'loco-translate');
|
||||
_n("Translation job aborted with one string remaining","Translation job aborted with %s strings remaining",0,'wp-china-yes');
|
||||
|
||||
/* e.g. via Google Translate
|
||||
* xgettext: javascript-format */
|
||||
_n("%s string translated via %s","%s strings translated via %s",0,'loco-translate');
|
||||
_n("%s string translated via %s","%s strings translated via %s",0,'wp-china-yes');
|
||||
|
||||
// xgettext: javascript-format
|
||||
_n("%s string updated","%s strings updated",0,'loco-translate');
|
||||
_n("%s string updated","%s strings updated",0,'wp-china-yes');
|
||||
|
||||
//
|
||||
__("Nothing needed updating",'loco-translate');
|
||||
__("Nothing needed updating",'wp-china-yes');
|
||||
|
||||
//
|
||||
__("Use this translation",'loco-translate');
|
||||
__("Use this translation",'wp-china-yes');
|
||||
|
||||
//
|
||||
__("Suggested translations",'loco-translate');
|
||||
__("Suggested translations",'wp-china-yes');
|
||||
|
||||
//
|
||||
__("Loading suggestions",'loco-translate');
|
||||
__("Loading suggestions",'wp-china-yes');
|
||||
|
||||
//
|
||||
__("Keep this translation",'loco-translate');
|
||||
__("Keep this translation",'wp-china-yes');
|
||||
|
||||
// Warning appears when user tries to refresh or navigate away when editor work is unsaved
|
||||
__("Your changes will be lost if you continue without saving",'loco-translate');
|
||||
__("Your changes will be lost if you continue without saving",'wp-china-yes');
|
||||
|
||||
/* Shows total string count at top of editor
|
||||
* xgettext: javascript-format */
|
||||
_n("1 string","%s strings",0,'loco-translate');
|
||||
_n("1 string","%s strings",0,'wp-china-yes');
|
||||
|
||||
/* Shows percentage translated at top of editor
|
||||
* xgettext: javascript-format */
|
||||
__("%s%% translated",'loco-translate');
|
||||
__("%s%% translated",'wp-china-yes');
|
||||
|
||||
/* Shows number of fuzzy strings at top of editor
|
||||
* xgettext: javascript-format */
|
||||
__("%s fuzzy",'loco-translate');
|
||||
__("%s fuzzy",'wp-china-yes');
|
||||
|
||||
/* Shows number of untranslated strings at top of editor
|
||||
* xgettext: javascript-format */
|
||||
__("%s untranslated",'loco-translate');
|
||||
__("%s untranslated",'wp-china-yes');
|
||||
|
||||
// Generic error when external process broke an Ajax request
|
||||
__("Server returned invalid data",'loco-translate');
|
||||
__("Server returned invalid data",'wp-china-yes');
|
||||
|
||||
//
|
||||
__("Check console output for debugging information",'loco-translate');
|
||||
__("Check console output for debugging information",'wp-china-yes');
|
||||
|
||||
//
|
||||
__("Provide the following text when reporting a problem",'loco-translate');
|
||||
__("Provide the following text when reporting a problem",'wp-china-yes');
|
||||
|
||||
//
|
||||
__("Unknown error",'loco-translate');
|
||||
__("Unknown error",'wp-china-yes');
|
||||
|
||||
//
|
||||
__("Error",'loco-translate');
|
||||
__("Error",'wp-china-yes');
|
||||
|
||||
//
|
||||
__("Warning",'loco-translate');
|
||||
__("Warning",'wp-china-yes');
|
||||
|
||||
//
|
||||
__("Notice",'loco-translate');
|
||||
__("Notice",'wp-china-yes');
|
||||
|
||||
//
|
||||
__("OK",'loco-translate');
|
||||
__("OK",'wp-china-yes');
|
||||
|
||||
/* Label for the window pane holding the original English text
|
||||
* List heading showing preview of English text for each item */
|
||||
_x("Source text","Editor",'loco-translate');
|
||||
_x("Source text","Editor",'wp-china-yes');
|
||||
|
||||
/* Where %s is the name of the language, e.g. "French translation"
|
||||
* xgettext: javascript-format */
|
||||
_x("%s translation","Editor",'loco-translate');
|
||||
_x("%s translation","Editor",'wp-china-yes');
|
||||
|
||||
// Label for the window pane holding message context
|
||||
_x("Context","Editor",'loco-translate');
|
||||
_x("Context","Editor",'wp-china-yes');
|
||||
|
||||
// Label for the window pane for entering translator comments
|
||||
_x("Comments","Editor",'loco-translate');
|
||||
_x("Comments","Editor",'wp-china-yes');
|
||||
|
||||
// Label for the singular form of the original English text
|
||||
_x("Single","Editor",'loco-translate');
|
||||
_x("Single","Editor",'wp-china-yes');
|
||||
|
||||
// Label for the plural form of the original English text
|
||||
_x("Plural","Editor",'loco-translate');
|
||||
_x("Plural","Editor",'wp-china-yes');
|
||||
|
||||
//
|
||||
_x("Untranslated","Editor",'loco-translate');
|
||||
_x("Untranslated","Editor",'wp-china-yes');
|
||||
|
||||
//
|
||||
_x("Translated","Editor",'loco-translate');
|
||||
_x("Translated","Editor",'wp-china-yes');
|
||||
|
||||
//
|
||||
_x("Toggle Fuzzy","Editor",'loco-translate');
|
||||
_x("Toggle Fuzzy","Editor",'wp-china-yes');
|
||||
|
||||
//
|
||||
_x("Suggest translation","Editor",'loco-translate');
|
||||
_x("Suggest translation","Editor",'wp-china-yes');
|
||||
|
||||
// Label for the source text window when no translation selected
|
||||
_x("Source text not loaded","Editor",'loco-translate');
|
||||
_x("Source text not loaded","Editor",'wp-china-yes');
|
||||
|
||||
// Label for the context window when no translation selected
|
||||
_x("Context not loaded","Editor",'loco-translate');
|
||||
_x("Context not loaded","Editor",'wp-china-yes');
|
||||
|
||||
// Label for the translation editing window when no translation selected
|
||||
_x("Translation not loaded","Editor",'loco-translate');
|
||||
_x("Translation not loaded","Editor",'wp-china-yes');
|
||||
|
||||
// List heading showing preview of translated text for each item
|
||||
_x("Translation","Editor",'loco-translate');
|
||||
_x("Translation","Editor",'wp-china-yes');
|
||||
|
||||
|
||||
return $this->flush('loco-translate');
|
||||
return $this->flush('wp-china-yes');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
|
|||
$this->view->cd('/admin/help');
|
||||
$tabs = $this->getHelpTabs();
|
||||
// always append common help tabs
|
||||
$tabs[ __('Help & support','loco-translate') ] = $this->view->render('tab-support');
|
||||
$tabs[ __('Help & support','wp-china-yes') ] = $this->view->render('tab-support');
|
||||
// set all tabs and common side bar
|
||||
$i = 0;
|
||||
foreach( $tabs as $title => $content ){
|
||||
|
@ -115,7 +115,7 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
|
|||
*/
|
||||
public function filter_admin_footer_text(){
|
||||
$url = apply_filters('loco_external', 'https://localise.biz/');
|
||||
// return '<span id="loco-credit">'.sprintf( '<span>%s</span> <a href="%s" target="_blank">Loco</a>', esc_html(__('Loco Translate is powered by','loco-translate')), esc_url($url) ).'</span>';
|
||||
// return '<span id="loco-credit">'.sprintf( '<span>%s</span> <a href="%s" target="_blank">Loco</a>', esc_html(__('Loco Translate is powered by','wp-china-yes')), esc_url($url) ).'</span>';
|
||||
return '';
|
||||
}
|
||||
|
||||
|
@ -213,14 +213,14 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
|
|||
// TODO perhaps do some kind of in-script check validation check
|
||||
// $jsConf->offsetSet('$v',loco_plugin_version() );
|
||||
// localize script if translations in memory
|
||||
if( is_textdomain_loaded('loco-translate') ){
|
||||
if( is_textdomain_loaded('wp-china-yes') ){
|
||||
$strings = new Loco_js_Strings;
|
||||
$jsConf['wpl10n'] = $strings->compile();
|
||||
$strings->unhook();
|
||||
unset( $strings );
|
||||
// add currently loaded locale for passing plural equation into js.
|
||||
// note that plural rules come from our data, because MO is not trusted.
|
||||
$tag = apply_filters( 'plugin_locale', get_locale(), 'loco-translate' );
|
||||
$tag = apply_filters( 'plugin_locale', get_locale(), 'wp-china-yes' );
|
||||
$jsConf['wplang'] = Loco_Locale::parse($tag);
|
||||
}
|
||||
// take benchmark for debugger to be rendered in footer
|
||||
|
|
|
@ -34,43 +34,43 @@ class Loco_mvc_AdminRouter extends Loco_hooks_Hookable {
|
|||
// main loco pages, hooking only if has permission
|
||||
if( $user->has_cap($cap) ){
|
||||
/*
|
||||
$label = __('Loco Translate','loco-translate');
|
||||
$label = __('Loco Translate','wp-china-yes');
|
||||
// translators: Page title for plugin home screen
|
||||
$title = __('Loco, Translation Management','loco-translate');
|
||||
$title = __('Loco, Translation Management','wp-china-yes');
|
||||
add_menu_page( $title, $label, $cap, 'loco', $render, 'dashicons-translation' );
|
||||
// alternative label for first menu item which gets repeated from top level
|
||||
add_submenu_page( 'loco', $title, __('Home','loco-translate'), $cap, 'loco', $render );
|
||||
add_submenu_page( 'loco', $title, __('Home','wp-china-yes'), $cap, 'loco', $render );
|
||||
*/
|
||||
$label = __('插件翻译校准', 'loco-translate');
|
||||
$label = __('插件翻译校准', 'wp-china-yes');
|
||||
// translators: Page title for plugin translations
|
||||
$title = __('Plugin translations ‹ Loco','loco-translate');
|
||||
$title = __('Plugin translations ‹ Loco','wp-china-yes');
|
||||
add_submenu_page( 'wpcy', $title, $label, $cap, 'loco-plugin', $render, 1 );
|
||||
|
||||
$label = __('主题翻译校准','loco-translate');
|
||||
$label = __('主题翻译校准','wp-china-yes');
|
||||
// translators: Page title for theme translations
|
||||
$title = __('Theme translations ‹ Loco','loco-translate');
|
||||
$title = __('Theme translations ‹ Loco','wp-china-yes');
|
||||
add_submenu_page( 'wpcy', $title, $label, $cap, 'loco-theme', $render, 2 );
|
||||
|
||||
/*
|
||||
$label = __('WordPress', 'loco-translate');
|
||||
$label = __('WordPress', 'wp-china-yes');
|
||||
// translators: Page title for core WordPress translations
|
||||
$title = __('Core translations ‹ Loco', 'loco-translate');
|
||||
$title = __('Core translations ‹ Loco', 'wp-china-yes');
|
||||
add_submenu_page( 'loco', $title, $label, $cap, 'loco-core', $render );
|
||||
|
||||
$label = __('Languages', 'loco-translate');
|
||||
$label = __('Languages', 'wp-china-yes');
|
||||
// translators: Page title for installed languages page
|
||||
$title = __('Languages ‹ Loco', 'loco-translate');
|
||||
$title = __('Languages ‹ Loco', 'wp-china-yes');
|
||||
add_submenu_page( 'loco', $title, $label, $cap, 'loco-lang', $render );
|
||||
|
||||
// settings page only for users with manage_options permission in addition to Loco access:
|
||||
if( $user->has_cap('manage_options') ){
|
||||
$title = __('Plugin settings','loco-translate');
|
||||
add_submenu_page( 'loco', $title, __('Settings','loco-translate'), 'manage_options', 'loco-config', $render );
|
||||
$title = __('Plugin settings','wp-china-yes');
|
||||
add_submenu_page( 'loco', $title, __('Settings','wp-china-yes'), 'manage_options', 'loco-config', $render );
|
||||
}
|
||||
// but all users need access to user preferences which require standard Loco access permission
|
||||
else {
|
||||
$title = __('User options','loco-translate');
|
||||
add_submenu_page( 'loco', $title, __('Settings','loco-translate'), $cap, 'loco-config-user', $render );
|
||||
$title = __('User options','wp-china-yes');
|
||||
add_submenu_page( 'loco', $title, __('Settings','wp-china-yes'), $cap, 'loco-config-user', $render );
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ class Loco_mvc_AdminRouter extends Loco_hooks_Hookable {
|
|||
try {
|
||||
// show deferred failure from initPage
|
||||
if( ! $this->ctrl ){
|
||||
throw new Loco_error_Exception( __('Page not found','loco-translate') );
|
||||
throw new Loco_error_Exception( __('Page not found','wp-china-yes') );
|
||||
}
|
||||
// display loco admin page
|
||||
echo $this->ctrl->render();
|
||||
|
|
|
@ -166,12 +166,12 @@ class Loco_mvc_AjaxRouter extends Loco_hooks_Hookable {
|
|||
// respond with deferred failure from initAjax
|
||||
if( ! $this->ctrl ){
|
||||
$route = isset($_REQUEST['route']) ? $_REQUEST['route'] : '';
|
||||
throw new Loco_error_Exception( sprintf( __('Ajax route not found: "%s"','loco-translate'), $route ) );
|
||||
throw new Loco_error_Exception( sprintf( __('Ajax route not found: "%s"','wp-china-yes'), $route ) );
|
||||
}
|
||||
// else execute controller to get json output
|
||||
$json = $this->ctrl->render();
|
||||
if( is_null($json) || '' === $json ){
|
||||
throw new Loco_error_Exception( __('Ajax controller returned empty JSON','loco-translate') );
|
||||
throw new Loco_error_Exception( __('Ajax controller returned empty JSON','wp-china-yes') );
|
||||
}
|
||||
}
|
||||
catch( Loco_error_Exception $e ){
|
||||
|
@ -194,12 +194,12 @@ class Loco_mvc_AjaxRouter extends Loco_hooks_Hookable {
|
|||
try {
|
||||
// respond with deferred failure from initAjax
|
||||
if( ! $this->ctrl ){
|
||||
throw new Loco_error_Exception( __('Download action not found','loco-translate') );
|
||||
throw new Loco_error_Exception( __('Download action not found','wp-china-yes') );
|
||||
}
|
||||
// else execute controller to get raw output
|
||||
$data = $this->ctrl->render();
|
||||
if( is_null($data) || '' === $data ){
|
||||
throw new Loco_error_Exception( __('Download controller returned empty output','loco-translate') );
|
||||
throw new Loco_error_Exception( __('Download controller returned empty output','wp-china-yes') );
|
||||
}
|
||||
}
|
||||
catch( Exception $e ){
|
||||
|
|
|
@ -142,7 +142,7 @@ class Loco_mvc_FileParams extends Loco_mvc_ViewParams {
|
|||
}
|
||||
if( $time_diff < 30 ){
|
||||
// translators: relative time when something happened in the last 30 seconds
|
||||
return __('Just now','loco-translate');
|
||||
return __('Just now','wp-china-yes');
|
||||
}
|
||||
return sprintf( __('%s ago','default'), human_time_diff($time) );
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ class Loco_output_Buffer {
|
|||
public static function check(){
|
||||
if( headers_sent($file,$line) && 'cli' !== PHP_SAPI ){
|
||||
$file = str_replace( trailingslashit( loco_constant('ABSPATH') ), '', $file );
|
||||
throw new Loco_error_Exception( sprintf( __('Loco interrupted by output from %s:%u','loco-translate'), $file, $line ) );
|
||||
throw new Loco_error_Exception( sprintf( __('Loco interrupted by output from %s:%u','wp-china-yes'), $file, $line ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class Loco_package_Core extends Loco_package_Bundle {
|
|||
'TextDomain' => 'default',
|
||||
'DomainPath' => '/wp-content/languages/',
|
||||
// dummy author info for core components
|
||||
'Name' => __('WordPress core','loco-translate'),
|
||||
'Name' => __('WordPress core','wp-china-yes'),
|
||||
'Version' => $GLOBALS['wp_version'],
|
||||
'Author' => __('The WordPress Team','default'),
|
||||
'AuthorURI' => __('https://wordpress.org/','default'),
|
||||
|
@ -76,7 +76,7 @@ class Loco_package_Core extends Loco_package_Bundle {
|
|||
$rootDir = loco_constant('ABSPATH');
|
||||
$langDir = loco_constant('WP_LANG_DIR');
|
||||
|
||||
$bundle = new Loco_package_Core('core', __('WordPress Core','loco-translate') );
|
||||
$bundle = new Loco_package_Core('core', __('WordPress Core','wp-china-yes') );
|
||||
$bundle->setDirectoryPath( $rootDir );
|
||||
|
||||
// Core config may be saved in DB, but not supporting bundled XML
|
||||
|
|
|
@ -183,7 +183,7 @@ class Loco_package_Debugger implements IteratorAggregate {
|
|||
if( isset($realCounts[$domain]) ){
|
||||
$count = $counts[$domain];
|
||||
$realCount = $realCounts[$domain];
|
||||
$str = _n( 'One string extracted from source code for "%2$s"', '%s strings extracted from source code for "%s"', $realCount, 'loco-translate' );
|
||||
$str = _n( 'One string extracted from source code for "%2$s"', '%s strings extracted from source code for "%s"', $realCount, 'wp-china-yes' );
|
||||
$this->good( $str.' (%s including metadata)', number_format($realCount), $domain?$domain:'*', number_format($count) );
|
||||
}
|
||||
else {
|
||||
|
@ -201,7 +201,7 @@ class Loco_package_Debugger implements IteratorAggregate {
|
|||
// with extracted strings we can check for domain mismatches
|
||||
if( $missing = array_diff_key($domains, $realCounts) ){
|
||||
$num = count($missing);
|
||||
$str = _n( 'Configured domain has no extractable strings', '%u configured domains have no extractable strings', $num, 'loco-translate' );
|
||||
$str = _n( 'Configured domain has no extractable strings', '%u configured domains have no extractable strings', $num, 'wp-china-yes' );
|
||||
$this->warn( $str.': %2$s', $num, $this->implodeKeys($missing) );
|
||||
}
|
||||
if( $extra = array_diff_key($realCounts,$domains) ){
|
||||
|
|
|
@ -74,13 +74,13 @@ class Loco_package_Header {
|
|||
}
|
||||
}
|
||||
else {
|
||||
$author = __('Unknown author','loco-translate');
|
||||
$author = __('Unknown author','wp-china-yes');
|
||||
}
|
||||
// translators: Author credit: "<product>" <version> by <author>
|
||||
$html = sprintf( __('"%s" %s by %s','default'), esc_html($this->Name), $this->Version, $author );
|
||||
|
||||
if( ( $link = $this->PluginURI ) || ( $link = $this->ThemeURI ) ){
|
||||
$html .= sprintf( ' — <a href="%s" target="_blank">%s</a>', esc_url($link), __('Visit official site','loco-translate') );
|
||||
$html .= sprintf( ' — <a href="%s" target="_blank">%s</a>', esc_url($link), __('Visit official site','wp-china-yes') );
|
||||
}
|
||||
|
||||
return $html;
|
||||
|
|
|
@ -205,7 +205,7 @@ class Loco_package_Plugin extends Loco_package_Bundle {
|
|||
// plugin must be registered with at least a name and "basedir"
|
||||
$data = self::get_plugin($handle);
|
||||
if( ! $data ){
|
||||
throw new Loco_error_Exception( sprintf( __('Plugin not found: %s','loco-translate'),$handle) );
|
||||
throw new Loco_error_Exception( sprintf( __('Plugin not found: %s','wp-china-yes'),$handle) );
|
||||
}
|
||||
|
||||
// lazy resolve of base directory from "basedir" property that we added
|
||||
|
|
|
@ -8,12 +8,12 @@ $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')?>
|
||||
<?php esc_attr_e('"Hello Dolly" is part of the WordPress core','wp-china-yes')?>
|
||||
</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')?>.
|
||||
<?php esc_html_e("This plugin doesn't have its own translation files, but can be translated in the default text domain", 'wp-china-yes')?>.
|
||||
</p>
|
||||
<p>
|
||||
<a href="<?php $params->e('redirect')?>"><?php esc_html_e('Go to WordPress Core','loco-translate')?></a>
|
||||
<a href="<?php $params->e('redirect')?>"><?php esc_html_e('Go to WordPress Core','wp-china-yes')?></a>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -26,91 +26,91 @@ $this->extend('../layout');
|
|||
<tbody>
|
||||
<tr valign="top">
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id?>-name"><?php esc_html_e('Project name','loco-translate')?></label>
|
||||
<label for="<?php echo $id?>-name"><?php esc_html_e('Project name','wp-china-yes')?></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')?>
|
||||
esc_html_e('Descriptive name for this set of translatable strings','wp-china-yes')?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id?>-domain"><?php esc_html_e('Text domain','loco-translate')?></label>
|
||||
<label for="<?php echo $id?>-domain"><?php esc_html_e('Text domain','wp-china-yes')?></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')?>
|
||||
esc_html_e('The namespace into which WordPress will load translated strings','wp-china-yes')?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id?>-slug"><?php esc_html_e('File prefix','loco-translate')?></label>
|
||||
<label for="<?php echo $id?>-slug"><?php esc_html_e('File prefix','wp-china-yes')?></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')?>
|
||||
esc_html_e("Usually the same as the text domain, but don't leave blank unless you mean to",'wp-china-yes')?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id?>-template"><?php esc_html_e('Template file','loco-translate')?></label>
|
||||
<label for="<?php echo $id?>-template"><?php esc_html_e('Template file','wp-china-yes')?></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')?>
|
||||
<?php esc_html_e('Locked','wp-china-yes')?>
|
||||
</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')?>
|
||||
esc_html_e('Relative path from bundle root to the official POT file','wp-china-yes')?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id?>-target"><?php esc_html_e('Domain path','loco-translate')?></label>
|
||||
<label for="<?php echo $id?>-target"><?php esc_html_e('Domain path','wp-china-yes')?></label>
|
||||
</th>
|
||||
<td class="twin">
|
||||
<div>
|
||||
<span class="description"><?php esc_html_e('Include','loco-translate')?>:</span>
|
||||
<span class="description"><?php esc_html_e('Include','wp-china-yes')?>:</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>
|
||||
<span class="description"><?php esc_html_e('Exclude','wp-china-yes')?>:</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')?>)
|
||||
esc_html_e('Folders within the bundle that contain author-supplied translations','wp-china-yes')?>. (<?php esc_html_e('no wildcards','wp-china-yes')?>)
|
||||
</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>
|
||||
<label for="<?php echo $id?>-source"><?php esc_html_e('Source file paths','wp-china-yes')?></label>
|
||||
</th>
|
||||
<td class="twin">
|
||||
<div>
|
||||
<span class="description"><?php esc_html_e('Include','loco-translate')?>:</span>
|
||||
<span class="description"><?php esc_html_e('Include','wp-china-yes')?>:</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>
|
||||
<span class="description"><?php esc_html_e('Exclude','wp-china-yes')?>:</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')?>)
|
||||
esc_html_e('Files and folders within the bundle that contain localized PHP code','wp-china-yes')?>. (<?php esc_html_e('no wildcards','wp-china-yes')?>)
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -125,25 +125,25 @@ $this->extend('../layout');
|
|||
<tbody>
|
||||
<tr valign="top">
|
||||
<th scope="row">
|
||||
<label for="all-excl"><?php esc_html_e('Blocked paths','loco-translate')?>:</label>
|
||||
<label for="all-excl"><?php esc_html_e('Blocked paths','wp-china-yes')?>:</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')?>)
|
||||
esc_html_e('Folders within the bundle that will never be searched for files','wp-china-yes')?>. (<?php esc_html_e('no wildcards','wp-china-yes')?>)
|
||||
</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
|
||||
<input type="submit" class="button-primary" value="<?php esc_html_e('Save config','wp-china-yes')?>" />
|
||||
<button type="button" class="button" disabled id="loco-add-butt"><?php esc_html_e('Add set','wp-china-yes')?></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
|
||||
<a class="button button-link has-icon icon-cog" href="<?php $parent->e('href')?>"><?php esc_html_e('Parent theme','wp-china-yes')?></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>
|
||||
<a class="button button-link has-icon icon-download" href="<?php $params->e('xmlUrl')?>"><?php esc_html_e('XML','wp-china-yes')?></a>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
|
@ -156,7 +156,7 @@ $this->extend('../layout');
|
|||
<?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="submit" name="unconf" class="button button-danger" value="<?php esc_html_e('Reset config','wp-china-yes')?>" />
|
||||
<input type="hidden" name="<?php $nonce->e('name')?>" value="<?php $nonce->e('value')?>" />
|
||||
</p>
|
||||
</form><?php
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
$this->extend('../layout');
|
||||
?>
|
||||
<p>
|
||||
<?php esc_html_e('This information is for developers to find problems in the bundle setup','loco-translate')?>.
|
||||
<?php esc_html_e('This information is for developers to find problems in the bundle setup','wp-china-yes')?>.
|
||||
</p>
|
||||
<p data-vendor="<?php $meta->e('vendor')?>">
|
||||
<?php echo $meta->author?>
|
||||
|
|
|
@ -11,7 +11,7 @@ $this->extend('../layout');
|
|||
<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 echo esc_html_x('Updated','Modified time','wp-china-yes')?>:</span>
|
||||
<span><?php $params->date('modified')?></span>
|
||||
</span>
|
||||
</h3>
|
||||
|
@ -29,24 +29,24 @@ $this->extend('../layout');
|
|||
<thead>
|
||||
<tr>
|
||||
<th data-sort-type="s">
|
||||
<?php esc_html_e('Bundle name','loco-translate')?>
|
||||
<?php esc_html_e('Bundle name','wp-china-yes')?>
|
||||
</th><?php
|
||||
if( $npofiles ):?>
|
||||
<th colspan="2" data-sort-type="n">
|
||||
<?php esc_html_e('Translation progress','loco-translate')?>
|
||||
<?php esc_html_e('Translation progress','wp-china-yes')?>
|
||||
</th>
|
||||
<th data-sort-type="n">
|
||||
<?php esc_html_e('Pending','loco-translate')?>
|
||||
<?php esc_html_e('Pending','wp-china-yes')?>
|
||||
</th><?php
|
||||
endif?>
|
||||
<th data-sort-type="s">
|
||||
<?php esc_html_e('File info','loco-translate')?>
|
||||
<?php esc_html_e('File info','wp-china-yes')?>
|
||||
</th>
|
||||
<th data-sort-type="n">
|
||||
<?php esc_html_e('Last modified','loco-translate')?>
|
||||
<?php esc_html_e('Last modified','wp-china-yes')?>
|
||||
</th>
|
||||
<th data-sort-type="s">
|
||||
<?php esc_html_e('Folder','loco-translate')?>
|
||||
<?php esc_html_e('Folder','wp-china-yes')?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -60,19 +60,19 @@ $this->extend('../layout');
|
|||
</a>
|
||||
<nav class="row-actions">
|
||||
<span>
|
||||
<a href="<?php $po->e('edit')?>"><?php esc_html_e('Edit','loco-translate')?></a> |
|
||||
<a href="<?php $po->e('edit')?>"><?php esc_html_e('Edit','wp-china-yes')?></a> |
|
||||
</span>
|
||||
<span>
|
||||
<a href="<?php $po->e('view')?>"><?php esc_html_e('View','loco-translate')?></a> |
|
||||
<a href="<?php $po->e('view')?>"><?php esc_html_e('View','wp-china-yes')?></a> |
|
||||
</span>
|
||||
<span>
|
||||
<a href="<?php $po->e('info')?>"><?php esc_html_e('Info','loco-translate')?></a> |
|
||||
<a href="<?php $po->e('info')?>"><?php esc_html_e('Info','wp-china-yes')?></a> |
|
||||
</span>
|
||||
<span>
|
||||
<a href="<?php $po->e('copy')?>"><?php esc_html_e('Copy','loco-translate')?></a> |
|
||||
<a href="<?php $po->e('copy')?>"><?php esc_html_e('Copy','wp-china-yes')?></a> |
|
||||
</span>
|
||||
<span class="trash">
|
||||
<a href="<?php $po->e('delete')?>"><?php esc_html_e('Delete','loco-translate')?></a>
|
||||
<a href="<?php $po->e('delete')?>"><?php esc_html_e('Delete','wp-china-yes')?></a>
|
||||
</span>
|
||||
</nav>
|
||||
</td><?php
|
||||
|
|
|
@ -9,10 +9,10 @@ echo $header;
|
|||
?>
|
||||
<div class="notice inline notice-generic">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('Author details','loco-translate')?>
|
||||
<?php esc_html_e('Author details','wp-china-yes')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e('If you have trouble translating this bundle, consider asking the author for help','loco-translate')?>.
|
||||
<?php esc_html_e('If you have trouble translating this bundle, consider asking the author for help','wp-china-yes')?>.
|
||||
</p>
|
||||
<p>
|
||||
<?php echo $credit?>
|
||||
|
|
|
@ -8,11 +8,11 @@ $this->start('header');
|
|||
|
||||
<div class="notice inline notice-success">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('Official configuration','loco-translate')?>
|
||||
<?php esc_html_e('Official configuration','wp-china-yes')?>
|
||||
</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')?>.
|
||||
<?php esc_html_e("This bundle's configuration is provided by the author",'wp-china-yes')?>.
|
||||
<?php esc_html_e("You can make changes in the Advanced tab if you need to override the current settings",'wp-china-yes')?>.
|
||||
</p>
|
||||
<?php echo $this->render('inc-nav')?>
|
||||
</div>
|
||||
|
|
|
@ -9,11 +9,11 @@ $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')?>
|
||||
<?php esc_html_e('Check config repository','wp-china-yes')?>
|
||||
</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')?>
|
||||
<?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",'wp-china-yes')?>
|
||||
</p>
|
||||
<p>
|
||||
<select name="vendor">
|
||||
|
@ -24,14 +24,14 @@ $this->start('header');
|
|||
</fieldset>
|
||||
<div id="loco-remote-empty">
|
||||
<p>
|
||||
<button type="button" class="button button-primary"><?php esc_html_e('Find config','loco-translate')?></button>
|
||||
<button type="button" class="button button-primary"><?php esc_html_e('Find config','wp-china-yes')?></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="submit" class="button button-success" name="json-setup" value="<?php esc_attr_e('OK, Load this config','wp-china-yes')?>" />
|
||||
<input type="reset" class="button button-link" value="<?php esc_attr_e('Cancel','default')?>" />
|
||||
</p>
|
||||
</div>
|
||||
|
@ -43,16 +43,16 @@ $this->start('header');
|
|||
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')?>
|
||||
<?php esc_html_e('XML setup','wp-china-yes')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("If you've been given a configuration file by a developer, paste the XML code here",'loco-translate')?>:
|
||||
<?php esc_html_e("If you've been given a configuration file by a developer, paste the XML code here",'wp-china-yes')?>:
|
||||
</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')?>" />
|
||||
<input type="submit" class="button button-primary" name="xml-setup" value="<?php esc_html_e('Load config','wp-china-yes')?>" />
|
||||
<a href="<?php $tabs[1]->e('href')?>" class="button button-link"><?php esc_html_e('Cancel','default')?></a>
|
||||
</p>
|
||||
<?php $xmlFields->_e()?>
|
||||
|
|
|
@ -7,14 +7,14 @@ $this->extend('../../layout');
|
|||
|
||||
<div class="notice inline notice-success">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('Bundle auto-configured','loco-translate')?>
|
||||
<?php esc_html_e('Bundle auto-configured','wp-china-yes')?>
|
||||
</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')?>.
|
||||
<?php esc_html_e("This bundle's configuration is built into Loco",'wp-china-yes')?>.
|
||||
<?php esc_html_e("You can make changes in the Advanced tab if you need to override the current settings",'wp-china-yes')?>.
|
||||
</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>
|
||||
<a href="<?php $tabs[2]->e('href')?>" class="button button-link has-icon icon-wrench"><?php esc_html_e('Advanced configuration','wp-china-yes')?></a>
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -16,11 +16,11 @@
|
|||
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>
|
||||
<a href="<?php $tabs[2]->e('href')?>" class="button button-link has-icon icon-wrench"><?php esc_html_e('Advanced configuration','wp-china-yes')?></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>
|
||||
<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','wp-china-yes')?></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>
|
||||
<a href="<?php echo $help?>" class="button button-link has-icon icon-help" target="_blank"><?php esc_html_e('Get help with this','wp-china-yes')?></a>
|
||||
</p>
|
||||
|
|
|
@ -8,11 +8,11 @@ $this->start('header');
|
|||
|
||||
<div class="notice inline notice-success">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('Bundle auto-configured','loco-translate')?>
|
||||
<?php esc_html_e('Bundle auto-configured','wp-china-yes')?>
|
||||
</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')?>.
|
||||
<?php esc_html_e("This bundle's configuration has been automatically detected and seems to be fully compatible",'wp-china-yes')?>.
|
||||
<?php esc_html_e("You can make changes in the Advanced tab if you need to override the current settings",'wp-china-yes')?>.
|
||||
</p>
|
||||
<?php echo $this->render('inc-nav')?>
|
||||
</div>
|
||||
|
|
|
@ -8,11 +8,11 @@ $this->start('header');
|
|||
|
||||
<div class="notice inline notice-error">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('Unconfigured bundle','loco-translate')?>
|
||||
<?php esc_html_e('Unconfigured bundle','wp-china-yes')?>
|
||||
</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')?>.
|
||||
<?php esc_html_e('This bundle isn\'t set up for translation in a way we understand','wp-china-yes')?>.
|
||||
<?php esc_html_e('It needs configuring before you can do any translations','wp-china-yes')?>.
|
||||
</p>
|
||||
<?php echo $this->render('inc-nav')?>
|
||||
</div>
|
|
@ -8,10 +8,10 @@ $this->start('header');
|
|||
|
||||
<div class="notice inline notice-warning">
|
||||
<h3 class="has-icon icon-info">
|
||||
<?php esc_html_e('Partially configured bundle','loco-translate')?>
|
||||
<?php esc_html_e('Partially configured bundle','wp-china-yes')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("This bundle's configuration has been automatically detected, but isn't fully complete",'loco-translate')?>.
|
||||
<?php esc_html_e("This bundle's configuration has been automatically detected, but isn't fully complete",'wp-china-yes')?>.
|
||||
</p>
|
||||
<?php echo $this->render('inc-nav')?>
|
||||
</div>
|
||||
|
|
|
@ -8,15 +8,15 @@ $this->start('header');
|
|||
|
||||
<div class="notice inline notice-info">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('Bundle configuration saved','loco-translate')?>
|
||||
<?php esc_html_e('Bundle configuration saved','wp-china-yes')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("This bundle's configuration is saved in the WordPress database",'loco-translate')?>.
|
||||
<?php esc_html_e("This bundle's configuration is saved in the WordPress database",'wp-china-yes')?>.
|
||||
</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>
|
||||
<input type="submit" name="reset-setup" class="button button-danger" value="<?php esc_html_e('Reset config','wp-china-yes')?>" />
|
||||
<a href="<?php $tabs[2]->e('href')?>" class="button button-link has-icon icon-wrench"><?php esc_html_e('Edit config','wp-china-yes')?></a>
|
||||
</p>
|
||||
<?php $reset->_e()?>
|
||||
</form>
|
||||
|
|
|
@ -26,13 +26,13 @@ endforeach;
|
|||
if( $unknown ):?>
|
||||
<div class="loco-project">
|
||||
<div class="notice inline notice-info">
|
||||
<h2><?php esc_html_e('Additional files found','loco-translate')?></h2>
|
||||
<h2><?php esc_html_e('Additional files found','wp-china-yes')?></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
|
||||
esc_html_e("This bundle isn't fully configured, so we don't know what the following files are for",'wp-china-yes')?>. <?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 ),
|
||||
sprintf( __('Click the <a href="%s">setup</a> tab to complete the bundle configuration','wp-china-yes'), $tabs[1]->href ),
|
||||
array('a'=>array('href'=>true)), array('http','https')
|
||||
);?>.
|
||||
</p>
|
||||
|
@ -49,12 +49,12 @@ endif;
|
|||
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>
|
||||
<h2><?php $params->e('name')?> <span>(<?php esc_html_e('unconfigured','wp-china-yes')?>)</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
|
||||
esc_html_e("This bundle isn't automatically compatible and requires configuring before you can use all the functions of Loco Translate",'wp-china-yes')?>. <?php
|
||||
echo wp_kses(
|
||||
sprintf( __('Click the <a href="%s">setup</a> tab to complete the bundle configuration','loco-translate'), $tabs[1]->href ),
|
||||
sprintf( __('Click the <a href="%s">setup</a> tab to complete the bundle configuration','wp-china-yes'), $tabs[1]->href ),
|
||||
array('a'=>array('href'=>true)), array('http','https')
|
||||
);?>.
|
||||
</p>
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
if( $params->has('fsLocked') ):?>
|
||||
<div class="has-nav notice inline notice-locked">
|
||||
<p>
|
||||
<strong class="has-icon"><?php esc_html_e('Locked','loco-translate')?>:</strong>
|
||||
<strong class="has-icon"><?php esc_html_e('Locked','wp-china-yes')?>:</strong>
|
||||
<span><?php $params->e('fsLocked')?>.</span>
|
||||
</p>
|
||||
<nav>
|
||||
<a href="<?php echo $help?>#wp" target="_blank"><?php esc_html_e('Documentation','loco-translate')?></a>
|
||||
<a href="<?php echo $help?>#wp" target="_blank"><?php esc_html_e('Documentation','wp-china-yes')?></a>
|
||||
<span>|</span>
|
||||
<a href="<?php $this->route('config')->e('href')?>#loco--fs-protect"><?php esc_html_e('Settings','loco-translate')?></a>
|
||||
<a href="<?php $this->route('config')->e('href')?>#loco--fs-protect"><?php esc_html_e('Settings','wp-china-yes')?></a>
|
||||
</nav>
|
||||
</div><?php
|
||||
|
||||
|
@ -24,8 +24,8 @@
|
|||
elseif( $params->has('fsDenied') ):?>
|
||||
<div class="has-nav notice inline notice-locked">
|
||||
<p>
|
||||
<strong class="has-icon"><?php esc_html_e('Read only','loco-translate')?>:</strong>
|
||||
<span><?php esc_html_e('File is protected by the bundle configuration','loco-translate')?>.</span>
|
||||
<strong class="has-icon"><?php esc_html_e('Read only','wp-china-yes')?>:</strong>
|
||||
<span><?php esc_html_e('File is protected by the bundle configuration','wp-china-yes')?>.</span>
|
||||
</p>
|
||||
</div><?php
|
||||
|
||||
|
@ -34,30 +34,30 @@
|
|||
else:?>
|
||||
<div id="loco-fs-warn" class="has-nav notice inline notice-info jshide">
|
||||
<p>
|
||||
<strong class="has-icon"><?php esc_html_e('Notice','loco-translate')?>:</strong>
|
||||
<strong class="has-icon"><?php esc_html_e('Notice','wp-china-yes')?>:</strong>
|
||||
<span class="loco-msg"><!-- warning to be loaded by ajax --></span>
|
||||
</p>
|
||||
<nav>
|
||||
<a href="<?php echo $help?>#wp" target="_blank"><?php esc_html_e('Documentation','loco-translate')?></a>
|
||||
<a href="<?php echo $help?>#wp" target="_blank"><?php esc_html_e('Documentation','wp-china-yes')?></a>
|
||||
<span>|</span>
|
||||
<a href="<?php $this->route('config')->e('href')?>#loco--fs-protect"><?php esc_html_e('Settings','loco-translate')?></a>
|
||||
<a href="<?php $this->route('config')->e('href')?>#loco--fs-protect"><?php esc_html_e('Settings','wp-china-yes')?></a>
|
||||
</nav>
|
||||
</div>
|
||||
<form id="loco-fs" class="has-nav notice inline notice-locked jshide jsonly">
|
||||
<p>
|
||||
<strong class="has-icon"><?php
|
||||
// Translators: When a file or folder cannot be modified due to filesystem permissions
|
||||
esc_html_e('Write protected','loco-translate')?>:
|
||||
esc_html_e('Write protected','wp-china-yes')?>:
|
||||
</strong>
|
||||
<span class="loco-msg">
|
||||
<!-- specific reason to be loaded by ajax -->
|
||||
</span>
|
||||
<span><?php
|
||||
esc_html_e('Click "Connect" to authenticate with the server','loco-translate')?>.
|
||||
esc_html_e('Click "Connect" to authenticate with the server','wp-china-yes')?>.
|
||||
</span>
|
||||
</p>
|
||||
<nav>
|
||||
<button type="button" class="button button-small button-primary"><?php esc_html_e('Connect','loco-translate')?></button>
|
||||
<button type="button" class="button button-small button-primary"><?php esc_html_e('Connect','wp-china-yes')?></button>
|
||||
<a class="button button-small" href="<?php echo $help?>#remote" target="_blank"> ? </a>
|
||||
</nav><?php
|
||||
$fsFields->_e();?>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<span><?php $locale->e('name')?></span>
|
||||
</a>
|
||||
<span class="loco-meta">
|
||||
<span><?php echo esc_html_x('Updated','Modified time','loco-translate')?>:</span>
|
||||
<span><?php echo esc_html_x('Updated','Modified time','wp-china-yes')?>:</span>
|
||||
<span id="loco-po-modified"><?php $params->date('modified')?></span>
|
||||
–
|
||||
<span id="loco-po-status"><?php $params->has('meta') && self::e( $meta->getProgressSummary() )?></span>
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<fieldset class="loco-clearable">
|
||||
<input type="text" name="q" value="" autocomplete="off" placeholder="<?php
|
||||
// translators: text field placeholder
|
||||
esc_html_e('Filter...','loco-translate')?>" size="20" />
|
||||
esc_html_e('Filter...','wp-china-yes')?>" size="20" />
|
||||
</fieldset>
|
||||
</form>
|
||||
|
|
|
@ -20,11 +20,11 @@ $help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/man
|
|||
<td>
|
||||
<fieldset>
|
||||
<legend class="screen-reader-text">
|
||||
<span><?php esc_html_e(__('API key','loco-translate'))?></span>
|
||||
<span><?php esc_html_e(__('API key','wp-china-yes'))?></span>
|
||||
</legend>
|
||||
<p>
|
||||
<label for="loco--google_api_key">
|
||||
<?php esc_html_e(__('API key','loco-translate'))?>:
|
||||
<?php esc_html_e(__('API key','wp-china-yes'))?>:
|
||||
</label>
|
||||
<input type="text" size="50" name="api[google][key]" id="loco--google_api_key" value="<?php $api->e('key')?>" spellcheck="false" />
|
||||
</p>
|
||||
|
@ -41,17 +41,17 @@ $help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/man
|
|||
<td>
|
||||
<fieldset>
|
||||
<legend class="screen-reader-text">
|
||||
<span><?php esc_html_e(__('API key','loco-translate'))?></span>
|
||||
<span><?php esc_html_e(__('API key','wp-china-yes'))?></span>
|
||||
</legend>
|
||||
<p>
|
||||
<label for="loco--microsoft_api_key">
|
||||
<?php esc_html_e(__('API key','loco-translate'))?>:
|
||||
<?php esc_html_e(__('API key','wp-china-yes'))?>:
|
||||
</label>
|
||||
<input type="text" size="50" name="api[microsoft][key]" id="loco--microsoft_api_key" value="<?php $api->e('key')?>" spellcheck="false" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="loco--microsoft_api_region">
|
||||
<?php esc_html_e(__('API region','loco-translate'))?>:
|
||||
<?php esc_html_e(__('API region','wp-china-yes'))?>:
|
||||
</label>
|
||||
<input type="text" size="20" name="api[microsoft][region]" id="loco--microsoft_api_region" value="<?php $api->e('region')?>" spellcheck="false" placeholder="global" />
|
||||
</p>
|
||||
|
@ -68,11 +68,11 @@ $help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/man
|
|||
<td>
|
||||
<fieldset>
|
||||
<legend class="screen-reader-text">
|
||||
<span><?php esc_html_e(__('API key','loco-translate'))?></span>
|
||||
<span><?php esc_html_e(__('API key','wp-china-yes'))?></span>
|
||||
</legend>
|
||||
<p>
|
||||
<label for="loco--yandex_api_key">
|
||||
<?php esc_html_e(__('API key','loco-translate'))?>:
|
||||
<?php esc_html_e(__('API key','wp-china-yes'))?>:
|
||||
</label>
|
||||
<input type="text" size="90" name="api[yandex][key]" id="loco--yandex_api_key" value="<?php $api->e('key')?>" spellcheck="false" />
|
||||
</p>
|
||||
|
@ -87,16 +87,16 @@ $help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/man
|
|||
|
||||
<div class="notice inline">
|
||||
<p>
|
||||
<strong class="has-icon"><?php esc_html_e('Important','loco-translate')?>:</strong>
|
||||
<strong class="has-icon"><?php esc_html_e('Important','wp-china-yes')?>:</strong>
|
||||
<span>
|
||||
<?php esc_html_e('Third party services are subject to their own terms of use and may incur costs from the provider','loco-translate')?>.
|
||||
<a href="<?php self::e($help)?>#legal" target="_blank" tabindex="-1"><?php esc_html_e('See full disclaimer','loco-translate')?></a>.
|
||||
<?php esc_html_e('Third party services are subject to their own terms of use and may incur costs from the provider','wp-china-yes')?>.
|
||||
<a href="<?php self::e($help)?>#legal" target="_blank" tabindex="-1"><?php esc_html_e('See full disclaimer','wp-china-yes')?></a>.
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p class="submit">
|
||||
<input type="submit" class="button-primary" value="<?php esc_html_e('Save settings','loco-translate')?>" />
|
||||
<a class="button button-link" href="<?php self::e($help)?>" target="_blank"><?php esc_html_e('Documentation','loco-translate')?></a>
|
||||
<input type="submit" class="button-primary" value="<?php esc_html_e('Save settings','wp-china-yes')?>" />
|
||||
<a class="button button-link" href="<?php self::e($help)?>" target="_blank"><?php esc_html_e('Documentation','wp-china-yes')?></a>
|
||||
</p>
|
||||
</form>
|
||||
|
|
|
@ -13,11 +13,11 @@ $help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/man
|
|||
<table class="form-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><?php esc_html_e('Translator credit','loco-translate')?></th>
|
||||
<th scope="row"><?php esc_html_e('Translator credit','wp-china-yes')?></th>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend class="screen-reader-text">
|
||||
<span><?php esc_html_e('Translator credit','loco-translate')?></span>
|
||||
<span><?php esc_html_e('Translator credit','wp-china-yes')?></span>
|
||||
</legend>
|
||||
<p>
|
||||
<input type="text" size="64" name="opts[credit]" id="loco--credit" value="<?php echo esc_attr($opts->credit)?>" placeholder="<?php echo esc_attr($opts->default_credit())?>" />
|
||||
|
@ -28,7 +28,7 @@ $help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/man
|
|||
</tbody>
|
||||
</table>
|
||||
<p class="submit">
|
||||
<input type="submit" class="button-primary" value="<?php esc_html_e('Save settings','loco-translate')?>" />
|
||||
<a class="button button-link" href="<?php self::e($help)?>#user" target="_blank"><?php esc_html_e('Documentation','loco-translate')?></a>
|
||||
<input type="submit" class="button-primary" value="<?php esc_html_e('Save settings','wp-china-yes')?>" />
|
||||
<a class="button button-link" href="<?php self::e($help)?>#user" target="_blank"><?php esc_html_e('Documentation','wp-china-yes')?></a>
|
||||
</p>
|
||||
</form>
|
||||
|
|
|
@ -15,49 +15,49 @@ $fs_help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/
|
|||
<table class="form-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><?php esc_html_e('Compiling MO files','loco-translate')?></th>
|
||||
<th scope="row"><?php esc_html_e('Compiling MO files','wp-china-yes')?></th>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend class="screen-reader-text">
|
||||
<span><?php esc_html_e('Compiling MO files','loco-translate')?></span>
|
||||
<span><?php esc_html_e('Compiling MO files','wp-china-yes')?></span>
|
||||
</legend>
|
||||
<p>
|
||||
<label for="loco--gen-hash">
|
||||
<input type="checkbox" name="opts[gen_hash]" value="1" id="loco--gen-hash"<?php echo $opts->gen_hash?' checked':''?> />
|
||||
<?php esc_html_e('Generate hash tables','loco-translate')?>
|
||||
<?php esc_html_e('Generate hash tables','wp-china-yes')?>
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="loco--use-fuzzy">
|
||||
<input type="checkbox" name="opts[use_fuzzy]" value="1" id="loco--use-fuzzy"<?php echo $opts->use_fuzzy?' checked':''?> />
|
||||
<?php esc_html_e('Include Fuzzy strings','loco-translate')?>
|
||||
<?php esc_html_e('Include Fuzzy strings','wp-china-yes')?>
|
||||
</label>
|
||||
</p>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php esc_html_e('Extracting strings','loco-translate')?></th>
|
||||
<th scope="row"><?php esc_html_e('Extracting strings','wp-china-yes')?></th>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend class="screen-reader-text">
|
||||
<span><?php esc_html_e('Extracting strings','loco-translate')?></span>
|
||||
<span><?php esc_html_e('Extracting strings','wp-china-yes')?></span>
|
||||
</legend>
|
||||
<p>
|
||||
<label for="loco--max_php_size">
|
||||
<?php esc_html_e('Skip PHP files larger than:','loco-translate')?>
|
||||
<?php esc_html_e('Skip PHP files larger than:','wp-china-yes')?>
|
||||
</label>
|
||||
<input type="text" size="5" name="opts[max_php_size]" id="loco--max_php_size" value="<?php echo esc_attr( $opts->max_php_size)?>" placeholder="<?php echo esc_attr($dflt->max_php_size)?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="loco--php_alias">
|
||||
<?php esc_html_e('Scan PHP files with extensions:','loco-translate')?>
|
||||
<?php esc_html_e('Scan PHP files with extensions:','wp-china-yes')?>
|
||||
</label>
|
||||
<input type="text" size="15" name="opts[php_alias]" id="loco--php_alias" value="<?php echo esc_attr( implode(' ',$opts->php_alias) )?>" placeholder="<?php echo esc_attr(implode(' ',$dflt->php_alias))?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="loco--jsx_alias">
|
||||
<?php esc_html_e('Scan JavaScript files with extensions:','loco-translate')?>
|
||||
<?php esc_html_e('Scan JavaScript files with extensions:','wp-china-yes')?>
|
||||
</label>
|
||||
<input type="text" size="15" name="opts[jsx_alias]" id="loco--jsx_alias" value="<?php echo esc_attr( implode(' ',$opts->jsx_alias) )?>" placeholder="<?php echo esc_attr(implode(' ',$dflt->jsx_alias))?>" />
|
||||
</p>
|
||||
|
@ -65,46 +65,46 @@ $fs_help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php esc_html_e('Saving PO/POT files','loco-translate')?></th>
|
||||
<th scope="row"><?php esc_html_e('Saving PO/POT files','wp-china-yes')?></th>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend class="screen-reader-text">
|
||||
<span><?php esc_html_e('Saving PO/POT files','loco-translate')?></span>
|
||||
<span><?php esc_html_e('Saving PO/POT files','wp-china-yes')?></span>
|
||||
</legend>
|
||||
<p>
|
||||
<label for="loco--num-backups">
|
||||
<?php esc_html_e('Number of backups to keep of each file:','loco-translate')?>
|
||||
<?php esc_html_e('Number of backups to keep of each file:','wp-china-yes')?>
|
||||
</label>
|
||||
<input type="number" min="0" max="99" size="2" name="opts[num_backups]" id="loco--num_backups" value="<?php printf('%u',$opts->num_backups)?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="loco--po-width">
|
||||
<?php esc_html_e('Maximum line length (zero disables wrapping)','loco-translate')?>
|
||||
<?php esc_html_e('Maximum line length (zero disables wrapping)','wp-china-yes')?>
|
||||
</label>
|
||||
<input type="number" min="0" max="999" size="2" name="opts[po_width]" id="loco--po-width" value="<?php printf('%u',$opts->po_width)?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="loco--po-utf8-bom">
|
||||
<input type="checkbox" name="opts[po_utf8_bom]" value="1" id="loco--po-utf8-bom"<?php echo $opts->po_utf8_bom?' checked':''?> />
|
||||
<?php esc_html_e('Add UTF-8 byte order mark','loco-translate')?> (<?php esc_html_e('Not recommended','loco-translate')?>)
|
||||
<?php esc_html_e('Add UTF-8 byte order mark','wp-china-yes')?> (<?php esc_html_e('Not recommended','wp-china-yes')?>)
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="loco--ajax-files">
|
||||
<input type="checkbox" name="opts[ajax_files]" value="1" id="loco--ajax-files"<?php echo $opts->ajax_files?' checked':''?> />
|
||||
<?php esc_html_e('Enable Ajax file uploads','loco-translate')?> (<?php esc_html_e('Recommended','loco-translate')?>)
|
||||
<?php esc_html_e('Enable Ajax file uploads','wp-china-yes')?> (<?php esc_html_e('Recommended','wp-china-yes')?>)
|
||||
</label>
|
||||
</p>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
<!--tr>
|
||||
<th scope="row"><?php esc_html_e('POT template files','loco-translate')?></th>
|
||||
<th scope="row"><?php esc_html_e('POT template files','wp-china-yes')?></th>
|
||||
<td>
|
||||
<fieldset>
|
||||
<p>
|
||||
<label for="loco--pot_alias">
|
||||
< ?php esc_html_e('Look for non-standard names:','loco-translate')? >
|
||||
< ?php esc_html_e('Look for non-standard names:','wp-china-yes')? >
|
||||
</label>
|
||||
<input type="text" size="40" name="opts[pot_alias]" id="loco--pot_alias" value="< ?php echo esc_attr( implode(' ',$opts->pot_alias) )? >" />
|
||||
</p>
|
||||
|
@ -112,22 +112,22 @@ $fs_help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/
|
|||
</td>
|
||||
</tr-->
|
||||
<tr>
|
||||
<th scope="row"><?php esc_html_e('File system access','loco-translate')?></th>
|
||||
<th scope="row"><?php esc_html_e('File system access','wp-china-yes')?></th>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend class="screen-reader-text">
|
||||
<span><?php esc_html_e('File system access','loco-translate')?></span>
|
||||
<span><?php esc_html_e('File system access','wp-china-yes')?></span>
|
||||
</legend>
|
||||
<p>
|
||||
<label for="loco--fs-persist">
|
||||
<input type="checkbox" name="opts[fs_persist]" value="1" id="loco--fs-persist"<?php echo $opts->fs_persist?' checked':''?> />
|
||||
<?php esc_html_e('Save credentials in session','loco-translate')?>
|
||||
(<?php esc_html_e('Not recommended','loco-translate')?>)
|
||||
<?php esc_html_e('Save credentials in session','wp-china-yes')?>
|
||||
(<?php esc_html_e('Not recommended','wp-china-yes')?>)
|
||||
</label>
|
||||
</p>
|
||||
<p><?php
|
||||
/* @var Loco_mvc_ViewParams $verbose */
|
||||
esc_html_e('Modification of installed files','loco-translate');?>:
|
||||
esc_html_e('Modification of installed files','wp-china-yes');?>:
|
||||
<select name="opts[fs_protect]" id="loco--fs-protect">
|
||||
<option value="0"><?php $verbose->e(0)?></option>
|
||||
<option value="1"<?php echo 1 === $opts->fs_protect?' selected':''?>><?php $verbose->e(1)?></option>
|
||||
|
@ -135,7 +135,7 @@ $fs_help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/
|
|||
</select>
|
||||
</p>
|
||||
<p><?php
|
||||
esc_html_e('Editing of POT (template) files','loco-translate');?>:
|
||||
esc_html_e('Editing of POT (template) files','wp-china-yes');?>:
|
||||
<select name="opts[pot_protect]" id="loco--pot-protect">
|
||||
<option value="0"><?php $verbose->e(0)?></option>
|
||||
<option value="1"<?php echo 1 === $opts->pot_protect?' selected':''?>><?php $verbose->e(1)?></option>
|
||||
|
@ -145,18 +145,18 @@ $fs_help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/
|
|||
<p>
|
||||
<span class="description">
|
||||
<a href="<?php self::e($fs_help)?>" target="_blank"><?php
|
||||
esc_html_e('About file system access','loco-translate')?></a>
|
||||
esc_html_e('About file system access','wp-china-yes')?></a>
|
||||
</span>
|
||||
</p>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php esc_html_e('Grant access to roles','loco-translate')?></th>
|
||||
<th scope="row"><?php esc_html_e('Grant access to roles','wp-china-yes')?></th>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend class="screen-reader-text">
|
||||
<span><?php esc_html_e('Allow full access to these roles','loco-translate')?></span>
|
||||
<span><?php esc_html_e('Allow full access to these roles','wp-china-yes')?></span>
|
||||
</legend><?php
|
||||
/* @var Loco_mvc_ViewParams[] $caps */
|
||||
foreach( $caps as $cap ):?>
|
||||
|
@ -173,7 +173,7 @@ $fs_help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/
|
|||
</tbody>
|
||||
</table>
|
||||
<p class="submit">
|
||||
<input type="submit" class="button-primary" value="<?php esc_html_e('Save settings','loco-translate')?>" />
|
||||
<a class="button button-link" href="<?php self::e($help)?>" target="_blank"><?php esc_html_e('Documentation','loco-translate')?></a>
|
||||
<input type="submit" class="button-primary" value="<?php esc_html_e('Save settings','wp-china-yes')?>" />
|
||||
<a class="button button-link" href="<?php self::e($help)?>" target="_blank"><?php esc_html_e('Documentation','wp-china-yes')?></a>
|
||||
</p>
|
||||
</form>
|
||||
|
|
|
@ -8,34 +8,34 @@ $this->extend('../layout');
|
|||
if( $params->has('update') ):?>
|
||||
<div class="notice inline notice-warning">
|
||||
<h3 class="has-icon">
|
||||
<?php self::e( __('Version %s','loco-translate'), $version )?>
|
||||
<?php self::e( __('Version %s','wp-china-yes'), $version )?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e( __('A newer version of Loco Translate is available for download','loco-translate') )?>.
|
||||
<?php esc_html_e( __('A newer version of Loco Translate is available for download','wp-china-yes') )?>.
|
||||
</p>
|
||||
<p class="submit">
|
||||
<a class="button button-primary" href="<?php echo $update_href?>"><?php self::e(__('Upgrade to %s','loco-translate'), $update )?></a>
|
||||
<a class="button button-link has-icon icon-ext" href="https://wordpress.org/plugins/loco-translate/installation/" target="_blank"><?php esc_html_e( __('Install manually','loco-translate') )?></a>
|
||||
<a class="button button-primary" href="<?php echo $update_href?>"><?php self::e(__('Upgrade to %s','wp-china-yes'), $update )?></a>
|
||||
<a class="button button-link has-icon icon-ext" href="https://wordpress.org/plugins/loco-translate/installation/" target="_blank"><?php esc_html_e( __('Install manually','wp-china-yes') )?></a>
|
||||
</p>
|
||||
</div><?php
|
||||
|
||||
elseif( $params->has('devel') ):?>
|
||||
<div class="notice inline notice-debug">
|
||||
<h3 class="has-icon">
|
||||
<?php self::e( __('Version %s','loco-translate'), $version )?>
|
||||
<?php self::e( __('Version %s','wp-china-yes'), $version )?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("You're running a development snapshot of Loco Translate",'loco-translate')?>
|
||||
<?php esc_html_e("You're running a development snapshot of Loco Translate",'wp-china-yes')?>
|
||||
</p>
|
||||
</div><?php
|
||||
|
||||
else:?>
|
||||
<div class="notice inline notice-success">
|
||||
<h3 class="has-icon">
|
||||
<?php self::e( __('Version %s','loco-translate'), $version)?>
|
||||
<?php self::e( __('Version %s','wp-china-yes'), $version)?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("You're running the latest version of Loco Translate",'loco-translate')?>
|
||||
<?php esc_html_e("You're running the latest version of Loco Translate",'wp-china-yes')?>
|
||||
</p>
|
||||
</div><?php
|
||||
endif;
|
||||
|
|
|
@ -8,10 +8,10 @@ $this->extend('../layout');
|
|||
|
||||
<div class="notice inline notice-error">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('File is a directory','loco-translate')?>
|
||||
<?php esc_html_e('File is a directory','wp-china-yes')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("This page was expecting a file, but the path is actually a directory",'loco-translate')?>:
|
||||
<?php esc_html_e("This page was expecting a file, but the path is actually a directory",'wp-china-yes')?>:
|
||||
</p>
|
||||
<p>
|
||||
<code><?php $info->e('relpath')?></code>
|
||||
|
|
|
@ -8,10 +8,10 @@ $this->extend('../layout');
|
|||
|
||||
<div class="notice inline notice-error">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('File not found','loco-translate')?>
|
||||
<?php esc_html_e('File not found','wp-china-yes')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("Either this file is missing or the server doesn't have permission to access it",'loco-translate')?>:
|
||||
<?php esc_html_e("Either this file is missing or the server doesn't have permission to access it",'wp-china-yes')?>:
|
||||
</p>
|
||||
<p>
|
||||
<code class="path"><?php $params->e('path')?></code>
|
||||
|
|
|
@ -8,10 +8,10 @@ $this->extend('../layout');
|
|||
|
||||
<div class="notice inline notice-error">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('File access disallowed','loco-translate')?>
|
||||
<?php esc_html_e('File access disallowed','wp-china-yes')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("Access to this file is blocked for security reasons",'loco-translate')?>:
|
||||
<?php esc_html_e("Access to this file is blocked for security reasons",'wp-china-yes')?>:
|
||||
<strong><?php $params->e('reason')?></strong>
|
||||
</p>
|
||||
</div>
|
|
@ -9,18 +9,18 @@ $help = esc_url( apply_filters('loco_external','https://localise.biz/wordpress/p
|
|||
|
||||
<div class="notice inline notice-warning">
|
||||
<h3><?php
|
||||
esc_html_e('No previous file revisions','loco-translate')?>
|
||||
esc_html_e('No previous file revisions','wp-china-yes')?>
|
||||
</h3>
|
||||
<p><?php
|
||||
if( $enabled ):
|
||||
esc_html_e('Backup files will be written when you save translations from Loco Translate editor','loco-translate');
|
||||
esc_html_e('Backup files will be written when you save translations from Loco Translate editor','wp-china-yes');
|
||||
else:
|
||||
esc_html_e('File backups are disabled in your plugin settings','loco-translate');
|
||||
esc_html_e('File backups are disabled in your plugin settings','wp-china-yes');
|
||||
endif?>.
|
||||
</p>
|
||||
<p class="submit">
|
||||
<a href="<?php echo $help?>#po" target="_blank"><?php esc_html_e('Documentation','loco-translate')?></a>
|
||||
<a href="<?php echo $help?>#po" target="_blank"><?php esc_html_e('Documentation','wp-china-yes')?></a>
|
||||
<span>|</span>
|
||||
<a href="<?php $this->route('config')->e('href')?>"><?php esc_html_e('Settings','loco-translate')?></a>
|
||||
<a href="<?php $this->route('config')->e('href')?>"><?php esc_html_e('Settings','wp-china-yes')?></a>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,7 @@ $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')?>
|
||||
<?php esc_html_e('No files found for this language','wp-china-yes')?>
|
||||
</h3>
|
||||
<p>
|
||||
It may not be installed properly.
|
||||
|
|
|
@ -8,13 +8,13 @@ $this->extend('../layout');
|
|||
|
||||
<div class="notice inline notice-info">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('About the Tokenizer','loco-translate')?>
|
||||
<?php esc_html_e('About the Tokenizer','wp-china-yes')?>
|
||||
</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'),
|
||||
__('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','wp-china-yes'),
|
||||
array('a'=>array('href'=>true,'target'=>true)), array('http','https')
|
||||
);?>.
|
||||
</p>
|
||||
|
@ -22,7 +22,7 @@ $this->extend('../layout');
|
|||
// 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 ),
|
||||
sprintf( __('You can still translate any bundle that has a <a href="%s" target="_blank">template</a>','wp-china-yes'), $help ),
|
||||
array('a'=>array('href'=>true,'target'=>true)), array('https')
|
||||
);?>.
|
||||
</p>
|
||||
|
|
|
@ -9,11 +9,11 @@ $this->extend('../layout');
|
|||
<div class="notice inline notice-danger">
|
||||
<h3>
|
||||
<span class="has-icon icon-trash"> </span>
|
||||
<span><?php esc_html_e('Confirm delete','loco-translate')?></span>
|
||||
<span><?php esc_html_e('Confirm delete','wp-china-yes')?></span>
|
||||
</h3>
|
||||
<p>
|
||||
<?php
|
||||
echo __('Are you sure you want to <strong>permanently</strong> delete the following file?','loco-translate')?>
|
||||
echo __('Are you sure you want to <strong>permanently</strong> delete the following file?','wp-china-yes')?>
|
||||
</p>
|
||||
<p>
|
||||
<code><?php $info->e('relpath')?></code>
|
||||
|
|
|
@ -27,8 +27,8 @@ $dfmt = _x( 'j M @ H:i', 'revision date short format', 'default' );
|
|||
<div class="diff-meta jshide">
|
||||
<span><?php $file->e('name')?></span><br />
|
||||
<time><?php $file->date('potime',$dfmt)?></time><br />
|
||||
<button type="submit" class="button button-primary" name="backup" value="<?php $file->e('relpath')?>"><?php esc_html_e('Restore','loco-translate')?></button>
|
||||
<button type="submit" class="button button-danger" name="delete" value="<?php $file->e('relpath')?>"><?php esc_html_e('Delete','loco-translate')?></button>
|
||||
<button type="submit" class="button button-primary" name="backup" value="<?php $file->e('relpath')?>"><?php esc_html_e('Restore','wp-china-yes')?></button>
|
||||
<button type="submit" class="button button-danger" name="delete" value="<?php $file->e('relpath')?>"><?php esc_html_e('Delete','wp-china-yes')?></button>
|
||||
</div><?php
|
||||
endforeach?>
|
||||
</div><?php
|
||||
|
@ -54,10 +54,10 @@ $dfmt = _x( 'j M @ H:i', 'revision date short format', 'default' );
|
|||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<?php esc_html_e('Revision saved','loco-translate')?>
|
||||
<?php esc_html_e('Revision saved','wp-china-yes')?>
|
||||
</th>
|
||||
<th>
|
||||
<?php esc_html_e('File info','loco-translate')?>
|
||||
<?php esc_html_e('File info','wp-china-yes')?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
@ -13,7 +13,7 @@ $help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/man
|
|||
|
||||
// inline modal for auto-translate. Note that modal will be placed outside of #loco.wrap element
|
||||
if( $js->apis ):?>
|
||||
<div id="loco-auto" class="loco-batch" title="<?php esc_html_e('Auto-translate this file','loco-translate');?>">
|
||||
<div id="loco-auto" class="loco-batch" title="<?php esc_html_e('Auto-translate this file','wp-china-yes');?>">
|
||||
<form action="#">
|
||||
<fieldset>
|
||||
<select name="api" id="auto-api"><?php foreach( $js->apis as $api ):?>
|
||||
|
@ -25,13 +25,13 @@ if( $js->apis ):?>
|
|||
<p>
|
||||
<label for="auto-existing">
|
||||
<input type="checkbox" id="auto-existing" name="existing" />
|
||||
<?php esc_html_e('Overwrite existing translations','loco-translate')?>
|
||||
<?php esc_html_e('Overwrite existing translations','wp-china-yes')?>
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="auto-fuzzy">
|
||||
<input type="checkbox" id="auto-fuzzy" name="fuzzy" />
|
||||
<?php esc_html_e('Mark new translations as Fuzzy','loco-translate')?>
|
||||
<?php esc_html_e('Mark new translations as Fuzzy','wp-china-yes')?>
|
||||
</label>
|
||||
</p>
|
||||
<blockquote id="loco-job-progress">
|
||||
|
@ -39,10 +39,10 @@ if( $js->apis ):?>
|
|||
</blockquote>
|
||||
<p>
|
||||
<button type="submit" class="button button-primary has-icon icon-translate">
|
||||
<span><?php esc_html_e('Translate','loco-translate')?></span>
|
||||
<span><?php esc_html_e('Translate','wp-china-yes')?></span>
|
||||
</button>
|
||||
<a href="<?php self::e($help)?>" class="button button-link has-icon icon-help" target="_blank"><?php
|
||||
esc_html_e('Help','loco-translate');
|
||||
esc_html_e('Help','wp-china-yes');
|
||||
?></a>
|
||||
</p>
|
||||
</fieldset>
|
||||
|
@ -53,16 +53,16 @@ if( $js->apis ):?>
|
|||
|
||||
// inline modal for when no APIs are configured.
|
||||
else:?>
|
||||
<div id="loco-auto" class="loco-alert" title="<?php esc_html_e('No translation APIs configured','loco-translate');?>">
|
||||
<div id="loco-auto" class="loco-alert" title="<?php esc_html_e('No translation APIs configured','wp-china-yes');?>">
|
||||
<p>
|
||||
<?php esc_html_e('Add automatic translation services in the plugin settings.','loco-translate')?>
|
||||
<?php esc_html_e('Add automatic translation services in the plugin settings.','wp-china-yes')?>
|
||||
</p>
|
||||
<nav>
|
||||
<a href="<?php $this->route('config-apis')->e('href')?>" class="has-icon icon-cog"><?php
|
||||
esc_html_e('Settings','loco-translate');
|
||||
esc_html_e('Settings','wp-china-yes');
|
||||
?></a>
|
||||
<a href="<?php self::e($help)?>" class="has-icon icon-help" target="_blank"><?php
|
||||
esc_html_e('Help','loco-translate');
|
||||
esc_html_e('Help','wp-china-yes');
|
||||
?></a>
|
||||
</nav>
|
||||
</div><?php
|
||||
|
|
|
@ -7,9 +7,9 @@ $this->start('header');
|
|||
?>
|
||||
|
||||
<h3 class="has-lang">
|
||||
<span><?php esc_html_e('Template file','loco-translate')?>:</span>
|
||||
<span><?php esc_html_e('Template file','wp-china-yes')?>:</span>
|
||||
<span class="loco-meta">
|
||||
<span><?php echo esc_html_x('Updated','Modified time','loco-translate')?>:</span>
|
||||
<span><?php echo esc_html_x('Updated','Modified time','wp-china-yes')?>:</span>
|
||||
<span id="loco-po-modified"><?php $params->date('modified')?></span>
|
||||
–
|
||||
<span id="loco-po-status"></span>
|
||||
|
|
|
@ -12,19 +12,19 @@ $this->start('header');
|
|||
<span class="<?php $locale->e('icon')?>" lang="<?php $locale->e('lang')?>"><code><?php $locale->e('code')?></code></span>
|
||||
<span><?php $locale->e('name')?></span>
|
||||
</a>
|
||||
<span>— <?php esc_html_e('compiled','loco-translate')?></span>
|
||||
<span>— <?php esc_html_e('compiled','wp-china-yes')?></span>
|
||||
</h3>
|
||||
<dl>
|
||||
<dt><?php self::e( __('File size','loco-translate') )?>:</dt>
|
||||
<dt><?php self::e( __('File size','wp-china-yes') )?>:</dt>
|
||||
<dd><?php $file->e('size')?></dd>
|
||||
|
||||
<dt><?php esc_html_e('File modified','loco-translate')?>:</dt>
|
||||
<dt><?php esc_html_e('File modified','wp-china-yes')?>:</dt>
|
||||
<dd><?php $file->date('mtime')?></dd>
|
||||
|
||||
<dt><?php esc_html_e('Last translation','loco-translate')?>:</dt>
|
||||
<dt><?php esc_html_e('Last translation','wp-china-yes')?>:</dt>
|
||||
<dd><?php $params->e('author')?> — <date><?php $params->date('potime')?></date></dd>
|
||||
|
||||
<dt><?php esc_html_e('Compiled translations','loco-translate')?>:</dt>
|
||||
<dt><?php esc_html_e('Compiled translations','wp-china-yes')?>:</dt>
|
||||
<dd>
|
||||
<?php echo esc_html( $meta->getTotalSummary() )?>
|
||||
</dd>
|
||||
|
@ -35,10 +35,10 @@ $this->start('header');
|
|||
if( ! $sibling->existent ):?>
|
||||
<div class="notice inline notice-warning">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('PO file missing','loco-translate')?>
|
||||
<?php esc_html_e('PO file missing','wp-china-yes')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php esc_html_e("We can't find the original PO file from which this was compiled",'loco-translate')?>.
|
||||
<?php esc_html_e("We can't find the original PO file from which this was compiled",'wp-china-yes')?>.
|
||||
</p>
|
||||
</div><?php
|
||||
endif;
|
|
@ -8,7 +8,7 @@ $this->start('header');
|
|||
|
||||
<div class="notice inline notice-error">
|
||||
<h3 class="has-icon">
|
||||
<?php esc_html_e('Unexpected file type','loco-translate')?>
|
||||
<?php esc_html_e('Unexpected file type','wp-china-yes')?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php $params->e('error')?>
|
||||
|
|
|
@ -16,16 +16,16 @@ $this->start('header');
|
|||
</a>
|
||||
</h3>
|
||||
<dl>
|
||||
<dt><?php self::e( __('File size','loco-translate') )?>:</dt>
|
||||
<dt><?php self::e( __('File size','wp-china-yes') )?>:</dt>
|
||||
<dd><?php $file->e('size')?></dd>
|
||||
|
||||
<dt><?php self::e( __('File modified','loco-translate') )?>:</dt>
|
||||
<dt><?php self::e( __('File modified','wp-china-yes') )?>:</dt>
|
||||
<dd><time><?php $file->date('mtime')?></time></dd>
|
||||
|
||||
<dt><?php self::e( __('Last translation','loco-translate') )?>:</dt>
|
||||
<dt><?php self::e( __('Last translation','wp-china-yes') )?>:</dt>
|
||||
<dd><?php $params->e('author')?> — <date><?php $params->date('potime')?></date></dd>
|
||||
|
||||
<dt><?php self::e( __('Translation progress','loco-translate') )?>:</dt>
|
||||
<dt><?php self::e( __('Translation progress','wp-china-yes') )?>:</dt>
|
||||
<dd>
|
||||
<?php self::e( $meta->getProgressSummary() )?>
|
||||
</dd>
|
||||
|
@ -39,10 +39,10 @@ $this->start('header');
|
|||
if( ! $sibling->existent ):?>
|
||||
<div class="notice inline notice-warning">
|
||||
<h3 class="has-icon">
|
||||
<?php self::e( __('Binary file missing','loco-translate') )?>
|
||||
<?php self::e( __('Binary file missing','wp-china-yes') )?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php self::e( __("We can't find the binary MO file that belongs with these translations",'loco-translate') )?>.
|
||||
<?php self::e( __("We can't find the binary MO file that belongs with these translations",'wp-china-yes') )?>.
|
||||
</p>
|
||||
</div><?php
|
||||
endif;
|
||||
|
@ -52,22 +52,22 @@ $this->start('header');
|
|||
if( $potfile->synced ):?>
|
||||
<div class="notice inline notice-success">
|
||||
<h3 class="has-icon">
|
||||
<?php self::e( __('In sync with template','loco-translate') )?>
|
||||
<?php self::e( __('In sync with template','wp-china-yes') )?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php // Translators: Where %s is the name of a template file
|
||||
self::e( __('PO file has the same source strings as "%s"','loco-translate'), $potfile->name )?>.
|
||||
self::e( __('PO file has the same source strings as "%s"','wp-china-yes'), $potfile->name )?>.
|
||||
</p>
|
||||
</div><?php
|
||||
|
||||
else:?>
|
||||
<div class="notice inline notice-info">
|
||||
<h3 class="has-icon">
|
||||
<?php self::e( __('Out of sync with template','loco-translate') )?>
|
||||
<?php self::e( __('Out of sync with template','wp-china-yes') )?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php // Translators: Where %s is the name of a template file
|
||||
self::e( __('PO file has different source strings to "%s". Try running Sync before making any changes.','loco-translate'), $potfile->name )?>
|
||||
self::e( __('PO file has different source strings to "%s". Try running Sync before making any changes.','wp-china-yes'), $potfile->name )?>
|
||||
</p>
|
||||
</div><?php
|
||||
endif;
|
||||
|
@ -76,11 +76,11 @@ $this->start('header');
|
|||
elseif( $params->has('project') ):?>
|
||||
<div class="notice inline notice-debug">
|
||||
<h3 class="has-icon">
|
||||
<?php self::e( __('Missing template','loco-translate') )?>
|
||||
<?php self::e( __('Missing template','wp-china-yes') )?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php
|
||||
self::e( __('These translations are not linked to a POT file. Sync operations will extract strings directly from source code.','loco-translate') )?>
|
||||
self::e( __('These translations are not linked to a POT file. Sync operations will extract strings directly from source code.','wp-china-yes') )?>
|
||||
</p>
|
||||
</div><?php
|
||||
endif;
|
||||
|
|
|
@ -9,19 +9,19 @@ $this->start('header');
|
|||
?>
|
||||
|
||||
<div class="notice inline notice-info">
|
||||
<h3><?php esc_html_e('Template file','loco-translate')?></h3>
|
||||
<h3><?php esc_html_e('Template file','wp-china-yes')?></h3>
|
||||
<dl>
|
||||
<dt><?php self::e( __('File size','loco-translate') )?>:</dt>
|
||||
<dt><?php self::e( __('File size','wp-china-yes') )?>:</dt>
|
||||
<dd><?php $file->e('size')?></dd>
|
||||
|
||||
<dt><?php esc_html_e('File modified','loco-translate')?>:</dt>
|
||||
<dt><?php esc_html_e('File modified','wp-china-yes')?>:</dt>
|
||||
<dd><time><?php $file->date('mtime')?></time></dd>
|
||||
|
||||
<dt><?php esc_html_e('Last extracted','loco-translate')?>:</dt>
|
||||
<dt><?php esc_html_e('Last extracted','wp-china-yes')?>:</dt>
|
||||
<dd><time><?php $params->date('potime')?></time></dd>
|
||||
|
||||
<dt><?php echo esc_html_x('Source text','Editor','loco-translate')?>:</dt>
|
||||
<dd><?php echo esc_html( $meta->getTotalSummary() )?> <span>(<?php echo sprintf( _n('1 word','%s words', $words, 'loco-translate'), number_format_i18n($words) )?>)</span></dd>
|
||||
<dt><?php echo esc_html_x('Source text','Editor','wp-china-yes')?>:</dt>
|
||||
<dd><?php echo esc_html( $meta->getTotalSummary() )?> <span>(<?php echo sprintf( _n('1 word','%s words', $words, 'wp-china-yes'), number_format_i18n($words) )?>)</span></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue