Version Description
- Better handling of incorrectly named POT files
- Appended potential issue warnings on existing "file check" page
- Added loco_admin_capability filter for all plugin access
- Fixed editor shortcuts to avoid blocking alt-commands
Download this release
Release Info
Developer | timwhitlock |
Plugin | Loco Translate |
Version | 1.5.1 |
Comparing to | |
See all releases |
Code changes from version 1.5 to 1.5.1
- lib/build/gettext-compiled.php +2 -2
- lib/build/locales-compiled.php +1 -1
- lib/build/shell-compiled.php +1 -1
- lib/loco-admin.php +52 -27
- lib/loco-boot.php +12 -3
- lib/loco-packages.php +36 -5
- lib/test/tests/LocoBootTest.php +4 -0
- loco.php +4 -4
- php/loco-ajax.php +1 -1
- php/loco-download.php +1 -1
- php/loco-posync.php +5 -7
- pub/css/loco-admin.css +1 -1
- pub/js/build/admin-poedit.js +152 -147
- pub/js/lang/loco-translate-de_DE.js +1 -1
- pub/js/lang/loco-translate-id_ID.js +1 -1
- pub/js/lang/loco-translate-it_IT.js +1 -1
- pub/js/lang/loco-translate-nl_BE.js +1 -1
- pub/js/lang/loco-translate-nl_NL.js +1 -1
- pub/js/lang/loco-translate-pl_PL.js +1 -1
- pub/js/lang/loco-translate-ru_RU.js +1 -1
- pub/js/lang/loco-translate-sv_SE.js +1 -1
- pub/js/lang/loco-translate-tr_TR.js +1 -1
- readme.txt +11 -5
- tpl/admin-poedit.tpl.php +1 -2
lib/build/gettext-compiled.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Compiled source built from Loco core. Do not edit!
|
4 |
-
*
|
5 |
*/
|
6 |
-
class LocoArray implements Iterator, Countable { private $i; private $length; private $keys; private $vals; private $index; public function __construct( array $data = array() ){ $this->keys = array_keys( $data ); $this->vals = array_values( $data ); $this->index = array_flip( array_map( 'strtolower', $this->keys ) ); $this->length = count( $this->keys ); $this->rewind(); } public function add( $key, $val ){ $k = strtolower($key); if( isset($this->index[$k]) ){ $this->keys[ $this->index[$k] ] = $key; $this->vals[ $this->index[$k] ] = $val; } else { $this->index[$k] = $this->length++; $this->keys[] = $key; $this->vals[] = $val; } return $this; } public function to_array(){ return array_combine( $this->keys, $this->vals ); } function __toString(){ $pairs = array(); foreach( $this->keys as $i => $key ){ $pairs[] = trim($key).': '.$this->vals[$i]; } return implode("\n", $pairs ); } public function count(){ return $this->length; } public function trimmed( $prop ){ return trim( $this->__get($prop) ); } public function has( $key ){ return isset( $this->index[ strtolower($key) ] ); } public function __get( $key ){ $key = strtolower( $key ); return isset($this->index[$key]) ? $this->vals[ $this->index[$key] ] : null; } public function rewind(){ $this->i = reset( $this->index ); } public function key(){ return is_int($this->i) ? $this->keys[$this->i] : null; } public function current(){ return is_int($this->i) ? $this->vals[$this->i] : null; } public function valid(){ return is_int($this->i); } public function next(){ $this->i = next( $this->index ); } } function loco_sniff_printf( $str ){ return (bool) preg_match('/%(?:\d\$)?(?:\+|-)?[ 0]?-?\d*(?:\.\d+)?[bcdeEfFgGosuxX]/', $str ); } define( 'LOCO_FLAG_OK', 0 ); define( 'LOCO_FLAG_ERROR', 1 ); define( 'LOCO_FLAG_REVIEW', 2 ); define( 'LOCO_FLAG_PENDING', 3 ); define( 'LOCO_FLAG_FUZZY', 4 ); function loco_flags(){ static $flags = array ( LOCO_FLAG_OK => 'Translated', LOCO_FLAG_ERROR => 'Incorrect', LOCO_FLAG_REVIEW => 'Needs review', LOCO_FLAG_PENDING => 'Pending approval', LOCO_FLAG_FUZZY => 'Fuzzy', ); return $flags; } function loco_flag( $f ){ if( -1 === $f ){ return 'Untranslated'; } $flags = loco_flags(); if( ! isset($flags[$f]) ){ throw new Exception('Invalid LOCO_FLAG_ constant ', var_export($f,1) ); } return $flags[$f]; } function loco_flag_integer( $f ){ if( is_numeric($f) ){ $f = (int) $f; } else { $f = 'LOCO_FLAG_'.strtoupper($f); $f = defined($f) ? constant($f) : -1; } $flags = loco_flags(); if( ! isset($flags[$f]) ){ throw new InvalidArgumentException('Unknown flag, '.var_export(func_get_arg(0),1)); } return $f; } function loco_po_flags(){ static $map = array ( LOCO_FLAG_FUZZY => '#, fuzzy', ); return $map; } 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('ASCII','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 = ''; } if( $enc && $enc !== 'ASCII' && $enc !== 'UTF-8' ){ $str = iconv( $enc, 'UTF-8//TRANSLIT', $str ); if( ! $str ){ throw new Exception('Failed to ensure UTF-8 from '.$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 $line ){ while( $line = trim($line) ){ $c = $line{0}; if( '"' === $c ){ if( $key && isset($entry) ){ $entry[$key][$idx][] = loco_po_unquote( $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' => '', 'source' => implode('',$entry['id'][0]), 'target' => implode('',$entry['str'][0]), ); $parse_printf = true; 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( "\n", $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 ) ){ $parse_printf = false; if( 'no-' === substr($r[1],0,3) ){ $asset['format'] = false; } else { $asset['format'] = $r[1]; } } else if( $flag = loco_po_parse_flag($flag) ){ $asset['flag'] = $flag; break; } } } if( $parse_printf ){ if( $asset['source'] && loco_sniff_printf( $asset['source'] ) ){ $asset['format'] = 'c'; $parse_printf = false; } } $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' => '', '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]) : ''; } if( $parse_printf ){ if( $plural['source'] && loco_sniff_printf( $plural['source'] ) ){ $assets[$pidx]['format'] = 'c'; $parse_printf = false; } } $assets[] = $plural; } } } if( $assets && '' === $assets[0]['source'] ){ $headers = loco_parse_po_headers( $assets[0]['target'] ); $indexed = $headers->__get('X-Loco-Lookup'); if( 'id' === $indexed || 'name' === $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, $flag = 0 ){ $map = loco_po_flags(); foreach( explode(',',$text) as $needle ){ if( $needle = trim($needle) ){ foreach( $map as $loco_flag => $haystack ){ if( false !== stripos($haystack, $needle) ){ $flag |= $loco_flag; break; } } } } return $flag; } function loco_po_unquote( $str ){ return substr( stripcslashes($str), 1, -1 ); } function loco_parse_po_headers( $str ){ $headers = new LocoArray( array() ); 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; } class LocoMoParser { private $bin; private $be; private $n; private $o; private $t; private $v; 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(){ $sourceOffset = $this->sourceOffset(); $targetOffset = $this->targetOffset(); $r = array(); $p = array(); $i = 0; $offset = $sourceOffset; while( $offset < $targetOffset ){ $r[$i] = array( 'id' => '', 'source' => '', 'target' => '' ); $len = $this->integerAt( $offset ); $idx = $this->integerAt( $offset + 4 ); $src = $this->bytes( $idx, $len ); $eot = strpos( $src, "\x04" ); if( false !== $eot ){ $r[$i]['context'] = $this->decodeStr( substr($src, 0, $eot ) ); $src = substr( $src, $eot+1 ); } $nul = strpos( $src, "\0" ); if( false !== $nul ){ $p[$i][1] = array( 'id' => '', 'source' => substr($src, $nul+1 ), 'target' => '', 'parent' => $i, 'plural' => 1 ); $src = substr( $src, 0, $nul ); } $r[$i++]['source'] = $this->decodeStr($src); $offset += 8; } $t = $i; $offset = $targetOffset; for( $i = 0; $i < $t; $i++ ){ $len = $this->integerAt( $offset ); $idx = $this->integerAt( $offset + 4 ); $txt = $this->bytes( $idx, $len ); if( false !== strpos( $txt, "\0" ) ){ $arr = explode( "\0", $txt ); $txt = array_shift( $arr ); if( isset($p[$i][1]) ){ foreach( $arr as $_i => $plural_txt ){ $plural_idx = $_i + 1; $p[$i][$plural_idx]['target'] = $this->decodeStr($plural_txt); } } else if( '' === implode('',$arr) ){ } else { throw new Exception('plural has no corresponding msgid_plural at '.$i); } } $r[$i]['target'] = $this->decodeStr($txt); $offset += 8; } foreach( $p as $parent_id => $plurals ){ foreach( $plurals as $plural_idx => $msg ){ if( 1 < $plural_idx ){ $msg['source'] = $plurals[1]['source'].' (plural '.$plural_idx.')'; } $msg['parent'] = $parent_id; $msg['plural'] = $plural_idx; $r[] = $msg; } } return $r; } public function isBigendian(){ while( is_null($this->be) ){ $str = $this->words( 0, 2 ); $arr = unpack('V', $str); if( 0x950412de === $arr[1] ){ $this->be = false; break; } if( 0xde120495 === $arr[1] ){ $this->be = true; break; } throw new Exception('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 Exception('Failed to read 32 bit integer at byte '.$offset); } return $arr[1]; } private function decodeStr( $str ){ $enc = mb_detect_encoding( $str, array('ASCII','UTF-8','ISO-8859-1'), false ); if( $enc && $enc !== 'ASCII' && $enc !== 'UTF-8' ){ $str = iconv( $enc, 'UTF-8', $str ); } return $str; } } function loco_parse_mo( $src ){ $mo = new LocoMoParser($src); return $mo->parse(); } final class PHPTokens implements Iterator { private $tokens; private $i; 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_parse_comment($comment){ if( '*' === $comment{1} ){ $lines = array(); foreach( explode("\n", $comment) as $line ){ $line and $lines[] = trim($line,"/* \r\t"); } $comment = implode("\n", $lines); } return trim( $comment,"/ \n\r\t" ); } function decapse_string( $s ){ if( empty($s) ){ return ''; } $q = $s{0}; switch( $q ){ case "'": case '"': $s = substr( $s, 1, -1 ); if( '"' === $q ){ return stripcslashes($s); } return str_replace( array( '\\'.$q, '\\\\' ), array( $q, '\\' ), $s ); default: return $s; } } function loco_extract_php( array $tokens, $fileref = '' ){ $extractor = new LocoPHPExtractor; return $extractor->extract( $tokens, $fileref ); } final class LocoPHPExtractor { private static $rules = array ( '_' => 's', 'gettext' => 's', 'dgettext' => '_s', 'ngettext' => 'sp', 'dngettext' => '_sp', '__' => 's', '_e' => 's', '_c' => 's', '_n' => 'sp', '_n_noop' => 'sp', '_nc' => 'sp', '__ngettext' => 'sp', '__ngettext_noop' => 'sp', '_x' => 'sc', '_ex' => 'sc', '_nx' => 'sp_c', '_nx_noop' => 'spc', '_n_js' => 'sp', '_nx_js' => 'spc', 'esc_attr__' => 's', 'esc_html__' => 's', 'esc_attr_e' => 's', 'esc_html_e' => 's', 'esc_attr_x' => 'sc', 'esc_html_x' => 'sc', 'comments_number_link' => '_sp', 't' => 's', 'st' => 's', 'trans' => 's', 'transChoice' => 'sp', ); private $exp = array(); private $reg = array(); public function extract( array $tokens, $fileref = '' ){ $tokens = new PHPTokens( $tokens ); $tokens->ignore( T_WHITESPACE ); $comment = ''; foreach( $tokens as $tok ){ if( isset($args) ){ if( ')' === $tok ){ isset($arg) and $arg and $args[] = $arg; $this->push( $rule, $args, $comment, $ref ); unset($args,$arg); $comment = ''; } else if( ',' === $tok ){ isset($arg) and $arg and $args[] = $arg; unset($arg); } else if( isset($arg) ){ $arg[] = $tok; } else { $arg = array( $tok ); } } else if( is_array($tok) ){ list($t,$s) = $tok; if( T_COMMENT === $t || T_DOC_COMMENT === $t ){ $comment = $s; } else if( T_STRING === $t && isset(self::$rules[$s]) && '(' === $tokens->advance() ){ $rule = self::$rules[$s]; $args = array(); $ref = $fileref ? $fileref.':'.$tok[2]: ''; } else if( $comment && false === stripos($comment, 'translators') ){ $comment = ''; } } } return $this->exp; } private function push( $rule, array $args, $comment = '', $ref = '' ){ $s = strpos( $rule, 's'); $p = strpos( $rule, 'p'); $c = strpos( $rule, 'c'); foreach( $args as $i => $tokens ){ if( 1 === count($tokens) && is_array($tokens[0]) && T_CONSTANT_ENCAPSED_STRING === $tokens[0][0] ){ $args[$i] = decapse_string( $tokens[0][1] ); } else { $args[$i] = null; } } $key = $msgid = $args[$s]; if( ! $msgid ){ return null; } $entry = array ( 'id' => '', 'source' => $msgid, 'target' => '', ); if( $c && isset($args[$c]) ){ $entry['context'] = $args[$c]; $key .= "\0". $args[$c]; } if( $ref ){ $entry['refs'] = $ref; } $parse_printf = true; if( $comment ){ if( preg_match('/xgettext:\s*((?:no-)?\w+)-format/', $comment, $r ) ){ if( 'no-' === substr($r[1],0,3) ){ $entry['format'] = false; } else { $entry['format'] = $r[1]; } $comment = str_replace( $r[0], '', $comment ); $parse_printf = false; } $entry['notes'] = loco_parse_comment($comment); } if( $parse_printf && loco_sniff_printf( $msgid ) ){ $entry['format'] = 'php'; $parse_printf = false; } 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( $p && isset($args[$p]) ){ $msgid_plural = $args[$p]; $entry = array ( 'id' => '', 'source' => $msgid_plural, 'target' => '', 'plural' => 1, 'parent' => $index, ); if( $parse_printf && loco_sniff_printf( $msgid_plural ) ){ $this->exp[$index]['format'] = 'php'; } $key = $msgid_plural."\0\0"; if( isset($this->reg[$key]) ){ $plural_index = $this->reg[$key]; $this->exp[$plural_index] = $entry; } else { $plural_index = count($this->exp); $this->reg[$key] = $plural_index; $this->exp[] = $entry; } } return $index; } public function get_xgettext( $input = '-' ){ $cmd = defined('WHICH_XGETTEXT') ? WHICH_XGETTEXT : 'xgettext'; $cmd.= ' -LPHP -c -o-'; if( $k = $this->get_xgettext_keywords() ){ $cmd.= ' -k'.implode(' -k', $k ); } return $cmd.' '.$input; } public function get_xgettext_keywords(){ $ks = array(); foreach( self::$rules as $word => $rule ){ $s = strpos( $rule, 's'); $k = $word.':'.++$s; if( false !== $p = strpos( $rule, 'p') ){ $k.= ','.++$p; } if( false !== $p = strpos( $rule, 'c') ){ $k.= ','.++$p.'c'; } $ks[] = $k; } return $ks; } } function loco_relative_path( $source_path, $target_path ){ $rel = ''; $common = false; $src = preg_split('!/+!', $source_path, -1, PREG_SPLIT_NO_EMPTY ); $dst = preg_split('!/+!', $target_path, -1, PREG_SPLIT_NO_EMPTY ); while( $src && $dst ){ if( current($src) !== current($dst) ){ break; } $common = true; array_shift($src); array_shift($dst); } if( ! $common ){ return $target_path; } if( $src ){ $up = array_fill( 0, count($src), '..' ); $rel = implode('/', $up ); } if( $dst ){ $rel && $rel .= '/'; $rel .= implode('/', $dst ); } return $rel; } class LocoMo { private $bin; private $msgs; private $head; private $hash; public function __construct( array $export, LocoArray $head = null ){ if( ! $head ){ $head = new LocoArray( 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->head = $head; $this->msgs = $export; $this->bin = ''; } public function enableHash(){ return $this->hash = new LocoMoTable; } 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', 'nplurals='.$Loc->nplurals.'; plural='.$Loc->pluraleq.';' ) ; } public function count(){ return count($this->msgs); } public function compile(){ $table = array(''); $sources = array(''); $targets = array( $this->head->__toString() ); foreach( $this->msgs as $r ){ $msgid = $r['key']; if( isset($r['context']) && $r['context'] ){ $msgid or $msgid = "(".$r['context'].')'; $msgid = $r['context']."\x04".$msgid; } if( ! $msgid ){ continue; } $msgstr = $r['translation']; if( ! $msgstr ){ continue; } $table[] = $msgid; if( isset($r['plurals']) ){ foreach( $r['plurals'] as $i => $p ){ if( $i === 0 ){ $msgid .= "\0".$p['key']; } $msgstr .= "\0".$p['translation']; } } $sources[] = $msgid; $targets[] = $msgstr; } asort( $sources, SORT_STRING ); $this->bin = ''; $this->writeInteger( 0x950412de ); $this->writeInteger( 0 ); $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; } } 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; } } function loco_msgfmt( $po, $withhash = false ){ if( ! is_array($po) ){ $po = loco_parse_po( $po ); } $head = null; if( isset($po[0]) && '' === $po[0]['source'] ){ $head = loco_parse_po_headers( $po[0]['target'] ); $po[0] = null; } $export = array(); foreach( $po as $i => $r ){ if( ! $r ){ continue; } $msg = array ( 'key' => $r['source'], 'translation' => $r['target'], ); if( isset($r['parent']) ){ unset( $parent ); $parent = &$export[ $r['parent'] ]; isset($parent['plurals']) or $parent['plurals'] = array(); $parent['plurals'][] = $msg; } else { isset($r['context']) and $msg['context'] = $r['context']; $export[$i] = $msg; } } $mo = new LocoMo( $export, $head ); if( $withhash ){ $mo->enableHash(); } return $mo->compile(); } function loco_po_stats( array $po ){ $t = $n = $f = $u = 0; foreach( $po as $r ){ if( ! isset($r['source']) || '' === $r['source'] ){ continue; } if( isset($r['parent']) && is_int($r['parent']) ){ continue; } $t++; if( '' === $r['target'] ){ $u++; } else if( isset($r['flag']) && LOCO_FLAG_FUZZY === $r['flag'] ){ $f++; } else { $n++; } } $r = $t && $n ? $n / $t : 0; $p = (string) round( $r * 100 ); return compact('t','p','f','u'); }
|
1 |
<?php
|
2 |
/**
|
3 |
* Compiled source built from Loco core. Do not edit!
|
4 |
+
* Fri, 30 Jan 2015 17:55:04 +0000
|
5 |
*/
|
6 |
+
class LocoArray implements Iterator, Countable { private $i; private $length; private $keys; private $vals; private $index; public function __construct( array $data = array() ){ $this->keys = array_keys( $data ); $this->vals = array_values( $data ); $this->index = array_flip( array_map( 'strtolower', $this->keys ) ); $this->length = count( $this->keys ); $this->rewind(); } public function add( $key, $val ){ $k = strtolower($key); if( isset($this->index[$k]) ){ $this->keys[ $this->index[$k] ] = $key; $this->vals[ $this->index[$k] ] = $val; } else { $this->index[$k] = $this->length++; $this->keys[] = $key; $this->vals[] = $val; } return $this; } public function to_array(){ return array_combine( $this->keys, $this->vals ); } function __toString(){ $pairs = array(); foreach( $this->keys as $i => $key ){ $pairs[] = trim($key).': '.$this->vals[$i]; } return implode("\n", $pairs ); } public function count(){ return $this->length; } public function trimmed( $prop ){ return trim( $this->__get($prop) ); } public function has( $key ){ return isset( $this->index[ strtolower($key) ] ); } public function __get( $key ){ $key = strtolower( $key ); return isset($this->index[$key]) ? $this->vals[ $this->index[$key] ] : null; } public function rewind(){ $this->i = reset( $this->index ); } public function key(){ return is_int($this->i) ? $this->keys[$this->i] : null; } public function current(){ return is_int($this->i) ? $this->vals[$this->i] : null; } public function valid(){ return is_int($this->i); } public function next(){ $this->i = next( $this->index ); } } function loco_sniff_printf( $str ){ return (bool) preg_match('/%(?:\d\$)?(?:\+|-)?[ 0]?-?\d*(?:\.\d+)?[bcdeEfFgGosuxX]/', $str ); } define( 'LOCO_FLAG_OK', 0 ); define( 'LOCO_FLAG_ERROR', 1 ); define( 'LOCO_FLAG_REVIEW', 2 ); define( 'LOCO_FLAG_PENDING', 3 ); define( 'LOCO_FLAG_FUZZY', 4 ); define( 'LOCO_FLAG_UNTRANSLATED', -1 ); function loco_flags(){ static $flags = array ( LOCO_FLAG_OK => 'Translated', LOCO_FLAG_ERROR => 'Incorrect', LOCO_FLAG_REVIEW => 'Needs review', LOCO_FLAG_PENDING => 'Pending approval', LOCO_FLAG_FUZZY => 'Fuzzy', ); return $flags; } function loco_flag( $f ){ if( -1 === $f ){ return 'Untranslated'; } $flags = loco_flags(); if( ! isset($flags[$f]) ){ throw new Exception('Invalid LOCO_FLAG_ constant ', var_export($f,1) ); } return $flags[$f]; } function loco_flag_integer( $f ){ if( is_numeric($f) ){ $f = (int) $f; } else { $f = 'LOCO_FLAG_'.strtoupper($f); $f = defined($f) ? constant($f) : -1; } $flags = loco_flags(); if( ! isset($flags[$f]) ){ throw new InvalidArgumentException('Unknown flag, '.var_export(func_get_arg(0),1)); } return $f; } function loco_po_flags(){ static $map = array ( LOCO_FLAG_FUZZY => '#, fuzzy', ); return $map; } 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('ASCII','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 = ''; } if( $enc && $enc !== 'ASCII' && $enc !== 'UTF-8' ){ $str = iconv( $enc, 'UTF-8//TRANSLIT', $str ); if( ! $str ){ throw new Exception('Failed to ensure UTF-8 from '.$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 $line ){ while( $line = trim($line) ){ $c = $line{0}; if( '"' === $c ){ if( $key && isset($entry) ){ $entry[$key][$idx][] = loco_po_unquote( $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' => '', 'source' => implode('',$entry['id'][0]), 'target' => implode('',$entry['str'][0]), ); $parse_printf = true; 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( "\n", $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 ) ){ $parse_printf = false; if( 'no-' === substr($r[1],0,3) ){ $asset['format'] = false; } else { $asset['format'] = $r[1]; } } else if( $flag = loco_po_parse_flag($flag) ){ $asset['flag'] = $flag; break; } } } if( $parse_printf ){ if( $asset['source'] && loco_sniff_printf( $asset['source'] ) ){ $asset['format'] = 'c'; $parse_printf = false; } } $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' => '', 'source' => null, '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]) : ''; } if( $parse_printf ){ if( $plural['source'] && loco_sniff_printf( $plural['source'] ) ){ $assets[$pidx]['format'] = 'c'; $parse_printf = false; } } $assets[] = $plural; } } } if( $assets && '' === $assets[0]['source'] ){ $headers = loco_parse_po_headers( $assets[0]['target'] ); $indexed = $headers->__get('X-Loco-Lookup'); if( 'id' === $indexed || 'name' === $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, $flag = 0 ){ $map = loco_po_flags(); foreach( explode(',',$text) as $needle ){ if( $needle = trim($needle) ){ foreach( $map as $loco_flag => $haystack ){ if( false !== stripos($haystack, $needle) ){ $flag |= $loco_flag; break; } } } } return $flag; } function loco_po_unquote( $str ){ return substr( stripcslashes($str), 1, -1 ); } function loco_parse_po_headers( $str ){ $headers = new LocoArray( array() ); 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; } class LocoMoParser { private $bin; private $be; private $n; private $o; private $t; private $v; 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(){ $sourceOffset = $this->sourceOffset(); $targetOffset = $this->targetOffset(); $r = array(); $p = array(); $i = 0; $offset = $sourceOffset; while( $offset < $targetOffset ){ $r[$i] = array( 'id' => '', 'source' => '', 'target' => '' ); $len = $this->integerAt( $offset ); $idx = $this->integerAt( $offset + 4 ); $src = $this->bytes( $idx, $len ); $eot = strpos( $src, "\x04" ); if( false !== $eot ){ $r[$i]['context'] = $this->decodeStr( substr($src, 0, $eot ) ); $src = substr( $src, $eot+1 ); } $nul = strpos( $src, "\0" ); if( false !== $nul ){ $p[$i][1] = array( 'id' => '', 'source' => substr($src, $nul+1 ), 'target' => '', 'parent' => $i, 'plural' => 1 ); $src = substr( $src, 0, $nul ); } $r[$i++]['source'] = $this->decodeStr($src); $offset += 8; } $t = $i; $offset = $targetOffset; for( $i = 0; $i < $t; $i++ ){ $len = $this->integerAt( $offset ); $idx = $this->integerAt( $offset + 4 ); $txt = $this->bytes( $idx, $len ); if( false !== strpos( $txt, "\0" ) ){ $arr = explode( "\0", $txt ); $txt = array_shift( $arr ); if( isset($p[$i][1]) ){ foreach( $arr as $_i => $plural_txt ){ $plural_idx = $_i + 1; $p[$i][$plural_idx]['target'] = $this->decodeStr($plural_txt); } } else if( '' === implode('',$arr) ){ } else { throw new Exception('plural has no corresponding msgid_plural at '.$i); } } $r[$i]['target'] = $this->decodeStr($txt); $offset += 8; } foreach( $p as $parent_id => $plurals ){ foreach( $plurals as $plural_idx => $msg ){ if( 1 < $plural_idx ){ $msg['source'] = $plurals[1]['source'].' (plural '.$plural_idx.')'; } $msg['parent'] = $parent_id; $msg['plural'] = $plural_idx; $r[] = $msg; } } return $r; } public function isBigendian(){ while( is_null($this->be) ){ $str = $this->words( 0, 2 ); $arr = unpack('V', $str); if( 0x950412de === $arr[1] ){ $this->be = false; break; } if( 0xde120495 === $arr[1] ){ $this->be = true; break; } throw new Exception('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 Exception('Failed to read 32 bit integer at byte '.$offset); } return $arr[1]; } private function decodeStr( $str ){ $enc = mb_detect_encoding( $str, array('ASCII','UTF-8','ISO-8859-1'), false ); if( $enc && $enc !== 'ASCII' && $enc !== 'UTF-8' ){ $str = iconv( $enc, 'UTF-8', $str ); } return $str; } } function loco_parse_mo( $src ){ $mo = new LocoMoParser($src); return $mo->parse(); } final class PHPTokens implements Iterator { private $tokens; private $i; 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_parse_comment($comment){ if( '*' === $comment{1} ){ $lines = array(); foreach( explode("\n", $comment) as $line ){ $line and $lines[] = trim($line,"/* \r\t"); } $comment = implode("\n", $lines); } return trim( $comment,"/ \n\r\t" ); } function decapse_string( $s ){ if( empty($s) ){ return ''; } $q = $s{0}; switch( $q ){ case "'": case '"': $s = substr( $s, 1, -1 ); if( '"' === $q ){ return stripcslashes($s); } return str_replace( array( '\\'.$q, '\\\\' ), array( $q, '\\' ), $s ); default: return $s; } } function loco_extract_php( array $tokens, $fileref = '' ){ $extractor = new LocoPHPExtractor; return $extractor->extract( $tokens, $fileref ); } final class LocoPHPExtractor { private static $rules = array ( '_' => 's', 'gettext' => 's', 'dgettext' => '_s', 'ngettext' => 'sp', 'dngettext' => '_sp', '__' => 's', '_e' => 's', '_c' => 's', '_n' => 'sp', '_n_noop' => 'sp', '_nc' => 'sp', '__ngettext' => 'sp', '__ngettext_noop' => 'sp', '_x' => 'sc', '_ex' => 'sc', '_nx' => 'sp_c', '_nx_noop' => 'spc', '_n_js' => 'sp', '_nx_js' => 'spc', 'esc_attr__' => 's', 'esc_html__' => 's', 'esc_attr_e' => 's', 'esc_html_e' => 's', 'esc_attr_x' => 'sc', 'esc_html_x' => 'sc', 'comments_number_link' => '_sp', 't' => 's', 'st' => 's', 'trans' => 's', 'transChoice' => 'sp', ); private $exp = array(); private $reg = array(); public function extract( array $tokens, $fileref = '' ){ $tokens = new PHPTokens( $tokens ); $tokens->ignore( T_WHITESPACE ); $comment = ''; foreach( $tokens as $tok ){ if( isset($args) ){ if( ')' === $tok ){ isset($arg) and $arg and $args[] = $arg; $this->push( $rule, $args, $comment, $ref ); unset($args,$arg); $comment = ''; } else if( ',' === $tok ){ isset($arg) and $arg and $args[] = $arg; unset($arg); } else if( isset($arg) ){ $arg[] = $tok; } else { $arg = array( $tok ); } } else if( is_array($tok) ){ list($t,$s) = $tok; if( T_COMMENT === $t || T_DOC_COMMENT === $t ){ $comment = $s; } else if( T_STRING === $t && isset(self::$rules[$s]) && '(' === $tokens->advance() ){ $rule = self::$rules[$s]; $args = array(); $ref = $fileref ? $fileref.':'.$tok[2]: ''; } else if( $comment && false === stripos($comment, 'translators') ){ $comment = ''; } } } return $this->exp; } private function push( $rule, array $args, $comment = '', $ref = '' ){ $s = strpos( $rule, 's'); $p = strpos( $rule, 'p'); $c = strpos( $rule, 'c'); foreach( $args as $i => $tokens ){ if( 1 === count($tokens) && is_array($tokens[0]) && T_CONSTANT_ENCAPSED_STRING === $tokens[0][0] ){ $args[$i] = decapse_string( $tokens[0][1] ); } else { $args[$i] = null; } } $key = $msgid = $args[$s]; if( ! $msgid ){ return null; } $entry = array ( 'id' => '', 'source' => $msgid, 'target' => '', ); if( $c && isset($args[$c]) ){ $entry['context'] = $args[$c]; $key .= "\0". $args[$c]; } if( $ref ){ $entry['refs'] = $ref; } $parse_printf = true; if( $comment ){ if( preg_match('/xgettext:\s*((?:no-)?\w+)-format/', $comment, $r ) ){ if( 'no-' === substr($r[1],0,3) ){ $entry['format'] = false; } else { $entry['format'] = $r[1]; } $comment = str_replace( $r[0], '', $comment ); $parse_printf = false; } $entry['notes'] = loco_parse_comment($comment); } if( $parse_printf && loco_sniff_printf( $msgid ) ){ $entry['format'] = 'php'; $parse_printf = false; } 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( $p && isset($args[$p]) ){ $msgid_plural = $args[$p]; $entry = array ( 'id' => '', 'source' => $msgid_plural, 'target' => '', 'plural' => 1, 'parent' => $index, ); if( $parse_printf && loco_sniff_printf( $msgid_plural ) ){ $this->exp[$index]['format'] = 'php'; } $key = $msgid_plural."\0\0"; if( isset($this->reg[$key]) ){ $plural_index = $this->reg[$key]; $this->exp[$plural_index] = $entry; } else { $plural_index = count($this->exp); $this->reg[$key] = $plural_index; $this->exp[] = $entry; } } return $index; } public function get_xgettext( $input = '-' ){ $cmd = defined('WHICH_XGETTEXT') ? WHICH_XGETTEXT : 'xgettext'; $cmd.= ' -LPHP -c -o-'; if( $k = $this->get_xgettext_keywords() ){ $cmd.= ' -k'.implode(' -k', $k ); } return $cmd.' '.$input; } public function get_xgettext_keywords(){ $ks = array(); foreach( self::$rules as $word => $rule ){ $s = strpos( $rule, 's'); $k = $word.':'.++$s; if( false !== $p = strpos( $rule, 'p') ){ $k.= ','.++$p; } if( false !== $p = strpos( $rule, 'c') ){ $k.= ','.++$p.'c'; } $ks[] = $k; } return $ks; } } function loco_relative_path( $source_path, $target_path ){ $rel = ''; $common = false; $src = preg_split('!/+!', $source_path, -1, PREG_SPLIT_NO_EMPTY ); $dst = preg_split('!/+!', $target_path, -1, PREG_SPLIT_NO_EMPTY ); while( $src && $dst ){ if( current($src) !== current($dst) ){ break; } $common = true; array_shift($src); array_shift($dst); } if( ! $common ){ return $target_path; } if( $src ){ $up = array_fill( 0, count($src), '..' ); $rel = implode('/', $up ); } if( $dst ){ $rel && $rel .= '/'; $rel .= implode('/', $dst ); } return $rel; } class LocoMo { private $bin; private $msgs; private $head; private $hash; public function __construct( array $export, LocoArray $head = null ){ if( ! $head ){ $head = new LocoArray( 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->head = $head; $this->msgs = $export; $this->bin = ''; } public function enableHash(){ return $this->hash = new LocoMoTable; } 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', 'nplurals='.$Loc->nplurals.'; plural='.$Loc->pluraleq.';' ) ; } public function count(){ return count($this->msgs); } public function compile(){ $table = array(''); $sources = array(''); $targets = array( $this->head->__toString() ); foreach( $this->msgs as $r ){ $msgid = $r['key']; if( isset($r['context']) && $r['context'] ){ $msgid or $msgid = "(".$r['context'].')'; $msgid = $r['context']."\x04".$msgid; } if( ! $msgid ){ continue; } $msgstr = $r['translation']; if( ! $msgstr ){ continue; } $table[] = $msgid; if( isset($r['plurals']) ){ foreach( $r['plurals'] as $i => $p ){ if( $i === 0 ){ $msgid .= "\0".$p['key']; } $msgstr .= "\0".$p['translation']; } } $sources[] = $msgid; $targets[] = $msgstr; } asort( $sources, SORT_STRING ); $this->bin = ''; $this->writeInteger( 0x950412de ); $this->writeInteger( 0 ); $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; } } 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; } } function loco_msgfmt( $po, $withhash = false ){ if( ! is_array($po) ){ $po = loco_parse_po( $po ); } $head = null; if( isset($po[0]) && '' === $po[0]['source'] ){ $head = loco_parse_po_headers( $po[0]['target'] ); $po[0] = null; } $export = array(); foreach( $po as $i => $r ){ if( ! $r ){ continue; } $msg = array ( 'key' => $r['source'], 'translation' => $r['target'], ); if( isset($r['parent']) ){ unset( $parent ); $parent = &$export[ $r['parent'] ]; isset($parent['plurals']) or $parent['plurals'] = array(); $parent['plurals'][] = $msg; } else { isset($r['context']) and $msg['context'] = $r['context']; $export[$i] = $msg; } } $mo = new LocoMo( $export, $head ); if( $withhash ){ $mo->enableHash(); } return $mo->compile(); } function loco_po_stats( array $po ){ $t = $n = $f = $u = 0; foreach( $po as $r ){ if( ! isset($r['source']) || '' === $r['source'] ){ continue; } if( isset($r['parent']) && is_int($r['parent']) ){ continue; } $t++; if( '' === $r['target'] ){ $u++; } else if( isset($r['flag']) && LOCO_FLAG_FUZZY === $r['flag'] ){ $f++; } else { $n++; } } $r = $t && $n ? $n / $t : 0; $p = (string) round( $r * 100 ); return compact('t','p','f','u'); }
|
lib/build/locales-compiled.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Compiled source built from Loco core. Do not edit!
|
4 |
-
*
|
5 |
*/
|
6 |
function loco_language_country( $lang ){ static $a; if( ! isset($a) ){ $a = unserialize('a:80:{s:2:"af";s:2:"ZA";s:2:"ar";s:2:"AE";s:2:"az";s:2:"AZ";s:2:"bg";s:2:"BG";s:2:"bn";s:2:"BD";s:2:"bs";s:2:"BA";s:2:"ca";s:2:"ES";s:2:"cs";s:2:"CZ";s:2:"cy";s:2:"GB";s:2:"da";s:2:"DK";s:2:"de";s:2:"DE";s:2:"el";s:2:"GR";s:2:"en";s:2:"GB";s:2:"es";s:2:"ES";s:2:"et";s:2:"EE";s:2:"fa";s:2:"AF";s:2:"fi";s:2:"FI";s:2:"fo";s:2:"FO";s:2:"fr";s:2:"FR";s:2:"ga";s:2:"IE";s:2:"gl";s:2:"ES";s:2:"gn";s:2:"PY";s:2:"he";s:2:"IL";s:2:"hi";s:2:"IN";s:2:"hr";s:2:"HR";s:2:"ht";s:2:"HT";s:2:"hu";s:2:"HU";s:2:"hy";s:2:"AM";s:2:"id";s:2:"ID";s:2:"is";s:2:"IS";s:2:"it";s:2:"IT";s:2:"ja";s:2:"JP";s:2:"jv";s:2:"ID";s:2:"ka";s:2:"GE";s:2:"kk";s:2:"KZ";s:2:"kn";s:2:"IN";s:2:"ko";s:2:"KR";s:2:"lb";s:2:"LU";s:2:"li";s:2:"NL";s:2:"lo";s:2:"LA";s:2:"lt";s:2:"LT";s:2:"lv";s:2:"LV";s:2:"mg";s:2:"MG";s:2:"ms";s:2:"MY";s:2:"mt";s:2:"MT";s:2:"my";s:2:"MM";s:2:"nb";s:2:"NO";s:2:"ne";s:2:"NP";s:2:"nl";s:2:"NL";s:2:"nn";s:2:"NO";s:2:"no";s:2:"NO";s:2:"os";s:2:"RU";s:2:"pa";s:2:"IN";s:2:"pl";s:2:"PL";s:2:"pt";s:2:"PT";s:2:"ro";s:2:"RO";s:2:"ru";s:2:"RU";s:2:"sa";s:2:"IN";s:2:"sc";s:2:"IT";s:2:"sd";s:2:"PK";s:2:"si";s:2:"LK";s:2:"sk";s:2:"SK";s:2:"sl";s:2:"SI";s:2:"so";s:2:"SO";s:2:"sq";s:2:"AL";s:2:"sr";s:2:"RS";s:2:"su";s:2:"ID";s:2:"sv";s:2:"SE";s:2:"sw";s:2:"KE";s:2:"ta";s:2:"IN";s:2:"te";s:2:"IN";s:2:"tg";s:2:"TJ";s:2:"th";s:2:"TH";s:2:"tr";s:2:"TR";s:2:"ug";s:2:"CN";s:2:"uk";s:2:"UA";s:2:"ur";s:2:"IN";s:2:"uz";s:2:"UZ";s:2:"vi";s:2:"VN";s:2:"zh";s:2:"CN";}'); } if( isset($a[$lang]) ){ return $a[$lang]; } return ''; } return unserialize('a:3:{s:7:"locales";a:120:{s:2:"af";a:1:{s:0:"";s:9:"Afrikaans";}s:2:"ak";a:1:{s:0:"";s:4:"Akan";}s:2:"sq";a:1:{s:0:"";s:8:"Albanian";}s:2:"am";a:1:{s:0:"";s:7:"Amharic";}s:2:"ar";a:1:{s:0:"";s:6:"Arabic";}s:2:"hy";a:1:{s:0:"";s:8:"Armenian";}s:3:"rup";a:1:{s:2:"MK";s:9:"Aromanian";}s:2:"as";a:1:{s:0:"";s:8:"Assamese";}s:2:"az";a:2:{s:0:"";s:11:"Azerbaijani";s:2:"TR";s:20:"Azerbaijani (Turkey)";}s:2:"ba";a:1:{s:0:"";s:7:"Bashkir";}s:2:"eu";a:1:{s:0:"";s:6:"Basque";}s:3:"bel";a:1:{s:0:"";s:10:"Belarusian";}s:2:"bn";a:1:{s:2:"BD";s:7:"Bengali";}s:2:"bs";a:1:{s:2:"BA";s:7:"Bosnian";}s:2:"bg";a:1:{s:2:"BG";s:9:"Bulgarian";}s:2:"my";a:1:{s:2:"MM";s:7:"Burmese";}s:2:"ca";a:1:{s:0:"";s:7:"Catalan";}s:3:"bal";a:1:{s:0:"";s:16:"Catalan (Balear)";}s:2:"zh";a:3:{s:2:"CN";s:15:"Chinese (China)";s:2:"HK";s:19:"Chinese (Hong Kong)";s:2:"TW";s:16:"Chinese (Taiwan)";}s:2:"co";a:1:{s:0:"";s:8:"Corsican";}s:2:"hr";a:1:{s:0:"";s:8:"Croatian";}s:2:"cs";a:1:{s:2:"CZ";s:5:"Czech";}s:2:"da";a:1:{s:2:"DK";s:6:"Danish";}s:2:"dv";a:1:{s:0:"";s:7:"Dhivehi";}s:2:"nl";a:2:{s:2:"NL";s:5:"Dutch";s:2:"BE";s:15:"Dutch (Belgium)";}s:2:"en";a:4:{s:2:"US";s:7:"English";s:2:"AU";s:19:"English (Australia)";s:2:"CA";s:16:"English (Canada)";s:2:"GB";s:12:"English (UK)";}s:2:"eo";a:1:{s:0:"";s:9:"Esperanto";}s:2:"et";a:1:{s:0:"";s:8:"Estonian";}s:2:"fo";a:1:{s:0:"";s:7:"Faroese";}s:2:"fi";a:1:{s:0:"";s:7:"Finnish";}s:2:"fr";a:2:{s:2:"BE";s:16:"French (Belgium)";s:2:"FR";s:15:"French (France)";}s:2:"fy";a:1:{s:0:"";s:7:"Frisian";}s:3:"fuc";a:1:{s:0:"";s:5:"Fulah";}s:2:"gl";a:1:{s:2:"ES";s:8:"Galician";}s:2:"ka";a:1:{s:2:"GE";s:8:"Georgian";}s:2:"de";a:2:{s:2:"DE";s:6:"German";s:2:"CH";s:20:"German (Switzerland)";}s:2:"el";a:1:{s:0:"";s:5:"Greek";}s:2:"gn";a:1:{s:0:"";s:8:"Guaraní";}s:2:"gu";a:1:{s:2:"IN";s:8:"Gujarati";}s:3:"haw";a:1:{s:2:"US";s:8:"Hawaiian";}s:3:"haz";a:1:{s:0:"";s:8:"Hazaragi";}s:2:"he";a:1:{s:2:"IL";s:6:"Hebrew";}s:2:"hi";a:1:{s:2:"IN";s:5:"Hindi";}s:2:"hu";a:1:{s:2:"HU";s:9:"Hungarian";}s:2:"is";a:1:{s:2:"IS";s:9:"Icelandic";}s:3:"ido";a:1:{s:0:"";s:3:"Ido";}s:2:"id";a:1:{s:2:"ID";s:10:"Indonesian";}s:2:"ga";a:1:{s:0:"";s:5:"Irish";}s:2:"it";a:1:{s:2:"IT";s:7:"Italian";}s:2:"ja";a:1:{s:0:"";s:8:"Japanese";}s:2:"jv";a:1:{s:2:"ID";s:8:"Javanese";}s:2:"kn";a:1:{s:0:"";s:7:"Kannada";}s:2:"kk";a:1:{s:0:"";s:6:"Kazakh";}s:2:"km";a:1:{s:0:"";s:5:"Khmer";}s:3:"kin";a:1:{s:0:"";s:11:"Kinyarwanda";}s:2:"ky";a:1:{s:2:"KY";s:7:"Kirghiz";}s:2:"ko";a:1:{s:2:"KR";s:6:"Korean";}s:3:"ckb";a:1:{s:0:"";s:16:"Kurdish (Sorani)";}s:2:"lo";a:1:{s:0:"";s:3:"Lao";}s:2:"lv";a:1:{s:0:"";s:7:"Latvian";}s:2:"li";a:1:{s:0:"";s:10:"Limburgish";}s:3:"lin";a:1:{s:0:"";s:7:"Lingala";}s:2:"lt";a:1:{s:2:"LT";s:10:"Lithuanian";}s:2:"lb";a:1:{s:2:"LU";s:13:"Luxembourgish";}s:2:"mk";a:1:{s:2:"MK";s:10:"Macedonian";}s:2:"mg";a:1:{s:2:"MG";s:8:"Malagasy";}s:2:"ms";a:1:{s:2:"MY";s:5:"Malay";}s:2:"ml";a:1:{s:2:"IN";s:9:"Malayalam";}s:2:"mr";a:1:{s:0:"";s:7:"Marathi";}s:3:"xmf";a:1:{s:0:"";s:10:"Mingrelian";}s:2:"mn";a:1:{s:0:"";s:9:"Mongolian";}s:2:"me";a:1:{s:2:"ME";s:11:"Montenegrin";}s:2:"ne";a:1:{s:2:"NP";s:6:"Nepali";}s:2:"nb";a:1:{s:2:"NO";s:19:"Norwegian (Bokmål)";}s:2:"nn";a:1:{s:2:"NO";s:19:"Norwegian (Nynorsk)";}s:3:"ory";a:1:{s:0:"";s:5:"Oriya";}s:2:"os";a:1:{s:0:"";s:7:"Ossetic";}s:2:"ps";a:1:{s:0:"";s:6:"Pashto";}s:2:"fa";a:2:{s:2:"IR";s:7:"Persian";s:2:"AF";s:21:"Persian (Afghanistan)";}s:2:"pl";a:1:{s:2:"PL";s:6:"Polish";}s:2:"pt";a:2:{s:2:"BR";s:19:"Portuguese (Brazil)";s:2:"PT";s:21:"Portuguese (Portugal)";}s:2:"pa";a:1:{s:2:"IN";s:7:"Punjabi";}s:3:"rhg";a:1:{s:0:"";s:8:"Rohingya";}s:2:"ro";a:1:{s:2:"RO";s:8:"Romanian";}s:2:"ru";a:2:{s:2:"RU";s:7:"Russian";s:2:"UA";s:17:"Russian (Ukraine)";}s:3:"rue";a:1:{s:0:"";s:5:"Rusyn";}s:3:"sah";a:1:{s:0:"";s:5:"Sakha";}s:2:"sa";a:1:{s:2:"IN";s:8:"Sanskrit";}s:3:"srd";a:1:{s:0:"";s:9:"Sardinian";}s:2:"gd";a:1:{s:0:"";s:15:"Scottish Gaelic";}s:2:"sr";a:1:{s:2:"RS";s:7:"Serbian";}s:2:"sd";a:1:{s:2:"PK";s:6:"Sindhi";}s:2:"si";a:1:{s:2:"LK";s:7:"Sinhala";}s:2:"sk";a:1:{s:2:"SK";s:6:"Slovak";}s:2:"sl";a:1:{s:2:"SI";s:9:"Slovenian";}s:2:"so";a:1:{s:2:"SO";s:6:"Somali";}s:3:"azb";a:1:{s:0:"";s:17:"South Azerbaijani";}s:2:"es";a:8:{s:2:"AR";s:19:"Spanish (Argentina)";s:2:"CL";s:15:"Spanish (Chile)";s:2:"CO";s:18:"Spanish (Colombia)";s:2:"MX";s:16:"Spanish (Mexico)";s:2:"PE";s:14:"Spanish (Peru)";s:2:"PR";s:21:"Spanish (Puerto Rico)";s:2:"ES";s:15:"Spanish (Spain)";s:2:"VE";s:19:"Spanish (Venezuela)";}s:2:"su";a:1:{s:2:"ID";s:9:"Sundanese";}s:2:"sw";a:1:{s:0:"";s:7:"Swahili";}s:2:"sv";a:1:{s:2:"SE";s:7:"Swedish";}s:3:"gsw";a:1:{s:0:"";s:12:"Swiss German";}s:2:"tl";a:1:{s:0:"";s:7:"Tagalog";}s:2:"tg";a:1:{s:0:"";s:5:"Tajik";}s:3:"tzm";a:1:{s:0:"";s:25:"Tamazight (Central Atlas)";}s:2:"ta";a:2:{s:2:"IN";s:5:"Tamil";s:2:"LK";s:17:"Tamil (Sri Lanka)";}s:2:"tt";a:1:{s:2:"RU";s:5:"Tatar";}s:2:"te";a:1:{s:0:"";s:6:"Telugu";}s:2:"th";a:1:{s:0:"";s:4:"Thai";}s:2:"bo";a:1:{s:0:"";s:7:"Tibetan";}s:3:"tir";a:1:{s:0:"";s:8:"Tigrinya";}s:2:"tr";a:1:{s:2:"TR";s:7:"Turkish";}s:3:"tuk";a:1:{s:0:"";s:7:"Turkmen";}s:2:"ug";a:1:{s:2:"CN";s:6:"Uighur";}s:2:"uk";a:1:{s:0:"";s:9:"Ukrainian";}s:2:"ur";a:1:{s:0:"";s:4:"Urdu";}s:2:"uz";a:1:{s:2:"UZ";s:5:"Uzbek";}s:2:"vi";a:1:{s:0:"";s:10:"Vietnamese";}s:2:"wa";a:1:{s:0:"";s:7:"Walloon";}s:2:"cy";a:1:{s:0:"";s:5:"Welsh";}}s:5:"langs";a:190:{s:2:"ab";a:3:{i:0;s:9:"Abkhazian";i:1;s:0:"";i:2;a:0:{}}s:2:"aa";a:3:{i:0;s:4:"Afar";i:1;s:0:"";i:2;a:0:{}}s:2:"af";a:3:{i:0;s:9:"Afrikaans";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ak";a:3:{i:0;s:4:"Akan";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"sq";a:3:{i:0;s:8:"Albanian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:3:"gsw";a:3:{i:0;s:21:"Alemani; Swiss German";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"am";a:3:{i:0;s:7:"Amharic";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ar";a:3:{i:0;s:6:"Arabic";i:1;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:2;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";}}s:2:"an";a:3:{i:0;s:9:"Aragonese";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"hy";a:3:{i:0;s:8:"Armenian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:3:"rup";a:3:{i:0;s:37:"Aromanian; Arumanian; Macedo-Romanian";i:1;s:0:"";i:2;a:0:{}}s:2:"as";a:3:{i:0;s:8:"Assamese";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"av";a:3:{i:0;s:6:"Avaric";i:1;s:0:"";i:2;a:0:{}}s:2:"ae";a:3:{i:0;s:7:"Avestan";i:1;s:0:"";i:2;a:0:{}}s:2:"ay";a:3:{i:0;s:6:"Aymara";i:1;s:0:"";i:2;a:0:{}}s:2:"az";a:3:{i:0;s:11:"Azerbaijani";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:3:"bal";a:3:{i:0;s:7:"Baluchi";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"bm";a:3:{i:0;s:7:"Bambara";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ba";a:3:{i:0;s:7:"Bashkir";i:1;s:0:"";i:2;a:0:{}}s:2:"eu";a:3:{i:0;s:6:"Basque";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"be";a:3:{i:0;s:10:"Belarusian";i:1;s:82:"(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:4:"many";}}s:2:"bn";a:3:{i:0;s:7:"Bengali";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"bh";a:3:{i:0;s:6:"Bihari";i:1;s:28:"( n >= 0 && n <= 1 ) ? 0 : 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"bi";a:3:{i:0;s:7:"Bislama";i:1;s:0:"";i:2;a:0:{}}s:2:"bs";a:3:{i:0;s:7:"Bosnian";i:1;s:82:"(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"br";a:3:{i:0;s:6:"Breton";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"bg";a:3:{i:0;s:9:"Bulgarian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"my";a:3:{i:0;s:7:"Burmese";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ca";a:3:{i:0;s:18:"Catalan; Valencian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ch";a:3:{i:0;s:8:"Chamorro";i:1;s:0:"";i:2;a:0:{}}s:2:"ce";a:3:{i:0;s:7:"Chechen";i:1;s:0:"";i:2;a:0:{}}s:2:"ny";a:3:{i:0;s:23:"Chichewa; Chewa; Nyanja";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"zh";a:3:{i:0;s:7:"Chinese";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"cu";a:3:{i:0;s:64:"Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old";i:1;s:0:"";i:2;a:0:{}}s:2:"cv";a:3:{i:0;s:7:"Chuvash";i:1;s:0:"";i:2;a:0:{}}s:2:"kw";a:3:{i:0;s:7:"Cornish";i:1;s:27:"n == 1 ? 0 : n == 2 ? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:5:"other";}}s:2:"co";a:3:{i:0;s:8:"Corsican";i:1;s:0:"";i:2;a:0:{}}s:2:"cr";a:3:{i:0;s:4:"Cree";i:1;s:0:"";i:2;a:0:{}}s:2:"hr";a:3:{i:0;s:8:"Croatian";i:1;s:80:"n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"cs";a:3:{i:0;s:5:"Czech";i:1;s:45:"( n == 1 ) ? 0 : ( n >= 2 && n <= 4 ) ? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"da";a:3:{i:0;s:6:"Danish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"dv";a:3:{i:0;s:26:"Divehi; Dhivehi; Maldivian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"nl";a:3:{i:0;s:14:"Dutch; Flemish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"dz";a:3:{i:0;s:8:"Dzongkha";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"en";a:3:{i:0;s:7:"English";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"eo";a:3:{i:0;s:9:"Esperanto";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"et";a:3:{i:0;s:8:"Estonian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ee";a:3:{i:0;s:3:"Ewe";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"fo";a:3:{i:0;s:7:"Faroese";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"fj";a:3:{i:0;s:6:"Fijian";i:1;s:0:"";i:2;a:0:{}}s:2:"fi";a:3:{i:0;s:7:"Finnish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"fr";a:3:{i:0;s:6:"French";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ff";a:3:{i:0;s:5:"Fulah";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"gd";a:3:{i:0;s:23:"Gaelic; Scottish Gaelic";i:1;s:26:"n < 2 ? 0 : n == 2 ? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:5:"other";}}s:2:"gl";a:3:{i:0;s:8:"Galician";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"lg";a:3:{i:0;s:5:"Ganda";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ka";a:3:{i:0;s:8:"Georgian";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"de";a:3:{i:0;s:6:"German";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"el";a:3:{i:0;s:5:"Greek";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"gn";a:3:{i:0;s:7:"Guarani";i:1;s:0:"";i:2;a:0:{}}s:2:"gu";a:3:{i:0;s:8:"Gujarati";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ht";a:3:{i:0;s:23:"Haitian; Haitian Creole";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ha";a:3:{i:0;s:5:"Hausa";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:3:"haw";a:3:{i:0;s:8:"Hawaiian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"he";a:3:{i:0;s:6:"Hebrew";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"hz";a:3:{i:0;s:6:"Herero";i:1;s:0:"";i:2;a:0:{}}s:2:"hi";a:3:{i:0;s:5:"Hindi";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ho";a:3:{i:0;s:9:"Hiri Motu";i:1;s:0:"";i:2;a:0:{}}s:2:"hu";a:3:{i:0;s:9:"Hungarian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"is";a:3:{i:0;s:9:"Icelandic";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"io";a:3:{i:0;s:3:"Ido";i:1;s:0:"";i:2;a:0:{}}s:2:"ig";a:3:{i:0;s:4:"Igbo";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"id";a:3:{i:0;s:10:"Indonesian";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ia";a:3:{i:0;s:58:"Interlingua (International Auxiliary Language Association)";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ie";a:3:{i:0;s:11:"Interlingue";i:1;s:0:"";i:2;a:0:{}}s:2:"iu";a:3:{i:0;s:9:"Inuktitut";i:1;s:27:"n == 1 ? 0 : n == 2 ? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:5:"other";}}s:2:"ik";a:3:{i:0;s:7:"Inupiaq";i:1;s:0:"";i:2;a:0:{}}s:2:"ga";a:3:{i:0;s:5:"Irish";i:1;s:44:"n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4";i:2;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";}}s:2:"it";a:3:{i:0;s:7:"Italian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ja";a:3:{i:0;s:8:"Japanese";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"jv";a:3:{i:0;s:8:"Javanese";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"kl";a:3:{i:0;s:24:"Kalaallisut; Greenlandic";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"kn";a:3:{i:0;s:7:"Kannada";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"kr";a:3:{i:0;s:6:"Kanuri";i:1;s:0:"";i:2;a:0:{}}s:2:"ks";a:3:{i:0;s:8:"Kashmiri";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"kk";a:3:{i:0;s:6:"Kazakh";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"km";a:3:{i:0;s:5:"Khmer";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ki";a:3:{i:0;s:14:"Kikuyu; Gikuyu";i:1;s:0:"";i:2;a:0:{}}s:2:"rw";a:3:{i:0;s:11:"Kinyarwanda";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ky";a:3:{i:0;s:7:"Kirghiz";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"kv";a:3:{i:0;s:4:"Komi";i:1;s:0:"";i:2;a:0:{}}s:2:"kg";a:3:{i:0;s:5:"Kongo";i:1;s:0:"";i:2;a:0:{}}s:2:"ko";a:3:{i:0;s:6:"Korean";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"kj";a:3:{i:0;s:18:"Kuanyama; Kwanyama";i:1;s:0:"";i:2;a:0:{}}s:2:"ku";a:3:{i:0;s:7:"Kurdish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"lo";a:3:{i:0;s:3:"Lao";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"la";a:3:{i:0;s:5:"Latin";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"lv";a:3:{i:0;s:7:"Latvian";i:1;s:49:"n % 10 == 1 && n % 100 != 11 ? 0 : n != 0 ? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:5:"other";i:2;s:4:"zero";}}s:2:"li";a:3:{i:0;s:32:"Limburgan; Limburger; Limburgish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ln";a:3:{i:0;s:7:"Lingala";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"lt";a:3:{i:0;s:10:"Lithuanian";i:1;s:71:"(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"lu";a:3:{i:0;s:12:"Luba-Katanga";i:1;s:0:"";i:2;a:0:{}}s:2:"lb";a:3:{i:0;s:28:"Luxembourgish; Letzeburgesch";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"mk";a:3:{i:0;s:10:"Macedonian";i:1;s:40:"( n % 10 == 1 && n % 100 != 11 ) ? 0 : 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"mg";a:3:{i:0;s:8:"Malagasy";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ms";a:3:{i:0;s:5:"Malay";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ml";a:3:{i:0;s:9:"Malayalam";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"mt";a:3:{i:0;s:7:"Maltese";i:1;s:75:"(n==1 ? 0 : n==0||( n%100>1 && n%100<11)? 1 :(n%100>10 && n%100<20)? 2 : 3)";i:2;a:4:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:4:"many";i:3;s:5:"other";}}s:2:"gv";a:3:{i:0;s:4:"Manx";i:1;s:43:"n%10==1 ? 0 : n%10==2 ? 1 : n%20==0 ? 2 : 3";i:2;a:4:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:3:"few";i:3;s:5:"other";}}s:2:"mi";a:3:{i:0;s:5:"Maori";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"mr";a:3:{i:0;s:7:"Marathi";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"mh";a:3:{i:0;s:11:"Marshallese";i:1;s:0:"";i:2;a:0:{}}s:2:"mo";a:3:{i:0;s:9:"Moldavian";i:1;s:50:"n == 1 ? 0 : n % 100 >= 1 && n % 100 <= 19 ? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"mn";a:3:{i:0;s:9:"Mongolian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"na";a:3:{i:0;s:5:"Nauru";i:1;s:0:"";i:2;a:0:{}}s:2:"nv";a:3:{i:0;s:14:"Navajo; Navaho";i:1;s:0:"";i:2;a:0:{}}s:2:"nd";a:3:{i:0;s:29:"Ndebele, North; North Ndebele";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"nr";a:3:{i:0;s:29:"Ndebele, South; South Ndebele";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ng";a:3:{i:0;s:6:"Ndonga";i:1;s:0:"";i:2;a:0:{}}s:2:"ne";a:3:{i:0;s:6:"Nepali";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"se";a:3:{i:0;s:13:"Northern Sami";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"no";a:3:{i:0;s:9:"Norwegian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"nb";a:3:{i:0;s:17:"Norwegian Bokmål";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"nn";a:3:{i:0;s:17:"Norwegian Nynorsk";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"oc";a:3:{i:0;s:31:"Occitan (post 1500); Provençal";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"oj";a:3:{i:0;s:6:"Ojibwa";i:1;s:0:"";i:2;a:0:{}}s:2:"or";a:3:{i:0;s:5:"Oriya";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"om";a:3:{i:0;s:5:"Oromo";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"os";a:3:{i:0;s:17:"Ossetian; Ossetic";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"pi";a:3:{i:0;s:4:"Pali";i:1;s:0:"";i:2;a:0:{}}s:2:"pa";a:3:{i:0;s:16:"Panjabi; Punjabi";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"fa";a:3:{i:0;s:7:"Persian";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"pl";a:3:{i:0;s:6:"Polish";i:1;s:66:"(n==1 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:4:"many";}}s:2:"pt";a:3:{i:0;s:10:"Portuguese";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ps";a:3:{i:0;s:6:"Pushto";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"qu";a:3:{i:0;s:7:"Quechua";i:1;s:0:"";i:2;a:0:{}}s:2:"rm";a:3:{i:0;s:13:"Raeto-Romance";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ro";a:3:{i:0;s:8:"Romanian";i:1;s:56:"(n==1 ? 0 :(((n%100>19)||(( n%100==0)&&(n!=0)))? 2 : 1))";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"rn";a:3:{i:0;s:5:"Rundi";i:1;s:0:"";i:2;a:0:{}}s:2:"ru";a:3:{i:0;s:7:"Russian";i:1;s:82:"(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:4:"many";}}s:2:"sm";a:3:{i:0;s:6:"Samoan";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"sg";a:3:{i:0;s:5:"Sango";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"sa";a:3:{i:0;s:8:"Sanskrit";i:1;s:0:"";i:2;a:0:{}}s:2:"sc";a:3:{i:0;s:9:"Sardinian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"sr";a:3:{i:0;s:7:"Serbian";i:1;s:82:"(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"sn";a:3:{i:0;s:5:"Shona";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ii";a:3:{i:0;s:10:"Sichuan Yi";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"sd";a:3:{i:0;s:6:"Sindhi";i:1;s:0:"";i:2;a:0:{}}s:2:"si";a:3:{i:0;s:18:"Sinhala; Sinhalese";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"sk";a:3:{i:0;s:6:"Slovak";i:1;s:45:"( n == 1 ) ? 0 : ( n >= 2 && n <= 4 ) ? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"sl";a:3:{i:0;s:9:"Slovenian";i:1;s:56:"n%100==1 ? 0 : n%100==2 ? 1 : n%100==3||n%100==4 ? 2 : 3";i:2;a:4:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:3:"few";i:3;s:5:"other";}}s:2:"so";a:3:{i:0;s:6:"Somali";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"st";a:3:{i:0;s:15:"Sotho, Southern";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"es";a:3:{i:0;s:7:"Spanish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"su";a:3:{i:0;s:9:"Sundanese";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"sw";a:3:{i:0;s:7:"Swahili";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ss";a:3:{i:0;s:5:"Swati";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"sv";a:3:{i:0;s:7:"Swedish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"tl";a:3:{i:0;s:7:"Tagalog";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ty";a:3:{i:0;s:8:"Tahitian";i:1;s:0:"";i:2;a:0:{}}s:2:"tg";a:3:{i:0;s:5:"Tajik";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ta";a:3:{i:0;s:5:"Tamil";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"tt";a:3:{i:0;s:5:"Tatar";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"te";a:3:{i:0;s:6:"Telugu";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"th";a:3:{i:0;s:4:"Thai";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"bo";a:3:{i:0;s:7:"Tibetan";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ti";a:3:{i:0;s:8:"Tigrinya";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"to";a:3:{i:0;s:21:"Tonga (Tonga Islands)";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ts";a:3:{i:0;s:6:"Tsonga";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"tn";a:3:{i:0;s:6:"Tswana";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"tr";a:3:{i:0;s:7:"Turkish";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"tk";a:3:{i:0;s:7:"Turkmen";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"tw";a:3:{i:0;s:3:"Twi";i:1;s:0:"";i:2;a:0:{}}s:2:"ug";a:3:{i:0;s:14:"Uighur; Uyghur";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"uk";a:3:{i:0;s:9:"Ukrainian";i:1;s:82:"(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:4:"many";}}s:2:"ur";a:3:{i:0;s:4:"Urdu";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"uz";a:3:{i:0;s:5:"Uzbek";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ve";a:3:{i:0;s:5:"Venda";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"vi";a:3:{i:0;s:10:"Vietnamese";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"vo";a:3:{i:0;s:8:"Volapük";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"wa";a:3:{i:0;s:7:"Walloon";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"cy";a:3:{i:0;s:5:"Welsh";i:1;s:56:"n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n==3 ? 3 : n==6 ? 4 : 5";i:2;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";}}s:2:"fy";a:3:{i:0;s:15:"Western Frisian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"wo";a:3:{i:0;s:5:"Wolof";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"xh";a:3:{i:0;s:5:"Xhosa";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:3:"sah";a:3:{i:0;s:5:"Yakut";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"yi";a:3:{i:0;s:7:"Yiddish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"yo";a:3:{i:0;s:6:"Yoruba";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"za";a:3:{i:0;s:14:"Zhuang; Chuang";i:1;s:0:"";i:2;a:0:{}}s:2:"zu";a:3:{i:0;s:4:"Zulu";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}}s:7:"regions";a:249:{s:2:"AF";s:11:"Afghanistan";s:2:"AX";s:14:"Åland Islands";s:2:"AL";s:7:"Albania";s:2:"DZ";s:7:"Algeria";s:2:"AS";s:14:"American Samoa";s:2:"AD";s:7:"Andorra";s:2:"AO";s:6:"Angola";s:2:"AI";s:8:"Anguilla";s:2:"AQ";s:10:"Antarctica";s:2:"AG";s:19:"Antigua and Barbuda";s:2:"AR";s:9:"Argentina";s:2:"AM";s:7:"Armenia";s:2:"AW";s:5:"Aruba";s:2:"AU";s:9:"Australia";s:2:"AT";s:7:"Austria";s:2:"AZ";s:10:"Azerbaijan";s:2:"BS";s:7:"Bahamas";s:2:"BH";s:7:"Bahrain";s:2:"BD";s:10:"Bangladesh";s:2:"BB";s:8:"Barbados";s:2:"BY";s:7:"Belarus";s:2:"BE";s:7:"Belgium";s:2:"BZ";s:6:"Belize";s:2:"BJ";s:5:"Benin";s:2:"BM";s:7:"Bermuda";s:2:"BT";s:6:"Bhutan";s:2:"BO";s:31:"Bolivia, Plurinational State of";s:2:"BQ";s:32:"Bonaire, Sint Eustatius and Saba";s:2:"BA";s:22:"Bosnia and Herzegovina";s:2:"BW";s:8:"Botswana";s:2:"BV";s:13:"Bouvet Island";s:2:"BR";s:6:"Brazil";s:2:"IO";s:30:"British Indian Ocean Territory";s:2:"BN";s:17:"Brunei Darussalam";s:2:"BG";s:8:"Bulgaria";s:2:"BF";s:12:"Burkina Faso";s:2:"BI";s:7:"Burundi";s:2:"KH";s:8:"Cambodia";s:2:"CM";s:8:"Cameroon";s:2:"CA";s:6:"Canada";s:2:"CV";s:10:"Cape Verde";s:2:"KY";s:14:"Cayman Islands";s:2:"CF";s:24:"Central African Republic";s:2:"TD";s:4:"Chad";s:2:"CL";s:5:"Chile";s:2:"CN";s:5:"China";s:2:"CX";s:16:"Christmas Island";s:2:"CC";s:23:"Cocos (Keeling) Islands";s:2:"CO";s:8:"Colombia";s:2:"KM";s:7:"Comoros";s:2:"CG";s:5:"Congo";s:2:"CD";s:37:"Congo, The Democratic Republic of The";s:2:"CK";s:12:"Cook Islands";s:2:"CR";s:10:"Costa Rica";s:2:"CI";s:14:"Côte D\'Ivoire";s:2:"HR";s:7:"Croatia";s:2:"CU";s:4:"Cuba";s:2:"CW";s:8:"Curaçao";s:2:"CY";s:6:"Cyprus";s:2:"CZ";s:14:"Czech Republic";s:2:"DK";s:7:"Denmark";s:2:"DJ";s:8:"Djibouti";s:2:"DM";s:8:"Dominica";s:2:"DO";s:18:"Dominican Republic";s:2:"EC";s:7:"Ecuador";s:2:"EG";s:5:"Egypt";s:2:"SV";s:11:"El Salvador";s:2:"GQ";s:17:"Equatorial Guinea";s:2:"ER";s:7:"Eritrea";s:2:"EE";s:7:"Estonia";s:2:"ET";s:8:"Ethiopia";s:2:"FK";s:27:"Falkland Islands (Malvinas)";s:2:"FO";s:13:"Faroe Islands";s:2:"FJ";s:4:"Fiji";s:2:"FI";s:7:"Finland";s:2:"FR";s:6:"France";s:2:"GF";s:13:"French Guiana";s:2:"PF";s:16:"French Polynesia";s:2:"TF";s:27:"French Southern Territories";s:2:"GA";s:5:"Gabon";s:2:"GM";s:6:"Gambia";s:2:"GE";s:7:"Georgia";s:2:"DE";s:7:"Germany";s:2:"GH";s:5:"Ghana";s:2:"GI";s:9:"Gibraltar";s:2:"GR";s:6:"Greece";s:2:"GL";s:9:"Greenland";s:2:"GD";s:7:"Grenada";s:2:"GP";s:10:"Guadeloupe";s:2:"GU";s:4:"Guam";s:2:"GT";s:9:"Guatemala";s:2:"GG";s:8:"Guernsey";s:2:"GN";s:6:"Guinea";s:2:"GW";s:13:"Guinea-Bissau";s:2:"GY";s:6:"Guyana";s:2:"HT";s:5:"Haiti";s:2:"HM";s:33:"Heard Island and Mcdonald Islands";s:2:"VA";s:29:"Holy See (Vatican City State)";s:2:"HN";s:8:"Honduras";s:2:"HK";s:9:"Hong Kong";s:2:"HU";s:7:"Hungary";s:2:"IS";s:7:"Iceland";s:2:"IN";s:5:"India";s:2:"ID";s:9:"Indonesia";s:2:"IR";s:25:"Iran, Islamic Republic of";s:2:"IQ";s:4:"Iraq";s:2:"IE";s:7:"Ireland";s:2:"IM";s:11:"Isle of Man";s:2:"IL";s:6:"Israel";s:2:"IT";s:5:"Italy";s:2:"JM";s:7:"Jamaica";s:2:"JP";s:5:"Japan";s:2:"JE";s:6:"Jersey";s:2:"JO";s:6:"Jordan";s:2:"KZ";s:10:"Kazakhstan";s:2:"KE";s:5:"Kenya";s:2:"KI";s:8:"Kiribati";s:2:"KP";s:38:"Korea, Democratic People\'s Republic of";s:2:"KR";s:18:"Korea, Republic of";s:2:"KW";s:6:"Kuwait";s:2:"KG";s:10:"Kyrgyzstan";s:2:"LA";s:32:"Lao People\'s Democratic Republic";s:2:"LV";s:6:"Latvia";s:2:"LB";s:7:"Lebanon";s:2:"LS";s:7:"Lesotho";s:2:"LR";s:7:"Liberia";s:2:"LY";s:5:"Libya";s:2:"LI";s:13:"Liechtenstein";s:2:"LT";s:9:"Lithuania";s:2:"LU";s:10:"Luxembourg";s:2:"MO";s:5:"Macao";s:2:"MK";s:42:"Macedonia, The Former Yugoslav Republic of";s:2:"MG";s:10:"Madagascar";s:2:"MW";s:6:"Malawi";s:2:"MY";s:8:"Malaysia";s:2:"MV";s:8:"Maldives";s:2:"ML";s:4:"Mali";s:2:"MT";s:5:"Malta";s:2:"MH";s:16:"Marshall Islands";s:2:"MQ";s:10:"Martinique";s:2:"MR";s:10:"Mauritania";s:2:"MU";s:9:"Mauritius";s:2:"YT";s:7:"Mayotte";s:2:"MX";s:6:"Mexico";s:2:"FM";s:31:"Micronesia, Federated States of";s:2:"MD";s:20:"Moldova, Republic of";s:2:"MC";s:6:"Monaco";s:2:"MN";s:8:"Mongolia";s:2:"ME";s:10:"Montenegro";s:2:"MS";s:10:"Montserrat";s:2:"MA";s:7:"Morocco";s:2:"MZ";s:10:"Mozambique";s:2:"MM";s:7:"Myanmar";s:2:"NA";s:7:"Namibia";s:2:"NR";s:5:"Nauru";s:2:"NP";s:5:"Nepal";s:2:"NL";s:11:"Netherlands";s:2:"NC";s:13:"New Caledonia";s:2:"NZ";s:11:"New Zealand";s:2:"NI";s:9:"Nicaragua";s:2:"NE";s:5:"Niger";s:2:"NG";s:7:"Nigeria";s:2:"NU";s:4:"Niue";s:2:"NF";s:14:"Norfolk Island";s:2:"MP";s:24:"Northern Mariana Islands";s:2:"NO";s:6:"Norway";s:2:"OM";s:4:"Oman";s:2:"PK";s:8:"Pakistan";s:2:"PW";s:5:"Palau";s:2:"PS";s:31:"Palestinian Territory, Occupied";s:2:"PA";s:6:"Panama";s:2:"PG";s:16:"Papua New Guinea";s:2:"PY";s:8:"Paraguay";s:2:"PE";s:4:"Peru";s:2:"PH";s:11:"Philippines";s:2:"PN";s:8:"Pitcairn";s:2:"PL";s:6:"Poland";s:2:"PT";s:8:"Portugal";s:2:"PR";s:11:"Puerto Rico";s:2:"QA";s:5:"Qatar";s:2:"RE";s:8:"Réunion";s:2:"RO";s:7:"Romania";s:2:"RU";s:18:"Russian Federation";s:2:"RW";s:6:"Rwanda";s:2:"BL";s:17:"Saint Barthélemy";s:2:"SH";s:44:"Saint Helena, Ascension and Tristan Da Cunha";s:2:"KN";s:21:"Saint Kitts and Nevis";s:2:"LC";s:11:"Saint Lucia";s:2:"MF";s:26:"Saint Martin (French Part)";s:2:"PM";s:25:"Saint Pierre and Miquelon";s:2:"VC";s:32:"Saint Vincent and The Grenadines";s:2:"WS";s:5:"Samoa";s:2:"SM";s:10:"San Marino";s:2:"ST";s:21:"Sao Tome and Principe";s:2:"SA";s:12:"Saudi Arabia";s:2:"SN";s:7:"Senegal";s:2:"RS";s:6:"Serbia";s:2:"SC";s:10:"Seychelles";s:2:"SL";s:12:"Sierra Leone";s:2:"SG";s:9:"Singapore";s:2:"SX";s:25:"Sint Maarten (Dutch Part)";s:2:"SK";s:8:"Slovakia";s:2:"SI";s:8:"Slovenia";s:2:"SB";s:15:"Solomon Islands";s:2:"SO";s:7:"Somalia";s:2:"ZA";s:12:"South Africa";s:2:"GS";s:44:"South Georgia and The South Sandwich Islands";s:2:"SS";s:11:"South Sudan";s:2:"ES";s:5:"Spain";s:2:"LK";s:9:"Sri Lanka";s:2:"SD";s:5:"Sudan";s:2:"SR";s:8:"Suriname";s:2:"SJ";s:22:"Svalbard and Jan Mayen";s:2:"SZ";s:9:"Swaziland";s:2:"SE";s:6:"Sweden";s:2:"CH";s:11:"Switzerland";s:2:"SY";s:20:"Syrian Arab Republic";s:2:"TW";s:25:"Taiwan, Province of China";s:2:"TJ";s:10:"Tajikistan";s:2:"TZ";s:28:"Tanzania, United Republic of";s:2:"TH";s:8:"Thailand";s:2:"TL";s:11:"Timor-Leste";s:2:"TG";s:4:"Togo";s:2:"TK";s:7:"Tokelau";s:2:"TO";s:5:"Tonga";s:2:"TT";s:19:"Trinidad and Tobago";s:2:"TN";s:7:"Tunisia";s:2:"TR";s:6:"Turkey";s:2:"TM";s:12:"Turkmenistan";s:2:"TC";s:24:"Turks and Caicos Islands";s:2:"TV";s:6:"Tuvalu";s:2:"UG";s:6:"Uganda";s:2:"UA";s:7:"Ukraine";s:2:"AE";s:20:"United Arab Emirates";s:2:"GB";s:14:"United Kingdom";s:2:"US";s:13:"United States";s:2:"UM";s:36:"United States Minor Outlying Islands";s:2:"UY";s:7:"Uruguay";s:2:"UZ";s:10:"Uzbekistan";s:2:"VU";s:7:"Vanuatu";s:2:"VE";s:33:"Venezuela, Bolivarian Republic of";s:2:"VN";s:8:"Viet Nam";s:2:"VG";s:23:"Virgin Islands, British";s:2:"VI";s:20:"Virgin Islands, U.S.";s:2:"WF";s:17:"Wallis and Futuna";s:2:"EH";s:14:"Western Sahara";s:2:"YE";s:5:"Yemen";s:2:"ZM";s:6:"Zambia";s:2:"ZW";s:8:"Zimbabwe";}}');
|
1 |
<?php
|
2 |
/**
|
3 |
* Compiled source built from Loco core. Do not edit!
|
4 |
+
* Fri, 30 Jan 2015 14:50:12 +0000
|
5 |
*/
|
6 |
function loco_language_country( $lang ){ static $a; if( ! isset($a) ){ $a = unserialize('a:80:{s:2:"af";s:2:"ZA";s:2:"ar";s:2:"AE";s:2:"az";s:2:"AZ";s:2:"bg";s:2:"BG";s:2:"bn";s:2:"BD";s:2:"bs";s:2:"BA";s:2:"ca";s:2:"ES";s:2:"cs";s:2:"CZ";s:2:"cy";s:2:"GB";s:2:"da";s:2:"DK";s:2:"de";s:2:"DE";s:2:"el";s:2:"GR";s:2:"en";s:2:"GB";s:2:"es";s:2:"ES";s:2:"et";s:2:"EE";s:2:"fa";s:2:"AF";s:2:"fi";s:2:"FI";s:2:"fo";s:2:"FO";s:2:"fr";s:2:"FR";s:2:"ga";s:2:"IE";s:2:"gl";s:2:"ES";s:2:"gn";s:2:"PY";s:2:"he";s:2:"IL";s:2:"hi";s:2:"IN";s:2:"hr";s:2:"HR";s:2:"ht";s:2:"HT";s:2:"hu";s:2:"HU";s:2:"hy";s:2:"AM";s:2:"id";s:2:"ID";s:2:"is";s:2:"IS";s:2:"it";s:2:"IT";s:2:"ja";s:2:"JP";s:2:"jv";s:2:"ID";s:2:"ka";s:2:"GE";s:2:"kk";s:2:"KZ";s:2:"kn";s:2:"IN";s:2:"ko";s:2:"KR";s:2:"lb";s:2:"LU";s:2:"li";s:2:"NL";s:2:"lo";s:2:"LA";s:2:"lt";s:2:"LT";s:2:"lv";s:2:"LV";s:2:"mg";s:2:"MG";s:2:"ms";s:2:"MY";s:2:"mt";s:2:"MT";s:2:"my";s:2:"MM";s:2:"nb";s:2:"NO";s:2:"ne";s:2:"NP";s:2:"nl";s:2:"NL";s:2:"nn";s:2:"NO";s:2:"no";s:2:"NO";s:2:"os";s:2:"RU";s:2:"pa";s:2:"IN";s:2:"pl";s:2:"PL";s:2:"pt";s:2:"PT";s:2:"ro";s:2:"RO";s:2:"ru";s:2:"RU";s:2:"sa";s:2:"IN";s:2:"sc";s:2:"IT";s:2:"sd";s:2:"PK";s:2:"si";s:2:"LK";s:2:"sk";s:2:"SK";s:2:"sl";s:2:"SI";s:2:"so";s:2:"SO";s:2:"sq";s:2:"AL";s:2:"sr";s:2:"RS";s:2:"su";s:2:"ID";s:2:"sv";s:2:"SE";s:2:"sw";s:2:"KE";s:2:"ta";s:2:"IN";s:2:"te";s:2:"IN";s:2:"tg";s:2:"TJ";s:2:"th";s:2:"TH";s:2:"tr";s:2:"TR";s:2:"ug";s:2:"CN";s:2:"uk";s:2:"UA";s:2:"ur";s:2:"IN";s:2:"uz";s:2:"UZ";s:2:"vi";s:2:"VN";s:2:"zh";s:2:"CN";}'); } if( isset($a[$lang]) ){ return $a[$lang]; } return ''; } return unserialize('a:3:{s:7:"locales";a:120:{s:2:"af";a:1:{s:0:"";s:9:"Afrikaans";}s:2:"ak";a:1:{s:0:"";s:4:"Akan";}s:2:"sq";a:1:{s:0:"";s:8:"Albanian";}s:2:"am";a:1:{s:0:"";s:7:"Amharic";}s:2:"ar";a:1:{s:0:"";s:6:"Arabic";}s:2:"hy";a:1:{s:0:"";s:8:"Armenian";}s:3:"rup";a:1:{s:2:"MK";s:9:"Aromanian";}s:2:"as";a:1:{s:0:"";s:8:"Assamese";}s:2:"az";a:2:{s:0:"";s:11:"Azerbaijani";s:2:"TR";s:20:"Azerbaijani (Turkey)";}s:2:"ba";a:1:{s:0:"";s:7:"Bashkir";}s:2:"eu";a:1:{s:0:"";s:6:"Basque";}s:3:"bel";a:1:{s:0:"";s:10:"Belarusian";}s:2:"bn";a:1:{s:2:"BD";s:7:"Bengali";}s:2:"bs";a:1:{s:2:"BA";s:7:"Bosnian";}s:2:"bg";a:1:{s:2:"BG";s:9:"Bulgarian";}s:2:"my";a:1:{s:2:"MM";s:7:"Burmese";}s:2:"ca";a:1:{s:0:"";s:7:"Catalan";}s:3:"bal";a:1:{s:0:"";s:16:"Catalan (Balear)";}s:2:"zh";a:3:{s:2:"CN";s:15:"Chinese (China)";s:2:"HK";s:19:"Chinese (Hong Kong)";s:2:"TW";s:16:"Chinese (Taiwan)";}s:2:"co";a:1:{s:0:"";s:8:"Corsican";}s:2:"hr";a:1:{s:0:"";s:8:"Croatian";}s:2:"cs";a:1:{s:2:"CZ";s:5:"Czech";}s:2:"da";a:1:{s:2:"DK";s:6:"Danish";}s:2:"dv";a:1:{s:0:"";s:7:"Dhivehi";}s:2:"nl";a:2:{s:2:"NL";s:5:"Dutch";s:2:"BE";s:15:"Dutch (Belgium)";}s:2:"en";a:4:{s:2:"US";s:7:"English";s:2:"AU";s:19:"English (Australia)";s:2:"CA";s:16:"English (Canada)";s:2:"GB";s:12:"English (UK)";}s:2:"eo";a:1:{s:0:"";s:9:"Esperanto";}s:2:"et";a:1:{s:0:"";s:8:"Estonian";}s:2:"fo";a:1:{s:0:"";s:7:"Faroese";}s:2:"fi";a:1:{s:0:"";s:7:"Finnish";}s:2:"fr";a:2:{s:2:"BE";s:16:"French (Belgium)";s:2:"FR";s:15:"French (France)";}s:2:"fy";a:1:{s:0:"";s:7:"Frisian";}s:3:"fuc";a:1:{s:0:"";s:5:"Fulah";}s:2:"gl";a:1:{s:2:"ES";s:8:"Galician";}s:2:"ka";a:1:{s:2:"GE";s:8:"Georgian";}s:2:"de";a:2:{s:2:"DE";s:6:"German";s:2:"CH";s:20:"German (Switzerland)";}s:2:"el";a:1:{s:0:"";s:5:"Greek";}s:2:"gn";a:1:{s:0:"";s:8:"Guaraní";}s:2:"gu";a:1:{s:2:"IN";s:8:"Gujarati";}s:3:"haw";a:1:{s:2:"US";s:8:"Hawaiian";}s:3:"haz";a:1:{s:0:"";s:8:"Hazaragi";}s:2:"he";a:1:{s:2:"IL";s:6:"Hebrew";}s:2:"hi";a:1:{s:2:"IN";s:5:"Hindi";}s:2:"hu";a:1:{s:2:"HU";s:9:"Hungarian";}s:2:"is";a:1:{s:2:"IS";s:9:"Icelandic";}s:3:"ido";a:1:{s:0:"";s:3:"Ido";}s:2:"id";a:1:{s:2:"ID";s:10:"Indonesian";}s:2:"ga";a:1:{s:0:"";s:5:"Irish";}s:2:"it";a:1:{s:2:"IT";s:7:"Italian";}s:2:"ja";a:1:{s:0:"";s:8:"Japanese";}s:2:"jv";a:1:{s:2:"ID";s:8:"Javanese";}s:2:"kn";a:1:{s:0:"";s:7:"Kannada";}s:2:"kk";a:1:{s:0:"";s:6:"Kazakh";}s:2:"km";a:1:{s:0:"";s:5:"Khmer";}s:3:"kin";a:1:{s:0:"";s:11:"Kinyarwanda";}s:2:"ky";a:1:{s:2:"KY";s:7:"Kirghiz";}s:2:"ko";a:1:{s:2:"KR";s:6:"Korean";}s:3:"ckb";a:1:{s:0:"";s:16:"Kurdish (Sorani)";}s:2:"lo";a:1:{s:0:"";s:3:"Lao";}s:2:"lv";a:1:{s:0:"";s:7:"Latvian";}s:2:"li";a:1:{s:0:"";s:10:"Limburgish";}s:3:"lin";a:1:{s:0:"";s:7:"Lingala";}s:2:"lt";a:1:{s:2:"LT";s:10:"Lithuanian";}s:2:"lb";a:1:{s:2:"LU";s:13:"Luxembourgish";}s:2:"mk";a:1:{s:2:"MK";s:10:"Macedonian";}s:2:"mg";a:1:{s:2:"MG";s:8:"Malagasy";}s:2:"ms";a:1:{s:2:"MY";s:5:"Malay";}s:2:"ml";a:1:{s:2:"IN";s:9:"Malayalam";}s:2:"mr";a:1:{s:0:"";s:7:"Marathi";}s:3:"xmf";a:1:{s:0:"";s:10:"Mingrelian";}s:2:"mn";a:1:{s:0:"";s:9:"Mongolian";}s:2:"me";a:1:{s:2:"ME";s:11:"Montenegrin";}s:2:"ne";a:1:{s:2:"NP";s:6:"Nepali";}s:2:"nb";a:1:{s:2:"NO";s:19:"Norwegian (Bokmål)";}s:2:"nn";a:1:{s:2:"NO";s:19:"Norwegian (Nynorsk)";}s:3:"ory";a:1:{s:0:"";s:5:"Oriya";}s:2:"os";a:1:{s:0:"";s:7:"Ossetic";}s:2:"ps";a:1:{s:0:"";s:6:"Pashto";}s:2:"fa";a:2:{s:2:"IR";s:7:"Persian";s:2:"AF";s:21:"Persian (Afghanistan)";}s:2:"pl";a:1:{s:2:"PL";s:6:"Polish";}s:2:"pt";a:2:{s:2:"BR";s:19:"Portuguese (Brazil)";s:2:"PT";s:21:"Portuguese (Portugal)";}s:2:"pa";a:1:{s:2:"IN";s:7:"Punjabi";}s:3:"rhg";a:1:{s:0:"";s:8:"Rohingya";}s:2:"ro";a:1:{s:2:"RO";s:8:"Romanian";}s:2:"ru";a:2:{s:2:"RU";s:7:"Russian";s:2:"UA";s:17:"Russian (Ukraine)";}s:3:"rue";a:1:{s:0:"";s:5:"Rusyn";}s:3:"sah";a:1:{s:0:"";s:5:"Sakha";}s:2:"sa";a:1:{s:2:"IN";s:8:"Sanskrit";}s:3:"srd";a:1:{s:0:"";s:9:"Sardinian";}s:2:"gd";a:1:{s:0:"";s:15:"Scottish Gaelic";}s:2:"sr";a:1:{s:2:"RS";s:7:"Serbian";}s:2:"sd";a:1:{s:2:"PK";s:6:"Sindhi";}s:2:"si";a:1:{s:2:"LK";s:7:"Sinhala";}s:2:"sk";a:1:{s:2:"SK";s:6:"Slovak";}s:2:"sl";a:1:{s:2:"SI";s:9:"Slovenian";}s:2:"so";a:1:{s:2:"SO";s:6:"Somali";}s:3:"azb";a:1:{s:0:"";s:17:"South Azerbaijani";}s:2:"es";a:8:{s:2:"AR";s:19:"Spanish (Argentina)";s:2:"CL";s:15:"Spanish (Chile)";s:2:"CO";s:18:"Spanish (Colombia)";s:2:"MX";s:16:"Spanish (Mexico)";s:2:"PE";s:14:"Spanish (Peru)";s:2:"PR";s:21:"Spanish (Puerto Rico)";s:2:"ES";s:15:"Spanish (Spain)";s:2:"VE";s:19:"Spanish (Venezuela)";}s:2:"su";a:1:{s:2:"ID";s:9:"Sundanese";}s:2:"sw";a:1:{s:0:"";s:7:"Swahili";}s:2:"sv";a:1:{s:2:"SE";s:7:"Swedish";}s:3:"gsw";a:1:{s:0:"";s:12:"Swiss German";}s:2:"tl";a:1:{s:0:"";s:7:"Tagalog";}s:2:"tg";a:1:{s:0:"";s:5:"Tajik";}s:3:"tzm";a:1:{s:0:"";s:25:"Tamazight (Central Atlas)";}s:2:"ta";a:2:{s:2:"IN";s:5:"Tamil";s:2:"LK";s:17:"Tamil (Sri Lanka)";}s:2:"tt";a:1:{s:2:"RU";s:5:"Tatar";}s:2:"te";a:1:{s:0:"";s:6:"Telugu";}s:2:"th";a:1:{s:0:"";s:4:"Thai";}s:2:"bo";a:1:{s:0:"";s:7:"Tibetan";}s:3:"tir";a:1:{s:0:"";s:8:"Tigrinya";}s:2:"tr";a:1:{s:2:"TR";s:7:"Turkish";}s:3:"tuk";a:1:{s:0:"";s:7:"Turkmen";}s:2:"ug";a:1:{s:2:"CN";s:6:"Uighur";}s:2:"uk";a:1:{s:0:"";s:9:"Ukrainian";}s:2:"ur";a:1:{s:0:"";s:4:"Urdu";}s:2:"uz";a:1:{s:2:"UZ";s:5:"Uzbek";}s:2:"vi";a:1:{s:0:"";s:10:"Vietnamese";}s:2:"wa";a:1:{s:0:"";s:7:"Walloon";}s:2:"cy";a:1:{s:0:"";s:5:"Welsh";}}s:5:"langs";a:190:{s:2:"ab";a:3:{i:0;s:9:"Abkhazian";i:1;s:0:"";i:2;a:0:{}}s:2:"aa";a:3:{i:0;s:4:"Afar";i:1;s:0:"";i:2;a:0:{}}s:2:"af";a:3:{i:0;s:9:"Afrikaans";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ak";a:3:{i:0;s:4:"Akan";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"sq";a:3:{i:0;s:8:"Albanian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:3:"gsw";a:3:{i:0;s:21:"Alemani; Swiss German";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"am";a:3:{i:0;s:7:"Amharic";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ar";a:3:{i:0;s:6:"Arabic";i:1;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:2;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";}}s:2:"an";a:3:{i:0;s:9:"Aragonese";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"hy";a:3:{i:0;s:8:"Armenian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:3:"rup";a:3:{i:0;s:37:"Aromanian; Arumanian; Macedo-Romanian";i:1;s:0:"";i:2;a:0:{}}s:2:"as";a:3:{i:0;s:8:"Assamese";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"av";a:3:{i:0;s:6:"Avaric";i:1;s:0:"";i:2;a:0:{}}s:2:"ae";a:3:{i:0;s:7:"Avestan";i:1;s:0:"";i:2;a:0:{}}s:2:"ay";a:3:{i:0;s:6:"Aymara";i:1;s:0:"";i:2;a:0:{}}s:2:"az";a:3:{i:0;s:11:"Azerbaijani";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:3:"bal";a:3:{i:0;s:7:"Baluchi";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"bm";a:3:{i:0;s:7:"Bambara";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ba";a:3:{i:0;s:7:"Bashkir";i:1;s:0:"";i:2;a:0:{}}s:2:"eu";a:3:{i:0;s:6:"Basque";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"be";a:3:{i:0;s:10:"Belarusian";i:1;s:82:"(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:4:"many";}}s:2:"bn";a:3:{i:0;s:7:"Bengali";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"bh";a:3:{i:0;s:6:"Bihari";i:1;s:28:"( n >= 0 && n <= 1 ) ? 0 : 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"bi";a:3:{i:0;s:7:"Bislama";i:1;s:0:"";i:2;a:0:{}}s:2:"bs";a:3:{i:0;s:7:"Bosnian";i:1;s:82:"(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"br";a:3:{i:0;s:6:"Breton";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"bg";a:3:{i:0;s:9:"Bulgarian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"my";a:3:{i:0;s:7:"Burmese";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ca";a:3:{i:0;s:18:"Catalan; Valencian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ch";a:3:{i:0;s:8:"Chamorro";i:1;s:0:"";i:2;a:0:{}}s:2:"ce";a:3:{i:0;s:7:"Chechen";i:1;s:0:"";i:2;a:0:{}}s:2:"ny";a:3:{i:0;s:23:"Chichewa; Chewa; Nyanja";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"zh";a:3:{i:0;s:7:"Chinese";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"cu";a:3:{i:0;s:64:"Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old";i:1;s:0:"";i:2;a:0:{}}s:2:"cv";a:3:{i:0;s:7:"Chuvash";i:1;s:0:"";i:2;a:0:{}}s:2:"kw";a:3:{i:0;s:7:"Cornish";i:1;s:27:"n == 1 ? 0 : n == 2 ? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:5:"other";}}s:2:"co";a:3:{i:0;s:8:"Corsican";i:1;s:0:"";i:2;a:0:{}}s:2:"cr";a:3:{i:0;s:4:"Cree";i:1;s:0:"";i:2;a:0:{}}s:2:"hr";a:3:{i:0;s:8:"Croatian";i:1;s:80:"n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"cs";a:3:{i:0;s:5:"Czech";i:1;s:45:"( n == 1 ) ? 0 : ( n >= 2 && n <= 4 ) ? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"da";a:3:{i:0;s:6:"Danish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"dv";a:3:{i:0;s:26:"Divehi; Dhivehi; Maldivian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"nl";a:3:{i:0;s:14:"Dutch; Flemish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"dz";a:3:{i:0;s:8:"Dzongkha";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"en";a:3:{i:0;s:7:"English";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"eo";a:3:{i:0;s:9:"Esperanto";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"et";a:3:{i:0;s:8:"Estonian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ee";a:3:{i:0;s:3:"Ewe";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"fo";a:3:{i:0;s:7:"Faroese";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"fj";a:3:{i:0;s:6:"Fijian";i:1;s:0:"";i:2;a:0:{}}s:2:"fi";a:3:{i:0;s:7:"Finnish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"fr";a:3:{i:0;s:6:"French";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ff";a:3:{i:0;s:5:"Fulah";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"gd";a:3:{i:0;s:23:"Gaelic; Scottish Gaelic";i:1;s:26:"n < 2 ? 0 : n == 2 ? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:5:"other";}}s:2:"gl";a:3:{i:0;s:8:"Galician";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"lg";a:3:{i:0;s:5:"Ganda";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ka";a:3:{i:0;s:8:"Georgian";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"de";a:3:{i:0;s:6:"German";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"el";a:3:{i:0;s:5:"Greek";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"gn";a:3:{i:0;s:7:"Guarani";i:1;s:0:"";i:2;a:0:{}}s:2:"gu";a:3:{i:0;s:8:"Gujarati";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ht";a:3:{i:0;s:23:"Haitian; Haitian Creole";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ha";a:3:{i:0;s:5:"Hausa";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:3:"haw";a:3:{i:0;s:8:"Hawaiian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"he";a:3:{i:0;s:6:"Hebrew";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"hz";a:3:{i:0;s:6:"Herero";i:1;s:0:"";i:2;a:0:{}}s:2:"hi";a:3:{i:0;s:5:"Hindi";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ho";a:3:{i:0;s:9:"Hiri Motu";i:1;s:0:"";i:2;a:0:{}}s:2:"hu";a:3:{i:0;s:9:"Hungarian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"is";a:3:{i:0;s:9:"Icelandic";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"io";a:3:{i:0;s:3:"Ido";i:1;s:0:"";i:2;a:0:{}}s:2:"ig";a:3:{i:0;s:4:"Igbo";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"id";a:3:{i:0;s:10:"Indonesian";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ia";a:3:{i:0;s:58:"Interlingua (International Auxiliary Language Association)";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ie";a:3:{i:0;s:11:"Interlingue";i:1;s:0:"";i:2;a:0:{}}s:2:"iu";a:3:{i:0;s:9:"Inuktitut";i:1;s:27:"n == 1 ? 0 : n == 2 ? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:5:"other";}}s:2:"ik";a:3:{i:0;s:7:"Inupiaq";i:1;s:0:"";i:2;a:0:{}}s:2:"ga";a:3:{i:0;s:5:"Irish";i:1;s:44:"n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4";i:2;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";}}s:2:"it";a:3:{i:0;s:7:"Italian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ja";a:3:{i:0;s:8:"Japanese";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"jv";a:3:{i:0;s:8:"Javanese";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"kl";a:3:{i:0;s:24:"Kalaallisut; Greenlandic";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"kn";a:3:{i:0;s:7:"Kannada";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"kr";a:3:{i:0;s:6:"Kanuri";i:1;s:0:"";i:2;a:0:{}}s:2:"ks";a:3:{i:0;s:8:"Kashmiri";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"kk";a:3:{i:0;s:6:"Kazakh";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"km";a:3:{i:0;s:5:"Khmer";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ki";a:3:{i:0;s:14:"Kikuyu; Gikuyu";i:1;s:0:"";i:2;a:0:{}}s:2:"rw";a:3:{i:0;s:11:"Kinyarwanda";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ky";a:3:{i:0;s:7:"Kirghiz";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"kv";a:3:{i:0;s:4:"Komi";i:1;s:0:"";i:2;a:0:{}}s:2:"kg";a:3:{i:0;s:5:"Kongo";i:1;s:0:"";i:2;a:0:{}}s:2:"ko";a:3:{i:0;s:6:"Korean";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"kj";a:3:{i:0;s:18:"Kuanyama; Kwanyama";i:1;s:0:"";i:2;a:0:{}}s:2:"ku";a:3:{i:0;s:7:"Kurdish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"lo";a:3:{i:0;s:3:"Lao";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"la";a:3:{i:0;s:5:"Latin";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"lv";a:3:{i:0;s:7:"Latvian";i:1;s:49:"n % 10 == 1 && n % 100 != 11 ? 0 : n != 0 ? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:5:"other";i:2;s:4:"zero";}}s:2:"li";a:3:{i:0;s:32:"Limburgan; Limburger; Limburgish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ln";a:3:{i:0;s:7:"Lingala";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"lt";a:3:{i:0;s:10:"Lithuanian";i:1;s:71:"(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"lu";a:3:{i:0;s:12:"Luba-Katanga";i:1;s:0:"";i:2;a:0:{}}s:2:"lb";a:3:{i:0;s:28:"Luxembourgish; Letzeburgesch";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"mk";a:3:{i:0;s:10:"Macedonian";i:1;s:40:"( n % 10 == 1 && n % 100 != 11 ) ? 0 : 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"mg";a:3:{i:0;s:8:"Malagasy";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ms";a:3:{i:0;s:5:"Malay";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ml";a:3:{i:0;s:9:"Malayalam";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"mt";a:3:{i:0;s:7:"Maltese";i:1;s:75:"(n==1 ? 0 : n==0||( n%100>1 && n%100<11)? 1 :(n%100>10 && n%100<20)? 2 : 3)";i:2;a:4:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:4:"many";i:3;s:5:"other";}}s:2:"gv";a:3:{i:0;s:4:"Manx";i:1;s:43:"n%10==1 ? 0 : n%10==2 ? 1 : n%20==0 ? 2 : 3";i:2;a:4:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:3:"few";i:3;s:5:"other";}}s:2:"mi";a:3:{i:0;s:5:"Maori";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"mr";a:3:{i:0;s:7:"Marathi";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"mh";a:3:{i:0;s:11:"Marshallese";i:1;s:0:"";i:2;a:0:{}}s:2:"mo";a:3:{i:0;s:9:"Moldavian";i:1;s:50:"n == 1 ? 0 : n % 100 >= 1 && n % 100 <= 19 ? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"mn";a:3:{i:0;s:9:"Mongolian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"na";a:3:{i:0;s:5:"Nauru";i:1;s:0:"";i:2;a:0:{}}s:2:"nv";a:3:{i:0;s:14:"Navajo; Navaho";i:1;s:0:"";i:2;a:0:{}}s:2:"nd";a:3:{i:0;s:29:"Ndebele, North; North Ndebele";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"nr";a:3:{i:0;s:29:"Ndebele, South; South Ndebele";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ng";a:3:{i:0;s:6:"Ndonga";i:1;s:0:"";i:2;a:0:{}}s:2:"ne";a:3:{i:0;s:6:"Nepali";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"se";a:3:{i:0;s:13:"Northern Sami";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"no";a:3:{i:0;s:9:"Norwegian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"nb";a:3:{i:0;s:17:"Norwegian Bokmål";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"nn";a:3:{i:0;s:17:"Norwegian Nynorsk";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"oc";a:3:{i:0;s:31:"Occitan (post 1500); Provençal";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"oj";a:3:{i:0;s:6:"Ojibwa";i:1;s:0:"";i:2;a:0:{}}s:2:"or";a:3:{i:0;s:5:"Oriya";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"om";a:3:{i:0;s:5:"Oromo";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"os";a:3:{i:0;s:17:"Ossetian; Ossetic";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"pi";a:3:{i:0;s:4:"Pali";i:1;s:0:"";i:2;a:0:{}}s:2:"pa";a:3:{i:0;s:16:"Panjabi; Punjabi";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"fa";a:3:{i:0;s:7:"Persian";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"pl";a:3:{i:0;s:6:"Polish";i:1;s:66:"(n==1 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:4:"many";}}s:2:"pt";a:3:{i:0;s:10:"Portuguese";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ps";a:3:{i:0;s:6:"Pushto";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"qu";a:3:{i:0;s:7:"Quechua";i:1;s:0:"";i:2;a:0:{}}s:2:"rm";a:3:{i:0;s:13:"Raeto-Romance";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ro";a:3:{i:0;s:8:"Romanian";i:1;s:56:"(n==1 ? 0 :(((n%100>19)||(( n%100==0)&&(n!=0)))? 2 : 1))";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"rn";a:3:{i:0;s:5:"Rundi";i:1;s:0:"";i:2;a:0:{}}s:2:"ru";a:3:{i:0;s:7:"Russian";i:1;s:82:"(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:4:"many";}}s:2:"sm";a:3:{i:0;s:6:"Samoan";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"sg";a:3:{i:0;s:5:"Sango";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"sa";a:3:{i:0;s:8:"Sanskrit";i:1;s:0:"";i:2;a:0:{}}s:2:"sc";a:3:{i:0;s:9:"Sardinian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"sr";a:3:{i:0;s:7:"Serbian";i:1;s:82:"(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"sn";a:3:{i:0;s:5:"Shona";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ii";a:3:{i:0;s:10:"Sichuan Yi";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"sd";a:3:{i:0;s:6:"Sindhi";i:1;s:0:"";i:2;a:0:{}}s:2:"si";a:3:{i:0;s:18:"Sinhala; Sinhalese";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"sk";a:3:{i:0;s:6:"Slovak";i:1;s:45:"( n == 1 ) ? 0 : ( n >= 2 && n <= 4 ) ? 1 : 2";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:5:"other";}}s:2:"sl";a:3:{i:0;s:9:"Slovenian";i:1;s:56:"n%100==1 ? 0 : n%100==2 ? 1 : n%100==3||n%100==4 ? 2 : 3";i:2;a:4:{i:0;s:3:"one";i:1;s:3:"two";i:2;s:3:"few";i:3;s:5:"other";}}s:2:"so";a:3:{i:0;s:6:"Somali";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"st";a:3:{i:0;s:15:"Sotho, Southern";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"es";a:3:{i:0;s:7:"Spanish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"su";a:3:{i:0;s:9:"Sundanese";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"sw";a:3:{i:0;s:7:"Swahili";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ss";a:3:{i:0;s:5:"Swati";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"sv";a:3:{i:0;s:7:"Swedish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"tl";a:3:{i:0;s:7:"Tagalog";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ty";a:3:{i:0;s:8:"Tahitian";i:1;s:0:"";i:2;a:0:{}}s:2:"tg";a:3:{i:0;s:5:"Tajik";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ta";a:3:{i:0;s:5:"Tamil";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"tt";a:3:{i:0;s:5:"Tatar";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"te";a:3:{i:0;s:6:"Telugu";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"th";a:3:{i:0;s:4:"Thai";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"bo";a:3:{i:0;s:7:"Tibetan";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ti";a:3:{i:0;s:8:"Tigrinya";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"to";a:3:{i:0;s:21:"Tonga (Tonga Islands)";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"ts";a:3:{i:0;s:6:"Tsonga";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"tn";a:3:{i:0;s:6:"Tswana";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"tr";a:3:{i:0;s:7:"Turkish";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"tk";a:3:{i:0;s:7:"Turkmen";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"tw";a:3:{i:0;s:3:"Twi";i:1;s:0:"";i:2;a:0:{}}s:2:"ug";a:3:{i:0;s:14:"Uighur; Uyghur";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"uk";a:3:{i:0;s:9:"Ukrainian";i:1;s:82:"(n%10==1 && n%100!=11 ? 0 : n%10 >= 2 && n%10<=4 &&(n%100<10||n%100 >= 20)? 1 : 2)";i:2;a:3:{i:0;s:3:"one";i:1;s:3:"few";i:2;s:4:"many";}}s:2:"ur";a:3:{i:0;s:4:"Urdu";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"uz";a:3:{i:0;s:5:"Uzbek";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"ve";a:3:{i:0;s:5:"Venda";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"vi";a:3:{i:0;s:10:"Vietnamese";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"vo";a:3:{i:0;s:8:"Volapük";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"wa";a:3:{i:0;s:7:"Walloon";i:1;s:5:"n > 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"cy";a:3:{i:0;s:5:"Welsh";i:1;s:56:"n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n==3 ? 3 : n==6 ? 4 : 5";i:2;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";}}s:2:"fy";a:3:{i:0;s:15:"Western Frisian";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"wo";a:3:{i:0;s:5:"Wolof";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"xh";a:3:{i:0;s:5:"Xhosa";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:3:"sah";a:3:{i:0;s:5:"Yakut";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"yi";a:3:{i:0;s:7:"Yiddish";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}s:2:"yo";a:3:{i:0;s:6:"Yoruba";i:1;s:1:"0";i:2;a:1:{i:0;s:5:"other";}}s:2:"za";a:3:{i:0;s:14:"Zhuang; Chuang";i:1;s:0:"";i:2;a:0:{}}s:2:"zu";a:3:{i:0;s:4:"Zulu";i:1;s:6:"n != 1";i:2;a:2:{i:0;s:3:"one";i:1;s:5:"other";}}}s:7:"regions";a:249:{s:2:"AF";s:11:"Afghanistan";s:2:"AX";s:14:"Åland Islands";s:2:"AL";s:7:"Albania";s:2:"DZ";s:7:"Algeria";s:2:"AS";s:14:"American Samoa";s:2:"AD";s:7:"Andorra";s:2:"AO";s:6:"Angola";s:2:"AI";s:8:"Anguilla";s:2:"AQ";s:10:"Antarctica";s:2:"AG";s:19:"Antigua and Barbuda";s:2:"AR";s:9:"Argentina";s:2:"AM";s:7:"Armenia";s:2:"AW";s:5:"Aruba";s:2:"AU";s:9:"Australia";s:2:"AT";s:7:"Austria";s:2:"AZ";s:10:"Azerbaijan";s:2:"BS";s:7:"Bahamas";s:2:"BH";s:7:"Bahrain";s:2:"BD";s:10:"Bangladesh";s:2:"BB";s:8:"Barbados";s:2:"BY";s:7:"Belarus";s:2:"BE";s:7:"Belgium";s:2:"BZ";s:6:"Belize";s:2:"BJ";s:5:"Benin";s:2:"BM";s:7:"Bermuda";s:2:"BT";s:6:"Bhutan";s:2:"BO";s:31:"Bolivia, Plurinational State of";s:2:"BQ";s:32:"Bonaire, Sint Eustatius and Saba";s:2:"BA";s:22:"Bosnia and Herzegovina";s:2:"BW";s:8:"Botswana";s:2:"BV";s:13:"Bouvet Island";s:2:"BR";s:6:"Brazil";s:2:"IO";s:30:"British Indian Ocean Territory";s:2:"BN";s:17:"Brunei Darussalam";s:2:"BG";s:8:"Bulgaria";s:2:"BF";s:12:"Burkina Faso";s:2:"BI";s:7:"Burundi";s:2:"KH";s:8:"Cambodia";s:2:"CM";s:8:"Cameroon";s:2:"CA";s:6:"Canada";s:2:"CV";s:10:"Cape Verde";s:2:"KY";s:14:"Cayman Islands";s:2:"CF";s:24:"Central African Republic";s:2:"TD";s:4:"Chad";s:2:"CL";s:5:"Chile";s:2:"CN";s:5:"China";s:2:"CX";s:16:"Christmas Island";s:2:"CC";s:23:"Cocos (Keeling) Islands";s:2:"CO";s:8:"Colombia";s:2:"KM";s:7:"Comoros";s:2:"CG";s:5:"Congo";s:2:"CD";s:37:"Congo, The Democratic Republic of The";s:2:"CK";s:12:"Cook Islands";s:2:"CR";s:10:"Costa Rica";s:2:"CI";s:14:"Côte D\'Ivoire";s:2:"HR";s:7:"Croatia";s:2:"CU";s:4:"Cuba";s:2:"CW";s:8:"Curaçao";s:2:"CY";s:6:"Cyprus";s:2:"CZ";s:14:"Czech Republic";s:2:"DK";s:7:"Denmark";s:2:"DJ";s:8:"Djibouti";s:2:"DM";s:8:"Dominica";s:2:"DO";s:18:"Dominican Republic";s:2:"EC";s:7:"Ecuador";s:2:"EG";s:5:"Egypt";s:2:"SV";s:11:"El Salvador";s:2:"GQ";s:17:"Equatorial Guinea";s:2:"ER";s:7:"Eritrea";s:2:"EE";s:7:"Estonia";s:2:"ET";s:8:"Ethiopia";s:2:"FK";s:27:"Falkland Islands (Malvinas)";s:2:"FO";s:13:"Faroe Islands";s:2:"FJ";s:4:"Fiji";s:2:"FI";s:7:"Finland";s:2:"FR";s:6:"France";s:2:"GF";s:13:"French Guiana";s:2:"PF";s:16:"French Polynesia";s:2:"TF";s:27:"French Southern Territories";s:2:"GA";s:5:"Gabon";s:2:"GM";s:6:"Gambia";s:2:"GE";s:7:"Georgia";s:2:"DE";s:7:"Germany";s:2:"GH";s:5:"Ghana";s:2:"GI";s:9:"Gibraltar";s:2:"GR";s:6:"Greece";s:2:"GL";s:9:"Greenland";s:2:"GD";s:7:"Grenada";s:2:"GP";s:10:"Guadeloupe";s:2:"GU";s:4:"Guam";s:2:"GT";s:9:"Guatemala";s:2:"GG";s:8:"Guernsey";s:2:"GN";s:6:"Guinea";s:2:"GW";s:13:"Guinea-Bissau";s:2:"GY";s:6:"Guyana";s:2:"HT";s:5:"Haiti";s:2:"HM";s:33:"Heard Island and Mcdonald Islands";s:2:"VA";s:29:"Holy See (Vatican City State)";s:2:"HN";s:8:"Honduras";s:2:"HK";s:9:"Hong Kong";s:2:"HU";s:7:"Hungary";s:2:"IS";s:7:"Iceland";s:2:"IN";s:5:"India";s:2:"ID";s:9:"Indonesia";s:2:"IR";s:25:"Iran, Islamic Republic of";s:2:"IQ";s:4:"Iraq";s:2:"IE";s:7:"Ireland";s:2:"IM";s:11:"Isle of Man";s:2:"IL";s:6:"Israel";s:2:"IT";s:5:"Italy";s:2:"JM";s:7:"Jamaica";s:2:"JP";s:5:"Japan";s:2:"JE";s:6:"Jersey";s:2:"JO";s:6:"Jordan";s:2:"KZ";s:10:"Kazakhstan";s:2:"KE";s:5:"Kenya";s:2:"KI";s:8:"Kiribati";s:2:"KP";s:38:"Korea, Democratic People\'s Republic of";s:2:"KR";s:18:"Korea, Republic of";s:2:"KW";s:6:"Kuwait";s:2:"KG";s:10:"Kyrgyzstan";s:2:"LA";s:32:"Lao People\'s Democratic Republic";s:2:"LV";s:6:"Latvia";s:2:"LB";s:7:"Lebanon";s:2:"LS";s:7:"Lesotho";s:2:"LR";s:7:"Liberia";s:2:"LY";s:5:"Libya";s:2:"LI";s:13:"Liechtenstein";s:2:"LT";s:9:"Lithuania";s:2:"LU";s:10:"Luxembourg";s:2:"MO";s:5:"Macao";s:2:"MK";s:42:"Macedonia, The Former Yugoslav Republic of";s:2:"MG";s:10:"Madagascar";s:2:"MW";s:6:"Malawi";s:2:"MY";s:8:"Malaysia";s:2:"MV";s:8:"Maldives";s:2:"ML";s:4:"Mali";s:2:"MT";s:5:"Malta";s:2:"MH";s:16:"Marshall Islands";s:2:"MQ";s:10:"Martinique";s:2:"MR";s:10:"Mauritania";s:2:"MU";s:9:"Mauritius";s:2:"YT";s:7:"Mayotte";s:2:"MX";s:6:"Mexico";s:2:"FM";s:31:"Micronesia, Federated States of";s:2:"MD";s:20:"Moldova, Republic of";s:2:"MC";s:6:"Monaco";s:2:"MN";s:8:"Mongolia";s:2:"ME";s:10:"Montenegro";s:2:"MS";s:10:"Montserrat";s:2:"MA";s:7:"Morocco";s:2:"MZ";s:10:"Mozambique";s:2:"MM";s:7:"Myanmar";s:2:"NA";s:7:"Namibia";s:2:"NR";s:5:"Nauru";s:2:"NP";s:5:"Nepal";s:2:"NL";s:11:"Netherlands";s:2:"NC";s:13:"New Caledonia";s:2:"NZ";s:11:"New Zealand";s:2:"NI";s:9:"Nicaragua";s:2:"NE";s:5:"Niger";s:2:"NG";s:7:"Nigeria";s:2:"NU";s:4:"Niue";s:2:"NF";s:14:"Norfolk Island";s:2:"MP";s:24:"Northern Mariana Islands";s:2:"NO";s:6:"Norway";s:2:"OM";s:4:"Oman";s:2:"PK";s:8:"Pakistan";s:2:"PW";s:5:"Palau";s:2:"PS";s:31:"Palestinian Territory, Occupied";s:2:"PA";s:6:"Panama";s:2:"PG";s:16:"Papua New Guinea";s:2:"PY";s:8:"Paraguay";s:2:"PE";s:4:"Peru";s:2:"PH";s:11:"Philippines";s:2:"PN";s:8:"Pitcairn";s:2:"PL";s:6:"Poland";s:2:"PT";s:8:"Portugal";s:2:"PR";s:11:"Puerto Rico";s:2:"QA";s:5:"Qatar";s:2:"RE";s:8:"Réunion";s:2:"RO";s:7:"Romania";s:2:"RU";s:18:"Russian Federation";s:2:"RW";s:6:"Rwanda";s:2:"BL";s:17:"Saint Barthélemy";s:2:"SH";s:44:"Saint Helena, Ascension and Tristan Da Cunha";s:2:"KN";s:21:"Saint Kitts and Nevis";s:2:"LC";s:11:"Saint Lucia";s:2:"MF";s:26:"Saint Martin (French Part)";s:2:"PM";s:25:"Saint Pierre and Miquelon";s:2:"VC";s:32:"Saint Vincent and The Grenadines";s:2:"WS";s:5:"Samoa";s:2:"SM";s:10:"San Marino";s:2:"ST";s:21:"Sao Tome and Principe";s:2:"SA";s:12:"Saudi Arabia";s:2:"SN";s:7:"Senegal";s:2:"RS";s:6:"Serbia";s:2:"SC";s:10:"Seychelles";s:2:"SL";s:12:"Sierra Leone";s:2:"SG";s:9:"Singapore";s:2:"SX";s:25:"Sint Maarten (Dutch Part)";s:2:"SK";s:8:"Slovakia";s:2:"SI";s:8:"Slovenia";s:2:"SB";s:15:"Solomon Islands";s:2:"SO";s:7:"Somalia";s:2:"ZA";s:12:"South Africa";s:2:"GS";s:44:"South Georgia and The South Sandwich Islands";s:2:"SS";s:11:"South Sudan";s:2:"ES";s:5:"Spain";s:2:"LK";s:9:"Sri Lanka";s:2:"SD";s:5:"Sudan";s:2:"SR";s:8:"Suriname";s:2:"SJ";s:22:"Svalbard and Jan Mayen";s:2:"SZ";s:9:"Swaziland";s:2:"SE";s:6:"Sweden";s:2:"CH";s:11:"Switzerland";s:2:"SY";s:20:"Syrian Arab Republic";s:2:"TW";s:25:"Taiwan, Province of China";s:2:"TJ";s:10:"Tajikistan";s:2:"TZ";s:28:"Tanzania, United Republic of";s:2:"TH";s:8:"Thailand";s:2:"TL";s:11:"Timor-Leste";s:2:"TG";s:4:"Togo";s:2:"TK";s:7:"Tokelau";s:2:"TO";s:5:"Tonga";s:2:"TT";s:19:"Trinidad and Tobago";s:2:"TN";s:7:"Tunisia";s:2:"TR";s:6:"Turkey";s:2:"TM";s:12:"Turkmenistan";s:2:"TC";s:24:"Turks and Caicos Islands";s:2:"TV";s:6:"Tuvalu";s:2:"UG";s:6:"Uganda";s:2:"UA";s:7:"Ukraine";s:2:"AE";s:20:"United Arab Emirates";s:2:"GB";s:14:"United Kingdom";s:2:"US";s:13:"United States";s:2:"UM";s:36:"United States Minor Outlying Islands";s:2:"UY";s:7:"Uruguay";s:2:"UZ";s:10:"Uzbekistan";s:2:"VU";s:7:"Vanuatu";s:2:"VE";s:33:"Venezuela, Bolivarian Republic of";s:2:"VN";s:8:"Viet Nam";s:2:"VG";s:23:"Virgin Islands, British";s:2:"VI";s:20:"Virgin Islands, U.S.";s:2:"WF";s:17:"Wallis and Futuna";s:2:"EH";s:14:"Western Sahara";s:2:"YE";s:5:"Yemen";s:2:"ZM";s:6:"Zambia";s:2:"ZW";s:8:"Zimbabwe";}}');
|
lib/build/shell-compiled.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Compiled source built from Loco core. Do not edit!
|
4 |
-
*
|
5 |
*/
|
6 |
function loco_compile_mo( $po ){ $descriptorspec = array( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'a'), ); $cmd = WHICH_MSGFMT.' -o - -'; $process = proc_open($cmd, $descriptorspec, $pipes ); if( ! $process ){ throw new Exception('Failed to open process to '.$cmd); } fwrite($pipes[0], $po); fclose($pipes[0]); $err = stream_get_contents($pipes[2]); fclose($pipes[2]); $mo = stream_get_contents($pipes[1]); fclose($pipes[1]); $e = proc_close($process); if( 0 !== $e ){ $err and trigger_error( $err, E_USER_WARNING ); throw new Exception( WHICH_MSGFMT.' exited with code '.sprintf('%d',$e).'; Got '.strlen($mo).' bytes from '.strlen($po).' bytes'); } if( ! $mo ){ throw new Exception('Empty file from '.WHICH_MSGFMT); } return $mo; } function loco_compile_mo_file( $pofile, $mofile = '' ){ $descriptorspec = array ( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'a'), ); if( ! $mofile ){ $mofile = $pofile.'.mo'; } $cmd = WHICH_MSGFMT.' -o '.escapeshellarg($mofile).' '.escapeshellarg($pofile); $process = proc_open($cmd, $descriptorspec, $pipes ); if( ! $process ){ throw new Exception('Failed to open process to '.$cmd); } $err = stream_get_contents($pipes[0]); fclose($pipes[0]); $e = proc_close($process); if( 0 !== $e ){ $err and trigger_error( $err, E_USER_WARNING ); throw new Exception('Gettext msgfmt exited with code '.sprintf('%d',$e).';'); } if( ! file_exists($mofile) ){ throw new Exception('Gettext msgfmt failed to create '.$mofile); } return $mofile; } function loco_find_executable( $name ){ $paths = array ( '/usr/local/', '/usr/', '/', '~/' ); $descriptorspec = array ( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w'), ); foreach( array('bin/','sbin/') as $dir ){ foreach( $paths as $path ){ $bin = $path.$dir.$name; $cmd = '[ -x '.escapeshellarg($bin).' ]'; $process = proc_open( $cmd, $descriptorspec, $pipes ); if( ! $process ){ return ''; } $e = proc_close($process); if( 0 === $e ){ return $bin; } } } return ''; }
|
1 |
<?php
|
2 |
/**
|
3 |
* Compiled source built from Loco core. Do not edit!
|
4 |
+
* Fri, 30 Jan 2015 14:50:12 +0000
|
5 |
*/
|
6 |
function loco_compile_mo( $po ){ $descriptorspec = array( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'a'), ); $cmd = WHICH_MSGFMT.' -o - -'; $process = proc_open($cmd, $descriptorspec, $pipes ); if( ! $process ){ throw new Exception('Failed to open process to '.$cmd); } fwrite($pipes[0], $po); fclose($pipes[0]); $err = stream_get_contents($pipes[2]); fclose($pipes[2]); $mo = stream_get_contents($pipes[1]); fclose($pipes[1]); $e = proc_close($process); if( 0 !== $e ){ $err and trigger_error( $err, E_USER_WARNING ); throw new Exception( WHICH_MSGFMT.' exited with code '.sprintf('%d',$e).'; Got '.strlen($mo).' bytes from '.strlen($po).' bytes'); } if( ! $mo ){ throw new Exception('Empty file from '.WHICH_MSGFMT); } return $mo; } function loco_compile_mo_file( $pofile, $mofile = '' ){ $descriptorspec = array ( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'a'), ); if( ! $mofile ){ $mofile = $pofile.'.mo'; } $cmd = WHICH_MSGFMT.' -o '.escapeshellarg($mofile).' '.escapeshellarg($pofile); $process = proc_open($cmd, $descriptorspec, $pipes ); if( ! $process ){ throw new Exception('Failed to open process to '.$cmd); } $err = stream_get_contents($pipes[0]); fclose($pipes[0]); $e = proc_close($process); if( 0 !== $e ){ $err and trigger_error( $err, E_USER_WARNING ); throw new Exception('Gettext msgfmt exited with code '.sprintf('%d',$e).';'); } if( ! file_exists($mofile) ){ throw new Exception('Gettext msgfmt failed to create '.$mofile); } return $mofile; } function loco_find_executable( $name ){ $paths = array ( '/usr/local/', '/usr/', '/', '~/' ); $descriptorspec = array ( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w'), ); foreach( array('bin/','sbin/') as $dir ){ foreach( $paths as $path ){ $bin = $path.$dir.$name; $cmd = '[ -x '.escapeshellarg($bin).' ]'; $process = proc_open( $cmd, $descriptorspec, $pipes ); if( ! $process ){ return ''; } $e = proc_close($process); if( 0 === $e ){ return $bin; } } } return ''; }
|
lib/loco-admin.php
CHANGED
@@ -64,14 +64,21 @@ abstract class LocoAdmin {
|
|
64 |
trigger_error('wp_die failure', E_USER_ERROR );
|
65 |
exit();
|
66 |
}
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
|
70 |
/**
|
71 |
* Admin settings page render call
|
72 |
*/
|
73 |
public static function render_page_options(){
|
74 |
-
|
75 |
// update applicaion settings if posted
|
76 |
if( isset($_POST['loco']) && is_array( $update = $_POST['loco'] ) ){
|
77 |
$update += array( 'gen_hash' => '0', 'enable_core' => '0' );
|
@@ -96,7 +103,7 @@ abstract class LocoAdmin {
|
|
96 |
* Admin diagnostics page render call
|
97 |
*/
|
98 |
public static function render_page_diagnostics(){
|
99 |
-
|
100 |
loco_require('loco-locales','loco-packages');
|
101 |
// global data
|
102 |
global $wp_version;
|
@@ -129,7 +136,7 @@ abstract class LocoAdmin {
|
|
129 |
* Admin tools page render call
|
130 |
*/
|
131 |
public static function render_page_tools(){
|
132 |
-
|
133 |
do {
|
134 |
try {
|
135 |
|
@@ -196,6 +203,11 @@ abstract class LocoAdmin {
|
|
196 |
//
|
197 |
if( isset($_GET['poedit']) && $po_path = self::resolve_path( $_GET['poedit'] ) ){
|
198 |
$export = self::parse_po_with_headers( $po_path, $head );
|
|
|
|
|
|
|
|
|
|
|
199 |
self::render_poeditor( $package, $po_path, $export, $head );
|
200 |
break;
|
201 |
}
|
@@ -351,8 +363,6 @@ abstract class LocoAdmin {
|
|
351 |
$data[0] = array();
|
352 |
$minlength = 2;
|
353 |
}
|
354 |
-
// template file is developer-editable and has no locale
|
355 |
-
$ispot = self::is_pot($path);
|
356 |
|
357 |
// path may not exist if we're creating a new one
|
358 |
if( file_exists($path) ){
|
@@ -362,15 +372,7 @@ abstract class LocoAdmin {
|
|
362 |
$modified = 0;
|
363 |
}
|
364 |
|
365 |
-
|
366 |
-
if( ! $ispot && $head && $modified && ! $head->Language && self::none_translated($data) ){
|
367 |
-
$path .= 't';
|
368 |
-
$warnings[] = sprintf( Loco::__('PO file used as template. This will be renamed to %s on first save'), basename($path) );
|
369 |
-
$ispot = true;
|
370 |
-
$modified = 0;
|
371 |
-
}
|
372 |
-
|
373 |
-
if( $ispot ){
|
374 |
$pot = $data;
|
375 |
$type = 'POT';
|
376 |
}
|
@@ -383,7 +385,6 @@ abstract class LocoAdmin {
|
|
383 |
$haspot = $package->get_pot( $domain );
|
384 |
}
|
385 |
|
386 |
-
|
387 |
// warn if new file can't be written
|
388 |
$writable = self::is_writable( $path );
|
389 |
if( ! $writable && ! $modified ){
|
@@ -395,7 +396,7 @@ abstract class LocoAdmin {
|
|
395 |
// Warnings if file is empty
|
396 |
if( count($data) < $minlength ){
|
397 |
$lines = array();
|
398 |
-
if( $
|
399 |
if( $modified ){
|
400 |
// existing POT, may need sync
|
401 |
$lines[] = sprintf( Loco::__('%s file is empty'), 'POT' );
|
@@ -426,7 +427,7 @@ abstract class LocoAdmin {
|
|
426 |
|
427 |
// warning if file needs syncing
|
428 |
else if( $modified ){
|
429 |
-
if( $
|
430 |
$sources = $package->get_source_files();
|
431 |
if( $sources && filemtime($path) < self::newest_mtime_recursive($sources) ){
|
432 |
$warnings[] = Loco::__('Source code has been modified, run Sync to update POT');
|
@@ -449,7 +450,7 @@ abstract class LocoAdmin {
|
|
449 |
}
|
450 |
|
451 |
// set Last-Translator if PO file
|
452 |
-
if( ! $
|
453 |
/* @var WP_User $user */
|
454 |
$user = wp_get_current_user() and
|
455 |
$head->add( 'Last-Translator', $user->get('display_name').' <'.$user->get('user_email').'>' );
|
@@ -482,7 +483,7 @@ abstract class LocoAdmin {
|
|
482 |
$path = self::trim_path( $path );
|
483 |
|
484 |
// If parsing MO file, from now on treat as PO
|
485 |
-
if( ! $
|
486 |
$path = str_replace( '.mo', '.po', $path );
|
487 |
}
|
488 |
|
@@ -494,7 +495,7 @@ abstract class LocoAdmin {
|
|
494 |
|
495 |
|
496 |
/**
|
497 |
-
*
|
498 |
*/
|
499 |
public static function is_pot( $path ){
|
500 |
return 'pot' === strtolower( pathinfo($path,PATHINFO_EXTENSION) );
|
@@ -503,7 +504,7 @@ abstract class LocoAdmin {
|
|
503 |
|
504 |
|
505 |
/**
|
506 |
-
*
|
507 |
*/
|
508 |
public static function is_mo( $path ){
|
509 |
return 'mo' === strtolower( pathinfo($path,PATHINFO_EXTENSION) );
|
@@ -511,6 +512,15 @@ abstract class LocoAdmin {
|
|
511 |
|
512 |
|
513 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
514 |
/**
|
515 |
* resolve file path that may be relative to wp-content
|
516 |
*/
|
@@ -696,10 +706,14 @@ abstract class LocoAdmin {
|
|
696 |
}
|
697 |
}
|
698 |
}
|
699 |
-
// else use
|
700 |
else if( $po = $package->get_po() ){
|
701 |
foreach( $po as $code => $path ){
|
702 |
$export = self::parse_po( $path );
|
|
|
|
|
|
|
|
|
703 |
break;
|
704 |
}
|
705 |
}
|
@@ -852,14 +866,25 @@ abstract class LocoAdmin {
|
|
852 |
}
|
853 |
|
854 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
855 |
|
856 |
/**
|
857 |
* Generate a link to edit a po/pot file
|
858 |
*/
|
859 |
public static function edit_link( LocoPackage $package, $path, $label = '', $icon = '' ){
|
860 |
-
$url = self::
|
861 |
-
'poedit' => self::trim_path( $path ),
|
862 |
-
) );
|
863 |
if( ! $label ){
|
864 |
$label = basename( $path );
|
865 |
}
|
@@ -1023,7 +1048,7 @@ function _loco_hook__current_screen(){
|
|
1023 |
* Admin menu registration callback
|
1024 |
*/
|
1025 |
function _loco_hook__admin_menu() {
|
1026 |
-
$cap = Loco::
|
1027 |
if( current_user_can($cap) ){
|
1028 |
// hook in legacy wordpress styles as menu will display
|
1029 |
$wp_38 = version_compare( $GLOBALS['wp_version'], '3.8', '>=' ) or
|
64 |
trigger_error('wp_die failure', E_USER_ERROR );
|
65 |
exit();
|
66 |
}
|
67 |
+
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Check current user has permission to access Loco admin screens, or exit forbidden
|
71 |
+
*/
|
72 |
+
private static function check_capability(){
|
73 |
+
current_user_can( Loco::admin_capablity() ) or self::forbid();
|
74 |
+
}
|
75 |
|
76 |
|
77 |
/**
|
78 |
* Admin settings page render call
|
79 |
*/
|
80 |
public static function render_page_options(){
|
81 |
+
self::check_capability();
|
82 |
// update applicaion settings if posted
|
83 |
if( isset($_POST['loco']) && is_array( $update = $_POST['loco'] ) ){
|
84 |
$update += array( 'gen_hash' => '0', 'enable_core' => '0' );
|
103 |
* Admin diagnostics page render call
|
104 |
*/
|
105 |
public static function render_page_diagnostics(){
|
106 |
+
self::check_capability();
|
107 |
loco_require('loco-locales','loco-packages');
|
108 |
// global data
|
109 |
global $wp_version;
|
136 |
* Admin tools page render call
|
137 |
*/
|
138 |
public static function render_page_tools(){
|
139 |
+
self::check_capability();
|
140 |
do {
|
141 |
try {
|
142 |
|
203 |
//
|
204 |
if( isset($_GET['poedit']) && $po_path = self::resolve_path( $_GET['poedit'] ) ){
|
205 |
$export = self::parse_po_with_headers( $po_path, $head );
|
206 |
+
// support incorrect usage of PO files as templates
|
207 |
+
if( isset($_GET['pot']) && ! self::is_pot($po_path) ){
|
208 |
+
$po_path = dirname($po_path).'/'.$_GET['pot'].'.pot';
|
209 |
+
self::warning( sprintf( Loco::__('PO file used as template. This will be renamed to %s on first save'), basename($po_path) ) );
|
210 |
+
}
|
211 |
self::render_poeditor( $package, $po_path, $export, $head );
|
212 |
break;
|
213 |
}
|
363 |
$data[0] = array();
|
364 |
$minlength = 2;
|
365 |
}
|
|
|
|
|
366 |
|
367 |
// path may not exist if we're creating a new one
|
368 |
if( file_exists($path) ){
|
372 |
$modified = 0;
|
373 |
}
|
374 |
|
375 |
+
if( $is_pot = self::is_pot($path) ){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
$pot = $data;
|
377 |
$type = 'POT';
|
378 |
}
|
385 |
$haspot = $package->get_pot( $domain );
|
386 |
}
|
387 |
|
|
|
388 |
// warn if new file can't be written
|
389 |
$writable = self::is_writable( $path );
|
390 |
if( ! $writable && ! $modified ){
|
396 |
// Warnings if file is empty
|
397 |
if( count($data) < $minlength ){
|
398 |
$lines = array();
|
399 |
+
if( $is_pot ){
|
400 |
if( $modified ){
|
401 |
// existing POT, may need sync
|
402 |
$lines[] = sprintf( Loco::__('%s file is empty'), 'POT' );
|
427 |
|
428 |
// warning if file needs syncing
|
429 |
else if( $modified ){
|
430 |
+
if( $is_pot ){
|
431 |
$sources = $package->get_source_files();
|
432 |
if( $sources && filemtime($path) < self::newest_mtime_recursive($sources) ){
|
433 |
$warnings[] = Loco::__('Source code has been modified, run Sync to update POT');
|
450 |
}
|
451 |
|
452 |
// set Last-Translator if PO file
|
453 |
+
if( ! $is_pot ){
|
454 |
/* @var WP_User $user */
|
455 |
$user = wp_get_current_user() and
|
456 |
$head->add( 'Last-Translator', $user->get('display_name').' <'.$user->get('user_email').'>' );
|
483 |
$path = self::trim_path( $path );
|
484 |
|
485 |
// If parsing MO file, from now on treat as PO
|
486 |
+
if( ! $is_pot && self::is_mo($path) ){
|
487 |
$path = str_replace( '.mo', '.po', $path );
|
488 |
}
|
489 |
|
495 |
|
496 |
|
497 |
/**
|
498 |
+
* Test if a file path is a POT (template) file
|
499 |
*/
|
500 |
public static function is_pot( $path ){
|
501 |
return 'pot' === strtolower( pathinfo($path,PATHINFO_EXTENSION) );
|
504 |
|
505 |
|
506 |
/**
|
507 |
+
* Test if a file path is a MO (compiled) file
|
508 |
*/
|
509 |
public static function is_mo( $path ){
|
510 |
return 'mo' === strtolower( pathinfo($path,PATHINFO_EXTENSION) );
|
512 |
|
513 |
|
514 |
|
515 |
+
/**
|
516 |
+
* Test if a file path is a PO file
|
517 |
+
*/
|
518 |
+
public static function is_po( $path ){
|
519 |
+
return 'po' === strtolower( pathinfo($path,PATHINFO_EXTENSION) );
|
520 |
+
}
|
521 |
+
|
522 |
+
|
523 |
+
|
524 |
/**
|
525 |
* resolve file path that may be relative to wp-content
|
526 |
*/
|
706 |
}
|
707 |
}
|
708 |
}
|
709 |
+
// else use first existing PO file in place of POT
|
710 |
else if( $po = $package->get_po() ){
|
711 |
foreach( $po as $code => $path ){
|
712 |
$export = self::parse_po( $path );
|
713 |
+
// strip translations, as this is intended as a POT
|
714 |
+
foreach( $export as $i => $message ){
|
715 |
+
$export[$i]['target'] = '';
|
716 |
+
}
|
717 |
break;
|
718 |
}
|
719 |
}
|
866 |
}
|
867 |
|
868 |
|
869 |
+
/**
|
870 |
+
* Generate a URL to edit a po/pot file
|
871 |
+
*/
|
872 |
+
public static function edit_uri( LocoPackage $package, $path ){
|
873 |
+
$args = $package->get_query() + array (
|
874 |
+
'poedit' => self::trim_path( $path ),
|
875 |
+
);
|
876 |
+
if( $domain = $package->is_pot($path) ){
|
877 |
+
$args['pot'] = $domain;
|
878 |
+
}
|
879 |
+
return self::uri( $args );
|
880 |
+
}
|
881 |
+
|
882 |
|
883 |
/**
|
884 |
* Generate a link to edit a po/pot file
|
885 |
*/
|
886 |
public static function edit_link( LocoPackage $package, $path, $label = '', $icon = '' ){
|
887 |
+
$url = self::edit_uri( $package, $path );
|
|
|
|
|
888 |
if( ! $label ){
|
889 |
$label = basename( $path );
|
890 |
}
|
1048 |
* Admin menu registration callback
|
1049 |
*/
|
1050 |
function _loco_hook__admin_menu() {
|
1051 |
+
$cap = Loco::admin_capablity();
|
1052 |
if( current_user_can($cap) ){
|
1053 |
// hook in legacy wordpress styles as menu will display
|
1054 |
$wp_38 = version_compare( $GLOBALS['wp_version'], '3.8', '>=' ) or
|
lib/loco-boot.php
CHANGED
@@ -7,9 +7,9 @@ abstract class Loco {
|
|
7 |
|
8 |
/** plugin namespace */
|
9 |
const NS = 'loco-translate';
|
10 |
-
|
11 |
-
|
12 |
-
const
|
13 |
|
14 |
/* current plugin locale */
|
15 |
private static $locale;
|
@@ -316,6 +316,15 @@ abstract class Loco {
|
|
316 |
}
|
317 |
return $conf;
|
318 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
}
|
320 |
|
321 |
|
7 |
|
8 |
/** plugin namespace */
|
9 |
const NS = 'loco-translate';
|
10 |
+
|
11 |
+
/** plugin version */
|
12 |
+
const VERSION = '1.5.1';
|
13 |
|
14 |
/* current plugin locale */
|
15 |
private static $locale;
|
316 |
}
|
317 |
return $conf;
|
318 |
}
|
319 |
+
|
320 |
+
|
321 |
+
/**
|
322 |
+
* Get Wordpress capability for all Loco Admin functionality
|
323 |
+
*/
|
324 |
+
public static function admin_capablity(){
|
325 |
+
return apply_filters( 'loco_admin_capability', 'manage_options' );
|
326 |
+
}
|
327 |
+
|
328 |
}
|
329 |
|
330 |
|
lib/loco-packages.php
CHANGED
@@ -375,8 +375,13 @@ abstract class LocoPackage {
|
|
375 |
$dir = $this->lang_dir( $domain, true );
|
376 |
}
|
377 |
$name = $locale->get_code().'.po';
|
|
|
|
|
|
|
|
|
|
|
378 |
// only prefix with text domain for plugins and files in global lang directory
|
379 |
-
if( 'plugin' === $
|
380 |
$prefix = $domain.'-';
|
381 |
}
|
382 |
else {
|
@@ -500,10 +505,7 @@ abstract class LocoPackage {
|
|
500 |
public function get_author_warnings(){
|
501 |
$warn = array();
|
502 |
$type = $this->get_type();
|
503 |
-
if( 'core'
|
504 |
-
// no tests for core packages
|
505 |
-
}
|
506 |
-
else {
|
507 |
$camelType = strtoupper($type{0}).substr($type,1);
|
508 |
// check package declares Text Domain
|
509 |
$domain = $this->get_original('TextDomain');
|
@@ -526,6 +528,14 @@ abstract class LocoPackage {
|
|
526 |
}
|
527 |
// TODO check references to other domains in xgettext
|
528 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
529 |
return $warn;
|
530 |
}
|
531 |
|
@@ -553,9 +563,19 @@ abstract class LocoPackage {
|
|
553 |
}
|
554 |
// no template candidate
|
555 |
return '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
556 |
}
|
557 |
|
558 |
|
|
|
559 |
/**
|
560 |
* Fetch PO paths indexed by locale for given, or default domain
|
561 |
* @return array
|
@@ -567,6 +587,7 @@ abstract class LocoPackage {
|
|
567 |
return isset($this->po[$domain]) ? $this->po[$domain] : array();
|
568 |
}
|
569 |
|
|
|
570 |
|
571 |
/**
|
572 |
* Find all source files, currently only PHP
|
@@ -601,6 +622,13 @@ abstract class LocoPackage {
|
|
601 |
}
|
602 |
|
603 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
604 |
|
605 |
/**
|
606 |
* Export meta data used by templates.
|
@@ -760,6 +788,7 @@ abstract class LocoPackage {
|
|
760 |
$domain = $handle or $domain = 'default';
|
761 |
$package = new LocoCorePackage( $handle, $domain, '' );
|
762 |
if( isset($grouped[$handle]) ){
|
|
|
763 |
$package->add_po( $grouped[$handle], $domain );
|
764 |
// get name from po file
|
765 |
$meta = $package->meta();
|
@@ -768,6 +797,8 @@ abstract class LocoPackage {
|
|
768 |
$package->name = $pmeta['projid'];
|
769 |
}
|
770 |
}
|
|
|
|
|
771 |
}
|
772 |
return $package;
|
773 |
}
|
375 |
$dir = $this->lang_dir( $domain, true );
|
376 |
}
|
377 |
$name = $locale->get_code().'.po';
|
378 |
+
// core default package has no file prefix
|
379 |
+
$type = $this->get_type();
|
380 |
+
if( 'core' === $type && 'default' === $domain ){
|
381 |
+
$prefix = '';
|
382 |
+
}
|
383 |
// only prefix with text domain for plugins and files in global lang directory
|
384 |
+
else if( 'plugin' === $type || $force_global ){
|
385 |
$prefix = $domain.'-';
|
386 |
}
|
387 |
else {
|
505 |
public function get_author_warnings(){
|
506 |
$warn = array();
|
507 |
$type = $this->get_type();
|
508 |
+
if( 'core' !== $type ){
|
|
|
|
|
|
|
509 |
$camelType = strtoupper($type{0}).substr($type,1);
|
510 |
// check package declares Text Domain
|
511 |
$domain = $this->get_original('TextDomain');
|
528 |
}
|
529 |
// TODO check references to other domains in xgettext
|
530 |
}
|
531 |
+
// Check if any locale codes are not an official Wordpress languages
|
532 |
+
$meta = $this->meta();
|
533 |
+
foreach( $meta['po'] as $po_data ){
|
534 |
+
$wplang = $po_data['locale']->get_code() or $wplang = $po_data['locale']->get_name();
|
535 |
+
if( ! LocoLocale::is_valid_wordpress($wplang) ){
|
536 |
+
$warn[] = sprintf( Loco::__('%s is not an official WordPress language'), $wplang );
|
537 |
+
}
|
538 |
+
}
|
539 |
return $warn;
|
540 |
}
|
541 |
|
563 |
}
|
564 |
// no template candidate
|
565 |
return '';
|
566 |
+
}
|
567 |
+
|
568 |
+
|
569 |
+
/**
|
570 |
+
* Check if given path is one of the package's POT files
|
571 |
+
* @return string related text domain if valid POT, else false
|
572 |
+
*/
|
573 |
+
public function is_pot( $path ){
|
574 |
+
return array_search( $path, $this->pot, true );
|
575 |
}
|
576 |
|
577 |
|
578 |
+
|
579 |
/**
|
580 |
* Fetch PO paths indexed by locale for given, or default domain
|
581 |
* @return array
|
587 |
return isset($this->po[$domain]) ? $this->po[$domain] : array();
|
588 |
}
|
589 |
|
590 |
+
|
591 |
|
592 |
/**
|
593 |
* Find all source files, currently only PHP
|
622 |
}
|
623 |
|
624 |
|
625 |
+
/**
|
626 |
+
* Test if package has any source directories
|
627 |
+
*/
|
628 |
+
public function has_source_dirs(){
|
629 |
+
return ! empty( $this->src );
|
630 |
+
}
|
631 |
+
|
632 |
|
633 |
/**
|
634 |
* Export meta data used by templates.
|
788 |
$domain = $handle or $domain = 'default';
|
789 |
$package = new LocoCorePackage( $handle, $domain, '' );
|
790 |
if( isset($grouped[$handle]) ){
|
791 |
+
// add PO file and POT files for this component
|
792 |
$package->add_po( $grouped[$handle], $domain );
|
793 |
// get name from po file
|
794 |
$meta = $package->meta();
|
797 |
$package->name = $pmeta['projid'];
|
798 |
}
|
799 |
}
|
800 |
+
// disable source directories as Core packages cannot be synced
|
801 |
+
$package->src = array();
|
802 |
}
|
803 |
return $package;
|
804 |
}
|
lib/test/tests/LocoBootTest.php
CHANGED
@@ -42,6 +42,10 @@ class LocoBootTest extends PHPUnit_Framework_TestCase {
|
|
42 |
}
|
43 |
|
44 |
|
|
|
|
|
|
|
|
|
45 |
}
|
46 |
|
47 |
|
42 |
}
|
43 |
|
44 |
|
45 |
+
public function testDefaultAdminCapabilityIsManageOptions(){
|
46 |
+
$this->assertSame( 'manage_options', Loco::admin_capablity() );
|
47 |
+
}
|
48 |
+
|
49 |
}
|
50 |
|
51 |
|
loco.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Loco Translate
|
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/loco-translate
|
5 |
Description: Translate Wordpress plugins and themes directly in your browser
|
6 |
Author: Tim Whitlock
|
7 |
-
Version: 1.5
|
8 |
Author URI: http://localise.biz/help/wordpress/translate-plugin
|
9 |
Text Domain: loco-translate
|
10 |
Domain Path: /languages/
|
@@ -40,9 +40,9 @@ else {
|
|
40 |
function loco_after_setup_theme(){
|
41 |
if( is_user_logged_in() ){
|
42 |
loco_require('loco-boot');
|
43 |
-
if( current_user_can(Loco::
|
44 |
-
|
45 |
-
}
|
46 |
}
|
47 |
}
|
48 |
}
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/loco-translate
|
5 |
Description: Translate Wordpress plugins and themes directly in your browser
|
6 |
Author: Tim Whitlock
|
7 |
+
Version: 1.5.1
|
8 |
Author URI: http://localise.biz/help/wordpress/translate-plugin
|
9 |
Text Domain: loco-translate
|
10 |
Domain Path: /languages/
|
40 |
function loco_after_setup_theme(){
|
41 |
if( is_user_logged_in() ){
|
42 |
loco_require('loco-boot');
|
43 |
+
//if( current_user_can( Loco::admin_capablity() ) ){
|
44 |
+
// TODO font end functionality
|
45 |
+
//}
|
46 |
}
|
47 |
}
|
48 |
}
|
php/loco-ajax.php
CHANGED
@@ -13,7 +13,7 @@ try {
|
|
13 |
throw new Exception('Ajax action only');
|
14 |
}
|
15 |
|
16 |
-
if( ! current_user_can(Loco::
|
17 |
throw new Exception( Loco::__('User does not have permission to manage translations'), 403 );
|
18 |
}
|
19 |
|
13 |
throw new Exception('Ajax action only');
|
14 |
}
|
15 |
|
16 |
+
if( ! current_user_can(Loco::admin_capablity()) ){
|
17 |
throw new Exception( Loco::__('User does not have permission to manage translations'), 403 );
|
18 |
}
|
19 |
|
php/loco-download.php
CHANGED
@@ -17,7 +17,7 @@ try {
|
|
17 |
throw new Exception('Wordpress not bootstrapped');
|
18 |
}
|
19 |
|
20 |
-
if( ! current_user_can(Loco::
|
21 |
throw new Exception( Loco::__('User does not have permission to manage translations'), 403 );
|
22 |
}
|
23 |
|
17 |
throw new Exception('Wordpress not bootstrapped');
|
18 |
}
|
19 |
|
20 |
+
if( ! current_user_can(Loco::admin_capablity()) ){
|
21 |
throw new Exception( Loco::__('User does not have permission to manage translations'), 403 );
|
22 |
}
|
23 |
|
php/loco-posync.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
|
6 |
DOING_AJAX or die();
|
7 |
|
8 |
-
if( empty($path) ||
|
9 |
throw new Exception( Loco::__('Invalid data posted to server'), 422 );
|
10 |
}
|
11 |
|
@@ -42,14 +42,12 @@
|
|
42 |
|
43 |
}
|
44 |
|
45 |
-
// Extract from sources by default
|
46 |
-
if( ! $package->
|
47 |
-
throw new Exception( Loco::__('No source
|
48 |
}
|
49 |
|
50 |
-
$
|
51 |
-
//$relative_to = $pot_path ? dirname($pot_path) : $package->get_root();
|
52 |
-
if( $exp = LocoAdmin::xgettext( $package, $relative_to ) ){
|
53 |
$pot = '';
|
54 |
break;
|
55 |
}
|
5 |
|
6 |
DOING_AJAX or die();
|
7 |
|
8 |
+
if( empty($path) || ! isset($name) || empty($type) ){
|
9 |
throw new Exception( Loco::__('Invalid data posted to server'), 422 );
|
10 |
}
|
11 |
|
42 |
|
43 |
}
|
44 |
|
45 |
+
// Extract from sources by default
|
46 |
+
if( ! $package->has_source_dirs() ){
|
47 |
+
throw new Exception( Loco::__('No source directories in this package, cannot sync from source code') );
|
48 |
}
|
49 |
|
50 |
+
if( $exp = LocoAdmin::xgettext( $package, dirname($path) ) ){
|
|
|
|
|
51 |
$pot = '';
|
52 |
break;
|
53 |
}
|
pub/css/loco-admin.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wrap a.nav-tab-active{cursor:text}.wrap #loco-poedit .wg-cell,.wrap #loco-poedit .wg-cell div{position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wrap #loco-poedit .wg-cell{left:0;top:0;padding:0;margin:0;overflow:hidden}.wrap #loco-poedit .wg-split{background:#eee}.wrap #loco-poedit .wg-body:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.wrap #loco-poedit .wg-split-x>div>.not-first>*{margin-left:6px}.wrap #loco-poedit .wg-split-y>div>.not-first>*{margin-top:6px}.wrap #loco-poedit .wg-split>div>.has-title .wg-content{margin-top:0}.wrap #loco-poedit .wg-split-x>div>.wg-cell{float:left;clear:none;height:100%}.wrap #loco-poedit .wg-split-x>div{cursor:move;cursor:ew-resize;cursor:col-resize}.wrap #loco-poedit .wg-split>div>.not-first:before{display:block;position:absolute;overflow:hidden;content:" "}.wrap #loco-poedit .wg-split-x>div>.not-first:before{width:6px;height:100%;background:transparent url(../img/wg/splitx.png) center center no-repeat}.wrap #loco-poedit .wg-split-y>div{cursor:move;cursor:ns-resize;cursor:row-resize}.wrap #loco-poedit .wg-split-y>div>.not-first:before{height:6px;width:100%;background:transparent url(../img/wg/splity.png) center center no-repeat}.wrap #loco-poedit .wg-split>div.locked{cursor:default}.wrap #loco-poedit .wg-split-x>div.locked>.not-first>*{margin-left:1px}.wrap #loco-poedit .wg-split-y>div.locked>.not-first>*{margin-top:1px}.wrap #loco-poedit .wg-split>div.locked>.not-first:before{display:none}.wrap #loco-poedit .wg-title{background:#ddd;cursor:default !important;margin:0;padding:4px 6px;font-size:1em;white-space:nowrap}.wrap #loco-poedit .wg-content{background:#fff;cursor:default;padding:4px 6px;overflow-x:hidden;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wrap #loco-poedit .is-table .wg-cols{outline:none}.wrap #loco-poedit .is-table .wg-col{float:left;clear:none}.wrap #loco-poedit .is-table .wg-title{padding:3px 10px;margin:0 !important;font-weight:normal}.wrap #loco-poedit .is-table .wg-thead>div>.not-first:before{background-position:center 1px}.wrap #loco-poedit .is-table .wg-thead{background:#ddd;border-bottom:solid 1px #ccc}.wrap #loco-poedit .is-table .wg-tr:nth-child(even){background-color:#f3f7fd}.wrap #loco-poedit .is-table .wg-tr.selected{background-color:#3875d7;color:#fff}.wrap #loco-poedit .is-table .wg-td{white-space:nowrap;line-height:1.7em;margin-left:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis}.wrap #loco-poedit .is-table .wg-tbody .not-first .wg-td{margin-left:10px}.wrap #loco-poedit .is-table .wg-cols.filtered .wg-tr{display:none}.wrap #loco-poedit .is-table .wg-cols.filtered .wg-tr.filtered{display:block}.wrap #loco-poedit .is-field>.wg-content{cursor:text;outline:none;white-space:pre-wrap}.wrap #loco-poedit .is-field>.wg-content:focus{-webkit-box-shadow:inset 0 0 10px #3875d7;-moz-box-shadow:inset 0 0 10px #3875d7;box-shadow:inset 0 0 10px #3875d7}.wrap #loco-poedit .is-field.readonly>.wg-content{cursor:default;background:#f8f8f8;text-shadow:0 1px #fff}.wrap #loco-poedit .is-field.readonly>.wg-content:focus{-webkit-box-shadow:inset 0 0 10px #c00;-moz-box-shadow:inset 0 0 10px #c00;box-shadow:inset 0 0 10px #c00}.wrap #loco-poedit .wg-split-x>nav.wg-tabs{white-space:nowrap;text-align:center}.wrap #loco-poedit .wg-split-x>nav.wg-tabs>a{display:inline-block;padding:0.5em 1em;color:#000;text-decoration:none;-webkit-border-radius:0.2em 0.2em 0 0;-moz-border-radius:0.2em 0.2em 0 0;-ms-border-radius:0.2em 0.2em 0 0;-o-border-radius:0.2em 0.2em 0 0;border-radius:0.2em 0.2em 0 0;background-color:#f3f7fd}.wrap #loco-poedit .wg-split-x>nav.wg-tabs>a:hover{background-color:#fff}.wrap #loco-poedit .wg-split-x>nav.wg-tabs>a.active{background-color:#3875d7;color:#fff}.wrap #loco-poedit .wg-split>div>.has-nav>.wg-body{margin-top:0px}@media all and (max-width: 768px){.wrap #loco-poedit .wg-split-x>div>.not-first>*{margin-left:20px}.wrap #loco-poedit .wg-split-y>div>.not-first>*{margin-top:20px}.wrap #loco-poedit .wg-split-x>div>.not-first:before{width:20px}.wrap #loco-poedit .wg-split-y>div>.not-first:before{height:20px}}.wrap #loco-poedit .is-table .po-fuzzy{color:#b59829;font-weight:bold}.wrap #loco-poedit .is-table .po-empty{color:#1f507a;font-weight:bold}.wrap #loco-poedit .is-table .wg-col.first .wg-td:before{font-family:loco;vertical-align:middle;display:inline-block;content:" ";width:1.2em;line-height:1}.wrap #loco-poedit .is-table .po-incorrect,.wrap #loco-poedit .is-table .po-needs-review{color:#CC0000}.wrap #loco-poedit .is-table .wg-col.first .po-flagged .wg-td:before{content:"\e60e"}.wrap #loco-poedit .is-table .wg-col.first .po-comment .wg-td:before{content:"\e613";color:#999}.wrap #loco-poedit .is-table .wg-col.first .po-unsaved .wg-td:before{content:"\e612";color:#f1d040}.wrap #loco-poedit #po-list .wg-content{padding:0}.wrap #loco-poedit #po-source>.wg-body>.has-title>h2{background:transparent;font-weight:normal;float:left;clear:none;min-width:3.4em}.wrap #loco-poedit #po-source>.wg-body>.has-title>.wg-content{clear:none}.wrap #loco-poedit #po-source p.notes{font-style:italic;color:#999;margin:0 0 0.5em 0;font-size:0.85em;line-height:1.2em}.wrap #loco-poedit #po-source>p.notes{margin:0;padding:4px 6px;cursor:default !important}.wrap #loco-poedit #po-source>.wg-body>.has-title>h2{min-width:4.5em}.wrap #loco-poedit .is-table .wg-td{font-size:13px}.wrap .flag{width:16px;height:11px;display:inline-block;background:url(../img/flags.png) no-repeat}.wrap .flag.flag-ad{background-position:-16px 0}.wrap .flag.flag-ae{background-position:-32px 0}.wrap .flag.flag-af{background-position:-48px 0}.wrap .flag.flag-ag{background-position:-64px 0}.wrap .flag.flag-ai{background-position:-80px 0}.wrap .flag.flag-al{background-position:-96px 0}.wrap .flag.flag-am{background-position:-112px 0}.wrap .flag.flag-an{background-position:-128px 0}.wrap .flag.flag-ao{background-position:-144px 0}.wrap .flag.flag-ar{background-position:-160px 0}.wrap .flag.flag-as{background-position:-176px 0}.wrap .flag.flag-at{background-position:-192px 0}.wrap .flag.flag-au{background-position:-208px 0}.wrap .flag.flag-aw{background-position:-224px 0}.wrap .flag.flag-az{background-position:-240px 0}.wrap .flag.flag-ba{background-position:0 -11px}.wrap .flag.flag-bb{background-position:-16px -11px}.wrap .flag.flag-bd{background-position:-32px -11px}.wrap .flag.flag-be{background-position:-48px -11px}.wrap .flag.flag-bf{background-position:-64px -11px}.wrap .flag.flag-bg{background-position:-80px -11px}.wrap .flag.flag-bh{background-position:-96px -11px}.wrap .flag.flag-bi{background-position:-112px -11px}.wrap .flag.flag-bj{background-position:-128px -11px}.wrap .flag.flag-bm{background-position:-144px -11px}.wrap .flag.flag-bn{background-position:-160px -11px}.wrap .flag.flag-bo{background-position:-176px -11px}.wrap .flag.flag-br{background-position:-192px -11px}.wrap .flag.flag-bs{background-position:-208px -11px}.wrap .flag.flag-bt{background-position:-224px -11px}.wrap .flag.flag-bw{background-position:-240px -11px}.wrap .flag.flag-by{background-position:0 -22px}.wrap .flag.flag-bz{background-position:-16px -22px}.wrap .flag.flag-ca{background-position:-32px -22px}.wrap .flag.flag-cd{background-position:-48px -22px}.wrap .flag.flag-cf{background-position:-64px -22px}.wrap .flag.flag-cg{background-position:-80px -22px}.wrap .flag.flag-ch{background-position:-96px -22px}.wrap .flag.flag-ci{background-position:-112px -22px}.wrap .flag.flag-ck{background-position:-128px -22px}.wrap .flag.flag-cl{background-position:-144px -22px}.wrap .flag.flag-cm{background-position:-160px -22px}.wrap .flag.flag-cn{background-position:-176px -22px}.wrap .flag.flag-co{background-position:-192px -22px}.wrap .flag.flag-cr{background-position:-208px -22px}.wrap .flag.flag-cu{background-position:-224px -22px}.wrap .flag.flag-cv{background-position:-240px -22px}.wrap .flag.flag-cw{background-position:0 -33px}.wrap .flag.flag-cy{background-position:-16px -33px}.wrap .flag.flag-cz{background-position:-32px -33px}.wrap .flag.flag-de{background-position:-48px -33px}.wrap .flag.flag-dj{background-position:-64px -33px}.wrap .flag.flag-dk{background-position:-80px -33px}.wrap .flag.flag-dm{background-position:-96px -33px}.wrap .flag.flag-do{background-position:-112px -33px}.wrap .flag.flag-dz{background-position:-128px -33px}.wrap .flag.flag-ec{background-position:-144px -33px}.wrap .flag.flag-ee{background-position:-160px -33px}.wrap .flag.flag-eg{background-position:-176px -33px}.wrap .flag.flag-eh{background-position:-192px -33px}.wrap .flag.flag-er{background-position:-208px -33px}.wrap .flag.flag-es{background-position:-224px -33px}.wrap .flag.flag-et{background-position:-240px -33px}.wrap .flag.flag-fi{background-position:0 -44px}.wrap .flag.flag-fj{background-position:-16px -44px}.wrap .flag.flag-fk{background-position:-32px -44px}.wrap .flag.flag-fm{background-position:-48px -44px}.wrap .flag.flag-fo{background-position:-64px -44px}.wrap .flag.flag-fr{background-position:-80px -44px}.wrap .flag.flag-ga{background-position:-96px -44px}.wrap .flag.flag-gb{background-position:-112px -44px}.wrap .flag.flag-gd{background-position:-128px -44px}.wrap .flag.flag-ge{background-position:-144px -44px}.wrap .flag.flag-gf{background-position:-160px -44px}.wrap .flag.flag-gh{background-position:-176px -44px}.wrap .flag.flag-gi{background-position:-192px -44px}.wrap .flag.flag-gl{background-position:-208px -44px}.wrap .flag.flag-gm{background-position:-224px -44px}.wrap .flag.flag-gn{background-position:-240px -44px}.wrap .flag.flag-gp{background-position:0 -55px}.wrap .flag.flag-gq{background-position:-16px -55px}.wrap .flag.flag-gr{background-position:-32px -55px}.wrap .flag.flag-gt{background-position:-48px -55px}.wrap .flag.flag-gu{background-position:-64px -55px}.wrap .flag.flag-gw{background-position:-80px -55px}.wrap .flag.flag-gy{background-position:-96px -55px}.wrap .flag.flag-hk{background-position:-112px -55px}.wrap .flag.flag-hn{background-position:-128px -55px}.wrap .flag.flag-hr{background-position:-144px -55px}.wrap .flag.flag-ht{background-position:-160px -55px}.wrap .flag.flag-hu{background-position:-176px -55px}.wrap .flag.flag-id{background-position:-192px -55px}.wrap .flag.flag-ie{background-position:-208px -55px}.wrap .flag.flag-il{background-position:-224px -55px}.wrap .flag.flag-in{background-position:-240px -55px}.wrap .flag.flag-iq{background-position:0 -66px}.wrap .flag.flag-ir{background-position:-16px -66px}.wrap .flag.flag-is{background-position:-32px -66px}.wrap .flag.flag-it{background-position:-48px -66px}.wrap .flag.flag-jm{background-position:-64px -66px}.wrap .flag.flag-jo{background-position:-80px -66px}.wrap .flag.flag-jp{background-position:-96px -66px}.wrap .flag.flag-ke{background-position:-112px -66px}.wrap .flag.flag-kg{background-position:-128px -66px}.wrap .flag.flag-kh{background-position:-144px -66px}.wrap .flag.flag-ki{background-position:-160px -66px}.wrap .flag.flag-km{background-position:-176px -66px}.wrap .flag.flag-kn{background-position:-192px -66px}.wrap .flag.flag-kp{background-position:-208px -66px}.wrap .flag.flag-kr{background-position:-224px -66px}.wrap .flag.flag-kw{background-position:-240px -66px}.wrap .flag.flag-ky{background-position:0 -77px}.wrap .flag.flag-kz{background-position:-16px -77px}.wrap .flag.flag-la{background-position:-32px -77px}.wrap .flag.flag-lb{background-position:-48px -77px}.wrap .flag.flag-lc{background-position:-64px -77px}.wrap .flag.flag-li{background-position:-80px -77px}.wrap .flag.flag-lk{background-position:-96px -77px}.wrap .flag.flag-lr{background-position:-112px -77px}.wrap .flag.flag-ls{background-position:-128px -77px}.wrap .flag.flag-lt{background-position:-144px -77px}.wrap .flag.flag-lu{background-position:-160px -77px}.wrap .flag.flag-lv{background-position:-176px -77px}.wrap .flag.flag-ly{background-position:-192px -77px}.wrap .flag.flag-ma{background-position:-208px -77px}.wrap .flag.flag-mc{background-position:-224px -77px}.wrap .flag.flag-md{background-position:-240px -77px}.wrap .flag.flag-me{background-position:0 -88px}.wrap .flag.flag-mg{background-position:-16px -88px}.wrap .flag.flag-mh{background-position:-32px -88px}.wrap .flag.flag-mk{background-position:-48px -88px}.wrap .flag.flag-ml{background-position:-64px -88px}.wrap .flag.flag-mm{background-position:-80px -88px}.wrap .flag.flag-mn{background-position:-96px -88px}.wrap .flag.flag-mo{background-position:-112px -88px}.wrap .flag.flag-mp{background-position:-128px -88px}.wrap .flag.flag-mq{background-position:-144px -88px}.wrap .flag.flag-mr{background-position:-160px -88px}.wrap .flag.flag-ms{background-position:-176px -88px}.wrap .flag.flag-mt{background-position:-192px -88px}.wrap .flag.flag-mu{background-position:-208px -88px}.wrap .flag.flag-mv{background-position:-224px -88px}.wrap .flag.flag-mw{background-position:-240px -88px}.wrap .flag.flag-mx{background-position:0 -99px}.wrap .flag.flag-my{background-position:-16px -99px}.wrap .flag.flag-mz{background-position:-32px -99px}.wrap .flag.flag-na{background-position:-48px -99px}.wrap .flag.flag-nc{background-position:-64px -99px}.wrap .flag.flag-ne{background-position:-80px -99px}.wrap .flag.flag-nf{background-position:-96px -99px}.wrap .flag.flag-ng{background-position:-112px -99px}.wrap .flag.flag-ni{background-position:-128px -99px}.wrap .flag.flag-nl{background-position:-144px -99px}.wrap .flag.flag-no{background-position:-160px -99px}.wrap .flag.flag-np{background-position:-176px -99px}.wrap .flag.flag-nr{background-position:-192px -99px}.wrap .flag.flag-nu{background-position:-208px -99px}.wrap .flag.flag-nz{background-position:-224px -99px}.wrap .flag.flag-om{background-position:-240px -99px}.wrap .flag.flag-pa{background-position:0 -110px}.wrap .flag.flag-pe{background-position:-16px -110px}.wrap .flag.flag-pf{background-position:-32px -110px}.wrap .flag.flag-pg{background-position:-48px -110px}.wrap .flag.flag-ph{background-position:-64px -110px}.wrap .flag.flag-pk{background-position:-80px -110px}.wrap .flag.flag-pl{background-position:-96px -110px}.wrap .flag.flag-pm{background-position:-112px -110px}.wrap .flag.flag-pn{background-position:-128px -110px}.wrap .flag.flag-pr{background-position:-144px -110px}.wrap .flag.flag-ps{background-position:-160px -110px}.wrap .flag.flag-pt{background-position:-176px -110px}.wrap .flag.flag-pw{background-position:-192px -110px}.wrap .flag.flag-py{background-position:-208px -110px}.wrap .flag.flag-qa{background-position:-224px -110px}.wrap .flag.flag-re{background-position:-240px -110px}.wrap .flag.flag-ro{background-position:0 -121px}.wrap .flag.flag-rs{background-position:-16px -121px}.wrap .flag.flag-ru{background-position:-32px -121px}.wrap .flag.flag-rw{background-position:-48px -121px}.wrap .flag.flag-sa{background-position:-64px -121px}.wrap .flag.flag-sb{background-position:-80px -121px}.wrap .flag.flag-sc{background-position:-96px -121px}.wrap .flag.flag-sd{background-position:-112px -121px}.wrap .flag.flag-se{background-position:-128px -121px}.wrap .flag.flag-sg{background-position:-144px -121px}.wrap .flag.flag-sh{background-position:-160px -121px}.wrap .flag.flag-si{background-position:-176px -121px}.wrap .flag.flag-sk{background-position:-192px -121px}.wrap .flag.flag-sl{background-position:-208px -121px}.wrap .flag.flag-sm{background-position:-224px -121px}.wrap .flag.flag-sn{background-position:-240px -121px}.wrap .flag.flag-so{background-position:0 -132px}.wrap .flag.flag-sr{background-position:-16px -132px}.wrap .flag.flag-ss{background-position:-32px -132px}.wrap .flag.flag-st{background-position:-48px -132px}.wrap .flag.flag-sv{background-position:-64px -132px}.wrap .flag.flag-sy{background-position:-80px -132px}.wrap .flag.flag-sz{background-position:-96px -132px}.wrap .flag.flag-tc{background-position:-112px -132px}.wrap .flag.flag-td{background-position:-128px -132px}.wrap .flag.flag-tg{background-position:-144px -132px}.wrap .flag.flag-th{background-position:-160px -132px}.wrap .flag.flag-tj{background-position:-176px -132px}.wrap .flag.flag-tk{background-position:-192px -132px}.wrap .flag.flag-tl{background-position:-208px -132px}.wrap .flag.flag-tm{background-position:-224px -132px}.wrap .flag.flag-tn{background-position:-240px -132px}.wrap .flag.flag-to{background-position:0 -143px}.wrap .flag.flag-tr{background-position:-16px -143px}.wrap .flag.flag-tt{background-position:-32px -143px}.wrap .flag.flag-tv{background-position:-48px -143px}.wrap .flag.flag-tw{background-position:-64px -143px}.wrap .flag.flag-tz{background-position:-80px -143px}.wrap .flag.flag-ua{background-position:-96px -143px}.wrap .flag.flag-ug{background-position:-112px -143px}.wrap .flag.flag-us{background-position:-128px -143px}.wrap .flag.flag-uy{background-position:-144px -143px}.wrap .flag.flag-uz{background-position:-160px -143px}.wrap .flag.flag-va{background-position:-176px -143px}.wrap .flag.flag-vc{background-position:-192px -143px}.wrap .flag.flag-ve{background-position:-208px -143px}.wrap .flag.flag-vg{background-position:-224px -143px}.wrap .flag.flag-vi{background-position:-240px -143px}.wrap .flag.flag-vn{background-position:0 -154px}.wrap .flag.flag-vu{background-position:-16px -154px}.wrap .flag.flag-wf{background-position:-32px -154px}.wrap .flag.flag-ws{background-position:-48px -154px}.wrap .flag.flag-ye{background-position:-64px -154px}.wrap .flag.flag-yt{background-position:-80px -154px}.wrap .flag.flag-za{background-position:-96px -154px}.wrap .flag.flag-zm{background-position:-112px -154px}.wrap .flag.flag-zw{background-position:-128px -154px}.wrap .loco-add>*:before{content:"\e60c"}.wrap .loco-del>*:before{content:"\e60d"}.wrap .loco-save>*:before{content:"\e610"}.wrap .loco-sync>*:before{content:"\e633"}.wrap .loco-help>*:before{content:"\3f"}.wrap .loco-revert>*:before{content:"\e634"}.wrap .loco-fuzzy>*:before{content:"\e607"}.wrap .loco-download>*:before{content:"\e608"}.wrap .loco-ok>*:before{content:"\e618"}.wrap .loco-error>*:before,.wrap .loco-warning>*:before{content:"\e62e"}.wrap .loco-edit-pot>*:before{content:"\e61e"}.wrap .loco-clearable>a:before{content:"\e615"}@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}.wrap div{position:relative}h2 .nav-tab.nav-tab-loco{float:right;border-color:transparent;font-size:16px;color:#2e892e;background:transparent}h2 .nav-tab.nav-tab-loco:hover{color:#3db63d}.widefat thead tr th{width:25%}.wrap.loco-lists>h2:before{display:inline-block;font-family:dashicons;opacity:0.5}.wrap .loco-list{margin:10px 0}.wrap .loco-message p:before,.wrap .loco-list li>a:before,.wrap .loco-list li>span:before{padding-right:0.5em;font-family:loco;color:inherit}.wrap .loco-list li.loco-add a{color:#666666}.wrap .loco-list li.loco-add a:hover{color:#000}.wrap .loco-list li.loco-edit-po .flag{margin-right:6px}.wrap .loco-list li.loco-warning>*:before{color:#cc0000}.wrap .loco-list li.loco-ok>*:before{color:#006600}.wrap .loco-list .loco-details li{margin-bottom:0}.wrap .loco-list .loco-mtime{color:#999}.wrap .loco-list .loco-progress{color:#999}.error a.dismiss,.updated a.dismiss{text-decoration:none;font-size:20px;line-height:1;display:block;position:absolute;right:10px;top:5px}.error a.dismiss:before,.updated a.dismiss:before{display:none}.wrap div.loco-message{margin-top:10px}.wrap div.loco-success{border-color:#00CC00;background-color:#ccffcc}.wrap div.loco-warning{border-color:#FFA500}.wrap div.loco-message:hover{border-color:#000}form.loco-switcher{display:inline;display:inline-block;padding:0 5px}form.loco-switcher select{font-weight:normal;height:auto;display:inline}h3.title .loco-meta{font-weight:normal;font-size:14px}.wrap #loco-poedit{border:solid 1px #ccc}.wrap #loco-poedit-inner{min-height:600px;font-size:14px;clear:both}.wrap #loco-poedit-inner h2{color:#000;line-height:1}#loco-nav{font-size:14px;height:50px}#loco-nav form{display:block;float:left;clear:none;padding:0;margin:0}#loco-search,#loco-nav button{display:block;position:relative;float:left;clear:none;box-sizing:border-box;margin:5px 0 0 5px;height:40px;text-align:left}#loco-nav form.loco-right{float:right;margin-right:5px}#loco-nav button span:before{padding-right:0.5em;font-family:loco}.wp-core-ui button.loco-inverted,.wp-core-ui button.loco-inverted:hover{background-image:-webkit-gradient(linear, left top, left bottom, from(#e0e0e0), to(#fefefe));background-image:-webkit-linear-gradient(top, #e0e0e0, #fefefe);background-image:-moz-linear-gradient(top, #e0e0e0, #fefefe);background-image:-o-linear-gradient(top, #e0e0e0, #fefefe);background-image:linear-gradient(to bottom, #e0e0e0, #fefefe)}#loco-filter input[type="text"]{padding-left:10px;margin-left:20px;font-size:14px;line-height:normal}.loco-clearable{display:inline-block;vertical-align:middle;position:relative}.loco-clearable a.clear{top:0;right:0;outline:none;padding:1em 0.5em;position:absolute;font-size:1em;line-height:normal;text-decoration:none}.loco-clearable a.clear:before{font-family:loco;vertical-align:middle;padding:0;color:#999}.loco-clearable a.clear:hover:before{color:#333}.loco-clearable a.clear span{display:none}.loco-clearable ::-ms-clear{display:none}.loco-fscheck .loco-list{margin-bottom:20px}
|
1 |
+
.wrap a.nav-tab-active{cursor:text}.wrap #loco-poedit .wg-cell,.wrap #loco-poedit .wg-cell div{position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wrap #loco-poedit .wg-cell{left:0;top:0;padding:0;margin:0;overflow:hidden}.wrap #loco-poedit .wg-split{background:#eee}.wrap #loco-poedit .wg-body:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.wrap #loco-poedit .wg-split-x>div>.not-first>*{margin-left:6px}.wrap #loco-poedit .wg-split-y>div>.not-first>*{margin-top:6px}.wrap #loco-poedit .wg-split>div>.has-title .wg-content{margin-top:0}.wrap #loco-poedit .wg-split-x>div>.wg-cell{float:left;clear:none;height:100%}.wrap #loco-poedit .wg-split-x>div{cursor:move;cursor:ew-resize;cursor:col-resize}.wrap #loco-poedit .wg-split>div>.not-first:before{display:block;position:absolute;overflow:hidden;content:" "}.wrap #loco-poedit .wg-split-x>div>.not-first:before{width:6px;height:100%;background:transparent url(../img/wg/splitx.png) center center no-repeat}.wrap #loco-poedit .wg-split-y>div{cursor:move;cursor:ns-resize;cursor:row-resize}.wrap #loco-poedit .wg-split-y>div>.not-first:before{height:6px;width:100%;background:transparent url(../img/wg/splity.png) center center no-repeat}.wrap #loco-poedit .wg-split>div.locked{cursor:default}.wrap #loco-poedit .wg-split-x>div.locked>.not-first>*{margin-left:1px}.wrap #loco-poedit .wg-split-y>div.locked>.not-first>*{margin-top:1px}.wrap #loco-poedit .wg-split>div.locked>.not-first:before{display:none}.wrap #loco-poedit .wg-title{background:#ddd;cursor:default !important;margin:0;padding:4px 6px;font-size:1em;white-space:nowrap}.wrap #loco-poedit .wg-content{background:#fff;cursor:default;padding:4px 6px;overflow-x:hidden;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wrap #loco-poedit .is-table .wg-cols{outline:none}.wrap #loco-poedit .is-table .wg-col{float:left;clear:none}.wrap #loco-poedit .is-table .wg-title{padding:3px 10px;margin:0 !important;font-weight:normal}.wrap #loco-poedit .is-table .wg-thead>div>.not-first:before{background-position:center 1px}.wrap #loco-poedit .is-table .wg-thead{background:#ddd;border-bottom:solid 1px #ccc}.wrap #loco-poedit .is-table .wg-tr:nth-child(even){background-color:#f3f7fd}.wrap #loco-poedit .is-table .wg-tr.selected{background-color:#3875d7;color:#fff}.wrap #loco-poedit .is-table .wg-td{white-space:nowrap;line-height:1.7em;margin-left:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;-ms-text-overflow:ellipsis}.wrap #loco-poedit .is-table .wg-tbody .not-first .wg-td{margin-left:10px}.wrap #loco-poedit .is-table .wg-cols.filtered .wg-tr{display:none}.wrap #loco-poedit .is-table .wg-cols.filtered .wg-tr.filtered{display:block}.wrap #loco-poedit .is-field>.wg-content{cursor:text;outline:none;white-space:pre-wrap}.wrap #loco-poedit .is-field>.wg-content:focus{-webkit-box-shadow:inset 0 0 10px #3875d7;-moz-box-shadow:inset 0 0 10px #3875d7;box-shadow:inset 0 0 10px #3875d7}.wrap #loco-poedit .is-field.readonly>.wg-content{cursor:default;background:#f8f8f8;text-shadow:0 1px #fff}.wrap #loco-poedit .is-field.readonly>.wg-content:focus{-webkit-box-shadow:inset 0 0 10px #c00;-moz-box-shadow:inset 0 0 10px #c00;box-shadow:inset 0 0 10px #c00}.wrap #loco-poedit .wg-split-x>nav.wg-tabs{white-space:nowrap;text-align:center}.wrap #loco-poedit .wg-split-x>nav.wg-tabs>a{display:inline-block;padding:0.5em 1em;color:#000;text-decoration:none;-webkit-border-radius:0.2em 0.2em 0 0;-moz-border-radius:0.2em 0.2em 0 0;-ms-border-radius:0.2em 0.2em 0 0;-o-border-radius:0.2em 0.2em 0 0;border-radius:0.2em 0.2em 0 0;background-color:#f3f7fd}.wrap #loco-poedit .wg-split-x>nav.wg-tabs>a:hover{background-color:#fff}.wrap #loco-poedit .wg-split-x>nav.wg-tabs>a.active{background-color:#3875d7;color:#fff}.wrap #loco-poedit .wg-split>div>.has-nav>.wg-body{margin-top:0px}@media all and (max-width: 768px){.wrap #loco-poedit .wg-split-x>div>.not-first>*{margin-left:20px}.wrap #loco-poedit .wg-split-y>div>.not-first>*{margin-top:20px}.wrap #loco-poedit .wg-split-x>div>.not-first:before{width:20px}.wrap #loco-poedit .wg-split-y>div>.not-first:before{height:20px}}.wrap #loco-poedit .is-table .po-fuzzy{color:#b59829;font-weight:bold}.wrap #loco-poedit .is-table .po-empty{color:#1f507a;font-weight:bold}.wrap #loco-poedit .is-table .wg-col.first .wg-td:before{font-family:loco;vertical-align:middle;display:inline-block;content:" ";width:1.2em;line-height:1}.wrap #loco-poedit .is-table .po-flagged{color:#CC0000}.wrap #loco-poedit .is-table .wg-col.first .po-flagged .wg-td:before{content:"\e60e"}.wrap #loco-poedit .is-table .wg-col.first .po-comment .wg-td:before{content:"\e613";color:#999}.wrap #loco-poedit .is-table .wg-col.first .po-unsaved .wg-td:before{content:"\e612";color:#f1d040}.wrap #loco-poedit #po-list .wg-content{padding:0}.wrap #loco-poedit #po-source>.wg-body>.has-title>h2{background:transparent;font-weight:normal;float:left;clear:none;min-width:3.4em}.wrap #loco-poedit #po-source>.wg-body>.has-title>.wg-content{clear:none}.wrap #loco-poedit #po-source p.notes{font-style:italic;color:#999;margin:0 0 0.5em 0;font-size:0.85em;line-height:1.2em}.wrap #loco-poedit #po-source>p.notes{margin:0;padding:4px 6px;cursor:default !important}.wrap #loco-poedit .wg-title .flag{margin-right:6px}.wrap #loco-poedit #po-source>.wg-body>.has-title>h2{min-width:4.5em}.wrap #loco-poedit .is-table .wg-td{font-size:13px}.wrap .flag{width:16px;height:11px;display:inline-block;background:url(../img/flags.png) no-repeat}.wrap .flag.flag-ad{background-position:-16px 0}.wrap .flag.flag-ae{background-position:-32px 0}.wrap .flag.flag-af{background-position:-48px 0}.wrap .flag.flag-ag{background-position:-64px 0}.wrap .flag.flag-ai{background-position:-80px 0}.wrap .flag.flag-al{background-position:-96px 0}.wrap .flag.flag-am{background-position:-112px 0}.wrap .flag.flag-an{background-position:-128px 0}.wrap .flag.flag-ao{background-position:-144px 0}.wrap .flag.flag-ar{background-position:-160px 0}.wrap .flag.flag-as{background-position:-176px 0}.wrap .flag.flag-at{background-position:-192px 0}.wrap .flag.flag-au{background-position:-208px 0}.wrap .flag.flag-aw{background-position:-224px 0}.wrap .flag.flag-az{background-position:-240px 0}.wrap .flag.flag-ba{background-position:0 -11px}.wrap .flag.flag-bb{background-position:-16px -11px}.wrap .flag.flag-bd{background-position:-32px -11px}.wrap .flag.flag-be{background-position:-48px -11px}.wrap .flag.flag-bf{background-position:-64px -11px}.wrap .flag.flag-bg{background-position:-80px -11px}.wrap .flag.flag-bh{background-position:-96px -11px}.wrap .flag.flag-bi{background-position:-112px -11px}.wrap .flag.flag-bj{background-position:-128px -11px}.wrap .flag.flag-bm{background-position:-144px -11px}.wrap .flag.flag-bn{background-position:-160px -11px}.wrap .flag.flag-bo{background-position:-176px -11px}.wrap .flag.flag-br{background-position:-192px -11px}.wrap .flag.flag-bs{background-position:-208px -11px}.wrap .flag.flag-bt{background-position:-224px -11px}.wrap .flag.flag-bw{background-position:-240px -11px}.wrap .flag.flag-by{background-position:0 -22px}.wrap .flag.flag-bz{background-position:-16px -22px}.wrap .flag.flag-ca{background-position:-32px -22px}.wrap .flag.flag-cd{background-position:-48px -22px}.wrap .flag.flag-cf{background-position:-64px -22px}.wrap .flag.flag-cg{background-position:-80px -22px}.wrap .flag.flag-ch{background-position:-96px -22px}.wrap .flag.flag-ci{background-position:-112px -22px}.wrap .flag.flag-ck{background-position:-128px -22px}.wrap .flag.flag-cl{background-position:-144px -22px}.wrap .flag.flag-cm{background-position:-160px -22px}.wrap .flag.flag-cn{background-position:-176px -22px}.wrap .flag.flag-co{background-position:-192px -22px}.wrap .flag.flag-cr{background-position:-208px -22px}.wrap .flag.flag-cu{background-position:-224px -22px}.wrap .flag.flag-cv{background-position:-240px -22px}.wrap .flag.flag-cw{background-position:0 -33px}.wrap .flag.flag-cy{background-position:-16px -33px}.wrap .flag.flag-cz{background-position:-32px -33px}.wrap .flag.flag-de{background-position:-48px -33px}.wrap .flag.flag-dj{background-position:-64px -33px}.wrap .flag.flag-dk{background-position:-80px -33px}.wrap .flag.flag-dm{background-position:-96px -33px}.wrap .flag.flag-do{background-position:-112px -33px}.wrap .flag.flag-dz{background-position:-128px -33px}.wrap .flag.flag-ec{background-position:-144px -33px}.wrap .flag.flag-ee{background-position:-160px -33px}.wrap .flag.flag-eg{background-position:-176px -33px}.wrap .flag.flag-eh{background-position:-192px -33px}.wrap .flag.flag-er{background-position:-208px -33px}.wrap .flag.flag-es{background-position:-224px -33px}.wrap .flag.flag-et{background-position:-240px -33px}.wrap .flag.flag-fi{background-position:0 -44px}.wrap .flag.flag-fj{background-position:-16px -44px}.wrap .flag.flag-fk{background-position:-32px -44px}.wrap .flag.flag-fm{background-position:-48px -44px}.wrap .flag.flag-fo{background-position:-64px -44px}.wrap .flag.flag-fr{background-position:-80px -44px}.wrap .flag.flag-ga{background-position:-96px -44px}.wrap .flag.flag-gb{background-position:-112px -44px}.wrap .flag.flag-gd{background-position:-128px -44px}.wrap .flag.flag-ge{background-position:-144px -44px}.wrap .flag.flag-gf{background-position:-160px -44px}.wrap .flag.flag-gh{background-position:-176px -44px}.wrap .flag.flag-gi{background-position:-192px -44px}.wrap .flag.flag-gl{background-position:-208px -44px}.wrap .flag.flag-gm{background-position:-224px -44px}.wrap .flag.flag-gn{background-position:-240px -44px}.wrap .flag.flag-gp{background-position:0 -55px}.wrap .flag.flag-gq{background-position:-16px -55px}.wrap .flag.flag-gr{background-position:-32px -55px}.wrap .flag.flag-gt{background-position:-48px -55px}.wrap .flag.flag-gu{background-position:-64px -55px}.wrap .flag.flag-gw{background-position:-80px -55px}.wrap .flag.flag-gy{background-position:-96px -55px}.wrap .flag.flag-hk{background-position:-112px -55px}.wrap .flag.flag-hn{background-position:-128px -55px}.wrap .flag.flag-hr{background-position:-144px -55px}.wrap .flag.flag-ht{background-position:-160px -55px}.wrap .flag.flag-hu{background-position:-176px -55px}.wrap .flag.flag-id{background-position:-192px -55px}.wrap .flag.flag-ie{background-position:-208px -55px}.wrap .flag.flag-il{background-position:-224px -55px}.wrap .flag.flag-in{background-position:-240px -55px}.wrap .flag.flag-iq{background-position:0 -66px}.wrap .flag.flag-ir{background-position:-16px -66px}.wrap .flag.flag-is{background-position:-32px -66px}.wrap .flag.flag-it{background-position:-48px -66px}.wrap .flag.flag-jm{background-position:-64px -66px}.wrap .flag.flag-jo{background-position:-80px -66px}.wrap .flag.flag-jp{background-position:-96px -66px}.wrap .flag.flag-ke{background-position:-112px -66px}.wrap .flag.flag-kg{background-position:-128px -66px}.wrap .flag.flag-kh{background-position:-144px -66px}.wrap .flag.flag-ki{background-position:-160px -66px}.wrap .flag.flag-km{background-position:-176px -66px}.wrap .flag.flag-kn{background-position:-192px -66px}.wrap .flag.flag-kp{background-position:-208px -66px}.wrap .flag.flag-kr{background-position:-224px -66px}.wrap .flag.flag-kw{background-position:-240px -66px}.wrap .flag.flag-ky{background-position:0 -77px}.wrap .flag.flag-kz{background-position:-16px -77px}.wrap .flag.flag-la{background-position:-32px -77px}.wrap .flag.flag-lb{background-position:-48px -77px}.wrap .flag.flag-lc{background-position:-64px -77px}.wrap .flag.flag-li{background-position:-80px -77px}.wrap .flag.flag-lk{background-position:-96px -77px}.wrap .flag.flag-lr{background-position:-112px -77px}.wrap .flag.flag-ls{background-position:-128px -77px}.wrap .flag.flag-lt{background-position:-144px -77px}.wrap .flag.flag-lu{background-position:-160px -77px}.wrap .flag.flag-lv{background-position:-176px -77px}.wrap .flag.flag-ly{background-position:-192px -77px}.wrap .flag.flag-ma{background-position:-208px -77px}.wrap .flag.flag-mc{background-position:-224px -77px}.wrap .flag.flag-md{background-position:-240px -77px}.wrap .flag.flag-me{background-position:0 -88px}.wrap .flag.flag-mg{background-position:-16px -88px}.wrap .flag.flag-mh{background-position:-32px -88px}.wrap .flag.flag-mk{background-position:-48px -88px}.wrap .flag.flag-ml{background-position:-64px -88px}.wrap .flag.flag-mm{background-position:-80px -88px}.wrap .flag.flag-mn{background-position:-96px -88px}.wrap .flag.flag-mo{background-position:-112px -88px}.wrap .flag.flag-mp{background-position:-128px -88px}.wrap .flag.flag-mq{background-position:-144px -88px}.wrap .flag.flag-mr{background-position:-160px -88px}.wrap .flag.flag-ms{background-position:-176px -88px}.wrap .flag.flag-mt{background-position:-192px -88px}.wrap .flag.flag-mu{background-position:-208px -88px}.wrap .flag.flag-mv{background-position:-224px -88px}.wrap .flag.flag-mw{background-position:-240px -88px}.wrap .flag.flag-mx{background-position:0 -99px}.wrap .flag.flag-my{background-position:-16px -99px}.wrap .flag.flag-mz{background-position:-32px -99px}.wrap .flag.flag-na{background-position:-48px -99px}.wrap .flag.flag-nc{background-position:-64px -99px}.wrap .flag.flag-ne{background-position:-80px -99px}.wrap .flag.flag-nf{background-position:-96px -99px}.wrap .flag.flag-ng{background-position:-112px -99px}.wrap .flag.flag-ni{background-position:-128px -99px}.wrap .flag.flag-nl{background-position:-144px -99px}.wrap .flag.flag-no{background-position:-160px -99px}.wrap .flag.flag-np{background-position:-176px -99px}.wrap .flag.flag-nr{background-position:-192px -99px}.wrap .flag.flag-nu{background-position:-208px -99px}.wrap .flag.flag-nz{background-position:-224px -99px}.wrap .flag.flag-om{background-position:-240px -99px}.wrap .flag.flag-pa{background-position:0 -110px}.wrap .flag.flag-pe{background-position:-16px -110px}.wrap .flag.flag-pf{background-position:-32px -110px}.wrap .flag.flag-pg{background-position:-48px -110px}.wrap .flag.flag-ph{background-position:-64px -110px}.wrap .flag.flag-pk{background-position:-80px -110px}.wrap .flag.flag-pl{background-position:-96px -110px}.wrap .flag.flag-pm{background-position:-112px -110px}.wrap .flag.flag-pn{background-position:-128px -110px}.wrap .flag.flag-pr{background-position:-144px -110px}.wrap .flag.flag-ps{background-position:-160px -110px}.wrap .flag.flag-pt{background-position:-176px -110px}.wrap .flag.flag-pw{background-position:-192px -110px}.wrap .flag.flag-py{background-position:-208px -110px}.wrap .flag.flag-qa{background-position:-224px -110px}.wrap .flag.flag-re{background-position:-240px -110px}.wrap .flag.flag-ro{background-position:0 -121px}.wrap .flag.flag-rs{background-position:-16px -121px}.wrap .flag.flag-ru{background-position:-32px -121px}.wrap .flag.flag-rw{background-position:-48px -121px}.wrap .flag.flag-sa{background-position:-64px -121px}.wrap .flag.flag-sb{background-position:-80px -121px}.wrap .flag.flag-sc{background-position:-96px -121px}.wrap .flag.flag-sd{background-position:-112px -121px}.wrap .flag.flag-se{background-position:-128px -121px}.wrap .flag.flag-sg{background-position:-144px -121px}.wrap .flag.flag-sh{background-position:-160px -121px}.wrap .flag.flag-si{background-position:-176px -121px}.wrap .flag.flag-sk{background-position:-192px -121px}.wrap .flag.flag-sl{background-position:-208px -121px}.wrap .flag.flag-sm{background-position:-224px -121px}.wrap .flag.flag-sn{background-position:-240px -121px}.wrap .flag.flag-so{background-position:0 -132px}.wrap .flag.flag-sr{background-position:-16px -132px}.wrap .flag.flag-ss{background-position:-32px -132px}.wrap .flag.flag-st{background-position:-48px -132px}.wrap .flag.flag-sv{background-position:-64px -132px}.wrap .flag.flag-sy{background-position:-80px -132px}.wrap .flag.flag-sz{background-position:-96px -132px}.wrap .flag.flag-tc{background-position:-112px -132px}.wrap .flag.flag-td{background-position:-128px -132px}.wrap .flag.flag-tg{background-position:-144px -132px}.wrap .flag.flag-th{background-position:-160px -132px}.wrap .flag.flag-tj{background-position:-176px -132px}.wrap .flag.flag-tk{background-position:-192px -132px}.wrap .flag.flag-tl{background-position:-208px -132px}.wrap .flag.flag-tm{background-position:-224px -132px}.wrap .flag.flag-tn{background-position:-240px -132px}.wrap .flag.flag-to{background-position:0 -143px}.wrap .flag.flag-tr{background-position:-16px -143px}.wrap .flag.flag-tt{background-position:-32px -143px}.wrap .flag.flag-tv{background-position:-48px -143px}.wrap .flag.flag-tw{background-position:-64px -143px}.wrap .flag.flag-tz{background-position:-80px -143px}.wrap .flag.flag-ua{background-position:-96px -143px}.wrap .flag.flag-ug{background-position:-112px -143px}.wrap .flag.flag-us{background-position:-128px -143px}.wrap .flag.flag-uy{background-position:-144px -143px}.wrap .flag.flag-uz{background-position:-160px -143px}.wrap .flag.flag-va{background-position:-176px -143px}.wrap .flag.flag-vc{background-position:-192px -143px}.wrap .flag.flag-ve{background-position:-208px -143px}.wrap .flag.flag-vg{background-position:-224px -143px}.wrap .flag.flag-vi{background-position:-240px -143px}.wrap .flag.flag-vn{background-position:0 -154px}.wrap .flag.flag-vu{background-position:-16px -154px}.wrap .flag.flag-wf{background-position:-32px -154px}.wrap .flag.flag-ws{background-position:-48px -154px}.wrap .flag.flag-ye{background-position:-64px -154px}.wrap .flag.flag-yt{background-position:-80px -154px}.wrap .flag.flag-za{background-position:-96px -154px}.wrap .flag.flag-zm{background-position:-112px -154px}.wrap .flag.flag-zw{background-position:-128px -154px}.wrap .loco-add>*:before{content:"\e60c"}.wrap .loco-del>*:before{content:"\e60d"}.wrap .loco-save>*:before{content:"\e610"}.wrap .loco-sync>*:before{content:"\e633"}.wrap .loco-help>*:before{content:"\3f"}.wrap .loco-revert>*:before{content:"\e634"}.wrap .loco-fuzzy>*:before{content:"\e607"}.wrap .loco-download>*:before{content:"\e608"}.wrap .loco-ok>*:before{content:"\e618"}.wrap .loco-error>*:before,.wrap .loco-warning>*:before{content:"\e62e"}.wrap .loco-edit-pot>*:before{content:"\e61e"}.wrap .loco-clearable>a:before{content:"\e615"}@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}.wrap div{position:relative}h2 .nav-tab.nav-tab-loco{float:right;border-color:transparent;font-size:16px;color:#2e892e;background:transparent}h2 .nav-tab.nav-tab-loco:hover{color:#3db63d}.widefat thead tr th{width:25%}.wrap.loco-lists>h2:before{display:inline-block;font-family:dashicons;opacity:0.5}.wrap .loco-list{margin:10px 0}.wrap .loco-message p:before,.wrap .loco-list li>a:before,.wrap .loco-list li>span:before{padding-right:0.5em;font-family:loco;color:inherit}.wrap .loco-list li.loco-add a{color:#666666}.wrap .loco-list li.loco-add a:hover{color:#000}.wrap .loco-list li.loco-edit-po .flag{margin-right:6px}.wrap .loco-list li.loco-warning>*:before{color:#cc0000}.wrap .loco-list li.loco-ok>*:before{color:#006600}.wrap .loco-list .loco-details li{margin-bottom:0}.wrap .loco-list .loco-mtime{color:#999}.wrap .loco-list .loco-progress{color:#999}.error a.dismiss,.updated a.dismiss{text-decoration:none;font-size:20px;line-height:1;display:block;position:absolute;right:10px;top:5px}.error a.dismiss:before,.updated a.dismiss:before{display:none}.wrap div.loco-message{margin-top:10px}.wrap div.loco-success{border-color:#00CC00;background-color:#ccffcc}.wrap div.loco-warning{border-color:#FFA500}.wrap div.loco-message:hover{border-color:#000}form.loco-switcher{display:inline;display:inline-block;padding:0 5px}form.loco-switcher select{font-weight:normal;height:auto;display:inline}h3.title .loco-meta{font-weight:normal;font-size:14px}.wrap #loco-poedit{border:solid 1px #ccc}.wrap #loco-poedit-inner{min-height:600px;font-size:14px;clear:both}.wrap #loco-poedit-inner h2{color:#000;line-height:1}#loco-nav{font-size:14px;height:50px}#loco-nav form{display:block;float:left;clear:none;padding:0;margin:0}#loco-search,#loco-nav button{display:block;position:relative;float:left;clear:none;box-sizing:border-box;margin:5px 0 0 5px;height:40px;text-align:left}#loco-nav form.loco-right{float:right;margin-right:5px}#loco-nav button span:before{padding-right:0.5em;font-family:loco}.wp-core-ui button.loco-inverted,.wp-core-ui button.loco-inverted:hover{background-image:-webkit-gradient(linear, left top, left bottom, from(#e0e0e0), to(#fefefe));background-image:-webkit-linear-gradient(top, #e0e0e0, #fefefe);background-image:-moz-linear-gradient(top, #e0e0e0, #fefefe);background-image:-o-linear-gradient(top, #e0e0e0, #fefefe);background-image:linear-gradient(to bottom, #e0e0e0, #fefefe)}#loco-filter input[type="text"]{padding-left:10px;margin-left:20px;font-size:14px;line-height:normal}.loco-clearable{display:inline-block;vertical-align:middle;position:relative}.loco-clearable a.clear{top:0;right:0;outline:none;padding:1em 0.5em;position:absolute;font-size:1em;line-height:normal;text-decoration:none}.loco-clearable a.clear:before{font-family:loco;vertical-align:middle;padding:0;color:#999}.loco-clearable a.clear:hover:before{color:#333}.loco-clearable a.clear span{display:none}.loco-clearable ::-ms-clear{display:none}.loco-fscheck .loco-list{margin-bottom:20px}
|
pub/js/build/admin-poedit.js
CHANGED
@@ -1,147 +1,152 @@
|
|
1 |
-
(function(
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
title:
|
8 |
-
0===
|
9 |
-
-1!==
|
10 |
-
callback:h,css:"cancel"});var
|
11 |
-
d.alert(
|
12 |
-
encodeURIComponent(location.href))}}])};return d}({},
|
13 |
-
e
|
14 |
-
|
15 |
-
d.html=function(
|
16 |
-
|
17 |
-
{401:"You've been logged out",404:"Not Found",500:"Server Error",502:"Bad Gateway",503:"Service unavailable",504:"Gateway timeout"};d.getErrors=function(){return
|
18 |
-
l.error=
|
19 |
-
!1;
|
20 |
-
typeof k&&!1===
|
21 |
-
[a,b||"",
|
22 |
-
b.attr("data-title"),l=
|
23 |
-
var
|
24 |
-
function(
|
25 |
-
a.preventDefault();return!1}function b
|
26 |
-
0;k<
|
27 |
-
this.id&&
|
28 |
-
d.extend=function(
|
29 |
-
case 40:return this.hoverNext(1),
|
30 |
-
this.list.css("min-width",String(a
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
return
|
35 |
-
|
36 |
-
d.
|
37 |
-
e
|
38 |
-
d.charAt(1)?h.left=
|
39 |
-
|
40 |
-
if(this.$tip)this.$tip.find(".tipsy-inner")[this.options.html?"html":"text"](
|
41 |
-
|
42 |
-
this.data("tipsy");if(
|
43 |
-
|
44 |
-
f(
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
b)
|
49 |
-
"";
|
50 |
-
c.depth=0;c.matchall=!0;c.ignorecase=!0;c.boundary=/[\s.?!;:,*^+=~`"(){}<>[\]\/\\\u00a0\u1680\u180e\u2000-\u206f\u2e00-\u2e7f\u3000-\u303f]+/;c.nonword=/[\-'_]+/g;c.translit=function(
|
51 |
-
|
52 |
-
y.length;){e=
|
53 |
-
b.split(this.boundary)||[]};c.strip=function(
|
54 |
-
|
55 |
-
b.click(function(
|
56 |
-
t(0,
|
57 |
-
a.stopPropagation();return!1}switch(
|
58 |
-
force:function(a
|
59 |
-
b.
|
60 |
-
|
61 |
-
d.
|
62 |
-
b){var
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
function(
|
67 |
-
|
68 |
-
|
69 |
-
this.
|
70 |
-
this.
|
71 |
-
this.
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
(
|
78 |
-
|
79 |
-
c.
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
"\
|
86 |
-
"\
|
87 |
-
"\
|
88 |
-
"\
|
89 |
-
"\
|
90 |
-
"\
|
91 |
-
"\
|
92 |
-
"\
|
93 |
-
"\
|
94 |
-
"\
|
95 |
-
"\
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
this.
|
114 |
-
|
115 |
-
function(a
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
a
|
121 |
-
|
122 |
-
|
123 |
-
(
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
this.
|
128 |
-
|
129 |
-
f.fire(
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
function(){
|
136 |
-
this.
|
137 |
-
c.
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
function(){
|
|
|
|
|
|
|
|
|
|
1 |
+
(function(s,w,e,H){function F(d){var c=0,e,f=[].slice.call(arguments,1);return d.replace(/%(s|u|%)/g,function(a,d){if("%"===d)return"%";e=f[c++];return String(e)||""})}function S(){var d=C.stats(),c=d.t,n=d.f,f=d.u,c=F(D("1 string","%s strings",c),c),a=[];R&&(c=F(D("%s%% translated"),d.p.replace("%",""))+", "+c,n&&a.push(F(D("%s fuzzy"),n)),f&&a.push(F(D("%s untranslated"),f)),a.length&&(c+=" ("+a.join(", ")+")"));e("#loco-po-status").text(c)}function U(d,c,n){function f(a,c,b){b=b||D("Unknown error");
|
2 |
+
V(b);n&&n(a,c,b)}return e.ajax({url:W,type:d.method,data:e(d).serialize(),dataType:"json",error:f,success:function(a,d,b){!a||a.error?f(b,d,a&&a.error&&a.error.message):c&&c(a,d,b)}})}var q=function(){var d={};return{register:function(c,e){d[c]=e},require:function(c,e){var f=d[c];if(!f)throw Error('CommonJS error: failed to require("'+e+'")');return f}}}();q.register("$1",function(d,c,e){Array.prototype.indexOf||(Array.prototype.indexOf=function(c){if(null==this)throw new TypeError;var a,d=Object(this),
|
3 |
+
b=d.length>>>0;if(0===b)return-1;a=0;1<arguments.length&&(a=Number(arguments[1]),a!=a?a=0:0!=a&&Infinity!=a&&-Infinity!=a&&(a=(0<a||-1)*Math.floor(Math.abs(a))));if(a>=b)return-1;for(a=0<=a?a:Math.max(b-Math.abs(a),0);a<b;a++)if(a in d&&d[a]===c)return a;return-1});return d}({},s,w));q.register("$19",function(d,c,e){function f(l){b||c._gat&&(b=_gat._createTracker(a,"loco"));if(b){var p=l.shift();b[p].apply(b,l)}else g&&g.push(l);return d}var a,g,b;d._init=function(b){if(a=b.code){g=c._gaq||(c._gaq=
|
4 |
+
[]);g.push(["_setAccount",a]);g.push(["_trackPageview"]);g.push(["_setDomainName",b.host]);b=e.createElement("script");b.type="text/javascript";b.async=!0;b.src=("https:"==e.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var p=e.getElementsByTagName("script")[0];p.parentNode.insertBefore(b,p)}return d};d.event=function(b,a,c,d){return f(["_trackEvent",b||"",a||"",c||"",d||0])};d.page=function(b,a){return f(["_trackPageview",{page:b||location.pathname+location.hash,title:a||
|
5 |
+
e.title}])};return d}({},s,w));q.register("$20",function(d,c,e){function f(b,l){if(a)a[b](l);else c.ga&&ga(b,l);return d}var a,g;d._init=function(b){b.code&&(function(b,a,c,d,h,m,k){b.GoogleAnalyticsObject=h;b[h]=b[h]||function(){(b[h].q=b[h].q||[]).push(arguments)};b[h].l=1*new Date;m=a.createElement(c);k=a.getElementsByTagName(c)[0];m.async=1;m.src=d;k.parentNode.insertBefore(m,k)}(c,e,"script","//www.google-analytics.com/analytics.js","ga"),ga("create",b.code,{alwaysSendReferrer:!0,userId:b.user}),
|
6 |
+
b.custom&&f("set",b.custom),d.page(),ga(function(b){a=b}));return d};d.event=function(b,a,c,d){return f("send",{hitType:"event",eventCategory:b||"",eventAction:a||"",eventLabel:c||"",eventValue:Number(d||0)})};d.page=function(b,a){var c={hitType:"pageview",page:b||location.pathname+location.hash,title:a||e.title};c.location=location.protocol+"//"+location.hostname+c.page;g&&f("set",{referrer:g});g=c.location;return f("send",c)};d.reset=function(){g=location.href;f("set",{page:location.pathname+location.hash,
|
7 |
+
title:e.title,location:g});return d};return d}({},s,w));q.register("$9",function(d,c,n){function f(b,l){e(b).click(function(b){a&&a.event(l,"click",this.getAttribute("href")||"");return!0});b=null;return d}var a,g=location.hostname;d.init=function(b){!a&&b&&(g=b.host||(b.host=g),a=b.legacy?q.require("$19","legacy.js"):q.require("$20","universal.js"),a._init(b));return d};d.link=function(b){for(var a=b.getAttribute("href");a&&"#"!==a;){if(0===a.indexOf("#"))return f(b,"anchor");if(0===a.indexOf("http")||
|
8 |
+
0===a.indexOf("//")){if(-1!==a.indexOf(g)&&/^(https?:)*\/\/([^\/]+)/.exec(a)&&g===RegExp.$2)break;b.setAttribute("target","_blank");f(b,"external")}break}return d};d.page=function(){a&&a.page.apply(a,arguments);return d};d.event=function(){a&&a.event.apply(a,arguments);return d};d.reset=function(){a&&a.reset&&a.reset();return d};return d}({},s,w));q.register("$25",function(d,c,n){function f(b,a,c,d,t){function h(){y&&clearTimeout(y);v&&v.fadeOut(400,function(){e(this).remove();v=null});return!1}function m(){k();
|
9 |
+
-1!==d&&(y=setTimeout(h,d||2E3));v.unbind("mouseleave");v.mouseenter(k)}function k(){y&&clearTimeout(y);y=null;v.unbind("mouseenter");v.mouseleave(m)}var y;g||(g=n.createElement("div"),g.id="growls",n.body.appendChild(g));var v=e('<div class="growl growl-'+c+'"><div><a class="close" href="#"><span>X</span></a><span class="badge"></span><p class="message"></p><small class="caption"></small></div></div>');v.find("p").text(b||"Empty message");a?v.find("small").text(a):v.find("small").remove();if(t.length){t.push({label:"Cancel",
|
10 |
+
callback:h,css:"cancel"});var u,f=e('<form action="#" class="dialog"></form>');a=function(b,a){u=e('<input type="button" value="'+a.label+'" class="butt '+(a.css||"")+'" />');u.click(function(b){"function"===typeof a.callback&&a.callback(b,{close:h})});f.append(u);return u};for(b=0;b<t.length;b++)a(b,t[b]);v.append(f)}e(g).prepend(v.hide().fadeIn(400));v.find("a").click(h);m()}var a,g;d.init=function(){if(!a)return a=c.alert,c.alert=function(b){b=String(b).split("\n");var a=b[1]&&b.slice(1).join("\n");
|
11 |
+
d.alert(b[0],a)},d};d.debug=function(b){a(b);return d};d.alert=function(b,l,d,g,e){try{return f(b,l||"",d||"alert",g||4E3,e||[]),!0}catch(h){return b+="\n\n--\n"+(h.message||h),a.call(c,b),!1}};d.success=function(b,a,c){return d.alert(b,a,"success",c||2E3)};d.dialog=function(b,a,c,g){return d.alert(b,a,g||"alert",-1,c)};d.login=function(b,a,c,g){d.dialog(a||"You're not logged in",c||"Please log in to continue",[{label:g||"Log in",callback:function(a,c){location.assign(b||"/session/auth/login?r="+
|
12 |
+
encodeURIComponent(location.href))}}])};return d}({},s,w));q.register("$22",function(d,c,n){function f(b){return 27===b.keyCode&&m&&k?(B(),b.preventDefault(),!1):!0}function a(a){if(m){var k=Math.max(b.height(),l.outerHeight(!0));k&&r.css("height",k+"px");a&&(T=e(c).innerWidth(),G(A))}return!0}function g(b){b?(t.show(),p.addClass("has-title")):(t.hide(),p.removeClass("has-title"))}var b,l,p,r,t,h,m=!1,k=!1,y=!1,v,u,E,T,A,z=d.init=function(){if(!b){b=e('<div id="overlay"></div>');l=e('<div class="overlay-frame"></div>');
|
13 |
+
p=e('<div class="overlay-container"></div>');t=e('<div class="overlay-title"><span class="title">Untitled</span></div>');h=e('<a class="overlay-close" href="#"><span>x</span></a>');r=e('<div class="overlay-bg"></div>');b.append(l.append(p)).append(r).prependTo(n.body);e(n).bind("keydown",f);e(c).resize(a);E=p.outerWidth(!0)-p.width()+(l.innerWidth()-l.width());p.outerHeight(!0);p.outerHeight(!1);l.innerHeight();l.height();T=e(c).innerWidth();v=parseInt(p.css("width"));if(!v||isNaN(v))v=p.width();
|
14 |
+
u=parseInt(p.css("height"));if(!u||isNaN(u))u=p.height();t.append(h.hide()).hide().prependTo(l);b.hide()}return b},G=d.width=function(a){z();if(null===a)l.css("width",""),p.css("width","");else{a=a||v||640;x=a+E;A=a;var k=T;x>k?(x=k,a=x-E,b.addClass("spill")):b.removeClass("spill");l.css("width",x+"px");p.css("width",a+"px")}return d};d.autoSize=function(){z();a();var b=v||0;p.children().each(function(a,k){b=Math.max(b,e(k).outerWidth(!0))});G(b);return d};d.css=function(b){z().attr("class",b);return d};
|
15 |
+
d.html=function(b){z();c.innerShiv&&(b=innerShiv(b,!1));return p.html(b)};d.append=function(b){z();b instanceof jQuery||(b=e(b));p.append(b);return d};var B=d.close=function(a){if(m){var k=function(){z().hide();e(n.body).removeClass("has-overlay");m=!1;p.html("");m=null;b.trigger("overlayClosed",[d])};null==a&&(a=300);b.trigger("overlayClosing",[d]);a?b.fadeOut(a,k):k()}return d};d.title=function(b){z();y=b||"";t.find("span.title").text(y);null!=b?g(!0):k||g(!1);return d};d.enableClose=function(){z();
|
16 |
+
k=!0;h.unbind("click").bind("click",function(b){B();return!1});g(!0);h.show();return d};d.disableClose=function(){z();k=!1;h.hide();m&&y||g(!1);return d};d.open=function(){z();p.html("");G(v);b.attr("class","");e(n.body).addClass("has-overlay");z().show();m=!0;a();d.title(null);k&&g(!0);b.trigger("overlayOpened",[d]);return d};d.listen=function(b){z().bind("overlayClosed",b);return d};d.unlisten=function(b){z().unbind("overlayClosed",b);return d};return d}({},s,w));q.register("$21",function(d,c,n){var f=
|
17 |
+
{401:"You've been logged out",404:"Not Found",500:"Server Error",502:"Bad Gateway",503:"Service unavailable",504:"Gateway timeout"};d.getErrors=function(){return f};d.jsonLink=function(a){if(!a)return"";a=a.split("?");a[0]=a[0].replace(/(\.[a-z0-9]{1,4})?$/i,".json");return a.join("?")};d.errorData=function(a,c,b){var l,d;b=a.responseText;c=a.status;if(!b&&0===c)return null;try{l=e.parseJSON(b)||{}}catch(r){l={},d=f[a.status]||r.message||r}d||(d=l.statusText||a.statusText||f[c]||"Unknown Error");
|
18 |
+
l.error=d;return l};d.ajax=function(a,g,b,l){function p(){b&&b()}function r(b){b.alert&&alert(b.alert);var a=b.success;a&&q.require("$25","growl.js").success.apply(this,a.push?a:[a]);a=l||e(n.body);a.trigger("locoAjaxSuccess",[b]);var k=b.events;if(k&&k.length)for(var d,g=q.require("$9","ga.js");d=k.shift();)a.trigger(d,[b]),g.event("ajax",d);b.modal&&q.require("$11","LocoModal.js").replace(b.modal);if(b.download)c.location.assign(b.download);else if(b.redirect)return c.location.assign(b.redirect),
|
19 |
+
!1;p();return!0}function t(b,a,k){if("abort"!==a){var l=b.status,e;if(401===l)q.require("$25","growl.js").login(),g&&!1===g(null,f[l],l,b)&&p();else{if("parsererror"===a)404===l?e="Ajax service not found":/^\s+Fatal error/.test(b.responseText)?(e="Fatal server error from Ajax request",c.console&&console.error&&console.error(b.responseText)):e="Bad Ajax response";else{var u=d.errorData(b,a,k);u&&u.error&&(e=u.error)}"function"===typeof g&&!1===g(null,e,l,b)?p():u&&u.data&&!r(u.data)||(alert(e||"Unknown Ajax error"),
|
20 |
+
p())}}}a.error=t;a.success=function(b,a,k){if(!b||"object"!==typeof b)return t(k,"unknown");b.status&&alert(b.statusText||"Unknown error");"function"===typeof g&&!1===g(b&&b.data?b.data:b,null,a,k)?p():b&&b.data?r(b.data):p()};-1!==a.url.indexOf(".json")&&(a.dataType="json");return e.ajax(a)};return d}({},s,w));q.register("$11",function(d,c,n){function f(b){b.stopPropagation();b.preventDefault();return!1}function a(a,c){b.autoSize();var l=b.init();q.require("$2","html.js").init(l);l.find("[data-script]").each(function(b,
|
21 |
+
a){a=e(a);for(var k=-1,l,d=a.attr("data-script").split(" ");++k<d.length;)l=d[k],p[l]?p[l](a,c||{}):alert("Unknown script "+l)});l.trigger("locoModalLoaded",[b,a||"",c||{}]);var d,m=l.find("form")[0],h;if(m)a:for(l=0;l<m.elements.length;l++)switch(d=m.elements[l],d.type){case "text":case "email":case "textarea":h=Number(d.getAttribute("tabindex"));if(isNaN(h)||100>h)continue a;e(d).focus();break a}}function g(b){var a=e(b.currentTarget),c;c=a.attr("data-modal");if("back"===c){if(c=r.pop())return t=
|
22 |
+
null,h.apply(this,c),f(b);c="close"}if("close"===c){m();var l=a.attr("href");if(l&&-1!==l.indexOf("#!"))return!0}else{var d="submit"===b.type,g=a.attr("title")||a.attr("data-title"),l=a.attr("href")||a.attr("action"),A=d?a.serialize():"",a=d?a.attr("method"):"get";c||(c=l.split("/").slice(1,4).join("-"));h(l,g,a,A,"modal "+c)}return f(b)}var b=q.require("$22","overlay.js"),l=q.require("$9","ga.js"),p={},r=[],t,h=d.load=function(k,c,m,h,g){var p=t;t=arguments;p&&(r.push(p),k+=-1===k.indexOf("?")?"?":
|
23 |
+
"&",k+="r="+encodeURIComponent(p[0]));b.open().title("Loading ..").disableClose().css("modal").html('<div class="overlay-placeholder"></div>');g&&b.width(null).css(g).autoSize();var p=q.require("$21","http.js"),A={type:m||"get",data:h||"",url:p.jsonLink(k)};p.ajax(A,function(d,m,A){var h=d&&d.html;if(!h)return d=e('<h3 class="error"></h3>').text(m||"Unknown error"),b.enableClose().title("Error "+A||"?").html("").append(d),!1;c=d.title||c||"Untitled";b.enableClose().title(c).html(h);a(k,d.js);l.page(k,
|
24 |
+
c);b.init().one("overlayClosed",function(){l.reset()});return!0});return d},m=d.close=function(){t=null;r=[];b.close();return d};d.initLink=function(b){b.click(g)};d.initForm=function(b){e(b).submit(g)};d.replace=function(k){var c=k&&k.html,l=k&&k.url,d=k&&k.title;l?(h(l,d),k=k&&k.css||l.split("/").slice(1,4).join("-"),b.width(null).css(" modal "+k).autoSize()):c&&(b.open().html(c),d&&b.enableClose().title(d),a("",k&&k.js))};d.find=function(a){return b.init().find(a)};d.script=function(b,a){if(a){if("function"!==
|
25 |
+
typeof a.run)throw Error(b+" macro has no run function");p[b]=a.run;return d}return p[b]};return d}({},s,w));q.register("$13",function(d,c,n){function f(b){b.stopPropagation();b.preventDefault();return!1}function a(b,a,c){if(c=c||b.getElement(a))c.unbind().mouseup(function(c){c.stopPropagation();b.selectIndex(a,!0);return!1}).mouseover(function(){e(this).addClass("over");b.hover=a;return!0}).mouseout(function(){e(this).removeClass("over");b.hover=-1;return!0}),c=null;return b}function g(b){if(b){var a=
|
26 |
+
this,c=b[0];a.id=c.id||"";a.name=c.name||"";a.prefix=c.getAttribute("data-prefix");a.defaultIcon=c.getAttribute("data-icon")||"jshide";var d=c.selectedIndex,g=[],h,m,k;for(m=0;m<c.options.length;m++)h=c.options[m],k=h.disabled,h=e(h),g.push([h.val(),h.text(),h.attr("data-icon")||"",k]);a.hidden=e('<input type="hidden" name="'+a.name+'" value="" />').appendTo(c.form);a.list=e('<ul class="clearfix"></ul>');a.icon=e('<span class="icon"> </span>');a.selection=e('<span class="label"></span>');a.handle=
|
27 |
+
e('<a class="handle" href="#"></a>').attr("tabindex",b.attr("tabindex")||"").append(a.icon).append(a.selection);a.wrapper=e("<div></div>").addClass(c.className).addClass("selector").append(a.handle).append(a.list).replaceAll(c);this.id&&a.wrapper.attr("id",this.id);for(a.clearOptions();h=g.shift();)a.addOption.apply(a,h);a.handle.click(function(b){b.preventDefault();return!1}).mouseover(function(b){return a.onRollover(b)}).mouseout(function(b){return a.onRollout(b)}).mousedown(function(b){return a.onPress(b)}).keydown(function(b){return a.onKeydown(b)});
|
28 |
+
e(n.body).mouseup(function(b){return a.onRelease(b)}).keydown(function(b){return a.onGlobalKeydown(b)});a.close();a.selectIndex(d)}}d.create=function(b){return new g(b)};d.extend=function(b){b.prototype=new g};c=g.prototype;c.onRollover=function(b){return this.over=!0};c.onRollout=function(b){this.over=!1;return!0};c.onPress=function(b){return this.active?this.over?(this.close(),b.stopPropagation(),b.preventDefault(),!1):!0:(this.open(),b.stopPropagation(),b.preventDefault(),this.handle.focus(),!1)};
|
29 |
+
c.onRelease=function(b){this.active&&!this.over&&this.close();return!0};c.onGlobalKeydown=function(b){if(this.active)switch(b.keyCode){case 27:return this.close(),f(b);case 40:return this.hoverNext(1),f(b);case 38:return this.hoverNext(-1),f(b);case 13:if(-1!=this.hover)return this.selectIndex(this.hover,!0),this.hoverItem(-1),this.close(),f(b)}return!0};c.onKeydown=function(b){return this.active||40!==b.keyCode?!0:(this.open(),f(b))};c.open=function(){this.active=!0;this.hover=-1;this.wrapper.addClass("active");
|
30 |
+
var b=this.handle.outerHeight()||0;this.list.show().css("top",b+"px");var b=this.handle.outerWidth()||0,a=this.list.outerWidth()||0;b>a&&(a-=this.list.width(),this.list.css("min-width",String(b-a)+"px"))};c.close=function(){this.list.hide();this.active=!1;-1!==this.hover&&(this.getElement(this.hover).removeClass("over"),this.hover=-1);this.wrapper.removeClass("active")};c.hoverItem=function(b,a){-1!==this.hover&&this.getElement(this.hover).removeClass("over");this.hover=b;-1!==b&&(a=a||this.getElement(b),
|
31 |
+
a.addClass("over"))};c.hoverNext=function(b){var a=this.options.length;if(a){a-=1;if(-1==this.hover)b=0<b?0:a;else{b=this.hover+b;if(0>b){this.close();return}b>a&&(b=0)}this.hoverItem(b)}};c.enableChange=function(b){this.eventName=b;this.eventData=[].slice.call(arguments,1);return this};c.clearOptions=function(){this.index={};this.length=0;this.options=[];this.list.html("");this.hidden.val("");this.idx=this.hover=-1;return this};c.addOption=function(b,c,d,g){var f=this.options.length,h=e("<span></span>").addClass(d||
|
32 |
+
"jshide"),m=e('<span class="label"></span>').text(c||b),h=e("<li></li>").append(h).append(m).appendTo(this.list);h.attr("data-option",f);this.options[f]={value:b,text:c,icon:d};this.index[b]=f;this.length=f+1;g?this.disableIndex(f):a(this,f,h);return f};c.disableOption=function(b){return this.disableIndex(this.index[b])};c.disableIndex=function(b){(b=this.getElement(b))&&b.addClass("disabled").unbind();return this};c.enableOption=function(b){return this.enableIndex(this.index[b])};c.enableIndex=function(b){return a(this,
|
33 |
+
b)};c.reIndex=function(){this.index={};this.length=0;for(var b=this.options.length;-1<--b;)this.index[this.options[b].value]=b,this.length++};c.selectValue=function(b,a){return this.selectIndex(this.index[b],a)};c.selectIndex=function(b,a){var c=this.options[b];c&&(this.hidden.val(c.value),b!==this.idx&&(this.idx=b,this.setLabel(c.text),this.icon.attr("class",c.icon||this.defaultIcon),a&&this.change()),this.active&&this.close());return this};c.setLabel=function(b){this.selection.text(b);this.prefix&&
|
34 |
+
this.selection.prepend(e('<span class="prefix"></span>').text(this.prefix))};c.val=function(){var b=this.options[this.idx];return b&&b.value};c.change=function(){var b=this.eventName||"change",a=this.eventData&&this.eventData.slice()||[];a.unshift(this.val());this.wrapper.trigger(b,a);return this};c.renameOption=function(b,a){var c=this.index[b],d=this.options[c];d&&(d.text=a,this.getElement(c).find("span.label").text(a),c===this.idx&&this.setLabel(a));return this};c.removeOption=function(b){var a=
|
35 |
+
this.index[b],c=this.options[a];c&&(b=this.val(),this.getElement(a).remove(),this.options.splice(a,1),this.reIndex(),b===c.value?this.selectIndex(0,!0):this.selectValue(b,!1))};c.getElement=function(b){return this.list.find("li").eq(b)};c=null;return d}({},s,w));q.register("$14",function(d,c,n){function f(b,a){this.$element=e(b);this.options=a;this.enabled=!0;this.fixTitle()}d.init=function(b){var c=b.attr("data-gravity")||"s";b.tipsy[c]&&(c=b.tipsy[c]);b.tipsy({fade:!0,gravity:c,offset:5,delayIn:a,
|
36 |
+
delayOut:g,anchor:b.attr("data-anchor")})};d.delays=function(b,c){a=b||150;g=c||100};d.kill=function(){e("div.tipsy").remove()};d.text=function(b,a){a.data("tipsy").setTitle(b)};var a,g;d.delays();e(n.body).bind("overlayOpened overlayClosing",function(b){d.kill();return!0});f.prototype={show:function(){var b=this.getTitle();if(b&&this.enabled){var a=this.tip();a.find(".tipsy-inner")[this.options.html?"html":"text"](b);a[0].className="tipsy";a.remove().css({top:0,left:0}).prependTo(n.body);var b=(b=
|
37 |
+
this.options.anchor)?this.$element.find(b):this.$element,b=e.extend({},b.offset(),{width:b[0].offsetWidth,height:b[0].offsetHeight}),c=a[0].offsetWidth,d=a[0].offsetHeight,g="function"==typeof this.options.gravity?this.options.gravity.call(this.$element[0]):this.options.gravity,h;switch(g.charAt(0)){case "n":h={top:b.top+b.height+this.options.offset,left:b.left+b.width/2-c/2};break;case "s":h={top:b.top-d-this.options.offset,left:b.left+b.width/2-c/2};break;case "e":h={top:b.top+b.height/2-d/2,left:b.left-
|
38 |
+
c-this.options.offset};break;case "w":h={top:b.top+b.height/2-d/2,left:b.left+b.width+this.options.offset}}2==g.length&&("w"==g.charAt(1)?h.left=b.left+b.width/2-15:h.left=b.left+b.width/2-c+15);a.css(h).addClass("tipsy-"+g);a.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+g.charAt(0);this.options.className&&a.addClass("function"==typeof this.options.className?this.options.className.call(this.$element[0]):this.options.className);a.addClass("in")}},hide:function(){this.tip().remove()},
|
39 |
+
fixTitle:function(){var b=this.$element;(b.attr("title")||"string"!=typeof b.attr("original-title"))&&b.attr("original-title",b.attr("title")||"").removeAttr("title")},getTitle:function(){var b,a=this.$element,c=this.options;this.fixTitle();c=this.options;"string"==typeof c.title?b=a.attr("title"==c.title?"original-title":c.title):"function"==typeof c.title&&(b=c.title.call(a[0]));return(b=(""+b).replace(/(^\s*|\s*$)/,""))||c.fallback},setTitle:function(b){var a=this.$element;a.attr("default-title")||
|
40 |
+
a.attr("default-title",this.getTitle());null==b&&(b=a.attr("default-title")||this.getTitle());a.attr("original-title",b);if(this.$tip)this.$tip.find(".tipsy-inner")[this.options.html?"html":"text"](b)},tip:function(){this.$tip||(this.$tip=e('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>'),this.$tip.data("tipsy-pointee",this.$element[0]));return this.$tip},validate:function(){this.$element[0].parentNode||(this.hide(),this.options=this.$element=null)},
|
41 |
+
enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled}};e.fn.tipsy=function(b){function a(c){var k=e.data(c,"tipsy");k||(k=new f(c,e.fn.tipsy.elementOptions(c,b)),e.data(c,"tipsy",k));return k}function c(){var d=a(this);d.hoverState="in";0==b.delayIn?d.show():(d.fixTitle(),setTimeout(function(){"in"==d.hoverState&&d.show()},b.delayIn))}function d(){var c=a(this);c.hoverState="out";0==b.delayOut?c.hide():(c.tip().removeClass("in"),
|
42 |
+
setTimeout(function(){"out"==c.hoverState&&c.hide()},b.delayOut))}if(!0===b)return this.data("tipsy");if("string"==typeof b){var g=this.data("tipsy");if(g)g[b]();return this}b=e.extend({},e.fn.tipsy.defaults,b);b.live||this.each(function(){a(this)});if("manual"!=b.trigger){var g=b.live?"live":"bind",h="hover"==b.trigger?"mouseleave":"blur";this[g]("hover"==b.trigger?"mouseenter":"focus",c)[g](h,d)}return this};e.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:!1,fallback:"",gravity:"n",
|
43 |
+
html:!1,live:!1,offset:0,opacity:0.8,title:"title",trigger:"hover",anchor:null};e.fn.tipsy.revalidate=function(){e(".tipsy").each(function(){var b=e.data(this,"tipsy-pointee"),a;if(!(a=!b)){a:{for(;b=b.parentNode;)if(b==n){b=!0;break a}b=!1}a=!b}a&&e(this).remove()})};e.fn.tipsy.elementOptions=function(b,a){return e.metadata?e.extend({},a,e(b).metadata()):a};e.fn.tipsy.autoNS=function(){return e(this).offset().top>e(n).scrollTop()+e(c).height()/2?"s":"n"};e.fn.tipsy.autoWE=function(){return e(this).offset().left>
|
44 |
+
e(n).scrollLeft()+e(c).width()/2?"e":"w"};e.fn.tipsy.autoBounds=function(b,a){return function(){var d=a[0],g=1<a.length?a[1]:!1,f=e(n).scrollTop()+b,h=e(n).scrollLeft()+b,m=e(this);m.offset().top<f&&(d="n");m.offset().left<h&&(g="w");e(c).width()+e(n).scrollLeft()-m.offset().left<b&&(g="e");e(c).height()+e(n).scrollTop()-m.offset().top<b&&(d="s");return d+(g?g:"")}};return d}({},s,w));q.register("$2",function(d,c,n){var f=c.ieVersion;d.ie=function(b){return b?f<=b:f};var a=d.init=function(b){b?b instanceof
|
45 |
+
jQuery||(b=e(b)):b=e(n.body);var c=q.require("$9","ga.js"),g=q.require("$10","forms.js"),r=q.require("$11","LocoModal.js"),t=q.require("$12","LocoAutoComplete.js"),h=q.require("$13","LocoSelector.js"),m=q.require("$14","tooltip.js");b.find("form").each(function(b,a){var c=e(a);f&&10>f&&g.placeholders(c);a.getAttribute("data-modal")?r.initForm(a):a.action&&0!==a.action.indexOf("#")&&!a.target&&g.jsonify(a);c.hasClass("hasreveal")&&g.revealify(c);c.find("input.button").each(function(b,a){g.linkify(a)});
|
46 |
+
c.find("input.auto-comp").each(function(b,a){t.init(a)});c.find("select.selector").each(function(b,a){h.create(e(a))})});b.find("a").each(function(b,g){-1!==g.className.indexOf("hastip")&&m.init(e(g));if(-1!==g.href.indexOf("/modal/")||g.getAttribute("data-modal"))r.initLink(e(g));else{c.link(g);var h=g.getAttribute("data-ajax-target");h&&(h=e("#"+h),e(g).click(function(b){b.preventDefault();h.addClass("loading");e.get(g.href,function(b){b=d.$(b).replaceAll(h);a(b);b.trigger("locoAhah")});return!1}))}});
|
47 |
+
g=r=t=b=null;return d};d.$=function(b){return e(c.innerShiv?innerShiv(b,!1):b)};e.fn._html=function(b){return null!=b?(b=this.html(c.innerShiv?innerShiv(b,!1):b),a(this),b):j.html()};e.fn.macro=function(b,a){if("function"!==typeof b.run)throw Error("macro has no run function");b.run(this,a||{});return this};d.el=function(b,a){var c=n.createElement(b||"div");a&&(c.className=a);return c};d.txt=function(b){return n.createTextNode(b||"")};var g=d.plain=function(b,a){if("BR"===b.tagName)a.push("");else for(var c=
|
48 |
+
-1,d=b.childNodes.length,e;++c<d;)e=b.childNodes[c],3===e.nodeType?a.push(e.nodeValue):1===e.nodeType?g(e,a):a.push("??")};return d}({},s,w));q.register("$6",function(d,c,n){var f="blur "+q.require("$2","html.js").ie()?"keyup paste":"input";d.listen=function(a,c){function b(){k[h?"show":"hide"]()}function d(c){h=c;m&&a.setAttribute("size",h.length||1);b()}function p(){a.value!==h&&(r&&clearTimeout(r),d(a.value),t?r=setTimeout(function(){c(h)},t):(r=null,c(h)))}a=a instanceof jQuery?a[0]:a;var r,t=
|
49 |
+
150,h=a.value,m=1===Number(a.size),k=e('<a href="#clear" tabindex="-1" class="icon clear"><span>clear</span></a>').click(function(b){a.value="";p();return!1});e(a).bind(f,function(){p();return!0}).after(k);b();return{delay:function(b){t=b},ping:function(b){b?(r&&clearTimeout(r),d(a.value),c(h),b=void 0):b=p();return b},val:function(c){if(null==c)return h;r&&clearTimeout(r);a.value=h=c;b()}}};return d}({},s,w));q.register("$4",function(d,c,e){function f(){var a,c;this.clear=function(){this.length=
|
50 |
+
0;a={};c=[]};this.getTree=function(){return a};this.getData=function(){return c};this.clear()}d.create=function(){return new f};c=f.prototype;c.depth=0;c.matchall=!0;c.ignorecase=!0;c.boundary=/[\s.?!;:,*^+=~`"(){}<>[\]\/\\\u00a0\u1680\u180e\u2000-\u206f\u2e00-\u2e7f\u3000-\u303f]+/;c.nonword=/[\-'_]+/g;c.translit=function(a,c){function b(b){return a[b]||b}c=c||/[^a-z0-9]/g;this.trans=function(a){return a.replace(c,b)}};c.stoppers=function(a){this.stopped=function(c){return Boolean(a[c])}};c.add=
|
51 |
+
function(a,c){var b=this.getData(),d=b.length;b.push(a);this.length++;for(b=0;++b<arguments.length;){c=arguments[b];null==c&&(c=String(a));for(var e=-1,f,t,h,m,k,y=this.normalize(c);++e<y.length;)if(f=y[e],!this.stopped(f)){t=this.getTree();h=Math.min(f.length,this.depth)||f.length;for(m=0;m<h;m++)k=f.charAt(m),t=t[k]||(t[k]={});f=t[" "]||(t[" "]=[]);f.push(d)}}return this};c.find=function(a,c){function b(a,c){var d,g,h;for(m in a)if(h=a[m]," "===m)for(d in h)k=h[d],g=y[k]||(y[k]={length:0,words:{}}),
|
52 |
+
g.length+=g.words[c]?0:1,g.words[c]=1+(g.words[c]||0);else b(h,c)}var d=-1,e,f,t,h,m,k,y={},v=[],u=this.normalize(a),E=this.getData();a:for(;++d<u.length;){e=u[d];f=this.getTree();t=Math.min(e.length,this.depth)||e.length;for(h=0;h<t;h++){m=e.charAt(h);if(!f[m])continue a;f=f[m]}b(f,e)}for(k in y)this.matchall&&y[k].length<u.length||v.push(E[k]);c&&(c.query=a,c.words=u);return v};c.normalize=function(a){for(var c=-1,b={},d=[],e=this.split(a);++c<e.length;)if(a=e[c])if(this.ignorecase&&(a=a.toLowerCase()),
|
53 |
+
a=this.strip(a))this.trans&&(a=this.trans(a)),b[a]||(d.push(a),b[a]=!0);return d};c.stopped=function(a){return 1===a.length};c.split=function(a){return a&&a.split(this.boundary)||[]};c.strip=function(a){return a&&a.replace(this.nonword,"")||""};c=null;return d}({},s,w));q.register("$12",function(d,c,n){function f(a){-1===a.indexOf("?")&&(a="/auto/"+a+".json?q=");this.url=a;this.dead={}}function a(){this.dict=q.require("$4","dict.js").create()}d.init=function(c){function b(){if("hint"!==N){var b=B.val()&&
|
54 |
+
!(O&&O.val())&&null==z&&!E;s[b?"addClass":"removeClass"]("error")}}function d(b){O&&O.val(b)}function p(){K.show();var b=B.outerWidth(!1),a=B.outerHeight(!1),c=B.css("margin-top");c&&(c=parseInt(c),isNaN(c)||(a+=c));b-=2;K.css("top",a+"px").css("width",b+"px");E=!0}function r(){K.hide();E=!1}function t(){K.html("");r();u=0;G=z=null}function h(a){t();var c;for(c=0;c<a.length;c++){var d=c,h=a[c],g=e('<span class="label"></span>').text(h.label),A=e('<div class="auto-comp-result"></div>'),z=void 0;for(z in h)A.data(z,
|
55 |
+
h[z]);h.icon&&A.append(e("<span></span>").attr("class",h.icon));A.append(g);m(d,A)}(u=a.length)?(n&&p(),k(0)):(k(null),b())}function m(b,a){K.append(a);a.click(function(c){c.stopPropagation();k(b,a);v();return!1});return a}function k(b,a){G&&(G.removeClass("selected"),G=null);z=null;null==b?d(""):(a||(a=K.find("div.auto-comp-result").eq(b)),a.length&&(a.addClass("selected"),z=b,G=a))}function y(b){if(u){var a=u-1;null==z?b=0<b?0:a:(b=z+b,0>b?b=a:b>a&&(b=0));return k(b)}}function v(){if(null==z)w.val(""),
|
56 |
+
d("");else{var a=K.find("div.auto-comp-result").eq(z),c=a.data()||{label:"Error"},h=c.value,g=c.label;d(h);w.val(g);r();a=a.clone();a.data(c);t();m(0,a);u=1;k(0,a);b();a.trigger("locoAutocomp",[h,g,a])}}var u=0,E=!1,n=!1,A=c.form,z=null,G=null,B=e(c),Q=B.attr("name"),N=B.attr("data-mode"),I=B.attr("data-provider"),O="hint"!==N&&e('<input type="hidden" value="" name="'+Q+'" />').appendTo(A),s=e('<div class="auto-comp-wrap"></div>').replaceAll(B),K=e('<div class="auto-comp-drop"></div>');I&&(I=new f(I));
|
57 |
+
O&&B.attr("name","_"+Q);B.attr("autocomplete","off");s.append(B).append(K);r();B.focus(function(b){n=!0;1<u&&p()}).blur(function(a){n=!1;b()}).keydown(function(b){function a(){b.preventDefault();b.stopPropagation();return!1}switch(b.keyCode){case 27:E&&(b.stopPropagation(),r(),B.blur());break;case 40:u&&(E?y(1):p());break;case 38:E&&y(-1);break;case 13:if(E)return v(),a();if(!z&&"hint"!==N)return a()}return!0});var w=q.require("$6","LocoTextListener.js").listen(B,function(b){I&&I.fetch(b,h)});(A=
|
58 |
+
B.attr("data-pre"))&&(A=e.parseJSON(A))&&A.value&&A.label?(h([A]),v()):!c.value||O&&O.val()||!I||I.fetch(c.value,function(b){h(b);v()});return{$:B,clear:t,reset:function(){t();B.val("");d("");w.ping()},force:function(b,a){t();d(a||"");w.val(b)},preload:function(b){u&&t();I=new a;var c,k;for(c in b)k=b[c],I.add(k)},mode:function(b){N=b}}};f.prototype.fetch=function(a,b){if(!a)return b&&b([]),this;var c,d=this.dead;for(c in d)if(0===a.indexOf(c))return b&&b([]),this;c={dataType:"json",url:this.url+
|
59 |
+
encodeURIComponent(a)};q.require("$21","http.js").ajax(c,function(c){var e=c&&c.results;e&&(b&&c.query&&c.query===a&&b(c.results),e.length||(d[a]=0));return!0});return this};a.prototype.add=function(a){var b=a.fulltext||a.label||a.value;b&&this.dict.add(a,b)};a.prototype.fetch=function(a,b){if(!a)return b&&b([]),this;var c=this.dict.find(a);b(c)};return d}({},s,w));q.register("$10",function(d,c,n){function f(b){function a(){b.value===g&&(b.value="",d.removeClass("placeheld"));return!0}function c(){""===
|
60 |
+
b.value&&(b.value=g,d.addClass("placeheld"));return!0}var d=e(b);if(!d.hasClass("auto-comp")){var g=d.attr("placeholder");if(g)return d.focus(a).blur(c),c(),{kill:function(){a();d.unbind("focus",a).unbind("blur",c)}}}}var a=d.enable=function(b){function a(b,c){c.getAttribute("data-was-disabled")||(c.disabled=!1)}b.find(".button").removeClass("loading");b.find("input").each(a);b.find("select").each(a);b.find("textarea").each(a);c.attachEvent&&b.hasClass("has-placeholders")&&d.placeholders(b);delete b._disabled},
|
61 |
+
g=d.disable=function(b){function a(b,c){c.disabled?c.setAttribute("data-was-disabled","true"):c.disabled=!0}b._disabled||(b.find(".button").addClass("loading"),b.find("input").each(a),b.find("select").each(a),b.find("textarea").each(a),b._disabled=!0)};d.jsonify=function(b,d,f){b instanceof jQuery||(b=e(b));b.disable||(e.fn.disable=function(){g(this);return this},e.fn.enable=function(){a(this);this.placehold&&this.placehold();return this});var r="";b.find('[type="submit"]').click(function(b){b&&b.target&&
|
62 |
+
b.target.name&&(r=encodeURIComponent(b.target.name)+"="+encodeURIComponent(b.target.value));return!0});b.submit(function(a){if(a&&a.isDefaultPrevented&&a.isDefaultPrevented()||f&&!1===f(a))return!1;var k=c.tinyMCE;k&&b.find("textarea.editor").each(function(b,a){var c=k.get(a.id);c&&c.save()});var h=b.serialize();r&&(h&&(h+="&"),h+=r,r="");b.disable();var e=q.require("$21","http.js"),h={url:e.jsonLink(b.attr("action")),type:b.attr("method"),data:h};e.ajax(h,d,function(){b.enable()},b);a.preventDefault();
|
63 |
+
a.stopPropagation();return!1});if(b.hasClass("autopost")){var t,h=Number(b.attr("data-autopost-delay")||500);b.find('input[type="checkbox"]').change(function(){t&&clearTimeout(t);t=setTimeout(function(){b.submit()},h);return!0})}};d.revealify=function(b){b.find("div[data-reveal-if]").each(function(a,c){function d(b){var a;u=u||b.target;if("."===f)a=Boolean(u&&u[v]);else if("="===f){var c,h;a=e(u.form).serializeArray();for(h in a)a[h].name===k&&(c=a[h].value);a=v===c}if(a!==m)if(m=a,b)g[m?"slideDown":
|
64 |
+
"slideUp"](200);else g[m?"show":"hide"]();return!0}var g=e(c),h=/^([_\w\-\[\]]+)(\.|=)(.+)$/.exec(g.attr("data-reveal-if"));if(h){var m,k=h[1],f=h[2],v=h[3],h=b[0][k];h.length||(h=[h]);var u;for(a=0;a<h.length;a++)u=h[a],d(),e(u).change(d).removeClass("jshide");h=h=u=null}});b=null};d.linkify=function(b){var a=b.getAttribute("data-icon");if(a){var c=e(b),d=e("<a> </a>");d.attr("href",b.form.action);d.attr("class",c.attr("class"));d.attr("tabindex",c.attr("tabindex"));c.attr("tabindex","-1");d.text(c.val());
|
65 |
+
a&&e("<span></span>").prependTo(d).addClass(a);c.hide().after(d);d.click(function(b){c.click();return!1})}};d.placeholders=function(b){var a,c=[];b.find("input[placeholder]").each(function(b,d){"password"!==d.type&&(a=f(d))&&c.push(a)});c.length&&(b.submit(function(){for(var a in c)c[a].kill()}),b.addClass("has-placeholders"),a=i=null)};return d}({},s,w));q.register("$15",function(d,c,e){function f(a){this.reIndex([]);if(a)for(var c in a)this.add(c,a[c])}d.init=function(a){return new f(a)};c=f.prototype;
|
66 |
+
c.reIndex=function(a){var c=-1;for(this.ords={};++c<a.length;)this.ords[a[c]]=c;this.keys=a;this.length=c};c.key=function(a,c){if(null==c)return this.keys[a];var b=this.keys[a],d=this.ords[c];if(c!==b){if(null!=d)throw Error("Clash with item at ["+d+"]");this.keys[a]=c;delete this.ords[b];this.ords[c]=a}return a};c.indexOf=function(a){a=this.ords[a];return null==a?-1:a};c.add=function(a,c){var b=this.ords[a];null==b&&(this.keys[this.length]=a,b=this.ords[a]=this.length++);this[b]=c;return b};c.get=
|
67 |
+
function(a){return this[this.ords[a]]};c.cut=function(a,c){var b=[].splice.call(this,a,c);this.keys.splice(a,c);this.reIndex(this.keys);return b};c.each=function(a){for(var c=-1;++c<this.length;)a(this.keys[c],this[c],c);return this};c=null;return d}({},s,w));q.register("$23",function(d,c,e){function f(){c.console&&console.error&&console.error("Abstract method not implemented")}function a(a){this._class=a}a.prototype._validate=function(a){var b,d=!0;for(b in this)this[b]===f&&(c.console&&console.error&&
|
68 |
+
console.error((a||"Object")+"."+b+"() not implemented"),d=!1);return d};d.init=function(c){var b=-1,d,e=new a;if(c)for(;d=c[++b];)e[d]=f;return e};d.validate=function(a){var b=/function (\w+)\(/.exec(a.toString())?RegExp.$1:"";a.prototype._validate(b)};return d}({},s,w));q.register("$16",function(d,c,e){function f(){}d.extend=function(a){return a.prototype=new f};c=f.prototype=q.require("$23","abstract.js").init(["add","load"]);c.row=function(a){return this.rows[a]};c.lock=function(a){this.locale(a||
|
69 |
+
{lang:"zz",region:"ZZ",label:"Unknown",nplurals:1,pluraleq:"n!=1"});return this.loc};c.unlock=function(){var a=this.loc;this.loc=null;return a};c.locale=function(a){if(null==a)return this.loc;if(this.loc=a)this.loc.toString=function(){return this.lang+"_"+this.region};return this};c.each=function(a){this.rows.each(a);return this};c.indexOf=function(a){"object"!==typeof a&&(a=this.get(a));if(!a)return-1;null==a.idx&&(a.idx=this.rows.indexOf(a.hash()));return a.idx};c.get=function(a){return this.rows&&
|
70 |
+
this.rows.get(a)};c.del=function(a){a=this.indexOf(a);if(-1!==a){var c=this.rows.cut(a,1);if(c&&c.length)return this.length=this.rows.length,this.rows.each(function(a,c,d){c.idx=d}),a}};c.reIndex=function(a,c){var b=this.indexOf(a),d=a.hash(),e=this.rows.indexOf(d);return e===b?b:-1!==e?(c=(c||0)+1,a.source("Error, duplicate "+String(c)+": "+a.source()),this.reIndex(a,c)):this.rows.key(b,d)};c=null;return d}({},s,w));q.register("$17",function(d,c,e){function f(){this.id=this._id=this.ref=this.cmt=
|
71 |
+
this.xcmt="";this.flg=0}d.extend=function(a){return a.prototype=new f};c=f.prototype;c.flag=function(a,c){var b=a===(a&this.flg);if(null==c)return b;c?this.flg|=a:b&&(this.flg^=a);return this};c.flagged=function(){return!!this.flg};c.fuzzy=function(a){return this.flag(4,a)};c.source=function(a,c){if(null==a)return this.src[c||0]||"";this.src[c||0]=a;return this};c.plural=function(a,c){if(null==a)return this.src[c||1]||"";this.src[c||1]=a||"";return this};c.each=function(a){for(var c=-1;++c<this.src.length;)a(c,
|
72 |
+
this.src[c],this.msg[c]);return this};c.translate=function(a,c){this.msg[c||0]=a||"";return this};c.untranslate=function(a){null!=a&&(this.msg[a]="");for(a=0;a<this.msg.length;a++)this.msg[a]="";return this};c.translation=function(a){return this.msg[a||0]||""};c.translated=function(a){if(arguments.length)return!!this.translation(a);for(a=0;a<this.msg.length;a++)if(!this.msg[a])return!1;return!0};c.comment=function(a){if(null==a)return this.cmt;this.cmt=a||"";return this};c.notes=function(a){if(null==
|
73 |
+
a)return this.xcmt;this.xcmt=a||"";return this};c.refs=function(a){if(null==a)return this.ref;this.ref=a||"";return this};c.format=function(a){if(null==a)return this.fmt;this.fmt=a;return this};c.context=function(a){if(null==a)return this.src[2]||"";this.src[2]=a||"";return this};c.toString=c.toText=function(){var a=this.src.concat(this.msg);this.id&&a.unshift(this.id);return a.join(" ")};c.weight=function(){var a=0;this.translation()||(a+=2);this.fuzzy()&&(a+=1);return a};c.equals=function(a){return this===
|
74 |
+
a||this.hash()===a.hash()};c.hash=function(){return this.id};c.normalize=function(){for(var a=-1;++a<this.msg.length;)this.msg[a]=this.src[a]||""};c.disabled=function(a){return!!(this.lck||[])[a||0]};c.disable=function(a){(this.lck||(this.lck=[]))[a||0]=!0;return this};c=null;return d}({},s,w));q.register("$3",function(d,c,e){function f(a){return{"Project-Id-Version":"PACKAGE VERSION","Report-Msgid-Bugs-To":"","POT-Creation-Date":a||"","POT-Revision-Date":a||"","PO-Revision-Date":a||"","Last-Translator":"",
|
75 |
+
"Language-Team":"",Language:"","Plural-Forms":"","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-Poedit-SourceCharset":"UTF-8"}}function a(a,b){var c=a||"";b&&(c+="\x00"+b);return c}function g(){return q.require("$15","collection.js").init()}function b(a){return a.replace(/(["\\])/g,"\\$1").replace(/\n/g,"\\n")}function l(a){this.head={};this.headers(f(this.now()));this.locale(a);this.length=0;this.rows=g()}function p(a,b){this.src=[a||""];this.msg=
|
76 |
+
[b||""]}d.create=function(a){return new l(a)};var r=d.quote=function(a){if(!a)return'""';for(var c=a.split(/(?:\r\n|\n|\r)/g),d=c.length-1,e=[],g=-1,f;++g<c.length;){a=c[g];for(d&&d!==g&&(a+="\n");a&&a.charAt(77);){for(f=77;--f;)if(-1!==" \n\r.?!,;:-".indexOf(a.charAt(f))){f++;break}f||(f=77);e.push(b(a.substr(0,f)));a=a.substr(f)}a&&e.push(b(a))}e[1]&&e.unshift("");return'"'+e.join('"\n"')+'"'},t=d.wrap=function(a,b,c){if(0!==c){null==c&&(c=79);for(var d=c+1,e=a.split(/(?:\r\n|\n|\r)/g),f=[],g=-1,
|
77 |
+
l;++g<e.length;){for(a=e[g];a&&a.charAt(d);){for(l=c;--l;)if(-1!==" \n\r.?!,;:-".indexOf(a.charAt(l))){l++;break}l||(l=d);f.push(a.substr(0,l));a=a.substr(l)}a&&f.push(a)}a=f}else a=a.split(/(?:\r\n|\n|\r)/g);return b+a.join("\n"+b)};c=q.require("$16","messages.js").extend(l);c.now=function(){return(new Date).toString()};c.header=function(a,b){if(null==b)return this.headers()[a]||"";this.head[a]=b||"";return this};c.headers=function(a){var b;if(null!=a){for(b in a)this.head[b]=a[b];return this}var c=
|
78 |
+
this.locale(),d=this.now();a={};for(b in this.head)a[b]=String(this.head[b]);c?(a.Language=c.label||"Unknown locale",a["Plural-Forms"]="nplurals="+(c.nplurals||"2")+"; plural="+(c.pluraleq||"n!=1"),a["X-Loco-Target-Locale"]=(c.lang||"en")+"_"+(c.region||"GB"),a["PO-Revision-Date"]=d,delete a["POT-Revision-Date"]):(a.Language="",a["Plural-Forms"]="nplurals=INTEGER; plural=EXPRESSION",a["POT-Revision-Date"]=d,a["PO-Revision-Date"]="YEAR-MO-DA HO:MI+ZONE");a["X-Generator"]="Loco - https://localise.biz/";
|
79 |
+
return a};c.locale=function(a){if(null==a)return this.loc;this.loc=a||{lang:"en",region:"GB",plurals:["one","other"],pluraleg:[1,0],nplurals:2,pluraleq:"n!=1",label:"English"};this.loc.toString=function(){return this.lang+"_"+this.region};return this};c.get=function(b,c){var d=a(b,c);return this.rows.get(d)};c.add=function(a,b){a instanceof p||(a=new p(a));b&&a.context(b);var c=a.hash();if(this.rows.get(c))throw Error("Duplicate message at index "+this.indexOf(a));a.idx=this.rows.add(c,a);this.length=
|
80 |
+
this.rows.length;return a};c.load=function(a){for(var b=-1,c,d,e,f,g=[],l=[],A=[],z=[];++b<a.length;)if(c=a[b],null==c.parent){if(d=c.source||c.id,e=c.context,d||e)f=new p(d,c.target||""),f._id=c._id,e&&f.context(e),c.flag&&f.flag(c.flag,!0),c.comment&&f.comment(c.comment),c.notes&&f.notes(c.notes),c.refs&&f.refs(c.refs),null!==c.format&&f.format(c.format),c.message=f,f.translation()?f.fuzzy()?A.push(f):l.push(f):z.push(f)}else g.push(c);for(b=-1;++b<g.length;)try{c=g[b];d=c.source||c.id;f=a[c.parent]&&
|
81 |
+
a[c.parent].message;if(!f)throw Error("parent missing for plural "+d);1===c.plural&&f.plural(d);f.translate(c.target||"",c.plural)}catch(G){}d=[z,A,l];for(b=0;3>b;b++)for(c=d[b],a=-1;++a<c.length;)try{this.add(c[a])}catch(B){}return this};c.merge=function(a){var b,c=this.rows,d=g(),e={add:[],del:[]};a=a.rows;this.rows.each(function(b,c){a.get(b)||e.del.push(c)});a.each(function(a,f){try{(b=c.get(a))?(b.ref=f.ref,b.fmt=f.fmt):(b=f,e.add.push(b)),b.idx=d.add(a,b)}catch(g){}});this.rows=d;this.length=
|
82 |
+
d.length;return e};c.toString=function(){var a,b=[],c=[],d=this.headers(),e=!this.loc;for(a in d)c.push(a+": "+d[a]);c=new p("",c.join("\n"));e&&(c.comment("Loco Gettext template"),c.fuzzy(!0));b.push(c.toString());b.push("");this.rows.each(function(a,c){a&&(b.push(c.toString(e)),b.push(""))});return b.join("\n")};c=q.require("$17","message.js").extend(p);c.hash=function(){return a(this.source(),this.context())};c.source=function(a,b){if(null==a)return this.src[0];this.src[0]=a;null!=b&&this.plural(b);
|
83 |
+
return this};c.toString=function(a){var b,c=[];this.cmt&&c.push(t(this.cmt,"# ",0));this.xcmt&&c.push(t(this.xcmt,"#. ",0));b=this.ref;this._id&&(b+=(b?" ":"")+"loco:"+this._id);b&&/\S/.test(b)&&c.push(t(b,"#: ",79));!a&&this.fuzzy()&&c.push("#, fuzzy");this.fmt?c.push("#, "+this.fmt+"-format"):null!=this.fmt&&c.push("#, no-c-format");this.src[2]&&c.push("msgctxt "+r(this.src[2]));c.push("msgid "+r(this.src[0]));if(null==this.src[1])c.push("msgstr "+r(a?"":this.msg[0]));else for(b=-1,c.push("msgid_plural "+
|
84 |
+
r(this.src[1]));++b<this.msg.length;)c.push("msgstr["+b+"] "+r(a?"":this.msg[b]));return c.join("\n")};c.compare=function(a,b){var c=this.weight(),d=a.weight();if(c>d)return 1;if(c<d)return-1;if(b){c=this.hash().toLowerCase();d=a.hash().toLowerCase();if(c<d)return 1;if(c>d)return-1}return 0};c=c=null;return d}({},s,w));q.register("$5",{"\u00e1":"a","\u00e0":"a","\u0103":"a","\u1eaf":"a","\u1eb1":"a","\u1eb5":"a","\u1eb3":"a","\u00e2":"a","\u1ea5":"a","\u1ea7":"a","\u1eab":"a","\u1ea9":"a","\u01ce":"a",
|
85 |
+
"\u00e5":"a","\u01fb":"a","\u00e4":"a","\u01df":"a","\u00e3":"a","\u0227":"a","\u01e1":"a","\u0105":"a","\u0101":"a","\u1ea3":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1eb7":"a","\u1ead":"a","\u1e01":"a","\u01fd":"\u00e6","\u01e3":"\u00e6","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0107":"c","\u0109":"c","\u010d":"c","\u010b":"c","\u00e7":"c","\u1e09":"c","\u010f":"d","\u1e0b":"d","\u1e11":"d","\u0111":"d","\u1e0d":"d","\u1e13":"d","\u1e0f":"d","\u00f0":"d","\ua77a":"d","\u01c6":"\u01f3","\u00e9":"e",
|
86 |
+
"\u00e8":"e","\u0115":"e","\u00ea":"e","\u1ebf":"e","\u1ec1":"e","\u1ec5":"e","\u1ec3":"e","\u011b":"e","\u00eb":"e","\u1ebd":"e","\u0117":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u0113":"e","\u1e17":"e","\u1e15":"e","\u1ebb":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u1e19":"e","\u1e1b":"e","\u1e1f":"f","\ua77c":"f","\u01f5":"g","\u011f":"g","\u011d":"g","\u01e7":"g","\u0121":"g","\u0123":"g","\u1e21":"g","\ua7a1":"g","\u1d79":"g","\u0125":"h","\u021f":"h","\u1e27":"h","\u1e23":"h",
|
87 |
+
"\u1e29":"h","\u0127":"h","\u210f":"h","\u1e25":"h","\u1e2b":"h","\u1e96":"h","\u00ed":"i","\u00ec":"i","\u012d":"i","\u00ee":"i","\u01d0":"i","\u00ef":"i","\u1e2f":"i","\u0129":"i","\u012f":"i","\u012b":"i","\u1ec9":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u1e2d":"i","\u0135":"j","\u01f0":"j","\u1e31":"k","\u01e9":"k","\u0137":"k","\ua7a3":"k","\u1e33":"k","\u1e35":"k","\u013a":"l","\u013e":"l","\u013c":"l","\u0142":"l","\u1e37":"l","\u1e39":"l","\u1e3d":"l","\u1e3b":"l","\u0140":"l","\u1e3f":"m",
|
88 |
+
"\u1e41":"m","\u1e43":"m","\u0144":"n","\u01f9":"n","\u0148":"n","\u00f1":"n","\u1e45":"n","\u0146":"n","\ua7a5":"n","\u1e47":"n","\u1e4b":"n","\u1e49":"n","\u00f3":"o","\u00f2":"o","\u014f":"o","\u00f4":"o","\u1ed1":"o","\u1ed3":"o","\u1ed7":"o","\u1ed5":"o","\u01d2":"o","\u00f6":"o","\u022b":"o","\u0151":"o","\u00f5":"o","\u1e4d":"o","\u1e4f":"o","\u022d":"o","\u022f":"o","\u0231":"o","\u00f8":"o","\u01ff":"o","\u01eb":"o","\u01ed":"o","\u014d":"o","\u1e53":"o","\u1e51":"o","\u1ecf":"o","\u020d":"o",
|
89 |
+
"\u020f":"o","\u01a1":"o","\u1edb":"o","\u1edd":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u1e55":"p","\u1e57":"p","\u0155":"r","\u0159":"r","\u1e59":"r","\u0157":"r","\ua7a7":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u1e5f":"r","\ua783":"r","\u015b":"s","\u1e65":"s","\u015d":"s","\u0161":"s","\u1e67":"s","\u1e61":"s","\u015f":"s","\ua7a9":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u017f":"s","\ua785":"s","\u1e9b":"s","\u0165":"t","\u1e97":"t","\u1e6b":"t",
|
90 |
+
"\u0163":"t","\u1e6d":"t","\u021b":"t","\u1e71":"t","\u1e6f":"t","\ua787":"t","\u00fa":"u","\u00f9":"u","\u016d":"u","\u00fb":"u","\u01d4":"u","\u016f":"u","\u00fc":"u","\u01d8":"u","\u01dc":"u","\u01da":"u","\u01d6":"u","\u0171":"u","\u0169":"u","\u1e79":"u","\u0173":"u","\u016b":"u","\u1e7b":"u","\u1ee7":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1ee9":"u","\u1eeb":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u1e77":"u","\u1e75":"u","\u1e7d":"v","\u1e7f":"v","\u1e83":"w",
|
91 |
+
"\u1e81":"w","\u0175":"w","\u1e98":"w","\u1e85":"w","\u1e87":"w","\u1e89":"w","\u1e8d":"x","\u1e8b":"x","\u00fd":"y","\u1ef3":"y","\u0177":"y","\u1e99":"y","\u00ff":"y","\u1ef9":"y","\u1e8f":"y","\u0233":"y","\u1ef7":"y","\u1ef5":"y","\u017a":"z","\u1e91":"z","\u017e":"z","\u017c":"z","\u1e93":"z","\u1e95":"z","\u01ef":"\u0292","\u1f00":"\u03b1","\u1f04":"\u03b1","\u1f84":"\u03b1","\u1f02":"\u03b1","\u1f82":"\u03b1","\u1f06":"\u03b1","\u1f86":"\u03b1","\u1f80":"\u03b1","\u1f01":"\u03b1","\u1f05":"\u03b1",
|
92 |
+
"\u1f85":"\u03b1","\u1f03":"\u03b1","\u1f83":"\u03b1","\u1f07":"\u03b1","\u1f87":"\u03b1","\u1f81":"\u03b1","\u03ac":"\u03b1","\u1f71":"\u03b1","\u1fb4":"\u03b1","\u1f70":"\u03b1","\u1fb2":"\u03b1","\u1fb0":"\u03b1","\u1fb6":"\u03b1","\u1fb7":"\u03b1","\u1fb1":"\u03b1","\u1fb3":"\u03b1","\u1f10":"\u03b5","\u1f14":"\u03b5","\u1f12":"\u03b5","\u1f11":"\u03b5","\u1f15":"\u03b5","\u1f13":"\u03b5","\u03ad":"\u03b5","\u1f73":"\u03b5","\u1f72":"\u03b5","\u1f20":"\u03b7","\u1f24":"\u03b7","\u1f94":"\u03b7",
|
93 |
+
"\u1f22":"\u03b7","\u1f92":"\u03b7","\u1f26":"\u03b7","\u1f96":"\u03b7","\u1f90":"\u03b7","\u1f21":"\u03b7","\u1f25":"\u03b7","\u1f95":"\u03b7","\u1f23":"\u03b7","\u1f93":"\u03b7","\u1f27":"\u03b7","\u1f97":"\u03b7","\u1f91":"\u03b7","\u03ae":"\u03b7","\u1f75":"\u03b7","\u1fc4":"\u03b7","\u1f74":"\u03b7","\u1fc2":"\u03b7","\u1fc6":"\u03b7","\u1fc7":"\u03b7","\u1fc3":"\u03b7","\u1f30":"\u03b9","\u1f34":"\u03b9","\u1f32":"\u03b9","\u1f36":"\u03b9","\u1f31":"\u03b9","\u1f35":"\u03b9","\u1f33":"\u03b9",
|
94 |
+
"\u1f37":"\u03b9","\u03af":"\u03b9","\u1f77":"\u03b9","\u1f76":"\u03b9","\u1fd0":"\u03b9","\u1fd6":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u1fd3":"\u03b9","\u1fd2":"\u03b9","\u1fd7":"\u03b9","\u1fd1":"\u03b9","\u1f40":"\u03bf","\u1f44":"\u03bf","\u1f42":"\u03bf","\u1f41":"\u03bf","\u1f45":"\u03bf","\u1f43":"\u03bf","\u03cc":"\u03bf","\u1f79":"\u03bf","\u1f78":"\u03bf","\u1fe4":"\u03c1","\u1fe5":"\u03c1","\u1f50":"\u03c5","\u1f54":"\u03c5","\u1f52":"\u03c5","\u1f56":"\u03c5","\u1f51":"\u03c5",
|
95 |
+
"\u1f55":"\u03c5","\u1f53":"\u03c5","\u1f57":"\u03c5","\u03cd":"\u03c5","\u1f7b":"\u03c5","\u1f7a":"\u03c5","\u1fe0":"\u03c5","\u1fe6":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u1fe3":"\u03c5","\u1fe2":"\u03c5","\u1fe7":"\u03c5","\u1fe1":"\u03c5","\u1f60":"\u03c9","\u1f64":"\u03c9","\u1fa4":"\u03c9","\u1f62":"\u03c9","\u1fa2":"\u03c9","\u1f66":"\u03c9","\u1fa6":"\u03c9","\u1fa0":"\u03c9","\u1f61":"\u03c9","\u1f65":"\u03c9","\u1fa5":"\u03c9","\u1f63":"\u03c9","\u1fa3":"\u03c9","\u1f67":"\u03c9",
|
96 |
+
"\u1fa7":"\u03c9","\u1fa1":"\u03c9","\u03ce":"\u03c9","\u1f7d":"\u03c9","\u1ff4":"\u03c9","\u1f7c":"\u03c9","\u1ff2":"\u03c9","\u1ff6":"\u03c9","\u1ff7":"\u03c9","\u1ff3":"\u03c9","\u0491":"\u0433","\u0450":"\u0435","\u0451":"\u0435","\u04c2":"\u0436","\u045d":"\u0438","\u04e3":"\u0438","\u04ef":"\u0443"});q.register("$27",function(d,c,e){var f=c.requestAnimationFrame,a=c.cancelAnimationFrame,g=0;if(!f||!a)for(var b in{ms:1,moz:1,webkit:1,o:1})if(f=c[b+"RequestAnimationFrame"])if(a=c[b+"CancelAnimationFrame"]||
|
97 |
+
c[b+"CancelRequestAnimationFrame"])break;f&&a||(f=function(a){var b=l();timeToCall=Math.max(0,16-(b-g));nextTime=b+timeToCall;timerId=c.setTimeout(function(){a(nextTime)},timeToCall);g=nextTime;return timerId},a=function(a){clearTimeout(a)});var l=Date.now||function(){return(new Date).getTime()};d.loop=function(b,c){function d(){g=f(d,c);b(e++)}var e=0,g;d();return{stop:function(){g&&a(g);g=null}}};return d}({},s,w));q.register("$26",function(d,c,e){function f(a,c,d,e){if(b){var f=d;d=function(a){if((a.MSPOINTER_TYPE_TOUCH||
|
98 |
+
"touch")===a.pointerType)return f(a)}}a.addEventListener(c,d,e);return{unbind:function(){a.removeEventListener(c,d,e)}}}function a(a){a.preventDefault();a.stopPropagation();return!1}var g,b=!!c.navigator.msPointerEnabled,l=b?"MSPointerDown":"touchstart",p=b?"MSPointerMove":"touchmove",r=b?"MSPointerUp":"touchend";d.ok=function(a){null==g&&(g="function"===typeof e.body.addEventListener);g&&a&&a(d);return g};d.ms=function(){return b};d.dragger=function(b,c){function d(a){b.addEventListener(a,f[a],!1)}
|
99 |
+
function e(a){b.removeEventListener(a,f[a],!1)}var f={};f[l]=function(a){t(a,function(b,d){d.type=l;c(a,d,g)});d(p);d(r);return!0};f[r]=function(a){e(p);e(r);t(a,function(b,d){d.type=r;c(a,d,g)});return!0};f[p]=function(b){t(b,function(a,d){d.type=p;c(b,d,g)});return a(b)};d(l);var g={kill:function(){e(l);e(p);e(r);b=g=c=null}};return g};d.swiper=function(c,d,e){function f(a){c.addEventListener(a,G[a],!1)}function g(a){c.removeEventListener(a,G[a],!1)}function n(){s&&s.stop();s=null}var s,A,z,G={},
|
100 |
+
B=[],Q=[],N=[];G[l]=function(a){A=!1;n();var b=h();t(a,function(a,c){B[a]=b;Q[a]=c.clientX;N[a]=c.clientY});z=c.scrollLeft;return!0};G[r]=function(a){t(a,function(a,b){var c=h()-B[a],e=Q[a]-b.clientX,c=Math.abs(e)/c;d(c,e?0>e?-1:1:0)});z=null;return!0};G[p]=function(b){var d,e;null==z||t(b,function(a,b){d=Q[a]-b.clientX;e=N[a]-b.clientY});if(e&&Math.abs(e)>Math.abs(d))return A=!0;d&&(A=!0,c.scrollLeft=Math.max(0,z+d));return a(b)};if(!b||e)f(l),f(p),f(r),b&&(c.className+=" mstouch");return{kill:function(){g(l);
|
101 |
+
g(p);g(r);n()},swiped:function(){return A},ms:function(){return b},snap:function(a){b&&!e&&(c.style["-ms-scroll-snap-points-x"]="snapInterval(0px,"+a+"px)",c.style["-ms-scroll-snap-type"]="mandatory",c.style["-ms-scroll-chaining"]="none")},scroll:function(a,b,d){n();var e=c.scrollLeft,k=a>e?1:-1,A=Math[1===k?"min":"max"],f=Math.round(16*b*k);return s=q.require("$27","fps.js").loop(function(b){b&&(e=Math.max(0,A(a,e+f)),c.scrollLeft=e,a===e&&(n(),d&&d(e)))},c)}}};d.start=function(a,b){return f(a,l,
|
102 |
+
b,!1)};d.move=function(a,b){return f(a,p,b,!1)};d.end=function(a,b){return f(a,r,b,!1)};var t=d.each=function(a,c){if(b)(a.MSPOINTER_TYPE_TOUCH||"touch")===a.pointerType&&c(0,a);else for(var d=-1,e=(a.originalEvent||a).changedTouches||[];++d<e.length;)c(d,e[d])},h=Date.now||function(){return(new Date).getTime()};return d}({},s,w));q.register("$24",function(d,c,n){function f(a,b){var c=[].slice.call(arguments,2);return function(d){return a.apply(b,[d].concat(c))}}function a(a,b){var c=a.id,d=c&&u[c],
|
103 |
+
e=d&&d.parent();if(!d||!e)return null;var k=(c=e.dir===v)?"X":"Y",c=c?t:h,f=c(e.el),g=b["offset"+k];null==g&&(g=b["page"+k]-c(a));g&&(f+=g);return{move:function(a){e.resize(a["page"+k]-f,d);return!0}}}function g(b,c){function d(){e(n).unbind("mousemove",k);s=null;return!0}function k(a){s?s.move(a):d();return!0}if(s)return!0;s=a(b.target,b);if(!s)return!0;e(n).one("mouseup",d).mousemove(k);return r(b)}function b(b,c){var d=c.type;"touchmove"===d?s&&s.move(c):"touchstart"===d?s=a(b.target,c):"touchend"===
|
104 |
+
d&&s&&(s=null)}function l(a){var b=e(a.target).closest("div.wg-tr"),c=b.length&&b.closest("div.is-table");(c=c&&u[c.attr("id")])&&c.selectRow(Number(b.attr("data-row")));return r(a)}function p(a){var b;b=a.keyCode;if(40===b)b=1;else if(38===b)b=-1;else return!0;if(a.shiftKey||a.ctrlKey||a.metaKey||a.altKey)return!0;this.selectNextRow(b);return r(a)}function r(a){a.stopPropagation();a.preventDefault();return!1}function t(a,b){b||(b=n.body);for(var c=a.offsetLeft||0;(a=a.offsetParent)&&a!==b;)c+=a.offsetLeft||
|
105 |
+
0;return c}function h(a,b){b||(b=n.body);for(var c=a.offsetTop||0;(a=a.offsetParent)&&a!==b;)c+=a.offsetTop||0;return c}function m(a){function b(){var d=a.innerHTML;d!==c&&(c=d,e(a).trigger("wgChange",[d]));return!0}var c=a.innerHTML,d=c;return e(a).attr("contenteditable","true").blur(function(){e(a).unbind("input keyup paste");E===a&&(E=null);b();d!==c&&e(a).trigger("wgChanged",[a]);return!0}).focus(function(){e(a).bind("input keyup paste",b);E=a;return!0}).bind("forced",function(){c=null;b()})}
|
106 |
+
function k(a){this.el=a;this.id=a.id;this.pos=this.index=0;this.css=["wg-cell"];u[a.id]=this;this.clear()}var y=q.require("$2","html.js"),v=1,u={},E,s=!1;d.init=function(a){var c=new k(a);c.restyle().redraw();c.root=!0;q.require("$26","touch.js").ok(function(c){c.dragger(a,b)});e(a).mousedown(g);return c};c=k.prototype;c.each=function(a){for(var b=-1;++b<this.length;)a(b,this.cells[b]);return this};c.bind=function(){return this.$("bind",arguments)};c.unbind=function(){return this.$("unbind",arguments)};
|
107 |
+
c.find=function(a){return e(this.el).find(a)};c.$=function(a,b){e.fn[a].apply(e(this.el),b);return this};c.parent=function(){return this.pid&&u[this.pid]};c.splitx=function(){return this._split(v,arguments)};c.splity=function(){return this._split(2,arguments)};c._split=function(a,b){this.dir&&this.dir!==a&&this.clear();this.dir=a;var c=-1,d,e=this.length,f=b.length,g=1/(e+f),h=0;if(e)throw Error("Todo: implement re-split");for(;++c<f;){d=y.el();this.body.appendChild(d);for(var l=d,v=b[c],p=v,m=1;u[v];)v=
|
108 |
+
p+"-"+ ++m;l.id=v;d=new k(d);d.index=e+c;d.pid=this.id;d.pos=h;h+=g;this.cells.push(d);this.length++}this.restyle().redraw();return this.cells};c.destroy=function(){this.clear();delete u[this.id];this.el.innerHTML="";return this};c.clear=function(){for(var a=-1,b;++a<this.length;)b=this.cells[a].clear(),delete u[b.id];this.cells=[];this.length=0;this.nav&&this.el.removeChild(this.nav);this.nav=null;this.body&&(this.field&&y.ie()&&(e(this.body).triggerHandler("blur"),this.field=null),this.table&&(this.table=
|
109 |
+
this.trow=null),this.el.removeChild(this.body));this.body=this.el.appendChild(y.el("","wg-body"));return this};c.resize=function(a,b){if(!b&&(b=this.cells[1],!b))return;var c=b.index,d=e(this.el)[this.dir===v?"width":"height"](),k=this.cells[c+1],c=this.cells[c-1];pad=(b.body||b.el.firstChild).offsetTop||0;max=(k?k.pos*d:d)-pad;min=c?c.pos*d:0;b.pos=Math.min(max,Math.max(min,a))/d;(d=this.parent())&&d.table?d.redraw():this.redraw();return this};c.distribute=function(){for(var a,b=0;b<arguments.length;)a=
|
110 |
+
Math.max(0,Math.min(1,arguments[b++])),this.cells[b].pos=a;this.redraw();return this};c.restyle=function(){var a=this.css.slice();this.root&&a.push("wg-root");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");this.table?a.push("is-table"):null!=this.field&&(a.push("is-field"),this.field||a.push("readonly"));this.el.className=a.join(" ");return this};c.redraw=
|
111 |
+
function(){if(this.body){var a=this.el.clientHeight||0,b=this.body.offsetTop||0;b<a&&(a-=b);this.body.style.height=String(a)+"px"}for(var a=this.length,c,d=1,k=2===this.dir?"height":"width";0<=--a;)b=this.cells[a],this.nav?c=1:(b.fixed&&(b.pos=b.fixed/e(this.el)[k]()),c=d-b.pos,d=b.pos),b.el.style[k]=String(100*c)+"%",b.restyle().redraw();this.table&&this.redrawTable();return this};c.redrawTable=function(){var a=-1,b=this.cells[0],c=this.cells[1],a=e(c.body).width(),d=c.body.firstChild,c=d.childNodes;
|
112 |
+
d.style.width=a+"px";for(var a=b.length,k=1;0<=--a;)d=b.cells[a],c[a].style.width=String(100*(k-d.pos))+"%",k=d.pos;return!0};c.contents=function(a){if(null==a)return this.body.innerHTML;this.cells.length?this.clear():this.body&&(this.el.removeChild(this.body),this.body=null);this.body||(this.body=this.el.appendChild(y.el("","wg-content")));"string"===typeof a?e(this.body)._html(a):a&&this.append(a);this.redraw();return this};c.textarea=function(a,b){var c=y.txt(a);this.contents(c);(this.field=b)&&
|
113 |
+
m(this.body);this.restyle();return this};c.textareaFocused=function(){if(E){if(E===this.body)return E;for(var a=-1,b;++a<this.length;)if(b=this.cells[a].textareaFocused())return b}};c.bodyAtt=function(a,b){if(this.body)return null!=b&&this.body.setAttribute(a,b),this.body.getAttribute(a)};c.editable=function(){var a=this.field&&e(this.el).find("div[contenteditable]");return a&&a.length?a.eq(0):null};c.append=function(a){a&&(a.nodeType?y.init(this.body.appendChild(a)):y.init(e(a).appendTo(this.body)));
|
114 |
+
return this};c.prepend=function(a){var b=this.body;if(a.nodeType){var c=b.firstChild;y.init(c?b.insertBefore(a,c):b.appendChild(a))}else y.init(e(a).prependTo(b));return this};c.header=function(a,b){if(!arguments.length)return this.el.getElementsByTagName("h2")[0];var c=["wg-title"];b&&c.push(b);this.t=y.txt(a||"");this.el.insertBefore(y.el("h2",c.join(" ")),this.body).appendChild(this.t);this.restyle().redraw();return this};c.title=function(a){this.t?this.t.nodeValue=a||"":this.header(a);return this.t};
|
115 |
+
c.tabulate=function(a){var b=this.id,c=[],d=[];rows=this.splity(b+"-thead",b+"-body");thead=rows[0];tbody=rows[1];thead.css.push("wg-thead");tbody.css.push("wg-tbody");a.eachCol(function(a,e){c.push(b+"-col"+a);d.push(e)});for(var k=-1,g,m=y.el("","wg-cols"),r=thead._split(v,c);++k<r.length;)g=r[k],g.header(d[k]),m.appendChild(y.el("","wg-col "+(0===k?"":"not-")+"first"));tbody.contents(m);a.eachRow(function(a,b,c){tbody._addRow(b,c)});e(tbody.el).mousedown(l);this.lock();this.table=a;this.restyle().redraw();
|
116 |
+
g=thead.cells[0];tbody.fixed=h(g.body,g.el)||20;this.resize(tbody.fixed);e(m).attr("tabindex","-1").keydown(f(p,this));return m};c.lock=function(){this.body.className+=" locked";return this};c.addRow=function(a,b){this.table&&this.cells[1]&&this.cells[1]._addRow(a,b);return this};c._addRow=function(a,b){var c,d=this.body.firstChild.childNodes,e=d.length,k=d[0].childNodes.length,f=-1;for(b=b&&"wg-tr "+b||"wg-tr";++f<e;)c=d[f].appendChild(y.el("",b)),c.setAttribute("data-row",k),c=c.appendChild(y.el("",
|
117 |
+
"wg-td")),a[f]&&/\S/.test(a[f])?c.appendChild(y.txt(a[f])):c.innerHTML=" ";return d};c.tr=function(a){for(var b=-1,c,d=[],e=this.cells[1].body.firstChild.childNodes;++b<e.length;)(c=e[b].childNodes[a])&&d.push(c);return d};c.td=function(a,b){try{return this.cells[1].body.firstChild.childNodes[b].childNodes[a].firstChild}catch(c){return null}};c.selectedRow=function(){return this.table&&this.trow};c.nextRow=function(a,b,c){var d=this.table,k,f,g;if(!d)throw Error("No table in nextRow, but trow = "+
|
118 |
+
this.trow);null==c&&(c=this.selectedRow());if(null==c)throw Error("startIdx is null in nextRow");g=e(this.cells[1].body.firstChild).hasClass("filtered");k=c;a:for(;c!==(k+=a);){for(;(f=this.tr(k)).length;)if(g&&!e(f).hasClass("filtered"))continue a;else break a;b:{if(b&&d.size()){if(1===a){k=-1;break b}if(-1===a){k=d.size();break b}}k=void 0}if(null==k)return null}return k};c.selectNextRow=function(a,b,c){a=this.nextRow(a,b);if(null!=a&&this.selectedRow()!==a)return this.selectRow(a,c)};c.selectRow=
|
119 |
+
function(a,b){var c=this.table&&this.table.row(a);if(!c)throw Error("No data for row "+a);var d=this.tr(a);if(!d.length)throw Error("No table row at "+a);var d=e(d),k=this.cells[1],f=k.body,g=e(f.firstChild);if(g.hasClass("filtered")&&!d.hasClass("filtered"))return!1;null!==this.trow&&e(this.tr(this.trow)).removeClass("selected");d.addClass("selected");this.trow=a;if(!b){var h=f.scrollTop;g.focus();h&&(f.scrollTop=h)}k.scrollTo(d[0],!0);g.trigger("wgRowSelect",[a,c]);return this};c.deselectRow=function(){if(this.table){var a=
|
120 |
+
e(this.cells[1].body.firstChild),b=this.trow;a.find("div.selected").removeClass("selected");this.row=null;a.trigger("wgRowDeselect",[b])}};c.filterRows=function(a){var b=-1,c;c=e(this.cells[1].body.firstChild);if(!a)return c.removeClass("filtered"),this;for(c.addClass("filtered").find("div.filtered").removeClass("filtered");++b<a.length;)c=a[b],c=this.tr(c),c.length&&e(c).addClass("filtered");return this};c.scrollTo=function(a,b){var c;c=this.body.scrollTop;var d=h(a,this.body);if(c>d)c=d;else{var k=
|
121 |
+
this.body.clientHeight,d=d+e(a).outerHeight();if(k+c<d)c=d-k;else return}b?this.body.scrollTop=c:e(this.body).stop(!0).animate({scrollTop:c},250)};c.navigize=function(a){function b(a,c){d=a.show();k=c.addClass("active");a.trigger("wgTabSelect",[a.data("index")]);return a}var c=this;c.nav&&c.el.removeChild(c.nav);c.nav=c.el.insertBefore(y.el("nav","wg-tabs"),c.body);var d,k,f=e(c.nav).click(function(a){var f=e(a.target),g=f.data("tab");if(g){var h=k;d&&d.hide();h&&h.removeClass("active");b(g,f).children().focus();
|
122 |
+
c.redraw();return r(a)}});c.each(function(c,k){k.pos=0;var g=e(k.el).data("index",c),h=e('<a href="#'+k.id+'"></a>').data("tab",g).text(a[c]).appendTo(f);d?g&&g.hide():b(g,h)});c.lock();c.restyle().redraw();f=null;return c};c=null;return d}({},s,w));q.register("$18",function(d,c,n){function f(a){var b=[],c=n.createElement("p");c.innerHTML=a;q.require("$2","html.js").plain(c,b);return b.join("\n")}function a(a){var b=[];a&&(a.fuzzy()?b.push("po-fuzzy"):a.flagged()&&b.push("po-flagged"),a.translation()||
|
123 |
+
b.push("po-empty"),a.comment()&&b.push("po-comment"));return b.join(" ")}function g(a,b,c){a=e(a.title(b).parentNode);b=a.find("span").hide();c&&(c.icon||c.region&&"ZZ"!==c.region)&&(b.length||(b=e("<span></span>").prependTo(a)),b.attr("class",c.icon||"flag flag-"+c.region.toLowerCase()).show())}function b(a,b){a.find("div.wg-content").attr("dir",b)}function l(){this.unsaved=0;this.editable={source:!0,target:!0}}var p="RTL",r="poUpdate",t="wgChange",h="wgChanged";d.extend=function(a){return a.prototype=
|
124 |
+
new l};var m=l.prototype=q.require("$23","abstract.js").init(["getListColumns","getListHeadings","getListEntry"]);m.setRootCell=function(a){function b(){d.redraw(!0);return!0}var d=q.require("$24","LocoWinGrid.js").init(a);e(c).resize(b);this.destroy=function(){d.destroy();e(c).unbind("resize",b)};this.rootDiv=a;return d};m.bind=function(a,b){return e(this.rootDiv).bind(a,b)};m.setListCell=function(a){var b=this;b.listCell=a;a.bind("wgRowSelect",function(a,c,d){a=b.po.row(c);b.loadMessage(a);return!0}).bind("wgRowDeselect",
|
125 |
+
function(){b.loadNothing();return!0})};m.setSourceCell=function(a){this.sourceCell=a;var b=a.find("p.notes");b.length||(b=e('<p class="notes"></p>').insertAfter(a.header()).hide());this.notesPara=b};m.next=function(a,b,c){for(var d=wasIdx=this.listCell.selectedRow(),e;;){d=this.listCell.nextRow(a,c,d);if(wasIdx===d)break;if(b&&(e=this.po.row(d),e.translated(0)))continue;break}null!=d&&this.listCell.selectRow(d,!0);return d};m.current=function(a){arguments.length&&this.loadMessage(a);return this.active};
|
126 |
+
m.getTargetEditable=function(){return this.editable.target&&this.targetCell&&this.targetCell.editable()};m.getSourceEditable=function(){return this.editable.source&&this.sourceCell&&this.sourceCell.editable()};m.getContextEditable=function(){return this.editable.context&&this.contextCell&&this.contextCell.editable()};m.getFirstEditable=function(){return this.getTargetEditable()||this.getSourceEditable()||this.getContextEditable()};m.searchable=function(a){a&&(this.dict=a,this.po&&this.rebuildSearch());
|
127 |
+
return this.dict&&!0};m.rebuildSearch=function(){var a=this;a.dict.clear();a.po.each(function(b,c,d){a.dict.add(d,c.toText())});this.lastSearch="";this.lastFound=this.po.length};m.filtered=function(){return this.lastSearch||""};m.filter=function(a,b){var c,d={};if(this.lastSearch===a)return this.lastFound||0;if(!this.po||!this.dict)throw Error("enable editor.searchable()");if(a){if(this.lastSearch&&!this.lastFound&&0===a.indexOf(this.lastSearch))return 0;c=this.dict.find(a,d);d.words.length||(a="")}this.lastSearch=
|
128 |
+
a;this.lastFound=c?c.length:this.po.length;this.listCell.filterRows(c);d=this.active?this.po.indexOf(this.active):-1;if(-1===d||c&&-1===c.indexOf(d))c?c.length?this.listCell.selectRow(c[0],!0):this.listCell.deselectRow():this.listCell.selectRow(0,!0);b||this.fire("poFilter",[this.lastSearch,this.lastFound]);return this.lastFound};m.unsave=function(b,c){if(b=b||this.active){var d=this.po.indexOf(b),d=this.listCell.tr(d),f=d[0].className.replace(/\s*po-[a-z]+/g,""),f=f+(" "+a(b)+" po-unsaved");e(d).attr("class",
|
129 |
+
f);this.fire("poUnsaved",[++this.unsaved,b,c])}};m.save=function(a){if(this.unsaved||a)e(this.listTable).find("div.po-unsaved").removeClass("po-unsaved"),this.fire("poSave");this.unsaved=0;return this.po};m.fire=function(a,b){this.on&&this.on[a]&&this.on[a].apply(this,b||[]);return e(this.rootDiv).trigger(a,b||[])};m.reload=function(){var b=this;if(b.po&&b.po.row){b.lastSearch&&(b.lastSearch="",b.lastFound=b.po.length,b.fire("poFilter",[b.lastSearch,b.lastFound]));var c;b.listTable&&(c=b.listTable?
|
130 |
+
b.listTable.parentNode.scrollTop:0,b.listCell.clear());b.listTable=b.listCell.tabulate({row:function(a){a=b.po.row(a);return b.getListEntry(a)},size:function(){return b.po&&b.po.length||0},eachCol:function(a){for(var c=-1,d=b.getListHeadings();++c<d.length;)a(c,d[c])},eachRow:function(c){var d=0;b.po&&b.po.each(function(e,f){c(d++,b.getListEntry(f),a(f))})}});c&&(b.listTable.parentNode.scrollTop=c);b.targetLocale=b.po.locale();b.fire("poLoad");return!!b.po.length}b.listCell.clear().header("Error").contents("Invalid messages list")};
|
131 |
+
m.load=function(a,b){this.po=a;this.dict&&this.rebuildSearch();this.reload()&&this.listCell.selectRow(b||0)};m.loadMessage=function(a){function c(){var d,e=n;C&&(L?C.text(L).show():C.text("").hide());g(n,"Source text:",l.sourceLocale);K?(d=n.splity(n.id+"-singular",n.id+"-plural"),e=d[0],d=d[1],e.header("Single:").textarea(H,I),d.header("Plural:").textarea(K,I),n.lock()):n.textarea(H,I);l.sourceLocale&&p===l.sourceLocale.dir&&b(n,p);I&&n.bind(t,function(b,c){var d=f(c);n.id+"-plural"===b.target.parentNode.id?
|
132 |
+
a.plural(d):(a.source(d),l.updateListCell(a,"source"));l.unsave(a,m)}).bind(h,function(b){n.id+"-plural"===b.target.parentNode.id||l.po.reIndex(a);l.dict&&l.rebuildSearch();l.fire(r,[a])})}function d(c){g(s,c.lang&&"zz"!==c.lang?c.label+" translation:":"Translation",c);if(K){var e,n=[],v=c.plurals||["One","Other"],u=q.require("$15","collection.js").init();for(a.each(function(a,b,c){if(c||v[a])n.push(v[a]||"Form "+a),u.add("plural-"+a,c)});(e=n.length)<c.nplurals;)n.push(v[e]||"Form "+u.length),u.add("plural-"+
|
133 |
+
e,a.translation(e));children=s.splitx.apply(s,u.keys);s.each(function(b,c){var d=D&&!a.disabled(b);c.textarea(u[b],d)});s.navigize(n).bind("wgTabSelect",function(a,b){m=b;l.fire("poTab",[m])})}else D=D&&!a.disabled(0),s.textarea(a.translation(),D);p===c.dir&&b(s,p);D&&s.bind(t,function(b,c){var d=f(c);a.translate(d,m);0===m&&l.updateListCell(a,"target");a.fuzzy&&a.fuzzy()?l.fuzzy(!1,a):l.unsave(a,m)}).bind(h,function(b){l.dict&&l.rebuildSearch();l.fire(r,[a])})}function e(){g(w,"Context:");w.textarea(a.context(),
|
134 |
+
!0);J&&w.bind(t,function(b,c){var d=f(c);a.context(d);a.source();l.updateListCell(a,"source");l.unsave(a,m)}).bind(h,function(){l.po.reIndex(a);l.dict&&l.rebuildSearch();l.fire(r,[a])})}var l=this,m=0,n=l.sourceCell,s=l.targetCell,w=l.contextCell,B=l.commentCell,C=l.notesPara,D=l.editable.target,I=l.editable.source,J=l.editable.context,H=a.source()||"",K=a.plural()||"",L=a.notes(),F;s&&s.textareaFocused()?F=s:n&&n.textareaFocused()?F=n:w&&w.textareaFocused()?F=w:B&&B.textareaFocused()&&(F=B);l.unloadActive();
|
135 |
+
l.active=a;B&&B.textarea(a.comment(),!0).bind(t,function(b,c){var d=f(c);a.comment(d);l.fire("poComment",[a,d]);l.unsave(a,m)});n&&c();w&&e();s&&l.targetLocale&&d(l.targetLocale);F&&(F=F.editable())&&F.focus();l.fire("poSelected",[a])};m.unloadActive=function(){var a;(a=this.notesPara)&&a.text("").hide();(a=this.sourceCell)&&a.unbind().clear();(a=this.contextCell)&&a.unbind().clear();(a=this.targetCell)&&a.unbind().clear();(a=this.commentCell)&&a.unbind();this.active&&(this.fire("poDeselected",[this.active]),
|
136 |
+
this.active=null)};m.loadNothing=function(){var a;this.unloadActive();(a=this.commentCell)&&a.textarea("",!1);(a=this.sourceCell)&&a.textarea("",!1).title("Source text not loaded:");(a=this.contextCell)&&a.textarea("",!1).title("Context not loaded:");(a=this.targetCell)&&a.textarea("",!1).title("Translation not loaded:");this.fire("poSelected",[null])};m.updateListCell=function(a,b){var c=this.getListColumns()[b],d=this.getListEntry(a)[c||0],f=this.po.indexOf(a),c=this.listCell.td(f,c);d&&/\S/.test(d)?
|
137 |
+
e(c).text(d.replace("\n"," ")):e(c).html(" ")};m.fuzzy=function(a,b){b=b||this.active;if(!b)return null;var c=b.fuzzy();null!=a&&c!=a&&(b.fuzzy(a),this.fire("poFuzzy",[b,a]),this.fire(r,[b]),this.unsave(b));return c};m.add=function(a,b){var c,d=this.po.get(a,b);d?c=this.po.indexOf(d):(c=this.po.length,d=this.po.add(a,b),this.load(this.po),this.fire("poAdd",[d]),this.fire(r,[d]));this.lastSearch&&this.filter("");this.listCell.selectRow(c);return d};m.del=function(a){if(a=a||this.active){var b=
|
138 |
+
this.lastSearch,c=this.po.del(a);null!=c&&(this.unsave(a),this.fire("poDel",[a]),this.fire(r,[a]),this.reload(),this.dict&&this.rebuildSearch(),this.active&&this.active.equals(a)&&this.unloadActive(),this.po.length&&(b&&this.filter(b),this.active||(c=Math.min(c,this.po.length-1),this.listCell.selectRow(c))))}};m=null;return d}({},s,w));q.register("$7",function(d,c,e){function f(){this.sourceLocale={lang:"en",label:"English",plurals:["Single","Plural"]}}d.init=function(a){var c=new f;a=c.setRootCell(a);
|
139 |
+
var b=a.splity("po-list","po-edit"),d=b[0],e=b[1],b=e.splitx("po-trans","po-comment"),n=b[0],t=b[1].header("Comments:"),b=n.splity("po-source","po-target"),n=b[0].header("Source text:"),b=b[1].header("Translation:");a.distribute(0.34);e.distribute(0.8);c.setListCell(d);c.setSourceCell(n);c.targetCell=b;c.commentCell=t;c.editable.source=!1;return c};c=f.prototype=q.require("$18","base.js").extend(f);c.getListHeadings=function(){return["Source text","Translation"]};c.getListColumns=function(){return{source:0,
|
140 |
+
target:1}};c.getListEntry=function(a){if(!a)return["",""];var c=[a.id||a.source()||"",a.translation()||""];(a=a.context())&&(c[0]+=" [ "+a+" ]");return c};c.stats=function(){var a=this.po.length,c=0,b=0,d=0;this.po.each(function(a,e){e.translation()?e.fuzzy()?d++:c++:b++});return{t:a,p:String(c?Math.round(100*(c/a)):0)+"%",f:d,u:b}};c.unlock=function(){this._unlocked||(this._unlocked=this.targetLocale,delete this.targetLocale,this.po&&this.po.unlock(),this.editable={source:!0,context:!0,target:!1},
|
141 |
+
this.contextCell=this.targetCell,delete this.targetCell,this.fire("poLock",[!1]),this.active&&this.loadMessage(this.active))};c.lock=function(){var a;this._unlocked&&(a=this.targetLocale=this._unlocked,delete this._unlocked,this.po&&this.po.lock(a),this.editable={source:!1,context:!1,target:!0},this.targetCell=this.contextCell,delete this.contextCell,this.fire("poLock",[!0,a]),this.active&&this.loadMessage(this.active))};c.locked=function(){return!this._unlocked};return d}({},s,w));q.register("$8",
|
142 |
+
function(d,c,n){function f(a){(a||(a=C.getFirstEditable()))&&a.triggerHandler("forced");return a}var a={copy:66,clear:75,save:83,fuzzy:85,next:40,prev:38,enter:13},g={38:!0,40:!0},b={66:function(a,b){var c=b.current(),d;c&&(c.normalize(),b.current(c),(d=b.getTargetEditable())&&f(d))},75:function(a,b){var c=b.current(),d;c&&(c.untranslate(),b.current(c),(d=b.getTargetEditable())&&f(d))},85:function(a,b){b.fuzzy(!b.fuzzy())},13:function(a,b){b.getFirstEditable()&&b.next(1,!0,!0)},40:function(a,b){var c=
|
143 |
+
a.shiftKey;b.next(1,c,c)},38:function(a,b){var c=a.shiftKey;b.next(-1,c,c)}};d.init=function(d){function f(a){if(a.isPropagationStopped()||!a.metaKey&&!a.ctrlKey)return!0;var c=a.which;if(!n[c])return!0;var e=b[c];if(!e)throw Error("No such command");if(a.altKey||a.shiftKey&&!g[c])return!0;e(a,d);a.preventDefault();return!1}var n={};e(c).bind("keydown",f);return{add:function(c,d){b[a[c]]=d;return this},enable:function(){var b,c;for(c in arguments)b=a[arguments[c]],n[b]=!0;return this},disable:function(){e(c).unbind("keydown",
|
144 |
+
f)}}};return d}({},s,w));q.require("$1","array.js");q.require("$2","html.js");H=s.loco;var D=H.t,P=H.killEvent,V=H.showError,X=H.showSuccess,W=s.ajaxurl||"/wp-admin/admin-ajax.php";H=H.conf||{};var R=H.locale,L=q.require("$3","po.js").create(R),J={},M=w.getElementById("loco-poedit-inner");e(s).resize(function(){function d(){var d;d=M;for(var a=d.offsetTop||0;(d=d.offsetParent)&&void 0!==d;)a+=d.offsetTop||0;d=a;a=e(s).innerHeight();d=Math.max(n,a-d-c);M.style.height=String(d)+"px";return!0}var c=
|
145 |
+
20,n=parseInt(e(M).css("min-height")||0);d();return d}());J.save=function(d){function c(){d.disabled=!1}c();C.bind("poUnsaved",function(){e(d).addClass("button-primary loco-flagged")}).bind("poSave",function(){e(d).removeClass("button-primary loco-flagged")});e(d.form).submit(function(n){var f=n.target;n.target.po.value=L.toString();d.disabled=!0;U(f,function(a){c();e("#loco-po-modified").text(a.modified);C.save(!0);var d=D("PO file saved"),b=a.filename;a=a.compiled;null!=a&&(/\D/.test(a)?V(a):(d+=
|
146 |
+
" "+D("and MO file compiled"),b=b.replace(/\.po$/i,".mo")));X(d+" - "+b)},c);return P(n)});return!0};J.download_po=J.download_mo=function(d){d.disabled=!1;d.form.setAttribute("action",W);e(d).click(function(c){d.form.po.value=L.toString();e(M).trigger("poSave");return!0});return!0};J.add=!R&&function(d){d.disabled=!1;e(d).click(function(c){var d=1,e;for(e="New message";L.get(e);)d=/(\d+)/.exec(e)?Math.max(d,RegExp.$1):d,e="New message "+ ++d;C.add(e);return P(c)});return!0};J.del=!R&&function(d){d.disabled=
|
147 |
+
!1;e(d).click(function(c){C.del();return P(c)});return!0};J.fuzzy=R&&function(d){function c(c){d.disabled=null==c;e(d)[c?"addClass":"removeClass"]("loco-inverted")}C.bind("poSelected",function(d,e){c(e&&C.locked()?e.fuzzy():null)}).bind("poFuzzy",function(d,e,a){c(C.locked()?a:null)});e(d).click(function(c){var d=!C.fuzzy();C.fuzzy(d);return P(c)});return!0};J.sync=function(d){function c(){d.disabled=!1}c();C.bind("poUnsaved",function(){d.disabled=!0}).bind("poSave",function(){c()});e(d.form).submit(function(n){d.disabled=
|
148 |
+
!0;U(n.target,function(d){c();var a=q.require("$3","po.js").create(void 0);a.load(d.exp);var g=[],a=L.merge(a),b=a.add.length,l=a.del.length;C.load(L);if(b||l){g.push(d.pot?F(D("Merged from %s"),d.pot):D("Merged from source code"));b&&g.push(F(D("1 new string added","%s new strings added",b),b));l&&g.push(F(D("1 obsolete string removed","%s obsolete strings removed",l),l));e(M).trigger("poUnsaved",[]);if(s.console&&console.log){for(b=-1;++b<a.add.length;)console.log(" + "+a.add[b].source());for(b=
|
149 |
+
-1;++b<a.del.length;)console.log(" - "+a.del[b].source())}S()}else g.push(d.pot?F(D("Already up to date with %s"),d.pot):D("Already up to date with source code"));L.headers(d.headers||{});X(g.join(". "));e(M).trigger("poMerge",[d])},c);return P(n)});return!0};J.revert=function(d){C.bind("poUnsaved",function(){d.disabled=!1}).bind("poSave",function(){d.disabled=!0});e(d).click(function(c){location.reload();return P(c)});return!0};J.help=function(){return!0};M.innerHTML="";var C=q.require("$7","poedit.js").init(M);
|
150 |
+
C._validate("POEdit");q.require("$8","hotkeys.js").init(C).add("save",function(d,c){e("#loco-poedit-save").submit()}).enable("copy","clear","enter","next","prev","fuzzy","save");e("#loco-nav").find("button").each(function(d,c){var n=c.getAttribute("data-loco");J[n]&&J[n](c)||e(c).hide()});J=null;(function(d){e(d.form).submit(function(c){return P(c)});var c=q.require("$4","dict.js").create();c.depth=10;c.translit(q.require("$5","flatten.json"));C.searchable(c);d.disabled=!1;d.value="";var n=q.require("$6",
|
151 |
+
"LocoTextListener.js").listen(d,function(c){C.filter(c,!0)});C.bind("poFilter",function(c,a){n.val(a)}).bind("poMerge",function(c,a){var d=n.val();d&&C.filter(d)});d=c=null})(w.getElementById("loco-search"));C.bind("poUnsaved",function(){s.onbeforeunload=function(){return D("Your changes will be lost if you continue without saving")}}).bind("poSave",function(){s.onbeforeunload=null}).bind("poUpdate",S);L.load(H.po||H.pot||{});L.headers(H.headers);C.load(L);C.targetLocale||C.unlock();S()})(window,
|
152 |
+
document,window.jQuery);
|
pub/js/lang/loco-translate-de_DE.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: de_DE, German
|
6 |
-
* Exported at:
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: de_DE, German
|
6 |
+
* Exported at: Fri, 30 Jan 2015 17:55:12 +0000
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
pub/js/lang/loco-translate-id_ID.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: id_ID, Indonesian
|
6 |
-
* Exported at:
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: id_ID, Indonesian
|
6 |
+
* Exported at: Fri, 30 Jan 2015 17:55:13 +0000
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
pub/js/lang/loco-translate-it_IT.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: it_IT, Italian
|
6 |
-
* Exported at:
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: it_IT, Italian
|
6 |
+
* Exported at: Fri, 30 Jan 2015 17:55:13 +0000
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
pub/js/lang/loco-translate-nl_BE.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: nl_BE, Dutch (Belgium)
|
6 |
-
* Exported at:
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: nl_BE, Dutch (Belgium)
|
6 |
+
* Exported at: Fri, 30 Jan 2015 17:55:13 +0000
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
pub/js/lang/loco-translate-nl_NL.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: nl_NL, Dutch
|
6 |
-
* Exported at:
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: nl_NL, Dutch
|
6 |
+
* Exported at: Fri, 30 Jan 2015 17:55:13 +0000
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
pub/js/lang/loco-translate-pl_PL.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: pl_PL, Polish
|
6 |
-
* Exported at:
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: pl_PL, Polish
|
6 |
+
* Exported at: Fri, 30 Jan 2015 17:55:13 +0000
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
pub/js/lang/loco-translate-ru_RU.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: ru_RU, Russian
|
6 |
-
* Exported at:
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: ru_RU, Russian
|
6 |
+
* Exported at: Fri, 30 Jan 2015 17:55:14 +0000
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
pub/js/lang/loco-translate-sv_SE.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: sv_SE, Swedish
|
6 |
-
* Exported at:
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: sv_SE, Swedish
|
6 |
+
* Exported at: Fri, 30 Jan 2015 17:55:14 +0000
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
pub/js/lang/loco-translate-tr_TR.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: tr_TR, Turkish
|
6 |
-
* Exported at:
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
3 |
* Project: loco.po conversion
|
4 |
* Release: Working copy
|
5 |
* Locale: tr_TR, Turkish
|
6 |
+
* Exported at: Fri, 30 Jan 2015 17:55:14 +0000
|
7 |
*/
|
8 |
loco = window.loco||{}, loco.t = function( pairs ){
|
9 |
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: timwhitlock
|
3 |
-
Tags: translation, translators, localization, localisation, l10n, i18n, Gettext,
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 4.1
|
6 |
-
Stable tag: 1.5
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -16,7 +16,7 @@ The Loco Translate plugin provides in-browser editing of PO files used for local
|
|
16 |
|
17 |
Features include:
|
18 |
|
19 |
-
*
|
20 |
* Create and update language files directly in your theme or plugin
|
21 |
* Extraction of translatable strings from your source code
|
22 |
* Native MO file compilation without the need for Gettext on your system
|
@@ -133,6 +133,12 @@ If you have a suggestion on how to improve the experience of using Loco Translat
|
|
133 |
|
134 |
== Changelog ==
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
= 1.5 =
|
137 |
* Added PO Editor keyboard shortcuts
|
138 |
* Added WPLANG warning for WP4 deprecation
|
@@ -204,7 +210,7 @@ If you have a suggestion on how to improve the experience of using Loco Translat
|
|
204 |
* Support for files under WP_LANG_DIR
|
205 |
* Last-Translator header added to PO files from Wordpress user
|
206 |
* Disabling cache when WP_DEBUG = true
|
207 |
-
* Better
|
208 |
* Added editor dropdown for switching between files
|
209 |
* Guessing of msgfmt path when not in settings
|
210 |
|
@@ -245,7 +251,7 @@ If you have a suggestion on how to improve the experience of using Loco Translat
|
|
245 |
|
246 |
== Upgrade Notice ==
|
247 |
|
248 |
-
= 1.5 =
|
249 |
* Bug fixes and improvements.
|
250 |
|
251 |
|
1 |
=== Plugin Name ===
|
2 |
Contributors: timwhitlock
|
3 |
+
Tags: translation, translators, localization, localisation, l10n, i18n, Gettext, PO, MO, productivity
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 4.1
|
6 |
+
Stable tag: 1.5.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
16 |
|
17 |
Features include:
|
18 |
|
19 |
+
* Built-in translation editor within Wordpress admin
|
20 |
* Create and update language files directly in your theme or plugin
|
21 |
* Extraction of translatable strings from your source code
|
22 |
* Native MO file compilation without the need for Gettext on your system
|
133 |
|
134 |
== Changelog ==
|
135 |
|
136 |
+
= 1.5.1 =
|
137 |
+
* Better handling of incorrectly named POT files
|
138 |
+
* Appended potential issue warnings on existing "file check" page
|
139 |
+
* Added loco_admin_capability filter for all plugin access
|
140 |
+
* Fixed editor shortcuts to avoid blocking alt-commands
|
141 |
+
|
142 |
= 1.5 =
|
143 |
* Added PO Editor keyboard shortcuts
|
144 |
* Added WPLANG warning for WP4 deprecation
|
210 |
* Support for files under WP_LANG_DIR
|
211 |
* Last-Translator header added to PO files from Wordpress user
|
212 |
* Disabling cache when WP_DEBUG = true
|
213 |
+
* Better editor integration, including source headers and file refs
|
214 |
* Added editor dropdown for switching between files
|
215 |
* Guessing of msgfmt path when not in settings
|
216 |
|
251 |
|
252 |
== Upgrade Notice ==
|
253 |
|
254 |
+
= 1.5.1 =
|
255 |
* Bug fixes and improvements.
|
256 |
|
257 |
|
tpl/admin-poedit.tpl.php
CHANGED
@@ -42,8 +42,7 @@ $modified or $pofiles[] = $path;
|
|
42 |
$poname = str_replace( '.mo', '.po', basename( $path ) );
|
43 |
foreach( $pofiles as $_path ):
|
44 |
$label = str_replace( '.mo', '.po', basename($_path) );
|
45 |
-
$
|
46 |
-
$url = LocoAdmin::uri( $package->get_query() + compact('poedit') );
|
47 |
?>
|
48 |
<option value="<?php Loco::h($url)?>" <?php $poname === $label and print('selected')?>>
|
49 |
<?php Loco::h($label)?>
|
42 |
$poname = str_replace( '.mo', '.po', basename( $path ) );
|
43 |
foreach( $pofiles as $_path ):
|
44 |
$label = str_replace( '.mo', '.po', basename($_path) );
|
45 |
+
$url = LocoAdmin::edit_uri( $package, $_path );
|
|
|
46 |
?>
|
47 |
<option value="<?php Loco::h($url)?>" <?php $poname === $label and print('selected')?>>
|
48 |
<?php Loco::h($label)?>
|