├── README.md ├── build ├── build.sh └── generateversions.php ├── core ├── chromelogger.php ├── constants.php ├── logging.php ├── parser.php ├── shd │ └── simple_html_dom.php ├── translate.php └── utils.php ├── css ├── admin.css ├── circle-flags.css ├── flags.css ├── keyboard.css ├── square-flags.css └── transposh.css ├── img ├── flags │ ├── ad.png │ ├── ae.png │ ├── af.png │ ├── ag.png │ ├── ai.png │ ├── al.png │ ├── am.png │ ├── an.png │ ├── ao.png │ ├── ar.png │ ├── as.png │ ├── at.png │ ├── au.png │ ├── aw.png │ ├── ax.png │ ├── az.png │ ├── ba.png │ ├── bb.png │ ├── bd.png │ ├── be.png │ ├── bf.png │ ├── bg.png │ ├── bh.png │ ├── bi.png │ ├── bj.png │ ├── bm.png │ ├── bn.png │ ├── bo.png │ ├── br.png │ ├── bs.png │ ├── bt.png │ ├── bv.png │ ├── bw.png │ ├── by.png │ ├── bz.png │ ├── ca.png │ ├── cc.png │ ├── cd.png │ ├── cf.png │ ├── cg.png │ ├── ch.png │ ├── ci.png │ ├── ck.png │ ├── cl.png │ ├── cm.png │ ├── cn.png │ ├── co.png │ ├── cr.png │ ├── cs.png │ ├── cu.png │ ├── cv.png │ ├── cx.png │ ├── cy.png │ ├── cz.png │ ├── de.png │ ├── dj.png │ ├── dk.png │ ├── dm.png │ ├── do.png │ ├── dz.png │ ├── ec.png │ ├── ee.png │ ├── eg.png │ ├── eh.png │ ├── england.png │ ├── er.png │ ├── es-ba.png │ ├── es-ca.png │ ├── es-ga.png │ ├── es.png │ ├── esperanto.png │ ├── et.png │ ├── europeanunion.png │ ├── fam.png │ ├── fi.png │ ├── fj.png │ ├── fk.png │ ├── fm.png │ ├── fo.png │ ├── fr.png │ ├── ga.png │ ├── gb-sc.png │ ├── gb-wa.png │ ├── gb.png │ ├── gd.png │ ├── ge.png │ ├── gf.png │ ├── gh.png │ ├── gi.png │ ├── gl.png │ ├── gm.png │ ├── gn.png │ ├── gp.png │ ├── gq.png │ ├── gr.png │ ├── gs.png │ ├── gt.png │ ├── gu.png │ ├── gw.png │ ├── gy.png │ ├── hk.png │ ├── hm.png │ ├── hn.png │ ├── hr.png │ ├── ht.png │ ├── hu.png │ ├── id.png │ ├── ie.png │ ├── il.png │ ├── in.png │ ├── io.png │ ├── iq.png │ ├── ir.png │ ├── is.png │ ├── it.png │ ├── jm.png │ ├── jo.png │ ├── jp.png │ ├── ke.png │ ├── kg.png │ ├── kh.png │ ├── ki.png │ ├── km.png │ ├── kn.png │ ├── kp.png │ ├── kr.png │ ├── krd.png │ ├── kw.png │ ├── ky.png │ ├── kz.png │ ├── la.png │ ├── lb.png │ ├── lc.png │ ├── li.png │ ├── lk.png │ ├── lr.png │ ├── ls.png │ ├── lt.png │ ├── lu.png │ ├── lv.png │ ├── ly-old.png │ ├── ly.png │ ├── ma.png │ ├── mc.png │ ├── md.png │ ├── me.png │ ├── mg.png │ ├── mh.png │ ├── mk.png │ ├── ml.png │ ├── mm.png │ ├── mn.png │ ├── mo.png │ ├── mp.png │ ├── mq.png │ ├── mr.png │ ├── ms.png │ ├── mt.png │ ├── mu.png │ ├── mv.png │ ├── mw.png │ ├── mx.png │ ├── my.png │ ├── mz.png │ ├── na.png │ ├── nc.png │ ├── ne.png │ ├── nf.png │ ├── ng.png │ ├── ni.png │ ├── nl.png │ ├── no.png │ ├── np.png │ ├── nr.png │ ├── nu.png │ ├── nz.png │ ├── om.png │ ├── pa.png │ ├── pe.png │ ├── pf.png │ ├── pg.png │ ├── ph.png │ ├── pk.png │ ├── pl.png │ ├── pm.png │ ├── pn.png │ ├── pr.png │ ├── ps.png │ ├── pt.png │ ├── pw.png │ ├── py.png │ ├── qa.png │ ├── re.png │ ├── ro.png │ ├── rs.png │ ├── ru-ba.png │ ├── ru-ta.png │ ├── ru.png │ ├── rw.png │ ├── sa.png │ ├── sb.png │ ├── sc.png │ ├── sd.png │ ├── se.png │ ├── sg.png │ ├── sh.png │ ├── si.png │ ├── sj.png │ ├── sk.png │ ├── sl.png │ ├── sm.png │ ├── sn.png │ ├── so.png │ ├── sr.png │ ├── st.png │ ├── sv.png │ ├── sy.png │ ├── sz.png │ ├── tc.png │ ├── td.png │ ├── tf.png │ ├── tg.png │ ├── th.png │ ├── tj.png │ ├── tk.png │ ├── tl.png │ ├── tm.png │ ├── tn.png │ ├── to.png │ ├── tr.png │ ├── tt.png │ ├── tv.png │ ├── tw.png │ ├── tz.png │ ├── ua.png │ ├── ug.png │ ├── um.png │ ├── us-ha.png │ ├── us.png │ ├── uy.png │ ├── uz.png │ ├── va.png │ ├── vc.png │ ├── ve.png │ ├── vg.png │ ├── vi.png │ ├── vn.png │ ├── vu.png │ ├── wf.png │ ├── ws.png │ ├── ye.png │ ├── yt.png │ ├── za.png │ ├── zm.png │ └── zw.png ├── flags92.png ├── tplogo-page.svg ├── tplogo.png ├── tplogo.svg └── tplogo32.png ├── index.html ├── js ├── admin │ ├── backendeditor.js │ ├── backendtranslate.js │ ├── commentslang.js │ ├── contexthelp.js │ ├── engines.js │ ├── languages.js │ ├── utils.js │ └── warningclose.js ├── jquery.ui.menu.js ├── keyboard.js ├── l │ ├── de.js │ ├── es.js │ ├── fa.js │ ├── fr.js │ ├── he.js │ ├── it.js │ ├── newlang.js.pot │ ├── nl.js │ ├── ru.js │ └── tr.js ├── lazy.js ├── transposh.js └── transposhedit.js ├── langs ├── transposh-de_DE.mo ├── transposh-de_DE.po ├── transposh-es_ES.mo ├── transposh-es_ES.po ├── transposh-fa_IR.mo ├── transposh-fa_IR.po ├── transposh-fr_FR.mo ├── transposh-fr_FR.po ├── transposh-he_IL.mo ├── transposh-he_IL.po ├── transposh-it_IT.mo ├── transposh-it_IT.po ├── transposh-nl_NL.mo ├── transposh-nl_NL.po ├── transposh-pt_BR.mo ├── transposh-pt_BR.po ├── transposh-ru_RU.mo ├── transposh-ru_RU.po ├── transposh-sr_RS.mo ├── transposh-sr_RS.po ├── transposh-tr_TR.mo ├── transposh-tr_TR.po └── transposh.pot ├── readme.txt ├── scripts ├── cleanup_db.sh ├── makeflagscss-kapowaz.php └── makeflagscss.php ├── test └── core │ ├── parserTest.php │ └── utilsTest.php ├── transposh.php ├── widgets ├── default │ └── tpw_default.php ├── dropdown │ ├── arrow.png │ ├── tpw_image_dropdown.css │ ├── tpw_image_dropdown.js │ └── tpw_image_dropdown.php ├── flags │ ├── flags92.png │ ├── tpw_flags.css │ ├── tpw_flags.php │ ├── tpw_flags_css.css │ └── tpw_flags_css.php ├── flagsemoji │ └── tpw_flagsemoji.php ├── flagslist │ ├── tpw_list_with_flags.php │ └── tpw_list_with_flags_css.php └── select2 │ ├── select2.css │ ├── select2.js │ ├── select2.min.js │ ├── select2.png │ ├── select2x2.png │ ├── spinner.gif │ ├── tpw_select2.js │ └── tpw_select2.php └── wp ├── transposh_3rdparty.php ├── transposh_admin.php ├── transposh_ajax.php ├── transposh_backup.php ├── transposh_db.php ├── transposh_editor.php ├── transposh_mail.php ├── transposh_options.php ├── transposh_postpublish.php └── transposh_widget.php /build/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Script for packaging Transposh's plugin for WordPress 5 | # 6 | 7 | VERSION=$1 8 | ZIPME=$2 9 | COPYTO=$3 10 | MINIFY=true 11 | 12 | # 13 | # Init replacement vars 14 | # 15 | DATE=`date -R` 16 | YEAR=`date +%Y` 17 | 18 | DIRS="js css img langs widgets wp" 19 | 20 | if [ -z $VERSION ]; then 21 | echo "Must enter a version number !!!" 22 | echo "Usage: $0 0.1.0 [[zip] [targetdir]]" 23 | exit 24 | fi 25 | 26 | TRANSPOSH_DIR=/tmp/transposh-translation-filter-for-wordpress 27 | 28 | echo "Building package for WordPress plugin version: $VERSION"; 29 | 30 | # Cleanup tmp dir 31 | rm -r $TRANSPOSH_DIR 2>/dev/null 32 | mkdir $TRANSPOSH_DIR 33 | echo "cleaned up $TRANSPOSH_DIR directory" 34 | echo 35 | 36 | # 37 | # Add sub directories 38 | # 39 | for DIR in $DIRS; do 40 | cp -r $DIR $TRANSPOSH_DIR 41 | echo "added sub-directory $DIR" 42 | done 43 | echo 44 | 45 | # 46 | # Create core directory 47 | # 48 | 49 | mkdir $TRANSPOSH_DIR/core 50 | mkdir $TRANSPOSH_DIR/core/shd 51 | mkdir $TRANSPOSH_DIR/core/jsonwrapper 52 | 53 | # 54 | # Add non-php files 55 | # 56 | 57 | for FTYPE in txt; do 58 | cp *.$FTYPE $TRANSPOSH_DIR 59 | echo "added $FTYPE files" 60 | done 61 | echo 62 | 63 | # 64 | # Add php files while processing versions 65 | # 66 | 67 | PHPFILES=`find . -maxdepth 4 -iname '*.php' -not -path "./build/*" -not -path "./scripts/*" -not -path "./resources/*" -not -path "./test/*"` 68 | 69 | echo "Adding .php files" 70 | for file in $PHPFILES; do 71 | sed "s/%VERSION%/$VERSION/;s/%DATE%/$DATE/;s/%YEAR%/$YEAR/;" $file > $TRANSPOSH_DIR/$file 72 | #php build/generateversions.php $TRANSPOSH_DIR/$file full > /tmp/inp_nope 73 | #cp /tmp/inp_nope $TRANSPOSH_DIR/$file 74 | #rm /tmp/inp_nope 75 | echo "added $file" 76 | done; 77 | echo 78 | 79 | # 80 | # Add the index.html 81 | # 82 | 83 | echo "Adding index.html" 84 | cp index.html $TRANSPOSH_DIR/index.html 85 | 86 | # 87 | # Fixing version in readme.txt 88 | # 89 | 90 | echo "fixing version in readme.txt to $VERSION" 91 | sed "s/%VERSION%/$VERSION/;" readme.txt > $TRANSPOSH_DIR/readme.txt 92 | 93 | # Those are the files that are lazy loaded, we make sure they will be read by the browser with the sourceURL comment 94 | LAZYLIST="transposhedit.js de.js es.js fa.js fr.js he.js it.js nl.js ru.js tr.js keyboard.js lazy.js jquery.ui.menu.js" 95 | if [ $MINIFY == true ]; then 96 | echo "Minify .js files" 97 | for file in `find ./js -maxdepth 3 -iname '*.js'`; do 98 | echo "minifying $file" 99 | BASENAME=`basename $file` 100 | DIRNAME=`dirname $file` 101 | uglifyjs --comments --compress --mangle --source-map "base='$DIRNAME',url='$BASENAME.map',includeSources" $file -o $TRANSPOSH_DIR/$file 102 | 103 | if [[ $LAZYLIST == *$BASENAME* ]] # lazy loaded? 104 | then 105 | echo -e -n "\n//# sourceURL=/wp-content/plugins/transposh-translation-filter-for-wordpress${DIRNAME:1}/$BASENAME" >> $TRANSPOSH_DIR/$file 106 | fi 107 | done 108 | 109 | echo "Minify .css files" 110 | for file in `find . -maxdepth 2 -iname '*.css' -not -name 'circle-flags.css' -not -name 'flags.css' -not -name 'square-flags.css'`; do 111 | echo "minifying $file" 112 | java -jar /root/yui/yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar $file -o $TRANSPOSH_DIR/$file 113 | done; 114 | fi 115 | 116 | # 117 | # Generate zip file 118 | # 119 | 120 | if [ "$ZIPME" == 'zip' ]; then 121 | cd $TRANSPOSH_DIR 122 | cd .. 123 | echo "zipping..." 124 | zip -9rq "transposh.$VERSION.zip" transposh-translation-filter-for-wordpress 125 | echo "rezipping..." 126 | advzip -z4 "transposh.$VERSION.zip" 127 | cd - >/dev/null 128 | echo "transposh.$VERSION.zip is ready" 129 | fi 130 | 131 | # 132 | # Copy to target 133 | # 134 | 135 | if [ "$COPYTO" != '' ]; then 136 | echo "should copy to $COPYTO" 137 | cd $TRANSPOSH_DIR 138 | cp -rp * $COPYTO 139 | cd - >/dev/null 140 | fi -------------------------------------------------------------------------------- /build/generateversions.php: -------------------------------------------------------------------------------- 1 | printout) { 52 | ob_start(); 53 | } 54 | } 55 | 56 | /** 57 | * Print a message to log. 58 | * @param mixed $msg 59 | * @param int $severity 60 | */ 61 | function do_log($msg, $severity = 3, $do_backtrace = false, $nest = 0) { 62 | //globalvarlogging 63 | if ($severity<$this->global_log) { 64 | $this->logstr .= $msg."
"; 65 | } 66 | if ($severity <= $this->debug_level) { 67 | if ($this->show_caller) { 68 | $trace = debug_backtrace(); 69 | if ($do_backtrace) 70 | ChromePhp_tp::log($trace[3]); 71 | if (isset($trace[2 + $nest]['class'])) { 72 | $log_prefix = str_pad("{$trace[2 + $nest]['class']}::{$trace[2 + $nest]['function']} {$trace[1 + $nest]['line']}", 55 + $nest, '_'); 73 | } else { 74 | $prefile = substr($trace[1 + $nest]['file'], strrpos($trace[1 + $nest]['file'], "/")); 75 | $log_prefix = str_pad("{$prefile}::{$trace[1 + $nest]['function']} {$trace[1 + $nest]['line']}", 55 + $nest, '_'); 76 | } 77 | } 78 | if (isset($this->logfile) && $this->logfile) { 79 | if (!is_array($msg) && !is_object($msg)) { 80 | error_log(date(DATE_W3C) . " $log_prefix: " . $msg . "\n", 3, $this->logfile); 81 | } else { 82 | if (is_array($msg)) { 83 | error_log(date(DATE_W3C) . " $log_prefix: Array start\n", 3, $this->logfile); 84 | } else { 85 | error_log(date(DATE_W3C) . " $log_prefix: Object start\n", 3, $this->logfile); 86 | } 87 | foreach ($msg as $key => $item) { 88 | if (!is_array($item)) { 89 | if (!is_object($item) || method_exists($item, '__toString')) 90 | error_log(date(DATE_W3C) . " $log_prefix: $key => $item\n", 3, $this->logfile); 91 | } else { 92 | error_log(date(DATE_W3C) . " $log_prefix: subarray -> $key\n", 3, $this->logfile); 93 | $this->do_log($item, $severity, false, $nest + 1); 94 | } 95 | } 96 | error_log(date(DATE_W3C) . " $log_prefix: Array stop\n", 3, $this->logfile); 97 | } 98 | } 99 | if ($this->printout/* || !isset($this->firephp) */) { 100 | echo "$log_prefix:$msg"; 101 | echo ($this->eolprint) ? "\n" : "
"; 102 | } else { 103 | if (!transposh_utils::get_clean_server_var( 'REMOTE_ADDR') || $this->remoteip != transposh_utils::get_clean_server_var( 'REMOTE_ADDR')) { 104 | return; 105 | } 106 | if ((is_array($msg) || is_object($msg)) && $this->show_caller) { 107 | ChromePhp_tp::groupCollapsed("$log_prefix: object/array"); 108 | ChromePhp_tp::log($msg); 109 | ChromePhp_tp::groupEnd(); 110 | } else { 111 | if (is_array($msg) || is_object($msg)) { 112 | ChromePhp_tp::log($msg); 113 | } else { 114 | ChromePhp_tp::log("$log_prefix:$msg"); 115 | } 116 | } 117 | } 118 | } 119 | } 120 | 121 | /** 122 | * Gets singleton instance of logger 123 | * @param boolean $AutoCreate 124 | * @return logger 125 | */ 126 | public static function getInstance($AutoCreate = false) { 127 | if ($AutoCreate === true && !self::$instance) { 128 | self::init(); 129 | } 130 | return self::$instance; 131 | } 132 | 133 | /** 134 | * Creates logger object and stores it for singleton access 135 | * @return logger 136 | */ 137 | public static function init() { 138 | return self::$instance = new self(); 139 | } 140 | 141 | public function set_debug_level($int) { 142 | $this->debug_level = $int; 143 | } 144 | 145 | public function set_global_log($int) { 146 | if ($int == 0) {$this->logstr = "";} 147 | $this->global_log = $int; 148 | } 149 | 150 | public function get_logstr() { 151 | return $this->logstr; 152 | } 153 | 154 | public function set_log_file($filename) { 155 | $this->logfile = $filename; 156 | } 157 | 158 | public function set_remoteip($remoteip) { 159 | $this->remoteip = $remoteip; 160 | } 161 | 162 | } 163 | 164 | // We create a global singelton instance 165 | $GLOBALS['tp_logger'] = tp_logger::getInstance(true); 166 | 167 | /** 168 | * This function provides easier access to logging using the singleton object 169 | * @param mixed $msg 170 | * @param int $severity 171 | */ 172 | /* function tp_logger($msg, $severity = 3, $do_backtrace = false) { 173 | $GLOBALS['tp_logger']->do_log($msg, $severity, $do_backtrace); 174 | } */ 175 | 176 | /* 177 | * sample of how to modify logging parameters from anywhere 178 | * 179 | $GLOBALS['tp_logger'] = tp_logger::getInstance(true); 180 | $GLOBALS['tp_logger']->show_caller = true; 181 | */ 182 | ?> -------------------------------------------------------------------------------- /css/keyboard.css: -------------------------------------------------------------------------------- 1 | #keyboardInputMaster { 2 | position:absolute; 3 | font:normal 11px Arial,sans-serif; 4 | border-top:1px solid #eeeeee; 5 | border-right:1px solid #888888; 6 | border-bottom:1px solid #444444; 7 | border-left:1px solid #cccccc; 8 | -webkit-border-radius:0.6em; 9 | -moz-border-radius:0.6em; 10 | border-radius:0.6em; 11 | -webkit-box-shadow:0px 2px 10px #444444; 12 | -moz-box-shadow:0px 2px 10px #444444; 13 | box-shadow:0px 2px 10px #444444; 14 | opacity:0.95; 15 | filter:alpha(opacity=95); 16 | background-color:#dddddd; 17 | text-align:left; 18 | z-index:1000000; 19 | width:auto; 20 | height:auto; 21 | min-width:0; 22 | min-height:0; 23 | margin:0px; 24 | padding:0px; 25 | line-height:normal; 26 | -moz-user-select:none; 27 | cursor:default; 28 | } 29 | #keyboardInputMaster * { 30 | position:static; 31 | color:#000000; 32 | background:transparent; 33 | font:normal 11px Arial,sans-serif; 34 | width:auto; 35 | height:auto; 36 | min-width:0; 37 | min-height:0; 38 | margin:0px; 39 | padding:0px; 40 | border:0px none; 41 | outline:0px; 42 | vertical-align:baseline; 43 | line-height:1.3em; 44 | } 45 | #keyboardInputMaster.keyboardInputSize1, 46 | #keyboardInputMaster.keyboardInputSize1 * { 47 | font-size:9px; 48 | } 49 | #keyboardInputMaster.keyboardInputSize3, 50 | #keyboardInputMaster.keyboardInputSize3 * { 51 | font-size:13px; 52 | } 53 | #keyboardInputMaster.keyboardInputSize4, 54 | #keyboardInputMaster.keyboardInputSize4 * { 55 | font-size:16px; 56 | } 57 | #keyboardInputMaster.keyboardInputSize5, 58 | #keyboardInputMaster.keyboardInputSize5 * { 59 | font-size:20px; 60 | } 61 | 62 | #keyboardInputMaster thead tr th { 63 | padding:0.3em 0.3em 0.1em 0.3em; 64 | background-color:#999999; 65 | white-space:nowrap; 66 | text-align:right; 67 | -webkit-border-radius:0.6em 0.6em 0px 0px; 68 | -moz-border-radius:0.6em 0.6em 0px 0px; 69 | border-radius:0.6em 0.6em 0px 0px; 70 | } 71 | #keyboardInputMaster thead tr th div { 72 | float:left; 73 | font-size:130% !important; 74 | height:1.3em; 75 | font-weight:bold; 76 | position:relative; 77 | z-index:1; 78 | margin-right:0.5em; 79 | cursor:pointer; 80 | background-color:transparent; 81 | } 82 | #keyboardInputMaster thead tr th div ol { 83 | position:absolute; 84 | left:0px; 85 | top:90%; 86 | list-style-type:none; 87 | height:9.4em; 88 | overflow-y:auto; 89 | overflow-x:hidden; 90 | background-color:#f6f6f6; 91 | border:1px solid #999999; 92 | display:none; 93 | text-align:left; 94 | width:12em; 95 | } 96 | #keyboardInputMaster thead tr th div ol li { 97 | padding:0.2em 0.4em; 98 | cursor:pointer; 99 | white-space:nowrap; 100 | width:12em; 101 | } 102 | #keyboardInputMaster thead tr th div ol li.selected { 103 | background-color:#ffffcc; 104 | } 105 | #keyboardInputMaster thead tr th div ol li:hover, 106 | #keyboardInputMaster thead tr th div ol li.hover { 107 | background-color:#dddddd; 108 | } 109 | #keyboardInputMaster thead tr th span, 110 | #keyboardInputMaster thead tr th strong, 111 | #keyboardInputMaster thead tr th small, 112 | #keyboardInputMaster thead tr th big { 113 | display:inline-block; 114 | padding:0px 0.4em; 115 | height:1.4em; 116 | line-height:1.4em; 117 | border-top:1px solid #e5e5e5; 118 | border-right:1px solid #5d5d5d; 119 | border-bottom:1px solid #5d5d5d; 120 | border-left:1px solid #e5e5e5; 121 | background-color:#cccccc; 122 | cursor:pointer; 123 | margin:0px 0px 0px 0.3em; 124 | -webkit-border-radius:0.3em; 125 | -moz-border-radius:0.3em; 126 | border-radius:0.3em; 127 | vertical-align:middle; 128 | -webkit-transition:background-color .15s ease-in-out; 129 | -o-transition:background-color .15s ease-in-out; 130 | transition:background-color .15s ease-in-out; 131 | } 132 | #keyboardInputMaster thead tr th strong { 133 | font-weight:bold; 134 | } 135 | #keyboardInputMaster thead tr th small { 136 | -webkit-border-radius:0.3em 0px 0px 0.3em; 137 | -moz-border-radius:0.3em 0px 0px 0.3em; 138 | border-radius:0.3em 0px 0px 0.3em; 139 | border-right:1px solid #aaaaaa; 140 | padding:0px 0.2em 0px 0.3em; 141 | } 142 | #keyboardInputMaster thead tr th big { 143 | -webkit-border-radius:0px 0.3em 0.3em 0px; 144 | -moz-border-radius:0px 0.3em 0.3em 0px; 145 | border-radius:0px 0.3em 0.3em 0px; 146 | border-left:0px none; 147 | margin:0px; 148 | padding:0px 0.3em 0px 0.2em; 149 | } 150 | #keyboardInputMaster thead tr th span:hover, 151 | #keyboardInputMaster thead tr th span.hover, 152 | #keyboardInputMaster thead tr th strong:hover, 153 | #keyboardInputMaster thead tr th strong.hover, 154 | #keyboardInputMaster thead tr th small:hover, 155 | #keyboardInputMaster thead tr th small.hover, 156 | #keyboardInputMaster thead tr th big:hover, 157 | #keyboardInputMaster thead tr th big.hover { 158 | background-color:#dddddd; 159 | } 160 | 161 | #keyboardInputMaster tbody tr td { 162 | text-align:left; 163 | padding:0.2em 0.3em 0.3em 0.3em; 164 | vertical-align:top; 165 | } 166 | #keyboardInputMaster tbody tr td div { 167 | text-align:center; 168 | position:relative; 169 | zoom:1; 170 | } 171 | #keyboardInputMaster tbody tr td table { 172 | white-space:nowrap; 173 | width:100%; 174 | border-collapse:separate; 175 | border-spacing:0px; 176 | } 177 | #keyboardInputMaster tbody tr td#keyboardInputNumpad table { 178 | margin-left:0.2em; 179 | width:auto; 180 | } 181 | #keyboardInputMaster tbody tr td table.keyboardInputCenter { 182 | width:auto; 183 | margin:0px auto; 184 | } 185 | #keyboardInputMaster tbody tr td table tbody tr td { 186 | vertical-align:middle; 187 | padding:0px 0.45em; 188 | white-space:pre; 189 | height:1.8em; 190 | font-family:'Lucida Console','Arial Unicode MS',monospace; 191 | border-top:1px solid #e5e5e5; 192 | border-right:1px solid #5d5d5d; 193 | border-bottom:1px solid #5d5d5d; 194 | border-left:1px solid #e5e5e5; 195 | background-color:#eeeeee; 196 | cursor:default; 197 | min-width:0.75em; 198 | -webkit-border-radius:0.2em; 199 | -moz-border-radius:0.2em; 200 | border-radius:0.2em; 201 | -webkit-transition:background-color .15s ease-in-out; 202 | -o-transition:background-color .15s ease-in-out; 203 | transition:background-color .15s ease-in-out; 204 | } 205 | #keyboardInputMaster tbody tr td table tbody tr td.last { 206 | width:99%; 207 | } 208 | #keyboardInputMaster tbody tr td table tbody tr td.space { 209 | padding:0px 4em; 210 | } 211 | #keyboardInputMaster tbody tr td table tbody tr td.deadkey { 212 | background-color:#ccccdd; 213 | } 214 | #keyboardInputMaster tbody tr td table tbody tr td.target { 215 | background-color:#ddddcc; 216 | } 217 | #keyboardInputMaster tbody tr td table tbody tr td:hover, 218 | #keyboardInputMaster tbody tr td table tbody tr td.hover { 219 | border-top:1px solid #d5d5d5; 220 | border-right:1px solid #555555; 221 | border-bottom:1px solid #555555; 222 | border-left:1px solid #d5d5d5; 223 | background-color:#cccccc; 224 | } 225 | #keyboardInputMaster thead tr th span:active, 226 | #keyboardInputMaster thead tr th span.pressed, 227 | #keyboardInputMaster tbody tr td table tbody tr td:active, 228 | #keyboardInputMaster tbody tr td table tbody tr td.pressed { 229 | border-top:1px solid #555555 !important; 230 | border-right:1px solid #d5d5d5; 231 | border-bottom:1px solid #d5d5d5; 232 | border-left:1px solid #555555; 233 | background-color:#cccccc; 234 | } 235 | 236 | #keyboardInputMaster tbody tr td table tbody tr td small { 237 | display:block; 238 | text-align:center; 239 | font-size:0.6em !important; 240 | line-height:1.1em; 241 | } 242 | 243 | #keyboardInputMaster tbody tr td div label { 244 | position:absolute; 245 | bottom:0.2em; 246 | left:0.3em; 247 | } 248 | #keyboardInputMaster tbody tr td div label input { 249 | background-color:#f6f6f6; 250 | vertical-align:middle; 251 | font-size:inherit; 252 | width:1.1em; 253 | height:1.1em; 254 | } 255 | #keyboardInputMaster tbody tr td div var { 256 | position:absolute; 257 | bottom:0px; 258 | right:3px; 259 | font-weight:bold; 260 | font-style:italic; 261 | color:#444444; 262 | } 263 | 264 | .keyboardInputInitiator { 265 | margin:0px 3px; 266 | vertical-align:middle; 267 | cursor:pointer; 268 | } -------------------------------------------------------------------------------- /img/flags/ad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ad.png -------------------------------------------------------------------------------- /img/flags/ae.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ae.png -------------------------------------------------------------------------------- /img/flags/af.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/af.png -------------------------------------------------------------------------------- /img/flags/ag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ag.png -------------------------------------------------------------------------------- /img/flags/ai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ai.png -------------------------------------------------------------------------------- /img/flags/al.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/al.png -------------------------------------------------------------------------------- /img/flags/am.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/am.png -------------------------------------------------------------------------------- /img/flags/an.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/an.png -------------------------------------------------------------------------------- /img/flags/ao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ao.png -------------------------------------------------------------------------------- /img/flags/ar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ar.png -------------------------------------------------------------------------------- /img/flags/as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/as.png -------------------------------------------------------------------------------- /img/flags/at.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/at.png -------------------------------------------------------------------------------- /img/flags/au.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/au.png -------------------------------------------------------------------------------- /img/flags/aw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/aw.png -------------------------------------------------------------------------------- /img/flags/ax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ax.png -------------------------------------------------------------------------------- /img/flags/az.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/az.png -------------------------------------------------------------------------------- /img/flags/ba.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ba.png -------------------------------------------------------------------------------- /img/flags/bb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/bb.png -------------------------------------------------------------------------------- /img/flags/bd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/bd.png -------------------------------------------------------------------------------- /img/flags/be.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/be.png -------------------------------------------------------------------------------- /img/flags/bf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/bf.png -------------------------------------------------------------------------------- /img/flags/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/bg.png -------------------------------------------------------------------------------- /img/flags/bh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/bh.png -------------------------------------------------------------------------------- /img/flags/bi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/bi.png -------------------------------------------------------------------------------- /img/flags/bj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/bj.png -------------------------------------------------------------------------------- /img/flags/bm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/bm.png -------------------------------------------------------------------------------- /img/flags/bn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/bn.png -------------------------------------------------------------------------------- /img/flags/bo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/bo.png -------------------------------------------------------------------------------- /img/flags/br.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/br.png -------------------------------------------------------------------------------- /img/flags/bs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/bs.png -------------------------------------------------------------------------------- /img/flags/bt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/bt.png -------------------------------------------------------------------------------- /img/flags/bv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/bv.png -------------------------------------------------------------------------------- /img/flags/bw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/bw.png -------------------------------------------------------------------------------- /img/flags/by.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/by.png -------------------------------------------------------------------------------- /img/flags/bz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/bz.png -------------------------------------------------------------------------------- /img/flags/ca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ca.png -------------------------------------------------------------------------------- /img/flags/cc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/cc.png -------------------------------------------------------------------------------- /img/flags/cd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/cd.png -------------------------------------------------------------------------------- /img/flags/cf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/cf.png -------------------------------------------------------------------------------- /img/flags/cg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/cg.png -------------------------------------------------------------------------------- /img/flags/ch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ch.png -------------------------------------------------------------------------------- /img/flags/ci.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ci.png -------------------------------------------------------------------------------- /img/flags/ck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ck.png -------------------------------------------------------------------------------- /img/flags/cl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/cl.png -------------------------------------------------------------------------------- /img/flags/cm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/cm.png -------------------------------------------------------------------------------- /img/flags/cn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/cn.png -------------------------------------------------------------------------------- /img/flags/co.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/co.png -------------------------------------------------------------------------------- /img/flags/cr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/cr.png -------------------------------------------------------------------------------- /img/flags/cs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/cs.png -------------------------------------------------------------------------------- /img/flags/cu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/cu.png -------------------------------------------------------------------------------- /img/flags/cv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/cv.png -------------------------------------------------------------------------------- /img/flags/cx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/cx.png -------------------------------------------------------------------------------- /img/flags/cy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/cy.png -------------------------------------------------------------------------------- /img/flags/cz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/cz.png -------------------------------------------------------------------------------- /img/flags/de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/de.png -------------------------------------------------------------------------------- /img/flags/dj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/dj.png -------------------------------------------------------------------------------- /img/flags/dk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/dk.png -------------------------------------------------------------------------------- /img/flags/dm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/dm.png -------------------------------------------------------------------------------- /img/flags/do.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/do.png -------------------------------------------------------------------------------- /img/flags/dz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/dz.png -------------------------------------------------------------------------------- /img/flags/ec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ec.png -------------------------------------------------------------------------------- /img/flags/ee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ee.png -------------------------------------------------------------------------------- /img/flags/eg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/eg.png -------------------------------------------------------------------------------- /img/flags/eh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/eh.png -------------------------------------------------------------------------------- /img/flags/england.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/england.png -------------------------------------------------------------------------------- /img/flags/er.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/er.png -------------------------------------------------------------------------------- /img/flags/es-ba.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/es-ba.png -------------------------------------------------------------------------------- /img/flags/es-ca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/es-ca.png -------------------------------------------------------------------------------- /img/flags/es-ga.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/es-ga.png -------------------------------------------------------------------------------- /img/flags/es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/es.png -------------------------------------------------------------------------------- /img/flags/esperanto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/esperanto.png -------------------------------------------------------------------------------- /img/flags/et.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/et.png -------------------------------------------------------------------------------- /img/flags/europeanunion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/europeanunion.png -------------------------------------------------------------------------------- /img/flags/fam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/fam.png -------------------------------------------------------------------------------- /img/flags/fi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/fi.png -------------------------------------------------------------------------------- /img/flags/fj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/fj.png -------------------------------------------------------------------------------- /img/flags/fk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/fk.png -------------------------------------------------------------------------------- /img/flags/fm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/fm.png -------------------------------------------------------------------------------- /img/flags/fo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/fo.png -------------------------------------------------------------------------------- /img/flags/fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/fr.png -------------------------------------------------------------------------------- /img/flags/ga.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ga.png -------------------------------------------------------------------------------- /img/flags/gb-sc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gb-sc.png -------------------------------------------------------------------------------- /img/flags/gb-wa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gb-wa.png -------------------------------------------------------------------------------- /img/flags/gb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gb.png -------------------------------------------------------------------------------- /img/flags/gd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gd.png -------------------------------------------------------------------------------- /img/flags/ge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ge.png -------------------------------------------------------------------------------- /img/flags/gf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gf.png -------------------------------------------------------------------------------- /img/flags/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gh.png -------------------------------------------------------------------------------- /img/flags/gi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gi.png -------------------------------------------------------------------------------- /img/flags/gl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gl.png -------------------------------------------------------------------------------- /img/flags/gm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gm.png -------------------------------------------------------------------------------- /img/flags/gn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gn.png -------------------------------------------------------------------------------- /img/flags/gp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gp.png -------------------------------------------------------------------------------- /img/flags/gq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gq.png -------------------------------------------------------------------------------- /img/flags/gr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gr.png -------------------------------------------------------------------------------- /img/flags/gs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gs.png -------------------------------------------------------------------------------- /img/flags/gt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gt.png -------------------------------------------------------------------------------- /img/flags/gu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gu.png -------------------------------------------------------------------------------- /img/flags/gw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gw.png -------------------------------------------------------------------------------- /img/flags/gy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/gy.png -------------------------------------------------------------------------------- /img/flags/hk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/hk.png -------------------------------------------------------------------------------- /img/flags/hm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/hm.png -------------------------------------------------------------------------------- /img/flags/hn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/hn.png -------------------------------------------------------------------------------- /img/flags/hr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/hr.png -------------------------------------------------------------------------------- /img/flags/ht.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ht.png -------------------------------------------------------------------------------- /img/flags/hu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/hu.png -------------------------------------------------------------------------------- /img/flags/id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/id.png -------------------------------------------------------------------------------- /img/flags/ie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ie.png -------------------------------------------------------------------------------- /img/flags/il.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/il.png -------------------------------------------------------------------------------- /img/flags/in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/in.png -------------------------------------------------------------------------------- /img/flags/io.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/io.png -------------------------------------------------------------------------------- /img/flags/iq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/iq.png -------------------------------------------------------------------------------- /img/flags/ir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ir.png -------------------------------------------------------------------------------- /img/flags/is.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/is.png -------------------------------------------------------------------------------- /img/flags/it.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/it.png -------------------------------------------------------------------------------- /img/flags/jm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/jm.png -------------------------------------------------------------------------------- /img/flags/jo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/jo.png -------------------------------------------------------------------------------- /img/flags/jp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/jp.png -------------------------------------------------------------------------------- /img/flags/ke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ke.png -------------------------------------------------------------------------------- /img/flags/kg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/kg.png -------------------------------------------------------------------------------- /img/flags/kh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/kh.png -------------------------------------------------------------------------------- /img/flags/ki.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ki.png -------------------------------------------------------------------------------- /img/flags/km.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/km.png -------------------------------------------------------------------------------- /img/flags/kn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/kn.png -------------------------------------------------------------------------------- /img/flags/kp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/kp.png -------------------------------------------------------------------------------- /img/flags/kr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/kr.png -------------------------------------------------------------------------------- /img/flags/krd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/krd.png -------------------------------------------------------------------------------- /img/flags/kw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/kw.png -------------------------------------------------------------------------------- /img/flags/ky.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ky.png -------------------------------------------------------------------------------- /img/flags/kz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/kz.png -------------------------------------------------------------------------------- /img/flags/la.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/la.png -------------------------------------------------------------------------------- /img/flags/lb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/lb.png -------------------------------------------------------------------------------- /img/flags/lc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/lc.png -------------------------------------------------------------------------------- /img/flags/li.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/li.png -------------------------------------------------------------------------------- /img/flags/lk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/lk.png -------------------------------------------------------------------------------- /img/flags/lr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/lr.png -------------------------------------------------------------------------------- /img/flags/ls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ls.png -------------------------------------------------------------------------------- /img/flags/lt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/lt.png -------------------------------------------------------------------------------- /img/flags/lu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/lu.png -------------------------------------------------------------------------------- /img/flags/lv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/lv.png -------------------------------------------------------------------------------- /img/flags/ly-old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ly-old.png -------------------------------------------------------------------------------- /img/flags/ly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ly.png -------------------------------------------------------------------------------- /img/flags/ma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ma.png -------------------------------------------------------------------------------- /img/flags/mc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mc.png -------------------------------------------------------------------------------- /img/flags/md.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/md.png -------------------------------------------------------------------------------- /img/flags/me.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/me.png -------------------------------------------------------------------------------- /img/flags/mg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mg.png -------------------------------------------------------------------------------- /img/flags/mh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mh.png -------------------------------------------------------------------------------- /img/flags/mk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mk.png -------------------------------------------------------------------------------- /img/flags/ml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ml.png -------------------------------------------------------------------------------- /img/flags/mm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mm.png -------------------------------------------------------------------------------- /img/flags/mn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mn.png -------------------------------------------------------------------------------- /img/flags/mo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mo.png -------------------------------------------------------------------------------- /img/flags/mp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mp.png -------------------------------------------------------------------------------- /img/flags/mq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mq.png -------------------------------------------------------------------------------- /img/flags/mr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mr.png -------------------------------------------------------------------------------- /img/flags/ms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ms.png -------------------------------------------------------------------------------- /img/flags/mt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mt.png -------------------------------------------------------------------------------- /img/flags/mu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mu.png -------------------------------------------------------------------------------- /img/flags/mv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mv.png -------------------------------------------------------------------------------- /img/flags/mw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mw.png -------------------------------------------------------------------------------- /img/flags/mx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mx.png -------------------------------------------------------------------------------- /img/flags/my.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/my.png -------------------------------------------------------------------------------- /img/flags/mz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/mz.png -------------------------------------------------------------------------------- /img/flags/na.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/na.png -------------------------------------------------------------------------------- /img/flags/nc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/nc.png -------------------------------------------------------------------------------- /img/flags/ne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ne.png -------------------------------------------------------------------------------- /img/flags/nf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/nf.png -------------------------------------------------------------------------------- /img/flags/ng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ng.png -------------------------------------------------------------------------------- /img/flags/ni.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ni.png -------------------------------------------------------------------------------- /img/flags/nl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/nl.png -------------------------------------------------------------------------------- /img/flags/no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/no.png -------------------------------------------------------------------------------- /img/flags/np.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/np.png -------------------------------------------------------------------------------- /img/flags/nr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/nr.png -------------------------------------------------------------------------------- /img/flags/nu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/nu.png -------------------------------------------------------------------------------- /img/flags/nz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/nz.png -------------------------------------------------------------------------------- /img/flags/om.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/om.png -------------------------------------------------------------------------------- /img/flags/pa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/pa.png -------------------------------------------------------------------------------- /img/flags/pe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/pe.png -------------------------------------------------------------------------------- /img/flags/pf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/pf.png -------------------------------------------------------------------------------- /img/flags/pg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/pg.png -------------------------------------------------------------------------------- /img/flags/ph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ph.png -------------------------------------------------------------------------------- /img/flags/pk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/pk.png -------------------------------------------------------------------------------- /img/flags/pl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/pl.png -------------------------------------------------------------------------------- /img/flags/pm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/pm.png -------------------------------------------------------------------------------- /img/flags/pn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/pn.png -------------------------------------------------------------------------------- /img/flags/pr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/pr.png -------------------------------------------------------------------------------- /img/flags/ps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ps.png -------------------------------------------------------------------------------- /img/flags/pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/pt.png -------------------------------------------------------------------------------- /img/flags/pw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/pw.png -------------------------------------------------------------------------------- /img/flags/py.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/py.png -------------------------------------------------------------------------------- /img/flags/qa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/qa.png -------------------------------------------------------------------------------- /img/flags/re.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/re.png -------------------------------------------------------------------------------- /img/flags/ro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ro.png -------------------------------------------------------------------------------- /img/flags/rs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/rs.png -------------------------------------------------------------------------------- /img/flags/ru-ba.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ru-ba.png -------------------------------------------------------------------------------- /img/flags/ru-ta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ru-ta.png -------------------------------------------------------------------------------- /img/flags/ru.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ru.png -------------------------------------------------------------------------------- /img/flags/rw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/rw.png -------------------------------------------------------------------------------- /img/flags/sa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/sa.png -------------------------------------------------------------------------------- /img/flags/sb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/sb.png -------------------------------------------------------------------------------- /img/flags/sc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/sc.png -------------------------------------------------------------------------------- /img/flags/sd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/sd.png -------------------------------------------------------------------------------- /img/flags/se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/se.png -------------------------------------------------------------------------------- /img/flags/sg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/sg.png -------------------------------------------------------------------------------- /img/flags/sh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/sh.png -------------------------------------------------------------------------------- /img/flags/si.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/si.png -------------------------------------------------------------------------------- /img/flags/sj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/sj.png -------------------------------------------------------------------------------- /img/flags/sk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/sk.png -------------------------------------------------------------------------------- /img/flags/sl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/sl.png -------------------------------------------------------------------------------- /img/flags/sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/sm.png -------------------------------------------------------------------------------- /img/flags/sn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/sn.png -------------------------------------------------------------------------------- /img/flags/so.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/so.png -------------------------------------------------------------------------------- /img/flags/sr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/sr.png -------------------------------------------------------------------------------- /img/flags/st.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/st.png -------------------------------------------------------------------------------- /img/flags/sv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/sv.png -------------------------------------------------------------------------------- /img/flags/sy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/sy.png -------------------------------------------------------------------------------- /img/flags/sz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/sz.png -------------------------------------------------------------------------------- /img/flags/tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/tc.png -------------------------------------------------------------------------------- /img/flags/td.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/td.png -------------------------------------------------------------------------------- /img/flags/tf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/tf.png -------------------------------------------------------------------------------- /img/flags/tg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/tg.png -------------------------------------------------------------------------------- /img/flags/th.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/th.png -------------------------------------------------------------------------------- /img/flags/tj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/tj.png -------------------------------------------------------------------------------- /img/flags/tk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/tk.png -------------------------------------------------------------------------------- /img/flags/tl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/tl.png -------------------------------------------------------------------------------- /img/flags/tm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/tm.png -------------------------------------------------------------------------------- /img/flags/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/tn.png -------------------------------------------------------------------------------- /img/flags/to.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/to.png -------------------------------------------------------------------------------- /img/flags/tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/tr.png -------------------------------------------------------------------------------- /img/flags/tt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/tt.png -------------------------------------------------------------------------------- /img/flags/tv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/tv.png -------------------------------------------------------------------------------- /img/flags/tw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/tw.png -------------------------------------------------------------------------------- /img/flags/tz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/tz.png -------------------------------------------------------------------------------- /img/flags/ua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ua.png -------------------------------------------------------------------------------- /img/flags/ug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ug.png -------------------------------------------------------------------------------- /img/flags/um.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/um.png -------------------------------------------------------------------------------- /img/flags/us-ha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/us-ha.png -------------------------------------------------------------------------------- /img/flags/us.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/us.png -------------------------------------------------------------------------------- /img/flags/uy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/uy.png -------------------------------------------------------------------------------- /img/flags/uz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/uz.png -------------------------------------------------------------------------------- /img/flags/va.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/va.png -------------------------------------------------------------------------------- /img/flags/vc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/vc.png -------------------------------------------------------------------------------- /img/flags/ve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ve.png -------------------------------------------------------------------------------- /img/flags/vg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/vg.png -------------------------------------------------------------------------------- /img/flags/vi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/vi.png -------------------------------------------------------------------------------- /img/flags/vn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/vn.png -------------------------------------------------------------------------------- /img/flags/vu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/vu.png -------------------------------------------------------------------------------- /img/flags/wf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/wf.png -------------------------------------------------------------------------------- /img/flags/ws.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ws.png -------------------------------------------------------------------------------- /img/flags/ye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/ye.png -------------------------------------------------------------------------------- /img/flags/yt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/yt.png -------------------------------------------------------------------------------- /img/flags/za.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/za.png -------------------------------------------------------------------------------- /img/flags/zm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/zm.png -------------------------------------------------------------------------------- /img/flags/zw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags/zw.png -------------------------------------------------------------------------------- /img/flags92.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/flags92.png -------------------------------------------------------------------------------- /img/tplogo-page.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /img/tplogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/tplogo.png -------------------------------------------------------------------------------- /img/tplogo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /img/tplogo32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/img/tplogo32.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Transposh plugin starter page 4 | 5 | 6 |
Welcome to transposh wordpress plugin
7 |

8 | Transposh helps you multi-lingualize your blog with ease
9 |
10 | Here are a few starting points:
11 | Transposh homepage
12 | Transposh FAQ
13 | Transposh development site and wiki on github
14 | Download the latest version of Transposh plugin 15 | 16 | 17 | -------------------------------------------------------------------------------- /js/admin/backendeditor.js: -------------------------------------------------------------------------------- 1 | /* Copyright © 2009-2018 Transposh Team (website : http://transposh.org) 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 2 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software 15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | */ 17 | 18 | /*global Date, Math, alert, escape, clearTimeout, document, jQuery, setTimeout, t_jp, t_be, window */ 19 | (function ($) { // closure 20 | // If we have a single post, we can just go through with it 21 | $(function () { 22 | $.ajaxSetup({ 23 | cache: false 24 | }); 25 | 26 | $(".delete").click(function () { 27 | var me = this; 28 | var href = $(this).children().attr('href'); 29 | console.log(href); 30 | $.ajax({ 31 | url: href, 32 | dataType: 'json', 33 | /*data: { 34 | action: "tp_translate_all" 35 | },*/ 36 | cache: false, 37 | success: function (data) { 38 | if (data) { 39 | $(me).parents('tr').hide(); 40 | } else { 41 | $(me).parents('tr').css("background-color", "red"); 42 | } 43 | ; 44 | } 45 | }); 46 | return false; 47 | }); 48 | }); 49 | }(jQuery)); // end of closure -------------------------------------------------------------------------------- /js/admin/backendtranslate.js: -------------------------------------------------------------------------------- 1 | /* Copyright © 2009-2018 Transposh Team (website : http://transposh.org) 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 2 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software 15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | */ 17 | 18 | /*global Date, Math, alert, escape, clearTimeout, document, jQuery, setTimeout, t_jp, t_be, window */ 19 | (function ($) { // closure 20 | 21 | var timer; 22 | var items = 0; 23 | var translations = []; 24 | var tokens = []; 25 | var langs = []; 26 | var sources = []; 27 | var BATCH_SIZE = 512; 28 | var pair_count = 0; 29 | var curr_pair = 0; 30 | 31 | // move the progress bar a bit 32 | function make_progress(translation, lang) { 33 | curr_pair += 1; 34 | $("#progress_bar").progressbar('value', curr_pair / pair_count * 100); 35 | $('#p').text('(' + lang + ') ' + translation); 36 | if (curr_pair === pair_count) { 37 | $("#tr_loading").data("done", true); 38 | } 39 | } 40 | 41 | // batch items for posting to server.. nice touch added for different sources for same batch... 42 | function ajax_translate_me(token, translation, lang, source) { 43 | translation = $("
" + $.trim(translation) + "
").text(); // fix some char bugs 44 | make_progress(translation, lang); 45 | // we aggregate translations together, 200ms from the last translation we will send the timer 46 | // so here we remove it so nothing unexpected happens 47 | clearTimeout(timer); 48 | items += 1; 49 | // push translations - we'll assume something is different... 50 | tokens.push(token); 51 | translations.push(translation); 52 | langs.push(lang); 53 | sources.push(source); 54 | timer = setTimeout(function () { 55 | var data = { 56 | action: 'tp_translation', 57 | items: items 58 | }, i; 59 | // this is the "smart" stuff, only coding changed info 60 | for (i = 0; i < items; i += 1) { 61 | if (tokens[i] !== tokens[i - 1]) { 62 | data["tk" + i] = tokens[i]; 63 | } 64 | if (langs[i] !== langs[i - 1]) { 65 | data["ln" + i] = langs[i]; 66 | } 67 | if (translations[i] !== translations[i - 1]) { 68 | data["tr" + i] = translations[i]; 69 | } 70 | if (sources[i] !== sources[i - 1]) { 71 | data["sr" + i] = sources[i]; 72 | } 73 | } 74 | $.ajax({ 75 | type: "POST", 76 | url: t_jp.ajaxurl, // FIX ALL! 77 | data: data, 78 | success: function () { 79 | }, 80 | error: function () { 81 | } 82 | }); 83 | // as we posted, we can come clean (TODO - future test of results) 84 | items = 0; 85 | translations = []; 86 | tokens = []; 87 | langs = []; 88 | sources = []; 89 | }, 200); // wait 200 ms... 90 | } 91 | 92 | // and the invoker 93 | function do_mass_bing_invoker(tokens, trans, lang) { 94 | var binglang = lang; 95 | // fix this in ms mass... 96 | if (binglang === 'zh') { 97 | binglang = 'zh-chs'; 98 | } else if (binglang === 'zh-tw') { 99 | binglang = 'zh-cht'; 100 | } else if (binglang === 'mw') { 101 | binglang = 'mww'; 102 | } 103 | t_jp.dbt(trans, function (result) { 104 | $(result).each(function (i) { 105 | ajax_translate_me(tokens[i], this.TranslatedText, lang, 2); // notice the source 106 | }); 107 | }, binglang); 108 | } 109 | 110 | function do_mass_apertium_invoker(tokens, trans, lang) { 111 | t_jp.dat(trans, function (result) { 112 | // we assume that 2xx answer should be good, 200 is good, 206 is partially good (some errors) 113 | if (result.responseStatus >= 200 && result.responseStatus < 300) { 114 | // single items get handled differently 115 | if (result.responseData.translatedText !== undefined) { 116 | ajax_translate_me(tokens[0], result.responseData.translatedText); 117 | } else { 118 | $(result.responseData).each(function (i) { 119 | if (this.responseStatus === 200) { 120 | ajax_translate_me(tokens[i], this.responseData.translatedText, lang, 3); 121 | } 122 | }); 123 | } 124 | } 125 | }, lang); 126 | } 127 | 128 | function do_mass_google_invoker(tokens, trans, lang) { 129 | t_jp.dgpt(trans, function (result) { 130 | $(result.results).each(function (i) { 131 | ajax_translate_me(tokens[i], this, lang, 1); 132 | }); 133 | }, lang); 134 | } 135 | 136 | function do_mass_yandex_invoker(tokens, trans, lang) { 137 | t_jp.dyt(trans, function (result) { 138 | $(result.results).each(function (i) { 139 | ajax_translate_me(tokens[i], this, lang, 4); 140 | }); 141 | }, lang); 142 | } 143 | 144 | function do_mass_baidu_invoker(tokens, trans, lang) { 145 | t_jp.dut(trans, function (result) { 146 | $(result.results).each(function (i) { 147 | ajax_translate_me(tokens[i], this, lang, 4); 148 | }); 149 | }, lang); 150 | } 151 | 152 | function do_invoker(batchtokens, batchtrans, currlang) { 153 | t_jp.preferred.some(function (engine) { 154 | if (t_be[engine + '_langs'].indexOf(currlang) !== -1) { 155 | if (engine === 'a') { 156 | do_mass_apertium_invoker(batchtokens, batchtrans, currlang); 157 | } 158 | if (engine === 'b') { 159 | do_mass_bing_invoker(batchtokens, batchtrans, currlang); 160 | } 161 | if (engine === 'g') { 162 | do_mass_google_invoker(batchtokens, batchtrans, currlang); 163 | } 164 | if (engine === 'y') { 165 | do_mass_yandex_invoker(batchtokens, batchtrans, currlang); 166 | } 167 | if (engine === 'u') { 168 | do_mass_baidu_invoker(batchtokens, batchtrans, currlang); 169 | } 170 | return true; 171 | } 172 | }); 173 | } 174 | 175 | // the main translate function 176 | function translate_post(postid) { 177 | var currlang = '', 178 | tokens = [], 179 | strings = [], 180 | str, name, val, 181 | batchlength = 0, 182 | batchtrans = [], 183 | batchtokens = [], 184 | to_trans; 185 | 186 | $("#tr_loading").data("done", false); 187 | // get the post // FIX 188 | $.post({ 189 | url: ajaxurl, 190 | dataType: 'json', 191 | data: { 192 | action: "tp_post_phrases", 193 | nonce: $('#transposh_nonce').val(), 194 | post: postid 195 | }, 196 | cache: false, 197 | success: function (json) { 198 | // if we got no results than seems like we have nothing to translate 199 | $("#tr_translate_title").html("Translating post: " + json.posttitle); 200 | if (json.length === undefined) { 201 | $("#tr_loading").html('Nothing left to translate'); 202 | $("#tr_loading").data("done", true); 203 | return; 204 | } 205 | // calculate # of pairs 206 | pair_count = 0; 207 | curr_pair = 0; 208 | for (name in json.p) { 209 | pair_count += json.p[name].l.length; 210 | } 211 | 212 | // create progress bars 213 | $("#tr_loading").html('
Translation:
'); 214 | $("#progress_bar").progressbar({ 215 | value: 0 216 | }); 217 | 218 | // per language passing... 219 | for (var lang in json.langs) { 220 | currlang = json.langs[lang]; 221 | strings = []; 222 | tokens = []; 223 | for (name in json.p) { 224 | val = json.p[name]; 225 | // we have a winner 226 | if (val.l.indexOf(currlang) !== -1) { 227 | // add to candidates 228 | strings.push(unescape(name)); 229 | tokens.push(unescape(name)); 230 | val.l.splice(val.l.indexOf(currlang), 1); 231 | // if no more languages, we can remove the item from further processing 232 | if (val.l.length === 0) { 233 | json.length -= 1; 234 | delete json.p[name]; 235 | } 236 | } 237 | } 238 | if (strings.length) { 239 | for (str in strings) { 240 | to_trans = strings[str]; 241 | if (batchlength + to_trans.length > BATCH_SIZE) { 242 | do_invoker(batchtokens, batchtrans, currlang); 243 | batchlength = 0; 244 | batchtrans = []; 245 | batchtokens = []; 246 | } 247 | batchlength += to_trans.length; 248 | batchtokens.push(tokens[str]); 249 | batchtrans.push(to_trans); 250 | } 251 | 252 | // this invokation is for the remaining items 253 | do_invoker(batchtokens, batchtrans, currlang); 254 | } 255 | } 256 | 257 | } 258 | }); 259 | } 260 | // TODO - just expose this one, not the entire set of items 261 | window.translate_post = translate_post; 262 | 263 | // If we have a single post, we can just go through with it 264 | $(function () { 265 | if (t_be.post) { 266 | translate_post(t_be.post); 267 | } 268 | }); 269 | }(jQuery)); // end of closure -------------------------------------------------------------------------------- /js/admin/commentslang.js: -------------------------------------------------------------------------------- 1 | /* Copyright © 2009-2018 Transposh Team (website : http://transposh.org) 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 2 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software 15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | */ 17 | 18 | (function ($) { // closure 19 | // list of languages 20 | var l = { 21 | 'en': 'English - English', 22 | 'af': 'Afrikaans - Afrikaans', 23 | 'sq': 'Albanian - Shqip', 24 | 'ar': 'Arabic - العربية', 25 | 'hy': 'Armenian - Հայերեն', 26 | 'az': 'Azerbaijani - azərbaycan dili', 27 | 'eu': 'Basque - Euskara', 28 | 'be': 'Belarusian - Беларуская', 29 | 'bn': 'Bengali - বাংলা', 30 | 'bg': 'Bulgarian - Български', 31 | 'ca': 'Catalan - Català', 32 | 'zh': 'Chinese (Simplified) - 中文(简体)', 33 | 'zh-tw': 'Chinese (Traditional) - 中文(漢字)', 34 | 'hr': 'Croatian - Hrvatski', 35 | 'cs': 'Czech - Čeština', 36 | 'da': 'Danish - Dansk', 37 | 'nl': 'Dutch - Nederlands', 38 | 'eo': 'Esperanto - Esperanto', 39 | 'et': 'Estonian - Eesti keel', 40 | 'fi': 'Finnish - Suomi', 41 | 'fr': 'French - Français', 42 | 'gl': 'Galician - Galego', 43 | 'ka': 'Georgian - ქართული', 44 | 'de': 'German - Deutsch', 45 | 'el': 'Greek - Ελληνικά', 46 | 'gu': 'Gujarati - ગુજરાતી', 47 | 'ht': 'Haitian - Kreyòl ayisyen', 48 | 'he': 'Hebrew - עברית', 49 | 'hi': 'Hindi - हिन्दी; हिंदी', 50 | 'hu': 'Hungarian - Magyar', 51 | 'is': 'Icelandic - Íslenska', 52 | 'id': 'Indonesian - Bahasa Indonesia', 53 | 'ga': 'Irish - Gaeilge', 54 | 'it': 'Italian - Italiano', 55 | 'ja': 'Japanese - 日本語', 56 | 'kn': 'Kannada - ಕನ್ನಡ', 57 | 'ko': 'Korean - 우리말', 58 | 'la': 'Latin - Latīna', 59 | 'lv': 'Latvian - Latviešu valoda', 60 | 'lt': 'Lithuanian - Lietuvių kalba', 61 | 'mk': 'Macedonian - македонски јазик', 62 | 'ms': 'Malay - Bahasa Melayu', 63 | 'mt': 'Maltese - Malti', 64 | 'no': 'Norwegian - Norsk', 65 | 'fa': 'Persian - پارسی', 66 | 'pl': 'Polish - Polski', 67 | 'pt': 'Portuguese - Português', 68 | 'ro': 'Romanian - Română', 69 | 'ru': 'Russian - Русский', 70 | 'sr': 'Serbian - Cрпски језик', 71 | 'sk': 'Slovak - Slovenčina', 72 | 'sl': 'Slovene - Slovenščina', 73 | 'es': 'Spanish - Español', 74 | 'sw': 'Swahili - Kiswahili', 75 | 'sv': 'Swedish - Svenska', 76 | 'tl': 'Tagalog - Tagalog', 77 | 'ta': 'Tamil - தமிழ்', 78 | 'te': 'Telugu - తెలుగు', 79 | 'th': 'Thai - ภาษาไทย', 80 | 'tr': 'Turkish - Türkçe', 81 | 'uk': 'Ukrainian - Українська', 82 | 'ur': 'Urdu - اردو', 83 | 'vi': 'Vietnamese - Tiếng Việt', 84 | 'cy': 'Welsh - Cymraeg', 85 | 'yi': 'Yiddish - ייִדיש' 86 | } 87 | 88 | $(function () { 89 | var commentclickfunction = function () { 90 | var options = '', selected, lang = $(this).data('lang'); 91 | $.each(l, function (x) { 92 | if (x === lang) { 93 | selected = 'selected="selected"' 94 | } else { 95 | selected = '' 96 | } 97 | ; 98 | options += '' 99 | }); 100 | $(this).closest(".row-actions").toggleClass("row-actions-active").toggleClass("row-actions"); 101 | $(this).replaceWith('"); 102 | $(".language select").change(function () { 103 | $.post(ajaxurl, 104 | { 105 | action: 'tp_comment_lang', 106 | nonce: $('#transposh_nonce').val(), 107 | lang: $(this).val(), 108 | cid: $(this).data('cid') 109 | } 110 | ); 111 | var cid = $(this).data('cid'); 112 | $(this).closest(".row-actions-active").toggleClass("row-actions-active").toggleClass("row-actions"); 113 | $(this).replaceWith('' + $('[data-cid=' + cid + '] option:selected').text() + ''); 114 | $('[data-cid=' + cid + ']').click(commentclickfunction); 115 | }); 116 | }; 117 | $(".language a").click(commentclickfunction); 118 | }) 119 | 120 | }(jQuery)) 121 | 122 | -------------------------------------------------------------------------------- /js/admin/contexthelp.js: -------------------------------------------------------------------------------- 1 | /* Copyright © 2009-2018 Transposh Team (website : http://transposh.org) 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 2 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software 15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | */ 17 | 18 | (function ($) { // closure 19 | $(document).on('click','.tp_help', function (event) { 20 | event.preventDefault(); 21 | window.scrollTo(0, 0); 22 | $('#tab-link-' + jQuery(this).attr('rel') + ' a').trigger('click'); 23 | if (!$('#contextual-help-link').hasClass('screen-meta-active')) 24 | $('#contextual-help-link').trigger('click'); 25 | }); 26 | }(jQuery)); // end of closure -------------------------------------------------------------------------------- /js/admin/engines.js: -------------------------------------------------------------------------------- 1 | /* Copyright © 2009-2018 Transposh Team (website : http://transposh.org) 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 2 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software 15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | */ 17 | 18 | (function ($) { // closure 19 | $(function () { 20 | // makes the languages sortable, with placeholder, also prevent unneeded change after sort 21 | $("#sortable").sortable({ 22 | placeholder: "highlight" 23 | }); 24 | $("#sortable").disableSelection(); 25 | }); 26 | }(jQuery)); // end of closure -------------------------------------------------------------------------------- /js/admin/utils.js: -------------------------------------------------------------------------------- 1 | /* Copyright © 2009-2018 Transposh Team (website : http://transposh.org) 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 2 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software 15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | */ 17 | 18 | (function ($) { // closure 19 | $(function() { 20 | $.ajaxSetup({ 21 | cache: false 22 | }); 23 | 24 | $("#transposh-reset-options").click(function() { 25 | if (!confirm("Are you sure you want to do this?")) return false; 26 | if (!confirm("Are you REALLY sure you want to do this, your configuration will be reset?")) return false; 27 | $.post(ajaxurl, { 28 | action: 'tp_reset', 29 | nonce: $('#transposh_nonce').val() 30 | }); 31 | }); 32 | 33 | // backup button 34 | backupclick = function () { 35 | $("#transposh-backup").unbind('click').click(function(){ 36 | return false 37 | }).text("Backup In Progress"); 38 | $.post(ajaxurl, { 39 | action: 'tp_backup', 40 | nonce: $('#transposh_nonce').val() 41 | }, 42 | function(data) { 43 | var color = 'red'; 44 | if (data[0] == '2') color = 'green'; 45 | $('#backup_result').html(data).css('color',color); 46 | $("#transposh-backup").unbind('click').click(backupclick).text("Do Backup Now"); 47 | }); 48 | return false; 49 | }; 50 | $("#transposh-backup").click(backupclick); 51 | 52 | // cleanup button 53 | cleanautoclick = function (days,button) { 54 | if (!confirm("Are you sure you want to do this?")) return false; 55 | if (days == 0 && !confirm("Are you REALLY sure you want to do this?")) return false; 56 | //var button = $(this); 57 | //console.log(button); 58 | var prevtext = button.text(); 59 | button.unbind('click').click(function(){ 60 | return false 61 | }).text("Cleanup in progress"); 62 | $.post(ajaxurl, { 63 | action: 'tp_cleanup', 64 | days: days, 65 | nonce: $('#transposh_nonce').val() 66 | }, 67 | function(data) { 68 | button.unbind('click').click(function() { 69 | cleanautoclick(days,button); 70 | return false; 71 | }).text(prevtext); 72 | }); 73 | return false; 74 | }; 75 | 76 | // Dedup button 77 | dedupautoclick = function (button) { 78 | if (!confirm("Are you sure you want to do this?")) return false; 79 | var prevtext = button.text(); 80 | button.unbind('click').click(function(){ 81 | return false 82 | }).text("Deduplication in progress"); 83 | $.post(ajaxurl, { 84 | action: 'tp_dedup', 85 | nonce: $('#transposh_nonce').val() 86 | }, 87 | function(data) { 88 | button.unbind('click').click(function() { 89 | dedupautoclick(button); 90 | return false; 91 | }).text(prevtext); 92 | }); 93 | return false; 94 | }; 95 | 96 | $("#transposh-reset-proxy-timers").click(function() { 97 | $.post(ajaxurl, { 98 | action: 'tp_reset_timers', 99 | nonce: $('#transposh_nonce').val() 100 | }); 101 | return false; 102 | }); 103 | 104 | $("#transposh-clean-auto").click(function() { 105 | cleanautoclick(0,$(this)); 106 | return false; 107 | }); 108 | 109 | $("#transposh-clean-auto14").click(function() { 110 | cleanautoclick(14,$(this)); 111 | return false; 112 | }); 113 | 114 | $("#transposh-clean-unimportant").click(function() { 115 | cleanautoclick(999,$(this)); 116 | return false; 117 | }); 118 | 119 | $("#transposh-dedup").click(function() { 120 | dedupautoclick($(this)); 121 | return false; 122 | }); 123 | maintclick = function (button) { 124 | if (!confirm("Are you sure you want to do this?")) return false; 125 | var prevtext = button.text(); 126 | button.unbind('click').click(function(){ 127 | return false 128 | }).text("Maintenance in progress"); 129 | $.post(ajaxurl, { 130 | action: 'tp_maint', 131 | nonce: $('#transposh_nonce').val() 132 | }, 133 | function(data) { 134 | button.unbind('click').click(function() { 135 | maintclick(button); 136 | return false; 137 | }).text(prevtext); 138 | }); 139 | return false; 140 | } 141 | 142 | $("#transposh-maint").click(function() { 143 | maintclick($(this)); 144 | return false; 145 | }); 146 | 147 | // WIP $("#transposh-fetch").click(function() { 148 | // //maintclick($(this)); 149 | // $.post(ajaxurl, { 150 | // action: 'tp_fetch' 151 | // }); 152 | // return false; 153 | // }); 154 | 155 | // translate all button 156 | do_translate_all = function () { 157 | $("#progress_bar_all").progressbar({ 158 | value:0 159 | }); 160 | stop_translate_var = false; 161 | // while there is a next 162 | // get next post to translate 163 | //var offset = "0"; 164 | $("#tr_loading").data("done",true); 165 | $.ajaxSetup({ 166 | cache: false 167 | }); 168 | $.post({ 169 | url: ajaxurl, 170 | dataType: 'json', 171 | data: { 172 | action: "tp_translate_all", 173 | nonce: $('#transposh_nonce').val() 174 | }, 175 | cache: false, 176 | success: function (data) { 177 | dotimer = function(a) { 178 | $("#tr_allmsg").text(''); 179 | clearTimeout(timer2); 180 | //console.log(a); 181 | //console.log($("#tr_loading").data("done")); 182 | if ($("#tr_loading").data("done") || $("#tr_loading").data("attempt")>4) { 183 | $("#progress_bar_all").progressbar('value' , (a+1)/data.length*100); 184 | $("#tr_loading").data("attempt",0); 185 | translate_post(data[a]); 186 | //console.log($("#tr_loading").data("done")); 187 | //console.log("done translate" + a); 188 | // we call the next translation here... 189 | if (typeof data[a+1] !== 'undefined' && !stop_translate_var) { 190 | //console.log("trigger translation of " +a); 191 | timer2 = setTimeout(function() { 192 | dotimer(a+1) 193 | },2000); 194 | $("#tr_allmsg").text('Waiting 2 seconds...'); 195 | } 196 | } else { 197 | //console.log("waiting for translation to finish 60 seconds"); 198 | $("#tr_loading").data("attempt",$("#tr_loading").data("attempt")+1); 199 | timer2 = setTimeout(function() { 200 | dotimer(a) 201 | },15000); 202 | $("#tr_allmsg").text('Translation incomplete - Waiting 15 seconds - attempt ' + $("#tr_loading").data("attempt") + '/5'); 203 | } 204 | } 205 | timer2 = setTimeout(function() { 206 | dotimer(0) 207 | },0); 208 | } 209 | }); 210 | $("#transposh-translate").text("Stop translate") 211 | $("#transposh-translate").unbind('click').click(stop_translate); 212 | return false; 213 | } 214 | 215 | stop_translate = function() { 216 | clearTimeout(timer2); 217 | stop_translate_var = true; 218 | $("#transposh-translate").text("Translate All Now") 219 | $("#transposh-translate").unbind('click').click(do_translate_all); 220 | return false; 221 | } 222 | 223 | $("#transposh-translate").click(do_translate_all); 224 | 225 | }); 226 | }(jQuery)); // end of closure -------------------------------------------------------------------------------- /js/admin/warningclose.js: -------------------------------------------------------------------------------- 1 | /* Copyright © 2009-2018 Transposh Team (website : http://transposh.org) 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 2 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software 15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | */ 17 | 18 | (function ($) { // closure 19 | $(function () { 20 | $(".warning-close").click(function () { 21 | $(this).parents('div:first').hide(); 22 | $.post(ajaxurl, { 23 | action: 'tp_close_warning', 24 | id: $(this).attr('id') 25 | }); 26 | }); 27 | }); 28 | }(jQuery)); // end of closure -------------------------------------------------------------------------------- /js/jquery.ui.menu.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Menu @VERSION 3 | * 4 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Menu 9 | * 10 | * Depends: 11 | * jquery.ui.core.js 12 | * jquery.ui.widget.js 13 | */ 14 | (function($) { 15 | 16 | var idIncrement = 0; 17 | 18 | $.widget("ui.menu", { 19 | _create: function() { 20 | var self = this; 21 | this.menuId = this.element.attr( "id" ) || "ui-menu-" + idIncrement++; 22 | this.element 23 | .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" ) 24 | .attr({ 25 | id: this.menuId, 26 | role: "listbox" 27 | }) 28 | .bind( "click.menu", function( event ) { 29 | if ( self.options.disabled ) { 30 | return false; 31 | } 32 | if ( !$( event.target ).closest( ".ui-menu-item a" ).length ) { 33 | return; 34 | } 35 | // temporary 36 | event.preventDefault(); 37 | self.select( event ); 38 | }) 39 | .bind( "mouseover.menu", function( event ) { 40 | if ( self.options.disabled ) { 41 | return; 42 | } 43 | var target = $( event.target ).closest( ".ui-menu-item" ); 44 | if ( target.length && target.parent()[0] === self.element[0] ) { 45 | self.activate( event, target ); 46 | } 47 | }) 48 | .bind("mouseout.menu", function( event ) { 49 | if ( self.options.disabled ) { 50 | return; 51 | } 52 | var target = $( event.target ).closest( ".ui-menu-item" ); 53 | if ( target.length && target.parent()[0] === self.element[0] ) { 54 | self.deactivate( event ); 55 | } 56 | }); 57 | this.refresh(); 58 | 59 | if ( !this.options.input ) { 60 | this.options.input = this.element.attr( "tabIndex", 0 ); 61 | } 62 | this.options.input.bind( "keydown.menu", function( event ) { 63 | if ( self.options.disabled ) { 64 | return; 65 | } 66 | switch ( event.keyCode ) { 67 | case $.ui.keyCode.PAGE_UP: 68 | self.previousPage(); 69 | event.preventDefault(); 70 | event.stopImmediatePropagation(); 71 | break; 72 | case $.ui.keyCode.PAGE_DOWN: 73 | self.nextPage(); 74 | event.preventDefault(); 75 | event.stopImmediatePropagation(); 76 | break; 77 | case $.ui.keyCode.UP: 78 | self.previous(); 79 | event.preventDefault(); 80 | event.stopImmediatePropagation(); 81 | break; 82 | case $.ui.keyCode.DOWN: 83 | self.next(); 84 | event.preventDefault(); 85 | event.stopImmediatePropagation(); 86 | break; 87 | case $.ui.keyCode.ENTER: 88 | self.select(); 89 | event.preventDefault(); 90 | event.stopImmediatePropagation(); 91 | break; 92 | } 93 | }); 94 | }, 95 | 96 | destroy: function() { 97 | $.Widget.prototype.destroy.apply( this, arguments ); 98 | 99 | this.element 100 | .removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all" ) 101 | .removeAttr( "tabIndex" ) 102 | .removeAttr( "role" ) 103 | .removeAttr( "aria-activedescendant" ); 104 | 105 | this.element.children( ".ui-menu-item" ) 106 | .removeClass( "ui-menu-item" ) 107 | .removeAttr( "role" ) 108 | .children( "a" ) 109 | .removeClass( "ui-corner-all" ) 110 | .removeAttr( "tabIndex" ) 111 | .unbind( ".menu" ); 112 | }, 113 | 114 | refresh: function() { 115 | // don't refresh list items that are already adapted 116 | var items = this.element.children( "li:not(.ui-menu-item):has(a)" ) 117 | .addClass( "ui-menu-item" ) 118 | .attr( "role", "menuitem" ); 119 | 120 | items.children( "a" ) 121 | .addClass( "ui-corner-all" ) 122 | .attr( "tabIndex", -1 ); 123 | }, 124 | 125 | activate: function( event, item ) { 126 | var self = this; 127 | this.deactivate(); 128 | if ( this._hasScroll() ) { 129 | var borderTop = parseFloat( $.curCSS( this.element[0], "borderTopWidth", true) ) || 0, 130 | paddingtop = parseFloat( $.curCSS( this.element[0], "paddingTop", true) ) || 0, 131 | offset = item.offset().top - this.element.offset().top - borderTop - paddingtop, 132 | scroll = this.element.attr( "scrollTop" ), 133 | elementHeight = this.element.height(), 134 | itemHeight = item.height(); 135 | if ( offset < 0 ) { 136 | this.element.attr( "scrollTop", scroll + offset ); 137 | } else if ( offset + itemHeight > elementHeight ) { 138 | this.element.attr( "scrollTop", scroll + offset - elementHeight + itemHeight ); 139 | } 140 | } 141 | this.active = item.first() 142 | .children( "a" ) 143 | .addClass( "ui-state-hover" ) 144 | .attr( "id", function(index, id) { 145 | return (self.itemId = id || self.menuId + "-activedescendant"); 146 | }) 147 | .end(); 148 | // need to remove the attribute before adding it for the screenreader to pick up the change 149 | // see http://groups.google.com/group/jquery-a11y/msg/929e0c1e8c5efc8f 150 | this.element.removeAttr("aria-activedescenant").attr("aria-activedescenant", self.itemId); 151 | this._trigger( "focus", event, { item: item } ); 152 | }, 153 | 154 | deactivate: function(event) { 155 | if (!this.active) { 156 | return; 157 | } 158 | 159 | var self = this; 160 | this.active.children( "a" ).removeClass( "ui-state-hover" ); 161 | // remove only generated id 162 | $( "#" + self.menuId + "-activedescendant" ).removeAttr( "id" ); 163 | this.element.removeAttr( "aria-activedescenant" ); 164 | this._trigger( "blur", event ); 165 | this.active = null; 166 | }, 167 | 168 | next: function(event) { 169 | this._move( "next", ".ui-menu-item", "first", event ); 170 | }, 171 | 172 | previous: function(event) { 173 | this._move( "prev", ".ui-menu-item", "last", event ); 174 | }, 175 | 176 | first: function() { 177 | return this.active && !this.active.prevAll( ".ui-menu-item" ).length; 178 | }, 179 | 180 | last: function() { 181 | return this.active && !this.active.nextAll( ".ui-menu-item" ).length; 182 | }, 183 | 184 | _move: function(direction, edge, filter, event) { 185 | if ( !this.active ) { 186 | this.activate( event, this.element.children(edge)[filter]() ); 187 | return; 188 | } 189 | var next = this.active[ direction + "All" ]( ".ui-menu-item" ).eq( 0 ); 190 | if ( next.length ) { 191 | this.activate( event, next ); 192 | } else { 193 | this.activate( event, this.element.children(edge)[filter]() ); 194 | } 195 | }, 196 | 197 | nextPage: function( event ) { 198 | if ( this._hasScroll() ) { 199 | if ( !this.active || this.last() ) { 200 | this.activate( event, this.element.children( ".ui-menu-item" ).first() ); 201 | return; 202 | } 203 | var base = this.active.offset().top, 204 | height = this.element.height(), 205 | result; 206 | this.active.nextAll( ".ui-menu-item" ).each( function() { 207 | result = $( this ); 208 | return $( this ).offset().top - base - height < 0; 209 | }); 210 | 211 | this.activate( event, result ); 212 | } else { 213 | this.activate( event, this.element.children( ".ui-menu-item" ) 214 | [ !this.active || this.last() ? "first" : "last" ]() ); 215 | } 216 | }, 217 | 218 | previousPage: function( event ) { 219 | if ( this._hasScroll() ) { 220 | if ( !this.active || this.first() ) { 221 | this.activate( event, this.element.children( ".ui-menu-item" ).last() ); 222 | return; 223 | } 224 | 225 | var base = this.active.offset().top, 226 | height = this.element.height(), 227 | result; 228 | this.active.prevAll( ".ui-menu-item" ).each( function() { 229 | result = $( this ); 230 | return $(this).offset().top - base + height > 0; 231 | }); 232 | 233 | this.activate( event, result ); 234 | } else { 235 | this.activate( event, this.element.children( ".ui-menu-item" ) 236 | [ !this.active || this.first() ? ":last" : ":first" ]() ); 237 | } 238 | }, 239 | 240 | _hasScroll: function() { 241 | return this.element.height() < this.element.attr( "scrollHeight" ); 242 | }, 243 | 244 | select: function( event ) { 245 | this._trigger( "select", event, { item: this.active } ); 246 | } 247 | }); 248 | 249 | }( jQuery )); 250 | -------------------------------------------------------------------------------- /js/l/de.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Thanks: Jenny Beelens (http://www.professionaltranslation.com) 3 | */ 4 | t_jp.l = { 5 | 'Close without saving?': 'Schließen ohne Speichern?', 6 | 'You have made a change to the translation. Are you sure you want to discard it?': 'Sie haben die Übersetzung bearbeitet. Sind Sie sicher, dass Sie abbrechen wollen?', 7 | 'History': 'Verlauf', 8 | 'Loading...': 'Laden...', 9 | 'Translated': 'Übersetzt', 10 | 'By': 'von', 11 | 'At': 'über', 12 | 'google': 'Google', 13 | 'bing': 'Bing', 14 | 'apertium': 'Apertium', 15 | 'manual translation': 'manuelle Übersetzung', 16 | 'bing suggest': 'Bing Suggest', 17 | 'google suggest': 'Google Suggest', 18 | 'apertium suggest': 'Apertium Suggest', 19 | 'Edit Translation': 'Übersetzung bearbeiten', 20 | 'Original text': 'Originaltext', 21 | 'read alternate translations': 'alternative Übersetzung lesen', 22 | 'previous translation': 'Vorherige', 23 | 'find on page': 'Auf Seite suchen', 24 | 'next translation': 'Nächste', 25 | 'Translate to': 'Übersetzen nach', 26 | 'view translation log': 'Übersetzungsprotokoll anzeigen', 27 | 'virtual keyboard': 'virtuelle Tastatur', 28 | 'approve translation': 'Übersetzung genehmigen', 29 | 'delete': 'Löschen', 30 | 'Discard': 'Verwerfen', 31 | 'Cancel': 'Abbrechen' 32 | }; -------------------------------------------------------------------------------- /js/l/es.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Thanks: Ignacio F. López Vico 3 | */ 4 | t_jp.l = { 5 | 'Close without saving?': 'Cerrar sin guardar?', 6 | 'You have made a change to the translation. Are you sure you want to discard it?': 'Has cambiado la traducion. Estas seguro que lo quieres eliminar?', 7 | 'History': 'Historia', 8 | 'Loading...': 'Cargando...', 9 | 'Translated': 'Traducido', 10 | 'By': 'Por', 11 | 'At': 'En', 12 | 'google': 'google', 13 | 'bing': 'bing', 14 | 'apertium': 'apertium', 15 | 'manual translation': 'traducción manual', 16 | 'bing suggest': 'sugerencia de bing', 17 | 'google suggest': 'sugerencia de google', 18 | 'apertium suggest': 'sugerencia de apertium', 19 | 'Edit Translation': 'Editar traducción', 20 | 'Original text': 'Texto original', 21 | 'read alternate translations': 'lee traducciónes alternativas', 22 | 'previous translation': 'traducción anterior', 23 | 'find on page': 'encuentra en la pagina', 24 | 'next translation': 'siguiente traducción', 25 | 'Translate to': 'Traducir a', 26 | 'view translation log': 'muestra diario de traducion', 27 | 'virtual keyboard': 'teclado virtual', 28 | 'approve translation': 'aprueba traducion', 29 | 'delete': 'eliminar', 30 | 'Discard': 'Descartar', 31 | 'Cancel': 'Cancelar' 32 | }; -------------------------------------------------------------------------------- /js/l/fa.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Thanks: Sushyant Zavarzadeh (http://zavarzadeh.org) 3 | */ 4 | t_jp.l={ 5 | 'Close without saving?': 'بدون نگه داری ببندیم؟', 6 | 'You have made a change to the translation. Are you sure you want to discard it?': 'شما در ترجمه یک دگرگونی ساخته اید آیا آگاهانه می خواهید آن را دور بیندازید؟ ', 7 | 'History': 'پیشینه', 8 | 'Loading...': 'بارگیری...', 9 | 'Translated': 'ترجمه شده', 10 | 'By': 'با', 11 | 'At': 'در', 12 | 'google': 'گوگل', 13 | 'bing': 'بینگ', 14 | 'apertium': 'اِی پِرشِم', 15 | 'manual translation': 'ترجمه ی دستی', 16 | 'bing suggest': 'پیشنهاد بینگ', 17 | 'google suggest': 'پیشنهاد گوگل', 18 | 'apertium suggest': 'پیشنهاد اِی پِرشِم', 19 | 'Edit Translation': 'ویرایش ترجمه', 20 | 'Original text': 'نوشته ی پایه', 21 | 'read alternate translations': 'خواندن ترجمه های جایگزین', 22 | 'previous translation': 'ترجمه ی پیشین', 23 | 'find on page': 'یافتن در برگه', 24 | 'next translation': 'ترجمه ی (بعدی) پسین', 25 | 'Translate to': 'ترجمه به', 26 | 'view translation log': 'دیدن رویدادهای ترجمه', 27 | 'virtual keyboard': 'کیبورد مجازی', 28 | 'approve translation': 'پذیرش ترجمه', 29 | 'delete': 'پاک کردن', 30 | 'Discard': 'دور انداختن', 31 | 'Cancel': 'پرهیز' 32 | }; -------------------------------------------------------------------------------- /js/l/fr.js: -------------------------------------------------------------------------------- 1 | t_jp.l = { 2 | 'Close without saving?': 'Fermer sans sauvegarder ?', 3 | 'You have made a change to the translation. Are you sure you want to discard it?': 'Vous avez fait une modification de la traduction. Etes vous sû de ne pas vouloir la garder ?', 4 | 'History': 'Historique', 5 | 'Loading...': 'Chargement...', 6 | 'Translated': 'Traduit', 7 | 'By': 'Par', 8 | 'At': 'A', 9 | 'google': 'google', 10 | 'bing': 'bing', 11 | 'apertium': 'apertium', 12 | 'manual translation': 'traduction manuelle', 13 | 'bing suggest': 'bing suggère', 14 | 'google suggest': 'google suggère', 15 | 'apertium suggest': 'apertium suggère', 16 | 'Edit Translation': 'Modifier la traduction', 17 | 'Original text': 'Texte original', 18 | 'read alternate translations': 'Lire des traductions alternatives', 19 | 'previous translation': 'traduction précédente', 20 | 'find on page': 'trouver à la page', 21 | 'next translation': 'traduction suivante', 22 | 'Translate to': 'Traduire en', 23 | 'view translation log': 'Voir le journal de traduction', 24 | 'virtual keyboard': 'clavier virtuel', 25 | 'approve translation': 'approuver la traduction', 26 | 'delete': 'supprimer', 27 | 'Discard': 'Abandonner', 28 | 'Cancel': 'Annuler' 29 | }; 30 | -------------------------------------------------------------------------------- /js/l/he.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Thanks: Amir Wald (http://colnect.com) 3 | */ 4 | t_jp.l = { 5 | 'Close without saving?': 'לסגור בלי לשמור?', 6 | 'You have made a change to the translation. Are you sure you want to discard it?': 'ביצעת שינוי בתרגום, האם אתה בטוח שאתה רוצה לוותר עליו?', 7 | 'History': 'היסטוריה', 8 | 'Loading...': 'טוען...', 9 | 'Translated': 'תורגם', 10 | 'By': 'על ידי', 11 | 'At': 'ב', 12 | 'google': 'גוגל', 13 | 'bing': 'בינג', 14 | 'apertium': 'אפרטיום', 15 | 'manual translation': 'תרגום ידני', 16 | 'bing suggest': 'הצעות בינג', 17 | 'google suggest': 'הצעות גוגל', 18 | 'apertium suggest': 'הצעות אפרטיום', 19 | 'Edit Translation': 'עריכת תרגום', 20 | 'Original text': 'טקסט מקורי', 21 | 'read alternate translations': 'קרא תרגומים אלטרנטיביים', 22 | 'previous translation': 'תרגום קודם', 23 | 'find on page': 'מצא בדף', 24 | 'next translation': 'תרגום הבא', 25 | 'Translate to': 'תרגם ל', 26 | 'view translation log': 'הצג לוג תרגום', 27 | 'virtual keyboard': 'מקלדת וירטואלית', 28 | 'approve translation': 'אשר תרגום', 29 | 'delete': 'מחק', 30 | 'Discard': 'וותר', 31 | 'Cancel': 'בטל' 32 | }; -------------------------------------------------------------------------------- /js/l/it.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Thanks: Marco Rossi 3 | */ 4 | t_jp.l = { 5 | 'Close without saving?': 'Chiudere senza salvare?', 6 | 'You have made a change to the translation. Are you sure you want to discard it?': 'È stata fatta una modifica alla traduzione. Si è sicuri di volerla scartare?', 7 | 'History': 'Storia', 8 | 'Loading...': 'Caricamento...', 9 | 'Translated': 'Tradotto', 10 | 'By': 'Da', 11 | 'At': 'A', 12 | 'google': 'google', 13 | 'bing': 'bing', 14 | 'apertium': 'apertium', 15 | 'manual translation': 'traduzione manuale', 16 | 'bing suggest': 'bing suggerisce', 17 | 'google suggest': 'google suggerisce', 18 | 'apertium suggest': 'apertium suggerisce', 19 | 'Edit Translation': 'Modifica Traduzione', 20 | 'Original text': 'Testo Originale', 21 | 'read alternate translations': 'leggi le traduzioni alternative', 22 | 'previous translation': 'traduzione precedente', 23 | 'find on page': 'trova nella pagina', 24 | 'next translation': 'prossima traduzione', 25 | 'Translate to': 'Tradotto in', 26 | 'view translation log': 'guarda il log delle traduzioni', 27 | 'virtual keyboard': 'tastiera virtuale', 28 | 'approve translation': 'approva traduzione', 29 | 'delete': 'cancella', 30 | 'Discard': 'Scarta', 31 | 'Cancel': 'Cancella' 32 | }; -------------------------------------------------------------------------------- /js/l/newlang.js.pot: -------------------------------------------------------------------------------- 1 | /* 2 | * To add a language to the front end interface this file should be edited and be renamed to the two letter iso code of the language it is destined for 3 | * For each original phrase just write the translation between the '' following it 4 | */ 5 | 6 | t_jp.l = { 7 | 'Close without saving?': '', 8 | 'You have made a change to the translation. Are you sure you want to discard it?': '', 9 | 'History': '', 10 | 'Loading...': '', 11 | 'Translated': '', 12 | 'By': '', 13 | 'At': '', 14 | 'google': '', 15 | 'bing': '', 16 | 'apertium': '', 17 | 'manual translation': '', 18 | 'bing suggest': '', 19 | 'google suggest': '', 20 | 'apertium suggest': '', 21 | 'Edit Translation': '', 22 | 'Original text': '', 23 | 'read alternate translations': '', 24 | 'previous translation': '', 25 | 'find on page': '', 26 | 'next translation': '', 27 | 'Translate to': '', 28 | 'view translation log': '', 29 | 'virtual keyboard': '', 30 | 'approve translation': '', 31 | 'delete': '', 32 | 'Discard': '', 33 | 'Cancel': '' 34 | }; -------------------------------------------------------------------------------- /js/l/nl.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Thanks: Roland Nieuwendijk (http://blog.imagitect.nl/) 3 | */ 4 | t_jp.l = { 5 | 'Close without saving?': 'Sluiten zonder op te slaan?', 6 | 'You have made a change to the translation. Are you sure you want to discard it?': 'Je hebt de vertaling aangepast. Weet je zeker dat je dat wilt annuleren?', 7 | 'History': 'Geschiedenis', 8 | 'Loading...': 'Aan het laden...', 9 | 'Translated': 'Vertaald', 10 | 'By': 'Door', 11 | 'At': 'Op', 12 | 'google': 'google', 13 | 'bing': 'bing', 14 | 'apertium': 'apertium', 15 | 'manual translation': 'eigen vertaling', 16 | 'bing suggest': 'bing suggestie', 17 | 'google suggest': 'google suggestie', 18 | 'apertium suggest': 'apertium suggestie', 19 | 'Edit Translation': 'Vertaling aanpassen', 20 | 'Original text': 'Oorspronkelijke tekst', 21 | 'read alternate translations': 'bekijk alternatieve vertaling', 22 | 'previous translation': 'vorige', 23 | 'find on page': 'laat op de pagina zien', 24 | 'next translation': 'volgende', 25 | 'Translate to': 'Vertaal naar', 26 | 'view translation log': 'Bekijk vertaallog', 27 | 'virtual keyboard': 'virtueel toetsenbord', 28 | 'approve translation': 'vertaling goedkeuren', 29 | 'delete': 'verwijder', 30 | 'Discard': 'weggooien', 31 | 'Cancel': 'Annuleren' 32 | }; -------------------------------------------------------------------------------- /js/l/ru.js: -------------------------------------------------------------------------------- 1 | /* * Thanks: Romans Matusevics */ t_jp.l = { 'Close without saving?': 'Закрыть без сохранения?', 'You have made a change to the translation. Are you sure you want to discard it?': 'Вы сделали изменения в переводе. Вы уверены, что хотите сбросить это?', 'History': 'История', 'Loading...': 'Загрузка...', 'Translated': 'Переведено', 'By': '', 'At': 'В', 'google': '', 'bing': '', 'apertium': '', 'manual translation': 'ручной перевод', 'bing suggest': 'предложение bing', 'google suggest': 'предложение google', 'apertium suggest': 'предложение apertium', 'Edit Translation': 'Редактировать перевод', 'Original text': 'Оригинальный текст', 'read alternate translations': 'читать альтернативные переводы', 'previous translation': 'предыдущий перевод', 'find on page': 'найти на странице', 'next translation': 'следующий перевод', 'Translate to': 'Перевести на', 'view translation log': 'смотреть журнал переводов', 'virtual keyboard': 'виртуальная клавиатура', 'approve translation': 'подтвердить перевод', 'delete': 'стереть', 'Discard': 'Сбросить', 'Cancel': 'Отменить' }; -------------------------------------------------------------------------------- /js/l/tr.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Thanks: Ömer Faruk Karabulut (http://yakalasam.com/) 3 | */ 4 | 5 | t_jp.l = { 6 | 'Close without saving?': 'Kaydetmeden çıkış yap?', 7 | 'You have made a change to the translation. Are you sure you want to discard it?': 'Çeviride değişlikler yaptınız. Kaydetmeden çıkış yapmak istediğinizden emin misiniz?', 8 | 'History': 'Geçmiş', 9 | 'Loading...': 'Yükleniyor...', 10 | 'Translated': 'Çevirildi', 11 | 'By': 'Çeviren:', 12 | 'At': 'Çevirildiği Sistem:', 13 | 'google': 'google', 14 | 'bing': 'bing', 15 | 'apertium': 'apertium', 16 | 'manual translation': 'manuel çeviri', 17 | 'bing suggest': 'bing tavsiyesi', 18 | 'google suggest': 'google tavsiyesi', 19 | 'apertium suggest': 'apertium tavsiyesi', 20 | 'Edit Translation': 'Çeviriyi Düzenle', 21 | 'Original text': 'Orjinal yazı', 22 | 'read alternate translations': 'alternatif çevirileri oku ', 23 | 'previous translation': 'geçmiş çeviri', 24 | 'find on page': 'sayfada aroma yap', 25 | 'next translation': 'gelecek çeviri', 26 | 'Translate to': 'Şu dile çevir', 27 | 'view translation log': 'çeviri log verilerini görüntüle', 28 | 'virtual keyboard': 'sanal klavye', 29 | 'approve translation': 'çeviriyi kabul et', 30 | 'delete': 'sil', 31 | 'Discard': 'İptal et', 32 | 'Cancel': 'Vazgeç' 33 | }; -------------------------------------------------------------------------------- /js/lazy.js: -------------------------------------------------------------------------------- 1 | /* 2 | * xLazyLoader 1.5 - Plugin for jQuery 3 | * 4 | * Load js, css and images asynchron and get different callbacks 5 | * 6 | * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 7 | * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 8 | * 9 | * Depends: 10 | * jquery.js 11 | * 12 | * Copyright (c) 2010 Oleg Slobodskoi (jsui.de) 13 | */ 14 | 15 | ;(function($){ 16 | 17 | $.xLazyLoader = function ( method, options ) { 18 | if ( typeof method == 'object' ) { 19 | options = method; 20 | method = 'init'; 21 | }; 22 | new xLazyLoader()[method](options); 23 | }; 24 | 25 | $.xLazyLoader.defaults = { 26 | js: [], css: [], img: [], 27 | jsKey: null, cssKey: null, imgKey: null, 28 | name: null, 29 | timeout: 20000, 30 | //success callback for all files 31 | success: $.noop, 32 | //error callback - by load errors / timeout 33 | error: $.noop, 34 | //complete callbck - by success or errors 35 | complete: $.noop, 36 | //success callback for each file 37 | each: $.noop 38 | }; 39 | 40 | var head = document.getElementsByTagName("head")[0]; 41 | 42 | function xLazyLoader () 43 | { 44 | 45 | var self = this, 46 | s, 47 | loaded = [], 48 | errors = [], 49 | tTimeout, 50 | cssTimeout, 51 | toLoad, 52 | files = [] 53 | ; 54 | 55 | this.init = function ( options ) 56 | { 57 | if ( !options ) return; 58 | 59 | s = $.extend({}, $.xLazyLoader.defaults, options); 60 | toLoad = {js: s.js, css: s.css, img: s.img}; 61 | 62 | $.each(toLoad, function( type, f ){ 63 | if ( typeof f == 'string' ) 64 | f = f.split(','); 65 | files = files.concat(f); 66 | }); 67 | 68 | if ( !files.length ) { 69 | dispatchCallbacks('error'); 70 | return; 71 | }; 72 | 73 | if (s.timeout) { 74 | tTimeout = setTimeout(function(){ 75 | var handled = loaded.concat(errors); 76 | /* search for unhandled files */ 77 | $.each(files, function(i, file){ 78 | $.inArray(file, handled) == -1 && errors.push(file); 79 | }); 80 | dispatchCallbacks('error'); 81 | }, s.timeout); 82 | }; 83 | 84 | 85 | $.each(toLoad, function(type, urls){ 86 | if ( $.isArray(urls) ) 87 | $.each( urls, function(i, url){ 88 | load(type, url); 89 | }); 90 | else if (typeof urls == 'string') 91 | load(type, urls); 92 | }); 93 | 94 | 95 | 96 | }; 97 | 98 | this.js = function ( src, callback, name, key ) 99 | { 100 | var $script = $('script[src*="'+src+'"]'); 101 | if ( $script.length ) { 102 | $script.attr('pending') ? $script.bind('scriptload',callback) : callback(); 103 | return; 104 | }; 105 | 106 | var s = document.createElement('script'); 107 | s.setAttribute("type","text/javascript"); 108 | s.setAttribute('charset', 'UTF-8'); 109 | s.setAttribute("src", src + key); 110 | s.setAttribute('id', name); 111 | s.setAttribute('pending', 1); 112 | // Mozilla only 113 | s.onerror = addError; 114 | 115 | 116 | $(s).bind('scriptload',function(){ 117 | $(this).removeAttr('pending'); 118 | callback(); 119 | //unbind load event 120 | //timeout because of pending callbacks 121 | setTimeout(function(){ 122 | $(s).unbind('scriptload'); 123 | },10); 124 | }); 125 | 126 | // jQuery doesn't handles onload event special for script tag, 127 | var done = false; 128 | s.onload = s.onreadystatechange = function() { 129 | if ( !done && ( !this.readyState || /loaded|complete/.test(this.readyState) ) ) { 130 | done = true; 131 | // Handle memory leak in IE 132 | s.onload = s.onreadystatechange = null; 133 | $(s).trigger('scriptload'); 134 | }; 135 | }; 136 | head.appendChild(s); 137 | 138 | }; 139 | 140 | this.css = function ( href, callback, name, key ) 141 | { 142 | 143 | if ( $('link[href*="'+href+'"]').length ) { 144 | callback(); 145 | return; 146 | }; 147 | 148 | 149 | var link = $('')[0]; 150 | /* if ( $.browser.msie ) { 151 | link.onreadystatechange = function () { 152 | /loaded|complete/.test(link.readyState) && callback(); 153 | }; 154 | } else if ( $.browser.opera ) { 155 | link.onload = callback; 156 | } else {*/ 157 | /* 158 | * Mozilla, Safari, Chrome 159 | * unfortunately it is inpossible to check if the stylesheet is really loaded or it is "HTTP/1.0 400 Bad Request" 160 | * the only way to do this is to check if some special properties were set, so there is no error callback for stylesheets - 161 | * it fires alway success 162 | * 163 | * There is also no access to sheet properties by crossdomain stylesheets, 164 | * so we fire callback immediately 165 | */ 166 | 167 | var hostname = location.hostname.replace('www.',''), 168 | hrefHostname = /http:/.test(href) ? /^(\w+:)?\/\/([^\/?#]+)/.exec( href )[2] : hostname; 169 | hostname != hrefHostname && true ? 170 | callback() 171 | : 172 | //stylesheet is from the same domain or it is not firefox 173 | (function(){ 174 | try { 175 | link.sheet.cssRules; 176 | } catch (e) { 177 | cssTimeout = setTimeout(arguments.callee, 20); 178 | return; 179 | }; 180 | callback(); 181 | })(); 182 | //}; 183 | 184 | 185 | head.appendChild(link); 186 | }; 187 | 188 | this.img = function ( src, callback, name, key ) 189 | { 190 | var img = new Image(); 191 | img.onload = callback; 192 | img.onerror = addError; 193 | img.src = src + key; 194 | }; 195 | 196 | /* It works only for css */ 197 | this.disable = function ( name ) 198 | { 199 | $('#lazy-loaded-'+name, head).attr('disabled', 'disabled'); 200 | }; 201 | 202 | /* It works only for css */ 203 | this.enable = function ( name ) 204 | { 205 | $('#lazy-loaded-'+name, head).removeAttr('disabled'); 206 | }; 207 | 208 | /* 209 | * By removing js tag, script ist still living in browser memory, 210 | * css will be really destroyed 211 | */ 212 | this.destroy = function ( name ) 213 | { 214 | $('#lazy-loaded-'+name, head).remove(); 215 | }; 216 | 217 | function load ( type, url ) { 218 | self[type](url, function(status) { 219 | status == 'error' ? errors.push(url) : loaded.push(url) && s.each(url); 220 | checkProgress(); 221 | }, 'lazy-loaded-'+ (s.name ? s.name : new Date().getTime()), s[type+'Key'] ? '?key='+s[type+'Key'] : '' ); 222 | }; 223 | 224 | function dispatchCallbacks ( status ) { 225 | s.complete(status, loaded, errors); 226 | s[status]( status=='error' ? errors : loaded); 227 | clearTimeout(tTimeout); 228 | clearTimeout(cssTimeout); 229 | }; 230 | 231 | function checkProgress () { 232 | if (loaded.length == files.length) dispatchCallbacks('success') 233 | else if (loaded.length+errors.length == files.length) dispatchCallbacks('error'); 234 | }; 235 | 236 | function addError () { 237 | errors.push(this.src); 238 | checkProgress(); 239 | }; 240 | 241 | }; 242 | 243 | })(t_jp.$); -------------------------------------------------------------------------------- /js/transposh.js: -------------------------------------------------------------------------------- 1 | /* Copyright © 2009-2025 Transposh Team (website : https://transposh.org) 2 | * 3 | * This program is free software; you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation; either version 2 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software 15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | */ 17 | 18 | // List of exposed functions: 19 | // t_jp.tfl = test_for_lazyrun; 20 | // t_jp.tfju = test_for_jqueryui; 21 | // t_jp.at = do_auto_translate; 22 | 23 | /*global Date, Math, alert, escape, clearTimeout, document, jQuery, setTimeout, t_jp, window, _mstConfig */ 24 | (function ($) { // closure 25 | var 26 | // this is the size of strings to queue, we don't want too much there 27 | BATCH_SIZE = 1024, 28 | // number of phrases that might be translated 29 | possibly_translateable, 30 | // ids of progress bars 31 | t_jp_prefix = t_jp.prefix, 32 | // source - 0 is human, 1 google , 2 bing, 3 apertium, 33 | // 4 yandex, 5 baidu, 6 LibreTranslate - higher reserved for future engines 34 | ENGINES = { 35 | 'g': {s: 1 }, // Google 36 | 'b': {s: 2 }, // Bing 37 | 'a': {s: 3 }, // Apertium 38 | 'y': {s: 4 }, // Yandex 39 | 'u': {s: 5 }, // Baidu 40 | 'l': {s: 6 }, // LibreTranslate 41 | } 42 | ; 43 | 44 | // This function fixes the page, it gets a token and translation and fixes this, 45 | // since here we only get the automated source, we use this to reduce the code size 46 | function fix_page(token, translation) { 47 | // Todo - Probably not needed, but in case we get bad stuff 48 | if ($.trim(translation).length === 0) { 49 | return; 50 | } 51 | // this is an inner function used to fix the images in the case of being inside the edit mode. 52 | // if we are not editing, no images will be found and nothing will happen. 53 | // even if this happens before the edit scripts adds the images, it won't matter as source is changed too and the 54 | // edit script will fix this 55 | var fix_image = function () { // handle the image changes 56 | var img_segment_id = $(this).attr('id').substr($(this).attr('id').lastIndexOf('_') + 1), 57 | img = $("#" + t_jp_prefix + "img_" + img_segment_id); 58 | $("#" + t_jp_prefix + img_segment_id).attr('data-source', 1); // source is 1 59 | img.removeClass('tr-icon-yellow').removeClass('tr-icon-green').addClass('tr-icon-yellow'); 60 | }; 61 | 62 | // might need to escape the token selectors 63 | //token = token.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1'); 64 | token = $.escapeSelector(token); 65 | //window.console && console.log(token); 66 | // rewrite text for all matching items at once 67 | $("*[data-orig='" + token + "'][data-hidden!='y']") 68 | .html(translation) 69 | .each(fix_image); 70 | 71 | // TODO - FIX hidden elements too (need to update father's title) 72 | $("*[data-orig='" + token + "'][data-hidden='y']") 73 | .attr('data-trans', translation) 74 | .each(fix_image); 75 | } 76 | 77 | // happens on translate success 78 | function auto_translate_success(token, translation) { 79 | // since this moved to the backend, we should not post again 80 | fix_page(token, translation); 81 | window.console && console.log(possibly_translateable - $("." + t_jp_prefix + '[data-source=""]').length + "/" + possibly_translateable + " auto translated"); 82 | } 83 | 84 | function mass_translate(engine, batchtrans, lang, success) { 85 | $.ajax({ 86 | url: t_jp.ajaxurl, 87 | dataType: "json", 88 | type: "GET", 89 | data: { 90 | action: 'tp_tp', 91 | e: engine, 92 | tl: lang, 93 | q: batchtrans 94 | }, 95 | success: success 96 | }); 97 | } 98 | 99 | // Generic invoker 100 | function invoke_engine(engine, tokens, batchtrans) { 101 | var cfg = ENGINES[engine]; 102 | if (!cfg) return; 103 | source = cfg.s; 104 | mass_translate(engine, batchtrans, t_jp.lang, function (result) { 105 | var arr; 106 | try { 107 | arr = result.results; 108 | } catch (e) { 109 | arr = []; 110 | } 111 | for (var i = 0; i < arr.length && i < tokens.length; i++) { 112 | auto_translate_success(tokens[i], arr[i]); 113 | } 114 | }); 115 | } 116 | 117 | // Unified dispatcher 118 | function do_mass_invoke(batchtokens, batchtrans) { 119 | if (!batchtokens.length) return; 120 | t_jp.preferred.some(function (engine) { 121 | if (t_jp.engines[engine]) { 122 | invoke_engine(engine, batchtokens, batchtrans); 123 | return true; 124 | } 125 | }); 126 | } 127 | 128 | //function for auto translation 129 | function do_auto_translate() { 130 | // auto_translated_previously... 131 | var auto_translated_phrases = [], batchlength = 0, batchtrans = [], batchtokens = []; 132 | 133 | $("." + t_jp_prefix + '[data-source=""]').each(function () { 134 | var token = $(this).attr('data-orig'), 135 | // we only have orig if we have some translation? so it should probably not be here... ? (or maybe for future invalidations of cached auto translations) 136 | to_trans = $(this).attr('data-orig'); 137 | // should not happen, but just in case 138 | if (!token || token.length === 0) { 139 | return; // continue 140 | } 141 | if (to_trans === undefined) { 142 | to_trans = $(this).html(); 143 | } 144 | if (auto_translated_phrases[to_trans] !== 1) { 145 | auto_translated_phrases[to_trans] = 1; 146 | if (batchlength + encodeURIComponent(to_trans).length > BATCH_SIZE) { 147 | do_mass_invoke(batchtokens, batchtrans); 148 | batchlength = 0; 149 | batchtrans = []; 150 | batchtokens = []; 151 | } 152 | batchlength += encodeURIComponent(to_trans).length; 153 | batchtokens.push(token); 154 | batchtrans.push(to_trans); 155 | } 156 | }); 157 | // this invokation is for the remaining items 158 | do_mass_invoke(batchtokens, batchtrans); 159 | } 160 | 161 | // helper function for lazy running 162 | function test_for_lazyrun(callback) { 163 | if (typeof $.xLazyLoader === 'function') { 164 | callback(); 165 | } else { 166 | t_jp.$ = $; // We wanted the same jQuery... hmmm 167 | $.getScript(t_jp.plugin_url + '/js/lazy.js', callback).done(callback); 168 | } 169 | } 170 | 171 | function test_for_jqueryui(callback) { 172 | if (test_for_jqueryui.hit /* might be needed? - && typeof $.fn.dialog !== 'function' */) { 173 | callback(); 174 | } else { 175 | test_for_jqueryui.hit = true; 176 | test_for_lazyrun(function () { 177 | // This is needed when old jQueryUI is being loaded (default for wp3.2) 178 | $.fn.propAttr = $.fn.prop || $.fn.attr; 179 | $.xLazyLoader({ 180 | js: t_jp.jQueryUI + 'jquery-ui.min.js', 181 | css: t_jp.jQueryUI + 'themes/' + t_jp.theme + '/jquery-ui.css', 182 | success: callback 183 | }); 184 | }); 185 | } 186 | } 187 | 188 | // expose some functions 189 | t_jp.at = do_auto_translate; 190 | t_jp.tfl = test_for_lazyrun; 191 | t_jp.tfju = test_for_jqueryui; 192 | 193 | $(function () { 194 | 195 | // this is the set_default_language function 196 | // attach a function to the set_default_language link if its there 197 | $('.' + t_jp_prefix + 'setdeflang').on("click", function () { 198 | $.ajax({ 199 | url: t_jp.ajaxurl, 200 | data: { 201 | action: 'tp_cookie' 202 | }, 203 | cache: false 204 | }); 205 | $('.' + t_jp_prefix + 'setdeflang').hide("slow"); 206 | return false; 207 | }); 208 | 209 | // how many phrases are yet untranslated 210 | possibly_translateable = $("." + t_jp_prefix + '[data-source=""]').length; 211 | 212 | //now = new Date(); 213 | // we make sure script sub loaded are cached 214 | $.ajaxSetup({ 215 | cache: true 216 | }); 217 | // was: we'll only auto-translate and load the stuff if we either have more than 5 candidate translations, or more than one at 4am, and this language is supported... 218 | // we'll translate if there's any candidate...? 219 | if (possibly_translateable && !t_jp.noauto && !$.isEmptyObject(t_jp.engines)) { 220 | do_auto_translate(); 221 | } 222 | 223 | // this is the part when we have editor support 224 | if (t_jp.edit) { 225 | $.getScript(t_jp.plugin_url + '/js/transposhedit.js'); 226 | } 227 | }); 228 | }(jQuery)); // end of closure -------------------------------------------------------------------------------- /langs/transposh-de_DE.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/langs/transposh-de_DE.mo -------------------------------------------------------------------------------- /langs/transposh-es_ES.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/langs/transposh-es_ES.mo -------------------------------------------------------------------------------- /langs/transposh-fa_IR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/langs/transposh-fa_IR.mo -------------------------------------------------------------------------------- /langs/transposh-fr_FR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/langs/transposh-fr_FR.mo -------------------------------------------------------------------------------- /langs/transposh-he_IL.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/langs/transposh-he_IL.mo -------------------------------------------------------------------------------- /langs/transposh-it_IT.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/langs/transposh-it_IT.mo -------------------------------------------------------------------------------- /langs/transposh-nl_NL.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/langs/transposh-nl_NL.mo -------------------------------------------------------------------------------- /langs/transposh-pt_BR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/langs/transposh-pt_BR.mo -------------------------------------------------------------------------------- /langs/transposh-ru_RU.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/langs/transposh-ru_RU.mo -------------------------------------------------------------------------------- /langs/transposh-sr_RS.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/langs/transposh-sr_RS.mo -------------------------------------------------------------------------------- /langs/transposh-tr_TR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/langs/transposh-tr_TR.mo -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | === Transposh WordPress Translation === 2 | Contributors: oferwald 3 | Donate link: http://transposh.org/donate/ 4 | Tags: translation, translate, i18n, widget, filter, buddypress, bilingual, multilingual, transposh, language, crowdsourcing, google translate, bing translate, context, wiki, RTL, Hebrew, Spanish, French, Russian, English, Arabic, Portuguese 5 | Requires at least: 5.8 6 | Tested up to: 6.8.2 7 | Stable tag: %VERSION% 8 | 9 | Transposh adds best of breed translation support to wordpress, more than a 100 languages are automatically translated and can be manually corrected with ease. 10 | 11 | == Description == 12 | Transposh translation filter for WordPress offers a unique approach to blog translation. It allows your blog to combine automatic translation with human translation aided by your users with an easy to use in-context interface. -------------------------------------------------------------------------------- /scripts/cleanup_db.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DB=wordpress 4 | USER=root 5 | echo 6 | echo "Dropping transposh entries and tables from wordpress database" 7 | 8 | 9 | SQL="Delete FROM \`wp_options\` WHERE \`option_name\` LIKE '%transposh%'; DROP TABLE wp_translations; DROP TABLE wp_translations_log;" 10 | 11 | 12 | mysql $DB --user=$USER --password -e "$SQL" 13 | 14 | echo done !!! 15 | 16 | -------------------------------------------------------------------------------- /scripts/makeflagscss-kapowaz.php: -------------------------------------------------------------------------------- 1 | 'node_modules/circle-flags/flags', 6 | 'square' => 'node_modules/square-flags/flags' 7 | ]; 8 | 9 | // Output CSS files 10 | $outputFiles = [ 11 | 'circle' => 'css/circle-flags.css', 12 | 'square' => 'css/square-flags.css' 13 | ]; 14 | 15 | // Function for minimal URL encoding (only #, <, > as specified; includes double quote replacement) 16 | function minimalEncode($str) { 17 | // Replace all double quotes with single quotes 18 | $str = str_replace('"', "'", $str); 19 | 20 | $replacements = [ 21 | '<' => '%3C', 22 | '>' => '%3E', 23 | '#' => '%23' 24 | ]; 25 | return strtr($str, $replacements); 26 | } 27 | 28 | // Process each package (circle-flags and square-flags) 29 | foreach ($flagDirs as $type => $flagsDir) { 30 | // Initialize CSS content 31 | $cssContent = "/* $type-flags CSS generated from SVG icons (minimal URL encoding) */\n\n"; 32 | 33 | // Add the main .trf class with shared styles 34 | $cssContent .= ".trf {\n"; 35 | $cssContent .= " display: inline-block;\n"; 36 | $cssContent .= " width: 16px;\n"; // Default width, adjust as needed 37 | $cssContent .= " height: 16px;\n"; // 32px for circle (1:1), 24px for square (4:3) 38 | $cssContent .= " background-size: cover;\n"; 39 | $cssContent .= " background-position: center;\n"; 40 | $cssContent .= "}\n\n"; 41 | 42 | // Ensure the directory exists 43 | if (!is_dir($flagsDir)) { 44 | die("Error: Directory '$flagsDir' does not exist.\n"); 45 | } 46 | 47 | // Get all SVG files recursively (including subdirectories) 48 | $files = []; 49 | $iterator = new RecursiveIteratorIterator( 50 | new RecursiveDirectoryIterator($flagsDir, RecursiveDirectoryIterator::SKIP_DOTS), 51 | RecursiveIteratorIterator::SELF_FIRST 52 | ); 53 | foreach ($iterator as $file) { 54 | if ($file->isFile() && strtolower($file->getExtension()) === 'svg') { 55 | $files[] = $file->getPathname(); 56 | } 57 | } 58 | 59 | if (empty($files)) { 60 | die("Error: No SVG files found in '$flagsDir' or its subdirectories.\n"); 61 | } 62 | 63 | // Deduplication: First pass - collect ALL classes per unique hash 64 | $hashToClasses = []; 65 | $processedHashes = []; // Track hashes that have been minified/encoded (to avoid re-processing) 66 | 67 | foreach ($files as $file) { 68 | // Get the relative path (e.g., 'il.svg' or 'language/he.svg') 69 | $relativePath = str_replace($flagsDir . '/', '', $file); 70 | // Create class name from relative path without .svg, replacing / with - 71 | $relativePathWithoutExt = str_replace('.svg', '', $relativePath); 72 | $className = str_replace('/', '-', $relativePathWithoutExt); 73 | 74 | // Read the SVG content 75 | $svgContent = file_get_contents($file); 76 | if ($svgContent === false) { 77 | echo "Warning: Could not read file '$file'. Skipping.\n"; 78 | continue; 79 | } 80 | 81 | // Compute MD5 hash of raw SVG content 82 | $hash = hash('md5', $svgContent, true); 83 | $hashHex = bin2hex($hash); 84 | 85 | // Always add the class to the group for this hash 86 | if (!isset($hashToClasses[$hashHex])) { 87 | $hashToClasses[$hashHex] = []; 88 | } 89 | $hashToClasses[$hashHex][] = $className; 90 | 91 | // If this is the first time seeing this hash, mark it for processing (minify/encode later) 92 | if (!in_array($hashHex, $processedHashes)) { 93 | $processedHashes[] = $hashHex; 94 | echo "Added new class '$className' to group for hash: $hashHex.\n"; 95 | } else { 96 | echo "Added duplicate class '$className' to existing group for hash: $hashHex.\n"; 97 | } 98 | } 99 | 100 | // Second pass: Generate combined CSS rules for each unique hash 101 | foreach ($hashToClasses as $hashHex => $classes) { 102 | // Sort classes alphabetically for consistent output 103 | sort($classes); 104 | 105 | // Get the raw content for one file in this group (use first file as representative) 106 | // To find sample: iterate files, compute hash, match against hex2bin($hashHex) 107 | $sampleFile = null; 108 | foreach ($files as $file) { 109 | $testContent = file_get_contents($file); 110 | if (hash('md5', $testContent, true) === hex2bin($hashHex)) { 111 | $sampleFile = $file; 112 | break; 113 | } 114 | } 115 | if (!$sampleFile) { 116 | echo "Warning: Could not find sample file for hash $hashHex. Skipping.\n"; 117 | continue; 118 | } 119 | 120 | $svgContent = file_get_contents($sampleFile); 121 | 122 | // Minify SVG content: Remove unneeded spaces and newlines 123 | $svgContent = preg_replace('/>\s+<', $svgContent); // Remove whitespace between tags 124 | $svgContent = trim(str_replace(["\n", "\r", "\t"], '', $svgContent)); // Remove newlines, tabs, etc. 125 | 126 | // Minimal encode the SVG content 127 | $encodedSvg = minimalEncode($svgContent); 128 | $dataUrl = "url(\"data:image/svg+xml,$encodedSvg\")"; 129 | 130 | // Create combined class rule (e.g., .trf-il, .trf-language-he) 131 | $combinedClasses = implode(', ', array_map(function($cls) { return ".trf-$cls"; }, $classes)); 132 | echo "Generated combined rule for hash $hashHex: " . implode(', ', $classes) . "\n"; 133 | 134 | $cssClass = "$combinedClasses {\n"; 135 | $cssClass .= " background-image: $dataUrl;\n"; 136 | $cssClass .= "}\n\n"; 137 | 138 | // Append to CSS content 139 | $cssContent .= $cssClass; 140 | } 141 | 142 | // Write the CSS content to the output file 143 | $result = file_put_contents($outputFiles[$type], $cssContent); 144 | 145 | if ($result === false) { 146 | die("Error: Could not write to '{$outputFiles[$type]}'.\n"); 147 | } 148 | 149 | echo "Success: CSS file '{$outputFiles[$type]}' generated with " . count($files) . " flag files (" . count($hashToClasses) . " unique groups, minimal URL encoding, SVG minified, using .trf and .trf-xx classes).\n"; 150 | } 151 | 152 | ?> -------------------------------------------------------------------------------- /scripts/makeflagscss.php: -------------------------------------------------------------------------------- 1 | ['fr', 'fr-20r'], // Corsican uses French flag 12 | 'la' => ['la', 'hmong'], // Hmong, Hmong Daw use Laos flag 13 | 'nl' => ['nl', 'nl-fr'], // Frisian uses Netherlands flag 14 | 'ng' => ['ng', 'hausa', 'yorubaland'], // Hausa, Yoruba use Nigeria flag 15 | 'id' => ['id', 'id-jt', 'id-jb'], // Javanese, Sundanese use Indonesia flag 16 | 'mx' => ['mx', 'otomi'], // Otomi uses Mexico flag 17 | 'pk' => ['pk', 'pk-sd', 'ur'], // Sindhi, Urdu use Pakistan flag 18 | 'in' => ['in', 'in-gj', 'in-ka', 'in-tn', 'in-tg', 'language-mr','malayali'], // Gujarati, Kannada, Tamil, Telugu, Marathi, Malayalam use India flag 19 | 'ru' => ['ru', 'ru-ba', 'ru-ta', 'ru-ud'], // Bashkir, Tatar, Udmurt use Russian flag 20 | 'iq' => ['iq', 'iq-kr'], // Kurdish (Kurmanji) uses Iraq flag (primary region) 21 | 'us' => ['us', 'us-hi'], // Hawaiian uses US flag (Hawaii is a US state) 22 | 'eu' => ['eu', 'language-yi'], // Hawaiian uses US flag (Hawaii is a US state) 23 | 'un' => ['language-eo','un'], // Esperanto uses EU flag (common association for Esperanto) 24 | ]; 25 | 26 | // Initialize CSS content 27 | $cssContent = "/* Flags CSS generated from SVG icons (minimal URL encoding) */\n\n"; 28 | 29 | // Add the main .trf class with shared styles 30 | $cssContent .= ".trf {\n"; 31 | $cssContent .= " display: inline-block;\n"; 32 | $cssContent .= " width: 16px;\n"; // Default width, adjust as needed 33 | $cssContent .= " height: 11px;\n"; // Default height for 4x3 aspect ratio 34 | $cssContent .= " background-size: cover;\n"; 35 | $cssContent .= " background-position: center;\n"; 36 | $cssContent .= "}\n\n"; 37 | 38 | // Ensure the directory exists 39 | if (!is_dir($flagsDir)) { 40 | die("Error: Directory '$flagsDir' does not exist.\n"); 41 | } 42 | 43 | // Get all SVG files in the 4x3 directory 44 | $files = glob($flagsDir . '/*.svg'); 45 | 46 | if (empty($files)) { 47 | die("Error: No SVG files found in '$flagsDir'.\n"); 48 | } 49 | 50 | // Function for minimal URL encoding (only #, <, > as specified) 51 | function minimalEncode($str) { 52 | $replacements = [ 53 | '<' => '%3C', 54 | '>' => '%3E', 55 | '#' => '%23', 56 | '"' => '\'' 57 | ]; 58 | return strtr($str, $replacements); 59 | } 60 | 61 | // Process each SVG file 62 | foreach ($files as $file) { 63 | // Get the filename without extension (e.g., 'us' from 'us.svg') 64 | $filename = basename($file, '.svg'); 65 | 66 | // Get the flag values for this SVG file from the mapping, or use the filename without .svg as default 67 | $flagValues = $flagMapping[$filename] ?? [$filename]; 68 | 69 | // Read the SVG content 70 | $svgContent = file_get_contents($file); 71 | if ($svgContent === false) { 72 | echo "Warning: Could not read file '$file'. Skipping.\n"; 73 | continue; 74 | } 75 | 76 | // Pre-process SVG to use single quotes (as in example) for common attributes 77 | $svgContent = str_replace('xmlns="', "xmlns='", $svgContent); 78 | $svgContent = str_replace('fill="#', "fill='#", $svgContent); 79 | // Add more str_replace if needed, e.g., for viewBox: str_replace('viewBox="', "viewBox='", $svgContent); 80 | 81 | // Minify SVG content only: Remove unneeded spaces and newlines from SVG 82 | $svgContent = preg_replace('/>\s+<', $svgContent); // Remove whitespace between tags 83 | $svgContent = trim(str_replace(["\n", "\r", "\t"], '', $svgContent)); // Remove newlines, tabs, etc. 84 | 85 | // Minimal encode the SVG content 86 | $encodedSvg = minimalEncode($svgContent); 87 | $dataUrl = "url(\"data:image/svg+xml,$encodedSvg\")"; 88 | 89 | // Create the flag-specific sub-class with multiple selectors (e.g., .trf-fr, .trf-fr-20r) 90 | $sanitizedFlags = array_map(function($flag) { 91 | return '.trf-' . str_replace(['-', ':'], '-', $flag); 92 | }, $flagValues); 93 | $cssClass = implode(', ', $sanitizedFlags) . " {\n"; 94 | $cssClass .= " background-image: $dataUrl;\n"; 95 | $cssClass .= "}\n\n"; 96 | 97 | // Append to CSS content 98 | $cssContent .= $cssClass; 99 | } 100 | 101 | // Write the CSS content to the output file 102 | $result = file_put_contents($outputFile, $cssContent); 103 | 104 | if ($result === false) { 105 | die("Error: Could not write to '$outputFile'.\n"); 106 | } 107 | 108 | echo "Success: CSS file '$outputFile' generated with " . count($files) . " flag icons (minimal URL encoding, SVG minified, using .trf and .trf-xx classes).\n"; 109 | 110 | ?> -------------------------------------------------------------------------------- /widgets/default/tpw_default.php: -------------------------------------------------------------------------------- 1 | '; // wrapping in no_translate to avoid translation of this list 40 | 41 | echo '
"; 47 | 48 | echo ""; 49 | } 50 | 51 | } 52 | 53 | ?> 54 | -------------------------------------------------------------------------------- /widgets/dropdown/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/widgets/dropdown/arrow.png -------------------------------------------------------------------------------- /widgets/dropdown/tpw_image_dropdown.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Widget's css 3 | */ 4 | /* Code adapted from: http://www.jankoatwarpspeed.com/post/2009/07/28/reinventing-drop-down-with-css-jquery.aspx */ 5 | 6 | .dropdown, .dropdown dd, .dropdown dt, .dropdown ul, .dropdown li { margin:0px !important; padding:0px !important; } 7 | .dropdown dd { position:relative; z-index:9999;} 8 | .dropdown a, .dropdown a:visited { color:#816c5b; text-decoration:none; outline:none;} 9 | .dropdown a:hover { color:#5d4617;} 10 | .dropdown dt a:hover, .dropdown dt a:focus { color:#5d4617; border: 1px solid #5d4617;} 11 | .dropdown dt a {background:#e4dfcb url(arrow.png) no-repeat scroll right center; display:block; padding-right:20px; 12 | border:1px solid #d4ca9a; width:150px;} 13 | .dropdown dt a span {cursor:pointer; display:block; padding:5px;} 14 | .dropdown dd ul { background:#e4dfcb none repeat scroll 0 0; border:1px solid #d4ca9a; color:#C5C0B0; display:none; 15 | padding:5px 0px; position:absolute; top:2px; width:auto; min-width:170px; list-style:none;} 16 | .dropdown span.value { display:none;} 17 | .dropdown dd ul li a { padding:5px; display:block;} 18 | .dropdown dd ul li a:hover { background-color:#d0c9af;} 19 | 20 | .dropdown img.flag { border:none; vertical-align:middle; margin:0 3px;box-shadow:0 0;border-radius:0 } -------------------------------------------------------------------------------- /widgets/dropdown/tpw_image_dropdown.js: -------------------------------------------------------------------------------- 1 | // Code adapted from: http://www.jankoatwarpspeed.com/post/2009/07/28/reinventing-drop-down-with-css-jquery.aspx 2 | 3 | (function ($) { // closure 4 | 5 | $(function() { 6 | $(".dropdown dt a").click(function() { 7 | $(this).parents(".dropdown").find("dd ul").toggle(); 8 | return false; 9 | }); 10 | 11 | $(".dropdown dd ul li a").click(function() { 12 | var text = $(this).html(); 13 | $(this).parents(".dropdown").find("dt a span").html(text); 14 | $(this).parents(".dropdown").find("dd ul").hide(); 15 | 16 | document.location.href=$(this).parents(".dropdown").find("dt a span.value").html(); 17 | return false; 18 | }); 19 | 20 | $(document).bind('click', function(e) { 21 | var $clicked = $(e.target); 22 | if (! $clicked.parents().hasClass("dropdown")) 23 | $(".dropdown dd ul").hide(); 24 | }); 25 | }); 26 | }(jQuery)); // end of closure -------------------------------------------------------------------------------- /widgets/dropdown/tpw_image_dropdown.php: -------------------------------------------------------------------------------- 1 | transposh_plugin_url, PHP_URL_PATH); 42 | 43 | echo ''; 51 | } 52 | 53 | } 54 | 55 | ?> 56 | -------------------------------------------------------------------------------- /widgets/flags/flags92.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/widgets/flags/flags92.png -------------------------------------------------------------------------------- /widgets/flags/tpw_flags.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Widget's css for flags 3 | */ 4 | .transposh_flags { 5 | direction: ltr; /* we don't want the flags to change direction on rtl */ 6 | line-height: 0; 7 | } 8 | .transposh_flags a { 9 | /* line-height:11px;*/ 10 | display: inline; 11 | /*background: transparent;*/ /* ie8 quirk */ 12 | } 13 | 14 | .transposh_flags a:hover { 15 | /* ie8 quirk */ 16 | background:transparent 17 | } 18 | 19 | .transposh_flags a span, .transposh_flags a img { 20 | border:transparent; 21 | border-style:solid; 22 | border-width:1px 3px; 23 | box-shadow:0 0; 24 | border-radius:0; 25 | padding:0; 26 | } 27 | 28 | .transposh_flags a span:hover, .transposh_flags a img:hover { 29 | border-color:blue 30 | } -------------------------------------------------------------------------------- /widgets/flags/tpw_flags.php: -------------------------------------------------------------------------------- 1 | transposh_plugin_url, PHP_URL_PATH); 39 | 40 | echo "
"; 41 | foreach ($args as $langrecord) { 42 | echo "' . 43 | transposh_utils::display_flag("$plugpath/img/flags", $langrecord['flag'], $langrecord['langorig'], false) . 44 | ""; 45 | } 46 | echo "
"; 47 | } 48 | 49 | } 50 | 51 | ?> 52 | -------------------------------------------------------------------------------- /widgets/flags/tpw_flags_css.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Widget's css (always needed in flags widget use) 3 | */ 4 | .transposh_flags { 5 | direction: ltr; /* we don't want the flags to change direction on rtl */ 6 | line-height: 0; 7 | } 8 | .transposh_flags a { 9 | /* line-height:11px;*/ 10 | display: inline; 11 | /*background: transparent;*/ /* ie8 quirk */ 12 | } 13 | 14 | .transposh_flags a:hover { 15 | /* ie8 quirk */ 16 | background:transparent 17 | } 18 | 19 | .transposh_flags a span, .transposh_flags a img { 20 | border-color:transparent; 21 | border-style:solid; 22 | border-width:1px 3px; 23 | box-shadow:0 0; 24 | border-radius:0; 25 | padding: 0; 26 | } 27 | 28 | .transposh_flags a span:hover, .transposh_flags a img:hover { 29 | border-color:blue 30 | } 31 | 32 | /* define the .css sprites here */ 33 | .trf { 34 | background-image:url(flags92.png); 35 | height:11px; 36 | width:16px; 37 | background-repeat:no-repeat; 38 | overflow:hidden; 39 | display:inline-block; 40 | box-sizing: content-box; 41 | } 42 | 43 | .trf-za {background-position: -24px 0} 44 | .trf-al {background-position: -48px 0} 45 | .trf-et {background-position: -72px 0} 46 | .trf-sa {background-position: -96px 0} 47 | .trf-am {background-position: -120px 0} 48 | .trf-az {background-position: -144px 0} 49 | .trf-es-ba {background-position: -168px 0} 50 | .trf-ru-ba {background-position: -192px 0} 51 | .trf-by {background-position: -216px 0} 52 | .trf-bd {background-position: -240px 0} 53 | .trf-ba {background-position: -264px 0} 54 | .trf-bg {background-position: -288px 0} 55 | .trf-mm {background-position: -312px 0} 56 | .trf-es-ca {background-position: -336px 0} 57 | .trf-hk {background-position: -360px 0} 58 | .trf-ph {background-position: -384px 0} 59 | .trf-mw {background-position: -408px 0} 60 | .trf-cn {background-position: -432px 0} 61 | .trf-tw {background-position: -456px 0} 62 | .trf-fr {background-position: -480px 0} 63 | .trf-hr {background-position: -504px 0} 64 | .trf-cz {background-position: -528px 0} 65 | .trf-dk {background-position: -552px 0} 66 | .trf-nl {background-position: -576px 0} 67 | .trf-esperanto {background-position: -600px 0} 68 | .trf-ee {background-position: -624px 0} 69 | .trf-fj {background-position: -648px 0} 70 | .trf-fi {background-position: -672px 0} 71 | .trf-es-ga {background-position: -696px 0} 72 | .trf-ge {background-position: -720px 0} 73 | .trf-de {background-position: -744px 0} 74 | .trf-gr {background-position: -768px 0} 75 | .trf-in {background-position: -792px 0} 76 | .trf-ht {background-position: -816px 0} 77 | .trf-ng {background-position: -840px 0} 78 | .trf-us-ha {background-position: -864px 0} 79 | .trf-la {background-position: -888px 0} 80 | .trf-il {background-position: -912px 0} 81 | .trf-ru {background-position: -936px 0} 82 | .trf-hu {background-position: -960px 0} 83 | .trf-is {background-position: -984px 0} 84 | .trf-id {background-position: -1008px 0} 85 | .trf-ie {background-position: -1032px 0} 86 | .trf-it {background-position: -1056px 0} 87 | .trf-jp {background-position: -1080px 0} 88 | .trf-kz {background-position: -1104px 0} 89 | .trf-kh {background-position: -1128px 0} 90 | .trf-kg {background-position: -1152px 0} 91 | .trf-kr {background-position: -1176px 0} 92 | .trf-tr {background-position: -1200px 0} 93 | .trf-va {background-position: -1224px 0} 94 | .trf-lv {background-position: -1248px 0} 95 | .trf-lt {background-position: -1272px 0} 96 | .trf-lu {background-position: -1296px 0} 97 | .trf-mk {background-position: -1320px 0} 98 | .trf-mg {background-position: -1344px 0} 99 | .trf-my {background-position: -1368px 0} 100 | .trf-mt {background-position: -1392px 0} 101 | .trf-nz {background-position: -1416px 0} 102 | .trf-mn {background-position: -1440px 0} 103 | .trf-np {background-position: -1464px 0} 104 | .trf-no {background-position: -1488px 0} 105 | .trf-mx {background-position: -1512px 0} 106 | .trf-aw {background-position: -1536px 0} 107 | .trf-ir {background-position: -1560px 0} 108 | .trf-pl {background-position: -1584px 0} 109 | .trf-pt {background-position: -1608px 0} 110 | .trf-pk {background-position: -1632px 0} 111 | .trf-ro {background-position: -1656px 0} 112 | .trf-ws {background-position: -1680px 0} 113 | .trf-gb-sc {background-position: -1704px 0} 114 | .trf-rs {background-position: -1728px 0} 115 | .trf-ls {background-position: -1752px 0} 116 | .trf-zw {background-position: -1776px 0} 117 | .trf-lk {background-position: -1800px 0} 118 | .trf-sk {background-position: -1824px 0} 119 | .trf-si {background-position: -1848px 0} 120 | .trf-so {background-position: -1872px 0} 121 | .trf-es {background-position: -1896px 0} 122 | .trf-tz {background-position: -1920px 0} 123 | .trf-se {background-position: -1944px 0} 124 | .trf-pf {background-position: -1968px 0} 125 | .trf-tj {background-position: -1992px 0} 126 | .trf-ru-ta {background-position: -2016px 0} 127 | .trf-th {background-position: -2040px 0} 128 | .trf-to {background-position: -2064px 0} 129 | .trf-ua {background-position: -2088px 0} 130 | .trf-uz {background-position: -2112px 0} 131 | .trf-vn {background-position: -2136px 0} 132 | .trf-gb-wa {background-position: -2160px 0} 133 | .trf-europeanunion {background-position: -2184px 0} -------------------------------------------------------------------------------- /widgets/flags/tpw_flags_css.php: -------------------------------------------------------------------------------- 1 | "; 32 | foreach ($args as $langrecord) { 33 | echo "' . 34 | transposh_utils::display_flag("", $langrecord['flag'], $langrecord['langorig'], true) . 35 | ""; 36 | } 37 | echo "
"; 38 | } 39 | 40 | } 41 | 42 | ?> 43 | -------------------------------------------------------------------------------- /widgets/flagsemoji/tpw_flagsemoji.php: -------------------------------------------------------------------------------- 1 | '🇦🇩', 'ae' => '🇦🇪', 'af' => '🇦🇫', 'ag' => '🇦🇬', 'ai' => '🇦🇮', 'al' => '🇦🇱', 'am' => '🇦🇲', 'ao' => '🇦🇴', 'aq' => '🇦🇶', 'ar' => '🇦🇷', 43 | 'as' => '🇦🇸', 'at' => '🇦🇹', 'au' => '🇦🇺', 'aw' => '🇦🇼', 'ax' => '🇦🇽', 'az' => '🇦🇿', 'ba' => '🇧🇦', 'bb' => '🇧🇧', 'bd' => '🇧🇩', 'be' => '🇧🇪', 44 | 'bf' => '🇧🇫', 'bg' => '🇧🇬', 'bh' => '🇧🇭', 'bi' => '🇧🇮', 'bj' => '🇧🇯', 'bl' => '🇧🇱', 'bm' => '🇧🇲', 'bn' => '🇧🇳', 'bo' => '🇧🇴', 'bq' => '🇧🇶', 45 | 'br' => '🇧🇷', 'bs' => '🇧🇸', 'bt' => '🇧🇹', 'bv' => '🇧🇻', 'bw' => '🇧🇼', 'by' => '🇧🇾', 'bz' => '🇧🇿', 'ca' => '🇨🇦', 'cc' => '🇨🇨', 'cd' => '🇨🇩', 46 | 'cf' => '🇨🇫', 'cg' => '🇨🇬', 'ch' => '🇨🇭', 'ci' => '🇨🇮', 'ck' => '🇨🇰', 'cl' => '🇨🇱', 'cm' => '🇨🇲', 'cn' => '🇨🇳', 'co' => '🇨🇴', 'cr' => '🇨🇷', 47 | 'cu' => '🇨🇺', 'cv' => '🇨🇻', 'cw' => '🇨🇼', 'cx' => '🇨🇽', 'cy' => '🇨🇾', 'cz' => '🇨🇿', 'de' => '🇩🇪', 'dg' => '🇩🇬', 'dj' => '🇩🇯', 'dk' => '🇩🇰', 48 | 'dm' => '🇩🇲', 'do' => '🇩🇴', 'dz' => '🇩🇿', 'ec' => '🇪🇨', 'ee' => '🇪🇪', 'eg' => '🇪🇬', 'eh' => '🇪🇭', 'er' => '🇪🇷', 'es' => '🇪🇸', 'et' => '🇪🇹', 49 | 'fi' => '🇫🇮', 'fj' => '🇫🇯', 'fk' => '🇫🇰', 'fm' => '🇫🇲', 'fo' => '🇫🇴', 'fr' => '🇫🇷', 'ga' => '🇬🇦', 'gb' => '🇬🇧', 'gd' => '🇬🇩', 'ge' => '🇬🇪', 50 | 'gf' => '🇬🇫', 'gg' => '🇬🇬', 'gh' => '🇬🇭', 'gi' => '🇬🇮', 'gl' => '🇬🇱', 'gm' => '🇬🇲', 'gn' => '🇬🇳', 'gp' => '🇬🇵', 'gq' => '🇬🇶', 'gr' => '🇬🇷', 51 | 'gs' => '🇬🇸', 'gt' => '🇬🇹', 'gu' => '🇬🇺', 'gw' => '🇬🇼', 'gy' => '🇬🇾', 'hk' => '🇭🇰', 'hm' => '🇭🇲', 'hn' => '🇭🇳', 'hr' => '🇭🇷', 'ht' => '🇭🇹', 52 | 'hu' => '🇭🇺', 'id' => '🇮🇩', 'ie' => '🇮🇪', 'il' => '🇮🇱', 'im' => '🇮🇲', 'in' => '🇮🇳', 'io' => '🇮🇴', 'iq' => '🇮🇶', 'ir' => '🇮🇷', 'is' => '🇮🇸', 53 | 'it' => '🇮🇹', 'je' => '🇯🇪', 'jm' => '🇯🇲', 'jo' => '🇯🇴', 'jp' => '🇯🇵', 'ke' => '🇰🇪', 'kg' => '🇰🇬', 'kh' => '🇰🇭', 'ki' => '🇰🇮', 'km' => '🇰🇲', 54 | 'kn' => '🇰🇳', 'kp' => '🇰🇵', 'kr' => '🇰🇷', 'kw' => '🇰🇼', 'ky' => '🇰🇾', 'kz' => '🇰🇿', 'la' => '🇱🇦', 'lb' => '🇱🇧', 'lc' => '🇱🇨', 'li' => '🇱🇮', 55 | 'lk' => '🇱🇰', 'lr' => '🇱🇷', 'ls' => '🇱🇸', 'lt' => '🇱🇹', 'lu' => '🇱🇺', 'lv' => '🇱🇻', 'ly' => '🇱🇾', 'ma' => '🇲🇦', 'mc' => '🇲🇨', 'md' => '🇲🇩', 56 | 'me' => '🇲🇪', 'mf' => '🇲🇫', 'mg' => '🇲🇬', 'mh' => '🇲🇭', 'mk' => '🇲🇰', 'ml' => '🇲🇱', 'mm' => '🇲🇲', 'mn' => '🇲🇳', 'mo' => '🇲🇴', 'mp' => '🇲🇵', 57 | 'mq' => '🇲🇶', 'mr' => '🇲🇷', 'ms' => '🇲🇸', 'mt' => '🇲🇹', 'mu' => '🇲🇺', 'mv' => '🇲🇻', 'mw' => '🇲🇼', 'mx' => '🇲🇽', 'my' => '🇲🇾', 'mz' => '🇲🇿', 58 | 'na' => '🇳🇦', 'nc' => '🇳🇨', 'ne' => '🇳🇪', 'nf' => '🇳🇫', 'ng' => '🇳🇬', 'ni' => '🇳🇮', 'nl' => '🇳🇱', 'no' => '🇳🇴', 'np' => '🇳🇵', 'nr' => '🇳🇷', 59 | 'nu' => '🇳🇺', 'nz' => '🇳🇿', 'om' => '🇴🇲', 'pa' => '🇵🇦', 'pe' => '🇵🇪', 'pf' => '🇵🇫', 'pg' => '🇵🇬', 'ph' => '🇵🇭', 'pk' => '🇵🇰', 'pl' => '🇵🇱', 60 | 'pm' => '🇵🇲', 'pn' => '🇵🇳', 'pr' => '🇵🇷', 'ps' => '🇵🇸', 'pt' => '🇵🇹', 'pw' => '🇵🇼', 'py' => '🇵🇾', 'qa' => '🇶🇦', 're' => '🇷🇪', 'ro' => '🇷🇴', 61 | 'rs' => '🇷🇸', 'ru' => '🇷🇺', 'rw' => '🇷🇼', 'sa' => '🇸🇦', 'sb' => '🇸🇧', 'sc' => '🇸🇨', 'sd' => '🇸🇩', 'se' => '🇸🇪', 'sg' => '🇸🇬', 'sh' => '🇸🇭', 62 | 'si' => '🇸🇮', 'sj' => '🇸🇯', 'sk' => '🇸🇰', 'sl' => '🇸🇱', 'sm' => '🇸🇲', 'sn' => '🇸🇳', 'so' => '🇸🇴', 'sr' => '🇸🇷', 'ss' => '🇸🇸', 'st' => '🇸🇹', 63 | 'sv' => '🇸🇻', 'sx' => '🇸🇽', 'sy' => '🇸🇾', 'sz' => '🇸🇿', 'tc' => '🇹🇨', 'td' => '🇹🇩', 'tf' => '🇹🇫', 'tg' => '🇹🇬', 'th' => '🇹🇭', 'tj' => '🇹🇯', 64 | 'tk' => '🇹🇰', 'tl' => '🇹🇱', 'tm' => '🇹🇲', 'tn' => '🇹🇳', 'to' => '🇹🇴', 'tr' => '🇹🇷', 'tt' => '🇹🇹', 'tv' => '🇹🇻', 'tw' => '🇹🇼', 'tz' => '🇹🇿', 65 | 'ua' => '🇺🇦', 'ug' => '🇺🇬', 'um' => '🇺🇲', 'us' => '🇺🇸', 'uy' => '🇺🇾', 'uz' => '🇺🇿', 'va' => '🇻🇦', 'vc' => '🇻🇨', 've' => '🇻🇪', 'vg' => '🇻🇬', 66 | 'vi' => '🇻🇮', 'vn' => '🇻🇳', 'vu' => '🇻🇺', 'wf' => '🇼🇫', 'ws' => '🇼🇸', 'xk' => '🇽🇰', 'ye' => '🇾🇪', 'yt' => '🇾🇹', 'za' => '🇿🇦', 'zm' => '🇿🇲', 67 | 'zw' => '🇿🇼', 'eu' => '🇪🇺', 'es-ca' => '🏴󠁥󠁳󠁣󠁴󠁿', 'ru-ba' => '🏴󠁲󠁵󠁢󠁡󠁿', 'unknown' => '🇺🇳', 'gb-eng' => '🏴󠁧󠁢󠁥󠁮󠁧󠁿', 'gb-sct' => '🏴󠁧󠁢󠁳󠁣󠁴󠁿', 'gb-wls' => '🏴󠁧󠁢󠁷󠁬󠁳󠁿', 68 | ]; 69 | 70 | // Just put the widget out there 71 | echo "
"; 72 | foreach ($args as $langrecord) { 73 | echo "'; 74 | if (isset($emoji_flags[$langrecord['flag']])) { 75 | echo $emoji_flags[$langrecord['flag']]; 76 | } else { 77 | echo $emoji_flags['unknown']; 78 | } 79 | echo ""; 80 | } 81 | echo "
"; 82 | } 83 | } 84 | 85 | ?> 86 | -------------------------------------------------------------------------------- /widgets/flagslist/tpw_list_with_flags.php: -------------------------------------------------------------------------------- 1 | transposh_plugin_url, PHP_URL_PATH); 43 | 44 | echo "
"; 45 | foreach ($args as $langrecord) { 46 | echo "' . 47 | transposh_utils::display_flag("$plugpath/img/flags", $langrecord['flag'], $langrecord['langorig'], false) . ""; 48 | echo "' . "{$langrecord['langorig']}
"; 49 | } 50 | echo "
"; 51 | } 52 | 53 | } 54 | 55 | ?> 56 | -------------------------------------------------------------------------------- /widgets/flagslist/tpw_list_with_flags_css.php: -------------------------------------------------------------------------------- 1 | "; 41 | foreach ($args as $langrecord) { 42 | echo "' . 43 | transposh_utils::display_flag('', $langrecord['flag'], $langrecord['langorig'], true) . ''; 44 | echo "' . "{$langrecord['langorig']}
"; 45 | } 46 | echo ""; 47 | } 48 | 49 | } 50 | 51 | ?> 52 | -------------------------------------------------------------------------------- /widgets/select2/select2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/widgets/select2/select2.png -------------------------------------------------------------------------------- /widgets/select2/select2x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/widgets/select2/select2x2.png -------------------------------------------------------------------------------- /widgets/select2/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oferwald/transposh/d8c90e57af2bd8e12979fc133c214df878d4409f/widgets/select2/spinner.gif -------------------------------------------------------------------------------- /widgets/select2/tpw_select2.js: -------------------------------------------------------------------------------- 1 | (function ($) { // closure 2 | $(function () { 3 | function format(language) { 4 | var originalOption = language.element; 5 | var img = ' '; 6 | return img + language.text; 7 | } 8 | 9 | function format2(language) { 10 | var originalOption = $(this.element).children('[value="'+language.id+'"]'); 11 | var img = ' '; 12 | return img + language.text; 13 | } 14 | 15 | jQuery(".tp_lang2").select2({ 16 | formatResult: format, 17 | formatSelection: format2 18 | }); 19 | }); 20 | 21 | }(jQuery)); // end of closure 22 | -------------------------------------------------------------------------------- /widgets/select2/tpw_select2.php: -------------------------------------------------------------------------------- 1 | '; 38 | 39 | echo '
"; 45 | 46 | echo ""; 47 | } 48 | 49 | } 50 | 51 | ?> 52 | -------------------------------------------------------------------------------- /wp/transposh_ajax.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wp/transposh_backup.php: -------------------------------------------------------------------------------- 1 | transposh = &$transposh; 27 | } 28 | 29 | function init_body() { 30 | $body = array(); 31 | $body['home_url'] = $this->transposh->home_url; 32 | $body['key'] = $this->transposh->options->transposh_key; 33 | $body['v'] = '2'; 34 | $body['tpv'] = '%VERSION%'; 35 | return $body; 36 | } 37 | 38 | function do_backup() { 39 | $body = $this->init_body(); 40 | //Check if there are thing to backup, before even accessing the service 41 | $rowstosend = $this->transposh->database->get_all_human_translation_history('null', 1); 42 | if (empty($rowstosend)) { 43 | echo "500 - No human translations to backup."; 44 | return; 45 | } 46 | 47 | // this one is for getting the key 48 | $result = wp_remote_post(TRANSPOSH_BACKUP_SERVICE_URL, array('body' => $body)); 49 | if (is_wp_error($result)) { 50 | echo '500 - ' . $result->get_error_message(); 51 | return; 52 | } 53 | if (isset($result['headers']['fail'])) { 54 | echo '500 - ' . $result['headers']['fail']; 55 | return; 56 | } 57 | if ($this->transposh->options->transposh_key == "") { 58 | $this->transposh->options->transposh_key = $result['headers']['transposh-key']; 59 | // TODO: deliever new gottenkey to client side? 60 | $this->transposh->options->update_options(); 61 | } 62 | if (isset($result['headers']['lastitem'])) { 63 | $rowstosend = $this->transposh->database->get_all_human_translation_history($result['headers']['lastitem'], 100); 64 | while ($rowstosend) { 65 | $item = 0; 66 | $lastorig = ''; 67 | $lastlang = ''; 68 | $lasttrans = ''; 69 | $lastby = ''; 70 | $lastts = ''; 71 | $body = $this->init_body(); 72 | foreach ($rowstosend as $row) { 73 | if ($lastorig != $row->original) { 74 | $body['or' . $item] = $row->original; 75 | $lastorig = $row->original; 76 | } 77 | if ($lastlang != $row->lang) { 78 | $body['ln' . $item] = $row->lang; 79 | $lastlang = $row->lang; 80 | } 81 | if ($lasttrans != $row->translated) { 82 | $body['tr' . $item] = $row->translated; 83 | $lasttrans = $row->translated; 84 | } 85 | if ($lastby != $row->translated_by) { 86 | $body['tb' . $item] = $row->translated_by; 87 | $lastby = $row->translated_by; 88 | } 89 | if ($lastts != $row->timestamp) { 90 | $body['ts' . $item] = $row->timestamp; 91 | $lastts = $row->timestamp; 92 | } 93 | $item++; 94 | } 95 | $body['items'] = $item; 96 | // no need to post 0 items 97 | if ($item == 0) return; 98 | $result = wp_remote_post(TRANSPOSH_BACKUP_SERVICE_URL, array('body' => $body)); 99 | if (is_wp_error($result)) { 100 | echo "500 - " . $result->get_error_message(); 101 | return; 102 | } 103 | if (isset($result['headers']['fail'])) { 104 | echo "500 - " . $result['headers']['fail']; 105 | return; 106 | } 107 | $rowstosend = $this->transposh->database->get_all_human_translation_history($row->timestamp, 100); 108 | } 109 | } 110 | echo '200 - backup in sync'; 111 | } 112 | 113 | function do_restore() { 114 | $body['to'] = time(); //TODO: fix this to get from DB 115 | $body['home_url'] = $this->transposh->home_url; 116 | $body['key'] = $this->transposh->options->transposh_key; 117 | $result = wp_remote_get(TRANSPOSH_RESTORE_SERVICE_URL . "?to={$body['to']}&key={$body['key']}&home_url={$body['home_url']}"); // gotta be a better way... 118 | $lines = split("[\n|\r]", $result['body']); 119 | foreach ($lines as $line) { 120 | $trans = split(',', $line); 121 | if ($trans[0]) 122 | $this->transposh->database->restore_translation($trans[0], $trans[1], $trans[2], $trans[3], $trans[4]); 123 | } 124 | // clean up cache so that results will actually show 125 | $this->transposh->database->cache_clean(); 126 | exit; 127 | } 128 | 129 | } -------------------------------------------------------------------------------- /wp/transposh_mail.php: -------------------------------------------------------------------------------- 1 | transposh = &$transposh; 29 | 30 | add_action('transposh_human_translation', array(&$this, 'transposh_mail_humantranslation'), 10, 4); 31 | add_filter('wp_mail', array(&$this, 'transposh_mail_filter')); 32 | add_action('transposh_digest_event', array(&$this, 'run_digest')); 33 | add_action('transposh_buffered_mail_event', array(&$this, 'run_buffered')); 34 | } 35 | 36 | /** 37 | * Whom should we mail? 38 | * @return string email address 39 | */ 40 | function get_mail_to() { 41 | if ($this->transposh->options->mail_to) { 42 | $to = $this->transposh->options->mail_to; 43 | } else { 44 | $to = get_site_option('admin_email'); 45 | } 46 | return $to; 47 | } 48 | 49 | /** 50 | * Send a new mail on a human translation 51 | * @param string $translation 52 | * @param string $original 53 | * @param string $lang 54 | * @param string $translated_by 55 | */ 56 | function transposh_mail_humantranslation($translation, $original, $lang, $translated_by) { 57 | if ($this->transposh->options->mail_ignore_admin) { 58 | $user = new WP_User($translated_by); 59 | if ($user->has_cap(TRANSLATOR)) { 60 | tp_logger($user->ID . " is a translator..."); 61 | return; 62 | } 63 | } 64 | 65 | if ($this->transposh->options->mail_ontranslate_buffer) { 66 | wp_clear_scheduled_hook('transposh_buffered_mail_event'); 67 | wp_schedule_single_event(time() + 180, 'transposh_buffered_mail_event'); // mail will be buffered for 3 minutes before it is sent 68 | if (false === ( $buffered_mail = get_transient('transposh_buffered_mail') )) { 69 | $buffered_mail = ""; 70 | } 71 | $buffered_mail .= __('Original string', TRANSPOSH_TEXT_DOMAIN) . ": $original\n
" 72 | . __('Translation', TRANSPOSH_TEXT_DOMAIN) . ": $translation\n
" 73 | . __('Language', TRANSPOSH_TEXT_DOMAIN) . ": $lang\n
" 74 | . __('Translated by', TRANSPOSH_TEXT_DOMAIN) . ": " . transposh_utils::wordpress_user_by_by($translated_by) . "\n
" 75 | . __('Translated on', TRANSPOSH_TEXT_DOMAIN) . ": " . date("r") . "\n\n

"; 76 | 77 | set_transient('transposh_buffered_mail', $buffered_mail, 1 * HOUR_IN_SECONDS); 78 | tp_logger("Some mail buffered for later"); 79 | return; 80 | } 81 | // if this option is off, no mail should be sent on translation 82 | if (!$this->transposh->options->mail_ontranslate) { 83 | return; 84 | } 85 | $to = $this->get_mail_to(); 86 | $headers = array('Content-Type: text/html; charset=UTF-8'); // html mail... 87 | $subject = __('A new translation was just posted to your site', TRANSPOSH_TEXT_DOMAIN); 88 | $body = "

" . __('The following translation was just added to your site', TRANSPOSH_TEXT_DOMAIN) . ".

\n\n" 89 | . __('Original string', TRANSPOSH_TEXT_DOMAIN) . ": $original\n
" 90 | . __('Translation', TRANSPOSH_TEXT_DOMAIN) . ": $translation\n
" 91 | . __('Language', TRANSPOSH_TEXT_DOMAIN) . ": $lang\n
" 92 | . __('Translated by', TRANSPOSH_TEXT_DOMAIN) . ": " . transposh_utils::wordpress_user_by_by($translated_by) . "\n\n

" 93 | . '' 94 | . __('If you believe that those translations are not good, use the translation editor to modify it', TRANSPOSH_TEXT_DOMAIN) . "\n\n

" 95 | . "

" . __('Team Transposh', TRANSPOSH_TEXT_DOMAIN) . "

\n\n
" 96 | ; 97 | wp_mail($to, wp_specialchars_decode($subject), $body, $headers); 98 | } 99 | 100 | /** 101 | * This function should clean mails from stray transposh breakers inserted by locale markings 102 | * 103 | * @param array $args 104 | * @return array 105 | */ 106 | function transposh_mail_filter($args) { 107 | 108 | $new_mail = array( 109 | 'to' => $args['to'], 110 | 'subject' => transposh_utils::clean_breakers($args['subject']), 111 | 'message' => transposh_utils::clean_breakers($args['message']), 112 | 'headers' => $args['headers'], 113 | 'attachments' => $args['attachments'], 114 | ); 115 | 116 | return $new_mail; 117 | } 118 | 119 | function generate_digest() { 120 | $digest = ""; 121 | tp_logger("digest should be generated from:" . $this->transposh->options->transposh_last_mail_digest); 122 | $rowstosend = $this->transposh->database->get_all_human_translation_history($this->transposh->options->transposh_last_mail_digest, 500); 123 | if (count($rowstosend)) { 124 | $digest .= ""; 130 | 131 | foreach ($rowstosend as $row) { 132 | $by = transposh_utils::wordpress_user_by_by($row->translated_by); 133 | $date = date('r', $row->timestamp); 134 | $orig = esc_html($row->original); 135 | $tran = esc_html($row->translated); 136 | $digest .= "\n\n\n\n\n\n"; 137 | } 138 | $digest .= "
" . 125 | __('Original string', TRANSPOSH_TEXT_DOMAIN) . "" . 126 | __('Language', TRANSPOSH_TEXT_DOMAIN) . "" . 127 | __('Translated string', TRANSPOSH_TEXT_DOMAIN) . "" . 128 | __('Translator', TRANSPOSH_TEXT_DOMAIN) . "" . 129 | __('Date', TRANSPOSH_TEXT_DOMAIN) . "
\n{$orig}\n{$row->lang}\n{$tran}\n{$by}\n{$date}
"; 139 | } 140 | //var_dump($this->transposh->database->get_all_human_translation_history()); 141 | return $digest; 142 | } 143 | 144 | function run_digest() { 145 | $digest = $this->generate_digest(); 146 | tp_logger("Trying to digest a mail"); 147 | if (!$digest) { 148 | tp_logger("Nothing to digest"); 149 | return; 150 | } 151 | $to = $this->get_mail_to(); 152 | $headers = array('Content-Type: text/html; charset=UTF-8'/* ,'Content-Transfer-Encoding: 8bit' */); // html mail... 153 | $subject = __('Daily digest of human translation activities', TRANSPOSH_TEXT_DOMAIN); 154 | $body = "

" . __('The following translations were made on your site in the last day', TRANSPOSH_TEXT_DOMAIN) . ".

\n" 155 | . $digest; 156 | wp_mail($to, wp_specialchars_decode($subject), $body, $headers); 157 | $this->transposh->options->transposh_last_mail_digest = time(); 158 | $this->transposh->options->update_options(); 159 | } 160 | 161 | function run_buffered() { 162 | tp_logger("buffered mail outgoing"); 163 | if (false === ( $buffered_mail = get_transient('transposh_buffered_mail') )) { 164 | tp_logger("nothing buffered - should not happened"); 165 | return; 166 | } 167 | $to = $this->get_mail_to(); 168 | $headers = array('Content-Type: text/html; charset=UTF-8'); // html mail... 169 | $subject = __('Some new translation were just posted to your site', TRANSPOSH_TEXT_DOMAIN); 170 | $body = "

" . __('The following translations were just added to your site', TRANSPOSH_TEXT_DOMAIN) . ".

\n\n" 171 | . $buffered_mail 172 | . '' 173 | . __('If you believe that those translations are not good, use the translation editor to modify it', TRANSPOSH_TEXT_DOMAIN) . "\n\n

" 174 | . "

" . __('Team Transposh', TRANSPOSH_TEXT_DOMAIN) . "

\n\n
" 175 | ; 176 | wp_mail($to, wp_specialchars_decode($subject), $body, $headers); 177 | delete_transient('transposh_buffered_mail'); 178 | } 179 | } 180 | --------------------------------------------------------------------------------