Version Description
- Deferred missing tokenizer warning
- Allows editing of files in unconfigured sets
- Added maximum PHP file size for string extraction
- Display of PHP fatal errors during Ajax
Download this release
Release Info
Developer | timwhitlock |
Plugin | Loco Translate |
Version | 2.0.5 |
Comparing to | |
See all releases |
Code changes from version 2.0.4 to 2.0.5
- lib/compiled/gettext.php +1 -1
- loco.php +2 -2
- pub/css/admin.css +1 -1
- pub/js/min/admin.js +97 -96
- readme.txt +8 -2
- src/admin/bundle/BaseController.php +5 -2
- src/admin/bundle/SetupController.php +3 -4
- src/admin/bundle/ViewController.php +140 -105
- src/admin/file/EditController.php +1 -1
- src/admin/file/ViewController.php +0 -1
- src/admin/init/InitPoController.php +51 -40
- src/admin/init/InitPotController.php +25 -12
- src/ajax/XgettextController.php +7 -4
- src/data/Settings.php +2 -0
- src/fs/DummyFile.php +8 -0
- src/fs/FileList.php +13 -0
- src/fs/LocaleFileList.php +10 -6
- src/gettext/Extraction.php +13 -0
- src/mvc/AdminController.php +2 -7
- src/package/Bundle.php +2 -2
- src/package/Debugger.php +6 -0
- src/package/Inverter.php +17 -9
- src/package/Project.php +17 -1
- tpl/admin/bundle/inc-po-table.php +29 -7
- tpl/admin/bundle/incompat.php +0 -20
- tpl/admin/bundle/view.php +38 -14
- tpl/admin/config/settings.php +16 -0
- tpl/admin/errors/no-tokenizer.php +20 -0
- tpl/admin/init/init-pot.php +4 -1
- tpl/admin/init/init-prompt.php +5 -2
lib/compiled/gettext.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
', $pairs); } public function trimmed($prop) { return trim($this->__get($prop)); } public function has($key) { $k = strtolower($key); return isset($this->map[$k]); } public function __get($key) { return $this->offsetGet($key); } public function __set($key, $val) { $this->offsetSet($key, $val); } public function offsetExists($k) { return !is_null($this->normalize($k)); } public function offsetGet($k) { $k = $this->normalize($k); if (is_null($k)) { return ''; } return parent::offsetGet($k); } public function offsetSet($key, $v) { $k = strtolower($key); if (isset($this->map[$k]) && $key !== $this->map[$k]) { parent::offsetUnset($this->map[$k]); } $this->map[$k] = $key; return parent::offsetSet($key, $v); } public function offsetUnset($key) { $k = strtolower($key); if (isset($this->map[$k])) { parent::offsetUnset($this->map[$k]); unset($this->map[$k]); } } public function export() { return $this->getArrayCopy(); } public function jsonSerialize() { return $this->getArrayCopy(); } public function toArray() { return $this->getArrayCopy(); } public function keys() { return array_values($this->map); } } class LocoPoHeaders extends LocoHeaders { public static function fromMsgstr($str) { $headers = new LocoPoHeaders(); foreach (explode('
|
4 |
', $str) as $line) { $i = strpos($line, ':') and $key = trim(substr($line, 0, $i)) and $headers->add($key, trim(substr($line, ++$i))); } return $headers; } public static function fromSource($raw) { while (preg_match('/^.*[\\r\\n]+/', $raw, $r)) { $line = $r[0]; if ('#' === $line[0]) { $raw = substr($raw, strlen($line)); continue; } if (preg_match('/^msgid\\s+""\\s+msgstr\\s+/', $raw, $r)) { $raw = substr($raw, strlen($r[0])); $str = array(); while (preg_match('/^"(.*)"\\s*/', $raw, $r)) { $raw = substr($raw, strlen($r[0])); $chunk = $r[1]; if ('' !== $chunk) { $str[] = stripcslashes($r[1]); } } if ($str) { return self::fromMsgstr(implode('', $str)); } break; } else { break; } } throw new Loco_error_ParseException('Invalid PO header'); } } function loco_sniff_printf($str) { return false !== strpos($str, '%') && preg_match('/%(?:(\\d)\\$)?([,\'\\+\\-#0 \\(]*)(\\d*)(\\.\\d+|\\.\\*)?([sScCuidoxXfFeEgGaAbBpn@])/', $str); } function loco_parse_reference_id($refs, &$_id) { if (false === ($n = strpos($refs, 'loco:'))) { $_id = ''; return $refs; } $_id = substr($refs, $n + 5, 24); $refs = substr_replace($refs, '', $n, 29); return trim($refs); } function loco_ensure_utf8($str, $enc = false, $prefix_bom = false) { if (false === $enc) { $m = substr($str, 0, 3); if ('' === $m) { $str = substr($str, 3); } else { if ('�' === $m[0] && '�' === $m[1]) { $str = substr($str, 2); $enc = 'UTF-16LE'; } else { if ('�' === $m[0] && '�' === $m[1]) { $str = substr($str, 2); $enc = 'UTF-16BE'; } else { $enc = mb_detect_encoding($str, array('UTF-8', 'Windows-1252', 'ISO-8859-1'), false); if (!$enc) { throw new Exception('Unknown character encoding'); } } } } } else { if (!strcasecmp('ISO-8859-1', $enc) || !strcasecmp('CP-1252', $enc)) { $enc = 'Windows-1252'; } else { if (!strcasecmp('UTF8', $enc)) { $enc = ''; } else { if (!strcasecmp('UTF-16', $enc)) { $enc = 'UTF-16BE'; } } } } if ($enc && $enc !== 'UTF-8') { $str = mb_convert_encoding($str, 'UTF-8', array($enc)); } if ($prefix_bom) { $str = '' . $str; } return $str; } function loco_parse_po($src) { $src = loco_ensure_utf8($src); $i = -1; $key = ''; $entries = array(); $template = array('#' => array(), 'id' => array(), 'str' => array(), 'ctxt' => array()); foreach (preg_split('/[\\r\\n]+/', $src) as $_i => $line) { while ($line = trim($line, ' ')) { $c = $line[0]; if ('"' === $c) { if ($key && isset($entry)) { if ('"' === substr($line, -1)) { $line = substr($line, 1, -1); $entry[$key][$idx][] = stripcslashes($line); } } } else { if ('#' === $c) { if (isset($entry['i'])) { unset($entry); $entry = $template; } $f = empty($line[1]) ? ' ' : $line[1]; $entry['#'][$f][] = trim(substr($line, 1 + strlen($f)), '/
|
5 |
|
1 |
<?php
|
2 |
+
interface LocoArrayInterface extends ArrayAccess, Iterator, Countable, JsonSerializable { public function export(); public function keys(); public function toArray(); public function getArrayCopy(); } class LocoHeaders extends ArrayIterator implements LocoArrayInterface { private $map = array(); public function __construct(array $raw = array()) { if ($raw) { $keys = array_keys($raw); $this->map = array_combine(array_map('strtolower', $keys), $keys); parent::__construct($raw); } } public function normalize($key) { $k = strtolower($key); return isset($this->map[$k]) ? $this->map[$k] : null; } public function add($key, $val) { $this->offsetSet($key, $val); return $this; } public function __toString() { $pairs = array(); foreach ($this as $key => $val) { $pairs[] = trim($key) . ': ' . $val; } return implode('
|
3 |
', $pairs); } public function trimmed($prop) { return trim($this->__get($prop)); } public function has($key) { $k = strtolower($key); return isset($this->map[$k]); } public function __get($key) { return $this->offsetGet($key); } public function __set($key, $val) { $this->offsetSet($key, $val); } public function offsetExists($k) { return !is_null($this->normalize($k)); } public function offsetGet($k) { $k = $this->normalize($k); if (is_null($k)) { return ''; } return parent::offsetGet($k); } public function offsetSet($key, $v) { $k = strtolower($key); if (isset($this->map[$k]) && $key !== $this->map[$k]) { parent::offsetUnset($this->map[$k]); } $this->map[$k] = $key; return parent::offsetSet($key, $v); } public function offsetUnset($key) { $k = strtolower($key); if (isset($this->map[$k])) { parent::offsetUnset($this->map[$k]); unset($this->map[$k]); } } public function export() { return $this->getArrayCopy(); } public function jsonSerialize() { return $this->getArrayCopy(); } public function toArray() { return $this->getArrayCopy(); } public function keys() { return array_values($this->map); } } class LocoPoHeaders extends LocoHeaders { public static function fromMsgstr($str) { $headers = new LocoPoHeaders(); foreach (explode('
|
4 |
', $str) as $line) { $i = strpos($line, ':') and $key = trim(substr($line, 0, $i)) and $headers->add($key, trim(substr($line, ++$i))); } return $headers; } public static function fromSource($raw) { while (preg_match('/^.*[\\r\\n]+/', $raw, $r)) { $line = $r[0]; if ('#' === $line[0]) { $raw = substr($raw, strlen($line)); continue; } if (preg_match('/^msgid\\s+""\\s+msgstr\\s+/', $raw, $r)) { $raw = substr($raw, strlen($r[0])); $str = array(); while (preg_match('/^"(.*)"\\s*/', $raw, $r)) { $raw = substr($raw, strlen($r[0])); $chunk = $r[1]; if ('' !== $chunk) { $str[] = stripcslashes($r[1]); } } if ($str) { return self::fromMsgstr(implode('', $str)); } break; } else { break; } } throw new Loco_error_ParseException('Invalid PO header'); } } function loco_sniff_printf($str) { return false !== strpos($str, '%') && preg_match('/%(?:(\\d)\\$)?([,\'\\+\\-#0 \\(]*)(\\d*)(\\.\\d+|\\.\\*)?([sScCuidoxXfFeEgGaAbBpn@])/', $str); } function loco_parse_reference_id($refs, &$_id) { if (false === ($n = strpos($refs, 'loco:'))) { $_id = ''; return $refs; } $_id = substr($refs, $n + 5, 24); $refs = substr_replace($refs, '', $n, 29); return trim($refs); } function loco_ensure_utf8($str, $enc = false, $prefix_bom = false) { if (false === $enc) { $m = substr($str, 0, 3); if ('' === $m) { $str = substr($str, 3); } else { if ('�' === $m[0] && '�' === $m[1]) { $str = substr($str, 2); $enc = 'UTF-16LE'; } else { if ('�' === $m[0] && '�' === $m[1]) { $str = substr($str, 2); $enc = 'UTF-16BE'; } else { $enc = mb_detect_encoding($str, array('UTF-8', 'Windows-1252', 'ISO-8859-1'), false); if (!$enc) { throw new Exception('Unknown character encoding'); } } } } } else { if (!strcasecmp('ISO-8859-1', $enc) || !strcasecmp('CP-1252', $enc)) { $enc = 'Windows-1252'; } else { if (!strcasecmp('UTF8', $enc)) { $enc = ''; } else { if (!strcasecmp('UTF-16', $enc)) { $enc = 'UTF-16BE'; } } } } if ($enc && $enc !== 'UTF-8') { $str = mb_convert_encoding($str, 'UTF-8', array($enc)); } if ($prefix_bom) { $str = '' . $str; } return $str; } function loco_parse_po($src) { $src = loco_ensure_utf8($src); $i = -1; $key = ''; $entries = array(); $template = array('#' => array(), 'id' => array(), 'str' => array(), 'ctxt' => array()); foreach (preg_split('/[\\r\\n]+/', $src) as $_i => $line) { while ($line = trim($line, ' ')) { $c = $line[0]; if ('"' === $c) { if ($key && isset($entry)) { if ('"' === substr($line, -1)) { $line = substr($line, 1, -1); $entry[$key][$idx][] = stripcslashes($line); } } } else { if ('#' === $c) { if (isset($entry['i'])) { unset($entry); $entry = $template; } $f = empty($line[1]) ? ' ' : $line[1]; $entry['#'][$f][] = trim(substr($line, 1 + strlen($f)), '/
|
5 |
|
loco.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Loco Translate
|
|
4 |
Plugin URI: https://wordpress.org/plugins/loco-translate/
|
5 |
Description: Translate themes and plugins directly in WordPress
|
6 |
Author: Tim Whitlock
|
7 |
-
Version: 2.0.
|
8 |
Author URI: https://localise.biz/wordpress/plugin
|
9 |
Text Domain: loco
|
10 |
Domain Path: /languages/
|
@@ -45,7 +45,7 @@ function loco_plugin_file(){
|
|
45 |
* @return string
|
46 |
*/
|
47 |
function loco_plugin_version(){
|
48 |
-
return '2.0.
|
49 |
}
|
50 |
|
51 |
|
4 |
Plugin URI: https://wordpress.org/plugins/loco-translate/
|
5 |
Description: Translate themes and plugins directly in WordPress
|
6 |
Author: Tim Whitlock
|
7 |
+
Version: 2.0.5
|
8 |
Author URI: https://localise.biz/wordpress/plugin
|
9 |
Text Domain: loco
|
10 |
Domain Path: /languages/
|
45 |
* @return string
|
46 |
*/
|
47 |
function loco_plugin_version(){
|
48 |
+
return '2.0.5';
|
49 |
}
|
50 |
|
51 |
|
pub/css/admin.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@font-face{font-family:'loco';src:url("../font/loco.eot");src:url("../font/loco.eot?#iefix") format("embedded-opentype"),url("../font/loco.woff") format("woff"),url("../font/loco.ttf") format("truetype"),url("../font/loco.svg#loco") format("svg");font-weight:normal;font-style:normal}#loco.wrap div{position:relative}#loco.wrap code{white-space:pre}#loco.wrap .selector{display:inline-block;white-space:nowrap}#loco.wrap .selectoradd a,#loco.wrap .selector .handle{cursor:default;display:block;position:relative;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;padding:0.3em 0.5em;color:#666;height:1.3em;overflow:hidden;white-space:normal}#loco.wrap .selectorsep{display:inline-block;border:solid 1px transparent}#loco.wrap .selectorsep:before{display:block;position:relative;padding:0.3em 0.5em;color:#999;height:1.3em;overflow:hidden}#loco.wrap .selectorsep>*{display:block;line-height:1em;color:#666;height:1.3em;overflow:hidden}#loco.wrap .selector .handle{outline:none}#loco.wrap .selector .handle .prefix{padding-right:0.6ex}#loco.wrap .selector .handle .region,#loco.wrap .selector .handle .lang-ca,#loco.wrap .selector .handle .lang-eo,#loco.wrap .selector .handle .lang-eu,#loco.wrap .selector .handle .variant-wales,#loco.wrap .selector .handle .region-gb.lang-cy,#loco.wrap .selector .handle .variant-scotland,#loco.wrap .selector .handle .region-gb.lang-gd,#loco.wrap .selector .handle .lang,#loco.wrap .selector .handle .icon-16{margin:0 5px 0 0}#loco.wrap .selector .handle:after{font-family:loco;padding-left:0.5em;padding-right:0.2em;font-size:1.3em;color:#ccc;float:right}#loco.wrap .selector .handle:focus:after,#loco.wrap .selector .handle:hover:after{color:#666}#loco.wrap .selector.no-title .handle .label{display:none}#loco.wrap .selector.no-caret .handle:after{display:none}#loco.wrap .selector.dummy .handle{border-color:transparent}#loco.wrap .selector.dummy .handle:after{display:none}#loco.wrap .selector .icon:before{color:#666}#loco.wrap .selector .lang,#loco.wrap .selector .region,#loco.wrap .selector .lang-ca,#loco.wrap .selector .lang-eo,#loco.wrap .selector .lang-eu,#loco.wrap .selector .variant-wales,#loco.wrap .selector .region-gb.lang-cy,#loco.wrap .selector .variant-scotland,#loco.wrap .selector .region-gb.lang-gd{vertical-align:middle}#loco.wrap .selectoradd{float:left;clear:none;position:relative}#loco.wrap .selectoradd>*{display:block;float:left;clear:none}#loco.wrap .selectoradd>a.has-icon{width:1.3em}#loco.wrap .selectoradd>a.has-icon:before{color:#999;display:inline;padding-left:0;padding-right:0;line-height:1.4em}#loco.wrap .selectoradd>a.has-icon:hover:after{color:#2e892e}#loco.wrap .selectoradd input[type="text"]{padding:0.3em 0.5em;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}#loco.wrap .selectorsep{display:inline-block}#loco.wrap .selectorsep span{padding:0.3em 0.5em;color:#666;height:1.3em}#loco.wrap .selector ul,#loco.wrap .selector li{display:block;position:relative;cursor:default;padding:0;margin:0}#loco.wrap .selector ul{z-index:1;position:absolute;left:0;top:0;margin-top:2px;background:#f5f5f5;box-shadow:0 10px 5px rgba(0,0,0,0.2);border:solid 1px #ccc}#loco.wrap .selector li{padding:0.3em 0.5em}#loco.wrap .selector.multi li input{display:none}#loco.wrap .selector.multi li.checked{background:#eee}#loco.wrap .selector li.active{background:#eee !important}#loco.wrap .selector li.over{background:#ccc !important;color:#fff;text-shadow:1px 1px #aaa}#loco.wrap .selector li.over .label{color:#fff}#loco.wrap .selector .label{display:inline-block;font:inherit;color:inherit;padding:0 0.5em;margin:0}#loco.wrap .selector li .icon,#loco.wrap .selector .handle .icon{display:inline-block;min-width:1.2em;text-align:center;font-size:14px;vertical-align:middle}#loco.wrap .selector li .icon.no-icon,#loco.wrap .selector .handle .icon.no-icon{display:none}#loco.wrap .selector .icon-16{vertical-align:text-top}#loco.wrap .selector.ticked .icon.no-icon{font-size:12px;display:inline-block}#loco.wrap .selector.ticked .active .icon.no-icon:before{content:"\2713"}#loco.wrap .selectoradd a:hover,#loco.wrap .selector a.handle:focus,#loco.wrap .selector a.handle:hover{color:#000;border-color:#999}#loco.wrap .selector.active .handle{border-color:#999;background-color:#eee;color:#999}#loco.wrap .selector.active .handle:after{color:#999}#loco.wrap .selector.disabled{padding:0.3em 0.5em;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;color:#666;height:1.3em;cursor:default;cursor:no-drop;cursor:not-allowed}#loco.wrap .selector.disabled:after{font-family:loco;padding-left:0.5em;padding-right:0.3em;line-height:1em;vertical-align:middle}#loco.wrap .selector li.disabled,#loco.wrap .selector li.disabled.over{color:#aaa;text-shadow:1px 1px #fff;pointer-events:none}#loco.wrap .selector li.disabled *{cursor:text}#loco.wrap .selector li.disabled .icon:before{color:#aaa}#loco.wrap .selector li.disabled .flag,#loco.wrap .selector li.disabled .icon-16{opacity:0.4}#loco.wrap div.auto-comp-wrap{width:100%}#loco.wrap div.auto-comp-wrap input{display:inline-block}#loco.wrap div.auto-comp-wrap.loading input{background:transparent url(../img/ajax-loader.gif?v=2.0.0-dev) right 2px no-repeat}#loco.wrap div.auto-comp-drop{color:#333333;background:#FFFFFF;border-top:none;position:absolute;width:100%;top:0;left:0;z-index:99;-webkit-box-shadow:0 5px 5px rgba(0,0,0,0.4);-moz-box-shadow:0 5px 5px rgba(0,0,0,0.4);box-shadow:0 5px 5px rgba(0,0,0,0.4)}#loco.wrap div.auto-comp-result{padding:5px 10px;cursor:pointer;background:#F0F0F0;border-top:solid 1px #FFF;border-bottom:solid 1px #DDD}#loco.wrap div.auto-comp-result:first-child{border-top:solid 1px #DDD}#loco.wrap div.auto-comp-result>*{display:inline-block;vertical-align:middle;line-height:normal}#loco.wrap div.auto-comp-result .icon:before{padding-right:5px}#loco.wrap div.auto-comp-result:hover{background:#A8A8A8;color:#FFFFFF;border-top-color:#A8A8A8;border-bottom-color:#999999}#loco.wrap div.auto-comp-result.selected{background:#666666 !important;color:#FFFFFF;border-top-color:#666666;border-bottom-color:#666666}#loco.wrap div.auto-comp-result .lang,#loco.wrap div.auto-comp-result .region,#loco.wrap div.auto-comp-result .lang-ca,#loco.wrap div.auto-comp-result .lang-eo,#loco.wrap div.auto-comp-result .lang-eu,#loco.wrap div.auto-comp-result .variant-wales,#loco.wrap div.auto-comp-result .region-gb.lang-cy,#loco.wrap div.auto-comp-result .variant-scotland,#loco.wrap div.auto-comp-result .region-gb.lang-gd{margin-right:5px}#loco.wrap div.auto-comp-wrap.error a.icon.clear:before{color:#cc0000;opacity:1}#loco.wrap div.auto-comp-wrap.error input[type="text"]{border-color:#cc0000;color:#cc0000}#loco.wrap div.auto-comp-wrap.error input[type="text"]:focus{-webkit-box-shadow:0 0 0.5em 0 rgba(153,0,0,0.5);-moz-box-shadow:0 0 0.5em 0 rgba(153,0,0,0.5);box-shadow:0 0 0.5em 0 rgba(153,0,0,0.5)}@font-face{#loco.wrap{font-family:'loco';src:url("../fonts/loco.eot");src:url("../fonts/loco.eot?#iefix") format("embedded-opentype"),url("../fonts/loco.ttf") format("truetype"),url("../fonts/loco.woff") format("woff"),url("../fonts/loco.svg#loco") format("svg");font-weight:normal;font-style:normal}}#loco.wrap .icon,#loco.wrap .loco-font,#loco.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco.wrap .has-icon:before{font-family:'loco';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco.wrap .has-icon:before{display:inline-block;padding-right:0.3em}#loco.wrap a.icon-help{cursor:help}#loco.wrap a.icon-help span{display:none}#loco.wrap .icon-language:before{content:"\f326"}#loco.wrap .icon-proj:before{content:"\e900"}#loco.wrap .icon-plural:before{content:"\73"}#loco.wrap .icon-max:before{content:"\e901"}#loco.wrap .icon-min:before{content:"\e902"}#loco.wrap .icon-sort:before{content:"\e903"}#loco.wrap .icon-checkbox-checked:before,#loco.wrap .selector.multi li.checked .icon-checkbox:before{content:"\2611"}#loco.wrap .icon-checkbox-unchecked:before{content:"\2610"}#loco.wrap .icon-checkbox-partial:before{content:"\2609"}#loco.wrap .icon-radio-checked:before{content:"\26ab"}#loco.wrap .icon-radio-unchecked:before{content:"\26aa"}#loco.wrap .icon-ext:before{content:"\2b08"}#loco.wrap .icon-star:before{content:"\e612"}#loco.wrap .icon-user:before{content:"\e620"}#loco.wrap .icon-ok:before,#loco.wrap .notice-success>.has-icon:before,#loco.wrap .notice-success p>strong.has-icon:before{content:"\2713"}#loco.wrap .icon-remove:before{content:"\d7"}#loco.wrap .icon-cog:before{content:"\e61b"}#loco.wrap .icon-trash:before{content:"\e60f"}#loco.wrap .icon-time:before{content:"\e62d"}#loco.wrap .icon-download:before{content:"\e608"}#loco.wrap .icon-revert:before{content:"\e635"}#loco.wrap .icon-sync:before{content:"\e634"}#loco.wrap .icon-lock:before,#loco.wrap .selector.disabled:after,#loco.wrap .notice-locked>.has-icon:before,#loco.wrap .notice-locked p>strong.has-icon:before{content:"\e604"}#loco.wrap .icon-flag:before{content:"\e60e"}#loco.wrap .icon-tag:before{content:"\e622"}#loco.wrap .icon-tags:before{content:"\e623"}#loco.wrap .icon-print:before{content:"\e62a"}#loco.wrap .icon-camera:before{content:"\e629"}#loco.wrap .icon-pencil:before{content:"\e61e"}#loco.wrap .icon-add:before{content:"\e60c"}#loco.wrap .icon-del:before{content:"\e60d"}#loco.wrap .icon-clear:before,#loco.wrap a.icon.clear:before{content:"\e615"}#loco.wrap .icon-ok-sign:before{content:"\2714"}#loco.wrap .icon-help:before{content:"\3f"}#loco.wrap .icon-info:before,#loco.wrap .notice-info>.has-icon:before,#loco.wrap .notice-info p>strong.has-icon:before{content:"\2139"}#loco.wrap .icon-cancel:before{content:"\e605"}#loco.wrap .icon-warn:before,#loco.wrap .notice-warning>.has-icon:before,#loco.wrap .notice-warning p>strong.has-icon:before,#loco.wrap .notice-error>.has-icon:before,#loco.wrap .notice-error p>strong.has-icon:before{content:"\e62e"}#loco.wrap .icon-comment:before{content:"\e613"}#loco.wrap .icon-bar-chart:before{content:"\e624"}#loco.wrap .icon-key:before{content:"\e606"}#loco.wrap .icon-cogs:before{content:"\e61c"}#loco.wrap .icon-comments:before{content:"\e614"}#loco.wrap .icon-signout:before{content:"\e61a"}#loco.wrap .icon-signin:before{content:"\e619"}#loco.wrap .icon-upload:before{content:"\e609"}#loco.wrap .icon-twitter:before{content:"\1f426"}#loco.wrap .icon-facebook:before{content:"\e630"}#loco.wrap .icon-github:before{content:"\e633"}#loco.wrap .icon-feed:before{content:"\e628"}#loco.wrap .icon-globe:before{content:"\e61d"}#loco.wrap .icon-wrench:before,#loco.wrap .notice-debug>.has-icon:before,#loco.wrap .notice-debug p>strong.has-icon:before{content:"\e626"}#loco.wrap .icon-group:before{content:"\e61f"}#loco.wrap .icon-cloud:before{content:"\e607"}#loco.wrap .icon-copy:before{content:"\e62b"}#loco.wrap .icon-save:before{content:"\e610"}#loco.wrap .icon-menu:before{content:"\e600"}#loco.wrap .icon-table:before{content:"\e627"}#loco.wrap .icon-caret-down:before,#loco.wrap .selector .handle:after{content:"\e602"}#loco.wrap .icon-caret-up:before,#loco.wrap .selector.active .handle:after{content:"\e601"}#loco.wrap .icon-caret-right:before{content:"\e62c"}#loco.wrap .icon-mail:before{content:"\e603"}#loco.wrap .icon-cloud-upload:before{content:"\e617"}#loco.wrap .icon-file:before{content:"\e611"}#loco.wrap .icon-circle-white:before{content:"\26ac"}#loco.wrap .icon-circle-black:before{content:"\25cf"}#loco.wrap .icon-eraser:before{content:"\e636"}#loco.wrap .icon-unlock:before{content:"\e616"}#loco.wrap .icon-apple:before{content:"\e60b"}#loco.wrap .icon-android:before{content:"\e60a"}#loco.wrap .icon-back:before{content:"\2b05"}#loco.wrap .icon-next:before{content:"\2794"}#loco.wrap .icon-arrow-up:before{content:"\f062"}#loco.wrap .icon-ccard:before{content:"\f09d"}#loco.wrap .icon-pro:before{content:"\26a1"}#loco.wrap .icon-hellip:before{content:"\2026"}#loco.wrap .icon-vellip:before{content:"\205e"}#loco.wrap .icon-collapse:before{content:"\f147"}#loco.wrap .icon-expand:before{content:"\f196"}#loco.wrap .icon-wordpress:before{content:"\f19a"}#loco.wrap .icon-database:before{content:"\f1c0"}#loco.wrap .icon-flag.is-untranslated:before{content:"×"}#loco.wrap .icon-flag.status-0:before,#loco.wrap .icon-flag.is-translated:before{content:"✓"}#loco.wrap .icon-flag.status-1:before,#loco.wrap .icon-flag.is-incorrect:before{content:""}#loco.wrap .icon-flag.status-2:before,#loco.wrap .icon-flag.is-provisional:before{content:""}#loco.wrap .icon-flag.status-3:before,#loco.wrap .icon-flag.is-unapproved:before{content:""}#loco.wrap .icon-flag.status-4:before,#loco.wrap .icon-flag.is-fuzzy:before{content:""}#loco.wrap .icon-flag.status-5:before,#loco.wrap .icon-flag.is-incomplete:before{content:""}#loco.wrap .icon-flag.status-6:before,#loco.wrap .icon-flag.is-rejected:before{content:""}#loco.wrap .lang,#loco.wrap .region,#loco.wrap .lang-ca,#loco.wrap .lang-eo,#loco.wrap .lang-eu,#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy,#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd{color:#fff;background:#2e892e;display:inline-block;text-transform:uppercase;overflow:hidden;font-family:Verdana,Arial,sans-serif;font-size:9px;font-weight:normal;font-style:normal;line-height:12px;text-align:center;white-space:normal;text-shadow:none}#loco.wrap .lang{width:20px;height:12px;line-height:12px;vertical-align:middle}#loco.wrap .lang:before{content:attr(lang)}#loco.wrap .lang-el{background-color:#1D48A3}#loco.wrap .lang-el:before{content:"\0395\03BB"}#loco.wrap .region,#loco.wrap .lang-ca,#loco.wrap .lang-eo,#loco.wrap .lang-eu,#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy,#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd{width:16px;height:12px;margin:0 2px;background-image:url(../img/flags.png?v=2.0.0-dev);background-repeat:no-repeat;background-color:transparent}#loco.wrap .region:before,#loco.wrap .lang-ca:before,#loco.wrap .lang-eo:before,#loco.wrap .lang-eu:before,#loco.wrap .variant-wales:before,#loco.wrap .region-gb.lang-cy:before,#loco.wrap .variant-scotland:before,#loco.wrap .region-gb.lang-gd:before{content:"\0A";display:none}#loco.wrap .lang-zh{background-color:#B90000}#loco.wrap .lang-zh.script-hans:before{content:"\4E2D\56FD"}#loco.wrap .lang-zh.script-hant:before{content:"\4E2D\570B"}#loco.wrap .__{background-position:0 0}#loco.wrap .lang-ca{background-position:0 -12px}#loco.wrap .lang-eo{background-position:0 -24px}#loco.wrap .lang-eu{background-position:0 -36px}#loco.wrap .region-ad{background-position:0 -48px}#loco.wrap .region-ae{background-position:0 -60px}#loco.wrap .region-af{background-position:0 -72px}#loco.wrap .region-ag{background-position:0 -84px}#loco.wrap .region-ai{background-position:0 -96px}#loco.wrap .region-al{background-position:0 -108px}#loco.wrap .region-am{background-position:0 -120px}#loco.wrap .region-an{background-position:0 -132px}#loco.wrap .region-ao{background-position:0 -144px}#loco.wrap .region-aq{background-position:0 -156px}#loco.wrap .region-ar{background-position:0 -173px}#loco.wrap .region-as{background-position:0 -185px}#loco.wrap .region-at{background-position:0 -197px}#loco.wrap .region-au{background-position:0 -209px}#loco.wrap .region-aw{background-position:0 -221px}#loco.wrap .region-ax{background-position:0 -233px}#loco.wrap .region-az{background-position:0 -245px}#loco.wrap .region-ba{background-position:0 -257px}#loco.wrap .region-bb{background-position:0 -269px}#loco.wrap .region-bd{background-position:0 -281px}#loco.wrap .region-be{background-position:0 -293px}#loco.wrap .region-bf{background-position:0 -305px}#loco.wrap .region-bg{background-position:0 -317px}#loco.wrap .region-bh{background-position:0 -329px}#loco.wrap .region-bi{background-position:0 -341px}#loco.wrap .region-bj{background-position:0 -353px}#loco.wrap .region-bl{background-position:0 -365px}#loco.wrap .region-bm{background-position:0 -382px}#loco.wrap .region-bn{background-position:0 -394px}#loco.wrap .region-bo{background-position:0 -406px}#loco.wrap .region-bq{background-position:0 -418px}#loco.wrap .region-br{background-position:0 -430px}#loco.wrap .region-bs{background-position:0 -442px}#loco.wrap .region-bt{background-position:0 -454px}#loco.wrap .region-bv{background-position:0 -466px}#loco.wrap .region-bw{background-position:0 -478px}#loco.wrap .region-by{background-position:0 -490px}#loco.wrap .region-bz{background-position:0 -502px}#loco.wrap .region-ca{background-position:0 -514px}#loco.wrap .region-cc{background-position:0 -526px}#loco.wrap .region-cd{background-position:0 -538px}#loco.wrap .region-cf{background-position:0 -550px}#loco.wrap .region-cg{background-position:0 -562px}#loco.wrap .region-ch{background-position:0 -574px}#loco.wrap .region-ci{background-position:0 -586px}#loco.wrap .region-ck{background-position:0 -598px}#loco.wrap .region-cl{background-position:0 -610px}#loco.wrap .region-cm{background-position:0 -622px}#loco.wrap .region-cn{background-position:0 -634px}#loco.wrap .region-co{background-position:0 -646px}#loco.wrap .region-cr{background-position:0 -658px}#loco.wrap .region-cs{background-position:0 -670px}#loco.wrap .region-cu{background-position:0 -682px}#loco.wrap .region-cv{background-position:0 -694px}#loco.wrap .region-cw{background-position:0 -706px}#loco.wrap .region-cx{background-position:0 -723px}#loco.wrap .region-cy{background-position:0 -735px}#loco.wrap .region-cz{background-position:0 -747px}#loco.wrap .region-de{background-position:0 -759px}#loco.wrap .region-dj{background-position:0 -771px}#loco.wrap .region-dk{background-position:0 -783px}#loco.wrap .region-dm{background-position:0 -795px}#loco.wrap .region-do{background-position:0 -807px}#loco.wrap .region-dz{background-position:0 -819px}#loco.wrap .region-ec{background-position:0 -831px}#loco.wrap .region-ee{background-position:0 -843px}#loco.wrap .region-eg{background-position:0 -855px}#loco.wrap .region-eh{background-position:0 -867px}#loco.wrap .region-er{background-position:0 -879px}#loco.wrap .region-es{background-position:0 -891px}#loco.wrap .region-et{background-position:0 -903px}#loco.wrap .region-fi{background-position:0 -915px}#loco.wrap .region-fj{background-position:0 -927px}#loco.wrap .region-fk{background-position:0 -939px}#loco.wrap .region-fm{background-position:0 -951px}#loco.wrap .region-fo{background-position:0 -963px}#loco.wrap .region-fr{background-position:0 -975px}#loco.wrap .region-ga{background-position:0 -987px}#loco.wrap .region-gb{background-position:0 -999px}#loco.wrap .region-gd{background-position:0 -1011px}#loco.wrap .region-ge{background-position:0 -1023px}#loco.wrap .region-gf{background-position:0 -1035px}#loco.wrap .region-gg{background-position:0 -1047px}#loco.wrap .region-gh{background-position:0 -1064px}#loco.wrap .region-gi{background-position:0 -1076px}#loco.wrap .region-gl{background-position:0 -1088px}#loco.wrap .region-gm{background-position:0 -1100px}#loco.wrap .region-gn{background-position:0 -1112px}#loco.wrap .region-gp{background-position:0 -1124px}#loco.wrap .region-gq{background-position:0 -1136px}#loco.wrap .region-gr{background-position:0 -1148px}#loco.wrap .region-gs{background-position:0 -1160px}#loco.wrap .region-gt{background-position:0 -1172px}#loco.wrap .region-gu{background-position:0 -1184px}#loco.wrap .region-gw{background-position:0 -1196px}#loco.wrap .region-gy{background-position:0 -1208px}#loco.wrap .region-hk{background-position:0 -1220px}#loco.wrap .region-hm{background-position:0 -1232px}#loco.wrap .region-hn{background-position:0 -1244px}#loco.wrap .region-hr{background-position:0 -1256px}#loco.wrap .region-ht{background-position:0 -1268px}#loco.wrap .region-hu{background-position:0 -1280px}#loco.wrap .region-id{background-position:0 -1292px}#loco.wrap .region-ie{background-position:0 -1304px}#loco.wrap .region-il{background-position:0 -1316px}#loco.wrap .region-im{background-position:0 -1328px}#loco.wrap .region-in{background-position:0 -1345px}#loco.wrap .region-io{background-position:0 -1357px}#loco.wrap .region-iq{background-position:0 -1369px}#loco.wrap .region-ir{background-position:0 -1381px}#loco.wrap .region-is{background-position:0 -1393px}#loco.wrap .region-it{background-position:0 -1405px}#loco.wrap .region-je{background-position:0 -1417px}#loco.wrap .region-jm{background-position:0 -1434px}#loco.wrap .region-jo{background-position:0 -1446px}#loco.wrap .region-jp{background-position:0 -1458px}#loco.wrap .region-ke{background-position:0 -1470px}#loco.wrap .region-kg{background-position:0 -1482px}#loco.wrap .region-kh{background-position:0 -1494px}#loco.wrap .region-ki{background-position:0 -1506px}#loco.wrap .region-km{background-position:0 -1518px}#loco.wrap .region-kn{background-position:0 -1530px}#loco.wrap .region-kp{background-position:0 -1542px}#loco.wrap .region-kr{background-position:0 -1554px}#loco.wrap .region-kw{background-position:0 -1566px}#loco.wrap .region-ky{background-position:0 -1578px}#loco.wrap .region-kz{background-position:0 -1590px}#loco.wrap .region-la{background-position:0 -1602px}#loco.wrap .region-lb{background-position:0 -1614px}#loco.wrap .region-lc{background-position:0 -1626px}#loco.wrap .region-li{background-position:0 -1638px}#loco.wrap .region-lk{background-position:0 -1650px}#loco.wrap .region-lr{background-position:0 -1662px}#loco.wrap .region-ls{background-position:0 -1674px}#loco.wrap .region-lt{background-position:0 -1686px}#loco.wrap .region-lu{background-position:0 -1698px}#loco.wrap .region-lv{background-position:0 -1710px}#loco.wrap .region-ly{background-position:0 -1722px}#loco.wrap .region-ma{background-position:0 -1734px}#loco.wrap .region-mc{background-position:0 -1746px}#loco.wrap .region-md{background-position:0 -1758px}#loco.wrap .region-me{background-position:0 -1770px}#loco.wrap .region-mf{background-position:0 -1783px}#loco.wrap .region-mg{background-position:0 -1800px}#loco.wrap .region-mh{background-position:0 -1812px}#loco.wrap .region-mk{background-position:0 -1824px}#loco.wrap .region-ml{background-position:0 -1836px}#loco.wrap .region-mm{background-position:0 -1848px}#loco.wrap .region-mn{background-position:0 -1860px}#loco.wrap .region-mo{background-position:0 -1872px}#loco.wrap .region-mp{background-position:0 -1884px}#loco.wrap .region-mq{background-position:0 -1896px}#loco.wrap .region-mr{background-position:0 -1908px}#loco.wrap .region-ms{background-position:0 -1920px}#loco.wrap .region-mt{background-position:0 -1932px}#loco.wrap .region-mu{background-position:0 -1944px}#loco.wrap .region-mv{background-position:0 -1956px}#loco.wrap .region-mw{background-position:0 -1968px}#loco.wrap .region-mx{background-position:0 -1980px}#loco.wrap .region-my{background-position:0 -1992px}#loco.wrap .region-mz{background-position:0 -2004px}#loco.wrap .region-na{background-position:0 -2016px}#loco.wrap .region-nc{background-position:0 -2028px}#loco.wrap .region-ne{background-position:0 -2040px}#loco.wrap .region-nf{background-position:0 -2052px}#loco.wrap .region-ng{background-position:0 -2064px}#loco.wrap .region-ni{background-position:0 -2076px}#loco.wrap .region-nl{background-position:0 -2088px}#loco.wrap .region-no{background-position:0 -2100px}#loco.wrap .region-np{background-position:0 -2112px}#loco.wrap .region-nr{background-position:0 -2124px}#loco.wrap .region-nu{background-position:0 -2136px}#loco.wrap .region-nz{background-position:0 -2148px}#loco.wrap .region-om{background-position:0 -2160px}#loco.wrap .region-pa{background-position:0 -2172px}#loco.wrap .region-pe{background-position:0 -2184px}#loco.wrap .region-pf{background-position:0 -2196px}#loco.wrap .region-pg{background-position:0 -2208px}#loco.wrap .region-ph{background-position:0 -2220px}#loco.wrap .region-pk{background-position:0 -2232px}#loco.wrap .region-pl{background-position:0 -2244px}#loco.wrap .region-pm{background-position:0 -2256px}#loco.wrap .region-pn{background-position:0 -2268px}#loco.wrap .region-pr{background-position:0 -2280px}#loco.wrap .region-ps{background-position:0 -2292px}#loco.wrap .region-pt{background-position:0 -2304px}#loco.wrap .region-pw{background-position:0 -2316px}#loco.wrap .region-py{background-position:0 -2328px}#loco.wrap .region-qa{background-position:0 -2340px}#loco.wrap .region-re{background-position:0 -2352px}#loco.wrap .region-ro{background-position:0 -2364px}#loco.wrap .region-rs{background-position:0 -2376px}#loco.wrap .region-ru{background-position:0 -2388px}#loco.wrap .region-rw{background-position:0 -2400px}#loco.wrap .region-sa{background-position:0 -2412px}#loco.wrap .region-sb{background-position:0 -2424px}#loco.wrap .region-sc{background-position:0 -2436px}#loco.wrap .region-sd{background-position:0 -2448px}#loco.wrap .region-se{background-position:0 -2460px}#loco.wrap .region-sg{background-position:0 -2472px}#loco.wrap .region-sh{background-position:0 -2484px}#loco.wrap .region-si{background-position:0 -2496px}#loco.wrap .region-sj{background-position:0 -2508px}#loco.wrap .region-sk{background-position:0 -2520px}#loco.wrap .region-sl{background-position:0 -2532px}#loco.wrap .region-sm{background-position:0 -2544px}#loco.wrap .region-sn{background-position:0 -2556px}#loco.wrap .region-so{background-position:0 -2568px}#loco.wrap .region-sr{background-position:0 -2580px}#loco.wrap .region-ss{background-position:0 -2592px}#loco.wrap .region-st{background-position:0 -2609px}#loco.wrap .region-sv{background-position:0 -2621px}#loco.wrap .region-sx{background-position:0 -2633px}#loco.wrap .region-sy{background-position:0 -2650px}#loco.wrap .region-sz{background-position:0 -2662px}#loco.wrap .region-tc{background-position:0 -2674px}#loco.wrap .region-td{background-position:0 -2686px}#loco.wrap .region-tf{background-position:0 -2698px}#loco.wrap .region-tg{background-position:0 -2710px}#loco.wrap .region-th{background-position:0 -2722px}#loco.wrap .region-tj{background-position:0 -2734px}#loco.wrap .region-tk{background-position:0 -2746px}#loco.wrap .region-tl{background-position:0 -2758px}#loco.wrap .region-tm{background-position:0 -2770px}#loco.wrap .region-tn{background-position:0 -2782px}#loco.wrap .region-to{background-position:0 -2794px}#loco.wrap .region-tr{background-position:0 -2806px}#loco.wrap .region-tt{background-position:0 -2818px}#loco.wrap .region-tv{background-position:0 -2830px}#loco.wrap .region-tw{background-position:0 -2842px}#loco.wrap .region-tz{background-position:0 -2854px}#loco.wrap .region-ua{background-position:0 -2866px}#loco.wrap .region-ug{background-position:0 -2878px}#loco.wrap .region-um{background-position:0 -2890px}#loco.wrap .region-us{background-position:0 -2902px}#loco.wrap .region-uy{background-position:0 -2914px}#loco.wrap .region-uz{background-position:0 -2926px}#loco.wrap .region-va{background-position:0 -2938px}#loco.wrap .region-vc{background-position:0 -2950px}#loco.wrap .region-ve{background-position:0 -2962px}#loco.wrap .region-vg{background-position:0 -2974px}#loco.wrap .region-vi{background-position:0 -2986px}#loco.wrap .region-vn{background-position:0 -2998px}#loco.wrap .region-vu{background-position:0 -3010px}#loco.wrap .region-wf{background-position:0 -3022px}#loco.wrap .region-ws{background-position:0 -3034px}#loco.wrap .region-ye{background-position:0 -3046px}#loco.wrap .region-yt{background-position:0 -3058px}#loco.wrap .region-za{background-position:0 -3070px}#loco.wrap .region-zm{background-position:0 -3082px}#loco.wrap .region-zw{background-position:0 -3094px}#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd{background-position:0 -3106px}#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy{background-position:0 -3118px}#loco.wrap .x-eu{background-position:0 -3130px}#loco.wrap span.lang code{display:none}#loco.wrap .icon-language:before{content:"\f326"}#loco.wrap .icon-proj:before{content:"\e900"}#loco.wrap .icon-plural:before{content:"\73"}#loco.wrap .icon-max:before{content:"\e901"}#loco.wrap .icon-min:before{content:"\e902"}#loco.wrap .icon-sort:before{content:"\e903"}#loco.wrap .icon-checkbox-checked:before,#loco.wrap .selector.multi li.checked .icon-checkbox:before{content:"\2611"}#loco.wrap .icon-checkbox-unchecked:before{content:"\2610"}#loco.wrap .icon-checkbox-partial:before{content:"\2609"}#loco.wrap .icon-radio-checked:before{content:"\26ab"}#loco.wrap .icon-radio-unchecked:before{content:"\26aa"}#loco.wrap .icon-ext:before{content:"\2b08"}#loco.wrap .icon-star:before{content:"\e612"}#loco.wrap .icon-user:before{content:"\e620"}#loco.wrap .icon-ok:before,#loco.wrap .notice-success>.has-icon:before,#loco.wrap .notice-success p>strong.has-icon:before{content:"\2713"}#loco.wrap .icon-remove:before{content:"\d7"}#loco.wrap .icon-cog:before{content:"\e61b"}#loco.wrap .icon-trash:before{content:"\e60f"}#loco.wrap .icon-time:before{content:"\e62d"}#loco.wrap .icon-download:before{content:"\e608"}#loco.wrap .icon-revert:before{content:"\e635"}#loco.wrap .icon-sync:before{content:"\e634"}#loco.wrap .icon-lock:before,#loco.wrap .selector.disabled:after,#loco.wrap .notice-locked>.has-icon:before,#loco.wrap .notice-locked p>strong.has-icon:before{content:"\e604"}#loco.wrap .icon-flag:before{content:"\e60e"}#loco.wrap .icon-tag:before{content:"\e622"}#loco.wrap .icon-tags:before{content:"\e623"}#loco.wrap .icon-print:before{content:"\e62a"}#loco.wrap .icon-camera:before{content:"\e629"}#loco.wrap .icon-pencil:before{content:"\e61e"}#loco.wrap .icon-add:before{content:"\e60c"}#loco.wrap .icon-del:before{content:"\e60d"}#loco.wrap .icon-clear:before,#loco.wrap a.icon.clear:before{content:"\e615"}#loco.wrap .icon-ok-sign:before{content:"\2714"}#loco.wrap .icon-help:before{content:"\3f"}#loco.wrap .icon-info:before,#loco.wrap .notice-info>.has-icon:before,#loco.wrap .notice-info p>strong.has-icon:before{content:"\2139"}#loco.wrap .icon-cancel:before{content:"\e605"}#loco.wrap .icon-warn:before,#loco.wrap .notice-warning>.has-icon:before,#loco.wrap .notice-warning p>strong.has-icon:before,#loco.wrap .notice-error>.has-icon:before,#loco.wrap .notice-error p>strong.has-icon:before{content:"\e62e"}#loco.wrap .icon-comment:before{content:"\e613"}#loco.wrap .icon-bar-chart:before{content:"\e624"}#loco.wrap .icon-key:before{content:"\e606"}#loco.wrap .icon-cogs:before{content:"\e61c"}#loco.wrap .icon-comments:before{content:"\e614"}#loco.wrap .icon-signout:before{content:"\e61a"}#loco.wrap .icon-signin:before{content:"\e619"}#loco.wrap .icon-upload:before{content:"\e609"}#loco.wrap .icon-twitter:before{content:"\1f426"}#loco.wrap .icon-facebook:before{content:"\e630"}#loco.wrap .icon-github:before{content:"\e633"}#loco.wrap .icon-feed:before{content:"\e628"}#loco.wrap .icon-globe:before{content:"\e61d"}#loco.wrap .icon-wrench:before,#loco.wrap .notice-debug>.has-icon:before,#loco.wrap .notice-debug p>strong.has-icon:before{content:"\e626"}#loco.wrap .icon-group:before{content:"\e61f"}#loco.wrap .icon-cloud:before{content:"\e607"}#loco.wrap .icon-copy:before{content:"\e62b"}#loco.wrap .icon-save:before{content:"\e610"}#loco.wrap .icon-menu:before{content:"\e600"}#loco.wrap .icon-table:before{content:"\e627"}#loco.wrap .icon-caret-down:before,#loco.wrap .selector .handle:after{content:"\e602"}#loco.wrap .icon-caret-up:before,#loco.wrap .selector.active .handle:after{content:"\e601"}#loco.wrap .icon-caret-right:before{content:"\e62c"}#loco.wrap .icon-mail:before{content:"\e603"}#loco.wrap .icon-cloud-upload:before{content:"\e617"}#loco.wrap .icon-file:before{content:"\e611"}#loco.wrap .icon-circle-white:before{content:"\26ac"}#loco.wrap .icon-circle-black:before{content:"\25cf"}#loco.wrap .icon-eraser:before{content:"\e636"}#loco.wrap .icon-unlock:before{content:"\e616"}#loco.wrap .icon-apple:before{content:"\e60b"}#loco.wrap .icon-android:before{content:"\e60a"}#loco.wrap .icon-back:before{content:"\2b05"}#loco.wrap .icon-next:before{content:"\2794"}#loco.wrap .icon-arrow-up:before{content:"\f062"}#loco.wrap .icon-ccard:before{content:"\f09d"}#loco.wrap .icon-pro:before{content:"\26a1"}#loco.wrap .icon-hellip:before{content:"\2026"}#loco.wrap .icon-vellip:before{content:"\205e"}#loco.wrap .icon-collapse:before{content:"\f147"}#loco.wrap .icon-expand:before{content:"\f196"}#loco.wrap .icon-wordpress:before{content:"\f19a"}#loco.wrap .icon-database:before{content:"\f1c0"}#loco.wrap .icon,#loco.wrap .has-icon:before,#loco.wrap .has-dashicon:before{speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco.wrap .icon,#loco.wrap .has-icon:before{font-family:'loco'}#loco.wrap .has-dashicon:before{font-family:'dashicons';font-size:1.4em}#loco.wrap .has-icon:before,#loco.wrap .has-dashicon:before,#loco.wrap .has-icon>span{display:inline-block;vertical-align:middle}#loco.wrap h1 ul,#loco.wrap h1 li{margin:0;padding:0}#loco.wrap h1 li{display:inline-block}#loco.wrap h1 li:after{content:"/";color:#999;text-shadow:none;display:inline-block}#loco.wrap h1 li a{text-decoration:none}#loco.wrap h1 li:last-child:after{content:""}#loco.wrap h1 li:last-child a{color:inherit;pointer-events:none;cursor:auto}#loco.wrap h2 span{color:#999;font-weight:normal}#loco.wrap h3 .loco-meta{font-size:14px;font-weight:normal}#loco.wrap .wp-list-table td:first-child .icon{width:16px;display:inline-block;text-align:center}#loco.wrap .wp-list-table td{white-space:nowrap}#loco.wrap .wp-list-table th.loco-sort{cursor:pointer}#loco.wrap .wp-list-table th.loco-sort:hover{color:#000}#loco.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after{padding:0 0 0 4px;color:#999}#loco.wrap .wp-list-table th.loco-sort.loco-desc:after{content:"\e602"}#loco.wrap .wp-list-table th.loco-sort.loco-asc:after{content:"\e601"}#loco.wrap nav.above-list-table{margin-bottom:1em}#loco.wrap nav.above-list-table a{display:inline-block;margin-right:1em}#loco.wrap .wp-core-ui button.inverted,#loco.wrap .wp-core-ui button.inverted:hover{background:-moz-linear-gradient(top, #ccc 0%, #e0e0e0 5%, #fefefe 100%);background:-webkit-linear-gradient(top, #ccc 0%, #e0e0e0 5%, #fefefe 100%);background:linear-gradient(to bottom, #ccc 0%, #e0e0e0 5%, #fefefe 100%);-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;border-color:#bbb}#loco.wrap .loco-clearable{display:inline-block;vertical-align:middle;position:relative}#loco.wrap .loco-clearable a.clear,#loco.wrap .auto-comp-wrap a.clear{top:0;right:0;outline:none;padding:5px 5px;position:absolute;font-size:1em;line-height:normal;text-decoration:none}#loco.wrap .loco-clearable a.clear:before,#loco.wrap .auto-comp-wrap a.clear:before{vertical-align:middle;padding:0;color:#999}#loco.wrap .loco-clearable a.clear:hover:before,#loco.wrap .auto-comp-wrap a.clear:hover:before{color:#333}#loco.wrap .loco-clearable a.clear span,#loco.wrap .auto-comp-wrap a.clear span{display:none}#loco.wrap .loco-clearable ::-ms-clear,#loco.wrap .auto-comp-wrap ::-ms-clear{display:none}#loco.wrap div.progress{color:#000}#loco.wrap div.progress *{height:100%;overflow:hidden;white-space:nowrap}#loco.wrap div.progress .t{background-color:#ddd;border:1px solid #ccc}#loco.wrap div.progress .t .bar{float:left;clear:none;background-color:#3db63d}#loco.wrap div.progress .t .bar.f{background-color:#bd2c00}#loco.wrap div.progress .l{display:block}#loco.wrap td div.progress .t{border:none}#loco.wrap td div.progress .l{display:none}#loco.wrap code.path{color:#333;margin:0;padding:0;display:inline;background:transparent}#loco.wrap .notice,#loco.wrap .panel{background:#fff;position:relative;margin:1em 0;padding:1px 12px}#loco.wrap .notice-generic{border-color:#ddd}#loco.wrap .notice-success>.has-icon,#loco.wrap .notice-success p>strong.has-icon{color:#000}#loco.wrap .notice-warning{border-color:#FFA500}#loco.wrap .notice-error{border-color:#dc3232}#loco.wrap .notice-debug{border-color:#00a0d2}#loco.wrap .notice-danger{border-color:#dc3232}#loco.wrap .notice-locked{border-color:#FFA500}#loco.wrap .notice>p>a.button.has-icon:before{width:1.5em}#loco.wrap ul.problems li{font-style:italic}#loco.wrap input.regular-text,#loco.wrap textarea.regular-text{width:25em}#loco.wrap .button{text-decoration:none}#loco.wrap .button-link{padding:0 10px 1px}#loco.wrap .button-danger{background:#ba0000;border-color:#990000 #660000 #660000;-webkit-box-shadow:0 1px 0 #600;-moz-box-shadow:0 1px 0 #600;box-shadow:0 1px 0 #600;color:#fff;text-shadow:0 -1px 1px #660000, 1px 0 1px #660000, 0 1px 1px #660000, -1px 0 1px #660000}#loco.wrap .button-success{background:#00B500;border-color:#090 #2e892e #2e892e;-webkit-box-shadow:0 1px 0 #2e892e;-moz-box-shadow:0 1px 0 #2e892e;box-shadow:0 1px 0 #2e892e;color:#fff;text-shadow:0 -1px 1px #2e892e,1px 0 1px #2e892e,0 1px 1px #2e892e,-1px 0 1px #2e892e}#loco.wrap .button-success:hover{background:#3db63d}#loco.wrap form button.loading.button-large{padding-left:0}#loco.wrap form button.loading.button-large:before{width:16px;height:16px;margin:0 4px;content:" ";font-size:16px;line-height:1;display:inline-block;vertical-align:sub}.js #wpbody-content>.notice{display:none}.js #wpbody-content>.notice.inline{display:block}.js #loco.wrap .jshide{display:none !important}#loco.wrap .invis{visibility:hidden}.form-table tr{vertical-align:top}.form-table tr.compact td{padding-top:0}#loco-fs p{line-height:22px}#loco-fs a.button,#loco-fs button[type="button"]{display:block;float:right;margin-left:4px}.loco-modal.request-filesystem-credentials-dialog{top:15% !important;max-height:85% !important}.loco-modal.request-filesystem-credentials-dialog .ftp-password>label>em:last-child{display:none}.ui-dialog-content>div.loading{height:100%;background:transparent url(../img/spin-modal.gif?v=2.0.0-dev) center center no-repeat}#loco-credit>*{vertical-align:middle}#loco-credit>a{display:inline-block;position:relative;overflow:hidden;background:transparent url(../img/logo-foot.gif?v=2.0.0-dev) 0 0 no-repeat;height:30px;width:100px;text-indent:200px;-webkit-transition-duration:0s;transition-duration:0s}#loco-credit>a:hover{background-position:0 -35px}#footer-upgrade span:before{color:#CCC;content:" | ";display:inline;padding-left:0.5em;padding-right:0.5em}#footer-upgrade span:first-child:before{content:"";display:none}dl.debug dt{font-weight:bold}dl.debug dt,dl.debug dd{white-space:pre}.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(0,115,170,0.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#0073aa}.wrap #loco-editor .is-editable>.wg-content .wg-field:focus{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 0.6em rgba(30,140,190,0.8);-moz-box-shadow:inset 0 0 0.6em rgba(30,140,190,0.8);box-shadow:inset 0 0 0.6em rgba(30,140,190,0.8)}form button.loading.button-primary[disabled]:before{background:transparent url(../img/skins/fresh/spin-primary-button.gif?v=2.0.0-dev) 0 0 no-repeat !important}
|
1 |
+
@font-face{font-family:'loco';src:url("../font/loco.eot");src:url("../font/loco.eot?#iefix") format("embedded-opentype"),url("../font/loco.woff") format("woff"),url("../font/loco.ttf") format("truetype"),url("../font/loco.svg#loco") format("svg");font-weight:normal;font-style:normal}#loco.wrap div{position:relative}#loco.wrap code{white-space:pre}#loco.wrap .selector{display:inline-block;white-space:nowrap}#loco.wrap .selectoradd a,#loco.wrap .selector .handle{cursor:default;display:block;position:relative;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;padding:0.3em 0.5em;color:#666;height:1.3em;overflow:hidden;white-space:normal}#loco.wrap .selectorsep{display:inline-block;border:solid 1px transparent}#loco.wrap .selectorsep:before{display:block;position:relative;padding:0.3em 0.5em;color:#999;height:1.3em;overflow:hidden}#loco.wrap .selectorsep>*{display:block;line-height:1em;color:#666;height:1.3em;overflow:hidden}#loco.wrap .selector .handle{outline:none}#loco.wrap .selector .handle .prefix{padding-right:0.6ex}#loco.wrap .selector .handle .region,#loco.wrap .selector .handle .lang-ca,#loco.wrap .selector .handle .lang-eo,#loco.wrap .selector .handle .lang-eu,#loco.wrap .selector .handle .variant-wales,#loco.wrap .selector .handle .region-gb.lang-cy,#loco.wrap .selector .handle .variant-scotland,#loco.wrap .selector .handle .region-gb.lang-gd,#loco.wrap .selector .handle .lang,#loco.wrap .selector .handle .icon-16{margin:0 5px 0 0}#loco.wrap .selector .handle:after{font-family:loco;padding-left:0.5em;padding-right:0.2em;font-size:1.3em;color:#ccc;float:right}#loco.wrap .selector .handle:focus:after,#loco.wrap .selector .handle:hover:after{color:#666}#loco.wrap .selector.no-title .handle .label{display:none}#loco.wrap .selector.no-caret .handle:after{display:none}#loco.wrap .selector.dummy .handle{border-color:transparent}#loco.wrap .selector.dummy .handle:after{display:none}#loco.wrap .selector .icon:before{color:#666}#loco.wrap .selector .lang,#loco.wrap .selector .region,#loco.wrap .selector .lang-ca,#loco.wrap .selector .lang-eo,#loco.wrap .selector .lang-eu,#loco.wrap .selector .variant-wales,#loco.wrap .selector .region-gb.lang-cy,#loco.wrap .selector .variant-scotland,#loco.wrap .selector .region-gb.lang-gd{vertical-align:middle}#loco.wrap .selectoradd{float:left;clear:none;position:relative}#loco.wrap .selectoradd>*{display:block;float:left;clear:none}#loco.wrap .selectoradd>a.has-icon{width:1.3em}#loco.wrap .selectoradd>a.has-icon:before{color:#999;display:inline;padding-left:0;padding-right:0;line-height:1.4em}#loco.wrap .selectoradd>a.has-icon:hover:after{color:#2e892e}#loco.wrap .selectoradd input[type="text"]{padding:0.3em 0.5em;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}#loco.wrap .selectorsep{display:inline-block}#loco.wrap .selectorsep span{padding:0.3em 0.5em;color:#666;height:1.3em}#loco.wrap .selector ul,#loco.wrap .selector li{display:block;position:relative;cursor:default;padding:0;margin:0}#loco.wrap .selector ul{z-index:1;position:absolute;left:0;top:0;margin-top:2px;background:#f5f5f5;box-shadow:0 10px 5px rgba(0,0,0,0.2);border:solid 1px #ccc}#loco.wrap .selector li{padding:0.3em 0.5em}#loco.wrap .selector.multi li input{display:none}#loco.wrap .selector.multi li.checked{background:#eee}#loco.wrap .selector li.active{background:#eee !important}#loco.wrap .selector li.over{background:#ccc !important;color:#fff;text-shadow:1px 1px #aaa}#loco.wrap .selector li.over .label{color:#fff}#loco.wrap .selector .label{display:inline-block;font:inherit;color:inherit;padding:0 0.5em;margin:0}#loco.wrap .selector li .icon,#loco.wrap .selector .handle .icon{display:inline-block;min-width:1.2em;text-align:center;font-size:14px;vertical-align:middle}#loco.wrap .selector li .icon.no-icon,#loco.wrap .selector .handle .icon.no-icon{display:none}#loco.wrap .selector .icon-16{vertical-align:text-top}#loco.wrap .selector.ticked .icon.no-icon{font-size:12px;display:inline-block}#loco.wrap .selector.ticked .active .icon.no-icon:before{content:"\2713"}#loco.wrap .selectoradd a:hover,#loco.wrap .selector a.handle:focus,#loco.wrap .selector a.handle:hover{color:#000;border-color:#999}#loco.wrap .selector.active .handle{border-color:#999;background-color:#eee;color:#999}#loco.wrap .selector.active .handle:after{color:#999}#loco.wrap .selector.disabled{padding:0.3em 0.5em;border-top:solid 1px #fff;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd;border-left:solid 1px #fff;color:#666;height:1.3em;cursor:default;cursor:no-drop;cursor:not-allowed}#loco.wrap .selector.disabled:after{font-family:loco;padding-left:0.5em;padding-right:0.3em;line-height:1em;vertical-align:middle}#loco.wrap .selector li.disabled,#loco.wrap .selector li.disabled.over{color:#aaa;text-shadow:1px 1px #fff;pointer-events:none}#loco.wrap .selector li.disabled *{cursor:text}#loco.wrap .selector li.disabled .icon:before{color:#aaa}#loco.wrap .selector li.disabled .flag,#loco.wrap .selector li.disabled .icon-16{opacity:0.4}#loco.wrap div.auto-comp-wrap{width:100%}#loco.wrap div.auto-comp-wrap input{display:inline-block}#loco.wrap div.auto-comp-wrap.loading input{background:transparent url(../img/ajax-loader.gif?v=2.0.0-dev) right 2px no-repeat}#loco.wrap div.auto-comp-drop{color:#333333;background:#FFFFFF;border-top:none;position:absolute;width:100%;top:0;left:0;z-index:99;-webkit-box-shadow:0 5px 5px rgba(0,0,0,0.4);-moz-box-shadow:0 5px 5px rgba(0,0,0,0.4);box-shadow:0 5px 5px rgba(0,0,0,0.4)}#loco.wrap div.auto-comp-result{padding:5px 10px;cursor:pointer;background:#F0F0F0;border-top:solid 1px #FFF;border-bottom:solid 1px #DDD}#loco.wrap div.auto-comp-result:first-child{border-top:solid 1px #DDD}#loco.wrap div.auto-comp-result>*{display:inline-block;vertical-align:middle;line-height:normal}#loco.wrap div.auto-comp-result .icon:before{padding-right:5px}#loco.wrap div.auto-comp-result:hover{background:#A8A8A8;color:#FFFFFF;border-top-color:#A8A8A8;border-bottom-color:#999999}#loco.wrap div.auto-comp-result.selected{background:#666666 !important;color:#FFFFFF;border-top-color:#666666;border-bottom-color:#666666}#loco.wrap div.auto-comp-result .lang,#loco.wrap div.auto-comp-result .region,#loco.wrap div.auto-comp-result .lang-ca,#loco.wrap div.auto-comp-result .lang-eo,#loco.wrap div.auto-comp-result .lang-eu,#loco.wrap div.auto-comp-result .variant-wales,#loco.wrap div.auto-comp-result .region-gb.lang-cy,#loco.wrap div.auto-comp-result .variant-scotland,#loco.wrap div.auto-comp-result .region-gb.lang-gd{margin-right:5px}#loco.wrap div.auto-comp-wrap.error a.icon.clear:before{color:#cc0000;opacity:1}#loco.wrap div.auto-comp-wrap.error input[type="text"]{border-color:#cc0000;color:#cc0000}#loco.wrap div.auto-comp-wrap.error input[type="text"]:focus{-webkit-box-shadow:0 0 0.5em 0 rgba(153,0,0,0.5);-moz-box-shadow:0 0 0.5em 0 rgba(153,0,0,0.5);box-shadow:0 0 0.5em 0 rgba(153,0,0,0.5)}@font-face{#loco.wrap{font-family:'loco';src:url("../fonts/loco.eot");src:url("../fonts/loco.eot?#iefix") format("embedded-opentype"),url("../fonts/loco.ttf") format("truetype"),url("../fonts/loco.woff") format("woff"),url("../fonts/loco.svg#loco") format("svg");font-weight:normal;font-style:normal}}#loco.wrap .icon,#loco.wrap .loco-font,#loco.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after,#loco.wrap .has-icon:before{font-family:'loco';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco.wrap .has-icon:before{display:inline-block;padding-right:0.3em}#loco.wrap a.icon-help{cursor:help}#loco.wrap a.icon-help span{display:none}#loco.wrap .icon-language:before{content:"\f326"}#loco.wrap .icon-proj:before{content:"\e900"}#loco.wrap .icon-plural:before{content:"\73"}#loco.wrap .icon-max:before{content:"\e901"}#loco.wrap .icon-min:before{content:"\e902"}#loco.wrap .icon-sort:before{content:"\e903"}#loco.wrap .icon-checkbox-checked:before,#loco.wrap .selector.multi li.checked .icon-checkbox:before{content:"\2611"}#loco.wrap .icon-checkbox-unchecked:before{content:"\2610"}#loco.wrap .icon-checkbox-partial:before{content:"\2609"}#loco.wrap .icon-radio-checked:before{content:"\26ab"}#loco.wrap .icon-radio-unchecked:before{content:"\26aa"}#loco.wrap .icon-ext:before{content:"\2b08"}#loco.wrap .icon-star:before{content:"\e612"}#loco.wrap .icon-user:before{content:"\e620"}#loco.wrap .icon-ok:before,#loco.wrap .notice-success>.has-icon:before,#loco.wrap .notice-success p>strong.has-icon:before{content:"\2713"}#loco.wrap .icon-remove:before{content:"\d7"}#loco.wrap .icon-cog:before{content:"\e61b"}#loco.wrap .icon-trash:before{content:"\e60f"}#loco.wrap .icon-time:before{content:"\e62d"}#loco.wrap .icon-download:before{content:"\e608"}#loco.wrap .icon-revert:before{content:"\e635"}#loco.wrap .icon-sync:before{content:"\e634"}#loco.wrap .icon-lock:before,#loco.wrap .selector.disabled:after,#loco.wrap .notice-locked>.has-icon:before,#loco.wrap .notice-locked p>strong.has-icon:before{content:"\e604"}#loco.wrap .icon-flag:before{content:"\e60e"}#loco.wrap .icon-tag:before{content:"\e622"}#loco.wrap .icon-tags:before{content:"\e623"}#loco.wrap .icon-print:before{content:"\e62a"}#loco.wrap .icon-camera:before{content:"\e629"}#loco.wrap .icon-pencil:before{content:"\e61e"}#loco.wrap .icon-add:before{content:"\e60c"}#loco.wrap .icon-del:before{content:"\e60d"}#loco.wrap .icon-clear:before,#loco.wrap a.icon.clear:before{content:"\e615"}#loco.wrap .icon-ok-sign:before{content:"\2714"}#loco.wrap .icon-help:before{content:"\3f"}#loco.wrap .icon-info:before,#loco.wrap .notice-info>.has-icon:before,#loco.wrap .notice-info p>strong.has-icon:before{content:"\2139"}#loco.wrap .icon-cancel:before{content:"\e605"}#loco.wrap .icon-warn:before,#loco.wrap .notice-warning>.has-icon:before,#loco.wrap .notice-warning p>strong.has-icon:before,#loco.wrap .notice-error>.has-icon:before,#loco.wrap .notice-error p>strong.has-icon:before{content:"\e62e"}#loco.wrap .icon-comment:before{content:"\e613"}#loco.wrap .icon-bar-chart:before{content:"\e624"}#loco.wrap .icon-key:before{content:"\e606"}#loco.wrap .icon-cogs:before{content:"\e61c"}#loco.wrap .icon-comments:before{content:"\e614"}#loco.wrap .icon-signout:before{content:"\e61a"}#loco.wrap .icon-signin:before{content:"\e619"}#loco.wrap .icon-upload:before{content:"\e609"}#loco.wrap .icon-twitter:before{content:"\1f426"}#loco.wrap .icon-facebook:before{content:"\e630"}#loco.wrap .icon-github:before{content:"\e633"}#loco.wrap .icon-feed:before{content:"\e628"}#loco.wrap .icon-globe:before{content:"\e61d"}#loco.wrap .icon-wrench:before,#loco.wrap .notice-debug>.has-icon:before,#loco.wrap .notice-debug p>strong.has-icon:before{content:"\e626"}#loco.wrap .icon-group:before{content:"\e61f"}#loco.wrap .icon-cloud:before{content:"\e607"}#loco.wrap .icon-copy:before{content:"\e62b"}#loco.wrap .icon-save:before{content:"\e610"}#loco.wrap .icon-menu:before{content:"\e600"}#loco.wrap .icon-table:before{content:"\e627"}#loco.wrap .icon-caret-down:before,#loco.wrap .selector .handle:after{content:"\e602"}#loco.wrap .icon-caret-up:before,#loco.wrap .selector.active .handle:after{content:"\e601"}#loco.wrap .icon-caret-right:before{content:"\e62c"}#loco.wrap .icon-mail:before{content:"\e603"}#loco.wrap .icon-cloud-upload:before{content:"\e617"}#loco.wrap .icon-file:before{content:"\e611"}#loco.wrap .icon-circle-white:before{content:"\26ac"}#loco.wrap .icon-circle-black:before{content:"\25cf"}#loco.wrap .icon-eraser:before{content:"\e636"}#loco.wrap .icon-unlock:before{content:"\e616"}#loco.wrap .icon-apple:before{content:"\e60b"}#loco.wrap .icon-android:before{content:"\e60a"}#loco.wrap .icon-back:before{content:"\2b05"}#loco.wrap .icon-next:before{content:"\2794"}#loco.wrap .icon-arrow-up:before{content:"\f062"}#loco.wrap .icon-ccard:before{content:"\f09d"}#loco.wrap .icon-pro:before{content:"\26a1"}#loco.wrap .icon-hellip:before{content:"\2026"}#loco.wrap .icon-vellip:before{content:"\205e"}#loco.wrap .icon-collapse:before{content:"\f147"}#loco.wrap .icon-expand:before{content:"\f196"}#loco.wrap .icon-wordpress:before{content:"\f19a"}#loco.wrap .icon-database:before{content:"\f1c0"}#loco.wrap .icon-flag.is-untranslated:before{content:"×"}#loco.wrap .icon-flag.status-0:before,#loco.wrap .icon-flag.is-translated:before{content:"✓"}#loco.wrap .icon-flag.status-1:before,#loco.wrap .icon-flag.is-incorrect:before{content:""}#loco.wrap .icon-flag.status-2:before,#loco.wrap .icon-flag.is-provisional:before{content:""}#loco.wrap .icon-flag.status-3:before,#loco.wrap .icon-flag.is-unapproved:before{content:""}#loco.wrap .icon-flag.status-4:before,#loco.wrap .icon-flag.is-fuzzy:before{content:""}#loco.wrap .icon-flag.status-5:before,#loco.wrap .icon-flag.is-incomplete:before{content:""}#loco.wrap .icon-flag.status-6:before,#loco.wrap .icon-flag.is-rejected:before{content:""}#loco.wrap .lang,#loco.wrap .region,#loco.wrap .lang-ca,#loco.wrap .lang-eo,#loco.wrap .lang-eu,#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy,#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd{color:#fff;background:#2e892e;display:inline-block;text-transform:uppercase;overflow:hidden;font-family:Verdana,Arial,sans-serif;font-size:9px;font-weight:normal;font-style:normal;line-height:12px;text-align:center;white-space:normal;text-shadow:none}#loco.wrap .lang{width:20px;height:12px;line-height:12px;vertical-align:middle}#loco.wrap .lang:before{content:attr(lang)}#loco.wrap .lang-el{background-color:#1D48A3}#loco.wrap .lang-el:before{content:"\0395\03BB"}#loco.wrap .region,#loco.wrap .lang-ca,#loco.wrap .lang-eo,#loco.wrap .lang-eu,#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy,#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd{width:16px;height:12px;margin:0 2px;background-image:url(../img/flags.png?v=2.0.0-dev);background-repeat:no-repeat;background-color:transparent}#loco.wrap .region:before,#loco.wrap .lang-ca:before,#loco.wrap .lang-eo:before,#loco.wrap .lang-eu:before,#loco.wrap .variant-wales:before,#loco.wrap .region-gb.lang-cy:before,#loco.wrap .variant-scotland:before,#loco.wrap .region-gb.lang-gd:before{content:"\0A";display:none}#loco.wrap .lang-zh{background-color:#B90000}#loco.wrap .lang-zh.script-hans:before{content:"\4E2D\56FD"}#loco.wrap .lang-zh.script-hant:before{content:"\4E2D\570B"}#loco.wrap .__{background-position:0 0}#loco.wrap .lang-ca{background-position:0 -12px}#loco.wrap .lang-eo{background-position:0 -24px}#loco.wrap .lang-eu{background-position:0 -36px}#loco.wrap .region-ad{background-position:0 -48px}#loco.wrap .region-ae{background-position:0 -60px}#loco.wrap .region-af{background-position:0 -72px}#loco.wrap .region-ag{background-position:0 -84px}#loco.wrap .region-ai{background-position:0 -96px}#loco.wrap .region-al{background-position:0 -108px}#loco.wrap .region-am{background-position:0 -120px}#loco.wrap .region-an{background-position:0 -132px}#loco.wrap .region-ao{background-position:0 -144px}#loco.wrap .region-aq{background-position:0 -156px}#loco.wrap .region-ar{background-position:0 -173px}#loco.wrap .region-as{background-position:0 -185px}#loco.wrap .region-at{background-position:0 -197px}#loco.wrap .region-au{background-position:0 -209px}#loco.wrap .region-aw{background-position:0 -221px}#loco.wrap .region-ax{background-position:0 -233px}#loco.wrap .region-az{background-position:0 -245px}#loco.wrap .region-ba{background-position:0 -257px}#loco.wrap .region-bb{background-position:0 -269px}#loco.wrap .region-bd{background-position:0 -281px}#loco.wrap .region-be{background-position:0 -293px}#loco.wrap .region-bf{background-position:0 -305px}#loco.wrap .region-bg{background-position:0 -317px}#loco.wrap .region-bh{background-position:0 -329px}#loco.wrap .region-bi{background-position:0 -341px}#loco.wrap .region-bj{background-position:0 -353px}#loco.wrap .region-bl{background-position:0 -365px}#loco.wrap .region-bm{background-position:0 -382px}#loco.wrap .region-bn{background-position:0 -394px}#loco.wrap .region-bo{background-position:0 -406px}#loco.wrap .region-bq{background-position:0 -418px}#loco.wrap .region-br{background-position:0 -430px}#loco.wrap .region-bs{background-position:0 -442px}#loco.wrap .region-bt{background-position:0 -454px}#loco.wrap .region-bv{background-position:0 -466px}#loco.wrap .region-bw{background-position:0 -478px}#loco.wrap .region-by{background-position:0 -490px}#loco.wrap .region-bz{background-position:0 -502px}#loco.wrap .region-ca{background-position:0 -514px}#loco.wrap .region-cc{background-position:0 -526px}#loco.wrap .region-cd{background-position:0 -538px}#loco.wrap .region-cf{background-position:0 -550px}#loco.wrap .region-cg{background-position:0 -562px}#loco.wrap .region-ch{background-position:0 -574px}#loco.wrap .region-ci{background-position:0 -586px}#loco.wrap .region-ck{background-position:0 -598px}#loco.wrap .region-cl{background-position:0 -610px}#loco.wrap .region-cm{background-position:0 -622px}#loco.wrap .region-cn{background-position:0 -634px}#loco.wrap .region-co{background-position:0 -646px}#loco.wrap .region-cr{background-position:0 -658px}#loco.wrap .region-cs{background-position:0 -670px}#loco.wrap .region-cu{background-position:0 -682px}#loco.wrap .region-cv{background-position:0 -694px}#loco.wrap .region-cw{background-position:0 -706px}#loco.wrap .region-cx{background-position:0 -723px}#loco.wrap .region-cy{background-position:0 -735px}#loco.wrap .region-cz{background-position:0 -747px}#loco.wrap .region-de{background-position:0 -759px}#loco.wrap .region-dj{background-position:0 -771px}#loco.wrap .region-dk{background-position:0 -783px}#loco.wrap .region-dm{background-position:0 -795px}#loco.wrap .region-do{background-position:0 -807px}#loco.wrap .region-dz{background-position:0 -819px}#loco.wrap .region-ec{background-position:0 -831px}#loco.wrap .region-ee{background-position:0 -843px}#loco.wrap .region-eg{background-position:0 -855px}#loco.wrap .region-eh{background-position:0 -867px}#loco.wrap .region-er{background-position:0 -879px}#loco.wrap .region-es{background-position:0 -891px}#loco.wrap .region-et{background-position:0 -903px}#loco.wrap .region-fi{background-position:0 -915px}#loco.wrap .region-fj{background-position:0 -927px}#loco.wrap .region-fk{background-position:0 -939px}#loco.wrap .region-fm{background-position:0 -951px}#loco.wrap .region-fo{background-position:0 -963px}#loco.wrap .region-fr{background-position:0 -975px}#loco.wrap .region-ga{background-position:0 -987px}#loco.wrap .region-gb{background-position:0 -999px}#loco.wrap .region-gd{background-position:0 -1011px}#loco.wrap .region-ge{background-position:0 -1023px}#loco.wrap .region-gf{background-position:0 -1035px}#loco.wrap .region-gg{background-position:0 -1047px}#loco.wrap .region-gh{background-position:0 -1064px}#loco.wrap .region-gi{background-position:0 -1076px}#loco.wrap .region-gl{background-position:0 -1088px}#loco.wrap .region-gm{background-position:0 -1100px}#loco.wrap .region-gn{background-position:0 -1112px}#loco.wrap .region-gp{background-position:0 -1124px}#loco.wrap .region-gq{background-position:0 -1136px}#loco.wrap .region-gr{background-position:0 -1148px}#loco.wrap .region-gs{background-position:0 -1160px}#loco.wrap .region-gt{background-position:0 -1172px}#loco.wrap .region-gu{background-position:0 -1184px}#loco.wrap .region-gw{background-position:0 -1196px}#loco.wrap .region-gy{background-position:0 -1208px}#loco.wrap .region-hk{background-position:0 -1220px}#loco.wrap .region-hm{background-position:0 -1232px}#loco.wrap .region-hn{background-position:0 -1244px}#loco.wrap .region-hr{background-position:0 -1256px}#loco.wrap .region-ht{background-position:0 -1268px}#loco.wrap .region-hu{background-position:0 -1280px}#loco.wrap .region-id{background-position:0 -1292px}#loco.wrap .region-ie{background-position:0 -1304px}#loco.wrap .region-il{background-position:0 -1316px}#loco.wrap .region-im{background-position:0 -1328px}#loco.wrap .region-in{background-position:0 -1345px}#loco.wrap .region-io{background-position:0 -1357px}#loco.wrap .region-iq{background-position:0 -1369px}#loco.wrap .region-ir{background-position:0 -1381px}#loco.wrap .region-is{background-position:0 -1393px}#loco.wrap .region-it{background-position:0 -1405px}#loco.wrap .region-je{background-position:0 -1417px}#loco.wrap .region-jm{background-position:0 -1434px}#loco.wrap .region-jo{background-position:0 -1446px}#loco.wrap .region-jp{background-position:0 -1458px}#loco.wrap .region-ke{background-position:0 -1470px}#loco.wrap .region-kg{background-position:0 -1482px}#loco.wrap .region-kh{background-position:0 -1494px}#loco.wrap .region-ki{background-position:0 -1506px}#loco.wrap .region-km{background-position:0 -1518px}#loco.wrap .region-kn{background-position:0 -1530px}#loco.wrap .region-kp{background-position:0 -1542px}#loco.wrap .region-kr{background-position:0 -1554px}#loco.wrap .region-kw{background-position:0 -1566px}#loco.wrap .region-ky{background-position:0 -1578px}#loco.wrap .region-kz{background-position:0 -1590px}#loco.wrap .region-la{background-position:0 -1602px}#loco.wrap .region-lb{background-position:0 -1614px}#loco.wrap .region-lc{background-position:0 -1626px}#loco.wrap .region-li{background-position:0 -1638px}#loco.wrap .region-lk{background-position:0 -1650px}#loco.wrap .region-lr{background-position:0 -1662px}#loco.wrap .region-ls{background-position:0 -1674px}#loco.wrap .region-lt{background-position:0 -1686px}#loco.wrap .region-lu{background-position:0 -1698px}#loco.wrap .region-lv{background-position:0 -1710px}#loco.wrap .region-ly{background-position:0 -1722px}#loco.wrap .region-ma{background-position:0 -1734px}#loco.wrap .region-mc{background-position:0 -1746px}#loco.wrap .region-md{background-position:0 -1758px}#loco.wrap .region-me{background-position:0 -1770px}#loco.wrap .region-mf{background-position:0 -1783px}#loco.wrap .region-mg{background-position:0 -1800px}#loco.wrap .region-mh{background-position:0 -1812px}#loco.wrap .region-mk{background-position:0 -1824px}#loco.wrap .region-ml{background-position:0 -1836px}#loco.wrap .region-mm{background-position:0 -1848px}#loco.wrap .region-mn{background-position:0 -1860px}#loco.wrap .region-mo{background-position:0 -1872px}#loco.wrap .region-mp{background-position:0 -1884px}#loco.wrap .region-mq{background-position:0 -1896px}#loco.wrap .region-mr{background-position:0 -1908px}#loco.wrap .region-ms{background-position:0 -1920px}#loco.wrap .region-mt{background-position:0 -1932px}#loco.wrap .region-mu{background-position:0 -1944px}#loco.wrap .region-mv{background-position:0 -1956px}#loco.wrap .region-mw{background-position:0 -1968px}#loco.wrap .region-mx{background-position:0 -1980px}#loco.wrap .region-my{background-position:0 -1992px}#loco.wrap .region-mz{background-position:0 -2004px}#loco.wrap .region-na{background-position:0 -2016px}#loco.wrap .region-nc{background-position:0 -2028px}#loco.wrap .region-ne{background-position:0 -2040px}#loco.wrap .region-nf{background-position:0 -2052px}#loco.wrap .region-ng{background-position:0 -2064px}#loco.wrap .region-ni{background-position:0 -2076px}#loco.wrap .region-nl{background-position:0 -2088px}#loco.wrap .region-no{background-position:0 -2100px}#loco.wrap .region-np{background-position:0 -2112px}#loco.wrap .region-nr{background-position:0 -2124px}#loco.wrap .region-nu{background-position:0 -2136px}#loco.wrap .region-nz{background-position:0 -2148px}#loco.wrap .region-om{background-position:0 -2160px}#loco.wrap .region-pa{background-position:0 -2172px}#loco.wrap .region-pe{background-position:0 -2184px}#loco.wrap .region-pf{background-position:0 -2196px}#loco.wrap .region-pg{background-position:0 -2208px}#loco.wrap .region-ph{background-position:0 -2220px}#loco.wrap .region-pk{background-position:0 -2232px}#loco.wrap .region-pl{background-position:0 -2244px}#loco.wrap .region-pm{background-position:0 -2256px}#loco.wrap .region-pn{background-position:0 -2268px}#loco.wrap .region-pr{background-position:0 -2280px}#loco.wrap .region-ps{background-position:0 -2292px}#loco.wrap .region-pt{background-position:0 -2304px}#loco.wrap .region-pw{background-position:0 -2316px}#loco.wrap .region-py{background-position:0 -2328px}#loco.wrap .region-qa{background-position:0 -2340px}#loco.wrap .region-re{background-position:0 -2352px}#loco.wrap .region-ro{background-position:0 -2364px}#loco.wrap .region-rs{background-position:0 -2376px}#loco.wrap .region-ru{background-position:0 -2388px}#loco.wrap .region-rw{background-position:0 -2400px}#loco.wrap .region-sa{background-position:0 -2412px}#loco.wrap .region-sb{background-position:0 -2424px}#loco.wrap .region-sc{background-position:0 -2436px}#loco.wrap .region-sd{background-position:0 -2448px}#loco.wrap .region-se{background-position:0 -2460px}#loco.wrap .region-sg{background-position:0 -2472px}#loco.wrap .region-sh{background-position:0 -2484px}#loco.wrap .region-si{background-position:0 -2496px}#loco.wrap .region-sj{background-position:0 -2508px}#loco.wrap .region-sk{background-position:0 -2520px}#loco.wrap .region-sl{background-position:0 -2532px}#loco.wrap .region-sm{background-position:0 -2544px}#loco.wrap .region-sn{background-position:0 -2556px}#loco.wrap .region-so{background-position:0 -2568px}#loco.wrap .region-sr{background-position:0 -2580px}#loco.wrap .region-ss{background-position:0 -2592px}#loco.wrap .region-st{background-position:0 -2609px}#loco.wrap .region-sv{background-position:0 -2621px}#loco.wrap .region-sx{background-position:0 -2633px}#loco.wrap .region-sy{background-position:0 -2650px}#loco.wrap .region-sz{background-position:0 -2662px}#loco.wrap .region-tc{background-position:0 -2674px}#loco.wrap .region-td{background-position:0 -2686px}#loco.wrap .region-tf{background-position:0 -2698px}#loco.wrap .region-tg{background-position:0 -2710px}#loco.wrap .region-th{background-position:0 -2722px}#loco.wrap .region-tj{background-position:0 -2734px}#loco.wrap .region-tk{background-position:0 -2746px}#loco.wrap .region-tl{background-position:0 -2758px}#loco.wrap .region-tm{background-position:0 -2770px}#loco.wrap .region-tn{background-position:0 -2782px}#loco.wrap .region-to{background-position:0 -2794px}#loco.wrap .region-tr{background-position:0 -2806px}#loco.wrap .region-tt{background-position:0 -2818px}#loco.wrap .region-tv{background-position:0 -2830px}#loco.wrap .region-tw{background-position:0 -2842px}#loco.wrap .region-tz{background-position:0 -2854px}#loco.wrap .region-ua{background-position:0 -2866px}#loco.wrap .region-ug{background-position:0 -2878px}#loco.wrap .region-um{background-position:0 -2890px}#loco.wrap .region-us{background-position:0 -2902px}#loco.wrap .region-uy{background-position:0 -2914px}#loco.wrap .region-uz{background-position:0 -2926px}#loco.wrap .region-va{background-position:0 -2938px}#loco.wrap .region-vc{background-position:0 -2950px}#loco.wrap .region-ve{background-position:0 -2962px}#loco.wrap .region-vg{background-position:0 -2974px}#loco.wrap .region-vi{background-position:0 -2986px}#loco.wrap .region-vn{background-position:0 -2998px}#loco.wrap .region-vu{background-position:0 -3010px}#loco.wrap .region-wf{background-position:0 -3022px}#loco.wrap .region-ws{background-position:0 -3034px}#loco.wrap .region-ye{background-position:0 -3046px}#loco.wrap .region-yt{background-position:0 -3058px}#loco.wrap .region-za{background-position:0 -3070px}#loco.wrap .region-zm{background-position:0 -3082px}#loco.wrap .region-zw{background-position:0 -3094px}#loco.wrap .variant-scotland,#loco.wrap .region-gb.lang-gd{background-position:0 -3106px}#loco.wrap .variant-wales,#loco.wrap .region-gb.lang-cy{background-position:0 -3118px}#loco.wrap .x-eu{background-position:0 -3130px}#loco.wrap span.lang code{display:none}#loco.wrap .icon-language:before{content:"\f326"}#loco.wrap .icon-proj:before{content:"\e900"}#loco.wrap .icon-plural:before{content:"\73"}#loco.wrap .icon-max:before{content:"\e901"}#loco.wrap .icon-min:before{content:"\e902"}#loco.wrap .icon-sort:before{content:"\e903"}#loco.wrap .icon-checkbox-checked:before,#loco.wrap .selector.multi li.checked .icon-checkbox:before{content:"\2611"}#loco.wrap .icon-checkbox-unchecked:before{content:"\2610"}#loco.wrap .icon-checkbox-partial:before{content:"\2609"}#loco.wrap .icon-radio-checked:before{content:"\26ab"}#loco.wrap .icon-radio-unchecked:before{content:"\26aa"}#loco.wrap .icon-ext:before{content:"\2b08"}#loco.wrap .icon-star:before{content:"\e612"}#loco.wrap .icon-user:before{content:"\e620"}#loco.wrap .icon-ok:before,#loco.wrap .notice-success>.has-icon:before,#loco.wrap .notice-success p>strong.has-icon:before{content:"\2713"}#loco.wrap .icon-remove:before{content:"\d7"}#loco.wrap .icon-cog:before{content:"\e61b"}#loco.wrap .icon-trash:before{content:"\e60f"}#loco.wrap .icon-time:before{content:"\e62d"}#loco.wrap .icon-download:before{content:"\e608"}#loco.wrap .icon-revert:before{content:"\e635"}#loco.wrap .icon-sync:before{content:"\e634"}#loco.wrap .icon-lock:before,#loco.wrap .selector.disabled:after,#loco.wrap .notice-locked>.has-icon:before,#loco.wrap .notice-locked p>strong.has-icon:before{content:"\e604"}#loco.wrap .icon-flag:before{content:"\e60e"}#loco.wrap .icon-tag:before{content:"\e622"}#loco.wrap .icon-tags:before{content:"\e623"}#loco.wrap .icon-print:before{content:"\e62a"}#loco.wrap .icon-camera:before{content:"\e629"}#loco.wrap .icon-pencil:before{content:"\e61e"}#loco.wrap .icon-add:before{content:"\e60c"}#loco.wrap .icon-del:before{content:"\e60d"}#loco.wrap .icon-clear:before,#loco.wrap a.icon.clear:before{content:"\e615"}#loco.wrap .icon-ok-sign:before{content:"\2714"}#loco.wrap .icon-help:before{content:"\3f"}#loco.wrap .icon-info:before,#loco.wrap .notice-info>.has-icon:before,#loco.wrap .notice-info p>strong.has-icon:before{content:"\2139"}#loco.wrap .icon-cancel:before{content:"\e605"}#loco.wrap .icon-warn:before,#loco.wrap .notice-warning>.has-icon:before,#loco.wrap .notice-warning p>strong.has-icon:before,#loco.wrap .notice-error>.has-icon:before,#loco.wrap .notice-error p>strong.has-icon:before{content:"\e62e"}#loco.wrap .icon-comment:before{content:"\e613"}#loco.wrap .icon-bar-chart:before{content:"\e624"}#loco.wrap .icon-key:before{content:"\e606"}#loco.wrap .icon-cogs:before{content:"\e61c"}#loco.wrap .icon-comments:before{content:"\e614"}#loco.wrap .icon-signout:before{content:"\e61a"}#loco.wrap .icon-signin:before{content:"\e619"}#loco.wrap .icon-upload:before{content:"\e609"}#loco.wrap .icon-twitter:before{content:"\1f426"}#loco.wrap .icon-facebook:before{content:"\e630"}#loco.wrap .icon-github:before{content:"\e633"}#loco.wrap .icon-feed:before{content:"\e628"}#loco.wrap .icon-globe:before{content:"\e61d"}#loco.wrap .icon-wrench:before,#loco.wrap .notice-debug>.has-icon:before,#loco.wrap .notice-debug p>strong.has-icon:before{content:"\e626"}#loco.wrap .icon-group:before{content:"\e61f"}#loco.wrap .icon-cloud:before{content:"\e607"}#loco.wrap .icon-copy:before{content:"\e62b"}#loco.wrap .icon-save:before{content:"\e610"}#loco.wrap .icon-menu:before{content:"\e600"}#loco.wrap .icon-table:before{content:"\e627"}#loco.wrap .icon-caret-down:before,#loco.wrap .selector .handle:after{content:"\e602"}#loco.wrap .icon-caret-up:before,#loco.wrap .selector.active .handle:after{content:"\e601"}#loco.wrap .icon-caret-right:before{content:"\e62c"}#loco.wrap .icon-mail:before{content:"\e603"}#loco.wrap .icon-cloud-upload:before{content:"\e617"}#loco.wrap .icon-file:before{content:"\e611"}#loco.wrap .icon-circle-white:before{content:"\26ac"}#loco.wrap .icon-circle-black:before{content:"\25cf"}#loco.wrap .icon-eraser:before{content:"\e636"}#loco.wrap .icon-unlock:before{content:"\e616"}#loco.wrap .icon-apple:before{content:"\e60b"}#loco.wrap .icon-android:before{content:"\e60a"}#loco.wrap .icon-back:before{content:"\2b05"}#loco.wrap .icon-next:before{content:"\2794"}#loco.wrap .icon-arrow-up:before{content:"\f062"}#loco.wrap .icon-ccard:before{content:"\f09d"}#loco.wrap .icon-pro:before{content:"\26a1"}#loco.wrap .icon-hellip:before{content:"\2026"}#loco.wrap .icon-vellip:before{content:"\205e"}#loco.wrap .icon-collapse:before{content:"\f147"}#loco.wrap .icon-expand:before{content:"\f196"}#loco.wrap .icon-wordpress:before{content:"\f19a"}#loco.wrap .icon-database:before{content:"\f1c0"}#loco.wrap .icon,#loco.wrap .has-icon:before,#loco.wrap .has-dashicon:before{speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#loco.wrap .icon,#loco.wrap .has-icon:before{font-family:'loco'}#loco.wrap .has-dashicon:before{font-family:'dashicons';font-size:1.4em}#loco.wrap .has-icon:before,#loco.wrap .has-dashicon:before,#loco.wrap .has-icon>span{display:inline-block;vertical-align:middle}#loco.wrap h1 ul,#loco.wrap h1 li{margin:0;padding:0}#loco.wrap h1 li{display:inline-block}#loco.wrap h1 li:after{content:"/";color:#999;text-shadow:none;display:inline-block}#loco.wrap h1 li a{text-decoration:none}#loco.wrap h1 li:last-child:after{content:""}#loco.wrap h1 li:last-child a{color:inherit;pointer-events:none;cursor:auto}#loco.wrap h2 span{color:#999;font-weight:normal}#loco.wrap h3 .loco-meta{font-size:14px;font-weight:normal}#loco.wrap .wp-list-table td:first-child .icon{width:16px;display:inline-block;text-align:center}#loco.wrap .wp-list-table td{white-space:nowrap}#loco.wrap .wp-list-table th.loco-sort{cursor:pointer}#loco.wrap .wp-list-table th.loco-sort:hover{color:#000}#loco.wrap .wp-list-table th.loco-sort.loco-asc:after,#loco.wrap .wp-list-table th.loco-sort.loco-desc:after{padding:0 0 0 4px;color:#999}#loco.wrap .wp-list-table th.loco-sort.loco-desc:after{content:"\e602"}#loco.wrap .wp-list-table th.loco-sort.loco-asc:after{content:"\e601"}#loco.wrap nav.above-list-table{margin-bottom:1em}#loco.wrap nav.above-list-table a{display:inline-block;margin-right:1em}#loco.wrap .wp-core-ui button.inverted,#loco.wrap .wp-core-ui button.inverted:hover{background:-moz-linear-gradient(top, #ccc 0%, #e0e0e0 5%, #fefefe 100%);background:-webkit-linear-gradient(top, #ccc 0%, #e0e0e0 5%, #fefefe 100%);background:linear-gradient(to bottom, #ccc 0%, #e0e0e0 5%, #fefefe 100%);-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;border-color:#bbb}#loco.wrap .loco-clearable{display:inline-block;vertical-align:middle;position:relative}#loco.wrap .loco-clearable a.clear,#loco.wrap .auto-comp-wrap a.clear{top:0;right:0;outline:none;padding:5px 5px;position:absolute;font-size:1em;line-height:normal;text-decoration:none}#loco.wrap .loco-clearable a.clear:before,#loco.wrap .auto-comp-wrap a.clear:before{vertical-align:middle;padding:0;color:#999}#loco.wrap .loco-clearable a.clear:hover:before,#loco.wrap .auto-comp-wrap a.clear:hover:before{color:#333}#loco.wrap .loco-clearable a.clear span,#loco.wrap .auto-comp-wrap a.clear span{display:none}#loco.wrap .loco-clearable ::-ms-clear,#loco.wrap .auto-comp-wrap ::-ms-clear{display:none}#loco.wrap div.progress{color:#000}#loco.wrap div.progress *{height:100%;overflow:hidden;white-space:nowrap}#loco.wrap div.progress .t{background-color:#ddd;border:1px solid #ccc}#loco.wrap div.progress .t .bar{float:left;clear:none;background-color:#3db63d}#loco.wrap div.progress .t .bar.f{background-color:#bd2c00}#loco.wrap div.progress .l{display:block}#loco.wrap td div.progress .t{border:none}#loco.wrap td div.progress .l{display:none}#loco.wrap code.path{color:#333;margin:0;padding:0;display:inline;background:transparent}#loco.wrap .notice,#loco.wrap .panel{background:#fff;position:relative;margin:1em 0;padding:1px 12px}#loco.wrap .notice-generic{border-color:#ddd}#loco.wrap .notice-success>.has-icon,#loco.wrap .notice-success p>strong.has-icon{color:#000}#loco.wrap .notice-warning{border-color:#FFA500}#loco.wrap .notice-error{border-color:#dc3232}#loco.wrap .notice-debug{border-color:#00a0d2}#loco.wrap .notice-danger{border-color:#dc3232}#loco.wrap .notice-locked{border-color:#FFA500}#loco.wrap .notice>p>a.button.has-icon:before{width:1.5em}#loco.wrap .notice>p>em{color:#d54e21;font-style:normal}#loco.wrap ul.problems li{font-style:italic}#loco.wrap input.regular-text,#loco.wrap textarea.regular-text{width:25em}#loco.wrap .button{text-decoration:none}#loco.wrap .button-link{padding:0 10px 1px}#loco.wrap .button-danger{background:#ba0000;border-color:#990000 #660000 #660000;-webkit-box-shadow:0 1px 0 #600;-moz-box-shadow:0 1px 0 #600;box-shadow:0 1px 0 #600;color:#fff;text-shadow:0 -1px 1px #660000, 1px 0 1px #660000, 0 1px 1px #660000, -1px 0 1px #660000}#loco.wrap .button-success{background:#00B500;border-color:#090 #2e892e #2e892e;-webkit-box-shadow:0 1px 0 #2e892e;-moz-box-shadow:0 1px 0 #2e892e;box-shadow:0 1px 0 #2e892e;color:#fff;text-shadow:0 -1px 1px #2e892e,1px 0 1px #2e892e,0 1px 1px #2e892e,-1px 0 1px #2e892e}#loco.wrap .button-success:hover{background:#3db63d}#loco.wrap form button.loading.button-large{padding-left:0}#loco.wrap form button.loading.button-large:before{width:16px;height:16px;margin:0 4px;content:" ";font-size:16px;line-height:1;display:inline-block;vertical-align:sub}.js #wpbody-content>.notice{display:none}.js #wpbody-content>.notice.inline{display:block}.js #loco.wrap .jshide{display:none !important}#loco.wrap .invis{visibility:hidden}.form-table tr{vertical-align:top}.form-table tr.compact td{padding-top:0}#loco-fs p{line-height:22px}#loco-fs a.button,#loco-fs button[type="button"]{display:block;float:right;margin-left:4px}.loco-modal.request-filesystem-credentials-dialog{top:15% !important;max-height:85% !important}.loco-modal.request-filesystem-credentials-dialog .ftp-password>label>em:last-child{display:none}.ui-dialog-content>div.loading{height:100%;background:transparent url(../img/spin-modal.gif?v=2.0.0-dev) center center no-repeat}#loco-credit>*{vertical-align:middle}#loco-credit>a{display:inline-block;position:relative;overflow:hidden;background:transparent url(../img/logo-foot.gif?v=2.0.0-dev) 0 0 no-repeat;height:30px;width:100px;text-indent:200px;-webkit-transition-duration:0s;transition-duration:0s}#loco-credit>a:hover{background-position:0 -35px}#footer-upgrade span:before{color:#CCC;content:" | ";display:inline;padding-left:0.5em;padding-right:0.5em}#footer-upgrade span:first-child:before{content:"";display:none}dl.debug dt{font-weight:bold}dl.debug dt,dl.debug dd{white-space:pre}.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(0,115,170,0.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#0073aa}.wrap #loco-editor .is-editable>.wg-content .wg-field:focus{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 0.6em rgba(30,140,190,0.8);-moz-box-shadow:inset 0 0 0.6em rgba(30,140,190,0.8);box-shadow:inset 0 0 0.6em rgba(30,140,190,0.8)}form button.loading.button-primary[disabled]:before{background:transparent url(../img/skins/fresh/spin-primary-button.gif?v=2.0.0-dev) 0 0 no-repeat !important}
|
pub/js/min/admin.js
CHANGED
@@ -86,99 +86,100 @@ d||b:b||""}}d.create=function(b){b||(b=k());var d=m.require("$31","string.js").s
|
|
86 |
h(a).off("mouseenter mouseleave")}}}function b(a,c){a.fadeTo(c,0,function(){a.slideUp(c,function(){a.remove();h(f).triggerHandler("resize")})})}function g(a,c){function e(c){u[g]=null;b(h(a),250);d&&d.die();var f;if(f=c)c.stopPropagation(),c.preventDefault(),f=!1;return f}var d,g;h('<button type="button" class="notice-dismiss" href="#"> </a>').prependTo(a).click(e);h(f).triggerHandler("resize");n();g=u.length;u.push(e);c&&(d=k(a,e,c))}function a(a,c,b){var e=m.require("$15","html.js");a=h('<div class="notice notice-'+
|
87 |
a+'" loco-notice inline></div>').prependTo(h("#loco-notices"));var d=h(e.el("p"));b=h(e.el("span")).text(b);c=h(e.el("strong","has-icon")).text(c+": ");d.append(c).append(b).appendTo(a);return a}function e(c,b,e,p){c=a(e,b,c).hide().fadeIn(500);h(f).triggerHandler("resize");g(c,p);return d}function c(){h("#loco-notices").find("div.notice").each(function(a,c){g(c,!1)})}var l,u=[],n=Date.now||function(){return(new Date).getTime()};d.error=function(a){return e(a,l("Error"),"error")};d.warning=function(a){return e(a,
|
88 |
l("Warning"),"warning")};d.info=function(a){return e(a,l("Notice"),"info")};d.success=function(a){return e(a,l("OK"),"success",5E3)};d.log=function(){f.console&&console.log&&console.log.apply(console,arguments)};d.debug=function(a,c){f.console&&console.error&&(console.error("Loco Error: "+a),c&&console.debug&&console.debug(c))};d.clear=function(){var a,c,b=u;for(a in b)(c=b[a])&&c();u=[];return d};d.create=a;d.raise=function(a){var c=d;(c[a.type]||c.error).call(c,a.message)};d.init=function(){l=m.require("$4",
|
89 |
-
"l10n.js").create()._;setTimeout(c,1E3);return d};return d}({},s,y));m.register("$3",function(d,f,s){function k(a,c,b,d){function f(c,d,p){var g=m.require("$4","l10n.js").create()._,w=c.responseText,n=h("<pre>"+w+"</pre>").text()
|
90 |
-
b&&b(c,d,p)}d.url=g;d.dataType="json";d.error=f;d.success=function(a,b,e){var d=a&&a.data,g=a&&a.notices,l=g&&g.length;for(!d||a.error?f(e,b,a&&a.error&&a.error.message):c&&c(d,b,e);l--;)q.raise(g[l])};var q=m.require("$2","notices.js").clear();return h.ajax(d)}var b={},g=f.ajaxurl||"/wp-admin/admin-ajax.php",
|
91 |
-
g.addClass("loading");m.require("$16","forms.js").disable(g);return k(a.route.value,function(a,b,e){d();c&&c(a,b,e)},function(a,c,e){d();b&&b(a,c,e)},{type:a.method,data:f})};d.post=function(e,c,d,g){var n;(n=b[e])||(f.console&&console.debug&&console.debug('No nonce for "'+e+'"'),n="");n="action=loco_json&route="+
|
92 |
-
hebr:1,nkoo:1,syrc:1,syrn:1,syrj:1,syre:1,samr:1,mand:1,mend:1,thaa:1,adlm:1,cprt:1,phnx:1,armi:1,prti:1,phli:1,phlp:1,phlv:1,avst:1,mani:1,khar:1,orkh:1,ital:1,lydi:1,ar:1,ary:1,ckb:1,dv:1,fa:1,he:1,nqo:1,ps:1,ur:1,yi:1});m.register("$5",function(d,f,h){function k(){}var b,g,a=m.require("$18","rtl.json");d.init=
|
93 |
-
(g=/[-_+]/,b=/^([a-z]{2,3})(?:-([a-z]{4}))?(?:-([a-z]{2}|[0-9]{3}))?(?:-([0-9][a-z0-9]{3,8}|[a-z0-9]{5,8}))?(?:-([a-z]-[-a-z]+))?$/i);a=String(a).split(g).join("-");if(!b.exec(a))return null;var c=new k;c.lang=RegExp.$1.toLowerCase();if(a=RegExp.$2)c.script=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();
|
94 |
-
a||"-";var c,b=this.lang||"zxx";if(c=this.script)b+=a+c;if(c=this.region)b+=a+c;if(c=this.variant)b+=a+c;if(c=this.extension)b+=a+c;return b};f.getIcon=function(){for(var a=4,c,b,d=["variant","region","script","lang"],g=[];0!==a--;)if(c=d[a],b=this[c])1===a&&3===b.length?g.push("region-m49"):g=g.concat([c,
|
95 |
-
console.error&&console.error(a)}function b(){k("Method not implemented")}function g(){}function a(a){}g.prototype.toString=function(){return"[Undefined]"};a.prototype._validate=function(a){var c,d,f=!0;for(c in this)d=this[c],d===b?(k(a+"."+c+"() must be implemented"),f=!1):d instanceof g&&(k(a+"."+
|
96 |
-
RegExp.$1:"";a.prototype._validate(c||"Object")};return d}({},s,y));m.register("$41",function(d,f,h){var k=f.requestAnimationFrame,b=f.cancelAnimationFrame,g=0;if(!k||!b)for(var a in{ms:1,moz:1,webkit:1,o:1})if(k=f[a+"RequestAnimationFrame"])if(b=f[a+"CancelAnimationFrame"]||
|
97 |
-
var e=Date.now||function(){return(new Date).getTime()};d.loop=function(a,e){function d(){f=k(d,e);a(g++)}var g=0,f;d();return{stop:function(){f&&b(f);f=null}}};return d}({},s,y));m.register("$38",function(d,f,h){function k(c,b,e,d){if(a){var g=e;e=function(a){if((a.MSPOINTER_TYPE_TOUCH||
|
98 |
-
e=a?"MSPointerDown":"touchstart",c=a?"MSPointerMove":"touchmove",l=a?"MSPointerUp":"touchend";d.ok=function(a){null==g&&(g="function"===typeof h.body.addEventListener);g&&a&&a(d);return g};d.ms=function(){return a};d.dragger=function(a,d){function g(c){a.addEventListener(c,f[c],!1)}
|
99 |
-
function(b,e){e.type=c;d(a,e,h)});return b(a)};g(e);var h={kill:function(){p(e);p(c);p(l);a=h=d=null}};return h};d.swiper=function(d,g,f){function p(a){d.addEventListener(a,z[a],!1)}function h(a){d.removeEventListener(a,z[a],!1)}function w(){E&&E.stop();E=null}var E,k,v,z={},
|
100 |
-
-1:1:0)});v=null;return!0};z[c]=function(a){var c,e;null==v||u(a,function(a,b){c=C[a]-b.clientX;e=H[a]-b.clientY});if(e&&Math.abs(e)>Math.abs(c))return k=!0;c&&(k=!0,d.scrollLeft=Math.max(0,v+c));return b(a)};if(!a||f)p(e),p(c),p(l),a&&(d.className+=" mstouch");return{kill:function(){h(e);
|
101 |
-
"none")},scroll:function(a,c,b){w();var e=d.scrollLeft,g=a>e?1:-1,f=Math[1===g?"min":"max"],p=Math.round(16*c*g);return E=m.require("$41","fps.js").loop(function(c){c&&(e=Math.max(0,f(a,e+p)),d.scrollLeft=e,a===e&&(w(),b&&b(e)))},d)}}};d.start=function(a,c){return k(a,e,
|
102 |
-
[];++e<d.length;)b(e,d[e])},n=Date.now||function(){return(new Date).getTime()};return d}({},s,y));m.register("$42",function(d,f,s){d.init=function(d,b){function g(c){if(a!==c){q.text(String(c));var d=b===c,g=d||c<b;changedState=d?2:g?1:3;if(changedState!==e){var h=r;
|
103 |
-
q=h(c.el("span","count")),r=f.attr("class")||"";h(c.el("div","counter")).append(q).append(n).append(u).appendTo(f);g(d.val().length);c=u=n=null};return d}({},s,y));m.register("$39",function(d,f,s){function k(a){function b(){var e=a.value;e!==d&&(d=e,c.trigger("changing",
|
104 |
-
fire:function(){d=null;b()}}}function b(a){this.e=a}var g;d.init=function(a){var e=new b(a);a.disabled?e.disable():e.enable();(a=e.attr("lang"))&&e.locale(a);(a=e.attr("maxlength"))&&e.max(Number(a));return e};d.create=
|
105 |
-
|
106 |
-
a.
|
107 |
-
TextAreaPrototype.
|
108 |
-
|
109 |
-
c.length}function n(a){this.live=a;this.rows=[]}d.create=function(a){return new l(a)};var q=l.prototype;q.init=function(d){var f=this.w,p=f.id,l=f.splity(p+"-thead",p+"-tbody"),w=l[0],l=l[1],n=[],q=[];w.css.push("wg-thead");
|
110 |
-
this.cols=m;this.root=d;w.redraw=g(this);w=l.fixed=H[0].bodyY()||20;f.lock().resize(w,l);f.css.push("is-table");f.restyle();this.redrawDirty();this.render();h(d).attr("tabindex","-1").on("keydown",c(this)).on("mousedown",a(this)).on("scroll",
|
111 |
-
d.length,z=this.r,l=this._r,q=this.root,u=this.cols;++e<h;)0===e%100&&(c=u.cloneNode(!0),c=new n(c),c.h=2200,c.insert(q),b.push(c)),a=f?g[e]:e,a=d[a],a.page=c,c.rows.push(a);c&&100!==c.size()&&c.sleepH(22);this.pages=b;this.mx=this.mn=null;
|
112 |
-
g=d.length,f=this.pages||[],h=f.length;for(b.redraw.call(e);++a<g;)c[a]=d[a].style.width;if(h){b=this.mx;for(a=this.mn;a<=b;a++)f[a].widths(c);this.redrawDirty()&&this.redraw()}};q.redrawDirty=function(){var a=!1,c=this.root,b=
|
113 |
-
q[c],a+=f.height(),a<n||(null===b&&(b=c),e=c,f.rendered||f.render(d));if(h!==b){if(null!==h&&b>h)for(c=h;c<b;c++){f=q[c];if(!f)throw Error("Shit!");f.rendered&&f.sleep()}this.mn=b}if(l!==e){if(null!==l&&e<l)for(c=l;c>e;c--)f=q[c],
|
114 |
-
b){null==b&&(b=this.r);for(var e,d=this.rows,g=b,f=d.length;b!==(g+=a);)if(0<=g&&f>g){if(e=d[g],e.page)break}else if(c&&f)g=1===a?-1:f,c=!1;else{g=null;break}return g};q.selectNext=function(a,c,b){a=this.next(a,c);null!=a&&this.r!==
|
115 |
-
this;this.deselect(!0);var d=this.w.cells[1];e.rendered||(d.scrollY(e.top()),this.redrawDirty()&&this.redraw());if(!b.rendered)return k("Row not rendered"),this;e=b.cells();h(e).addClass("selected");this.r=a;if(!c){var g=
|
116 |
-
q=u.prototype;q.render=function(a){var c,b=[],e=this._,d=this.d,g=this.length,f=this.i;if(e){for(;0!==g--;)b[g]=c=e.cloneNode(!1),c.textContent=d[g]||"\u00a0",c.$r=f,a[g].appendChild(c);this._=null;this.c=b}else for(b=this.c;0!==
|
117 |
-
this.h,e=b("wg-dead");e.style.height=String(c)+"px";a.appendChild(e);return this.dead=e};q.top=function(){return(this.rendered?this.live:this.dead).offsetTop};q.height=function(){var a=this.h;null==a&&(this.h=a=this.rendered?
|
118 |
-
|
119 |
-
this.rendered?this.live:this.dead,c=this.rows,b=c.length;for(a.parentNode.removeChild(a);0!==b--;)c[b].destroy()};q=null;return d}({},s,y));m.register("$34",function(d,f,s){function k(a,b){var d=a.id,g=d&&r[d],f=g&&g.parent();
|
120 |
-
b){function e(){h(s).off("mousemove",d);t&&(t.done(),t=null);return!0}function d(a){t?t.move(a):e();return!0}if(t)return!0;t=k(c.target,c);if(!t)return!0;h(s).one("mouseup",e).on("mousemove",d);return a(c)}function g(a,c){var b=
|
121 |
-
function c(a,c){c||(c=s.body);for(var b=a.offsetTop||0;(a=a.offsetParent)&&a!==c;)b+=a.offsetTop||0;return b}function l(a,c){var b=h(c).on("editFocus",function(c){b.trigger("wgFocus",[a])}).on("editBlur",function(a){b.trigger("wgBlur")})}
|
122 |
-
g)});h(a).mousedown(b);return c};f=u.prototype;f.fire=function(a,c){var b=h.Event(a);b.cell=this;h(this.el).trigger(b,c);return this};f.each=function(a){for(var c=-1,b=this.cells,e=this.length;++c<e;)a(c,b[c]);return this};
|
123 |
-
arguments)};f.splity=function(){return this._split(2,arguments)};f._split=function(a,c){this.length&&this.clear();for(var b=-1,e,d=c.length,g=1/d,f=0;++b<d;){e=n.el();this.body.appendChild(e);for(var h=e,l=c[b],
|
124 |
-
r[this.id]};f.clear=function(){for(var a=this.el,c=this.lang,b=this.cells,e=this.field,d=this.body,g=this.nav,f=this.length||0;0!==f--;)delete r[b[f].destroy().id];this.cells=[];this.length=0;g&&(a.removeChild(g),
|
125 |
-
this.parent();var d=h(this.el)[this.dir===q?"width":"height"](),g=e[b+1],b=e[b-1];pad=(c.body||c.el.firstChild).offsetTop||0;max=(g?g.pos*d:d)-pad;min=b?b.pos*d:0;c.pos=Math.min(max,Math.max(min,a))/d;this.redraw();
|
126 |
-
0===this.index?a.push("first"):a.push("not-first");this.dir&&(a.push("wg-split"),2===this.dir?a.push("wg-split-y"):a.push("wg-split-x"));this.t&&a.push("has-title");this.nav&&a.push("has-nav");null!=this.field&&
|
127 |
-
"px"}for(var c=this.length,d=1,g=this.nav,f=2===this.dir?"height":"width";0!==c--;)b=this.cells[c],g?e=1:(b.fixed&&(b.pos=b.fixed/h(a)[f]()),e=d-b.pos,d=b.pos),b.el.style[f]=String(100*e)+"%",b.redraw();return this};
|
128 |
-
f.
|
129 |
-
|
130 |
-
var b=["wg-title"];c&&b.push(c);this.t=n.txt(a||"");this.el.insertBefore(n.el("h2",b.join(" ")),this.body).appendChild(this.t);this.redraw();return this};f.title=function(a){var c=this.t;if(c)return c.nodeValue=
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
e,c=this.keys,f=this.ords,h=[];++d<a;)h[d]=[this[d],c[d]];h.sort(function(a,c){return b(a[0],c[0])});for(d=0;d<a;d++)e=h[d],this[d]=e[0],e=e[1],c[d]=e,f[e]=d;return this};
|
136 |
-
c,b){c=h(a.title(c).parentNode);var e=c.find("span").hide();b&&(b=m.require("$5","locale.js").cast(b),a.locale(b),e.length||(e=h("<span></span>").prependTo(c)),e.attr("lang",
|
137 |
-
|
138 |
-
"
|
139 |
-
|
140 |
-
a)
|
141 |
-
v.
|
142 |
-
b.length
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
[
|
151 |
-
|
152 |
-
d=this.
|
153 |
-
|
154 |
-
":"
|
155 |
-
"")];if(b=b.context())d[0]+=" [ "+a(b)+" ]";return d};f.stats=function(){var b=this.po.length,a=0,d=0,c=0;this.po.each(function(b,f){f.translation()?
|
156 |
-
f.
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
function(b){
|
167 |
-
|
168 |
-
[]))[b||0]=!0;return this};f.
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
G.
|
|
86 |
h(a).off("mouseenter mouseleave")}}}function b(a,c){a.fadeTo(c,0,function(){a.slideUp(c,function(){a.remove();h(f).triggerHandler("resize")})})}function g(a,c){function e(c){u[g]=null;b(h(a),250);d&&d.die();var f;if(f=c)c.stopPropagation(),c.preventDefault(),f=!1;return f}var d,g;h('<button type="button" class="notice-dismiss" href="#"> </a>').prependTo(a).click(e);h(f).triggerHandler("resize");n();g=u.length;u.push(e);c&&(d=k(a,e,c))}function a(a,c,b){var e=m.require("$15","html.js");a=h('<div class="notice notice-'+
|
87 |
a+'" loco-notice inline></div>').prependTo(h("#loco-notices"));var d=h(e.el("p"));b=h(e.el("span")).text(b);c=h(e.el("strong","has-icon")).text(c+": ");d.append(c).append(b).appendTo(a);return a}function e(c,b,e,p){c=a(e,b,c).hide().fadeIn(500);h(f).triggerHandler("resize");g(c,p);return d}function c(){h("#loco-notices").find("div.notice").each(function(a,c){g(c,!1)})}var l,u=[],n=Date.now||function(){return(new Date).getTime()};d.error=function(a){return e(a,l("Error"),"error")};d.warning=function(a){return e(a,
|
88 |
l("Warning"),"warning")};d.info=function(a){return e(a,l("Notice"),"info")};d.success=function(a){return e(a,l("OK"),"success",5E3)};d.log=function(){f.console&&console.log&&console.log.apply(console,arguments)};d.debug=function(a,c){f.console&&console.error&&(console.error("Loco Error: "+a),c&&console.debug&&console.debug(c))};d.clear=function(){var a,c,b=u;for(a in b)(c=b[a])&&c();u=[];return d};d.create=a;d.raise=function(a){var c=d;(c[a.type]||c.error).call(c,a.message)};d.init=function(){l=m.require("$4",
|
89 |
+
"l10n.js").create()._;setTimeout(c,1E3);return d};return d}({},s,y));m.register("$3",function(d,f,s){function k(a,c,b,d){function f(c,d,p){var g=m.require("$4","l10n.js").create()._,w=c.responseText,n=h("<pre>"+w+"</pre>").text();n&&(n=n.replace(/(^\s+|\s+$)/g,""));n||(n=w);q.debug("Ajax failure for "+a,{status:c.status,error:d,message:p,output:w});q.log("Provide this text when reporting a problem:\n--8<--\n",n,"\n------");"parsererror"===d?(n=n.split(/[\r\n]/)[0])?(n=n.replace(/ +in +\S+ on line \d+/,
|
90 |
+
""),n=n.replace(/^[()! ]+Fatal error:\s*/,""),q.error(n+".\nCheck console output for debug info")):q.error("Server returned invalid data, check console output"):q.error(p||g("Unknown error"));b&&b(c,d,p)}d.url=g;d.dataType="json";d.error=f;d.success=function(a,b,e){var d=a&&a.data,g=a&&a.notices,l=g&&g.length;for(!d||a.error?f(e,b,a&&a.error&&a.error.message):c&&c(d,b,e);l--;)q.raise(g[l])};var q=m.require("$2","notices.js").clear();return h.ajax(d)}var b={},g=f.ajaxurl||"/wp-admin/admin-ajax.php",
|
91 |
+
a=f.encodeURIComponent;d.init=function(a){b=a.nonces||b;return d};d.submit=function(a,c,b){function d(){g.removeClass("loading");m.require("$16","forms.js").enable(g)}var g=h(a),f=g.serialize();g.addClass("loading");m.require("$16","forms.js").disable(g);return k(a.route.value,function(a,b,e){d();c&&c(a,b,e)},function(a,c,e){d();b&&b(a,c,e)},{type:a.method,data:f})};d.post=function(e,c,d,g){var n;(n=b[e])||(f.console&&console.debug&&console.debug('No nonce for "'+e+'"'),n="");n="action=loco_json&route="+
|
92 |
+
a(e)+"&loco-nonce="+a(n);(c=c?h.param(c):"")&&(n+="&"+c);return k(e,d,g,{type:"post",data:n})};d.setNonce=function(a,c){b[a]=c;return d};return d}({},s,y));m.register("$18",{arab:1,aran:1,hebr:1,nkoo:1,syrc:1,syrn:1,syrj:1,syre:1,samr:1,mand:1,mend:1,thaa:1,adlm:1,cprt:1,phnx:1,armi:1,prti:1,phli:1,phlp:1,phlv:1,avst:1,mani:1,khar:1,orkh:1,ital:1,lydi:1,ar:1,ary:1,ckb:1,dv:1,fa:1,he:1,nqo:1,ps:1,ur:1,yi:1});m.register("$5",function(d,f,h){function k(){}var b,g,a=m.require("$18","rtl.json");d.init=
|
93 |
+
function(){return new k};d.cast=function(a){return a instanceof k?a:"string"===typeof a?d.parse(a):d.clone(a)};d.clone=function(a){var c,b=new k;for(c in a)b[c]=a[c];return b};d.parse=function(a){b||(g=/[-_+]/,b=/^([a-z]{2,3})(?:-([a-z]{4}))?(?:-([a-z]{2}|[0-9]{3}))?(?:-([0-9][a-z0-9]{3,8}|[a-z0-9]{5,8}))?(?:-([a-z]-[-a-z]+))?$/i);a=String(a).split(g).join("-");if(!b.exec(a))return null;var c=new k;c.lang=RegExp.$1.toLowerCase();if(a=RegExp.$2)c.script=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();
|
94 |
+
if(a=RegExp.$3)c.region=a.toUpperCase();if(a=RegExp.$4)c.variant=a.toLowerCase();if(a=RegExp.$5)c.extension=a;return c};f=k.prototype;f.isValid=function(){return!!this.lang};f.toString=function(a){a=a||"-";var c,b=this.lang||"zxx";if(c=this.script)b+=a+c;if(c=this.region)b+=a+c;if(c=this.variant)b+=a+c;if(c=this.extension)b+=a+c;return b};f.getIcon=function(){for(var a=4,c,b,d=["variant","region","script","lang"],g=[];0!==a--;)if(c=d[a],b=this[c])1===a&&3===b.length?g.push("region-m49"):g=g.concat([c,
|
95 |
+
c+"-"+b.toLowerCase()]);return g.join(" ")};f.isRTL=function(){return!!a[String(this.script||this.lang).toLowerCase()]};f=null;return d}({},s,y));m.register("$33",function(d,f,h){function k(a){f.console&&console.error&&console.error(a)}function b(){k("Method not implemented")}function g(){}function a(a){}g.prototype.toString=function(){return"[Undefined]"};a.prototype._validate=function(a){var c,d,f=!0;for(c in this)d=this[c],d===b?(k(a+"."+c+"() must be implemented"),f=!1):d instanceof g&&(k(a+"."+
|
96 |
+
c+" must be defined"),f=!1);return f};d.init=function(e,c){var d,f=new a;if(e)for(d=e.length;0!==d--;)f[e[d]]=b;if(c)for(d=c.length;0!==d--;)f[c[d]]=new g;return f};d.validate=function(a){var c=/function (\w+)\(/.exec(a.toString())?RegExp.$1:"";a.prototype._validate(c||"Object")};return d}({},s,y));m.register("$41",function(d,f,h){var k=f.requestAnimationFrame,b=f.cancelAnimationFrame,g=0;if(!k||!b)for(var a in{ms:1,moz:1,webkit:1,o:1})if(k=f[a+"RequestAnimationFrame"])if(b=f[a+"CancelAnimationFrame"]||
|
97 |
+
f[a+"CancelRequestAnimationFrame"])break;k&&b||(k=function(a){var b=e();timeToCall=Math.max(0,16-(b-g));nextTime=b+timeToCall;timerId=f.setTimeout(function(){a(nextTime)},timeToCall);g=nextTime;return timerId},b=function(a){clearTimeout(a)});var e=Date.now||function(){return(new Date).getTime()};d.loop=function(a,e){function d(){f=k(d,e);a(g++)}var g=0,f;d();return{stop:function(){f&&b(f);f=null}}};return d}({},s,y));m.register("$38",function(d,f,h){function k(c,b,e,d){if(a){var g=e;e=function(a){if((a.MSPOINTER_TYPE_TOUCH||
|
98 |
+
"touch")===a.pointerType)return g(a)}}c.addEventListener(b,e,d);return{unbind:function(){c.removeEventListener(b,e,d)}}}function b(a){a.preventDefault();a.stopPropagation();return!1}var g,a=!!f.navigator.msPointerEnabled,e=a?"MSPointerDown":"touchstart",c=a?"MSPointerMove":"touchmove",l=a?"MSPointerUp":"touchend";d.ok=function(a){null==g&&(g="function"===typeof h.body.addEventListener);g&&a&&a(d);return g};d.ms=function(){return a};d.dragger=function(a,d){function g(c){a.addEventListener(c,f[c],!1)}
|
99 |
+
function p(c){a.removeEventListener(c,f[c],!1)}var f={};f[e]=function(a){u(a,function(c,b){b.type=e;d(a,b,h)});g(c);g(l);return!0};f[l]=function(a){p(c);p(l);u(a,function(c,b){b.type=l;d(a,b,h)});return!0};f[c]=function(a){u(a,function(b,e){e.type=c;d(a,e,h)});return b(a)};g(e);var h={kill:function(){p(e);p(c);p(l);a=h=d=null}};return h};d.swiper=function(d,g,f){function p(a){d.addEventListener(a,z[a],!1)}function h(a){d.removeEventListener(a,z[a],!1)}function w(){E&&E.stop();E=null}var E,k,v,z={},
|
100 |
+
A=[],C=[],H=[];z[e]=function(a){k=!1;w();var c=n();u(a,function(a,b){A[a]=c;C[a]=b.clientX;H[a]=b.clientY});v=d.scrollLeft;return!0};z[l]=function(a){u(a,function(a,c){var b=n()-A[a],e=C[a]-c.clientX,b=Math.abs(e)/b;g(b,e?0>e?-1:1:0)});v=null;return!0};z[c]=function(a){var c,e;null==v||u(a,function(a,b){c=C[a]-b.clientX;e=H[a]-b.clientY});if(e&&Math.abs(e)>Math.abs(c))return k=!0;c&&(k=!0,d.scrollLeft=Math.max(0,v+c));return b(a)};if(!a||f)p(e),p(c),p(l),a&&(d.className+=" mstouch");return{kill:function(){h(e);
|
101 |
+
h(c);h(l);w()},swiped:function(){return k},ms:function(){return a},snap:function(c){a&&!f&&(d.style["-ms-scroll-snap-points-x"]="snapInterval(0px,"+c+"px)",d.style["-ms-scroll-snap-type"]="mandatory",d.style["-ms-scroll-chaining"]="none")},scroll:function(a,c,b){w();var e=d.scrollLeft,g=a>e?1:-1,f=Math[1===g?"min":"max"],p=Math.round(16*c*g);return E=m.require("$41","fps.js").loop(function(c){c&&(e=Math.max(0,f(a,e+p)),d.scrollLeft=e,a===e&&(w(),b&&b(e)))},d)}}};d.start=function(a,c){return k(a,e,
|
102 |
+
c,!1)};d.move=function(a,b){return k(a,c,b,!1)};d.end=function(a,c){return k(a,l,c,!1)};var u=d.each=function(c,b){if(a)(c.MSPOINTER_TYPE_TOUCH||"touch")===c.pointerType&&b(0,c);else for(var e=-1,d=(c.originalEvent||c).changedTouches||[];++e<d.length;)b(e,d[e])},n=Date.now||function(){return(new Date).getTime()};return d}({},s,y));m.register("$42",function(d,f,s){d.init=function(d,b){function g(c){if(a!==c){q.text(String(c));var d=b===c,g=d||c<b;changedState=d?2:g?1:3;if(changedState!==e){var h=r;
|
103 |
+
d&&(h+=" maxed");g||(h+=" invalid");f.attr("class",h);e=changedState}a=c}}var a,e,c=m.require("$15","html.js"),f=h(d.parent()).on("changing",function(a,c){g(c.length)}),u=h(c.el("span","total")).text(String(b)),n=h(c.el("span","separ")).text("/"),q=h(c.el("span","count")),r=f.attr("class")||"";h(c.el("div","counter")).append(q).append(n).append(u).appendTo(f);g(d.val().length);c=u=n=null};return d}({},s,y));m.register("$39",function(d,f,s){function k(a){function b(){var e=a.value;e!==d&&(d=e,c.trigger("changing",
|
104 |
+
[e]))}var c=h(a),d=a.value,f;c.blur(function(){c.off("input paste");b();g=null;f!==d&&c.trigger("changed",[d]);c.trigger("editBlur");return!0}).focus(function(h){g=a;f=d;c.on("input paste",b);c.trigger("editFocus");return!0});return{kill:function(){c.off("input paste blur focus")},fire:function(){d=null;b()}}}function b(a){this.e=a}var g;d.init=function(a){var e=new b(a);a.disabled?e.disable():e.enable();(a=e.attr("lang"))&&e.locale(a);(a=e.attr("maxlength"))&&e.max(Number(a));return e};d.create=
|
105 |
+
function(a,e){var c=s.createElement("textarea"),c=new b(c);e?c.enable():c.disable();return c.attr("wrap","virtual")};TextAreaPrototype=b.prototype;TextAreaPrototype.val=function(a){if(null==a)return this.e.value;this.e.value=a;return this};TextAreaPrototype.fire=function(){this.l&&this.l.fire();return this};TextAreaPrototype.focus=function(){return h(this.e).focus()};TextAreaPrototype.focused=function(){return g&&g===this.el};TextAreaPrototype.parent=function(){return this.e.parentNode};TextAreaPrototype.attr=
|
106 |
+
function(a,b){var c=this.e;if(1===arguments.length)return c.getAttribute(a);null==b?c.removeAttribute(a):c.setAttribute(a,b);return this};TextAreaPrototype.editable=function(){return!!this.l};TextAreaPrototype.enable=function(){var a=this.e;a.removeAttribute("readonly");a.removeAttribute("disabled");this.listen();return this};TextAreaPrototype.disable=function(){this.e.setAttribute("disabled",!0);this.unlisten();return this};TextAreaPrototype.listen=function(){var a=this.l;a&&a.kill();this.l=k(this.e);
|
107 |
+
return this};TextAreaPrototype.unlisten=function(){this.l&&this.l.kill();this.l=null;return this};TextAreaPrototype.locale=function(a){if(null==a)return this.loc;this.loc=a=m.require("$5","locale.js").cast(a);this.attr("lang",String(a));return this.rtl(a.isRTL())};TextAreaPrototype.rtl=function(a){this.attr("dir",a?"RTL":"LTR");return this};TextAreaPrototype.max=function(a){if(0===arguments.length)return this.n||0;this.n=a;m.require("$42","counter.js").init(this,a);return this};TextAreaPrototype=
|
108 |
+
null;return d}({},s,y));m.register("$40",function(d,f,m){function k(a){var c=f.console;c&&c.error&&c.error(a)}function b(a){var c=m.createElement("div");a&&c.setAttribute("class",a);return c}function g(a){return function(){a.resize();return this}}function a(a){return function(c){var b=c.target.$r;if(null==b)return!0;a.select(b);c.stopPropagation();c.preventDefault();return!1}}function e(a){return function(){a.redrawDirty()&&a.redraw();return!0}}function c(a){return function(c){var b;b=c.keyCode;if(40===
|
109 |
+
b)b=1;else if(38===b)b=-1;else return!0;if(c.shiftKey||c.ctrlKey||c.metaKey||c.altKey)return!0;a.selectNext(b);c.stopPropagation();c.preventDefault();return!1}}function l(a){this.w=a}function u(a,c,b){var e=m.createElement("div");e.className=b||"";this._=e;this.d=c;this.i=a;this.length=c.length}function n(a){this.live=a;this.rows=[]}d.create=function(a){return new l(a)};var q=l.prototype;q.init=function(d){var f=this.w,p=f.id,l=f.splity(p+"-thead",p+"-tbody"),w=l[0],l=l[1],n=[],q=[];w.css.push("wg-thead");
|
110 |
+
l.css.push("wg-tbody");d.eachCol(function(a,c){n.push(p+"-col"+a);q.push(c)});for(var k=b(),z=-1,A=n.length,m=b("wg-cols"),H=w.splitx.apply(w,n);++z<A;)H[z].header(q[z]),m.appendChild(k.cloneNode(!1));var F=[];d.eachRow(function(a,c,b){F[a]=new u(a,c,b)});d=l.body;this.rows=F;this.cols=m;this.root=d;w.redraw=g(this);w=l.fixed=H[0].bodyY()||20;f.lock().resize(w,l);f.css.push("is-table");f.restyle();this.redrawDirty();this.render();h(d).attr("tabindex","-1").on("keydown",c(this)).on("mousedown",a(this)).on("scroll",
|
111 |
+
e(this));return this};q.clear=function(){for(var a=this.pages||[],c=a.length;0!==c--;)a[c].destroy();this.pages=[];this.sy=this.mx=this.mn=this.vh=null;void 0;return this};q.render=function(){for(var a,c,b=[],e=-1,d=this.rows||[],g=this.f,f=g?!0:!1,h=f?g.length:d.length,z=this.r,l=this._r,q=this.root,u=this.cols;++e<h;)0===e%100&&(c=u.cloneNode(!0),c=new n(c),c.h=2200,c.insert(q),b.push(c)),a=f?g[e]:e,a=d[a],a.page=c,c.rows.push(a);c&&100!==c.size()&&c.sleepH(22);this.pages=b;this.mx=this.mn=null;
|
112 |
+
this.redrawDirty();this.redraw();null==z?null!=l&&(a=d[l])&&a.page&&(delete this._r,this.select(l,!0)):(a=d[z])&&a.page?this.select(z,!0):(this.deselect(),this._r=z);return this};q.resize=function(){var a=-1,c=this.ww||(this.ww=[]),b=this.w,e=b.cells[0],d=e.body.childNodes,g=d.length,f=this.pages||[],h=f.length;for(b.redraw.call(e);++a<g;)c[a]=d[a].style.width;if(h){b=this.mx;for(a=this.mn;a<=b;a++)f[a].widths(c);this.redrawDirty()&&this.redraw()}};q.redrawDirty=function(){var a=!1,c=this.root,b=
|
113 |
+
c.scrollTop,c=c.clientHeight;this.sy!==b&&(a=!0,this.sy=b);this.vh!==c&&(a=!0,this.vh=c);return a};q.redraw=function(){for(var a=0,c=-1,b=null,e=null,d=this.ww,g=this.sy,f=this.vh,h=this.mn,l=this.mx,n=Math.max(0,g-100),g=f+g+100,q=this.pages||[],u=q.length;++c<u&&!(a>g);)f=q[c],a+=f.height(),a<n||(null===b&&(b=c),e=c,f.rendered||f.render(d));if(h!==b){if(null!==h&&b>h)for(c=h;c<b;c++){f=q[c];if(!f)throw Error("Shit!");f.rendered&&f.sleep()}this.mn=b}if(l!==e){if(null!==l&&e<l)for(c=l;c>e;c--)f=q[c],
|
114 |
+
f.rendered&&f.sleep();this.mx=e}};q.selected=function(){return this.r};q.thead=function(){return this.w.cells[0]};q.tbody=function(){return this.w.cells[1]};q.tr=function(a){return(a=this.rows[a])?a.cells():[]};q.td=function(a,c){return this.tr(a)[c]};q.next=function(a,c,b){null==b&&(b=this.r);for(var e,d=this.rows,g=b,f=d.length;b!==(g+=a);)if(0<=g&&f>g){if(e=d[g],e.page)break}else if(c&&f)g=1===a?-1:f,c=!1;else{g=null;break}return g};q.selectNext=function(a,c,b){a=this.next(a,c);null!=a&&this.r!==
|
115 |
+
a&&this.select(a,b);return this};q.deselect=function(a){var c=this.r;null!=c&&(this.r=null,h(this.tr(c)).removeClass("selected"),this.w.fire("wgRowDeselect",[c,a]));return this};q.select=function(a,c){var b=this.rows[a],e=b&&b.page;if(!e)return this.deselect(!1),k("Row is filtered out"),this;this.deselect(!0);var d=this.w.cells[1];e.rendered||(d.scrollY(e.top()),this.redrawDirty()&&this.redraw());if(!b.rendered)return k("Row not rendered"),this;e=b.cells();h(e).addClass("selected");this.r=a;if(!c){var g=
|
116 |
+
d.scrollY();h(this.root).focus();g!==d.scrollY()&&d.scrollY(g)}d.scrollTo(e[0],!0);this.w.fire("wgRowSelect",[a,b.data()]);return this};q.unfilter=function(){this.f&&(this.f=null,this.clear().render());return this};q.filter=function(a){this.f=a;return this.clear().render()};q=null;q=u.prototype;q.render=function(a){var c,b=[],e=this._,d=this.d,g=this.length,f=this.i;if(e){for(;0!==g--;)b[g]=c=e.cloneNode(!1),c.textContent=d[g]||"\u00a0",c.$r=f,a[g].appendChild(c);this._=null;this.c=b}else for(b=this.c;0!==
|
117 |
+
g--;)a[g].appendChild(b[g]);this.rendered=!0;return this};q.cells=function(){return this.c||[]};q.data=function(){return this.d||[]};q.destroy=function(){this.page=null;this.rendered=!1};q=null;q=n.prototype;q.size=function(){return this.rows.length};q.insert=function(a){var c=this.h,e=b("wg-dead");e.style.height=String(c)+"px";a.appendChild(e);return this.dead=e};q.top=function(){return(this.rendered?this.live:this.dead).offsetTop};q.height=function(){var a=this.h;null==a&&(this.h=a=this.rendered?
|
118 |
+
this.live.firstChild.offsetHeight:this.dead.offsetHight);a||k("row has zero height");return a};q.render=function(a){for(var c,b=-1,e=this.rows,d=e.length,g=this.dead,f=this.live,h=f.childNodes;++b<d;)c=e[b],c.rendered||c.render(h);d=a.length;for(b=0;b<d;b++)h[b].style.width=a[b];g.parentNode.replaceChild(f,g);this.rendered=!0;this.h=null;return this};q.sleep=function(){var a=this.height(),c=this.live,b=this.dead;b.style.height=String(a)+"px";c.parentNode.replaceChild(b,c);this.rendered=!1;this.h=
|
119 |
+
a;return this};q.sleepH=function(a){a*=this.rows.length;var c=this.dead;c&&(c.style.height=String(a)+"px");this.rendered||(this.h=a);return this};q.widths=function(a){for(var c=this.live.childNodes,b=a.length;0!==b--;)c[b].style.width=a[b];return this};q.destroy=function(){var a=this.rendered?this.live:this.dead,c=this.rows,b=c.length;for(a.parentNode.removeChild(a);0!==b--;)c[b].destroy()};q=null;return d}({},s,y));m.register("$34",function(d,f,s){function k(a,b){var d=a.id,g=d&&r[d],f=g&&g.parent();
|
120 |
+
if(!g||!f)return null;var h=f.dir===q,d=h?"X":"Y",l="page"+d,h=h?e:c,n=h(f.el),d=b["offset"+d],u=f.el,k=u.className;null==d&&(d=b[l]-h(a));d&&(n+=d);u.className=k+" is-resizing";return{done:function(){u.className=k},move:function(a){f.resize(a[l]-n,g);return!0}}}function b(c,b){function e(){h(s).off("mousemove",d);t&&(t.done(),t=null);return!0}function d(a){t?t.move(a):e();return!0}if(t)return!0;t=k(c.target,c);if(!t)return!0;h(s).one("mouseup",e).on("mousemove",d);return a(c)}function g(a,c){var b=
|
121 |
+
c.type;"touchmove"===b?t&&t.move(c):"touchstart"===b?t=k(a.target,c):"touchend"===b&&t&&(t.done(),t=null)}function a(a){a.stopPropagation();a.preventDefault();return!1}function e(a,c){c||(c=s.body);for(var b=a.offsetLeft||0;(a=a.offsetParent)&&a!==c;)b+=a.offsetLeft||0;return b}function c(a,c){c||(c=s.body);for(var b=a.offsetTop||0;(a=a.offsetParent)&&a!==c;)b+=a.offsetTop||0;return b}function l(a,c){var b=h(c).on("editFocus",function(c){b.trigger("wgFocus",[a])}).on("editBlur",function(a){b.trigger("wgBlur")})}
|
122 |
+
function u(a){var c=this.id=a.id;this.el=a;this.pos=this.index=0;this.css=["wg-cell"];r[c]=this;this.clear()}var n=m.require("$15","html.js"),q=1,r={},t=!1;d.init=function(a){var c=new u(a);c.css.push("wg-root");c.redraw();m.require("$38","touch.js").ok(function(c){c.dragger(a,g)});h(a).mousedown(b);return c};f=u.prototype;f.fire=function(a,c){var b=h.Event(a);b.cell=this;h(this.el).trigger(b,c);return this};f.each=function(a){for(var c=-1,b=this.cells,e=this.length;++c<e;)a(c,b[c]);return this};
|
123 |
+
f.on=function(){return this.$("on",arguments)};f.off=function(){return this.$("off",arguments)};f.find=function(a){return h(this.el).find(a)};f.$=function(a,c){h.fn[a].apply(h(this.el),c);return this};f.parent=function(){return this.pid&&r[this.pid]};f.splitx=function(){return this._split(q,arguments)};f.splity=function(){return this._split(2,arguments)};f._split=function(a,c){this.length&&this.clear();for(var b=-1,e,d=c.length,g=1/d,f=0;++b<d;){e=n.el();this.body.appendChild(e);for(var h=e,l=c[b],
|
124 |
+
q=l,k=1;r[l];)l=q+"-"+ ++k;h.id=l;e=new u(e);e.index=b;e.pid=this.id;e.pos=f;f+=g;this.cells.push(e);this.length++}this.dir=a;this.redraw();return this.cells};f.destroy=function(){this.clear();delete r[this.id];var a=this.el;a.innerHTML="";h(a).off();return this};f.exists=function(){return this===r[this.id]};f.clear=function(){for(var a=this.el,c=this.lang,b=this.cells,e=this.field,d=this.body,g=this.nav,f=this.length||0;0!==f--;)delete r[b[f].destroy().id];this.cells=[];this.length=0;g&&(a.removeChild(g),
|
125 |
+
this.nav=null);d&&(e&&(n.ie()&&h(d).triggerHandler("blur"),e.unlisten(),this.field=null),this.table&&(this.table=null),a.removeChild(d));this.body=a.appendChild(n.el("","wg-body"));c&&this.locale(c);return this};f.resize=function(a,c){if(!c&&(c=this.cells[1],!c))return;var b=c.index,e=this.cells;this.parent();var d=h(this.el)[this.dir===q?"width":"height"](),g=e[b+1],b=e[b-1];pad=(c.body||c.el.firstChild).offsetTop||0;max=(g?g.pos*d:d)-pad;min=b?b.pos*d:0;c.pos=Math.min(max,Math.max(min,a))/d;this.redraw();
|
126 |
+
return this};f.distribute=function(a){for(var c,b=0,e=this.cells,d=a.length;b<d;)c=a[b],e[++b].pos=Math.max(0,Math.min(1,c));this.redraw();return this};f.distribution=function(){for(var a=[],c=0,b=this.cells,e=b.length-1;c<e;)a[c]=b[++c].pos;return a};f.restyle=function(){var a=this.css.concat();0===this.index?a.push("first"):a.push("not-first");this.dir&&(a.push("wg-split"),2===this.dir?a.push("wg-split-y"):a.push("wg-split-x"));this.t&&a.push("has-title");this.nav&&a.push("has-nav");null!=this.field&&
|
127 |
+
(a.push("is-field"),this.field?a.push("is-editable"):a.push("is-readonly"));a=a.join(" ");a!==this._css&&(this._css=this.el.className=a);return this};f.redraw=function(){this.restyle();var a=this.el,c=this.body;if(c){var b=a.clientHeight||0,e=c.offsetTop||0;e<b&&(b-=e);c.style.height=String(b)+"px"}for(var c=this.length,d=1,g=this.nav,f=2===this.dir?"height":"width";0!==c--;)b=this.cells[c],g?e=1:(b.fixed&&(b.pos=b.fixed/h(a)[f]()),e=d-b.pos,d=b.pos),b.el.style[f]=String(100*e)+"%",b.redraw();return this};
|
128 |
+
f.contents=function(a){var c=this.el,b=this.lang,e=this.body;if(null==a)return e.innerHTML;this.length?this.clear():e&&(c.removeChild(e),e=null);e||(e=this.body=c.appendChild(n.el("","wg-content")),b&&this.locale(b));"string"===typeof a?h(e)._html(a):a&&this.append(a);this.redraw();return this};f.textarea=function(a,c){var b=this.field;c?b?a!==b.val()&&this.field.val(a):(b=n.el("textarea","wg-field"),b.value=a,b.name=this.id,this.contents(b),this.field=m.require("$39","basic.js").init(b).attr("wrap",
|
129 |
+
"virtual"),this.restyle(),l(this,b)):(this.contents(n.txt(a)),b&&b.unlisten(),this.field=!1,this.restyle());return this};f.locale=function(a){var c=this.body;a=m.require("$5","locale.js").cast(a);c&&(c.setAttribute("lang",String(a)),c.setAttribute("dir",a.isRTL()?"RTL":"LTR"));this.lang=a;return this};f.editable=function(){var a=this.field;if(!a||!a.editable())for(var c=-1,b=this.length;++c<b&&!(a=this.cells[c].editable()););return a};f.append=function(a){a&&(a.nodeType?n.init(this.body.appendChild(a)):
|
130 |
+
n.init(h(a).appendTo(this.body)));return this};f.prepend=function(a){var c=this.body;if(a.nodeType){var b=c.firstChild;n.init(b?c.insertBefore(a,b):c.appendChild(a))}else n.init(h(a).prependTo(c));return this};f.header=function(a,c){if(0===arguments.length)return this.el.getElementsByTagName("h2")[0];var b=["wg-title"];c&&b.push(c);this.t=n.txt(a||"");this.el.insertBefore(n.el("h2",b.join(" ")),this.body).appendChild(this.t);this.redraw();return this};f.title=function(a){var c=this.t;if(c)return c.nodeValue=
|
131 |
+
a||"",c;this.header(a);return this.t};f.titled=function(){var a=this.t;return a&&a.nodeValue};f.bodyY=function(){return c(this.body,this.el)};f.scrollY=function(a){if(R===a)return this.body.scrollTop;this.body.scrollTop=a};f.tabulate=function(a){return this.table=m.require("$40","wgtable.js").create(this).init(a)};f.lock=function(){this.body.className+=" locked";return this};f.scrollTo=function(a,b){var e,d=this.body;e=d.scrollTop;var g=c(a,d);if(e>g)e=g;else{var f=d.clientHeight,g=g+h(a).outerHeight();
|
132 |
+
if(f+e<g)e=g-f;else return}b?d.scrollTop=e:h(d).stop(!0).animate({scrollTop:e},250)};f.navigize=function(c,b){function e(a){var c=g[a],b=q[a],d=h(c.el).show();b.addClass("active");l=a;u.data("idx",a);c.fire("wgTabSelect",[a]);return d}var d=this,g=d.cells,f=d.nav,l,q=[];f&&d.el.removeChild(f);var f=d.nav=d.el.insertBefore(n.el("nav","wg-tabs"),d.body),u=h(f).on("click",function(c){var b=h(c.target).data("idx");if(null==b)return!0;if(null!=l){var f=q[l];h(g[l].el).hide();f.removeClass("active")}e(b);
|
133 |
+
d.redraw();return a(c)});null==b&&(b=u.data("idx")||0);d.each(function(a,b){q[a]=h('<a href="#'+b.id+'"></a>').data("idx",a).text(c[a]).appendTo(u);b.pos=0;h(b.el).hide()});e(g[b]?b:0);d.lock();d.redraw();return d};f.navigated=function(){var a=this.nav;if(a)return h(a).data("idx")};f=null;return d}({},s,y));m.register("$24",function(d,f,h){function k(b){this.reIndex([]);if(b)for(var d in b)this.add(d,b[d])}d.init=function(b){return new k(b)};f=k.prototype;f.reIndex=function(b){for(var d={},a=-1,e=
|
134 |
+
b.length;++a<e;)d[b[a]]=a;this.keys=b;this.length=a;this.ords=d};f.key=function(b,d){if(null==d)return this.keys[b];var a=this.keys[b],e=this.ords[d];if(d!==a){if(null!=e)throw Error("Clash with item at ["+e+"]");this.keys[b]=d;delete this.ords[a];this.ords[d]=b}return b};f.indexOf=function(b){b=this.ords[b];return null==b?-1:b};f.add=function(b,d){var a=this.ords[b];null==a&&(this.keys[this.length]=b,a=this.ords[b]=this.length++);this[a]=d;return a};f.get=function(b){return this[this.ords[b]]};f.has=
|
135 |
+
function(b){return null!=this.ords[b]};f.del=function(b){this.cut(this.ords[b],1)};f.cut=function(b,d){d=d||1;var a=[].splice.call(this,b,d);this.keys.splice(b,d);this.reIndex(this.keys);return a};f.each=function(b){for(var d=-1,a=this.keys,e=this.length;++d<e;)b(a[d],this[d],d);return this};f.sort=function(b){for(var d=-1,a=this.length,e,c=this.keys,f=this.ords,h=[];++d<a;)h[d]=[this[d],c[d]];h.sort(function(a,c){return b(a[0],c[0])});for(d=0;d<a;d++)e=h[d],this[d]=e[0],e=e[1],c[d]=e,f[e]=d;return this};
|
136 |
+
f=null;return d}({},s,y));m.register("$23",function(d,f,s){function k(a){var c=[];a&&(a.saved()||c.push("po-unsaved"),a.fuzzy()?c.push("po-fuzzy"):a.flagged()&&(c.push("po-flagged"),c.push("po-flag-"+a.flags().join(" po-flag-"))),a.translation()||c.push("po-empty"),a.comment()&&c.push("po-comment"));return c.join(" ")}function b(a,c,b){c=h(a.title(c).parentNode);var e=c.find("span").hide();b&&(b=m.require("$5","locale.js").cast(b),a.locale(b),e.length||(e=h("<span></span>").prependTo(c)),e.attr("lang",
|
137 |
+
b.lang),e.attr("class",b.getIcon()||"lang region region-"+(b.region||"zz").toLowerCase()).show())}function g(){this.dirty=0}var a="poUpdate",e="changing",c="changed",l=0,u=1,n=2,q=3,r=4,t=5,p=/^[ \t\n\r]/,B,w,E=m.require("$15","html.js");d.extend=function(a){return a.prototype=new g};d.localise=function(a){w=a;return d};var y=function(){var a=s.createElement("p");return function(c){a.innerHTML=c;return a.textContent}}(),v=g.prototype=m.require("$33","abstract.js").init(["getListColumns","getListHeadings",
|
138 |
+
"getListEntry"],["editable","t"]);v.init=function(){this.localise();this.editable={source:!0,target:!0};return this};v.localise=function(a){this.t=a||(a=w||m.require("$17","t.js").create());var c=[],b=a._;c[l]=b("Source text")+":";c[q]=b("Translation")+":";c[r]=b("%s translation")+":";c[u]=b("Single")+":";c[n]=b("Plural")+":";c[t]=b("Context")+":";c[6]=b("Comments")+":";this.labels=c;return a};v.setRootCell=function(a){function c(){b.redraw(!0);return!0}var b=m.require("$34","wingrid.js").init(a);
|
139 |
+
h(f).on("resize",c);this.redraw=c;h(a).on("wgFocus wgBlur",function(a,c){B=c});this.destroy=function(){b.destroy();h(f).off("resize",c)};this.rootDiv=a;return b};g.prototype.$=function(){return h(this.rootDiv)};v.on=function(a,c){return h(this.rootDiv).on(a,c)};v.setListCell=function(a){var c=this;c.listCell=a;a.on("wgRowSelect",function(a,b){c.loadMessage(c.po.row(b));return!0}).on("wgRowDeselect",function(a,b,e){e||c.loadNothing();return!0})};v.setSourceCell=function(a){this.sourceCell=a;var c=
|
140 |
+
a.find("p.notes");c.length||(c=h('<p class="notes"></p>').insertAfter(a.header()).hide());this.notesPara=c};v.next=function(a,c,b){for(var e=this.listTable,d=e.selected(),f=d,g,h=this.po;null!=(d=e.next(a,b,d));){if(f===d){d=null;break}if(c&&(g=h.row(d),g.translated(0)))continue;break}null!=d&&e.select(d,!0);return d};v.current=function(a){if(null==a)return this.active;a?this.loadMessage(a):this.unloadActive();return this};v.getTargetEditable=function(){return this.editable.target&&this.targetCell&&
|
141 |
+
this.targetCell.editable()};v.getSourceEditable=function(){return this.editable.source&&this.sourceCell&&this.sourceCell.editable()};v.getContextEditable=function(){return this.editable.context&&this.contextCell&&this.contextCell.editable()};v.getFirstEditable=function(){return this.getTargetEditable()||this.getSourceEditable()||this.getContextEditable()};v.searchable=function(a){a&&(this.dict=a,this.po&&this.rebuildSearch());return this.dict&&!0};v.rebuildSearch=function(){var a=-1,c=this.po.rows,
|
142 |
+
b=c.length,e=this.dict;for(e.clear();++a<b;)e.add(a,c[a].toText());this.lastSearch="";this.lastFound=b};v.filtered=function(){return this.lastSearch||""};v.filter=function(a,c){var b,e=this.listTable,d=this.lastFound,f=this.lastSearch;if(a){if(f===a)return d||0;if(f&&!d&&0===a.indexOf(f))return 0;b=this.dict.find(a)}f=this.lastSearch=a;d=this.lastFound=b?b.length:this.po.length;b?e.filter(b):e.unfilter();c||this.fire("poFilter",[f,d]);return d};v.unsave=function(a,c){var b=!1;if(a=a||self.active){if(b=
|
143 |
+
a.saved(c))this.dirty++,a.unsave(c),this.fire("poUnsaved",[a,c]);this.markUnsaved(a)}return b};v.markUnsaved=function(a){var c=this.po.indexOf(a),c=this.listTable.tr(c),b=c[0].className;changedStyle=b.replace(/(?:^| +)po-[a-z]+/g,"")+" "+k(a);changedStyle!==b&&h(c).attr("class",changedStyle)};v.save=function(a){var c=this.po;if(this.dirty||a)c.each(function(a,c){c.save()}),this.listCell.find("div.po-unsaved").removeClass("po-unsaved"),this.dirty=0,this.fire("poSave");return c};v.fire=function(a,c){var b=
|
144 |
+
this.on;if(b&&b[a]&&(b=b[a].apply(this,c||[]),!1===b))return!1;b=h.Event(a);h(this.rootDiv).trigger(b,c);return!b.isDefaultPrevented()};v.reload=function(){var a=this,c,b=a.listCell,e=a.listTable,d=a.po,f=d&&d.length||0;if(d&&d.row)return a.lastSearch&&(a.lastSearch="",a.lastFound=f,a.fire("poFilter",[a.lastSearch,a.lastFound])),e&&(c=e.thead().distribution()),e=a.listTable=b.tabulate({length:f,getRow:function(c){return a.getListEntry(d.row(c))},getCss:function(c){return a.getListEntry(d.row(c))},
|
145 |
+
eachCol:function(c){for(var b=-1,e=a.getListHeadings(),d=e.length;++b<d;)c(b,e[b])},eachRow:function(c){var b=0;d.each(function(e,d){c(b++,a.getListEntry(d),k(d))})}}),c&&e.thead().distribute(c),a.targetLocale=a.po.locale(),a.fire("poLoad"),!!a.po.length;b&&b.clear().header("Error").contents("Invalid messages list")};v.load=function(a,c){this.po=a;this.dict&&this.rebuildSearch();this.reload()&&(-1!==c?this.listTable.select(c||0):this.active&&this.unloadActive())};v.loadMessage=function(d){function f(){var g,
|
146 |
+
h=w,q=w.id,h=M[l];I&&(P?(P=E.h(P,!0),I.html(P).show(),E.init(I)):I.text("").hide());w.titled()!==h&&b(w,h,k.sourceLocale);O?(g=w.splity(q+"-singular",q+"-plural"),h=g[0],g=g[1],h.header(M[u]).textarea(S,N),g.header(M[n]).textarea(O,N),w.lock()):w.textarea(S,N);N&&w.on(e,function(a,c){O&&a.target.name===q+"-plural"?d.plural(c):(d.source(c),k.updateListCell(d,"source"));k.unsave(d,s)}).on(c,function(c){O&&c.target.name===q+"-plural"||k.po.reIndex(d);k.dict&&k.rebuildSearch();k.fire(a,[d])})}function g(f,
|
147 |
+
h){var l=f.label,l=l&&-1===l.indexOf("Unknown")?U(M[r],l):M[q];v.titled()!==l&&b(v,l,f);if(d.pluralized()){var n=[],u=f.plurals||["One","Other"],p=m.require("$24","collection.js").init();for(d.each(function(a,c,b){if(b||u[a])n.push(u[a]||"Form "+a),p.add("plural-"+a,b)});(l=n.length)<f.nplurals;)n.push(u[l]||"Form "+p.length),p.add("plural-"+l,d.translation(l));children=v.splitx.apply(v,p.keys);v.each(function(a,c){var b=G&&!d.disabled(a);c.textarea(p[a],b)});v.navigize(n,h||null).on("wgTabSelect",
|
148 |
+
function(a,c){var b=G&&a.cell.editable();b&&b.focus();h=c;k.fire("poTab",[c])})}else h=0,G=G&&!d.disabled(0),v.textarea(d.translation(),G);G&&v.on(e,function(a,c){d.translate(c,h);0===h&&k.updateListCell(d,"target");d.fuzzy(h)?k.fuzzy(!1,d,h):k.unsave(d,h)}).on(c,function(c){k.dict&&k.rebuildSearch();k.fire(a,[d])})}function h(){b(y,M[t]);y.textarea(d.context(),!0);R&&y.on(e,function(a,c){d.context(c);k.updateListCell(d,"source");k.unsave(d,s)}).on(c,function(){k.po.reIndex(d);k.dict&&k.rebuildSearch();
|
149 |
+
k.fire(a,[d])})}var k=this,p=d===k.active,s=0,w=k.sourceCell,v=k.targetCell,y=k.contextCell,D=k.commentCell,I=k.notesPara,G=k.editable.target,N=k.editable.source,R=k.editable.context,S=d.source()||"",O=d.plural()||"",P=d.notes(),L=B,Q=p&&L,T=k.targetLocale,U=k.t.s,M=k.labels;p||(k.active=d);w&&w!==Q&&(w.off().clear(),f());y&&y!==Q&&(y.off().clear(),h());v&&T&&v!==Q&&(s=v.navigated()||0,v.off().clear(),g(T,s));if(D&&D!==Q)D.off().clear().textarea(d.comment(),!0).on(e,function(a,c){d.comment(c);k.fire("poComment",
|
150 |
+
[d,c]);k.unsave(d,s)});L&&(L.exists()||(L=L.parent()),(D=L.editable())&&D.focus());p||k.fire("poSelected",[d])};v.unloadActive=function(){var a;(a=this.notesPara)&&a.text("").hide();(a=this.sourceCell)&&a.off().clear();(a=this.contextCell)&&a.off().clear();(a=this.targetCell)&&a.off().clear();(a=this.commentCell)&&a.off();this.active&&(this.fire("poDeselected",[this.active]),this.active=null);return this};v.loadNothing=function(){var a,c=this.t._;this.unloadActive();(a=this.commentCell)&&a.textarea("",
|
151 |
+
!1);(a=this.sourceCell)&&a.textarea("",!1).title(c("Source text not loaded")+":");(a=this.contextCell)&&a.textarea("",!1).title(c("Context not loaded")+":");(a=this.targetCell)&&a.textarea("",!1).title(c("Translation not loaded")+":");this.fire("poSelected",[null])};v.updateListCell=function(a,c){var b=this.getListColumns()[c],d=this.getListEntry(a)[b||0],e=this.po.indexOf(a);this.listTable.td(e,b).textContent=d};v.cellText=function(a){if(-1!==a.indexOf("<")||-1!==a.indexOf("&"))a=y(a);""===a?a="\u00a0":
|
152 |
+
p.test(a)&&(a="\u00a0"+a);return a};v.fuzzy=function(c,b,d){if(!b){b=this.active;if(!b)return null;null==d&&(d=this.targetCell&&this.targetCell.navigated()||0)}var e=b.fuzzy(d);null==c||e==c||c&&!b.translated(d)||!this.fire("poFuzzy",[b,c,d])||(b.fuzzy(d,c),this.fire(a,[b])&&this.unsave(b,d));return e};v.add=function(c,b){var d,e=this.po.get(c,b);e?d=this.po.indexOf(e):(d=this.po.length,e=this.po.add(c,b),this.load(this.po,-1),this.fire("poAdd",[e]),this.fire(a,[e]));this.lastSearch&&this.filter("");
|
153 |
+
this.listTable.select(d);return e};v.del=function(c){if(c=c||this.active){var b=this.lastSearch,d=this.po.del(c);null!=d&&(this.unsave(c),this.fire("poDel",[c]),this.fire(a,[c]),this.reload(),this.dict&&this.rebuildSearch(),this.active&&this.active.equals(c)&&this.unloadActive(),this.po.length&&(b&&this.filter(b),this.active||(d=Math.min(d,this.po.length-1),this.listTable.select(d))))}};v=null;return d}({},s,y));m.register("$10",function(d,f,h){function k(){this.init()._validate();var b=this.t._;
|
154 |
+
this.sourceLocale={lang:"en",label:"English",plurals:[b("Single"),b("Plural")]}}var b=m.require("$23","base.js");d.init=function(b){var a=new k,d=a.t._;b=a.setRootCell(b);var c=b.splity("po-list","po-edit"),f=c[0],h=c[1],c=h.splitx("po-trans","po-comment"),n=c[0],q=c[1].header(d("Comments")+":"),c=n.splity("po-source","po-target"),n=c[0].header(d("Source text")+":"),d=c[1].header(d("Translation")+":");b.distribute([0.34]);h.distribute([0.8]);a.setListCell(f);a.setSourceCell(n);a.targetCell=d;a.commentCell=
|
155 |
+
q;a.editable.source=!1;return a};d.localise=function(f){b.localise(f);return d};f=k.prototype=b.extend(k);f.getListHeadings=function(){return[this.t._("Source text"),this.t._("Translation")]};f.getListColumns=function(){return{source:0,target:1}};f.getListEntry=function(b){if(!b)return["",""];var a=this.cellText,d=[a(b.id||b.source()||""),a(b.translation()||"")];if(b=b.context())d[0]+=" [ "+a(b)+" ]";return d};f.stats=function(){var b=this.po.length,a=0,d=0,c=0;this.po.each(function(b,f){f.translation()?
|
156 |
+
f.fuzzy()?c++:a++:d++});return{t:b,p:String(a?Math.round(100*(a/b)):0)+"%",f:c,u:d}};f.unlock=function(){this._unlocked||(this._unlocked=this.targetLocale,delete this.targetLocale,this.po&&this.po.unlock(),this.editable={source:!0,context:!0,target:!1},this.contextCell=this.targetCell,delete this.targetCell,this.fire("poLock",[!1]),this.active&&this.loadMessage(this.active))};f.lock=function(){var b;this._unlocked&&(b=this.targetLocale=this._unlocked,delete this._unlocked,this.po&&this.po.lock(b),
|
157 |
+
this.editable={source:!1,context:!1,target:!0},this.targetCell=this.contextCell,delete this.contextCell,this.fire("poLock",[!0,b]),this.active&&this.loadMessage(this.active))};f.locked=function(){return!this._unlocked};return d}({},s,y));m.register("$11",function(d,f,m){function k(a){(a||(a=editor.getFirstEditable()))&&a.fire();return a}var b={copy:66,clear:75,save:83,fuzzy:85,next:40,prev:38,enter:13},g={38:!0,40:!0},a={66:function(a,c){var b=c.current(),d;b&&(b.normalize(),c.current(!1).current(b),
|
158 |
+
(d=c.getTargetEditable())&&k(d))},75:function(a,c){var b=c.current(),d;b&&(b.untranslate(),c.current(!1).current(b),(d=c.getTargetEditable())&&k(d))},85:function(a,c){c.fuzzy(!c.fuzzy())},13:function(a,c){c.getFirstEditable()&&c.next(1,!0,!0)},40:function(a,c){var b=a.shiftKey;c.next(1,b,b)},38:function(a,c){var b=a.shiftKey;c.next(-1,b,b)}};d.init=function(d,c){function l(c){if(c.isPropagationStopped()||!c.metaKey&&!c.ctrlKey)return!0;var b=c.which;if(!k[b])return!0;var f=a[b];if(!f)throw Error("No such command");
|
159 |
+
if(c.altKey||c.shiftKey&&!g[b])return!0;f(c,d);c.preventDefault();return!1}var k={};h(c||f).on("keydown",l);return{add:function(c,d){a[b[c]]=d;return this},enable:function(){var a,c;for(c in arguments)a=b[arguments[c]],k[a]=!0;return this},disable:function(){h(c||f).off("keydown",l);d=c=k=null}}};return d}({},s,y));m.register("$25",function(d,f,h){function k(b,d){var a=RegExp("^.{1,"+(b-1)+"}["+d+"]"),e=RegExp("^[^"+d+"]+");return function(c,d){for(var f=c.length,g;f>b;){g=a.exec(c)||e.exec(c);if(null==
|
160 |
+
g)break;g=g[0];d.push(g);g=g.length;f-=g;c=c.substr(g)}0!==f&&d.push(c);return d}}d.create=function(b){function d(a){return n[a]||"\\"+a}var a,e,c=/(?:\r\n|[\r\n\v\f\u2028\u2029])/g,f=/[ \r\n]+/g,h=/[\t\v\f\x07\x08\\\"]/g,n={"\t":"\\t","\v":"\\v","\f":"\\f","\u0007":"\\a","\b":"\\b"};null==b&&(b=79);0!==b&&(a=k(b-3," "),e=k(b-2,"-\u2013 \\.,:;\\?!\\)\\]\\}\\>"));return{pair:function(a,f){if(!f)return a+' ""';f=f.replace(h,d);var l=0;f=f.replace(c,function(){l++;return"\\n\n"});if(!(l||b&&b<f.length+
|
161 |
+
a.length+3))return a+' "'+f+'"';var k=[a+' "'],n=f.split("\n");if(e)for(var m=-1,s=n.length;++m<s;)e(n[m],k);else k=k.concat(n);return k.join('"\n"')+'"'},prefix:function(a,b){var d=a.split(c);return b+d.join("\n"+b)},refs:function(c){c=c.replace(f," ",c);a&&(c=a(c,[]).join("\n#: "));return"#: "+c}}};return d}({},s,y));m.register("$26",function(d,f,h){function k(){}d.extend=function(b){return b.prototype=new k};f=k.prototype=m.require("$33","abstract.js").init(["add","load"]);f.row=function(b){return this.rows[b]};
|
162 |
+
f.lock=function(b){return this.locale(b||{lang:"zxx",label:"Unknown",nplurals:1,pluraleq:"n!=1"})};f.unlock=function(){var b=this.loc;this.loc=null;return b};f.locale=function(b){var d=m.require("$5","locale.js");null==b?b=this.loc:this.loc=b=d.cast(b);return b};f.each=function(b){this.rows.each(b);return this};f.indexOf=function(b){"object"!==typeof b&&(b=this.get(b));if(!b)return-1;null==b.idx&&(b.idx=this.rows.indexOf(b.hash()));return b.idx};f.get=function(b){return this.rows&&this.rows.get(b)};
|
163 |
+
f.del=function(b){b=this.indexOf(b);if(-1!==b){var d=this.rows.cut(b,1);if(d&&d.length)return this.length=this.rows.length,this.rows.each(function(a,b,c){b.idx=c}),b}};f.reIndex=function(b,d){var a=this.indexOf(b),e=b.hash(),c=this.rows.indexOf(e);return c===a?a:-1!==c?(d=(d||0)+1,b.source("Error, duplicate "+String(d)+": "+b.source()),this.reIndex(b,d)):this.rows.key(a,e)};f=null;return d}({},s,y));m.register("$27",function(d,f,h){function k(){this.id=this._id=this.ref=this.cmt=this.xcmt=""}d.extend=
|
164 |
+
function(b){return b.prototype=new k};f=k.prototype;f.flag=function(b,d){var a=this.flg||(this.flg=[]);if(null!=d)a[d]=b;else for(var e=Math.max(a.length,this.src.length,this.msg.length);0!==e--;)a[e]=b;return this};f.flagged=function(b){var d=this.flg||[];if(null!=b)return d[b]||0;for(b=d.length;0!==b--;)if(d[b])return!0;return!1};f.flags=function(){for(var b,d={},a=[],e=this.flg||[],c=e.length;0!==c--;)b=e[c],d[b]||(d[b]=!0,a.push(b));return a};f.flaggedAs=function(b,d){var a=this.flg||[];if(null!=
|
165 |
+
d)return b===a[d]||0;for(var e=a.length;0!==e--;)if(a[e]===b)return!0;return!1};f.fuzzy=function(b,d){var a=this.flaggedAs(4,b);null!=d&&this.flag(d?4:0,b);return a};f.source=function(b,d){if(null==b)return this.src[d||0]||"";this.src[d||0]=b;return this};f.plural=function(b,d){if(null==b)return this.src[d||1]||"";this.src[d||1]=b||"";return this};f.each=function(b){for(var d=-1,a=this.src,e=this.msg,c=Math.max(a.length,e.length);++d<c;)b(d,a[d],e[d]);return this};f.pluralized=function(){return 1<
|
166 |
+
this.src.length||1<this.msg.length};f.translate=function(b,d){this.msg[d||0]=b||"";return this};f.untranslate=function(b){null!=b&&(this.msg[b]="");for(b=0;b<this.msg.length;b++)this.msg[b]="";return this};f.translation=function(b){return this.msg[b||0]||""};f.translated=function(b){if(arguments.length)return!!this.translation(b);for(b=0;b<this.msg.length;b++)if(!this.msg[b])return!1;return!0};f.comment=function(b){if(null==b)return this.cmt;this.cmt=b||"";return this};f.notes=function(b){if(null==
|
167 |
+
b)return this.xcmt;this.xcmt=b||"";return this};f.refs=function(b){if(null==b)return this.ref;this.ref=b||"";return this};f.format=function(b){if(null==b)return this.fmt;this.fmt=b;return this};f.context=function(b){if(null==b)return this.ctx||"";this.ctx=b||"";return this};f.toString=f.toText=function(){return this.src.concat(this.msg,[this.id,this.ctx]).join(" ")};f.weight=function(){var b=0;this.translation()||(b+=2);this.fuzzy()&&(b+=1);return b};f.equals=function(b){return this===b||this.hash()===
|
168 |
+
b.hash()};f.hash=function(){return this.id};f.normalize=function(){for(var b=this.msg.length;0!==b--;)this.msg[b]=this.src[b]||""};f.disabled=function(b){return!!(this.lck||[])[b||0]};f.disable=function(b){(this.lck||(this.lck=[]))[b||0]=!0;return this};f.saved=function(b){var d=this.drt;if(!d)return!0;if(null!=b)return!d[b];for(b=d.length;0!==b--;)if(d[b])return!1;return!0};f.unsave=function(b){(this.drt||(this.drt=[]))[b||0]=!0;return this};f.save=function(b){var d=this.drt;null==b?this.drt=null:
|
169 |
+
d[b]=!1;return this};f=null;return d}({},s,y));m.register("$12",function(d,f,h){function k(a){return{"Project-Id-Version":"PACKAGE VERSION","Report-Msgid-Bugs-To":"","POT-Creation-Date":a||"","PO-Revision-Date":a||"","Last-Translator":"","Language-Team":"",Language:"","Plural-Forms":"","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit"}}function b(a,b){var d=a||"";b&&(d+="\x00"+b);return d}function g(){return m.require("$24","collection.js").init()}
|
170 |
+
function a(a){this.locale(a);this.length=0;this.rows=g();this.head=k(this.now())}function e(a,b){this.src=[a||""];this.msg=[b||""]}d.create=function(c){return new a(c)};f=m.require("$26","messages.js").extend(a);f.now=function(){function a(c,b){for(var d=String(c);d.length<b;)d="0"+d;return d}var b=new Date,d=b.getUTCFullYear(),e=b.getUTCMonth()+1,f=b.getUTCDate(),g=b.getUTCHours(),b=b.getUTCMinutes();return a(d,4)+"-"+a(e,2)+"-"+a(f,2)+" "+a(g,2)+":"+a(b,2)+"+0000"};f.header=function(a,b){var d=
|
171 |
+
this.head||(this.head={});if(null==b)return this.headers()[a]||"";d[a]=b||"";return this};f.headers=function(a){var b,d=this.now(),e=this.head||(this.head=k(d));if(null!=a){for(b in a)e[b]=a[b];return this}var f=this.locale();a={};for(b in e)a[b]=String(e[b]);f?(a.Language=String(f)||"zxx",a["Language-Team"]=f.label||a.Language,a["Plural-Forms"]="nplurals="+(f.nplurals||"2")+"; plural="+(f.pluraleq||"n!=1"),a["PO-Revision-Date"]=d):(a.Language="",a["Plural-Forms"]="nplurals=INTEGER; plural=EXPRESSION",
|
172 |
+
a["POT-Creation-Date"]=d,a["PO-Revision-Date"]="YEAR-MO-DA HO:MI+ZONE");a["X-Generator"]="Loco - https://localise.biz/";return a};f.get=function(a,d){var e=b(a,d);return this.rows.get(e)};f.add=function(a,b){a instanceof e||(a=new e(a));b&&a.context(b);var d=a.hash();if(this.rows.get(d))throw Error("Duplicate message at index "+this.indexOf(a));a.idx=this.rows.add(d,a);this.length=this.rows.length;return a};f.load=function(a){for(var b=-1,d,f,g,h,k,m,s=[],w=[],y=[],D=[];++b<a.length;)d=a[b],null==
|
173 |
+
d.parent?(f=d.source||d.id,g=d.target||"",h=d.context,f||h?(k=new e(f,g),k._id=d._id,h&&k.context(h),d.flag&&k.flag(d.flag,0),d.comment&&k.comment(d.comment),d.notes&&k.notes(d.notes),d.refs&&k.refs(d.refs),null!==d.format&&k.format(d.format),d.message=k,k.translation()?k.fuzzy()?y.push(k):w.push(k):D.push(k)):0===b&&"object"===typeof g&&(this.head=g)):s.push(d);for(b=-1;++b<s.length;)try{d=s[b];f=d.source||d.id;k=a[d.parent]&&a[d.parent].message;if(!k)throw Error("parent missing for plural "+f);
|
174 |
+
m=d.plural;1===m&&k.plural(f);d.flag&&k.flag(d.flag,m);k.translate(d.target||"",m)}catch(v){}return this._add(D,y,w)};f._add=function(a,b,d){d=[a,b,d];for(i=0;3>i;i++)for(b=d[i],a=-1;++a<b.length;)try{this.add(b[a])}catch(e){}return this};f.merge=function(a){var b,d=a.header("POT-Creation-Date"),e=this.rows,f=[],h=[],k=[],m=[],s=[];a=a.rows;this.rows.each(function(b,d){null==a.get(b)&&s.push(d)});a.each(function(a,c){try{(b=e.get(a))?(b.ref=c.ref,b.fmt=c.fmt):(b=c,m.push(b)),b.translation()?b.fuzzy()?
|
175 |
+
h.push(b):k.push(b):f.push(b)}catch(d){}});this.rows=g();this._add(f,h,k);d&&this.header("POT-Creation-Date",d);return{add:m,del:s}};f.toString=function(){var a,b=[],d=[],f=this.headers(),g=!this.loc,h=m.require("$25","format.js").create(void 0);for(a in f)d.push(a+": "+f[a]);d=new e("",d.join("\n"));g&&d.fuzzy(0,!0);b.push(d.toString());b.push("");this.rows.each(function(a,c){a&&(b.push(c.cat(h,g)),b.push(""))});return b.join("\n")};f=m.require("$27","message.js").extend(e);f.hash=function(){return b(this.source(),
|
176 |
+
this.context())};f.source=function(a,b){if(null==a)return this.src[0];this.src[0]=a;null!=b&&this.plural(b);return this};f.toString=function(){return this.cat(m.require("$25","format.js").create(void 0))};f.cat=function(a,b){var d,e=[],f;(f=this.cmt)&&e.push(a.prefix(f,"# "));(f=this.xcmt)&&e.push(a.prefix(f,"#. "));d=this.ref;if(f=this._id)d+=(d?" ":"")+"loco:"+f;d&&/\S/.test(d)&&e.push(a.refs(d));!b&&this.fuzzy()&&e.push("#, fuzzy");(f=this.fmt)?e.push("#, "+f+"-format"):null!=f&&e.push("#, no-c-format");
|
177 |
+
(f=this.ctx)&&e.push(a.pair("msgctxt",f));e.push(a.pair("msgid",this.src[0]));if(null==this.src[1])e.push(a.pair("msgstr",b?"":this.msg[0]));else for(d=-1,e.push(a.pair("msgid_plural",this.src[1]));++d<this.msg.length;)e.push(a.pair("msgstr["+d+"]",b?"":this.msg[d]));return e.join("\n")};f.compare=function(a,b){var d=this.weight(),e=a.weight();if(d>e)return 1;if(d<e)return-1;if(b){d=this.hash().toLowerCase();e=a.hash().toLowerCase();if(d<e)return 1;if(d>e)return-1}return 0};f=f=null;return d}({},
|
178 |
+
s,y));m.register("$13",function(d,f,m){d.init=function(d){function b(){C&&C.dialog("close");h(d).find('input[type="submit"]').attr("disabled",!1);h(p).addClass("jshide");t&&t(!0)}function g(){h(d).find('input[type="submit"]').attr("disabled",!0);t&&t(!1)}function a(a){var b,c;for(b in r)c=r[b],a[b]?a[b].value=c:h('<input type="hidden" />').attr("name",b).appendTo(a).val(c)}function e(a){a.preventDefault();a=h(a.target).serializeArray();q(a);w=!0;return!1}function c(a){a.preventDefault();C.dialog("close");
|
179 |
+
return!1}function l(a){a.preventDefault();C.dialog("open");return!1}function m(f){r=f.authed&&f.creds;s=f.method;if(r)"direct"!==s&&(a(d),w&&f.success&&D.notices.success(f.success)),y=!0,b();else if(y=!1,f.reason)D.notices.info(f.reason);else if(f=f.prompt){var g;C||(h(p).find("button.button-small").click(l),C=h('<div id="loco-fs-creds"></div>').dialog({dialogClass:"request-filesystem-credentials-dialog loco-modal",minWidth:480,modal:!0,autoOpen:!1,closeOnEscape:!0}));g=C;g.html(f).find("form").submit(e);
|
180 |
+
g.dialog("option","title",g.find("h2").remove().text());g.find("button.cancel-button").show().click(c);g.find('input[type="submit"]').addClass("button-primary");h(p).removeClass("jshide")}else D.notices.error("Server didn't return credentials, nor a prompt for credentials")}function n(){b()}function q(a){w=!1;a.path=v;a.auth=z;D.ajax.setNonce("fsConnect",A).post("fsConnect",a,m,n);return a}var r,t,p=d,s=null,w=!1,y=!1,D=f.locoScope,v=d.path.value,z=d.auth.value,A=d["loco-nonce"].value,C;d.connection_type?
|
181 |
+
(r={},r.connection_type=d.connection_type.value,y=!0):v&&z&&(g(),q({}));return{applyCreds:function(b){if(b.nodeType)a(b);else{var c,d=r||{};for(c in d)b[c]=d[c]}return this},setForm:function(b){d=b;y||g();a(b);return this},connect:function(){var a=h(d).serializeArray();v=a.path;z=a.auth;q(a);return this},listen:function(a){t=a;y&&a(!0);return this}}};return d}({},s,y));m.register("$14",function(d,f,m){function k(a,b){return function(d){a.apply(d,b);return d}}function b(a){return function(b,d){var f=
|
182 |
+
b&&b[a]||0,g=d&&d[a]||0;return f===g?0:f>g?1:-1}}function g(a){return function(b,d){return(b&&b[a]||"").localeCompare(d&&d[a]||"")}}function a(a){return function(b,d){return-1*a(b,d)}}d.sort=function(d){var c=[],f=[],m,n=0,q=d.getElementsByTagName("tbody")[0];if((d=d.getElementsByTagName("thead")[0])&&q){var r=0;h("th",d).each(function(d,e){var s=e.getAttribute("data-sort-type");s&&(d=r,h(e).addClass("loco-sort").click(function(e){e.preventDefault();var p=d;e=-1;var r=f[p],s=r.type,y=!(r.desc=!r.desc),
|
183 |
+
B=c,p="n"===s?b(p):g(p);y&&(p=a(p));c=k([].sort,[p])(B);for(h("tr",q).remove();++e<n;)q.appendChild(c[e].$);m&&m.removeClass("loco-desc loco-asc");m=h(r.$).addClass(y?"loco-desc":"loco-asc").removeClass(y?"loco-asc":"loco-desc");return!1}),f[r]={$:e,type:s});e.hasAttribute("colspan")?r+=Number(e.getAttribute("colspan")):r++});h("tr",q).each(function(a,b){var d,e,g={_:a,$:b},h=b.getElementsByTagName("td");for(e in f){d=h[e];d=d.hasAttribute("data-sort-value")?d.getAttribute("data-sort-value"):d.textContent.replace(/(^\s+|\s+$)/g,
|
184 |
+
"");switch(f[e].type){case "n":d=Number(d)}g[e]=d}c[a]=g});n=c.length}};return d}({},s,y));var G=s.locoScope||(s.locoScope={});s=s.locoConf||(s.locoConf={});m.require("$1","array.js");G.notices=m.require("$2","notices.js").init();G.ajax=m.require("$3","ajax.js").init(s);G.translator=m.require("$4","l10n.js").create();G.locale=m.require("$5","locale.js");G.fulltext=m.require("$6","fulltext.js");G.watchtext=m.require("$7","LocoTextListener.js").listen;G.selector=m.require("$8","LocoSelector.js").create;
|
185 |
+
G.autocomp=m.require("$9","LocoAutoComplete.js").init;G.po={ed:m.require("$10","poedit.js"),kbd:m.require("$11","hotkeys.js"),init:m.require("$12","po.js").create};G.fs=m.require("$13","fsconn.js");h("#loco.wrap table.wp-list-table").each(function(d,f){m.require("$14","tables.js").sort(f)})})(window,document,window.jQuery);
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: timwhitlock
|
|
3 |
Tags: translation, translators, localization, localisation, l10n, i18n, Gettext, PO, MO, productivity
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.6
|
6 |
-
Stable tag: 2.0.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -85,6 +85,12 @@ Help is provided via the [plugin support forum](https://wordpress.org/support/pl
|
|
85 |
|
86 |
== Changelog ==
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
= 2.0.4 =
|
89 |
* Reduced session failures to debug notices
|
90 |
* Added wp_roles support for WP < 4.3
|
@@ -112,7 +118,7 @@ Help is provided via the [plugin support forum](https://wordpress.org/support/pl
|
|
112 |
|
113 |
== Upgrade Notice ==
|
114 |
|
115 |
-
= 2.0.
|
116 |
* Various bug fixes and improvements
|
117 |
|
118 |
|
3 |
Tags: translation, translators, localization, localisation, l10n, i18n, Gettext, PO, MO, productivity
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.6
|
6 |
+
Stable tag: 2.0.5
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
85 |
|
86 |
== Changelog ==
|
87 |
|
88 |
+
= 2.0.5 =
|
89 |
+
* Deferred missing tokenizer warning
|
90 |
+
* Allows editing of files in unconfigured sets
|
91 |
+
* Added maximum PHP file size for string extraction
|
92 |
+
* Display of PHP fatal errors during Ajax
|
93 |
+
|
94 |
= 2.0.4 =
|
95 |
* Reduced session failures to debug notices
|
96 |
* Added wp_roles support for WP < 4.3
|
118 |
|
119 |
== Upgrade Notice ==
|
120 |
|
121 |
+
= 2.0.5 =
|
122 |
* Various bug fixes and improvements
|
123 |
|
124 |
|
src/admin/bundle/BaseController.php
CHANGED
@@ -19,7 +19,7 @@ abstract class Loco_admin_bundle_BaseController extends Loco_mvc_AdminController
|
|
19 |
* @return Loco_package_Bundle
|
20 |
*/
|
21 |
public function getBundle(){
|
22 |
-
if( !
|
23 |
$type = $this->get('type');
|
24 |
$handle = $this->get('bundle');
|
25 |
$this->bundle = Loco_package_Bundle::createType( $type, $handle );
|
@@ -68,9 +68,12 @@ abstract class Loco_admin_bundle_BaseController extends Loco_mvc_AdminController
|
|
68 |
if( ! $this->project ){
|
69 |
$bundle = $this->getBundle();
|
70 |
$domain = $this->get('domain');
|
|
|
|
|
|
|
71 |
$this->project = $bundle->getProjectById($domain);
|
72 |
if( ! $this->project ){
|
73 |
-
throw new Loco_error_Exception( sprintf('Unknown translation
|
74 |
}
|
75 |
}
|
76 |
|
19 |
* @return Loco_package_Bundle
|
20 |
*/
|
21 |
public function getBundle(){
|
22 |
+
if( ! $this->bundle ){
|
23 |
$type = $this->get('type');
|
24 |
$handle = $this->get('bundle');
|
25 |
$this->bundle = Loco_package_Bundle::createType( $type, $handle );
|
68 |
if( ! $this->project ){
|
69 |
$bundle = $this->getBundle();
|
70 |
$domain = $this->get('domain');
|
71 |
+
if( ! $domain ){
|
72 |
+
throw new Loco_error_Exception( sprintf('Translation set not known in %s', $bundle ) );
|
73 |
+
}
|
74 |
$this->project = $bundle->getProjectById($domain);
|
75 |
if( ! $this->project ){
|
76 |
+
throw new Loco_error_Exception( sprintf('Unknown translation set: %s not in %s', json_encode($domain), $bundle ) );
|
77 |
}
|
78 |
}
|
79 |
|
src/admin/bundle/SetupController.php
CHANGED
@@ -100,14 +100,13 @@ class Loco_admin_bundle_SetupController extends Loco_admin_bundle_BaseController
|
|
100 |
foreach( $bundle as $project ){
|
101 |
$potfile = $project->getPot();
|
102 |
if( ! $potfile ){
|
103 |
-
$notices[] = sprintf('No translation template for "%s"', $project->getSlug() );
|
104 |
}
|
105 |
}
|
106 |
// if extra files found consider incomplete
|
107 |
if( $bundle->isTheme() || ( $bundle->isPlugin() && ! $bundle->isSingleFile() ) ){
|
108 |
-
|
109 |
-
|
110 |
-
$notices[] = "Extra translation files found, but we can't match them to a known set";
|
111 |
}
|
112 |
}
|
113 |
|
100 |
foreach( $bundle as $project ){
|
101 |
$potfile = $project->getPot();
|
102 |
if( ! $potfile ){
|
103 |
+
$notices[] = sprintf('No translation template for the "%s" text domain', $project->getSlug() );
|
104 |
}
|
105 |
}
|
106 |
// if extra files found consider incomplete
|
107 |
if( $bundle->isTheme() || ( $bundle->isPlugin() && ! $bundle->isSingleFile() ) ){
|
108 |
+
if( Loco_package_Inverter::export($bundle) ){
|
109 |
+
$notices[] = "Translation files found that can't be matched to a known set of strings";
|
|
|
110 |
}
|
111 |
}
|
112 |
|
src/admin/bundle/ViewController.php
CHANGED
@@ -90,30 +90,53 @@ class Loco_admin_bundle_ViewController extends Loco_admin_bundle_BaseController
|
|
90 |
) );
|
91 |
}
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
return $p;
|
94 |
}
|
95 |
|
96 |
|
97 |
-
|
98 |
-
|
99 |
/**
|
100 |
-
*
|
101 |
-
* @return array collection of entries corresponding to available PO/MO pair.
|
102 |
*/
|
103 |
-
private function
|
104 |
-
|
105 |
-
// populate official locale names for all found, or default to our own
|
106 |
-
$api = new Loco_api_WordPressTranslations;
|
107 |
-
$locales = $po->getLocales() + $mo->getLocales();
|
108 |
-
/* @var $locale Loco_Locale */
|
109 |
-
foreach( $locales as $tag => $locale ){
|
110 |
-
$locale->fetchName($api) or $locale->buildName() or $locale->setName($tag);
|
111 |
-
}
|
112 |
-
|
113 |
-
// avoid listing PO that is configured as template
|
114 |
-
$pot = $project->getPot();
|
115 |
-
|
116 |
-
// collate as unique [PO,MO] pairs
|
117 |
$pairs = array();
|
118 |
/* @var $pofile Loco_fs_LocaleFile */
|
119 |
foreach( $po as $pofile ){
|
@@ -137,51 +160,78 @@ class Loco_admin_bundle_ViewController extends Loco_admin_bundle_BaseController
|
|
137 |
$pairs[] = array( null, $mofile );
|
138 |
}
|
139 |
}
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
foreach( $pairs as $pair ){
|
145 |
-
|
146 |
// favour PO file if it exists
|
147 |
list( $pofile, $mofile ) = $pair;
|
148 |
$file = $pofile or $file = $mofile;
|
149 |
-
|
150 |
-
$
|
151 |
-
|
152 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
-
// Establish whether translations are official or otherwise
|
155 |
-
$dir = new Loco_fs_LocaleDirectory( $file->dirname() );
|
156 |
-
|
157 |
-
$data = array (
|
158 |
-
// locale info
|
159 |
-
'lcode' => $tag,
|
160 |
-
'lname' => $locale->getName(),
|
161 |
-
'lattr' => 'class="'.$locale->getIcon().'" lang="'.$locale->lang.'"',
|
162 |
-
// file info
|
163 |
-
'meta' => $meta,
|
164 |
-
'name' => $file->basename(),
|
165 |
-
'time' => $file->modified(),
|
166 |
-
'todo' => $meta->countIncomplete(),
|
167 |
-
'total' => $meta->getTotal(),
|
168 |
-
// author / contrib
|
169 |
-
'store' => $dir->getTypeLabel( $dir->getTypeId() ),
|
170 |
-
// links
|
171 |
-
'info' => $this->getResourceLink('file-info', $project, $meta ),
|
172 |
-
'edit' => $this->getResourceLink('file-edit', $project, $meta ),
|
173 |
-
'delete' => $this->getResourceLink('file-delete', $project, $meta ),
|
174 |
-
'copy' => $this->getProjectLink('msginit', $project, array( 'source' => $meta->getPath(false) ) ),
|
175 |
-
);
|
176 |
|
177 |
-
$sets[] = new Loco_mvc_ViewParams( $data );
|
178 |
-
}
|
179 |
|
180 |
-
|
181 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
}
|
183 |
-
|
184 |
-
|
185 |
|
186 |
/**
|
187 |
* Prepare view parameters for all projects in a bundle
|
@@ -191,39 +241,8 @@ class Loco_admin_bundle_ViewController extends Loco_admin_bundle_BaseController
|
|
191 |
$projects = array();
|
192 |
/* @var $project Loco_package_Project */
|
193 |
foreach( $bundle as $project ){
|
194 |
-
$
|
195 |
-
$po = $project->findLocaleFiles('po');
|
196 |
-
$mo = $project->findLocaleFiles('mo');
|
197 |
-
$p['po'] = $this->createProjectPairs( $project, $po, $mo );
|
198 |
-
// always offer msginit even if we find out later we can't extract any strings
|
199 |
-
$p['nav'][] = new Loco_mvc_ViewParams( array(
|
200 |
-
'href' => $this->getProjectLink('msginit', $project ),
|
201 |
-
'name' => __('New language','loco'),
|
202 |
-
'icon' => 'add',
|
203 |
-
) );
|
204 |
-
// offer template editing if permitted
|
205 |
-
if( ! $project->isPotLocked() ){
|
206 |
-
$pot = $project->getPot();
|
207 |
-
if( $pot && $pot->exists() ){
|
208 |
-
$meta = Loco_gettext_Metadata::load($pot)->persist( 0, true );
|
209 |
-
$p['nav'][] = new Loco_mvc_ViewParams( array(
|
210 |
-
'href' => $this->getResourceLink('file-edit', $project, $meta ),
|
211 |
-
'name' => __('Edit template','loco'),
|
212 |
-
'icon' => 'pencil',
|
213 |
-
) );
|
214 |
-
}
|
215 |
-
// else offer creation of new Template
|
216 |
-
else {
|
217 |
-
$p['nav'][] = new Loco_mvc_ViewParams( array(
|
218 |
-
'href' => $this->getProjectLink('xgettext', $project ),
|
219 |
-
'name' => __('Create template','loco'),
|
220 |
-
'icon' => 'add',
|
221 |
-
) );
|
222 |
-
}
|
223 |
-
}
|
224 |
-
$projects[] = $p;
|
225 |
}
|
226 |
-
|
227 |
return $projects;
|
228 |
}
|
229 |
|
@@ -235,7 +254,9 @@ class Loco_admin_bundle_ViewController extends Loco_admin_bundle_BaseController
|
|
235 |
public function render(){
|
236 |
|
237 |
$this->prepareNavigation();
|
|
|
238 |
$bundle = $this->getBundle();
|
|
|
239 |
|
240 |
// bundle may not be fully configured
|
241 |
$configured = $bundle->isConfigured();
|
@@ -248,30 +269,44 @@ class Loco_admin_bundle_ViewController extends Loco_admin_bundle_BaseController
|
|
248 |
|
249 |
// Collect all configured projects
|
250 |
$projects = $this->createBundleListing( $bundle );
|
251 |
-
$
|
252 |
-
|
253 |
-
// show error page if no projects could be extracted at all
|
254 |
-
if( ! count($projects) ){
|
255 |
-
$this->set('name', $bundle->getName() );
|
256 |
-
return $this->view( 'admin/bundle/incompat' );
|
257 |
-
}
|
258 |
|
259 |
// sniff additional unknown files if bundle is a theme or directory-based plugin that's been auto-detected
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
}
|
271 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
}
|
273 |
|
274 |
-
$this->set(
|
|
|
275 |
|
276 |
return $this->view( 'admin/bundle/view' );
|
277 |
}
|
90 |
) );
|
91 |
}
|
92 |
|
93 |
+
// PO/MO files
|
94 |
+
$po = $project->findLocaleFiles('po');
|
95 |
+
$mo = $project->findLocaleFiles('mo');
|
96 |
+
$p['po'] = $this->createProjectPairs( $project, $po, $mo );
|
97 |
+
|
98 |
+
// also pull invalid files so everything is available to the UI
|
99 |
+
$mo = $project->findNotLocaleFiles('mo');
|
100 |
+
$po = $project->findNotLocaleFiles('po')->augment( $project->findNotLocaleFiles('pot') );
|
101 |
+
$p['_po'] = $this->createProjectPairs( $project, $po, $mo );
|
102 |
+
|
103 |
+
// always offer msginit even if we find out later we can't extract any strings
|
104 |
+
$p['nav'][] = new Loco_mvc_ViewParams( array(
|
105 |
+
'href' => $this->getProjectLink('msginit', $project ),
|
106 |
+
'name' => __('New language','loco'),
|
107 |
+
'icon' => 'add',
|
108 |
+
) );
|
109 |
+
|
110 |
+
// offer template editing if permitted
|
111 |
+
if( ! $project->isPotLocked() ){
|
112 |
+
$pot = $project->getPot();
|
113 |
+
if( $pot && $pot->exists() ){
|
114 |
+
$p['pot'] = $pot;
|
115 |
+
$meta = Loco_gettext_Metadata::load($pot)->persist( 0, true );
|
116 |
+
$p['nav'][] = new Loco_mvc_ViewParams( array(
|
117 |
+
'href' => $this->getResourceLink('file-edit', $project, $meta ),
|
118 |
+
'name' => __('Edit template','loco'),
|
119 |
+
'icon' => 'pencil',
|
120 |
+
) );
|
121 |
+
}
|
122 |
+
// else offer creation of new Template
|
123 |
+
else {
|
124 |
+
$p['nav'][] = new Loco_mvc_ViewParams( array(
|
125 |
+
'href' => $this->getProjectLink('xgettext', $project ),
|
126 |
+
'name' => __('Create template','loco'),
|
127 |
+
'icon' => 'add',
|
128 |
+
) );
|
129 |
+
}
|
130 |
+
}
|
131 |
+
|
132 |
return $p;
|
133 |
}
|
134 |
|
135 |
|
|
|
|
|
136 |
/**
|
137 |
+
* Collect PO/MO pairings, ignoring any PO that is in use as a template
|
|
|
138 |
*/
|
139 |
+
private function createPairs( Loco_fs_FileList $po, Loco_fs_FileList $mo, Loco_fs_File $pot = null ){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
$pairs = array();
|
141 |
/* @var $pofile Loco_fs_LocaleFile */
|
142 |
foreach( $po as $pofile ){
|
160 |
$pairs[] = array( null, $mofile );
|
161 |
}
|
162 |
}
|
163 |
+
return $pairs;
|
164 |
+
}
|
165 |
+
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Initialize view parameters for each row representing a localized resource pair
|
169 |
+
* @return array collection of entries corresponding to available PO/MO pair.
|
170 |
+
*/
|
171 |
+
private function createProjectPairs( Loco_package_Project $project, Loco_fs_LocaleFileList $po, Loco_fs_LocaleFileList $mo ){
|
172 |
+
// populate official locale names for all found, or default to our own
|
173 |
+
if( $locales = $po->getLocales() + $mo->getLocales() ){
|
174 |
+
$api = new Loco_api_WordPressTranslations;
|
175 |
+
/* @var $locale Loco_Locale */
|
176 |
+
foreach( $locales as $tag => $locale ){
|
177 |
+
$locale->fetchName($api) or $locale->buildName() or $locale->setName($tag);
|
178 |
+
}
|
179 |
+
}
|
180 |
+
// collate as unique [PO,MO] pairs ensuring canonical template excluded
|
181 |
+
$pairs = $this->createPairs( $po, $mo, $project->getPot() );
|
182 |
+
$rows = array();
|
183 |
foreach( $pairs as $pair ){
|
|
|
184 |
// favour PO file if it exists
|
185 |
list( $pofile, $mofile ) = $pair;
|
186 |
$file = $pofile or $file = $mofile;
|
187 |
+
// establish locale, or assume invalid
|
188 |
+
$locale = null;
|
189 |
+
if( 'pot' !== $file->extension() ){
|
190 |
+
$tag = $file->getSuffix();
|
191 |
+
if( isset($locales[$tag]) ){
|
192 |
+
$locale = $locales[$tag];
|
193 |
+
}
|
194 |
+
}
|
195 |
+
$rows[] = $this->createFileParams( $project, $file, $locale );
|
196 |
+
}
|
197 |
+
|
198 |
+
return $rows;
|
199 |
+
}
|
200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
|
|
|
|
|
202 |
|
203 |
+
/**
|
204 |
+
*
|
205 |
+
*/
|
206 |
+
private function createFileParams( Loco_package_Project $project, Loco_fs_File $file, Loco_Locale $locale = null ){
|
207 |
+
// Pull Gettext meta data from cache if possible
|
208 |
+
// TODO save write when cached version was used
|
209 |
+
$meta = Loco_gettext_Metadata::load($file)->persist( 0, true );
|
210 |
+
// Establish whether translations are official or otherwise
|
211 |
+
$dir = new Loco_fs_LocaleDirectory( $file->dirname() );
|
212 |
+
// Retuen data required for PO table row
|
213 |
+
return new Loco_mvc_ViewParams( array (
|
214 |
+
// locale info
|
215 |
+
'lcode' => $locale ? (string) $locale : '',
|
216 |
+
'lname' => $locale ? $locale->getName() : '',
|
217 |
+
'lattr' => $locale ? 'class="'.$locale->getIcon().'" lang="'.$locale->lang.'"' : '',
|
218 |
+
// file info
|
219 |
+
'meta' => $meta,
|
220 |
+
'name' => $file->basename(),
|
221 |
+
'time' => $file->modified(),
|
222 |
+
'todo' => $meta->countIncomplete(),
|
223 |
+
'total' => $meta->getTotal(),
|
224 |
+
// author / contrib
|
225 |
+
'store' => $dir->getTypeLabel( $dir->getTypeId() ),
|
226 |
+
// links
|
227 |
+
'info' => $this->getResourceLink('file-info', $project, $meta ),
|
228 |
+
'edit' => $this->getResourceLink('file-edit', $project, $meta ),
|
229 |
+
'delete' => $this->getResourceLink('file-delete', $project, $meta ),
|
230 |
+
'copy' => $this->getProjectLink('msginit', $project, array( 'source' => $meta->getPath(false) ) ),
|
231 |
+
) );
|
232 |
}
|
233 |
+
|
234 |
+
|
235 |
|
236 |
/**
|
237 |
* Prepare view parameters for all projects in a bundle
|
241 |
$projects = array();
|
242 |
/* @var $project Loco_package_Project */
|
243 |
foreach( $bundle as $project ){
|
244 |
+
$projects[] = $this->createProjectParams($project);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
}
|
|
|
246 |
return $projects;
|
247 |
}
|
248 |
|
254 |
public function render(){
|
255 |
|
256 |
$this->prepareNavigation();
|
257 |
+
|
258 |
$bundle = $this->getBundle();
|
259 |
+
$this->set('name', $bundle->getName() );
|
260 |
|
261 |
// bundle may not be fully configured
|
262 |
$configured = $bundle->isConfigured();
|
269 |
|
270 |
// Collect all configured projects
|
271 |
$projects = $this->createBundleListing( $bundle );
|
272 |
+
$unknown = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
|
274 |
// sniff additional unknown files if bundle is a theme or directory-based plugin that's been auto-detected
|
275 |
+
if( 'file' === $configured || 'internal' === $configured ){
|
276 |
+
// presumed complete
|
277 |
+
}
|
278 |
+
else if( $bundle->isTheme() || ( $bundle->isPlugin() && ! $bundle->isSingleFile() ) ){
|
279 |
+
// TODO This needs absracting into the Loco_package_Inverter class
|
280 |
+
$prefixes = array();
|
281 |
+
$po = new Loco_fs_LocaleFileList;
|
282 |
+
$mo = new Loco_fs_LocaleFileList;
|
283 |
+
foreach( Loco_package_Inverter::export($bundle) as $ext => $files ){
|
284 |
+
$list = 'mo' === $ext ? $mo : $po;
|
285 |
+
foreach( $files as $file ){
|
286 |
+
$file = new Loco_fs_LocaleFile($file);
|
287 |
+
$list->addLocalized( $file );
|
288 |
+
// Only look in system locations if locale is valid and domain/prefix available
|
289 |
+
$locale = $file->getLocale();
|
290 |
+
if( $locale->isValid() && ( $domain = $file->getPrefix() ) ){
|
291 |
+
$prefixes[$domain] = true;
|
292 |
+
}
|
293 |
}
|
294 |
}
|
295 |
+
// pick up given files in system locations only
|
296 |
+
foreach( $prefixes as $domain => $_bool ){
|
297 |
+
$dummy = new Loco_package_Project( $bundle, new Loco_package_TextDomain($domain), '' );
|
298 |
+
$bundle->addProject( $dummy ); // <- required to configure locations
|
299 |
+
$dummy->excludeTargetPath( $bundle->getDirectoryPath() );
|
300 |
+
$po->augment( $dummy->findLocaleFiles('po') );
|
301 |
+
$mo->augment( $dummy->findLocaleFiles('mo') );
|
302 |
+
}
|
303 |
+
// a fake project is required to disable functions that require a configured project
|
304 |
+
$dummy = new Loco_package_Project( $bundle, new Loco_package_TextDomain(''), '' );
|
305 |
+
$unknown = $this->createProjectPairs( $dummy, $po, $mo );
|
306 |
}
|
307 |
|
308 |
+
$this->set('projects', $projects );
|
309 |
+
$this->set('unknown', $unknown );
|
310 |
|
311 |
return $this->view( 'admin/bundle/view' );
|
312 |
}
|
src/admin/file/EditController.php
CHANGED
@@ -71,7 +71,7 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
|
|
71 |
}
|
72 |
// Fine if not, this just means sync isn't possible.
|
73 |
catch( Loco_error_Exception $e ){
|
74 |
-
Loco_error_AdminNotices::debug( $
|
75 |
$project = null;
|
76 |
}
|
77 |
|
71 |
}
|
72 |
// Fine if not, this just means sync isn't possible.
|
73 |
catch( Loco_error_Exception $e ){
|
74 |
+
Loco_error_AdminNotices::debug( sprintf("Sync is disabled because this file doesn't relate to a known set of translations", $bundle ) );
|
75 |
$project = null;
|
76 |
}
|
77 |
|
src/admin/file/ViewController.php
CHANGED
@@ -49,7 +49,6 @@ class Loco_admin_file_ViewController extends Loco_admin_file_BaseController {
|
|
49 |
$project = $this->getProject();
|
50 |
}
|
51 |
catch( Exception $e ){
|
52 |
-
Loco_error_AdminNotices::debug( $e->getMessage() );
|
53 |
$project = null;
|
54 |
}
|
55 |
|
49 |
$project = $this->getProject();
|
50 |
}
|
51 |
catch( Exception $e ){
|
|
|
52 |
$project = null;
|
53 |
}
|
54 |
|
src/admin/init/InitPoController.php
CHANGED
@@ -29,56 +29,36 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|
29 |
|
30 |
|
31 |
|
32 |
-
/**
|
33 |
-
* {@inheritdoc}
|
34 |
-
*
|
35 |
-
protected function prepareNavigation(){
|
36 |
-
parent::prepareNavigation();
|
37 |
-
$tabs = $this->get('tabs');
|
38 |
-
$tabs->add( __('New PO','loco'), '', true );
|
39 |
-
}*/
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
/**
|
44 |
* {@inheritdoc}
|
45 |
*/
|
46 |
public function render(){
|
47 |
|
48 |
$breadcrumb = $this->prepareNavigation();
|
|
|
|
|
|
|
|
|
49 |
$bundle = $this->getBundle();
|
50 |
-
$project = $this->getProject();
|
51 |
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
$title = __('New language','loco');
|
56 |
-
$subhead = sprintf( __('Initializing new translations in "%s"','loco'), $slug?$slug:$domain );
|
57 |
$this->set('subhead', $subhead );
|
58 |
|
59 |
// navigate up to bundle listing page
|
60 |
$breadcrumb->add( $title );
|
61 |
$this->set( 'breadcrumb', $breadcrumb );
|
62 |
|
63 |
-
// list available languages for dropdown list
|
64 |
-
$locales = array();
|
65 |
-
$installed = array();
|
66 |
-
$api = new Loco_api_WordPressTranslations;
|
67 |
-
foreach( $api->getAvailableCore() as $key => $raw ){
|
68 |
-
$locale = Loco_Locale::parse($key);
|
69 |
-
$vparam = new Loco_mvc_ViewParams( array(
|
70 |
-
'icon' => $locale->getIcon(),
|
71 |
-
'value' => (string) $locale,
|
72 |
-
'label' => $locale->fetchName($api),
|
73 |
-
) );
|
74 |
-
$locales[] = $vparam;
|
75 |
-
if( $api->isInstalled($key) ){
|
76 |
-
$installed[] = $vparam;
|
77 |
-
}
|
78 |
-
}
|
79 |
-
$this->set( 'locales', $locales );
|
80 |
-
$this->set( 'installed', $installed );
|
81 |
-
|
82 |
// default locale is a placeholder
|
83 |
$locale = new Loco_Locale('zxx');
|
84 |
$content_dir = rtrim( loco_constant('WP_CONTENT_DIR'), '/' );
|
@@ -91,23 +71,50 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|
91 |
if( ! $potfile->exists() ){
|
92 |
throw new Loco_error_Exception('Forced template argument must exist');
|
93 |
}
|
94 |
-
|
|
|
95 |
if( $potfile->getSuffix() ){
|
96 |
-
$copying = true;
|
97 |
$locale = $potfile->getLocale();
|
98 |
$this->set('sourceLocale', $locale );
|
99 |
}
|
100 |
}
|
|
|
|
|
|
|
|
|
101 |
// else POT file may or may not be known, and may or may not exist
|
102 |
else {
|
103 |
$potfile = $project->getPot();
|
104 |
}
|
105 |
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
// Critical that user selects the correct save location:
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
|
|
111 |
|
112 |
|
113 |
// show information about POT file if we are initialializing from template
|
@@ -137,6 +144,10 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|
137 |
) ) );
|
138 |
// if forcing source extraction show brief description of source files
|
139 |
if( $this->get('extract') ){
|
|
|
|
|
|
|
|
|
140 |
$nfiles = count( $project->findSourceFiles() );
|
141 |
$summary = sprintf( _n('1 source file will be scanned for translatable strings','%s source files will be scanned for translatable strings',$nfiles,'loco'), number_format_i18n($nfiles) );
|
142 |
}
|
@@ -202,7 +213,7 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
|
|
202 |
'loco-nonce' => $this->setNonce('msginit')->value,
|
203 |
'type' => $bundle->getType(),
|
204 |
'bundle' => $bundle->getHandle(),
|
205 |
-
'domain' => $project->getId(),
|
206 |
'source' => $this->get('source'),
|
207 |
) ) );
|
208 |
|
29 |
|
30 |
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
* {@inheritdoc}
|
34 |
*/
|
35 |
public function render(){
|
36 |
|
37 |
$breadcrumb = $this->prepareNavigation();
|
38 |
+
// "new" tab is confising when no project-scope navigation
|
39 |
+
// $this->get('tabs')->add( __('New PO','loco'), '', true );
|
40 |
+
|
41 |
+
// bundle mandatory, but project optional
|
42 |
$bundle = $this->getBundle();
|
|
|
43 |
|
44 |
+
try {
|
45 |
+
$project = $this->getProject();
|
46 |
+
$slug = $project->getSlug();
|
47 |
+
$domain = (string) $project->getDomain();
|
48 |
+
$subhead = sprintf( __('Initializing new translations in "%s"','loco'), $slug?$slug:$domain );
|
49 |
+
}
|
50 |
+
catch( Loco_error_Exception $e ){
|
51 |
+
$project = null;
|
52 |
+
$subhead = __('Initializing new translations in unknown set','loco');
|
53 |
+
}
|
54 |
|
55 |
$title = __('New language','loco');
|
|
|
56 |
$this->set('subhead', $subhead );
|
57 |
|
58 |
// navigate up to bundle listing page
|
59 |
$breadcrumb->add( $title );
|
60 |
$this->set( 'breadcrumb', $breadcrumb );
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
// default locale is a placeholder
|
63 |
$locale = new Loco_Locale('zxx');
|
64 |
$content_dir = rtrim( loco_constant('WP_CONTENT_DIR'), '/' );
|
71 |
if( ! $potfile->exists() ){
|
72 |
throw new Loco_error_Exception('Forced template argument must exist');
|
73 |
}
|
74 |
+
$copying = true;
|
75 |
+
// forced source could be a POT (although UI would normally prevent it)
|
76 |
if( $potfile->getSuffix() ){
|
|
|
77 |
$locale = $potfile->getLocale();
|
78 |
$this->set('sourceLocale', $locale );
|
79 |
}
|
80 |
}
|
81 |
+
// else project not configured. UI should prevent this by not offering msginit
|
82 |
+
else if( ! $project ){
|
83 |
+
throw new Loco_error_Exception('Cannot add new language to unconfigured set');
|
84 |
+
}
|
85 |
// else POT file may or may not be known, and may or may not exist
|
86 |
else {
|
87 |
$potfile = $project->getPot();
|
88 |
}
|
89 |
|
90 |
|
91 |
+
// list available languages for dropdown list
|
92 |
+
$locales = array();
|
93 |
+
$installed = array();
|
94 |
+
$api = new Loco_api_WordPressTranslations;
|
95 |
+
foreach( $api->getAvailableCore() as $key => $raw ){
|
96 |
+
$locale = Loco_Locale::parse($key);
|
97 |
+
$vparam = new Loco_mvc_ViewParams( array(
|
98 |
+
'icon' => $locale->getIcon(),
|
99 |
+
'value' => (string) $locale,
|
100 |
+
'label' => $locale->fetchName($api),
|
101 |
+
) );
|
102 |
+
$locales[] = $vparam;
|
103 |
+
if( $api->isInstalled($key) ){
|
104 |
+
$installed[] = $vparam;
|
105 |
+
}
|
106 |
+
}
|
107 |
+
$this->set( 'locales', $locales );
|
108 |
+
$this->set( 'installed', $installed );
|
109 |
+
|
110 |
// Critical that user selects the correct save location:
|
111 |
+
if( $project ){
|
112 |
+
$filechoice = $project->initLocaleFiles( $locale );
|
113 |
+
}
|
114 |
+
// without configured project we will only allow save to same location
|
115 |
+
else {
|
116 |
+
$filechoice = new Loco_fs_FileList;
|
117 |
+
}
|
118 |
|
119 |
|
120 |
// show information about POT file if we are initialializing from template
|
144 |
) ) );
|
145 |
// if forcing source extraction show brief description of source files
|
146 |
if( $this->get('extract') ){
|
147 |
+
// Tokenizer required for string extraction
|
148 |
+
if( ! loco_check_extension('tokenizer') ){
|
149 |
+
return $this->view('admin/errors/no-tokenizer');
|
150 |
+
}
|
151 |
$nfiles = count( $project->findSourceFiles() );
|
152 |
$summary = sprintf( _n('1 source file will be scanned for translatable strings','%s source files will be scanned for translatable strings',$nfiles,'loco'), number_format_i18n($nfiles) );
|
153 |
}
|
213 |
'loco-nonce' => $this->setNonce('msginit')->value,
|
214 |
'type' => $bundle->getType(),
|
215 |
'bundle' => $bundle->getHandle(),
|
216 |
+
'domain' => $project ? $project->getId() : '',
|
217 |
'source' => $this->get('source'),
|
218 |
) ) );
|
219 |
|
src/admin/init/InitPotController.php
CHANGED
@@ -27,23 +27,16 @@ class Loco_admin_init_InitPotController extends Loco_admin_bundle_BaseController
|
|
27 |
}
|
28 |
|
29 |
|
30 |
-
|
31 |
-
* {@inheritdoc}
|
32 |
-
*
|
33 |
-
protected function prepareNavigation(){
|
34 |
-
parent::prepareNavigation();
|
35 |
-
$tabs = $this->get('tabs');
|
36 |
-
$tabs->add( __('New POT','loco'), '', true );
|
37 |
-
}*/
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
/**
|
42 |
* {@inheritdoc}
|
43 |
*/
|
44 |
public function render(){
|
45 |
|
46 |
$breadcrumb = $this->prepareNavigation();
|
|
|
|
|
|
|
47 |
$bundle = $this->getBundle();
|
48 |
$project = $this->getProject();
|
49 |
|
@@ -51,6 +44,11 @@ class Loco_admin_init_InitPotController extends Loco_admin_bundle_BaseController
|
|
51 |
$domain = (string) $project->getDomain();
|
52 |
$this->set('domain', $domain );
|
53 |
|
|
|
|
|
|
|
|
|
|
|
54 |
// Establish default POT path whether it exists or not
|
55 |
$pot = $project->getPot();
|
56 |
while( ! $pot ){
|
@@ -82,16 +80,31 @@ class Loco_admin_init_InitPotController extends Loco_admin_bundle_BaseController
|
|
82 |
// Avoiding full source scan until actioned, but calculate size to manage expectations
|
83 |
$bytes = 0;
|
84 |
$nfiles = 0;
|
|
|
|
|
85 |
$sources = $project->findSourceFiles();
|
|
|
|
|
|
|
86 |
/* @var $sourceFile Loco_fs_File */
|
87 |
foreach( $sources as $sourceFile ){
|
88 |
-
$bytes += $sourceFile->size();
|
89 |
$nfiles++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
$this->set( 'scan', new Loco_mvc_ViewParams( array (
|
92 |
'bytes' => $bytes,
|
93 |
'count' => $nfiles,
|
|
|
94 |
'size' => Loco_mvc_FileParams::renderBytes($bytes),
|
|
|
|
|
95 |
) ) );
|
96 |
|
97 |
// file metadata
|
27 |
}
|
28 |
|
29 |
|
30 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
/**
|
32 |
* {@inheritdoc}
|
33 |
*/
|
34 |
public function render(){
|
35 |
|
36 |
$breadcrumb = $this->prepareNavigation();
|
37 |
+
// "new" tab is confising when no project-scope navigation
|
38 |
+
// $this->get('tabs')->add( __('New POT','loco'), '', true );
|
39 |
+
|
40 |
$bundle = $this->getBundle();
|
41 |
$project = $this->getProject();
|
42 |
|
44 |
$domain = (string) $project->getDomain();
|
45 |
$this->set('domain', $domain );
|
46 |
|
47 |
+
// Tokenizer required for string extraction
|
48 |
+
if( ! loco_check_extension('tokenizer') ){
|
49 |
+
return $this->view('admin/errors/no-tokenizer');
|
50 |
+
}
|
51 |
+
|
52 |
// Establish default POT path whether it exists or not
|
53 |
$pot = $project->getPot();
|
54 |
while( ! $pot ){
|
80 |
// Avoiding full source scan until actioned, but calculate size to manage expectations
|
81 |
$bytes = 0;
|
82 |
$nfiles = 0;
|
83 |
+
$nskip = 0;
|
84 |
+
$largest = 0;
|
85 |
$sources = $project->findSourceFiles();
|
86 |
+
// skip files larger than configured maximum
|
87 |
+
$opts = Loco_data_Settings::get();
|
88 |
+
$max = wp_convert_hr_to_bytes( $opts->max_php_size );
|
89 |
/* @var $sourceFile Loco_fs_File */
|
90 |
foreach( $sources as $sourceFile ){
|
|
|
91 |
$nfiles++;
|
92 |
+
$fsize = $sourceFile->size();
|
93 |
+
if( $fsize > $max ){
|
94 |
+
$nskip += 1;
|
95 |
+
}
|
96 |
+
else {
|
97 |
+
$bytes += $fsize;
|
98 |
+
$largest = max( $largest, $fsize );
|
99 |
+
}
|
100 |
}
|
101 |
$this->set( 'scan', new Loco_mvc_ViewParams( array (
|
102 |
'bytes' => $bytes,
|
103 |
'count' => $nfiles,
|
104 |
+
'skip' => $nskip,
|
105 |
'size' => Loco_mvc_FileParams::renderBytes($bytes),
|
106 |
+
'large' => Loco_mvc_FileParams::renderBytes($max),
|
107 |
+
'largest' => Loco_mvc_FileParams::renderBytes($largest),
|
108 |
) ) );
|
109 |
|
110 |
// file metadata
|
src/ajax/XgettextController.php
CHANGED
@@ -46,10 +46,13 @@ class Loco_ajax_XgettextController extends Loco_ajax_common_BundleController {
|
|
46 |
$potsize = $potfile->putContents( (string) $data );
|
47 |
|
48 |
// set response data for debugging
|
49 |
-
|
50 |
-
'
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
53 |
|
54 |
// push recent items on file creation
|
55 |
// TODO push project and locale file
|
46 |
$potsize = $potfile->putContents( (string) $data );
|
47 |
|
48 |
// set response data for debugging
|
49 |
+
if( loco_debugging() ){
|
50 |
+
$this->set( 'debug', array (
|
51 |
+
'potname' => $potfile->basename(),
|
52 |
+
'potsize' => $potsize,
|
53 |
+
'total' => $ext->getTotal(),
|
54 |
+
) );
|
55 |
+
}
|
56 |
|
57 |
// push recent items on file creation
|
58 |
// TODO push project and locale file
|
src/data/Settings.php
CHANGED
@@ -28,6 +28,8 @@ class Loco_data_Settings extends Loco_data_Serializable {
|
|
28 |
'pot_alias' => array( 'default.po', 'en_US.po', 'en.po' ),
|
29 |
// whether to remember file system credentials in session
|
30 |
'fs_persist' => false,
|
|
|
|
|
31 |
/*/ Legacy options from 1.x branch:
|
32 |
// whether to use external msgfmt command (1), or internal (default)
|
33 |
'use_msgfmt' => false,
|
28 |
'pot_alias' => array( 'default.po', 'en_US.po', 'en.po' ),
|
29 |
// whether to remember file system credentials in session
|
30 |
'fs_persist' => false,
|
31 |
+
// skip PHP source files this size or larger
|
32 |
+
'max_php_size' => '100K',
|
33 |
/*/ Legacy options from 1.x branch:
|
34 |
// whether to use external msgfmt command (1), or internal (default)
|
35 |
'use_msgfmt' => false,
|
src/fs/DummyFile.php
CHANGED
@@ -37,6 +37,14 @@ class Loco_fs_DummyFile extends Loco_fs_File {
|
|
37 |
}
|
38 |
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
/**
|
41 |
* {@inheritdoc}
|
42 |
*/
|
37 |
}
|
38 |
|
39 |
|
40 |
+
/**
|
41 |
+
* {@inheritdoc}
|
42 |
+
*/
|
43 |
+
public function exists(){
|
44 |
+
return false;
|
45 |
+
}
|
46 |
+
|
47 |
+
|
48 |
/**
|
49 |
* {@inheritdoc}
|
50 |
*/
|
src/fs/FileList.php
CHANGED
@@ -100,4 +100,17 @@ class Loco_fs_FileList extends ArrayIterator implements Loco_fs_FileListInterfac
|
|
100 |
return $list;
|
101 |
}
|
102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
}
|
100 |
return $list;
|
101 |
}
|
102 |
|
103 |
+
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Merge another list of the SAME TYPE uniquely on top of current one
|
107 |
+
* @return Loco_fs_FileList
|
108 |
+
*/
|
109 |
+
public function augment( loco_fs_FileList $list ){
|
110 |
+
foreach( $list as $file ){
|
111 |
+
$this->add( $file );
|
112 |
+
}
|
113 |
+
return $this;
|
114 |
+
}
|
115 |
+
|
116 |
}
|
src/fs/LocaleFileList.php
CHANGED
@@ -18,8 +18,9 @@ class Loco_fs_LocaleFileList extends Loco_fs_FileList {
|
|
18 |
$i = count($this);
|
19 |
$this->add( $file );
|
20 |
if( count($this) !== $i ){
|
21 |
-
$key = $file->getSuffix()
|
22 |
-
|
|
|
23 |
}
|
24 |
|
25 |
return $this;
|
@@ -44,13 +45,16 @@ class Loco_fs_LocaleFileList extends Loco_fs_FileList {
|
|
44 |
|
45 |
|
46 |
/**
|
47 |
-
* Get a unique list of locales for which there are files
|
48 |
* @return array<Loco_Locale>
|
49 |
*/
|
50 |
public function getLocales(){
|
51 |
$list = array();
|
52 |
foreach( array_keys($this->index) as $tag ){
|
53 |
-
$
|
|
|
|
|
|
|
54 |
}
|
55 |
return $list;
|
56 |
}
|
@@ -58,10 +62,10 @@ class Loco_fs_LocaleFileList extends Loco_fs_FileList {
|
|
58 |
|
59 |
|
60 |
/**
|
61 |
-
*
|
62 |
* @return Loco_fs_LocaleFileList
|
63 |
*/
|
64 |
-
public function augment(
|
65 |
foreach( $list as $file ){
|
66 |
$this->addLocalized( $file );
|
67 |
}
|
18 |
$i = count($this);
|
19 |
$this->add( $file );
|
20 |
if( count($this) !== $i ){
|
21 |
+
if( $key = $file->getSuffix() ){
|
22 |
+
$this->index[$key][] = $i;
|
23 |
+
}
|
24 |
}
|
25 |
|
26 |
return $this;
|
45 |
|
46 |
|
47 |
/**
|
48 |
+
* Get a unique list of valid locales for which there are files
|
49 |
* @return array<Loco_Locale>
|
50 |
*/
|
51 |
public function getLocales(){
|
52 |
$list = array();
|
53 |
foreach( array_keys($this->index) as $tag ){
|
54 |
+
$locale = Loco_Locale::parse($tag);
|
55 |
+
if( $locale->isValid() ){
|
56 |
+
$list[$tag] = $locale;
|
57 |
+
}
|
58 |
}
|
59 |
return $list;
|
60 |
}
|
62 |
|
63 |
|
64 |
/**
|
65 |
+
* {@inheritdoc}
|
66 |
* @return Loco_fs_LocaleFileList
|
67 |
*/
|
68 |
+
public function augment( Loco_fs_FileList $list ){
|
69 |
foreach( $list as $file ){
|
70 |
$this->addLocalized( $file );
|
71 |
}
|
src/gettext/Extraction.php
CHANGED
@@ -25,6 +25,9 @@ class Loco_gettext_Extraction {
|
|
25 |
|
26 |
|
27 |
public function __construct( Loco_package_Bundle $bundle ){
|
|
|
|
|
|
|
28 |
$this->bundle = $bundle;
|
29 |
$this->extractor = loco_wp_extractor();
|
30 |
$this->extras = array();
|
@@ -56,8 +59,18 @@ class Loco_gettext_Extraction {
|
|
56 |
*/
|
57 |
public function addProject( Loco_package_Project $project ){
|
58 |
$base = $this->bundle->getDirectoryPath();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
/* @var $file Loco_fs_File */
|
60 |
foreach( $project->findSourceFiles() as $file ){
|
|
|
|
|
|
|
61 |
$tokens = token_get_all( $file->getContents() );
|
62 |
$this->extractor->extract( $tokens, $file->getRelativePath($base) );
|
63 |
}
|
25 |
|
26 |
|
27 |
public function __construct( Loco_package_Bundle $bundle ){
|
28 |
+
if( ! loco_check_extension('tokenizer') ){
|
29 |
+
throw new Loco_error_Exception('String extraction not available without required extension');
|
30 |
+
}
|
31 |
$this->bundle = $bundle;
|
32 |
$this->extractor = loco_wp_extractor();
|
33 |
$this->extras = array();
|
59 |
*/
|
60 |
public function addProject( Loco_package_Project $project ){
|
61 |
$base = $this->bundle->getDirectoryPath();
|
62 |
+
// skip files larger than configured maximum
|
63 |
+
$opts = Loco_data_Settings::get();
|
64 |
+
$max = wp_convert_hr_to_bytes( $opts->max_php_size );
|
65 |
+
// *attempt* to raise memory limit to WP_MAX_MEMORY_LIMIT
|
66 |
+
if( function_exists('wp_raise_memory_limit') ){
|
67 |
+
wp_raise_memory_limit('loco');
|
68 |
+
}
|
69 |
/* @var $file Loco_fs_File */
|
70 |
foreach( $project->findSourceFiles() as $file ){
|
71 |
+
if( $file->size() > $max ){
|
72 |
+
continue;
|
73 |
+
}
|
74 |
$tokens = token_get_all( $file->getContents() );
|
75 |
$this->extractor->extract( $tokens, $file->getRelativePath($base) );
|
76 |
}
|
src/mvc/AdminController.php
CHANGED
@@ -129,15 +129,10 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
|
|
129 |
// common js utils
|
130 |
$this->enqueueScript('min/admin', array('jquery-ui-dialog') );
|
131 |
|
132 |
-
// check
|
133 |
-
foreach( array('json','mbstring'
|
134 |
loco_check_extension($ext);
|
135 |
}
|
136 |
-
|
137 |
-
/*/ additional system checks
|
138 |
-
if( 2147483647 === PHP_INT_MAX ){
|
139 |
-
Loco_error_AdminNotices::warn( __("Your operating system is not 64 bit",'loco') );
|
140 |
-
}*/
|
141 |
}
|
142 |
|
143 |
|
129 |
// common js utils
|
130 |
$this->enqueueScript('min/admin', array('jquery-ui-dialog') );
|
131 |
|
132 |
+
// check essential extensions on all pages so admin notices are shown
|
133 |
+
foreach( array('json','mbstring') as $ext ){
|
134 |
loco_check_extension($ext);
|
135 |
}
|
|
|
|
|
|
|
|
|
|
|
136 |
}
|
137 |
|
138 |
|
src/package/Bundle.php
CHANGED
@@ -50,7 +50,7 @@ abstract class Loco_package_Bundle extends ArrayObject implements JsonSerializab
|
|
50 |
|
51 |
/**
|
52 |
* Method with which bundle has been configured
|
53 |
-
* @var string|false (file|db|meta)
|
54 |
*/
|
55 |
private $saved = false;
|
56 |
|
@@ -461,7 +461,7 @@ abstract class Loco_package_Bundle extends ArrayObject implements JsonSerializab
|
|
461 |
|
462 |
/**
|
463 |
* Check whether bundle is manually configured, as opposed to guessed
|
464 |
-
* @return string (file|db|meta)
|
465 |
*/
|
466 |
public function isConfigured(){
|
467 |
return $this->saved;
|
50 |
|
51 |
/**
|
52 |
* Method with which bundle has been configured
|
53 |
+
* @var string|false (file|db|meta|internal)
|
54 |
*/
|
55 |
private $saved = false;
|
56 |
|
461 |
|
462 |
/**
|
463 |
* Check whether bundle is manually configured, as opposed to guessed
|
464 |
+
* @return string (file|db|meta|internal)
|
465 |
*/
|
466 |
public function isConfigured(){
|
467 |
return $this->saved;
|
src/package/Debugger.php
CHANGED
@@ -50,6 +50,7 @@ class Loco_package_Debugger implements IteratorAggregate {
|
|
50 |
}
|
51 |
|
52 |
$base = $bundle->getDirectoryPath();
|
|
|
53 |
|
54 |
// self-declarations provided by author in file headers
|
55 |
$native = $bundle->getHeaderInfo();
|
@@ -186,7 +187,12 @@ class Loco_package_Debugger implements IteratorAggregate {
|
|
186 |
$this->warn( $str.': %2$s', $num, $this->implodeKeys($missing) );
|
187 |
}
|
188 |
if( $extra = array_diff_key($realCounts,$domains) ){
|
|
|
189 |
$this->info('%u unconfigured domain[s] found in source code: %s', count($extra), $this->implodeKeys($extra) );
|
|
|
|
|
|
|
|
|
190 |
// extracted domains could prove that declared domain is wrong
|
191 |
if( $missing ){
|
192 |
foreach( array_keys($extra) as $name ){
|
50 |
}
|
51 |
|
52 |
$base = $bundle->getDirectoryPath();
|
53 |
+
// $this->devel('Bundle root is %s',$base);
|
54 |
|
55 |
// self-declarations provided by author in file headers
|
56 |
$native = $bundle->getHeaderInfo();
|
187 |
$this->warn( $str.': %2$s', $num, $this->implodeKeys($missing) );
|
188 |
}
|
189 |
if( $extra = array_diff_key($realCounts,$domains) ){
|
190 |
+
|
191 |
$this->info('%u unconfigured domain[s] found in source code: %s', count($extra), $this->implodeKeys($extra) );
|
192 |
+
/*/ debug other domains extracted
|
193 |
+
foreach( $extra as $name => $count ){
|
194 |
+
$this->devel(' > %s (%u)', $name, $count );
|
195 |
+
}*/
|
196 |
// extracted domains could prove that declared domain is wrong
|
197 |
if( $missing ){
|
198 |
foreach( array_keys($extra) as $name ){
|
src/package/Inverter.php
CHANGED
@@ -4,13 +4,11 @@
|
|
4 |
*/
|
5 |
abstract class Loco_package_Inverter {
|
6 |
|
7 |
-
|
8 |
/**
|
9 |
-
*
|
10 |
-
* @return
|
11 |
*/
|
12 |
-
public static function
|
13 |
-
|
14 |
// search paths for inverted bundle will exclude global ignore paths,
|
15 |
// plus anything known to the current configuration which we'll add now.
|
16 |
$finder = $bundle->getFileFinder();
|
@@ -37,14 +35,24 @@ abstract class Loco_package_Inverter {
|
|
37 |
}
|
38 |
}
|
39 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
// done with original bundle now
|
42 |
$bundle = clone $bundle;
|
43 |
$bundle->clear();
|
44 |
|
45 |
-
// Do a deep scan of all files that haven't been seen, or been excluded:
|
46 |
-
$found = $finder->setRecursive(true)->followLinks(false)->group('po','mo','pot')->exportGroups();
|
47 |
-
unset($finder);
|
48 |
|
49 |
// first iteration groups found files into common locations that should hopefully indicate translation sets
|
50 |
$groups = array();
|
@@ -57,7 +65,7 @@ abstract class Loco_package_Inverter {
|
|
57 |
/* @var $file Loco_fs_LocaleFile */
|
58 |
foreach( $list as $file ){
|
59 |
// printf("Found: %s <br />\n", $file );
|
60 |
-
// This file is
|
61 |
$dir = $file->getParent();
|
62 |
$key = $dir->getRelativePath( $root );
|
63 |
//
|
4 |
*/
|
5 |
abstract class Loco_package_Inverter {
|
6 |
|
|
|
7 |
/**
|
8 |
+
* Get all Gettext files that are not configured and valid in the given bundle
|
9 |
+
* @return array
|
10 |
*/
|
11 |
+
public static function export( Loco_package_Bundle $bundle ){
|
|
|
12 |
// search paths for inverted bundle will exclude global ignore paths,
|
13 |
// plus anything known to the current configuration which we'll add now.
|
14 |
$finder = $bundle->getFileFinder();
|
35 |
}
|
36 |
}
|
37 |
}
|
38 |
+
// Do a deep scan of all files that haven't been seen, or been excluded:
|
39 |
+
// This will include files in global directories and inside the bundle.
|
40 |
+
return $finder->setRecursive(true)->followLinks(false)->group('po','mo','pot')->exportGroups();
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Compile anything found under bundle root that isn't configured in $known
|
46 |
+
* @return Loco_package_Bundle
|
47 |
+
*/
|
48 |
+
public static function compile( Loco_package_Bundle $bundle ){
|
49 |
+
|
50 |
+
$found = self::export($bundle);
|
51 |
|
52 |
// done with original bundle now
|
53 |
$bundle = clone $bundle;
|
54 |
$bundle->clear();
|
55 |
|
|
|
|
|
|
|
56 |
|
57 |
// first iteration groups found files into common locations that should hopefully indicate translation sets
|
58 |
$groups = array();
|
65 |
/* @var $file Loco_fs_LocaleFile */
|
66 |
foreach( $list as $file ){
|
67 |
// printf("Found: %s <br />\n", $file );
|
68 |
+
// This file is NOT known to be part of a configured project
|
69 |
$dir = $file->getParent();
|
70 |
$key = $dir->getRelativePath( $root );
|
71 |
//
|
src/package/Project.php
CHANGED
@@ -501,7 +501,6 @@ class Loco_package_Project {
|
|
501 |
}
|
502 |
|
503 |
|
504 |
-
|
505 |
/**
|
506 |
* Take a guess at most likely POT file under target locations
|
507 |
* @return Loco_fs_File
|
@@ -617,6 +616,23 @@ class Loco_package_Project {
|
|
617 |
}
|
618 |
|
619 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
620 |
|
621 |
/**
|
622 |
* Intialize choice of PO file paths for a given locale
|
501 |
}
|
502 |
|
503 |
|
|
|
504 |
/**
|
505 |
* Take a guess at most likely POT file under target locations
|
506 |
* @return Loco_fs_File
|
616 |
}
|
617 |
|
618 |
|
619 |
+
/**
|
620 |
+
* @return Loco_fs_FileList
|
621 |
+
*/
|
622 |
+
public function findNotLocaleFiles( $ext ){
|
623 |
+
$list = new Loco_fs_LocaleFileList;
|
624 |
+
$files = $this->getTargetFinder()->exportGroups();
|
625 |
+
/* @var $file Loco_fs_LocaleFile */
|
626 |
+
foreach( $files[$ext] as $file ){
|
627 |
+
$file = new Loco_fs_LocaleFile( $file );
|
628 |
+
// add file if it has no locale suffix and is inside the bundle
|
629 |
+
if( $file->hasPrefixOnly() && ! $file->underGlobalDirectory() ){
|
630 |
+
$list->add( $file );
|
631 |
+
}
|
632 |
+
}
|
633 |
+
return $list;
|
634 |
+
}
|
635 |
+
|
636 |
|
637 |
/**
|
638 |
* Intialize choice of PO file paths for a given locale
|
tpl/admin/bundle/inc-po-table.php
CHANGED
@@ -29,13 +29,19 @@
|
|
29 |
</thead>
|
30 |
<tbody><?php
|
31 |
/* @var $po Loco_pages_ViewParams */
|
32 |
-
foreach( $pairs as $po )
|
33 |
<tr>
|
34 |
<td class="has-row-actions" data-sort-value="<?php $po->e('lname')?>">
|
35 |
-
<a href="<?php $po->e('edit')?>" class="row-title"
|
|
|
36 |
<span <?php echo $po->lattr?>><code><?php $po->e('lcode')?></code></span>
|
37 |
-
<span><?php $po->e('lname')?></span
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
39 |
<nav class="row-actions">
|
40 |
<span class="edit">
|
41 |
<a href="<?php $po->e('edit')?>"><?php esc_html_e('Edit','loco')?></a> |
|
@@ -49,8 +55,11 @@
|
|
49 |
<span class="_edit">
|
50 |
<a href="<?php $po->e('info')?>"><?php esc_html_e('Info','loco')?></a>
|
51 |
</span>
|
52 |
-
</nav
|
53 |
-
|
|
|
|
|
|
|
54 |
<td data-sort-value="<?php echo $po->meta->getPercent()?>">
|
55 |
<?php $po->meta->printProgress()?>
|
56 |
</td>
|
@@ -59,7 +68,20 @@
|
|
59 |
</td>
|
60 |
<td data-sort-value="<?php $po->f('todo','%u')?>">
|
61 |
<?php $po->n('todo')?>
|
|
|
|
|
|
|
|
|
|
|
62 |
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
<td data-sort-value="<?php $po->e('name')?>">
|
64 |
<a href="<?php $po->e('info')?>"><?php $po->e('name')?></a>
|
65 |
</td>
|
@@ -76,7 +98,7 @@
|
|
76 |
else:?>
|
77 |
<table class="wp-list-table widefat fixed striped">
|
78 |
<tr>
|
79 |
-
<td><?php
|
80 |
</tr>
|
81 |
</table><?php
|
82 |
endif;
|
29 |
</thead>
|
30 |
<tbody><?php
|
31 |
/* @var $po Loco_pages_ViewParams */
|
32 |
+
foreach( $pairs as $po ): $ispo = (bool) $po->lcode;?>
|
33 |
<tr>
|
34 |
<td class="has-row-actions" data-sort-value="<?php $po->e('lname')?>">
|
35 |
+
<a href="<?php $po->e('edit')?>" class="row-title"><?php
|
36 |
+
if( $ispo ):?>
|
37 |
<span <?php echo $po->lattr?>><code><?php $po->e('lcode')?></code></span>
|
38 |
+
<span><?php $po->e('lname')?></span><?php
|
39 |
+
else:?>
|
40 |
+
<span class="icon icon-file"></span>
|
41 |
+
<span>English (Template)</span><?php
|
42 |
+
endif?>
|
43 |
+
</a><?php
|
44 |
+
if( $domain ):?>
|
45 |
<nav class="row-actions">
|
46 |
<span class="edit">
|
47 |
<a href="<?php $po->e('edit')?>"><?php esc_html_e('Edit','loco')?></a> |
|
55 |
<span class="_edit">
|
56 |
<a href="<?php $po->e('info')?>"><?php esc_html_e('Info','loco')?></a>
|
57 |
</span>
|
58 |
+
</nav><?php
|
59 |
+
endif?>
|
60 |
+
</td><?php
|
61 |
+
|
62 |
+
if( $ispo ):?>
|
63 |
<td data-sort-value="<?php echo $po->meta->getPercent()?>">
|
64 |
<?php $po->meta->printProgress()?>
|
65 |
</td>
|
68 |
</td>
|
69 |
<td data-sort-value="<?php $po->f('todo','%u')?>">
|
70 |
<?php $po->n('todo')?>
|
71 |
+
</td><?php
|
72 |
+
|
73 |
+
else:?>
|
74 |
+
<td data-sort-value="-1">
|
75 |
+
-- <!-- no progress for template -->
|
76 |
</td>
|
77 |
+
<td>
|
78 |
+
<!-- no percentage for template -->
|
79 |
+
</td>
|
80 |
+
<td data-sort-value="-1">
|
81 |
+
-- <!-- no pendingfor template -->
|
82 |
+
</td><?php
|
83 |
+
endif?>
|
84 |
+
|
85 |
<td data-sort-value="<?php $po->e('name')?>">
|
86 |
<a href="<?php $po->e('info')?>"><?php $po->e('name')?></a>
|
87 |
</td>
|
98 |
else:?>
|
99 |
<table class="wp-list-table widefat fixed striped">
|
100 |
<tr>
|
101 |
+
<td><?php echo esc_html( sprintf( __('No translations found for "%s"','loco'), $domain ) )?></td>
|
102 |
</tr>
|
103 |
</table><?php
|
104 |
endif;
|
tpl/admin/bundle/incompat.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Incompatible bundle overview
|
4 |
-
*/
|
5 |
-
$this->extend('../layout');
|
6 |
-
?>
|
7 |
-
|
8 |
-
<div class="notice inline notice-error">
|
9 |
-
<p>
|
10 |
-
<strong class="has-icon"><?php esc_html_e('Unconfigured bundle','loco')?></strong><br />
|
11 |
-
<span>This bundle isn't automatically compatible and requires configuration.</span><br />
|
12 |
-
<span>Click the <a href="<?php $tabs[1]->e('href')?>">setup</a> tab for more information.</span>
|
13 |
-
</p>
|
14 |
-
</div>
|
15 |
-
|
16 |
-
|
17 |
-
<div class="loco-project">
|
18 |
-
<h2><?php $params->e('name')?> <span>(unconfigured)</span></h2>
|
19 |
-
<?php echo $this->render('inc-po-table', array( 'pairs' => null ) )?>
|
20 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tpl/admin/bundle/view.php
CHANGED
@@ -4,19 +4,8 @@
|
|
4 |
*/
|
5 |
$this->extend('../layout');
|
6 |
|
7 |
-
|
8 |
-
/*if( $warning ):?>
|
9 |
-
<div class="notice inline notice-warning">
|
10 |
-
<p>
|
11 |
-
<strong class="has-icon">Not fully configured</strong><br />
|
12 |
-
<span>This bundle may not work automatically with Loco Translate.</span>
|
13 |
-
<span>Click the <a href="<?php $tabs[1]->e('href')?>">setup</a> tab for more information.</span>
|
14 |
-
</p>
|
15 |
-
</div><?php
|
16 |
-
endif;*/
|
17 |
-
|
18 |
-
|
19 |
/* @var $p Loco_mvc_ViewParams */
|
|
|
20 |
foreach( $projects as $p ): ?>
|
21 |
<div class="loco-project" id="loco-<?php $p->e('id')?>"><?php
|
22 |
|
@@ -28,8 +17,43 @@ foreach( $projects as $p ): ?>
|
|
28 |
endif;
|
29 |
|
30 |
echo $this->render('inc-po-links', array( 'nav' => $p->nav ) );
|
31 |
-
echo $this->render('inc-po-table', array( 'pairs' => $p->po ) );
|
32 |
?>
|
33 |
|
34 |
</div><?php
|
35 |
-
endforeach;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
*/
|
5 |
$this->extend('../layout');
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
/* @var $p Loco_mvc_ViewParams */
|
8 |
+
if( $projects ):
|
9 |
foreach( $projects as $p ): ?>
|
10 |
<div class="loco-project" id="loco-<?php $p->e('id')?>"><?php
|
11 |
|
17 |
endif;
|
18 |
|
19 |
echo $this->render('inc-po-links', array( 'nav' => $p->nav ) );
|
20 |
+
echo $this->render('inc-po-table', array( 'pairs' => $p->po, 'domain' => $p->domain ) );
|
21 |
?>
|
22 |
|
23 |
</div><?php
|
24 |
+
endforeach;
|
25 |
+
if( $unknown ):?>
|
26 |
+
<div class="loco-project">
|
27 |
+
<div class="notice inline notice-info">
|
28 |
+
<h2><?php esc_html_e('Additional files found','loco')?></h2>
|
29 |
+
<p>
|
30 |
+
This bundle is only partially configured, so we don't know what the following files are for.<br />
|
31 |
+
Click the <a href="<?php $tabs[1]->e('href')?>">setup</a> tab to complete the bundle configuration.
|
32 |
+
</p>
|
33 |
+
</div>
|
34 |
+
<?php echo $this->render('inc-po-table', array( 'pairs' => $unknown, 'domain' => null ) )?>
|
35 |
+
</div><?php
|
36 |
+
endif;
|
37 |
+
|
38 |
+
|
39 |
+
|
40 |
+
// showing fully incompatible message if the additional files section won't be shown
|
41 |
+
else://if( ! $unknown ):?>
|
42 |
+
<div class="loco-project">
|
43 |
+
<div class="notice inline notice-error">
|
44 |
+
<h2><?php $params->e('name')?> <span>(unconfigured)</span></h2>
|
45 |
+
<p>
|
46 |
+
This bundle isn't automatically compatible and requires configuring before you can use all the functions of Loco Translate.<br />
|
47 |
+
Click the <a href="<?php $tabs[1]->e('href')?>">setup</a> tab to complete the bundle configuration.
|
48 |
+
</p>
|
49 |
+
</div>
|
50 |
+
</div><?php
|
51 |
+
if( $unknown ):?>
|
52 |
+
<div class="loco-project">
|
53 |
+
<?php echo $this->render('inc-po-table', array( 'pairs' => $unknown, 'domain' => null ) )?>
|
54 |
+
</div><?php
|
55 |
+
endif;
|
56 |
+
endif;
|
57 |
+
|
58 |
+
|
59 |
+
// show unknown files for restricted editing functionality
|
tpl/admin/config/settings.php
CHANGED
@@ -31,6 +31,22 @@ $this->extend('../layout');
|
|
31 |
</fieldset>
|
32 |
</td>
|
33 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
<tr>
|
35 |
<th scope="row"><?php esc_html_e('Backing up PO files','loco')?></th>
|
36 |
<td>
|
31 |
</fieldset>
|
32 |
</td>
|
33 |
</tr>
|
34 |
+
<tr>
|
35 |
+
<th scope="row"><?php esc_html_e('Extracting strings','loco')?></th>
|
36 |
+
<td>
|
37 |
+
<fieldset>
|
38 |
+
<legend class="screen-reader-text">
|
39 |
+
<span><?php esc_html_e('Extracting strings','loco')?></span>
|
40 |
+
</legend>
|
41 |
+
<p>
|
42 |
+
<label for="loco--max_php_size">
|
43 |
+
<?php esc_html_e('Skip PHP files larger than:','loco')?>
|
44 |
+
</label>
|
45 |
+
<input type="text" size="5" name="opts[max_php_size]" id="loco--max_php_size" value="<?php echo esc_attr( $opts->max_php_size)?>" />
|
46 |
+
</p>
|
47 |
+
</fieldset>
|
48 |
+
</td>
|
49 |
+
</tr>
|
50 |
<tr>
|
51 |
<th scope="row"><?php esc_html_e('Backing up PO files','loco')?></th>
|
52 |
<td>
|
tpl/admin/errors/no-tokenizer.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tokenizer extension required.
|
4 |
+
* Warning should appear above in normal location. This page is just for information.
|
5 |
+
*/
|
6 |
+
$this->extend('../layout');
|
7 |
+
|
8 |
+
?>
|
9 |
+
|
10 |
+
<div class="notice inline notice-info">
|
11 |
+
<h3 class="has-icon">
|
12 |
+
<?php esc_html_e('About the Tokenizer','loco')?>
|
13 |
+
</h3>
|
14 |
+
<p>
|
15 |
+
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.
|
16 |
+
</p>
|
17 |
+
<p>
|
18 |
+
The string extraction function is not available without it, but you can still translate any bundle that has a <a href="https://localise.biz/wordpress/plugin/manual/templates" target="_blank">template</a>.
|
19 |
+
</p>
|
20 |
+
</div>
|
tpl/admin/init/init-pot.php
CHANGED
@@ -11,7 +11,10 @@ $this->extend('../layout');
|
|
11 |
<p>
|
12 |
<?php esc_html_e('Source files to scan:','loco')?>
|
13 |
<strong><?php $scan->n('count')?></strong>
|
14 |
-
<span>(<?php $scan->e('size')?> on disk)</span
|
|
|
|
|
|
|
15 |
</p>
|
16 |
<p>
|
17 |
<?php esc_html_e('Strings will be extracted to:','loco')?>
|
11 |
<p>
|
12 |
<?php esc_html_e('Source files to scan:','loco')?>
|
13 |
<strong><?php $scan->n('count')?></strong>
|
14 |
+
<span>(<?php $scan->e('size')?> on disk)</span><?php
|
15 |
+
if( $n = $scan->skip ):?>
|
16 |
+
<em><?php echo esc_html( sprintf( _n('Excludes one file over %2$s','Excludes %s files over %s',$n,'loco'), $n, $scan->large ) );?>.</em><?php
|
17 |
+
endif?>
|
18 |
</p>
|
19 |
<p>
|
20 |
<?php esc_html_e('Strings will be extracted to:','loco')?>
|
tpl/admin/init/init-prompt.php
CHANGED
@@ -3,6 +3,9 @@
|
|
3 |
* Notice before creating a PO that there is no POT
|
4 |
*/
|
5 |
$this->extend('../layout');
|
|
|
|
|
|
|
6 |
?>
|
7 |
<div class="notice inline notice-warning">
|
8 |
<h3 class="has-icon">
|
@@ -10,7 +13,7 @@ $this->extend('../layout');
|
|
10 |
</h3><?php
|
11 |
if( $params->has('pot') ):?>
|
12 |
<p>
|
13 |
-
<?php esc_html_e("This bundle's template file doesn't exist yet. We recommend you create it before adding languages"
|
14 |
</p><?php
|
15 |
else:?>
|
16 |
<p>
|
@@ -23,6 +26,6 @@ $this->extend('../layout');
|
|
23 |
<p>
|
24 |
<a href="<?php $ext->e('link')?>" class="button button-link has-icon icon-add"><?php $ext->e('text')?></a>
|
25 |
<a href="<?php $skip->e('link')?>" class="button button-link has-icon icon-next"><?php $skip->e('text')?></a>
|
26 |
-
<a class="button button-link has-icon icon-help" href="
|
27 |
</p>
|
28 |
</div>
|
3 |
* Notice before creating a PO that there is no POT
|
4 |
*/
|
5 |
$this->extend('../layout');
|
6 |
+
|
7 |
+
$help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/templates');
|
8 |
+
|
9 |
?>
|
10 |
<div class="notice inline notice-warning">
|
11 |
<h3 class="has-icon">
|
13 |
</h3><?php
|
14 |
if( $params->has('pot') ):?>
|
15 |
<p>
|
16 |
+
<?php esc_html_e("This bundle's template file doesn't exist yet. We recommend you create it before adding languages",'loco')?>.
|
17 |
</p><?php
|
18 |
else:?>
|
19 |
<p>
|
26 |
<p>
|
27 |
<a href="<?php $ext->e('link')?>" class="button button-link has-icon icon-add"><?php $ext->e('text')?></a>
|
28 |
<a href="<?php $skip->e('link')?>" class="button button-link has-icon icon-next"><?php $skip->e('text')?></a>
|
29 |
+
<a class="button button-link has-icon icon-help" href="<?php echo esc_url($help)?>" target="_blank"><?php esc_html_e('About templates','loco')?></a>
|
30 |
</p>
|
31 |
</div>
|