dvadf
File manager - Edit - /home/theblueo/tv/wp-includes/pomo/lib/lib.tar
Back
compiled/languages.php 0000666 00000011754 15214056526 0011041 0 ustar 00 <?php /** * Downgraded for PHP 5.2 compatibility. Do not edit. */ return unserialize('a:207:{s:2:"aa";s:4:"Afar";s:2:"ab";s:9:"Abkhazian";s:2:"ae";s:7:"Avestan";s:2:"af";s:9:"Afrikaans";s:2:"ak";s:4:"Akan";s:2:"am";s:7:"Amharic";s:2:"an";s:9:"Aragonese";s:2:"ar";s:6:"Arabic";s:3:"arq";s:15:"Algerian Arabic";s:3:"ary";s:15:"Moroccan Arabic";s:2:"as";s:8:"Assamese";s:2:"av";s:6:"Avaric";s:2:"ay";s:6:"Aymara";s:2:"az";s:11:"Azerbaijani";s:3:"azb";s:17:"South Azerbaijani";s:2:"ba";s:7:"Bashkir";s:3:"bal";s:7:"Baluchi";s:3:"bcc";s:16:"Southern Balochi";s:2:"be";s:10:"Belarusian";s:2:"bg";s:9:"Bulgarian";s:2:"bi";s:7:"Bislama";s:2:"bm";s:7:"Bambara";s:2:"bn";s:7:"Bengali";s:2:"bo";s:7:"Tibetan";s:2:"br";s:6:"Breton";s:2:"bs";s:7:"Bosnian";s:2:"ca";s:7:"Catalan";s:2:"ce";s:7:"Chechen";s:3:"ceb";s:7:"Cebuano";s:2:"ch";s:8:"Chamorro";s:3:"ckb";s:15:"Central Kurdish";s:2:"co";s:8:"Corsican";s:2:"cr";s:4:"Cree";s:2:"cs";s:5:"Czech";s:2:"cu";s:13:"Church Slavic";s:2:"cv";s:7:"Chuvash";s:2:"cy";s:5:"Welsh";s:2:"da";s:6:"Danish";s:2:"de";s:6:"German";s:2:"dv";s:7:"Dhivehi";s:2:"dz";s:8:"Dzongkha";s:2:"ee";s:3:"Ewe";s:2:"el";s:5:"Greek";s:2:"en";s:7:"English";s:2:"eo";s:9:"Esperanto";s:2:"es";s:7:"Spanish";s:2:"et";s:8:"Estonian";s:2:"eu";s:6:"Basque";s:2:"fa";s:7:"Persian";s:2:"ff";s:5:"Fulah";s:2:"fi";s:7:"Finnish";s:2:"fj";s:6:"Fijian";s:2:"fo";s:7:"Faroese";s:2:"fr";s:6:"French";s:3:"frp";s:7:"Arpitan";s:3:"fuc";s:6:"Pulaar";s:3:"fur";s:8:"Friulian";s:2:"fy";s:15:"Western Frisian";s:2:"ga";s:5:"Irish";s:2:"gd";s:15:"Scottish Gaelic";s:2:"gl";s:8:"Galician";s:2:"gn";s:7:"Guarani";s:3:"gsw";s:12:"Swiss German";s:2:"gu";s:8:"Gujarati";s:2:"gv";s:4:"Manx";s:2:"ha";s:5:"Hausa";s:3:"haw";s:8:"Hawaiian";s:3:"haz";s:8:"Hazaragi";s:2:"he";s:6:"Hebrew";s:2:"hi";s:5:"Hindi";s:2:"ho";s:9:"Hiri Motu";s:2:"hr";s:8:"Croatian";s:2:"ht";s:7:"Haitian";s:2:"hu";s:9:"Hungarian";s:2:"hy";s:8:"Armenian";s:2:"hz";s:6:"Herero";s:2:"ia";s:11:"Interlingua";s:2:"id";s:10:"Indonesian";s:2:"ie";s:11:"Interlingue";s:2:"ig";s:4:"Igbo";s:2:"ii";s:10:"Sichuan Yi";s:2:"ik";s:7:"Inupiaq";s:2:"io";s:3:"Ido";s:2:"is";s:9:"Icelandic";s:2:"it";s:7:"Italian";s:2:"iu";s:9:"Inuktitut";s:2:"ja";s:8:"Japanese";s:2:"jv";s:8:"Javanese";s:2:"ka";s:8:"Georgian";s:3:"kab";s:6:"Kabyle";s:2:"kg";s:5:"Kongo";s:2:"ki";s:6:"Kikuyu";s:2:"kj";s:8:"Kuanyama";s:2:"kk";s:6:"Kazakh";s:2:"kl";s:11:"Kalaallisut";s:2:"km";s:13:"Central Khmer";s:2:"kn";s:7:"Kannada";s:2:"ko";s:6:"Korean";s:2:"kr";s:6:"Kanuri";s:2:"ks";s:8:"Kashmiri";s:2:"ku";s:7:"Kurdish";s:2:"kv";s:4:"Komi";s:2:"kw";s:7:"Cornish";s:2:"ky";s:7:"Kirghiz";s:2:"la";s:5:"Latin";s:2:"lb";s:13:"Luxembourgish";s:2:"lg";s:5:"Ganda";s:2:"li";s:9:"Limburgan";s:2:"ln";s:7:"Lingala";s:2:"lo";s:3:"Lao";s:2:"lt";s:10:"Lithuanian";s:2:"lu";s:12:"Luba-Katanga";s:2:"lv";s:7:"Latvian";s:2:"mg";s:8:"Malagasy";s:2:"mh";s:11:"Marshallese";s:2:"mi";s:5:"Maori";s:2:"mk";s:10:"Macedonian";s:2:"ml";s:9:"Malayalam";s:2:"mn";s:9:"Mongolian";s:2:"mr";s:7:"Marathi";s:2:"ms";s:5:"Malay";s:2:"mt";s:7:"Maltese";s:2:"my";s:7:"Burmese";s:2:"na";s:5:"Nauru";s:2:"nb";s:17:"Norwegian Bokmål";s:2:"nd";s:13:"North Ndebele";s:2:"ne";s:6:"Nepali";s:2:"ng";s:6:"Ndonga";s:2:"nl";s:5:"Dutch";s:2:"nn";s:17:"Norwegian Nynorsk";s:2:"no";s:9:"Norwegian";s:2:"nr";s:13:"South Ndebele";s:2:"nv";s:6:"Navajo";s:2:"ny";s:6:"Nyanja";s:2:"oc";s:19:"Occitan (post 1500)";s:2:"oj";s:6:"Ojibwa";s:2:"om";s:5:"Oromo";s:2:"or";s:5:"Oriya";s:3:"ory";s:27:"Oriya (individual language)";s:2:"os";s:8:"Ossetian";s:2:"pa";s:7:"Panjabi";s:2:"pi";s:4:"Pali";s:2:"pl";s:6:"Polish";s:2:"ps";s:6:"Pushto";s:2:"pt";s:10:"Portuguese";s:2:"qu";s:7:"Quechua";s:3:"rhg";s:8:"Rohingya";s:2:"rm";s:7:"Romansh";s:2:"rn";s:5:"Rundi";s:2:"ro";s:8:"Romanian";s:2:"ru";s:7:"Russian";s:3:"rue";s:5:"Rusyn";s:3:"rup";s:15:"Macedo-Romanian";s:2:"rw";s:11:"Kinyarwanda";s:2:"sa";s:8:"Sanskrit";s:3:"sah";s:5:"Yakut";s:2:"sc";s:9:"Sardinian";s:2:"sd";s:6:"Sindhi";s:2:"se";s:13:"Northern Sami";s:2:"sg";s:5:"Sango";s:2:"sh";s:14:"Serbo-Croatian";s:2:"si";s:7:"Sinhala";s:2:"sk";s:6:"Slovak";s:2:"sl";s:9:"Slovenian";s:2:"sm";s:6:"Samoan";s:2:"sn";s:5:"Shona";s:2:"so";s:6:"Somali";s:2:"sq";s:8:"Albanian";s:2:"sr";s:7:"Serbian";s:2:"ss";s:5:"Swati";s:2:"st";s:14:"Southern Sotho";s:2:"su";s:9:"Sundanese";s:2:"sv";s:7:"Swedish";s:2:"sw";s:7:"Swahili";s:3:"szl";s:8:"Silesian";s:2:"ta";s:5:"Tamil";s:2:"te";s:6:"Telugu";s:2:"tg";s:5:"Tajik";s:2:"th";s:4:"Thai";s:2:"ti";s:8:"Tigrinya";s:2:"tk";s:7:"Turkmen";s:2:"tl";s:7:"Tagalog";s:2:"tn";s:6:"Tswana";s:2:"to";s:21:"Tonga (Tonga Islands)";s:2:"tr";s:7:"Turkish";s:2:"ts";s:6:"Tsonga";s:2:"tt";s:5:"Tatar";s:2:"tw";s:3:"Twi";s:3:"twd";s:6:"Twents";s:2:"ty";s:8:"Tahitian";s:3:"tzm";s:23:"Central Atlas Tamazight";s:2:"ug";s:6:"Uighur";s:2:"uk";s:9:"Ukrainian";s:2:"ur";s:4:"Urdu";s:2:"uz";s:5:"Uzbek";s:2:"ve";s:5:"Venda";s:2:"vi";s:10:"Vietnamese";s:2:"vo";s:8:"Volapük";s:2:"wa";s:7:"Walloon";s:2:"wo";s:5:"Wolof";s:2:"xh";s:5:"Xhosa";s:3:"xmf";s:10:"Mingrelian";s:2:"yi";s:7:"Yiddish";s:2:"yo";s:6:"Yoruba";s:2:"za";s:6:"Zhuang";s:2:"zh";s:7:"Chinese";s:2:"zu";s:4:"Zulu";}'); compiled/phpunit.php 0000666 00000010117 15214056526 0010552 0 ustar 00 <?php /** * Downgraded for PHP 5.2 compatibility. Do not edit. */ class LocoDomQuery extends ArrayIterator { public static function parse( $source ){ $dom = new DOMDocument('1.0', 'UTF-8' ); $dom->preserveWhitespace = true; $dom->formatOutput = false; $source = '<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body>'.$source.'</body></html>'; $used_errors = libxml_use_internal_errors(true); $opts = 0; defined('LIBXML_HTML_NODEFDTD') and $opts |= LIBXML_HTML_NODEFDTD; $parsed = $dom->loadHTML( $source, $opts ); $errors = libxml_get_errors(); $used_errors || libxml_use_internal_errors(false); libxml_clear_errors(); if( $errors || ! $parsed ){ $e = new Loco_error_ParseException('Unknown parse error'); foreach( $errors as $error ){ $e = new Loco_error_ParseException( trim($error->message) ); $e->setContext( $error->line, $error->column, $source ); if( LIBXML_ERR_FATAL === $error->level ){ throw $e; } } if( ! $parsed ){ throw $e; } } return $dom; } public function __construct( $value ){ if( is_array($value) ){ $nodes = $value; } else if( $value instanceof DOMDocument ){ $nodes = array( $value->documentElement ); } else if( $value instanceof DOMNodeList ){ $nodes = array(); foreach( $value as $node ){ $nodes[] = $node; } } else { $value = self::parse( $value ); $nodes = array( $value->documentElement ); } parent::__construct( $nodes ); } public function eq( $index ){ $q = new LocoDomQuery(array()); if( $el = $this[$index] ){ $q[] = $el; } return $q; } public function find( $value ){ $q = new LocoDomQuery( array() ); $f = new _LocoDomQueryFilter($value); foreach( $this as $el ){ foreach( $f->filter($el) as $match ){ $q[] = $match; } } return $q; } public function text(){ $s = ''; foreach( $this as $el ){ $s .= $el->textContent; } return $s; } public function html(){ $s = ''; foreach( $this as $outer ){ foreach( $outer->childNodes as $inner ){ $s .= $inner->ownerDocument->saveXML($inner); } break; } return $s; } public function attr( $name ){ foreach( $this as $el ){ return $el->getAttribute($name); } return null; } public function serialize(){ $pairs = array(); foreach( array('input','select','textarea','button') as $type ){ foreach( $this->find($type) as $field ){ $name = $field->getAttribute('name'); if( ! $name ){ continue; } if( $field->hasAttribute('type') ){ $type = $field->getAttribute('type'); } if( 'select' === $type ){ $value = null; $f = new _LocoDomQueryFilter('option'); foreach( $f->filter($field) as $option ){ if( $option->hasAttribute('value') ){ $_value = $option->getAttribute('value'); } else { $_value = $option->nodeValue; } if( $option->hasAttribute('selected') ){ $value = $_value; break; } else if( is_null($value) ){ $value = $_value; } } if( is_null($value) ){ $value = ''; } } else if( 'checkbox' === $type || 'radio' === $type ){ if( $field->hasAttribute('checked') ){ $value = $field->getAttribute('value'); } else { continue; } } else if( 'file' === $type ){ $value = ''; } else if( $field->hasAttribute('value') ){ $value = $field->getAttribute('value'); } else { $value = $field->textContent; } $pairs[] = sprintf('%s=%s', rawurlencode($name), rawurlencode($value) ); } } return implode('&',$pairs); } } class _LocoDomQueryFilter { private $tag; private $attr = array(); public function __construct( $value ){ if( ! preg_match('/^([a-z1-6]*)(\.[-a-z]+)?(\[(\w+)="(.+)"\])?$/i', $value, $r ) ){ throw new InvalidArgumentException('Bad filter, '.$value ); } if( $r[1] ){ $this->tag = $r[1]; } if( ! empty($r[2]) ){ $this->attr['class'] = substr($r[2],1); } if( ! empty($r[3]) ){ $this->attr[ $r[4] ] = $r[5]; } } public function filter( DOMElement $el ){ if( $this->tag ){ $list = $el->getElementsByTagName($this->tag); } else { $list = $el->childNodes; } if( $this->attr ){ return $this->reduce( $list ); } return $list; } public function reduce( DOMNodeList $list ){ $reduced = array(); foreach( $list as $node ){ foreach( $this->attr as $name => $value ){ if( ! $node->hasAttribute($name) ){ continue 2; } $values = array_flip( explode(' ', $node->getAttribute($name) ) ); if( ! isset($values[$value]) ){ continue 2; } } $reduced[] = $node; } return $reduced; } } compiled/gettext.php 0000666 00000104576 15214056526 0010564 0 ustar 00 <?php /** * Downgraded for PHP 5.2 compatibility. Do not edit. */ 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("\n", $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("\n",$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_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( "\xEF\xBB\xBF" === $m ){ $str = substr( $str, 3 ); } else if( "\xFF" === $m{0} && "\xFE" === $m{1} ){ $str = substr( $str, 2 ); $enc = 'UTF-16LE'; } else if( "\xFE" === $m{0} && "\xFF" === $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 = "\xEF\xBB\xBF".$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," \t") ){ $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) ), "/ \n\r\t" ); } else if( preg_match('/^msg(id|str|ctxt|id_plural)(?:\[(\d+)\])?[ \t]+/', $line, $r ) ){ $key = $r[1]; $idx = isset($r[2]) ? (int) $r[2] : 0; if( 'str' === $key ){ if( ! isset($entry['i']) ){ $entry['i'] = ++$i; $entries[$i] = &$entry; } } else if( ! isset($entry) || isset($entry['i']) ){ unset( $entry ); $entry = $template; } $line = substr( $line, strlen($r[0]) ); continue; } continue 2; } } unset( $entry ); $assets = array(); foreach( $entries as $i => $entry ){ if( empty($entry['id']) ){ continue; } if( empty($entry['str']) ){ $entry['str'] = array( array('') ); } $asset = array( 'id' => null, 'source' => implode('',$entry['id'][0]), 'target' => implode('',$entry['str'][0]), ); if( isset($entry['ctxt'][0]) ){ $asset['context'] = implode('',$entry['ctxt'][0]); } if( isset($entry['#'][' ']) ){ $asset['comment'] = implode("\n", $entry['#'][' '] ); } if( isset($entry['#']['.']) ){ $asset['notes'] = implode("\n", $entry['#']['.'] ); } if( isset($entry['#'][':']) ){ if( $refs = implode( ' ', $entry['#'][':'] ) ) { if( $refs = loco_parse_reference_id( $refs, $_id ) ){ $asset['refs'] = $refs; } if( $_id ){ $asset['_id'] = $_id; } } } if( isset($entry['#'][',']) ){ foreach( $entry['#'][','] as $flag ){ if( preg_match('/((?:no-)?\w+)-format/', $flag, $r ) ){ $asset['format'] = $r[1]; } else if( $flag = loco_po_parse_flag($flag) ){ $asset['flag'] = $flag; break; } } } $pidx = count($assets); $assets[] = $asset; if( isset($entry['id_plural']) || isset($entry['str'][1]) ){ $idx = 0; $num = max( 2, count($entry['str']) ); while( ++$idx < $num ){ $plural = array ( 'id' => null, 'source' => '', 'target' => isset($entry['str'][$idx]) ? implode('',$entry['str'][$idx]) : '', 'plural' => $idx, 'parent' => $pidx, ); if( 1 === $idx ){ $plural['source'] = isset($entry['id_plural'][0]) ? implode('',$entry['id_plural'][0]) : ''; } $assets[] = $plural; } } } if( isset($assets[0]) && '' === $assets[0]['source'] ){ $headers = loco_parse_po_headers( $assets[0]['target'] ); $indexed = $headers['X-Loco-Lookup']; if( $indexed && 'text' !== $indexed ){ foreach( $assets as $i => $asset ){ if( isset($asset['notes']) ){ $notes = $texts = array(); foreach( explode("\n",$asset['notes']) as $line ){ 0 === strpos($line,'Source text: ') ? $texts[] = substr($line,13) : $notes[] = $line; } $assets[$i]['notes'] = implode("\n",$notes); $assets[$i]['id'] = $asset['source']; $assets[$i]['source'] = implode("\n",$texts); } } } } return $assets; } function loco_po_parse_flag( $text ){ static $map; $flag = 0; foreach( explode(',',$text) as $needle ){ if( $needle = trim($needle) ){ if( ! isset($map) ){ $map = unserialize('a:1:{i:4;s:8:"#, fuzzy";}'); } foreach( $map as $loco_flag => $haystack ){ if( false !== stripos($haystack, $needle) ){ $flag = $loco_flag; break 2; } } } } return $flag; } function loco_parse_po_headers( $str ){ return LocoPoHeaders::fromMsgstr($str); } class LocoMoParser { private $bin; private $be; private $n; private $o; private $t; private $v; private $cs; public function __construct( $bin ){ $this->bin = $bin; } public function getAt( $idx ){ $offset = $this->targetOffset(); $offset += ( $idx * 8 ); $len = $this->integerAt( $offset ); $idx = $this->integerAt( $offset + 4 ); $txt = $this->bytes( $idx, $len ); if( false === strpos( $txt, "\0") ){ return $txt; } return explode( "\0", $txt ); } public function parse(){ $r = array(); $sourceOffset = $this->sourceOffset(); $targetOffset = $this->targetOffset(); $soffset = $sourceOffset; $toffset = $targetOffset; while( $soffset < $targetOffset ){ $len = $this->integerAt( $soffset ); $idx = $this->integerAt( $soffset + 4 ); $src = $this->bytes( $idx, $len ); $eot = strpos( $src, "\x04" ); if( false === $eot ){ $context = null; } else { $context = $this->decodeStr( substr($src, 0, $eot ) ); $src = substr( $src, $eot+1 ); } $sources = explode( "\0", $src, 2 ); $len = $this->integerAt( $toffset ); $idx = $this->integerAt( $toffset + 4 ); $targets = explode( "\0", $this->bytes( $idx, $len ) ); $r[] = array( 'id' => null, 'source' => $this->decodeStr( $sources[0] ), 'target' => $this->decodeStr( $targets[0] ), 'context' => $context, ); if( isset($sources[1]) ){ $p = count($r) - 1; $nforms = max( 2, count($targets) ); for( $i = 1; $i < $nforms; $i++ ){ $r[] = array( 'id' => null, 'source' => isset($sources[$i]) ? $this->decodeStr( $sources[$i] ) : sprintf('%s (plural %u)',$r[$p]['source'],$i), 'target' => isset($targets[$i]) ? $this->decodeStr( $targets[$i] ) : '', 'parent' => $p, 'plural' => $i, ); } } $soffset += 8; $toffset += 8; } return $r; } public function isBigendian(){ while( is_null($this->be) ){ $str = $this->words( 0, 1 ); if( "\xDE\x12\x04\x95" === $str ){ $this->be = false; break; } if( "\x95\x04\x12\xDE" === $str ){ $this->be = true; break; } throw new Loco_error_ParseException('Invalid MO format'); } return $this->be; } public function version(){ if( is_null($this->v) ){ $this->v = $this->integerWord(1); } return $this->v; } public function count(){ if( is_null($this->n) ){ $this->n = $this->integerWord(2); } return $this->n; } public function sourceOffset(){ if( is_null($this->o) ){ $this->o = $this->integerWord(3); } return $this->o; } public function targetOffset(){ if( is_null($this->t) ){ $this->t = $this->integerWord(4); } return $this->t; } public function getHashTable(){ $s = $this->integerWord(5); $h = $this->integerWord(6); return $this->bytes( $h, $s * 4 ); } private function bytes( $offset, $length ){ return substr( $this->bin, $offset, $length ); } private function words( $offset, $length ){ return $this->bytes( $offset * 4, $length * 4 ); } private function integerWord( $offset ){ return $this->integerAt( $offset * 4 ); } private function integerAt( $offset ){ $str = $this->bytes( $offset, 4 ); $fmt = $this->isBigendian() ? 'N' : 'V'; $arr = unpack( $fmt, $str ); if( ! isset($arr[1]) || ! is_int($arr[1]) ){ throw new Loco_error_ParseException('Failed to read integer at byte '.$offset); } return $arr[1]; } private function decodeStr( $str ){ if( $this->cs ){ $enc = $this->cs; } else { $enc = mb_detect_encoding( $str, array('ASCII','UTF-8','ISO-8859-1'), false ); if( 'ASCII' !== $enc ){ $this->cs = $enc; } } if( 'UTF-8' !== $enc ){ $str = mb_convert_encoding( $str, 'UTF-8', array($enc) ); } return $str; } } function loco_parse_mo( $src ){ $mo = new LocoMoParser($src); return $mo->parse(); } function loco_parse_comment($comment){ if( '*' === $comment{1} ){ $lines = array(); $junk = "\r\t/ *"; foreach( explode("\n", $comment) as $line ){ if( $line = trim($line,$junk) ){ $lines[] = trim($line,$junk); } } return implode("\n", $lines); } return trim( $comment,"/ \n\r\t" ); } function loco_parse_wp_comment( $block ){ $header = array(); if( '*' === $block{1} ){ $junk = "\r\t/ *"; foreach( explode("\n", $block) as $line ){ if( false !== ( $i = strpos($line,':') ) ){ $key = substr($line,0,$i); $val = substr($line,++$i); $header[ trim($key,$junk) ] = trim($val,$junk); } } } return $header; } abstract class LocoExtractor { private $rules; private $exp = array(); private $reg = array(); private $dom = array(); private $wp = array(); private $dflt = ''; abstract public function decapse( $raw ); abstract public function fsniff( $str ); public function __construct( array $rules ){ $this->rules = $rules; } public function getTotal(){ return count( $this->exp ); } public function getDomainCounts(){ return $this->dom; } public function setDomain( $default ){ $this->dflt = (string) $default; return $this; } public function headerize( array $tags, $domain = '' ){ if( isset($this->wp[$domain]) ){ $this->wp[$domain] += $tags; } else { $this->wp[$domain] = $tags; } return $this; } public function extract( LocoTokensInterface $tokens, $fileref ){ $n = 0; $comment = ''; foreach( $tokens as $tok ){ if( is_string($tok) ){ $s = $tok; $t = null; } else { $t = $tok[0]; $s = $tok[1]; if( T_WHITESPACE === $t ){ throw new RuntimeException( get_class($tokens).' should not allow whitespace through' ); } } if( isset($args) ){ if( ')' === $s ){ if( 0 === --$depth ){ if( isset($arg) ){ $args[] = $arg; } $this->push( $rule, $args, $comment, $ref ); unset($args,$arg); $comment = ''; $n++; } } else if( '(' === $s ){ $depth++; } else if( ',' === $s ){ if( isset($arg) ){ $args[] = $arg; unset($arg); } } else if( isset($arg) ){ $arg[] = $tok; } else { $arg = array( $tok ); } } else if( T_COMMENT === $t || T_DOC_COMMENT === $t ){ if( $this->wp && 0 === $n && ( $header = loco_parse_wp_comment($s) ) ){ foreach( $this->wp as $domain => $tags ){ foreach( array_intersect_key($header,$tags) as $tag => $source ){ $this->pushMeta( $source, $tags[$tag], $domain ); } } } else { $comment = $s; } } else if( T_STRING === $t && isset($this->rules[$s]) && '(' === $tokens->advance() ){ $rule = $this->rules[$s]; $args = array(); $ref = $fileref ? $fileref.':'.$tok[2]: ''; $depth = 1; } else if( $comment ){ if( false === stripos($comment, 'translators:') && false === strpos($comment, 'xgettext:') ){ $comment = ''; } } } return $this->exp; } public function pushMeta( $source, $notes = '', $domain = null ){ if( ! $domain ){ $domain = $this->dflt; } $entry = array( 'id' => '', 'source' => $source, 'target' => '', 'notes' => $notes, ); if( $domain ){ $entry['domain'] = $domain; $key = $source."\1".$domain; } else { $key = $source; } $this->pushMsgid( $key, $entry, $domain ); return $this; } private function pushMsgid( $key, array $entry, $domain ){ if( isset($this->reg[$key]) ){ $index = $this->reg[$key]; $a = array(); isset($this->exp[$index]['refs']) and $a[] = $this->exp[$index]['refs']; isset($entry['refs']) and $a[] = $entry['refs']; $a && $this->exp[$index]['refs'] = implode(" ", $a ); $a = array(); isset($this->exp[$index]['notes']) and $a[] = $this->exp[$index]['notes']; isset($entry['notes']) and $a[] = $entry['notes']; $a && $this->exp[$index]['notes'] = implode("\n", $a ); } else { $index = count($this->exp); $this->reg[$key] = $index; $this->exp[] = $entry; if( isset($this->dom[$domain]) ){ $this->dom[$domain]++; } else { $this->dom[$domain] = 1; } } return $index; } private function push( $rule, array $args, $comment = '', $ref = '' ){ $s = strpos( $rule, 's'); $p = strpos( $rule, 'p'); $c = strpos( $rule, 'c'); $d = strpos( $rule, 'd'); foreach( $args as $i => $tokens ){ if( 1 === count($tokens) && is_array($tokens[0]) && T_CONSTANT_ENCAPSED_STRING === $tokens[0][0] ){ $args[$i] = $this->decapse( $tokens[0][1] ); } else { $args[$i] = null; } } if( ! isset($args[$s]) ){ return null; } $key = $msgid = $args[$s]; if( ! is_string($msgid) ){ return null; } $entry = array( 'id' => '', 'source' => $msgid, 'target' => '', ); if( is_int($c) && isset($args[$c]) ){ $entry['context'] = $context = $args[$c]; $key .= "\0". $context; } else if( ! isset($msgid{0}) ){ return null; } else { $context = null; } if( $ref ){ $entry['refs'] = $ref; } if( is_int($d) && array_key_exists($d,$args) ){ $domain = $args[$d]; if( is_null($domain) ){ $domain = ''; } } else { $domain = $this->dflt; } if( $domain ){ $entry['domain'] = $domain; $key .= "\1".$domain; } $parse_printf = true; if( $comment ){ if( preg_match('/xgettext:\s*((?:no-)?\w+)-format/', $comment, $r ) ){ $entry['format'] = $r[1]; if( 'no-' === substr($r[1],0,3) ){ $parse_printf = false; } else { $parse_printf = null; } $comment = str_replace( $r[0], '', $comment ); } $comment = loco_parse_comment($comment); if( preg_match('/^translators:\s+/i', $comment, $r ) ){ $comment = substr( $comment, strlen($r[0]) ); } $entry['notes'] = $comment; } if( $parse_printf && ( $format = $this->fsniff($msgid) ) ){ $entry['format'] = $format; } $index = $this->pushMsgid( $key, $entry, $domain ); if( is_int($p) && isset($args[$p]) ){ $msgid_plural = $args[$p]; $entry = array( 'id' => '', 'source' => $msgid_plural, 'target' => '', 'plural' => 1, 'parent' => $index, ); if( false !== $parse_printf && ( $format = $this->fsniff($msgid_plural) ) ){ $entry['format'] = $format; } $pkey = $key."\2"; if( isset($this->reg[$pkey]) ){ $plural_index = $this->reg[$pkey]; $this->exp[$plural_index] = $entry; } else { $plural_index = count($this->exp); $this->reg[$pkey] = $plural_index; $this->exp[] = $entry; } } return $index; } public function filter( $domain ){ $map = array(); $newOffset = 1; $matchAll = '*' === $domain; $raw = array( array( 'id' => '', 'source' => '', 'target' => '', 'domain' => $matchAll ? '' : $domain, ) ); foreach( $this->exp as $oldOffset => $r ){ if( isset($r['parent']) ){ if( isset($map[$r['parent']]) ){ $r['parent'] = $map[ $r['parent'] ]; $raw[ $newOffset++ ] = $r; } } else { if( $matchAll ){ $match = true; } else if( isset($r['domain']) ){ $match = $domain === $r['domain']; } else { $match = $domain === ''; } if( $match ){ $map[ $oldOffset ] = $newOffset; $raw[ $newOffset++ ] = $r; } } } return $raw; } } interface LocoTokensInterface extends Iterator { public function advance(); } class LocoPHPTokens implements LocoTokensInterface { private $i; private $tokens; private $skip_tokens = array(); private $skip_strings = array(); private $literal_tokens = array(); public function __construct( array $tokens ){ $this->tokens = $tokens; $this->rewind(); } public function literal(){ foreach( func_get_args() as $t ){ $this->literal_tokens[ $t ] = 1; } return $this; } public function ignore(){ foreach( func_get_args() as $t ){ if( is_int($t) ){ $this->skip_tokens[$t] = true; } else { $this->skip_strings[$t] = true; } } return $this; } public function export(){ $arr = array(); foreach( $this as $tok ){ $arr[] = $tok; } return $arr; } public function advance(){ $this->next(); return $this->current(); } public function pop(){ $tok = array_pop( $this->tokens ); $this->rewind(); return $tok; } public function shift(){ $tok = array_shift( $this->tokens); $this->rewind(); return $tok; } public function rewind(){ $this->i = ( false === reset($this->tokens) ? null : key($this->tokens) ); } public function valid(){ while( isset($this->i) ){ $tok = $this->tokens[$this->i]; if( is_array($tok) ){ if( isset($this->skip_tokens[$tok[0]]) ){ $this->next(); } else { return true; } } else if( isset($this->skip_strings[$tok]) ){ $this->next(); } else { return true; } } return false; } public function key(){ return $this->i; } public function next(){ $this->i = ( false === next($this->tokens) ? null : key($this->tokens) ); } public function current(){ if( ! $this->valid() ){ return false; } $tok = $this->tokens[$this->i]; if( is_array($tok) && isset($this->literal_tokens[$tok[0]]) ){ return $tok[1]; } return $tok; } public function __toString(){ $s = ''; foreach( $this as $token ){ $s .= is_array($token) ? $token[1] : $token; } return $s; } } function loco_sniff_php_printf( $s ){ $n = 0; while( $s && false !== ( $i = strpos($s,'%') ) ){ if( 0 !== $i ){ $s = substr( $s, $i ); } if( ! preg_match('/^%(?:\\d+\\$)?[-+]?(?:\'.)?[ 0]*-?\\d*(?:\\.\d+)?[bcdeEfFgGosuxX%]/', $s, $r ) ){ return 0; } $s = substr( $s, strlen($r[0]) ); $n++; } return $n; } function loco_decapse_php_string( $s ){ if( ! $s ){ return ''; } $q = $s{0}; if( "'" === $q ){ return str_replace( array( '\\'.$q, '\\\\' ), array( $q, '\\' ), substr( $s, 1, -1 ) ); } if( '"' !== $q ){ return $s; } $s = substr( $s, 1, -1 ); $a = ''; $e = false; $symbols = array ( 'n' => "\x0A", 'r' => "\x0D", 't' => "\x09", 'v' => "\x0B", 'f' => "\x0C", 'e' => "\x1B", '$' => '$', '\\' => '\\', '"' => '"', ); foreach( explode('\\', $s) as $i => $t ){ if( '' === $t ){ if( $e ){ $a .= '\\'; } $e = ! $e; continue; } if( $e ){ $c = $t{0}; while( true ){ if( 'x' === $c || 'X' === $c ){ if( preg_match('/^x([0-9a-f]{1,2})/i', $t, $n ) ){ $c = chr( intval( $n[1], 16 ) ); $n = strlen($n[0]); break; } } else if( isset($symbols[$c]) ){ $c = $symbols[$c]; $n = 1; break; } else if( preg_match('/^[0-7]{1,3}/', $t, $n ) ){ $c = chr( intval( $n[0], 8 ) ); $n = strlen($n[0]); break; } $a .= '\\'.$t; continue 2; } $a .= substr_replace( $t, $c, 0, $n ); continue; } $a .= $t; $e = true; } return $a; } final class LocoPHPExtractor extends LocoExtractor { public function extractSource( $src, $fileref = '' ){ $tokens = new LocoPHPTokens( token_get_all($src) ); $tokens->ignore( T_WHITESPACE ); return $this->extract( $tokens, $fileref ); } public function decapse( $raw ){ return loco_decapse_php_string( $raw ); } public function fsniff( $str ){ return loco_sniff_php_printf($str) ? 'php' : ''; } } function loco_wp_extractor(){ $e = new LocoPHPExtractor( array( '__' => 'sd', '_e' => 'sd', '_c' => 'sd', '_n' => 'sp_d', '_n_noop' => 'spd', '_nc' => 'sp_d', '__ngettext' => 'spd', '__ngettext_noop' => 'spd', '_x' => 'scd', '_ex' => 'scd', '_nx' => 'sp_cd', '_nx_noop' => 'spcd', 'esc_attr__' => 'sd', 'esc_html__' => 'sd', 'esc_attr_e' => 'sd', 'esc_html_e' => 'sd', 'esc_attr_x' => 'scd', 'esc_html_x' => 'scd', ) ); return $e->setDomain('default'); } abstract class LocoPo { public static function pair( $key, $text, $width = 79 ){ if( ! $text && '0' !== $text ){ return $key.' ""'; } $text = addcslashes( $text, "\t\x0B\x0C\x07\x08\\\"" ); $text = preg_replace('/\R/u', "\\n\n", $text, -1, $nbr ); if( $nbr ){ } else if( $width && $width < mb_strlen($text,'UTF-8') + strlen($key) + 3 ){ } else { return $key.' "'.$text.'"'; } $lines = array( $key.' "' ); if( $width ){ $width -= 2; $a = '/^.{0,'.($width-1).'}[-– \\.,:;\\?!\\)\\]\\}\\>]/u'; $b = '/^[^-– \\.,:;\\?!\\)\\]\\}\\>]+/u'; foreach( explode("\n",$text) as $unwrapped ){ $length = mb_strlen( $unwrapped, 'UTF-8' ); while( $length > $width ){ if( preg_match( $a, $unwrapped, $r ) ){ $line = $r[0]; } else if( preg_match( $b, $unwrapped, $r ) ){ $line = $r[0]; } else { throw new Exception('Wrapping error'); } $lines[] = $line; $trunc = mb_strlen($line,'UTF-8'); $length -= $trunc; $unwrapped = substr( $unwrapped, strlen($line) ); if( ( false === $unwrapped && 0 !== $length ) || ( 0 === $length && false !== $unwrapped ) ){ throw new Exception('Truncation error'); } } if( 0 !== $length ){ $lines[] = $unwrapped; } } } else { foreach( explode("\n",$text) as $unwrapped ){ $lines[] = $unwrapped; } } return implode("\"\n\"",$lines).'"'; } public static function refs( $text, $width = 76 ){ $text = preg_replace('/\s+/', ' ', $text ); return '#: '.wordwrap( $text, $width, "\n#: ", false ); } public static function prefix( $text, $prefix ){ $lines = preg_split('/\\R/u', $text, -1 ); return $prefix.implode( "\n".$prefix, $lines ); } } class LocoPoIterator implements Iterator { private $po; private $headers; private $i; private $t; private $j; private $z; private $m; public function __construct( $po ){ $this->po = $po; $this->t = count( $po ); if( ! isset($po[0]) ){ throw new InvalidArgumentException('Empty PO data'); } $h = $po[0]; if( '' === $h['source'] && empty($h['context']) ){ $this->z = 0; } else { $this->z = -1; } } public function rewind(){ $this->i = $this->z; $this->j = -1; $this->next(); } public function key(){ return $this->j; } public function valid(){ return is_int($this->i); } public function next(){ $i = $this->i; while( ++$i < $this->t ){ $this->j++; $this->i = $i; return; } $this->i = null; $this->j = null; } public function current(){ $i = $this->i; $po = $this->po; $parent = new LocoPoMessage( $po[$i] ); $plurals = array(); while( isset($po[++$i]['parent']) ){ $this->i = $i; $plurals[] = new LocoPoMessage( $po[$i] ); } if( $plurals ){ $parent['plurals'] = $plurals; } return $parent; } public function getArrayCopy(){ $po = $this->po; if( 0 === $this->z ){ $po[0]['target'] = (string) $this->getHeaders(); } return $po; } public function getHeaders(){ if( ! $this->headers ){ $header = $this->po[0]; if( 0 === $this->z ){ $this->headers = loco_parse_po_headers( $header['target'] ); } else { $this->headers = new LocoPoHeaders; } } return $this->headers; } public function initPo(){ if( 0 === $this->z ){ unset( $this->po[0]['flag'] ); } return $this; } public function initPot(){ if( 0 === $this->z ){ $this->po[0]['flag'] = 4; } return $this; } public function strip(){ $po = $this->po; $i = count($po); $z = $this->z; while( --$i > $z ){ $po[$i]['target'] = ''; } $this->po = $po; return $this; } public function __toString(){ try { if( 0 === $this->z ){ $h = $this->po[0]; } else { $h = array( 'source' => '' ); } $h['target'] = (string) $this->getHeaders(); $msg = new LocoPoMessage( $h ); $s = $msg->__toString(); foreach( $this as $msg ){ $s .= "\n".$msg->__toString(); } } catch( Exception $e ){ trigger_error( $e->getMessage(), E_USER_WARNING ); $s = ''; } return $s; } public function getHashes(){ $a = array(); foreach( $this as $msg ){ $a[] = $msg->getHash(); } sort( $a, SORT_STRING ); return $a; } public function equalSource( LocoPoIterator $that ){ $a = $this->getHashes(); $b = $that->getHashes(); if( count($a) !== count($b) ){ return false; } foreach( $a as $i => $hash ){ if( $hash !== $b[$i] ){ return false; } } return true; } } class LocoPoMessage extends ArrayObject { public function __construct( array $r ){ $r['key'] = $r['source']; parent::__construct($r); } public function __get( $prop ){ return isset($this[$prop]) ? $this[$prop] : null; } private function _getFlags(){ $flags = array(); $plurals = $this->__get('plurals'); if( 4 === $this->__get('flag') ){ $flags[] = 'fuzzy'; } else if( $plurals ){ foreach( $plurals as $child ){ if( 4 === $child->__get('flag') ){ $flags[] = 'fuzzy'; break; } } } if( $f = $this->__get('format') ){ $flags[] = $f.'-format'; } else if( isset($plurals[0]) && ( $f = $plurals[0]->__get('format') ) ){ $flags[] = $f.'-format'; } return $flags; } public function getHash(){ $msgid = $this['source']; if( isset($this['context']) ){ $msgctxt = $this['context']; if( is_string($msgctxt) && '' !== $msgctxt ){ if( ! $msgid && '0' !== $msgid ){ $msgid = '('.$msgctxt.')'; } $msgid = $msgctxt."\x04".$msgid; } } if( isset($this['plurals']) ){ foreach( $this['plurals'] as $p ){ $msgid .= "\0".$p->getHash(); break; } } return $msgid; } public function __toString(){ $s = ''; try { if( $text = $this->__get('comment') ) { $s .= LocoPo::prefix( $text, '# ')."\n"; } if( $text = $this->__get('notes') ) { $s .= LocoPo::prefix( $text, '#. ')."\n"; } if( $text = $this->__get('refs') ){ $s .= LocoPo::refs( $text )."\n"; } if( $texts = $this->_getFlags() ){ $s .= '#, '.implode(', ',$texts)."\n"; } $text = $this->__get('context'); if( is_string($text) && isset($text{0}) ){ $s .= LocoPo::pair('msgctxt', $text )."\n"; } $s .= LocoPo::pair( 'msgid', $this['key'] )."\n"; $target = $this['target']; if( is_array( $plurals = $this->__get('plurals') ) ){ if( $plurals ){ foreach( $plurals as $i => $p ){ if( 0 === $i ){ $s .= LocoPo::pair('msgid_plural', $p['key'])."\n"; $s .= LocoPo::pair('msgstr[0]', $target)."\n"; } $s .= LocoPo::pair('msgstr['.(++$i).']', $p['target'])."\n"; } } else if( isset($this['plural_key']) ){ $s .= LocoPo::pair('msgid_plural', $this['plural_key'] )."\n"; $s .= LocoPo::pair('msgstr[0]', $target)."\n"; } else { trigger_error('Missing plural_key in zero plural export'); $s .= LocoPo::pair('msgstr', $target )."\n"; } } else { $s .= LocoPo::pair('msgstr', $target )."\n"; } } catch( Exception $e ){ trigger_error( $e->getMessage(), E_USER_WARNING ); } return $s; } } class LocoMoTable { private $size = 0; private $bin = ''; private $map; public function __construct( $data = null ){ if( is_array($data) ){ $this->compile( $data ); } else if( $data ){ $this->parse( $data ); } } public function count(){ if( ! isset($this->size) ){ if( $this->bin ){ $this->size = (int) ( strlen( $this->bin ) / 4 ); } else if( is_array($this->map) ){ $this->size = count($this->map); } else { return 0; } if( ! self::is_prime($this->size) || $this->size < 3 ){ throw new Exception('Size expected to be prime number above 2, got '.$this->size); } } return $this->size; } public function bytes(){ return $this->count() * 4; } public function __toString(){ return $this->bin; } public function export(){ if( ! is_array($this->map) ){ $this->parse( $this->bin ); } return $this->map; } private function reset( $length ){ $this->size = max( 3, self::next_prime ( $length * 4 / 3 ) ); $this->bin = null; $this->map = array(); return $this->size; } public function compile( array $msgids ){ $hash_tab_size = $this->reset( count($msgids) ); $packed = array_fill( 0, $hash_tab_size, "\0\0\0\0" ); $j = 0; foreach( $msgids as $msgid ){ $hash_val = self::hashpjw( $msgid ); $idx = $hash_val % $hash_tab_size; if( array_key_exists($idx, $this->map) ){ $incr = 1 + ( $hash_val % ( $hash_tab_size - 2 ) ); do { $idx += $incr; if( $hash_val === $idx ){ throw new Exception('Unable to find empty slot in hash table'); } $idx %= $hash_tab_size; } while( array_key_exists($idx, $this->map ) ); } $this->map[$idx] = $j; $packed[$idx] = pack('V', ++$j ); } return $this->bin = implode('',$packed); } public function lookup( $msgid, array $msgids ){ $hash_val = self::hashpjw( $msgid ); $idx = $hash_val % $this->size; $incr = 1 + ( $hash_val % ( $this->size - 2 ) ); while( true ){ if( ! array_key_exists($idx, $this->map) ){ break; } $j = $this->map[$idx]; if( isset($msgids[$j]) && $msgid === $msgids[$j] ){ return $j; } $idx += $incr; if( $idx === $hash_val ){ break; } $idx %= $this->size; } return -1; } public function parse( $bin ){ $this->bin = (string) $bin; $this->size = null; $hash_tab_size = $this->count(); $this->map = array(); $idx = -1; $byte = 0; while( ++$idx < $hash_tab_size ){ $word = substr( $this->bin, $byte, 4 ); if( "\0\0\0\0" !== $word ){ list(,$j) = unpack('V', $word ); $this->map[$idx] = $j - 1; } $byte += 4; } return $this->map; } public static function hashpjw( $str ){ $i = -1; $hval = 0; $len = strlen($str); while( ++$i < $len ){ $ord = ord( $str{$i} ); $hval = ( $hval << 4 ) + $ord; $g = $hval & 0xf0000000; if( $g !== 0 ){ $hval ^= $g >> 24; $hval ^= $g; } } return $hval; } private static function next_prime( $seed ){ $seed |= 1; while ( ! self::is_prime($seed) ){ $seed += 2; } return $seed; } private static function is_prime( $num ) { if ($num === 1 ){ return false; } if( $num === 2 ){ return true; } if( $num % 2 == 0 ) { return false; } for( $i = 3; $i <= ceil(sqrt($num)); $i = $i + 2) { if($num % $i == 0 ){ return false; } } return true; } } class LocoMo { private $bin; private $msgs; private $head; private $hash; private $use_fuzzy = false; public function __construct( Iterator $export, Iterator $head = null ){ if( $head ){ $this->head = $head; } else { $this->head = new LocoHeaders( array ( 'Project-Id-Version' => 'Loco', 'Language' => 'English', 'Plural-Forms' => 'nplurals=2; plural=(n!=1);', 'MIME-Version' => '1.0', 'Content-Type' => 'text/plain; charset=UTF-8', 'Content-Transfer-Encoding' => '8bit', 'X-Generator' => 'Loco '.PLUG_HTTP_ADDR, ) ); } $this->msgs = $export; $this->bin = ''; } public function enableHash(){ return $this->hash = new LocoMoTable; } public function useFuzzy(){ $this->use_fuzzy = true; } public function setHeader( $key, $val ){ $this->head->add($key, $val); return $this; } public function setProject( LocoProject $Proj ){ return $this ->setHeader( 'Project-Id-Version', $Proj->proj_name ) ->setHeader($key, $val) ; } public function setLocale( LocoProjectLocale $Loc ){ return $this ->setHeader( 'Language', $Loc->label ) ->setHeader( 'Plural-Forms', (string) $Loc->getPlurals() ) ; } public function count(){ return count($this->msgs); } public function compile(){ $table = array(''); $sources = array(''); $targets = array( (string) $this->head ); $fuzzy_flag = 4; $skip_fuzzy = ! $this->use_fuzzy; foreach( $this->msgs as $r ){ if( isset($r['flag']) && $skip_fuzzy && $fuzzy_flag === $r['flag'] ){ continue; } $msgid = $r['key']; if( isset($r['context']) ){ $msgctxt = $r['context']; if( is_string($msgctxt) && '' !== $msgctxt ){ if( ! $msgid && '0' !== $msgid ){ $msgid = '('.$msgctxt.')'; } $msgid = $msgctxt."\x04".$msgid; } } if( ! $msgid && '0' !== $msgid ){ continue; } $msgstr = $r['target']; if( ! $msgstr && '0' !== $msgstr ){ continue; } $table[] = $msgid; if( isset($r['plurals']) ){ foreach( $r['plurals'] as $i => $p ){ if( $i === 0 ){ $msgid .= "\0".$p['key']; } $msgstr .= "\0".$p['target']; } } $sources[] = $msgid; $targets[] = $msgstr; } asort( $sources, SORT_STRING ); $this->bin = "\xDE\x12\x04\x95\x00\x00\x00\x00"; $n = count($sources); $this->writeInteger( $n ); $offset = 28; $this->writeInteger( $offset ); $offset += $n * 8; $this->writeInteger( $offset ); if( $this->hash ){ sort( $table, SORT_STRING ); $this->hash->compile( $table ); $s = $this->hash->count(); } else { $s = 0; } $this->writeInteger( $s ); $offset += $n * 8; $this->writeInteger( $offset ); if( $s ){ $offset += $s * 4; } $source = ''; foreach( $sources as $i => $str ){ $source .= $str."\0"; $this->writeInteger( $strlen = strlen($str) ); $this->writeInteger( $offset ); $offset += $strlen + 1; } $target = ''; foreach( array_keys($sources) as $i ){ $str = $targets[$i]; $target .= $str."\0"; $this->writeInteger( $strlen = strlen($str) ); $this->writeInteger( $offset ); $offset += $strlen + 1; } if( $this->hash ){ $this->bin .= $this->hash->__toString(); } $this->bin .= $source; $this->bin .= $target; return $this->bin; } private function writeInteger( $num ){ $this->bin .= pack( 'V', $num ); return $this; } } function loco_print_percent( $n, $t ){ $s = loco_string_percent( (int) $n, (int) $t ); echo $s,'%'; return ''; } function loco_print_progress( $translated, $untranslated, $flagged ){ $total = $translated + $untranslated; $complete = loco_string_percent( $translated - $flagged, $total ); $class = 'progress'; if( ! $translated && ! $flagged ){ $class .= ' empty'; } echo '<div class="',$class,'"><div class="t">'; if( $flagged ){ $s = loco_string_percent( $flagged, $total ); echo '<div class="bar f" style="width:',$s,'%"> </div>'; } if( '0' === $complete ){ echo ' '; } else { $class = 'bar p'; $p = (int) $complete; $class .= sprintf(' p-%u', 10*floor($p/10) ); $style = 'width:'.$complete.'%'; if( $flagged ){ $remain = 100.0 - (float) $s; $style .= '; max-width: '.sprintf('%s',$remain).'%'; } echo '<div class="',$class,'" style="'.$style.'"> </div>'; } echo '</div><div class="l">',$complete,'%</div></div>'; return ''; } function loco_string_percent( $n, $t ){ if( ! $t || ! $n ){ $s = '0'; } else if( $t === $n ){ $s = '100'; } else { $dp = 0; $n = 100 * $n / $t; if( $n > 99 ){ $n = min( $n, 99.99 ); do { $s = number_format( $n, ++$dp ); } while( '100' === substr($s,0,3) && $dp < 2 ); } else if( $n < 0.5 ){ $n = max( $n, 0.0001 ); do { $s = number_format( $n, ++$dp ); } while( preg_match('/^0\\.0+$/',$s) && $dp < 4 ); } else { $s = number_format( $n, $dp ); } } return $s; } compiled/plurals.php 0000666 00000006533 15214056526 0010554 0 ustar 00 <?php /** * Downgraded for PHP 5.2 compatibility. Do not edit. */ return unserialize('a:65:{s:2:"ak";i:1;s:2:"am";i:1;s:2:"ar";i:2;s:3:"ary";i:2;s:2:"bm";i:3;s:2:"be";i:4;s:2:"bo";i:3;s:2:"bs";i:4;s:2:"br";i:1;s:2:"cs";i:5;s:2:"kw";i:6;s:2:"cy";i:7;s:2:"dz";i:3;s:2:"fa";i:3;s:2:"fr";i:1;s:2:"ff";i:1;s:2:"gd";i:8;s:2:"ga";i:9;s:2:"gv";i:10;s:2:"hr";i:11;s:2:"ii";i:3;s:2:"iu";i:6;s:2:"id";i:3;s:2:"ja";i:3;s:2:"kn";i:3;s:2:"ka";i:3;s:2:"kk";i:3;s:2:"km";i:3;s:2:"ky";i:3;s:2:"ko";i:3;s:2:"lo";i:3;s:2:"lv";i:12;s:2:"ln";i:1;s:2:"lt";i:13;s:2:"mk";i:14;s:2:"mg";i:1;s:2:"mt";i:15;s:2:"mi";i:1;s:2:"ms";i:3;s:2:"my";i:3;s:2:"nr";i:3;s:2:"oc";i:1;s:2:"pl";i:16;s:2:"ro";i:17;s:2:"ru";i:4;s:2:"sg";i:3;s:2:"sa";i:6;s:2:"sk";i:5;s:2:"sl";i:18;s:2:"sm";i:3;s:2:"sr";i:4;s:2:"su";i:3;s:2:"tt";i:3;s:2:"tl";i:1;s:2:"th";i:3;s:2:"ti";i:1;s:2:"to";i:3;s:2:"ug";i:3;s:2:"uk";i:4;s:2:"vi";i:3;s:2:"wa";i:1;s:2:"wo";i:3;s:2:"yo";i:3;s:2:"zh";i:3;s:0:"";a:19:{i:0;a:2:{i:0;s:6:"n != 1";i:1;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}i:1;a:2:{i:0;s:5:"n > 1";i:1;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}i:2;a:2:{i:0;s:95:"n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100 >= 3 && n%100<=10 ? 3 : n%100 >= 11 && n%100<=99 ? 4 : 5";i:1;a:6:{i:0;s:4:"zero";i:1;s:3:"one";i:2;s:3:"two";i:3;s:3:"few";i:4;s:4:"many";i:5;s:5:"other";}}i:3;a:2:{i:0;s:1:"0";i:1;a:1:{i:0;s:5:"other";}}i:4;a:2:{i:0;s:82:"(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:1;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}i:5;a:2:{i:0;s:45:"( n == 1 ) ? 0 : ( n >= 2 && n <= 4 ) ? 1 : 2";i:1;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}i:6;a:2:{i:0;s:27:"n == 1 ? 0 : n == 2 ? 1 : 2";i:1;a:3:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:5:"other";}}i:7;a:2:{i:0;s:56:"n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n==3 ? 3 : n==6 ? 4 : 5";i:1;a:6:{i:0;s:4:"zero";i:1;s:3:"one";i:2;s:3:"two";i:3;s:3:"few";i:4;s:4:"many";i:5;s:5:"other";}}i:8;a:2:{i:0;s:26:"n < 2 ? 0 : n == 2 ? 1 : 2";i:1;a:3:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:5:"other";}}i:9;a:2:{i:0;s:44:"n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4";i:1;a:5:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:3:"few";i:3;s:4:"many";i:4;s:5:"other";}}i:10;a:2:{i:0;s:43:"n%10==1 ? 0 : n%10==2 ? 1 : n%20==0 ? 2 : 3";i:1;a:4:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:3:"few";i:3;s:5:"other";}}i:11;a:2:{i:0;s:80:"n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2";i:1;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}i:12;a:2:{i:0;s:49:"n % 10 == 1 && n % 100 != 11 ? 0 : n != 0 ? 1 : 2";i:1;a:3:{i:0;s:3:"one";i:1;s:5:"other";i:2;s:4:"zero";}}i:13;a:2:{i:0;s:71:"(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:1;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}i:14;a:2:{i:0;s:40:"( n % 10 == 1 && n % 100 != 11 ) ? 0 : 1";i:1;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}i:15;a:2:{i:0;s:75:"(n==1 ? 0 : n==0||( n%100>1 && n%100<11)? 1 :(n%100>10 && n%100<20)? 2 : 3)";i:1;a:4:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:4:"many";i:3;s:5:"other";}}i:16;a:2:{i:0;s:66:"(n==1 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:1;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}i:17;a:2:{i:0;s:56:"(n==1 ? 0 :(((n%100>19)||(( n%100==0)&&(n!=0)))? 2 : 1))";i:1;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}i:18;a:2:{i:0;s:56:"n%100==1 ? 0 : n%100==2 ? 1 : n%100==3||n%100==4 ? 2 : 3";i:1;a:4:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:3:"few";i:3;s:5:"other";}}}}'); compiled/locales.php 0000666 00000003113 15214056526 0010503 0 ustar 00 <?php /** * Downgraded for PHP 5.2 compatibility. Do not edit. */ function loco_parse_locale( $tag ){ $tag = trim( strtr( $tag, '_+', '--' ), '-' ); if( ! $tag ){ throw new InvalidArgumentException('Empty language tag'); } if( ! preg_match( '/^([a-z]{2,3})(?:-([a-z]{3}(?:-[a-z]{3}){0,2}))?(?:-([a-z]{4}))?(?:-([a-z]{2}|[0-9]{3}))?(?:-((?:[0-9][a-z0-9]{3,8}|[a-z0-9]{5,8})(?:-(?:[0-9][a-z0-9]{3,8}|[a-z0-9]{5,8}))*))?(?:-([a-wy-z0-9](?:-[a-z0-9]{2,8})+(?:-[a-wy-z0-9](?:-[a-z0-9]{2,8})+)*))?(?:-(x(?:-[a-z0-9]{1,8})+))?$/i', $tag, $tags ) ){ if( preg_match('/^x(?:-[a-z0-9]{1,8})+/i', $tag ) ){ return array( 'extension' => array($tag) ); } throw new InvalidArgumentException('Invalid language tag, '.$tag ); } $data['lang'] = strtolower($tags[1]); if( isset($tags[2]) && ( $subtag = $tags[2] ) ){ $data['extlang'] = strtolower( $subtag ); } if( isset($tags[3]) && ( $subtag = $tags[3] ) ){ $data['script'] = strtoupper($subtag{0}).strtolower(substr($subtag,1)); } if( isset($tags[4]) && ( $subtag = $tags[4] ) ){ $data['region'] = strtoupper($tags[4]); } if( isset($tags[5]) && ( $subtag = $tags[5]) ){ $data['variant'] = array_values( array_unique( explode('-',strtolower($subtag) ), SORT_REGULAR ) ); } if( isset($tags[6]) && ( $subtag = $tags[6] ) ){ $subtags = array(); $offset = -1; $parts = explode( '-', $subtag ); while( $value = array_shift($parts) ){ if( isset($value{1}) ){ $subtags[$offset] .= '-'.$value; } else { $subtags[++$offset] = $value; } } $data['extension'] = $subtags; } if( isset($tags[7]) && ( $subtag = $tags[7] ) ){ $data['extension'][] = 'x-'.substr($subtag,2); } return $data; } compiled/regions.php 0000666 00000015466 15214056526 0010545 0 ustar 00 <?php /** * Downgraded for PHP 5.2 compatibility. Do not edit. */ return unserialize('a:250:{s:2:"AD";s:7:"Andorra";s:2:"AE";s:20:"United Arab Emirates";s:2:"AF";s:11:"Afghanistan";s:2:"AG";s:19:"Antigua and Barbuda";s:2:"AI";s:8:"Anguilla";s:2:"AL";s:7:"Albania";s:2:"AM";s:7:"Armenia";s:2:"AO";s:6:"Angola";s:2:"AQ";s:10:"Antarctica";s:2:"AR";s:9:"Argentina";s:2:"AS";s:14:"American Samoa";s:2:"AT";s:7:"Austria";s:2:"AU";s:9:"Australia";s:2:"AW";s:5:"Aruba";s:2:"AX";s:14:"Åland Islands";s:2:"AZ";s:10:"Azerbaijan";s:2:"BA";s:22:"Bosnia and Herzegovina";s:2:"BB";s:8:"Barbados";s:2:"BD";s:10:"Bangladesh";s:2:"BE";s:7:"Belgium";s:2:"BF";s:12:"Burkina Faso";s:2:"BG";s:8:"Bulgaria";s:2:"BH";s:7:"Bahrain";s:2:"BI";s:7:"Burundi";s:2:"BJ";s:5:"Benin";s:2:"BL";s:17:"Saint Barthélemy";s:2:"BM";s:7:"Bermuda";s:2:"BN";s:17:"Brunei Darussalam";s:2:"BO";s:7:"Bolivia";s:2:"BQ";s:32:"Bonaire, Sint Eustatius and Saba";s:2:"BR";s:6:"Brazil";s:2:"BS";s:7:"Bahamas";s:2:"BT";s:6:"Bhutan";s:2:"BV";s:13:"Bouvet Island";s:2:"BW";s:8:"Botswana";s:2:"BY";s:7:"Belarus";s:2:"BZ";s:6:"Belize";s:2:"CA";s:6:"Canada";s:2:"CC";s:23:"Cocos (Keeling) Islands";s:2:"CD";s:36:"The Democratic Republic of the Congo";s:2:"CF";s:24:"Central African Republic";s:2:"CG";s:5:"Congo";s:2:"CH";s:11:"Switzerland";s:2:"CI";s:14:"Côte d\'Ivoire";s:2:"CK";s:12:"Cook Islands";s:2:"CL";s:5:"Chile";s:2:"CM";s:8:"Cameroon";s:2:"CN";s:5:"China";s:2:"CO";s:8:"Colombia";s:2:"CR";s:10:"Costa Rica";s:2:"CU";s:4:"Cuba";s:2:"CV";s:22:"Cabo Verde; Cape Verde";s:2:"CW";s:8:"Curaçao";s:2:"CX";s:16:"Christmas Island";s:2:"CY";s:6:"Cyprus";s:2:"CZ";s:14:"Czech Republic";s:2:"DE";s:7:"Germany";s:2:"DJ";s:8:"Djibouti";s:2:"DK";s:7:"Denmark";s:2:"DM";s:8:"Dominica";s:2:"DO";s:18:"Dominican Republic";s:2:"DZ";s:7:"Algeria";s:2:"EC";s:7:"Ecuador";s:2:"EE";s:7:"Estonia";s:2:"EG";s:5:"Egypt";s:2:"EH";s:14:"Western Sahara";s:2:"ER";s:7:"Eritrea";s:2:"ES";s:5:"Spain";s:2:"ET";s:8:"Ethiopia";s:2:"FI";s:7:"Finland";s:2:"FJ";s:4:"Fiji";s:2:"FK";s:27:"Falkland Islands (Malvinas)";s:2:"FM";s:30:"Federated States of Micronesia";s:2:"FO";s:13:"Faroe Islands";s:2:"FR";s:6:"France";s:2:"GA";s:5:"Gabon";s:2:"GB";s:14:"United Kingdom";s:2:"GD";s:7:"Grenada";s:2:"GE";s:7:"Georgia";s:2:"GF";s:13:"French Guiana";s:2:"GG";s:8:"Guernsey";s:2:"GH";s:5:"Ghana";s:2:"GI";s:9:"Gibraltar";s:2:"GL";s:9:"Greenland";s:2:"GM";s:6:"Gambia";s:2:"GN";s:6:"Guinea";s:2:"GP";s:10:"Guadeloupe";s:2:"GQ";s:17:"Equatorial Guinea";s:2:"GR";s:6:"Greece";s:2:"GS";s:44:"South Georgia and the South Sandwich Islands";s:2:"GT";s:9:"Guatemala";s:2:"GU";s:4:"Guam";s:2:"GW";s:13:"Guinea-Bissau";s:2:"GY";s:6:"Guyana";s:2:"HK";s:9:"Hong Kong";s:2:"HM";s:33:"Heard Island and McDonald Islands";s:2:"HN";s:8:"Honduras";s:2:"HR";s:7:"Croatia";s:2:"HT";s:5:"Haiti";s:2:"HU";s:7:"Hungary";s:2:"ID";s:9:"Indonesia";s:2:"IE";s:7:"Ireland";s:2:"IL";s:6:"Israel";s:2:"IM";s:11:"Isle of Man";s:2:"IN";s:5:"India";s:2:"IO";s:30:"British Indian Ocean Territory";s:2:"IQ";s:4:"Iraq";s:2:"IR";s:24:"Islamic Republic of Iran";s:2:"IS";s:7:"Iceland";s:2:"IT";s:5:"Italy";s:2:"JE";s:6:"Jersey";s:2:"JM";s:7:"Jamaica";s:2:"JO";s:6:"Jordan";s:2:"JP";s:5:"Japan";s:2:"KE";s:5:"Kenya";s:2:"KG";s:10:"Kyrgyzstan";s:2:"KH";s:8:"Cambodia";s:2:"KI";s:8:"Kiribati";s:2:"KM";s:7:"Comoros";s:2:"KN";s:21:"Saint Kitts and Nevis";s:2:"KP";s:37:"Democratic People\'s Republic of Korea";s:2:"KR";s:17:"Republic of Korea";s:2:"KW";s:6:"Kuwait";s:2:"KY";s:14:"Cayman Islands";s:2:"KZ";s:10:"Kazakhstan";s:2:"LA";s:32:"Lao People\'s Democratic Republic";s:2:"LB";s:7:"Lebanon";s:2:"LC";s:11:"Saint Lucia";s:2:"LI";s:13:"Liechtenstein";s:2:"LK";s:9:"Sri Lanka";s:2:"LR";s:7:"Liberia";s:2:"LS";s:7:"Lesotho";s:2:"LT";s:9:"Lithuania";s:2:"LU";s:10:"Luxembourg";s:2:"LV";s:6:"Latvia";s:2:"LY";s:5:"Libya";s:2:"MA";s:7:"Morocco";s:2:"MC";s:6:"Monaco";s:2:"MD";s:7:"Moldova";s:2:"ME";s:10:"Montenegro";s:2:"MF";s:26:"Saint Martin (French part)";s:2:"MG";s:10:"Madagascar";s:2:"MH";s:16:"Marshall Islands";s:2:"MK";s:41:"The Former Yugoslav Republic of Macedonia";s:2:"ML";s:4:"Mali";s:2:"MM";s:7:"Myanmar";s:2:"MN";s:8:"Mongolia";s:2:"MO";s:5:"Macao";s:2:"MP";s:24:"Northern Mariana Islands";s:2:"MQ";s:10:"Martinique";s:2:"MR";s:10:"Mauritania";s:2:"MS";s:10:"Montserrat";s:2:"MT";s:5:"Malta";s:2:"MU";s:9:"Mauritius";s:2:"MV";s:8:"Maldives";s:2:"MW";s:6:"Malawi";s:2:"MX";s:6:"Mexico";s:2:"MY";s:8:"Malaysia";s:2:"MZ";s:10:"Mozambique";s:2:"NA";s:7:"Namibia";s:2:"NC";s:13:"New Caledonia";s:2:"NE";s:5:"Niger";s:2:"NF";s:14:"Norfolk Island";s:2:"NG";s:7:"Nigeria";s:2:"NI";s:9:"Nicaragua";s:2:"NL";s:11:"Netherlands";s:2:"NO";s:6:"Norway";s:2:"NP";s:5:"Nepal";s:2:"NR";s:5:"Nauru";s:2:"NU";s:4:"Niue";s:2:"NZ";s:11:"New Zealand";s:2:"OM";s:4:"Oman";s:2:"PA";s:6:"Panama";s:2:"PE";s:4:"Peru";s:2:"PF";s:16:"French Polynesia";s:2:"PG";s:16:"Papua New Guinea";s:2:"PH";s:11:"Philippines";s:2:"PK";s:8:"Pakistan";s:2:"PL";s:6:"Poland";s:2:"PM";s:25:"Saint Pierre and Miquelon";s:2:"PN";s:8:"Pitcairn";s:2:"PR";s:11:"Puerto Rico";s:2:"PS";s:18:"State of Palestine";s:2:"PT";s:8:"Portugal";s:2:"PW";s:5:"Palau";s:2:"PY";s:8:"Paraguay";s:2:"QA";s:5:"Qatar";s:2:"RE";s:8:"Réunion";s:2:"RO";s:7:"Romania";s:2:"RS";s:6:"Serbia";s:2:"RU";s:18:"Russian Federation";s:2:"RW";s:6:"Rwanda";s:2:"SA";s:12:"Saudi Arabia";s:2:"SB";s:15:"Solomon Islands";s:2:"SC";s:10:"Seychelles";s:2:"SD";s:5:"Sudan";s:2:"SE";s:6:"Sweden";s:2:"SG";s:9:"Singapore";s:2:"SH";s:44:"Saint Helena, Ascension and Tristan da Cunha";s:2:"SI";s:8:"Slovenia";s:2:"SJ";s:22:"Svalbard and Jan Mayen";s:2:"SK";s:8:"Slovakia";s:2:"SL";s:12:"Sierra Leone";s:2:"SM";s:10:"San Marino";s:2:"SN";s:7:"Senegal";s:2:"SO";s:7:"Somalia";s:2:"SR";s:8:"Suriname";s:2:"SS";s:11:"South Sudan";s:2:"ST";s:21:"Sao Tome and Principe";s:2:"SV";s:11:"El Salvador";s:2:"SX";s:25:"Sint Maarten (Dutch part)";s:2:"SY";s:20:"Syrian Arab Republic";s:2:"SZ";s:9:"Swaziland";s:2:"TC";s:24:"Turks and Caicos Islands";s:2:"TD";s:4:"Chad";s:2:"TF";s:27:"French Southern Territories";s:2:"TG";s:4:"Togo";s:2:"TH";s:8:"Thailand";s:2:"TJ";s:10:"Tajikistan";s:2:"TK";s:7:"Tokelau";s:2:"TL";s:11:"Timor-Leste";s:2:"TM";s:12:"Turkmenistan";s:2:"TN";s:7:"Tunisia";s:2:"TO";s:5:"Tonga";s:2:"TR";s:6:"Turkey";s:2:"TT";s:19:"Trinidad and Tobago";s:2:"TV";s:6:"Tuvalu";s:2:"TW";s:6:"Taiwan";s:2:"TZ";s:27:"United Republic of Tanzania";s:2:"UA";s:7:"Ukraine";s:2:"UG";s:6:"Uganda";s:2:"UM";s:36:"United States Minor Outlying Islands";s:2:"US";s:13:"United States";s:2:"UY";s:7:"Uruguay";s:2:"UZ";s:10:"Uzbekistan";s:2:"VA";s:29:"Holy See (Vatican City State)";s:2:"VC";s:32:"Saint Vincent and the Grenadines";s:2:"VE";s:9:"Venezuela";s:2:"VG";s:22:"British Virgin Islands";s:2:"VI";s:19:"U.S. Virgin Islands";s:2:"VN";s:8:"Viet Nam";s:2:"VU";s:7:"Vanuatu";s:2:"WF";s:17:"Wallis and Futuna";s:2:"WS";s:5:"Samoa";s:2:"YE";s:5:"Yemen";s:2:"YT";s:7:"Mayotte";s:2:"ZA";s:12:"South Africa";s:2:"ZM";s:6:"Zambia";s:2:"ZW";s:8:"Zimbabwe";s:2:"ZZ";s:11:"Private use";}'); compiled/README.md 0000666 00000000222 15214056526 0007625 0 ustar 00 # Compiled libraries These files are built from the Loco core. Do not edit! They've been converted down for PHP 5.2 compatibility in WordPress.
dvadf
dvadf
| ver. 1.4 |
Github
|
.
| PHP 7.0.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings