diff --git a/languages/loco-translate.pot b/languages/loco-translate.pot index 24537ea6..20ecd287 100644 --- a/languages/loco-translate.pot +++ b/languages/loco-translate.pot @@ -1,9 +1,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Loco Translate 2.5.7-dev\n" +"Project-Id-Version: Loco Translate 2.5.7\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/loco-translate/\n" -"POT-Creation-Date: 2022-01-17 10:47+0000\n" +"POT-Creation-Date: 2022-01-17 12:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: \n" @@ -13,7 +13,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Loco https://localise.biz/\n" -"X-Loco-Version: 2.5.7-dev; wp-5.8.3\n" +"X-Loco-Version: 2.5.7; wp-5.8.3\n" "X-Domain: loco-translate" #: src/fs/FileWriter.php:214 diff --git a/loco.php b/loco.php index f0230d76..8175e517 100644 --- a/loco.php +++ b/loco.php @@ -4,9 +4,9 @@ Plugin URI: https://wordpress.org/plugins/loco-translate/ Description: Translate themes and plugins directly in WordPress Author: Tim Whitlock -Version: 2.5.7-dev +Version: 2.5.7 Requires at least: 4.1 -Tested up to: 5.8.1 +Tested up to: 5.8.3 Requires PHP: 5.2.4 Author URI: https://localise.biz/wordpress/plugin Text Domain: loco-translate @@ -33,7 +33,7 @@ function loco_plugin_file(){ * @return string */ function loco_plugin_version(){ - return '2.5.7-dev'; + return '2.5.7'; } diff --git a/pub/css/podiff.css b/pub/css/podiff.css index c45bcb2b..c1c8cf86 100644 --- a/pub/css/podiff.css +++ b/pub/css/podiff.css @@ -1 +1 @@ -#loco-admin.wrap .revisions-diff{padding:10px;min-height:20px}#loco-admin.wrap table.diff{border-collapse:collapse;table-layout:auto}#loco-admin.wrap table.diff td{white-space:nowrap;overflow:hidden;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;padding:2px}#loco-admin.wrap table.diff td>span{color:#aaa}#loco-admin.wrap table.diff td>span:after{content:". "}#loco-admin.wrap table.diff tbody{border-top:1px dashed #ccc}#loco-admin.wrap table.diff tbody:first-child{border-top:none}#loco-admin.wrap .revisions.loading .diff-meta{color:#eee}#loco-admin.wrap .revisions.loading .loading-indicator span.spinner{visibility:visible;background:#fff url(../img/spin-modal.gif?v=2.5.7) center center no-repeat}#loco-admin.wrap .revisions-meta{clear:both;padding:10px 12px;margin:0;position:relative;top:10px}#loco-admin.wrap .revisions-meta .diff-meta{clear:none;float:left;width:50%;padding:0;min-height:auto}#loco-admin.wrap .revisions-meta .diff-meta button{margin-top:5px}#loco-admin.wrap .revisions-meta .diff-meta-current{float:right;text-align:right}#loco-admin.wrap .revisions-meta time{color:#72777c}#loco-admin.wrap .revisions-control-frame{margin:10px 0}#loco-admin.wrap .revisions-diff-frame{margin-top:20px} \ No newline at end of file +#loco-admin.wrap .revisions-diff{padding:10px;min-height:20px}#loco-admin.wrap table.diff{border-collapse:collapse;table-layout:auto}#loco-admin.wrap table.diff td{white-space:nowrap;overflow:hidden;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;padding:2px}#loco-admin.wrap table.diff td>span{color:#aaa}#loco-admin.wrap table.diff td>span:after{content:". "}#loco-admin.wrap table.diff tbody{border-top:1px dashed #ccc}#loco-admin.wrap table.diff tbody:first-child{border-top:none}#loco-admin.wrap table.diff td>.dashicons{display:none}#loco-admin.wrap .revisions.loading .diff-meta{color:#eee}#loco-admin.wrap .revisions.loading .loading-indicator span.spinner{visibility:visible;background:#fff url(../img/spin-modal.gif?v=2.5.7) center center no-repeat}#loco-admin.wrap .revisions-meta{clear:both;padding:10px 12px;margin:0;position:relative;top:10px}#loco-admin.wrap .revisions-meta .diff-meta{clear:none;float:left;width:50%;padding:0;min-height:auto}#loco-admin.wrap .revisions-meta .diff-meta button{margin-top:5px}#loco-admin.wrap .revisions-meta .diff-meta-current{float:right;text-align:right}#loco-admin.wrap .revisions-meta time{color:#72777c}#loco-admin.wrap .revisions-control-frame{margin:10px 0}#loco-admin.wrap .revisions-diff-frame{margin-top:20px} \ No newline at end of file diff --git a/pub/js/min/admin.js b/pub/js/min/admin.js index 58de24a1..c201f4aa 100644 --- a/pub/js/min/admin.js +++ b/pub/js/min/admin.js @@ -1,33 +1,33 @@ -(function(y, w, h, J) { -var p = function() { +(function(y, w, k, J) { +var n = function() { function f(d) { throw Error("Failed to require " + d); } var d = {}; return { -register: function(f, n) { -d[f] = n; +register: function(f, m) { +d[f] = m; }, -require: function(h, n) { -return d[h] || f(n); +require: function(k, m) { +return d[k] || f(m); }, -include: function(h, n, k) { -return d[h] || (k ? f(n) : null); +include: function(k, m, g) { +return d[k] || (g ? f(m) : null); } }; }(); -p.register("$1", function(f, d, h) { -function n(k) { -var c = typeof k; -if ("string" === c) if (/[^ <>!=()%^&|?:n0-9]/.test(k)) console.error("Invalid plural: " + k); else return new Function("n", "return " + k); -"function" !== c && (k = function(b) { +n.register("$1", function(f, d, k) { +function m(g) { +var c = typeof g; +if ("string" === c) if (/[^ <>!=()%^&|?:n0-9]/.test(g)) console.error("Invalid plural: " + g); else return new Function("n", "return " + g); +"function" !== c && (g = function(b) { return 1 != b; }); -return k; +return g; } -f.init = function(k) { +f.init = function(g) { function c(a, b, e) { -return (a = m[a]) && a[e] ? a[e] : b || ""; +return (a = h[a]) && a[e] ? a[e] : b || ""; } function b(a) { return c(a, a, 0); @@ -36,12 +36,12 @@ function a(a, b) { return c(b + "" + a, a, 0); } function e(a, b, e) { -e = Number(k(e)); +e = Number(g(e)); isNaN(e) && (e = 0); return c(a, e ? b : a, e); } -k = n(k); -var m = {}; +g = m(g); +var h = {}; return { __: b, _x: a, @@ -50,22 +50,22 @@ _: b, x: a, n: e, load: function(a) { -m = a || {}; +h = a || {}; return this; }, pluraleq: function(a) { -k = n(a); +g = m(a); return this; } }; }; return f; }({}, y, w)); -p.register("$2", function(f, d, h) { +n.register("$2", function(f, d, k) { f.ie = function() { -var f = !1, k = 0; -d.attachEvent && d.navigator && /MSIE (\d+)\./.exec(String(navigator.appVersion)) && (k = Number(RegExp.$1), -f = 11 > k); +var f = !1, g = 0; +d.attachEvent && d.navigator && /MSIE (\d+)\./.exec(String(navigator.appVersion)) && (g = Number(RegExp.$1), +f = 11 > g); return function() { return f; }; @@ -75,8 +75,8 @@ return f; }; return f; }({}, y, w)); -p.register("$3", function(f, d, h) { -Number.prototype.format = function(d, k, c) { +n.register("$3", function(f, d, k) { +Number.prototype.format = function(d, g, c) { d = Math.pow(10, d || 0); var b = Math.round(d * this) / d; d = []; @@ -87,142 +87,142 @@ d.unshift(b.substring(e - 3, e)); b = d.join(c || ","); if (a) { c = a; -var m; -for (d = c.length; "0" === c.charAt(--d); ) m = d; -m && (c = c.substring(0, m)); -(a = c) && (b += (k || ".") + a); +var h; +for (d = c.length; "0" === c.charAt(--d); ) h = d; +h && (c = c.substring(0, h)); +(a = c) && (b += (g || ".") + a); } return b; }; Number.prototype.percent = function(d) { -var k = 0, c = this && d ? 100 * (this / d) : 0; +var g = 0, c = this && d ? 100 * (this / d) : 0; if (0 === c) return "0"; if (100 === c) return "100"; -if (99 < c) c = Math.min(c, 99.9), d = c.format(++k); else if (.5 > c) { +if (99 < c) c = Math.min(c, 99.9), d = c.format(++g); else if (.5 > c) { c = Math.max(c, 1e-4); do { -d = c.format(++k); -} while ("0" === d && 4 > k); +d = c.format(++g); +} while ("0" === d && 4 > g); d = d.substr(1); } else d = c.format(0); return d; }; return f; }({}, y, w)); -p.register("$4", function(f, d, h) { +n.register("$4", function(f, d, k) { Array.prototype.indexOf || (Array.prototype.indexOf = function(d) { if (null == this) throw new TypeError(); -var k, c = Object(this), b = c.length >>> 0; +var g, c = Object(this), b = c.length >>> 0; if (0 === b) return -1; -k = 0; -1 < arguments.length && (k = Number(arguments[1]), k != k ? k = 0 : 0 != k && Infinity != k && -Infinity != k && (k = (0 < k || -1) * Math.floor(Math.abs(k)))); -if (k >= b) return -1; -for (k = 0 <= k ? k : Math.max(b - Math.abs(k), 0); k < b; k++) if (k in c && c[k] === d) return k; +g = 0; +1 < arguments.length && (g = Number(arguments[1]), g != g ? g = 0 : 0 != g && Infinity != g && -Infinity != g && (g = (0 < g || -1) * Math.floor(Math.abs(g)))); +if (g >= b) return -1; +for (g = 0 <= g ? g : Math.max(b - Math.abs(g), 0); g < b; g++) if (g in c && c[g] === d) return g; return -1; }); return f; }({}, y, w)); -p.register("$5", function(f, d, p) { +n.register("$5", function(f, d, n) { d.JSON || (d.JSON = { -parse: h.parseJSON, +parse: k.parseJSON, stringify: null }); return f = d.JSON; }({}, y, w)); -p.register("$6", function(f, d, h) { -f.trim = function(d, k) { -for (k || (k = " \n"); d && -1 !== k.indexOf(d.substr(0, 1)); ) d = d.substr(1); -for (;d && -1 !== k.indexOf(d.substr(-1)); ) d = d.substr(0, d.length - 1); +n.register("$6", function(f, d, k) { +f.trim = function(d, g) { +for (g || (g = " \n"); d && -1 !== g.indexOf(d.substr(0, 1)); ) d = d.substr(1); +for (;d && -1 !== g.indexOf(d.substr(-1)); ) d = d.substr(0, d.length - 1); return d; }; f.sprintf = function(d) { -var k = 0, c = [].slice.call(arguments, 1); +var g = 0, c = [].slice.call(arguments, 1); return d.replace(/%(?:([1-9][0-9]*)\$)?([sud%])/g, function(b, a, e) { -return "%" === e ? "%" : (a ? c[Number(a) - 1] : c[k++]) || ""; +return "%" === e ? "%" : (a ? c[Number(a) - 1] : c[g++]) || ""; }); }; return f; }({}, y, w)); -p.register("$21", function(f, d, h) { -function n(k) { +n.register("$21", function(f, d, k) { +function m(g) { return function(c, b) { -for (var a = c[k] || 0; (c = c.offsetParent) && c !== (b || h.body); ) a += c[k] || 0; +for (var a = c[g] || 0; (c = c.offsetParent) && c !== (b || k.body); ) a += c[g] || 0; return a; }; } -f.top = n("offsetTop"); -f.left = n("offsetLeft"); -f.el = function(k, c) { -var b = h.createElement(k || "div"); +f.top = m("offsetTop"); +f.left = m("offsetLeft"); +f.el = function(g, c) { +var b = k.createElement(g || "div"); c && (b.className = c); return b; }; -f.txt = function(k) { -return h.createTextNode(k || ""); +f.txt = function(g) { +return k.createTextNode(g || ""); }; return f; }({}, y, w)); -p.register("$7", function(f, d, D) { -function n(a, b, e) { +n.register("$7", function(f, d, D) { +function m(a, b, e) { function c() { -q(); +p(); v = setTimeout(b, e); } -function q() { +function p() { v && clearTimeout(v); v = null; } var v; c(); -h(a).on("mouseenter", q).on("mouseleave", c); +k(a).on("mouseenter", p).on("mouseleave", c); return { die: function() { -q(); -h(a).off("mouseenter mouseleave"); +p(); +k(a).off("mouseenter mouseleave"); } }; } -function k(a, b) { +function g(a, b) { a.fadeTo(b, 0, function() { a.slideUp(b, function() { a.remove(); -h(d).triggerHandler("resize"); +k(d).triggerHandler("resize"); }); }); return a; } function c(a, b) { function e(b) { -l[v] = null; -k(h(a), 250); -q && q.die(); +q[v] = null; +g(k(a), 250); +p && p.die(); var c; if (c = b) b.stopPropagation(), b.preventDefault(), c = !1; return c; } function c(b) { -q && q.die(); -return q = n(a, e, b); +p && p.die(); +return p = m(a, e, b); } -var q, v, m, g = h(a), B = g.find("button"); -0 === B.length && (g.addClass("is-dismissible"), B = h(''); -p.require("$12", "tooltip.js").init(a); +function g(a) { +a = k(''); +n.require("$12", "tooltip.js").init(a); return a; } function c(a) { -return k("cloud").attr("title", a.labels[8] + " (Ctrl-U)").on("click", function(b) { +return g("cloud").attr("title", a.labels[8] + " (Ctrl-U)").on("click", function(b) { b.preventDefault(); a.focus().fuzzy(!a.fuzzy()); }); } function b(a) { -return k("robot").attr("title", a.labels[9] + " (Ctrl-J)").on("click", function(b) { +return g("robot").attr("title", a.labels[9] + " (Ctrl-J)").on("click", function(b) { b.preventDefault(); a.fire("poHint"); }); } -d = p.require("$24", "base.js"); +d = n.require("$24", "base.js"); f.init = function(a) { -var b = new n(); +var b = new m(); a = b.setRootCell(a); -var c = a.splity("po-list", "po-edit"), d = c[0], g = c[1], c = g.splitx("po-trans", "po-comment"), k = c[0], f = c[1].header("Loading.."), c = k.splity("po-source", "po-target"), k = c[0].header("Loading.."), c = c[1].header("Loading.."); +var c = a.splity("po-list", "po-edit"), d = c[0], g = c[1], c = g.splitx("po-trans", "po-comment"), f = c[0], k = c[1].header("Loading.."), c = f.splity("po-source", "po-target"), f = c[0].header("Loading.."), c = c[1].header("Loading.."); a.distribute([ .34 ]); g.distribute([ .8 ]); b.setListCell(d); -b.setSourceCell(k); +b.setSourceCell(f); b.setTargetCell(c); -b.commentCell = f; +b.commentCell = k; b.editable.source = !1; return b; }; -d = n.prototype = d.extend(n); +d = m.prototype = d.extend(m); d.getListHeadings = function() { var a = this.t || { _x: function(a) { @@ -3465,8 +3465,8 @@ return a; }; d.getListEntry = function(a) { var b = this.cellText, c = [ function() { -var c, d = b(a.source() || ""), k = a.context(); -return k ? (c = D.createElement("p"), c.appendChild(D.createElement("mark")).innerText = k, +var c, d = b(a.source() || ""), h = a.context(); +return h ? (c = D.createElement("p"), c.appendChild(D.createElement("mark")).innerText = h, c.appendChild(D.createTextNode(" " + d)), c) : d; } ]; this.targetLocale && (c[1] = function() { @@ -3512,7 +3512,7 @@ return !this._unlocked; d.setStatus = function(a) { var e = this.$tnav; if (null == a) e && (e.remove(), this.$tnav = null); else { -e || (this.$tnav = e = h("").append(c(this)).append(b(this)).appendTo(this.targetCell.header())); +e || (this.$tnav = e = k("").append(c(this)).append(b(this)).appendTo(this.targetCell.header())); var d = []; a.translated() ? a.fuzzy() && d.push("po-fuzzy") : d.push("po-empty"); e.attr("class", d.join(" ")); @@ -3520,24 +3520,24 @@ e.attr("class", d.join(" ")); }; d.getSorter = function() { function a(a, c) { -var d = a.weight(), k = c.weight(); -return d === k ? b(a, c) : d > k ? -1 : 1; +var d = a.weight(), h = c.weight(); +return d === h ? b(a, c) : d > h ? -1 : 1; } function b(a, c) { return a.hash().localeCompare(c.hash()); } var c = this; return function(d) { -var g = c.po, k = c.locked() ? a : b; +var g = c.po, f = c.locked() ? a : b; d.sort(function(a, b) { -return k(g.row(a), g.row(b)); +return f(g.row(a), g.row(b)); }); }; }; return f; }({}, y, w)); -p.register("$14", function(f, d, p) { -var n = { +n.register("$14", function(f, d, n) { +var m = { copy: 66, clear: 75, save: 83, @@ -3547,7 +3547,7 @@ prev: 38, enter: 13, invis: 73, hint: 74 -}, k = { +}, g = { 38: !0, 40: !0, 73: !0 @@ -3583,42 +3583,42 @@ f.init = function(b, a) { function e(a) { if (a.isDefaultPrevented() || !a.metaKey && !a.ctrlKey) return !0; var e = a.which; -if (!m[e]) return !0; +if (!h[e]) return !0; var d = c[e]; if (!d) throw Error("command undefined #" + e); -if (a.altKey || a.shiftKey && !k[e] || !1 === d(a, b)) return !0; +if (a.altKey || a.shiftKey && !g[e] || !1 === d(a, b)) return !0; a.stopPropagation(); a.preventDefault(); return !1; } -var m = {}; -h(a || d).on("keydown", e); +var h = {}; +k(a || d).on("keydown", e); return { add: function(a, b) { -c[n[a]] = b; +c[m[a]] = b; return this; }, enable: function() { var a, b; -for (b in arguments) a = n[arguments[b]], m[a] = !0; +for (b in arguments) a = m[arguments[b]], h[a] = !0; return this; }, disable: function() { -h(a || d).off("keydown", e); -b = a = m = null; +k(a || d).off("keydown", e); +b = a = h = null; } }; }; return f; }({}, y, w)); -p.register("$25", function(f, d, h) { -function n() { +n.register("$25", function(f, d, k) { +function m() { this.reIndex([]); } f.init = function() { -return new n(); +return new m(); }; -d = n.prototype; +d = m.prototype; d.reIndex = function(d) { for (var c = {}, b = -1, a = d.length; ++b < a; ) c[d[b]] = b; this.keys = d; @@ -3667,11 +3667,11 @@ for (var c = -1, b = this.keys, a = this.length; ++c < a; ) d(b[c], this[c], c); return this; }; d.sort = function(d) { -for (var c = -1, b = this.length, a, e = this.keys, m = this.ords, l = []; ++c < b; ) l[c] = [ this[c], e[c] ]; -l.sort(function(a, b) { +for (var c = -1, b = this.length, a, e = this.keys, h = this.ords, f = []; ++c < b; ) f[c] = [ this[c], e[c] ]; +f.sort(function(a, b) { return d(a[0], b[0]); }); -for (c = 0; c < b; c++) a = l[c], this[c] = a[0], a = a[1], e[c] = a, m[a] = c; +for (c = 0; c < b; c++) a = f[c], this[c] = a[0], a = a[1], e[c] = a, h[a] = c; return this; }; d.join = function(d) { @@ -3680,28 +3680,28 @@ return [].join.call(this, d); d = null; return f; }({}, y, w)); -p.register("$26", function(f, d, h) { -function n(d, c) { +n.register("$26", function(f, d, k) { +function m(d, c) { var b = RegExp("^.{0," + (d - 1) + "}[" + c + "]"), a = RegExp("^[^" + c + "]+"); -return function(c, m) { -for (var l = c.length, g; l > d; ) { -g = b.exec(c) || a.exec(c); -if (null == g) break; -g = g[0]; -m.push(g); -g = g.length; -l -= g; -c = c.substr(g); +return function(c, h) { +for (var f = c.length, l; f > d; ) { +l = b.exec(c) || a.exec(c); +if (null == l) break; +l = l[0]; +h.push(l); +l = l.length; +f -= l; +c = c.substr(l); } -0 !== l && m.push(c); -return m; +0 !== f && h.push(c); +return h; }; } f.create = function(d) { function c(a) { -return g[a] || "\\" + a; +return l[a] || "\\" + a; } -var b, a, e = /(?:\r\n|[\r\n\v\f\u2028\u2029])/g, m = /[ \r\n]+/g, l = /[\t\v\f\x07\x08\\\"]/g, g = { +var b, a, e = /(?:\r\n|[\r\n\v\f\u2028\u2029])/g, h = /[ \r\n]+/g, f = /[\t\v\f\x07\x08\\\"]/g, l = { "\t": "\\t", "\v": "\\v", "\f": "\\f", @@ -3709,27 +3709,27 @@ var b, a, e = /(?:\r\n|[\r\n\v\f\u2028\u2029])/g, m = /[ \r\n]+/g, l = /[\t\v\f\ "\b": "\\b" }; if (null == d || isNaN(d = Number(d))) d = 79; -0 < d && (b = n(d - 3, " "), a = n(d - 2, "-– \\.,:;\\?!\\)\\]\\}\\>")); +0 < d && (b = m(d - 3, " "), a = m(d - 2, "-– \\.,:;\\?!\\)\\]\\}\\>")); return { -pair: function(b, g) { -if (!g) return b + ' ""'; -g = g.replace(l, c); -var m = 0; -g = g.replace(e, function() { -m++; +pair: function(b, h) { +if (!h) return b + ' ""'; +h = h.replace(f, c); +var l = 0; +h = h.replace(e, function() { +l++; return "\\n\n"; }); -if (!(m || d && d < g.length + b.length + 3)) return b + ' "' + g + '"'; -var f = [ b + ' "' ], h = g.split("\n"); -if (a) for (var n = -1, p = h.length; ++n < p; ) a(h[n], f); else f = f.concat(h); -return f.join('"\n"') + '"'; +if (!(l || d && d < h.length + b.length + 3)) return b + ' "' + h + '"'; +var k = [ b + ' "' ], m = h.split("\n"); +if (a) for (var n = -1, r = m.length; ++n < r; ) a(m[n], k); else k = k.concat(m); +return k.join('"\n"') + '"'; }, prefix: function(a, b) { var c = a.split(e); return b + c.join("\n" + b); }, refs: function(a) { -a = a.replace(m, " ", a); +a = a.replace(h, " ", a); b && (a = b(a, []).join("\n#: ")); return "#: " + a; } @@ -3737,14 +3737,14 @@ return "#: " + a; }; return f; }({}, y, w)); -p.register("$40", function(f, d, h) { -function n() { +n.register("$40", function(f, d, k) { +function m() { this.length = 0; } f.init = function() { -return new n(); +return new m(); }; -d = n.prototype; +d = m.prototype; d.push = function(d) { this[this.length++] = d; return this; @@ -3759,12 +3759,12 @@ return this; }; return f; }({}, y, w)); -p.register("$27", function(f, d, h) { -function n() {} +n.register("$27", function(f, d, k) { +function m() {} f.extend = function(d) { -return d.prototype = new n(); +return d.prototype = new m(); }; -d = n.prototype = p.require("$38", "abstract.js").init([ "add", "load" ]); +d = m.prototype = n.require("$38", "abstract.js").init([ "add", "load" ]); d.row = function(d) { return this.rows[d]; }; @@ -3782,7 +3782,7 @@ this.loc = null; return d; }; d.locale = function(d) { -null == d ? d = this.loc : this.loc = d = p.require("$37", "locale.js").cast(d); +null == d ? d = this.loc : this.loc = d = n.require("$37", "locale.js").cast(d); return d; }; d.each = function(d) { @@ -3820,25 +3820,25 @@ this.rows.sort(d); return this; }; d["export"] = function() { -for (var d = -1, c = this.rows, b = c.length, a = p.require("$40", "list.js").init(); ++d < b; ) a.push(c[d]); +for (var d = -1, c = this.rows, b = c.length, a = n.require("$40", "list.js").init(); ++d < b; ) a.push(c[d]); return a; }; d = null; return f; }({}, y, w)); -p.register("$28", function(f, d, h) { -function n(c, b, a) { +n.register("$28", function(f, d, k) { +function m(c, b, a) { if (null == a) return c[b] || ""; c[b] = a || ""; return c; } -function k() { +function g() { this._id = this.id = ""; } f.extend = function(c) { -return c.prototype = new k(); +return c.prototype = new g(); }; -d = k.prototype; +d = g.prototype; d.flag = function(c, b) { var a = this.flg || (this.flg = []); if (null != b) a[b] = c; else for (var d = Math.max(a.length, this.src.length, this.msg.length); 0 !== d--; ) a[d] = c; @@ -3851,7 +3851,7 @@ for (c = b.length; 0 !== c--; ) if (b[c]) return !0; return !1; }; d.flags = function() { -for (var c, b = {}, a = [], d = this.flg || [], m = d.length; 0 !== m--; ) c = d[m], +for (var c, b = {}, a = [], d = this.flg || [], h = d.length; 0 !== h--; ) c = d[h], b[c] || (b[c] = !0, a.push(c)); return a; }; @@ -3883,7 +3883,7 @@ d.targetForms = function() { return this.msgF; }; d.each = function(c) { -for (var b = -1, a = this.src, d = this.msg, m = Math.max(a.length, d.length); ++b < m; ) c(b, a[b], d[b]); +for (var b = -1, a = this.src, d = this.msg, h = Math.max(a.length, d.length); ++b < h; ) c(b, a[b], d[b]); return this; }; d.count = function() { @@ -3922,19 +3922,19 @@ for (c = 0; c < a; c++) if (b[c]) return !1; return !0; }; d.comment = function(c) { -return n(this, "cmt", c); +return m(this, "cmt", c); }; d.notes = function(c) { -return n(this, "xcmt", c); +return m(this, "xcmt", c); }; d.refs = function(c) { -return n(this, "rf", c); +return m(this, "rf", c); }; d.format = function(c) { -return n(this, "fmt", c); +return m(this, "fmt", c); }; d.context = function(c) { -return n(this, "ctx", c); +return m(this, "ctx", c); }; d.tags = function() { return this.tg; @@ -3989,8 +3989,8 @@ this.htm = c; d = null; return f; }({}, y, w)); -p.register("$15", function(f, d, h) { -function n(a) { +n.register("$15", function(f, d, k) { +function m(a) { return { "Project-Id-Version": "PACKAGE VERSION", "Report-Msgid-Bugs-To": "", @@ -4005,7 +4005,7 @@ Language: "", "Content-Transfer-Encoding": "8bit" }; } -function k(a, b) { +function g(a, b) { var c = a || ""; b && (c += "\0" + b); return c; @@ -4015,12 +4015,12 @@ var b = d.console; b && b.error && b.error(a.message || String(a)); } function b(a) { -return p.require("$26", "format.js").create(a); +return n.require("$26", "format.js").create(a); } function a(a) { this.locale(a); this.clear(); -this.head = n(this.now()); +this.head = m(this.now()); } function e(a, b) { this.src = [ a || "" ]; @@ -4029,13 +4029,13 @@ this.msg = [ b || "" ]; f.create = function(b) { return new a(b); }; -h = p.require("$27", "messages.js").extend(a); -h.clear = function() { -this.rows = p.require("$25", "collection.js").init(); +k = n.require("$27", "messages.js").extend(a); +k.clear = function() { +this.rows = n.require("$25", "collection.js").init(); this.length = 0; return this; }; -h.now = function() { +k.now = function() { function a(b, c) { for (var d = String(b); d.length < c; ) d = "0" + d; return d; @@ -4043,14 +4043,14 @@ return d; var b = new Date(), c = b.getUTCFullYear(), d = b.getUTCMonth() + 1, e = b.getUTCDate(), f = b.getUTCHours(), b = b.getUTCMinutes(); return a(c, 4) + "-" + a(d, 2) + "-" + a(e, 2) + " " + a(f, 2) + ":" + a(b, 2) + "+0000"; }; -h.header = function(a, b) { +k.header = function(a, b) { var c = this.head || (this.head = {}); if (null == b) return this.headers()[a] || ""; c[a] = b || ""; return this; }; -h.headers = function(a) { -var b, c = this.now(), d = this.head || (this.head = n(c)); +k.headers = function(a) { +var b, c = this.now(), d = this.head || (this.head = m(c)); if (null != a) { for (b in a) d[b] = a[b]; return this; @@ -4066,11 +4066,11 @@ a[b] || (a[b] = c); a["X-Generator"] = "Loco https://localise.biz/"; return a; }; -h.get = function(a, b) { -var c = k(a, b); +k.get = function(a, b) { +var c = g(a, b); return this.rows.get(c); }; -h.add = function(a, b) { +k.add = function(a, b) { a instanceof e || (a = new e(a)); b && a.context(b); var d = a.hash(); @@ -4078,57 +4078,57 @@ this.rows.get(d) ? c("Duplicate message at index " + this.indexOf(a)) : (a.idx = this.length = this.rows.length); return a; }; -h.load = function(a) { -for (var b = -1, d, f, k, h, q, n, p = (k = this.locale()) && k.nplurals || 2, r = []; ++b < a.length; ) d = a[b], -null == d.parent ? (f = d.source || d.id, k = d.target || "", h = d.context, f || h ? (q = new e(f, k), -q._id = d._id, h && q.context(h), d.flag && q.flag(d.flag, 0), d.comment && q.comment(d.comment), -d.notes && q.notes(d.notes), d.refs && q.refs(d.refs), q.format(d.format), d.message = q, -this.add(q), d.prev && d.prev[0] && (q.prev(d.prev[0].source, d.prev[0].context), -d.prev[1] && q._src.push(d.prev[1].source || ""))) : 0 === b && "object" === typeof k && (this.head = k, +k.load = function(a) { +for (var b = -1, d, f, g, k, p, m, n = (g = this.locale()) && g.nplurals || 2, r = []; ++b < a.length; ) d = a[b], +null == d.parent ? (f = d.source || d.id, g = d.target || "", k = d.context, f || k ? (p = new e(f, g), +p._id = d._id, k && p.context(k), d.flag && p.flag(d.flag, 0), d.comment && p.comment(d.comment), +d.notes && p.notes(d.notes), d.refs && p.refs(d.refs), p.format(d.format), d.message = p, +this.add(p), d.prev && d.prev[0] && (p.prev(d.prev[0].source, d.prev[0].context), +d.prev[1] && p._src.push(d.prev[1].source || ""))) : 0 === b && "object" === typeof g && (this.head = g, this.headcmt = d.comment)) : r.push(d); for (b = -1; ++b < r.length; ) try { d = r[b]; f = d.source || d.id; -q = a[d.parent] && a[d.parent].message; -if (!q) throw Error("parent missing for plural " + f); -n = d.plural; -1 === n && q.plural(f); -n >= p || (d.flag && q.flag(d.flag, n), q.translate(d.target || "", n), d.format && !q.format() && q.format(d.format)); +p = a[d.parent] && a[d.parent].message; +if (!p) throw Error("parent missing for plural " + f); +m = d.plural; +1 === m && p.plural(f); +m >= n || (d.flag && p.flag(d.flag, m), p.translate(d.target || "", m), d.format && !p.format() && p.format(d.format)); } catch (w) { c(w); } return this; }; -h.wrap = function(a) { +k.wrap = function(a) { this.fmtr = b(a); return this; }; -h.toString = function() { -var a, c = this.locale(), d = [], f = [], k = this.headers(), h = !c, n = c && c.nplurals || 2, p = this.fmtr || b(); -k[c ? "PO-Revision-Date" : "POT-Creation-Date"] = this.now(); -for (a in k) f.push(a + ": " + k[a]); +k.toString = function() { +var a, c = this.locale(), d = [], f = [], g = this.headers(), k = !c, p = c && c.nplurals || 2, m = this.fmtr || b(); +g[c ? "PO-Revision-Date" : "POT-Creation-Date"] = this.now(); +for (a in g) f.push(a + ": " + g[a]); f = new e("", f.join("\n")); f.comment(this.headcmt || ""); -h && f.fuzzy(0, !0); +k && f.fuzzy(0, !0); d.push(f.toString()); d.push(""); this.rows.each(function(a, b) { -a && (d.push(b.cat(p, h, n)), d.push("")); +a && (d.push(b.cat(m, k, p)), d.push("")); }); return d.join("\n"); }; -h = p.require("$28", "message.js").extend(e); -h.prev = function(a, b) { +k = n.require("$28", "message.js").extend(e); +k.prev = function(a, b) { this._src = [ a || "" ]; this._ctx = b; }; -h.hash = function() { -return k(this.source(), this.context()); +k.hash = function() { +return g(this.source(), this.context()); }; -h.toString = function() { +k.toString = function() { return this.cat(b()); }; -h.cat = function(a, b, c) { +k.cat = function(a, b, c) { var d, e = [], f; (f = this.cmt) && e.push(a.prefix(f, "# ")); (f = this.xcmt) && e.push(a.prefix(f, "#. ")); @@ -4145,7 +4145,7 @@ if (null == this.src[1]) e.push(a.pair("msgstr", b ? "" : this.msg[0])); else fo e.push(a.pair("msgid_plural", this.src[1])), f = this.msg || [ "", "" ], c = c || f.length; ++d < c; ) e.push(a.pair("msgstr[" + d + "]", b ? "" : f[d] || "")); return e.join("\n"); }; -h.compare = function(a, b) { +k.compare = function(a, b) { var c = this.weight(), d = a.weight(); if (c > d) return 1; if (c < d) return -1; @@ -4157,19 +4157,19 @@ if (c > d) return -1; } return 0; }; -h.copy = function() { +k.copy = function() { var a = new e(), b, c; for (b in this) this.hasOwnProperty(b) && ((c = this[b]) && c.concat && (c = c.concat()), a[b] = c); return a; }; -h = h = null; +k = k = null; return f; }({}, y, w)); -p.register("$17", function(f, d, p) { +n.register("$17", function(f, d, n) { f.init = function(d, f) { function c() { -return m || (m = h('
').dialog({ +return h || (h = k('
').dialog({ dialogClass: "loco-modal loco-modal-wide", modal: !0, autoOpen: !1, @@ -4179,45 +4179,45 @@ height: 500 })); } function b(a, b, d) { -a = h("

").text(d); +a = k("

").text(d); c().dialog("close").html("").dialog("option", "title", "Error").append(a).dialog("open"); } function a(a) { var b = a && a.code; if (b) { -for (var d = -1, e = b.length, f = h("
    ").attr("class", a.type); ++d < e; ) h("
  1. ").html(b[d]).appendTo(f); +for (var d = -1, e = b.length, f = k("
      ").attr("class", a.type); ++d < e; ) k("
    1. ").html(b[d]).appendTo(f); f.find("li").eq(a.line - 1).attr("class", "highlighted"); c().dialog("close").html("").dialog("option", "title", a.path + ":" + a.line).append(f).dialog("open"); } } function e(a) { a = a.target; -var b = h(a).find("li.highlighted")[0], b = Math.max(0, (b && b.offsetTop || 0) - Math.floor(a.clientHeight / 2)); +var b = k(a).find("li.highlighted")[0], b = Math.max(0, (b && b.offsetTop || 0) - Math.floor(a.clientHeight / 2)); a.scrollTop = b; } -var m; +var h; return { -load: function(l) { +load: function(h) { c().html('
      ').dialog("option", "title", "Loading..").off("dialogopen").dialog("open").on("dialogopen", e); -l = h.extend({ -ref: l, +h = k.extend({ +ref: h, path: f.popath }, f.project || {}); -d.ajax.post("fsReference", l, a, b); +d.ajax.post("fsReference", h, a, b); } }; }; return f; }({}, y, w)); -p.register("$30", function(f, d, h) { -function n(d) { +n.register("$30", function(f, d, k) { +function m(d) { this.api = d; this.chars = 0; } f.create = function(d) { -return new n(d); +return new m(d); }; -d = n.prototype; +d = m.prototype; d.init = function(d, c) { function b(a) { var b = { @@ -4229,24 +4229,24 @@ B.push(b); return x[a.html ? 1 : 0] = b; } function a(a, d) { -var k = a.source(null, d); -if (k && (a.untranslated(d) || c)) { -var u = q[k]; +var g = a.source(null, d); +if (g && (a.untranslated(d) || c)) { +var u = p[g]; if (u) u.push(a); else { -var u = k.length, v = e.isHtml(k), v = x[v ? 1 : 0], B = v.sources; -if (p && u > p) g++; else { -if (v.length + u > n || B.length === h) v = b(v), B = v.sources; -B.push(k); -q[k] = [ a ]; +var u = g.length, v = e.isHtml(g), v = x[v ? 1 : 0], B = v.sources; +if (s && u > s) l++; else { +if (v.length + u > n || B.length === m) v = b(v), B = v.sources; +B.push(g); +p[g] = [ a ]; v.length += u; f += u; -l += 1; +k += 1; } } } } -var e = this.api, f = 0, l = 0, g = 0, h = 50, n = 1e4, p = e.maxChr(), q = {}, B = [], x = []; -p && (n = Math.min(n, p)); +var e = this.api, f = 0, k = 0, l = 0, m = 50, n = 1e4, s = e.maxChr(), p = {}, B = [], x = []; +s && (n = Math.min(n, s)); b({ html: !1 }); @@ -4258,12 +4258,12 @@ a(c, 0); a(c, 1); }); delete x; -this.map = q; +this.map = p; this.chars = f; -this.length = l; +this.length = k; this.batches = B; this.locale = d.locale(); -g && e.stderr("Strings over " + n + " characters long will be skipped"); +l && e.stderr("Strings over " + n + " characters long will be skipped"); }; d.abort = function() { this.state = "abort"; @@ -4271,46 +4271,46 @@ return this; }; d.dispatch = function() { function d(a, b) { -function e(c, d, g) { -b !== g && (a === d || 1 < c && f.source(null, 1) === a) && (f.translate(b, c), -m++, r++); -return m; +function e(c, d, h) { +b !== h && (a === d || 1 < c && f.source(null, 1) === a) && (f.translate(b, c), +p++, r++); +return p; } if (!c()) return !1; if (!b) return !0; -var f, g = n[a] || [], k = g.length, h = -1, m; -for (B++; ++h < k; ) if (f = g[h]) m = 0, f.each(e), m && l("each", [ f ]); +var f, h = n[a] || [], g = h.length, l = -1, p; +for (B++; ++l < g; ) if (f = h[l]) p = 0, f.each(e), p && k("each", [ f ]); return !0; } function c() { -return "abort" === g.state ? (h && (h.abort(), f()), !1) : !0; +return "abort" === l.state ? (m && (m.abort(), f()), !1) : !0; } function b() { -var b = p.shift(), c; -b ? (c = b.sources) && c.length ? h.batch(c, q, b.html, d).fail(a).always(e) : e() : f(); +var b = s.shift(), c; +b ? (c = b.sources) && c.length ? m.batch(c, p, b.html, d).fail(a).always(e) : e() : f(); } function a() { -g.abort(); +l.abort(); f(); } function e() { x++; -l("prog", [ x, y ]); +k("prog", [ x, y ]); c() && b(); } function f() { -h = p = null; -l("done"); +m = s = null; +k("done"); } -function l(a, b) { +function k(a, b) { for (var c = u[a] || [], d = c.length; 0 <= --d; ) c[d].apply(null, b); } -var g = this, h = g.api, n = g.map, p = g.batches || [], q = g.locale, B = 0, x = 0, r = 0, w = g.length, y = p.length, u = { +var l = this, m = l.api, n = l.map, s = l.batches || [], p = l.locale, B = 0, x = 0, r = 0, w = l.length, y = s.length, u = { done: [], each: [], prog: [] }; -g.state = ""; +l.state = ""; b(); return { done: function(a) { @@ -4339,23 +4339,23 @@ return B; }; return f; }({}, y, w)); -p.register("$41", { +n.register("$41", { nn: [ "no" ] }); -p.register("$31", function(f, d, h) { -function n() {} -function k(c) { +n.register("$31", function(f, d, k) { +function m() {} +function g(c) { c.parseError = function(b) { return b && b.code && 200 !== b.code && b.message ? "Error " + b.code + ": " + b.message : ""; }; c.batch = function(b, a, d, f) { -function l(c) { +function g(c) { for (var d = b.length, e = -1; ++e < d && !1 !== f(b[e], c[e] || "", a); ) ; } d = d ? "html" : "plain"; -var g = this.getSrc(), k = this.toLang(a); +var k = this.getSrc(), m = this.toLang(a); return c._call({ -url: "https://translate.yandex.net/api/v1.5/tr.json/translate?format=" + d + "&lang=" + g + "-" + k, +url: "https://translate.yandex.net/api/v1.5/tr.json/translate?format=" + d + "&lang=" + k + "-" + m, method: "POST", traditional: !0, data: { @@ -4363,15 +4363,15 @@ key: c.key(), text: b } }).done(function(a, b, d) { -a && 200 === a.code ? l(a.text || []) : (c.stderr(c.parseError(a) || c.httpError(d)), -l([])); +a && 200 === a.code ? g(a.text || []) : (c.stderr(c.parseError(a) || c.httpError(d)), +g([])); }).fail(function() { -l([]); +g([]); }); }; } f.create = function(c) { -var b = n.prototype = new c(); +var b = m.prototype = new c(); b.toString = function() { return "Yandex.Translate"; }; @@ -4383,70 +4383,70 @@ return "https://translate.yandex.com/"; }; b.init = function(a) { c.prototype.init.call(this, a); -/^trnsl\./.test(this.key()) && k(this); +/^trnsl\./.test(this.key()) && g(this); }; b.toLang = function(a) { -return this.mapLang(a, p.require("$41", "yandex.json")); +return this.mapLang(a, n.require("$41", "yandex.json")); }; b.maxChr = function() { return 1e4; }; -return new n(); +return new m(); }; return f; }({}, y, w)); -p.register("$42", { +n.register("$42", { zh: [ "zh", "zh-CN", "zh-TW" ], he: [ "iw" ], jv: [ "jw" ] }); -p.register("$32", function(f, d, h) { -function n() {} +n.register("$32", function(f, d, k) { +function m() {} f.create = function(d) { -var c = n.prototype = new d(); -c.toString = function() { +d = m.prototype = new d(); +d.toString = function() { return "Google Translate"; }; -c.getId = function() { +d.getId = function() { return "google"; }; -c.getUrl = function() { +d.getUrl = function() { return "https://translate.google.com/"; }; -c.batch = function(b, a, d, f) { -function l(d) { -var e = b.length, g = -1, l; -for (c.parseError = function(a) { -if (a.error) { -for (var b = [], c = a.error.errors || [], d = c.length, e = -1; ++e < d; ) b.push(c[e].message || ""); -return "Error " + a.error.code + ": " + b.join(";"); +d.parseError = function(c) { +if (c.error) { +for (var b = [], a = c.error.errors || [], d = a.length, f = -1; ++f < d; ) b.push(a[f].message || ""); +return "Error " + c.error.code + ": " + b.join(";"); } return ""; -}; ++g < e && (l = d[g] || {}, !1 !== f(b[g], l.translatedText || "", a)); ) ; +}; +d.batch = function(c, b, a, d) { +function f(a) { +for (var h = c.length, g = -1, k; ++g < h && (k = a[g] || {}, !1 !== d(c[g], k.translatedText || "", b)); ) ; } -var g = this, h = this.getSrc(); -d = d ? "html" : "text"; -var k = g.mapLang(a, p.require("$42", "google.json")); +var g = this, k = this.getSrc(); +a = a ? "html" : "text"; +var m = g.mapLang(b, n.require("$42", "google.json")); return g._call({ -url: "https://translation.googleapis.com/language/translate/v2?source=" + h + "&target=" + k + "&format=" + d, +url: "https://translation.googleapis.com/language/translate/v2?source=" + k + "&target=" + m + "&format=" + a, method: "POST", traditional: !0, data: { key: g.key(), -q: b +q: c } }).done(function(a, b, c) { -a.data ? l(a.data.translations || []) : (g.stderr(g.parseError(a) || g.httpError(c)), -l([])); +a.data ? f(a.data.translations || []) : (g.stderr(g.parseError(a) || g.httpError(c)), +f([])); }).fail(function() { -l([]); +f([]); }); }; -return new n(); +return new m(); }; return f; }({}, y, w)); -p.register("$43", { +n.register("$43", { nn: [ "no" ], pt: [ "pt", "pt-pt" ], sr: [ "sr-Cyrl", "sr-Latn" ], @@ -4458,10 +4458,10 @@ zh_HK: [ "zh-Hans" ], zh_SG: [ "zh-Hans" ], zh_TW: [ "zh-Hant" ] }); -p.register("$33", function(f, d, h) { -function n() {} +n.register("$33", function(f, d, k) { +function m() {} f.create = function(d) { -d = n.prototype = new d(); +d = m.prototype = new d(); d.toString = function() { return "Microsoft Translator text API"; }; @@ -4479,40 +4479,40 @@ return 1e4; }; d.batch = function(c, b, a, d) { function f(a) { -for (var g = -1, l; ++g < k && (l = a[g] || {}, l = l.translations || [], l = l[0] || {}, -!1 !== d(c[g], l.text || "", b)); ) ; +for (var h = -1, g; ++h < z && (g = a[h] || {}, g = g.translations || [], g = g[0] || {}, +!1 !== d(c[h], g.text || "", b)); ) ; } -var l = this, g = [], h = l.getSrc(), k = c.length, n = -1; +var g = this, k = [], m = g.getSrc(), z = c.length, s = -1; a = a ? "html" : "plain"; -for (var q = l.mapLang(b, p.require("$43", "ms.json")); ++n < k; ) g.push({ -text: c[n] +for (var p = g.mapLang(b, n.require("$43", "ms.json")); ++s < z; ) k.push({ +text: c[s] }); -return l._call({ -url: "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=" + h + "&to=" + q + "&textType=" + a, +return g._call({ +url: "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=" + m + "&to=" + p + "&textType=" + a, method: "POST", -data: JSON.stringify(g), +data: JSON.stringify(k), headers: { "Content-Type": "application/json; charset=UTF-8", "Ocp-Apim-Subscription-Key": this.key(), -"Ocp-Apim-Subscription-Region": l.param("region") || "global" +"Ocp-Apim-Subscription-Region": g.param("region") || "global" } }).done(function(a, b, c) { -a && a.length ? f(a) : (l.stderr(l.parseError(a) || l.httpError(c)), f([])); +a && a.length ? f(a) : (g.stderr(g.parseError(a) || g.httpError(c)), f([])); }).fail(function() { f([]); }); }; -return new n(); +return new m(); }; return f; }({}, y, w)); -p.register("$44", { +n.register("$44", { pt: [ "pt-PT", "pt-BR" ] }); -p.register("$34", function(f, d, h) { -function n() {} +n.register("$34", function(f, d, k) { +function m() {} f.create = function(d) { -d = n.prototype = new d(); +d = m.prototype = new d(); d.toString = function() { return "DeepL Translator"; }; @@ -4527,44 +4527,44 @@ return c.message; }; d.batch = function(c, b, a, d) { function f(a) { -for (var g = c.length, l = -1, h; ++l < g && (h = a[l] || {}, !1 !== d(c[l], h.text || "", b)); ) ; +for (var h = c.length, g = -1, k; ++g < h && (k = a[g] || {}, !1 !== d(c[g], k.text || "", b)); ) ; } -var l = this; +var g = this; a = this.getSrc(); -var g = l.param("url") || "https://api.deepl.com", h = l.mapLang(b, p.require("$44", "deepl.json")), k = b.tone, n = "default"; -null == k && (k = String(b.variant || "").toLowerCase()); -"formal" === k ? n = "more" : "informal" === k && (n = "less"); -return l._call({ -url: l.fixURL(g + "/v2/translate"), +var k = g.param("url") || "https://api.deepl.com", m = g.mapLang(b, n.require("$44", "deepl.json")), z = b.tone, s = "default"; +null == z && (z = String(b.variant || "").toLowerCase()); +"formal" === z ? s = "more" : "informal" === z && (s = "less"); +return g._call({ +url: g.fixURL(k + "/v2/translate"), method: "POST", traditional: !0, data: { source_lang: a.toUpperCase(), -target_lang: h.toUpperCase(), -formality: n, +target_lang: m.toUpperCase(), +formality: s, preserve_formatting: "1", -auth_key: l.key(), +auth_key: g.key(), text: c } }).done(function(a, b, c) { -a.translations ? f(a.translations) : (l.stderr(l.parseError(a) || l.httpError(c)), +a.translations ? f(a.translations) : (g.stderr(g.parseError(a) || g.httpError(c)), f([])); }).fail(function() { f([]); }); }; -return new n(); +return new m(); }; return f; }({}, y, w)); -p.register("$45", { +n.register("$45", { zh: [ "zh", "zh-CN", "zh-TW" ], pt: [ "pt", "pt-PT", "pt-BR" ] }); -p.register("$35", function(f, d, h) { -function n() {} +n.register("$35", function(f, d, k) { +function m() {} f.create = function(d) { -d = n.prototype = new d(); +d = m.prototype = new d(); d.getUrl = function() { return "https://lecto.ai/?ref=loco"; }; @@ -4580,52 +4580,52 @@ return 1e3; }; d.batch = function(c, b, a, d) { function f(a) { -for (var g = c.length, l = -1, h = (a[0] || { +for (var h = c.length, g = -1, k = (a[0] || { translated: [] -}).translated || []; ++l < g && (a = h[l] || "", !1 !== d(c[l], a, b)); ) ; +}).translated || []; ++g < h && (a = k[g] || "", !1 !== d(c[g], a, b)); ) ; } -var l = this; +var g = this; a = this.getSrc(); -var g = l.param("url") || "https://api.lecto.ai", h = l.mapLang(b, p.require("$45", "lecto.json")); -return l._call({ -url: l.fixURL(g + "/v1/translate/text"), +var k = g.param("url") || "https://api.lecto.ai", m = g.mapLang(b, n.require("$45", "lecto.json")); +return g._call({ +url: g.fixURL(k + "/v1/translate/text"), method: "POST", data: JSON.stringify({ -to: [ h ], +to: [ m ], from: a, texts: c }), headers: { "Content-Type": "application/json; charset=UTF-8", -"X-API-Key": l.key(), +"X-API-Key": g.key(), Accept: "application/json" } }).done(function(a, b, c) { -a ? f(a.translations || []) : (l.stderr(l.parseError(a) || l.httpError(c)), f([])); +a ? f(a.translations || []) : (g.stderr(g.parseError(a) || g.httpError(c)), f([])); }).fail(function() { f([]); }); }; -return new n(); +return new m(); }; return f; }({}, y, w)); -p.register("$18", function(f, d, w) { -function n() { +n.register("$18", function(f, d, w) { +function m() { this.inf = {}; } -function k() { +function g() { var a = w.createElement("p"), b = /&(#\d+|#x[0-9a-f]|[a-z]+);/i, c = /<[a-z]+\s/i, d, f; return { -sniff: function(h) { -if (h === d) return f; -d = h; -if (b.test(h) || c.test(h)) if (a.innerHTML = h, a.textContent !== h) return f = !0; +sniff: function(g) { +if (g === d) return f; +d = g; +if (b.test(g) || c.test(g)) if (a.innerHTML = g, a.textContent !== g) return f = !0; return f = !1; } }; } -var c = n.prototype; +var c = m.prototype; c.init = function(a) { this.inf = a || {}; }; @@ -4658,9 +4658,9 @@ c.parseError = function() { return ""; }; c.mapLang = function(a, b) { -var c = String(a).replace("-", "_"), d = a.lang, f = b[c] || b[d] || [], h = f.length; -if (0 === h) return d; -if (1 < h) for (var c = c.toLowerCase(), d = -1, k; ++d < h; ) if (k = f[d], k.toLowerCase().replace("-", "_") === c) return k; +var c = String(a).replace("-", "_"), d = a.lang, f = b[c] || b[d] || [], g = f.length; +if (0 === g) return d; +if (1 < g) for (var c = c.toLowerCase(), d = -1, k; ++d < g; ) if (k = f[d], k.toLowerCase().replace("-", "_") === c) return k; return f[0]; }; c.toLang = function(a) { @@ -4684,12 +4684,12 @@ a.cache = !0; a.dataType = "json"; a.error = function(a, c, d) { try { -var f = a.responseText, h = f && p.require("$5", "json.js").parse(f); -d = h && b.parseError(h) || d; +var f = a.responseText, g = f && n.require("$5", "json.js").parse(f); +d = g && b.parseError(g) || d; } catch (k) {} b.stderr(d || b.httpError(a)); }; -return b.abortable(h.ajax(a)); +return b.abortable(k.ajax(a)); }; c.abortable = function(a) { var b = this; @@ -4703,16 +4703,16 @@ var a = this.$r; a && a.abort(); }; c.isHtml = function(a) { -return (b || (b = k())).sniff(a); +return (b || (b = g())).sniff(a); }; c.createJob = function() { -return p.require("$30", "job.js").create(this); +return n.require("$30", "job.js").create(this); }; c.batch = function(a, b, c, f) { function g(c) { -for (var d = a.length, g = -1; ++g < d && !1 !== f(a[g], c[g], b); ) ; +for (var d = a.length, h = -1; ++h < d && !1 !== f(a[h], c[h], b); ) ; } -var k = d.loco.ajax; +var m = d.loco.ajax; c = { hook: this.getId(), type: c ? "html" : "text", @@ -4720,8 +4720,8 @@ locale: this.toLang(b), source: this.getSrc(), sources: a }; -var n = h.Deferred(); -this.abortable(k.post("apis", c, function(a) { +var n = k.Deferred(); +this.abortable(m.post("apis", c, function(a) { g(a && a.targets || []); n.resolve(); }, function() { @@ -4733,102 +4733,102 @@ return n.promise(); f.create = function(a) { var b; b = a.id; -b = "yandex" === b ? p.require("$31", "yandex.js").create(n) : "google" === b ? p.require("$32", "google.js").create(n) : "microsoft" === b ? p.require("$33", "ms.js").create(n) : "deepl" === b ? p.require("$34", "deepl.js").create(n) : "lecto" === b ? p.require("$35", "lecto.js").create(n) : new n(); +b = "yandex" === b ? n.require("$31", "yandex.js").create(m) : "google" === b ? n.require("$32", "google.js").create(m) : "microsoft" === b ? n.require("$33", "ms.js").create(m) : "deepl" === b ? n.require("$34", "deepl.js").create(m) : "lecto" === b ? n.require("$35", "lecto.js").create(m) : new m(); b.init(a); return b; }; f.suggest = function(a, b, c, d) { -var f, h, k = a.length; -for (f = 0; f < k; f++) h = a[f], h.translate(b, c, d); +var f, g, k = a.length; +for (f = 0; f < k; f++) g = a[f], g.translate(b, c, d); }; var b; return f; }({}, y, w)); -p.register("$19", function(f, d, p) { +n.register("$19", function(f, d, n) { f.init = function(f) { -function k() { -H || (I.on("click", g), H = h('
      ').dialog({ +function g() { +H || (I.on("click", l), H = k('
      ').dialog({ dialogClass: "request-filesystem-credentials-dialog loco-modal", minWidth: 580, modal: !0, autoOpen: !1, closeOnEscape: !0 }).on("change", 'input[name="connection_type"]', function() { -this.checked && h("#ssh-keys").toggleClass("hidden", "ssh" !== h(this).val()); +this.checked && k("#ssh-keys").toggleClass("hidden", "ssh" !== k(this).val()); })); return H; } function c() { -R && (b(h(x)), R = !1); +R && (b(k(x)), R = !1); if (E && J) { -var a = J, c = h(Q); +var a = J, c = k(Q); c.find("span.loco-msg").text(a); K || (c.removeClass("jshide").hide().fadeIn(500), K = !0); -} else K && (b(h(Q)), K = !1); +} else K && (b(k(Q)), K = !1); } function b(a) { a.slideUp(250).fadeOut(250, function() { -h(this).addClass("jshide"); +k(this).addClass("jshide"); }); } function a() { -if (E) return H && H.dialog("close"), c(), h(f).find('button[type="submit"]').attr("disabled", !1), -h(d).triggerHandler("resize"), y && y(!0), !0; -v && H ? (R || (h(x).removeClass("jshide").hide().fadeIn(500), R = !0), K && (b(h(Q)), +if (E) return H && H.dialog("close"), c(), k(f).find('button[type="submit"]').attr("disabled", !1), +k(d).triggerHandler("resize"), y && y(!0), !0; +v && H ? (R || (k(x).removeClass("jshide").hide().fadeIn(500), R = !0), K && (b(k(Q)), K = !1)) : c(); -h(f).find('input[type="submit"]').attr("disabled", !0); +k(f).find('input[type="submit"]').attr("disabled", !0); y && y(!1); return !1; } function e(a) { -var b, c, d = q || {}; -for (b in d) d.hasOwnProperty(b) && (c = d[b], a[b] ? a[b].value = c : h('').attr("name", b).appendTo(a).val(c)); +var b, c, d = p || {}; +for (b in d) d.hasOwnProperty(b) && (c = d[b], a[b] ? a[b].value = c : k('').attr("name", b).appendTo(a).val(c)); } -function m(a) { +function h(a) { a.preventDefault(); -a = h(a.target).serializeArray(); +a = k(a.target).serializeArray(); s(a); C = !0; return !1; } -function l(a) { +function q(a) { a.preventDefault(); H.dialog("close"); return !1; } -function g(a) { +function l(a) { a.preventDefault(); H.dialog("open").find('input[name="connection_type"]').change(); return !1; } -function z(b) { +function w(b) { E = b.authed; r = b.method; -h(x).find("span.loco-msg").text(b.message || "Something went wrong."); +k(x).find("span.loco-msg").text(b.message || "Something went wrong."); J = b.warning || ""; b.notice && u.notices.info(b.notice); -if (E) "direct" !== r && (q = b.creds, e(f), C && b.success && u.notices.success(b.success)), +if (E) "direct" !== r && (p = b.creds, e(f), C && b.success && u.notices.success(b.success)), a(); else if (b.reason) u.notices.info(b.reason); else if (b = b.prompt) { -var c = k(); -c.html(b).find("form").on("submit", m); +var c = g(); +c.html(b).find("form").on("submit", h); c.dialog("option", "title", c.find("h2").remove().text()); -c.find("button.cancel-button").show().on("click", l); +c.find("button.cancel-button").show().on("click", q); c.find('input[type="submit"]').addClass("button-primary"); a(); -h(d).triggerHandler("resize"); +k(d).triggerHandler("resize"); } else u.notices.error("Server didn't return credentials, nor a prompt for credentials"); } -function w() { +function z() { a(); } function s(a) { C = !1; -u.ajax.setNonce("fsConnect", N).post("fsConnect", a, z, w); +u.ajax.setNonce("fsConnect", N).post("fsConnect", a, w, z); return a; } -var q, y, x = f, r = null, C = !1, E = !1, u = d.loco, v = f.path.value, F = f.auth.value, N = f["loco-nonce"].value, I = h(x).find("button.button-primary"), Q = p.getElementById(x.id + "-warn"), R = !1, K = !1, J = "", H; +var p, y, x = f, r = null, C = !1, E = !1, u = d.loco, v = f.path.value, F = f.auth.value, N = f["loco-nonce"].value, I = k(x).find("button.button-primary"), Q = n.getElementById(x.id + "-warn"), R = !1, K = !1, J = "", H; u.notices.convert(Q).stick(); -f.connection_type ? (q = {}, q.connection_type = f.connection_type.value, E = !0) : v && F && s({ +f.connection_type ? (p = {}, p.connection_type = f.connection_type.value, E = !0) : v && F && s({ path: v, auth: F }); @@ -4836,7 +4836,7 @@ a(); return { applyCreds: function(a) { if (a.nodeType) e(a); else { -var b, c = q || {}; +var b, c = p || {}; for (b in c) c.hasOwnProperty(b) && (a[b] = c[b]); } return this; @@ -4850,7 +4850,7 @@ return this; connect: function() { v = f.path.value; F = f.auth.value; -s(h(f).serializeArray()); +s(k(f).serializeArray()); return this; }, listen: function(a) { @@ -4865,13 +4865,13 @@ return E; }; return f; }({}, y, w)); -p.register("$20", function(f, d, w) { -function n(d, f, h, g) { -f = "n" === h ? c(f) : b(f); -g && (f = a(f)); -return k([].sort, [ f ])(d); +n.register("$20", function(f, d, w) { +function m(d, f, k, l) { +f = "n" === k ? c(f) : b(f); +l && (f = a(f)); +return g([].sort, [ f ])(d); } -function k(a, b) { +function g(a, b) { return function(c) { a.apply(c, b); return c; @@ -4896,50 +4896,50 @@ return -1 * a(b, c); f.init = function(a) { function b(a) { var c = -1, d = a.length; -for (h("tr", x).remove(); ++c < d; ) x.appendChild(a[c].$); +for (k("tr", x).remove(); ++c < d; ) x.appendChild(a[c].$); } function c(a) { s = a ? y.find(a, d) : d.slice(0); -w && (a = f[w], s = n(s, w, a.type, a.desc)); +w && (a = f[w], s = m(s, w, a.type, a.desc)); b(s); } -var d = [], f = [], k = 0, s, q, w, x = a.getElementsByTagName("tbody")[0], r = a.getElementsByTagName("thead")[0], y = p.require("$10", "fulltext.js").init(); -r && x && (h("th", r).each(function(a, c) { +var d = [], f = [], g = 0, s, p, w, x = a.getElementsByTagName("tbody")[0], r = a.getElementsByTagName("thead")[0], y = n.require("$10", "fulltext.js").init(); +r && x && (k("th", r).each(function(a, c) { var e = c.getAttribute("data-sort-type"); -e && (a = k, h(c).addClass("loco-sort").on("click", function(c) { +e && (a = g, k(c).addClass("loco-sort").on("click", function(c) { c.preventDefault(); c = a; -var e = f[c], l = e.type, k = !(e.desc = !e.desc); -s = n(s || d.slice(0), c, l, k); +var e = f[c], g = e.type, n = !(e.desc = !e.desc); +s = m(s || d.slice(0), c, g, n); b(s); -q && q.removeClass("loco-desc loco-asc"); -q = h(e.$).addClass(k ? "loco-desc" : "loco-asc").removeClass(k ? "loco-asc" : "loco-desc"); +p && p.removeClass("loco-desc loco-asc"); +p = k(e.$).addClass(n ? "loco-desc" : "loco-asc").removeClass(n ? "loco-asc" : "loco-desc"); w = c; return !1; -}), f[k] = { +}), f[g] = { $: c, type: e }); -c.hasAttribute("colspan") ? k += Number(c.getAttribute("colspan")) : k++; -}), h("tr", x).each(function(a, b) { -var c, e, h, k = [], l = { +c.hasAttribute("colspan") ? g += Number(c.getAttribute("colspan")) : g++; +}), k("tr", x).each(function(a, b) { +var c, e, g, h = [], k = { _: a, $: b }, m = b.getElementsByTagName("td"); for (e in f) { c = m[e]; -(h = c.textContent.replace(/(^\s+|\s+$)/g, "")) && k.push(h); -c.hasAttribute("data-sort-value") && (h = c.getAttribute("data-sort-value")); +(g = c.textContent.replace(/(^\s+|\s+$)/g, "")) && h.push(g); +c.hasAttribute("data-sort-value") && (g = c.getAttribute("data-sort-value")); switch (f[e].type) { case "n": -h = Number(h); +g = Number(g); } -l[e] = h; +k[e] = g; } -d[a] = l; -y.index(a, k); -}), a = h('form.loco-filter input[type="text"]', a.parentNode), a.length && (a = a[0], -r = h(a.form), 1 < d.length ? p.require("$11", "LocoTextListener.js").listen(a, c) : r.hide(), +d[a] = k; +y.index(a, h); +}), a = k('form.loco-filter input[type="text"]', a.parentNode), a.length && (a = a[0], +r = k(a.form), 1 < d.length ? n.require("$11", "LocoTextListener.js").listen(a, c) : r.hide(), r.on("submit", function(a) { a.preventDefault(); return !1; @@ -4950,36 +4950,36 @@ return f; var C = y.loco || {}, I = C.conf || { $v: [ 0, 0 ] }; -y = p.require("$1", "t.js").init(); +y = n.require("$1", "t.js").init(); w = I.wplang; C.version = function(f) { return I.$v[f || 0]; }; -p.require("$2", "html.js"); -p.require("$3", "number.js"); -p.require("$4", "array.js"); -p.require("$5", "json.js"); +n.require("$2", "html.js"); +n.require("$3", "number.js"); +n.require("$4", "array.js"); +n.require("$5", "json.js"); C.l10n = y; y.load(I.wpl10n); w && y.pluraleq(w.pluraleq); -C.string = p.require("$6", "string.js"); -C.notices = p.require("$7", "notices.js").init(y); -C.ajax = p.require("$8", "ajax.js").init(I).localise(y); -C.locale = p.require("$9", "wplocale.js"); -C.fulltext = p.require("$10", "fulltext.js"); -C.watchtext = p.require("$11", "LocoTextListener.js").listen; -C.tooltip = p.require("$12", "tooltip.js"); +C.string = n.require("$6", "string.js"); +C.notices = n.require("$7", "notices.js").init(y); +C.ajax = n.require("$8", "ajax.js").init(I).localise(y); +C.locale = n.require("$9", "wplocale.js"); +C.fulltext = n.require("$10", "fulltext.js"); +C.watchtext = n.require("$11", "LocoTextListener.js").listen; +C.tooltip = n.require("$12", "tooltip.js"); C.po = { -ed: p.require("$13", "poedit.js"), -kbd: p.require("$14", "hotkeys.js"), -init: p.require("$15", "po.js").create, -ace: p.require("$16", "ace.js").strf("php"), -ref: p.require("$17", "refs.js") -}; -C.apis = p.require("$18", "apis.js"); -C.fs = p.require("$19", "fsconn.js"); -h("#loco-admin.wrap table.wp-list-table").each(function(f, d) { -p.require("$20", "tables.js").init(d); +ed: n.require("$13", "poedit.js"), +kbd: n.require("$14", "hotkeys.js"), +init: n.require("$15", "po.js").create, +ace: n.require("$16", "ace.js").strf("php"), +ref: n.require("$17", "refs.js") +}; +C.apis = n.require("$18", "apis.js"); +C.fs = n.require("$19", "fsconn.js"); +k("#loco-admin.wrap table.wp-list-table").each(function(f, d) { +n.require("$20", "tables.js").init(d); }); C.validate = function(f) { return "2.5.7" !== (/^\d+\.\d+\.\d+/.exec(f && f[0] || "") && RegExp.lastMatch) ? (C.notices.warn("admin.js is the wrong version (2.5.7). Please empty all relevant caches and reload this page."), diff --git a/pub/js/min/editor.js b/pub/js/min/editor.js index 5939180d..0e7159e5 100644 --- a/pub/js/min/editor.js +++ b/pub/js/min/editor.js @@ -299,8 +299,8 @@ var n = i.todo(); n && C.notices.warn(m(A("Translation job aborted with %s string remaining", "Translation job aborted with %s strings remaining", n), F(n))).slow(); var t = [], o = i.did(); o && t.push(m(A("%1$s string translated via %2$s", "%1$s strings translated via %2$s", o), F(o), a)), -r ? t.push(m(A("%s string updated", "%s strings updated", r), F(r))) : t.push(O("Nothing needed updating")), -C.notices.success(t.join(". ")).slow(), i = e = null; +r ? t.push(m(A("%s string updated", "%s strings updated", r), F(r))) : o && t.push(O("Nothing needed updating")), +t.length && C.notices.success(t.join(". ")).slow(), i = e = null; } r && (X(), D.rebuildSearch()), l && (l.off("dialogclose").dialog("close"), l = null), D.fire("poAuto"); diff --git a/readme.txt b/readme.txt index dfcecec5..d148e4c3 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: translation, translators, localization, localisation, l10n, i18n, Gettext, Requires at least: 4.1 Requires PHP: 5.2.4 Tested up to: 5.8.3 -Stable tag: 2.5.6 +Stable tag: 2.5.7 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html