Commit 459990a4 authored by Simon's avatar Simon

Translate fix & Teams update

parent ee9ef7a2
......@@ -4,7 +4,7 @@ Plugin Name: Loco Translate
Plugin URI: https://wordpress.org/plugins/loco-translate/
Description: Translate themes and plugins directly in WordPress
Author: Tim Whitlock
Version: 2.4.5
Version: 2.4.6
Author URI: https://localise.biz/wordpress/plugin
Text Domain: loco-translate
Domain Path: /languages/
......@@ -30,7 +30,7 @@ function loco_plugin_file(){
* @return string
*/
function loco_plugin_version(){
return '2.4.5';
return '2.4.6';
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
#loco-admin.wrap .revisions-diff{padding:10px;min-height:20px}#loco-admin.wrap table.diff{border-collapse:collapse}#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.4.5) 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}#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.4.6) 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
.js #loco-admin.wrap .loco-loading{min-height:100px;background:#fff url(../img/spin-modal.gif?v=2.4.5) center center no-repeat}.js #loco-admin.wrap .loco-loading ol.msgcat{display:none}#loco-admin.wrap #loco-po{padding-right:0;overflow:auto}#loco-admin.wrap ol.msgcat{margin-left:3em;padding-top:1em;border-top:1px dashed #ccc}#loco-admin.wrap ol.msgcat:first-child{padding-top:0;border-top:none}#loco-admin.wrap ol.msgcat li{color:#aaa;margin:0;padding:0 0 0 1em;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;border-left:1px solid #eee}#loco-admin.wrap ol.msgcat li>*{color:#333;white-space:pre}#loco-admin.wrap ol.msgcat li>.po-comment{color:#3cc200}#loco-admin.wrap ol.msgcat li>.po-refs{color:#0073aa}#loco-admin.wrap ol.msgcat li>.po-refs a{color:inherit;text-decoration:none}#loco-admin.wrap ol.msgcat li>.po-refs a:hover{text-decoration:underline}#loco-admin.wrap ol.msgcat li>.po-flags{color:#77904a}#loco-admin.wrap ol.msgcat li>.po-flags em{font-style:normal}#loco-admin.wrap ol.msgcat li>.po-word{color:#000}#loco-admin.wrap ol.msgcat li>.po-junk{font-style:italic;color:#ccc}#loco-admin.wrap ol.msgcat li>.po-string>span{color:#c931c7}#loco-admin.wrap form.loco-filter{top:0;right:0;position:absolute}#loco-admin.wrap .loco-invalid form.loco-filter input[type=text]:focus{border-color:#c00;-webkit-box-shadow:0 0 2px rgba(153,0,0,.5);-moz-box-shadow:0 0 2px rgba(153,0,0,.5);box-shadow:0 0 2px rgba(153,0,0,.5)}#loco-admin.wrap .loco-invalid ol.msgcat{list-style-type:none}#loco-admin.wrap .loco-invalid ol.msgcat li{color:#000}
\ No newline at end of file
.js #loco-admin.wrap .loco-loading{min-height:100px;background:#fff url(../img/spin-modal.gif?v=2.4.6) center center no-repeat}.js #loco-admin.wrap .loco-loading ol.msgcat{display:none}#loco-admin.wrap #loco-po{padding-right:0;overflow:auto}#loco-admin.wrap ol.msgcat{margin-left:3em;padding-top:1em;border-top:1px dashed #ccc}#loco-admin.wrap ol.msgcat:first-child{padding-top:0;border-top:none}#loco-admin.wrap ol.msgcat li{color:#aaa;margin:0;padding:0 0 0 1em;font:normal 12px/17px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;border-left:1px solid #eee}#loco-admin.wrap ol.msgcat li>*{color:#333;white-space:pre}#loco-admin.wrap ol.msgcat li>.po-comment{color:#3cc200}#loco-admin.wrap ol.msgcat li>.po-refs{color:#0073aa}#loco-admin.wrap ol.msgcat li>.po-refs a{color:inherit;text-decoration:none}#loco-admin.wrap ol.msgcat li>.po-refs a:hover{text-decoration:underline}#loco-admin.wrap ol.msgcat li>.po-flags{color:#77904a}#loco-admin.wrap ol.msgcat li>.po-flags em{font-style:normal}#loco-admin.wrap ol.msgcat li>.po-word{color:#000}#loco-admin.wrap ol.msgcat li>.po-junk{font-style:italic;color:#ccc}#loco-admin.wrap ol.msgcat li>.po-string>span{color:#c931c7}#loco-admin.wrap form.loco-filter{top:0;right:0;position:absolute}#loco-admin.wrap .loco-invalid form.loco-filter input[type=text]:focus{border-color:#c00;-webkit-box-shadow:0 0 2px rgba(153,0,0,.5);-moz-box-shadow:0 0 2px rgba(153,0,0,.5);box-shadow:0 0 2px rgba(153,0,0,.5)}#loco-admin.wrap .loco-invalid ol.msgcat{list-style-type:none}#loco-admin.wrap .loco-invalid ol.msgcat li{color:#000}
\ No newline at end of file
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(9,100,132,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#096484;foo:#096484}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cdc7 !important;background:#db9925 !important;border-color:#db9925 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/blue/spin-primary-button.gif?v=2.4.5) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(9,100,132,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#096484;foo:#096484}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cdc7 !important;background:#db9925 !important;border-color:#db9925 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/blue/spin-primary-button.gif?v=2.4.6) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(199,165,137,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#c7a589;foo:#c7a589}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1ccc7 !important;background:#ba906d !important;border-color:#ba906d !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/coffee/spin-primary-button.gif?v=2.4.5) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(199,165,137,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#c7a589;foo:#c7a589}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1ccc7 !important;background:#ba906d !important;border-color:#ba906d !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/coffee/spin-primary-button.gif?v=2.4.6) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(163,183,69,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#a3b745;foo:#a3b745}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#cfd1c7 !important;background:#89993a !important;border-color:#89993a !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ectoplasm/spin-primary-button.gif?v=2.4.5) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(163,183,69,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#a3b745;foo:#a3b745}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#cfd1c7 !important;background:#89993a !important;border-color:#89993a !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ectoplasm/spin-primary-button.gif?v=2.4.6) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(136,136,136,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#888;foo:#04a4cc}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7cfd1 !important;background:#0384a4 !important;border-color:#0384a4 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/light/spin-primary-button.gif?v=2.4.5) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(136,136,136,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#888;foo:#04a4cc}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7cfd1 !important;background:#0384a4 !important;border-color:#0384a4 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/light/spin-primary-button.gif?v=2.4.6) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(225,77,67,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#e14d43;foo:#e14d43}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1c8c7 !important;background:#d92e23 !important;border-color:#d92e23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/midnight/spin-primary-button.gif?v=2.4.5) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(225,77,67,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#e14d43;foo:#e14d43}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1c8c7 !important;background:#d92e23 !important;border-color:#d92e23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/midnight/spin-primary-button.gif?v=2.4.6) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(56,88,233,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#3858e9;foo:#3858e9}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7c9d1 !important;background:#193ddf !important;border-color:#193ddf !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/modern/spin-primary-button.gif?v=2.4.5) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(56,88,233,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#3858e9;foo:#3858e9}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7c9d1 !important;background:#193ddf !important;border-color:#193ddf !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/modern/spin-primary-button.gif?v=2.4.6) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(158,186,160,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#9ebaa0;foo:#9ebaa0}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7d1c8 !important;background:#86a989 !important;border-color:#86a989 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ocean/spin-primary-button.gif?v=2.4.5) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(158,186,160,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#9ebaa0;foo:#9ebaa0}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#c7d1c8 !important;background:#86a989 !important;border-color:#86a989 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/ocean/spin-primary-button.gif?v=2.4.6) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(221,130,59,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#dd823b;foo:#dd823b}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cbc7 !important;background:#cc6d23 !important;border-color:#cc6d23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/sunrise/spin-primary-button.gif?v=2.4.5) 0 0 no-repeat !important}
.wrap #loco-editor .is-table .wg-tr:nth-child(even){background-color:rgba(221,130,59,.05)}.wrap #loco-editor .wg-split-x>nav.wg-tabs>a.active,.wrap #loco-editor .is-table .wg-cols>div>div.selected{background-color:#dd823b;foo:#dd823b}.wrap #loco-editor .is-editable>.wg-content>textarea:focus,.wrap #loco-editor .is-editable>.wg-content.has-focus .ace_scroller,.wrap #loco-editor .is-editable>.wg-content.has-focus .mce-content-body{border-color:#5b9dd9;-webkit-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);-moz-box-shadow:inset 0 0 .6em rgba(30,140,190,.8);box-shadow:inset 0 0 .6em rgba(30,140,190,.8)}.wp-core-ui .button-primary.loco-loading[disabled]{color:#d1cbc7 !important;background:#cc6d23 !important;border-color:#cc6d23 !important}.wp-core-ui .button-primary.loco-loading[disabled]:before{background:transparent url(../../img/skins/sunrise/spin-primary-button.gif?v=2.4.6) 0 0 no-repeat !important}
......@@ -9,9 +9,9 @@ q.off("click").click(c);h(e).triggerHandler("resize");z();w=r.length;r.push(c);b
a+' loco-notice inline"></div>').prependTo(h("#loco-notices"));var c=h(s("p"));f=h(s("span")).text(f);b=h(s("strong","has-icon")).text(b+": ");c.append(b).append(f).appendTo(a);return a}function a(a,f,s,n){a=b(s,f,a).css("opacity","0").fadeTo(500,1);h(e).triggerHandler("resize");return c(a,n)}function f(b){return a(b,q,"warning")}function n(){h("#loco-notices").find("div.notice").each(function(a,b){if(-1===b.className.indexOf("jshide")){var f=-1===b.className.indexOf("notice-success")?null:5E3;c(b,
f)}})}var r=[],k=e.console||{log:function(){}},z=Date.now||function(){return(new Date).getTime()},A,q,s,B;g.error=function(b){return a(b,A,"error")};g.warn=f;g.info=function(b){return a(b,s,"info")};g.success=function(b){return a(b,B,"success",5E3)};g.warning=f;g.log=function(){k.log.apply(k,arguments)};g.debug=function(a,b){(k.error||k.log)("Loco: "+a);b&&k.log(b)};g.clear=function(){for(var a=-1,b,f=r,s=f.length;++a<s;)(b=f[a])&&b.call&&b();r=[];return g};g.create=b;g.raise=function(a){(g[a.type]||
g.error).call(g,a.message)};g.convert=c;g.init=function(a){A=a._("Error");q=a._("Warning");s=a._("Notice");B=a._("OK");setTimeout(n,1E3);return g};return g}({},v,x));m.register("$8",function(g,e,E){function l(a){var b=h("<pre>"+a+"</pre>").text();b&&(b=b.replace(/[\r\n]+/g,"\n").replace(/(^|\n)\s+/g,"$1").replace(/\s+$/,""));b||(b=a)||(b="Blank response from server");return b}function d(a){return(a=a.split(/[\r\n]/)[0])?(a=a.replace(/ +in +\S+ on line \d+/,""),a=a.replace(/^[()! ]+Fatal error:\s*/,
"")):t._("Server returned invalid data")}function c(a){e.console&&console.error&&console.error('No nonce for "'+a+'"');return""}function b(a,b,f){a[b]=f}function a(a,b,f){a.push({name:b,value:f})}function f(a,b,f){a.append(b,f)}function n(a,b,f,c){function n(b,c,w){if("abort"!==c){var s=k||{_:function(a){return a}},y=b.status,e=b.responseText,p=l(e),g=b.getResponseHeader("Content-Type")||"text/html",A=b.getResponseHeader("Content-Length")||e.length;"success"===c&&w?r.error(w):(r.error(d(p)+".\n"+
s._("Check console output for debugging information")),r.debug("Ajax failure for "+a,{status:y,error:c,message:w,output:e}),"parsererror"===c&&(w="Response not JSON"),r.log([s._("Provide the following text when reporting a problem")+":","----","Status "+y+' "'+(w||s._("Unknown error"))+'" ('+g+" "+A+" bytes)",p,"===="].join("\n")));f&&f.call&&f(b,c,w);z=b}}c.url=A;c.dataType="json";var r=m.require("$7","notices.js").clear();z=null;return h.ajax(c).fail(n).done(function(a,f,w){var c=a&&a.data,k=a&&
a.notices,d=k&&k.length;for(!c||a.error?n(w,f,a&&a.error&&a.error.message):b&&b(c,f,w);d--;)r.raise(k[d])})}var r={},k,z,A=e.ajaxurl||"/wp-admin/admin-ajax.php";g.init=function(a){r=a.nonces||r;return g};g.localise=function(a){k=a;return g};g.xhr=function(){return z};g.strip=l;g.parse=d;g.submit=function(a,b,f){function c(a,b){b.disabled?b.setAttribute("data-was-disabled","true"):b.disabled=!0}function k(a,b){b.getAttribute("data-was-disabled")||(b.disabled=!1)}function r(a){a.find(".button-primary").removeClass("loading");
"")):t._("Server returned invalid data")}function c(a){e.console&&console.error&&console.error('No nonce for "'+a+'"');return""}function b(a,b,f){a[b]=f}function a(a,b,f){a.push({name:b,value:f})}function f(a,b,f){a.append(b,f)}function n(a,b,f,c){function n(b,c,w){if("abort"!==c){var s=k||{_:function(a){return a}},y=b.status||0,e=b.responseText,p=l(e),g=b.getResponseHeader("Content-Type")||"Unknown type",A=b.getResponseHeader("Content-Length")||e.length;"success"===c&&w?r.error(w):(r.error(d(p)+
".\n"+s._("Check console output for debugging information")),r.debug("Ajax failure for "+a,{status:y,error:c,message:w,output:e}),"parsererror"===c&&(w="Response not JSON"),r.log([s._("Provide the following text when reporting a problem")+":","----","Status "+y+' "'+(w||s._("Unknown error"))+'" ('+g+" "+A+" bytes)",p,"===="].join("\n")));f&&f.call&&f(b,c,w);z=b}}c.url=A;c.dataType="json";var r=m.require("$7","notices.js").clear();z=null;return h.ajax(c).fail(n).done(function(a,f,w){var c=a&&a.data,
k=a&&a.notices,d=k&&k.length;for(!c||a.error?n(w,f,a&&a.error&&a.error.message):b&&b(c,f,w);d--;)r.raise(k[d])})}var r={},k,z,A=e.ajaxurl||"/wp-admin/admin-ajax.php";g.init=function(a){r=a.nonces||r;return g};g.localise=function(a){k=a;return g};g.xhr=function(){return z};g.strip=l;g.parse=d;g.submit=function(a,b,f){function c(a,b){b.disabled?b.setAttribute("data-was-disabled","true"):b.disabled=!0}function k(a,b){b.getAttribute("data-was-disabled")||(b.disabled=!1)}function r(a){a.find(".button-primary").removeClass("loading");
a.find("button").each(k);a.find("input").each(k);a.find("select").each(k);a.find("textarea").each(k);a.removeClass("disabled loading")}var d=h(a),z=d.serialize();(function(a){a.find(".button-primary").addClass("loading");a.find("button").each(c);a.find("input").each(c);a.find("select").each(c);a.find("textarea").each(c);a.addClass("disabled loading")})(d);return n(a.route.value,function(a,f,c){r(d);b&&b(a,f,c)},function(a,b,c){r(d);f&&f(a,b,c)},{type:a.method,data:z})};g.post=function(k,s,d,z){var y=
!0,G=s||{},C=r[k]||c(k);e.FormData&&G instanceof FormData?(y=!1,s=f):s=Array.isArray(G)?a:b;s(G,"action","loco_json");s(G,"route",k);s(G,"loco-nonce",C);return n(k,d,z,{type:"post",data:G,processData:y,contentType:y?"application/x-www-form-urlencoded; charset=UTF-8":!1})};g.get=function(a,b,f,k){b=b||{};var d=r[a]||c(a);b.action="loco_json";b.route=a;b["loco-nonce"]=d;return n(a,f,k,{type:"get",data:b})};g.setNonce=function(a,b){r[a]=b;return g};return g}({},v,x));m.register("$22",{arab:1,aran:1,
hebr:1,nkoo:1,syrc:1,syrn:1,syrj:1,syre:1,samr:1,mand:1,mend:1,thaa:1,adlm:1,cprt:1,phnx:1,armi:1,prti:1,phli:1,phlp:1,phlv:1,avst:1,mani:1,khar:1,orkh:1,ital:1,lydi:1,ar:1,ary:1,ckb:1,dv:1,fa:1,he:1,nqo:1,ps:1,ur:1,yi:1});m.register("$9",function(g,e,h){function l(){}var d,c=m.require("$22","rtl.json");g.init=function(){return new l};g.cast=function(b){return b instanceof l?b:"string"===typeof b?g.parse(b):g.clone(b)};g.clone=function(b){var a,f=new l;for(a in b)f[a]=b[a];return f};g.parse=function(b){if(!(d||
......@@ -192,4 +192,4 @@ c){return-1*a(b,c)}}g.init=function(a){function b(a){var c=-1,d=a.length;for(h("
e[c],g=f.type,m=!(f.desc=!f.desc);q=l(q||d.slice(0),c,g,m);b(q);s&&s.removeClass("loco-desc loco-asc");s=h(f.$).addClass(m?"loco-desc":"loco-asc").removeClass(m?"loco-asc":"loco-desc");v=c;return!1}),e[g]={$:c,type:f});c.hasAttribute("colspan")?g+=Number(c.getAttribute("colspan")):g++}),h("tr",p).each(function(a,b){var c,f,g,h=[],l={_:a,$:b},m=b.getElementsByTagName("td");for(f in e){c=m[f];(g=c.textContent.replace(/(^\s+|\s+$)/g,""))&&h.push(g);c.hasAttribute("data-sort-value")&&(g=c.getAttribute("data-sort-value"));
switch(e[f].type){case "n":g=Number(g)}l[f]=g}d[a]=l;x.index(a,h)}),a=h('form.loco-filter input[type="text"]',a.parentNode),a.length&&(a=a[0],y=h(a.form),1<d.length?m.require("$11","LocoTextListener.js").listen(a,c):y.hide(),y.on("submit",function(a){a.preventDefault();return!1})))};return g}({},v,x));var D=v.loco||{},I=D.conf||{$v:[0,0]};v=m.require("$1","t.js").init();x=I.wplang;D.version=function(g){return I.$v[g||0]};m.require("$2","html.js");m.require("$3","number.js");m.require("$4","array.js");
m.require("$5","json.js");D.l10n=v;v.load(I.wpl10n);x&&v.pluraleq(x.pluraleq);D.string=m.require("$6","string.js");D.notices=m.require("$7","notices.js").init(v);D.ajax=m.require("$8","ajax.js").init(I).localise(v);D.locale=m.require("$9","wplocale.js");D.fulltext=m.require("$10","fulltext.js");D.watchtext=m.require("$11","LocoTextListener.js").listen;D.tooltip=m.require("$12","tooltip.js");D.po={ed:m.require("$13","poedit.js"),kbd:m.require("$14","hotkeys.js"),init:m.require("$15","po.js").create,
ace:m.require("$16","ace.js").strf("php"),ref:m.require("$17","refs.js")};D.apis=m.require("$18","apis.js");D.fs=m.require("$19","fsconn.js");h("#loco-admin.wrap table.wp-list-table").each(function(g,e){m.require("$20","tables.js").init(e)});D.validate=function(g){return"2.4.5"!==(/^\d+\.\d+\.\d+/.exec(g&&g[0]||"")&&RegExp.lastMatch)?(D.notices.warn("admin.js is the wrong version (2.4.5). Please empty all relevant caches and reload this page."),!1):!0}})(window,document,window.jQuery);
\ No newline at end of file
ace:m.require("$16","ace.js").strf("php"),ref:m.require("$17","refs.js")};D.apis=m.require("$18","apis.js");D.fs=m.require("$19","fsconn.js");h("#loco-admin.wrap table.wp-list-table").each(function(g,e){m.require("$20","tables.js").init(e)});D.validate=function(g){return"2.4.6"!==(/^\d+\.\d+\.\d+/.exec(g&&g[0]||"")&&RegExp.lastMatch)?(D.notices.warn("admin.js is the wrong version (2.4.6). Please empty all relevant caches and reload this page."),!1):!0}})(window,document,window.jQuery);
\ No newline at end of file
......@@ -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.5.3
Stable tag: 2.4.5
Stable tag: 2.4.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
......@@ -100,6 +100,11 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http
== Changelog ==
= 2.4.6 =
* Fixed critical bug syncing PO directly to source code
* Added plugin setting for allowing/disallowing missing POT
* Fixed WP5.5 issue with multiple ID attributes on script tags
= 2.4.5 =
* Added WP-CLI sync and extract commands
* Fixed {locale} placeholder bug introduced in 2.4.4
......@@ -385,7 +390,7 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http
== Upgrade Notice ==
= 2.4.5 =
= 2.4.6 =
* Various improvements and bugfixes
......
......@@ -67,16 +67,17 @@ class Loco_admin_bundle_ViewController extends Loco_admin_bundle_BaseController
) );
// POT template file
$pot = null;
$file = $project->getPot();
if( $file && $file->exists() ){
$meta = Loco_gettext_Metadata::load($file);
$pot = Loco_gettext_Metadata::load($file);
$p['pot'] = new Loco_mvc_ViewParams( array(
// POT info
'name' => $file->basename(),
'time' => $file->modified(),
// POT links
'info' => $this->getResourceLink('file-info', $project, $meta ),
'edit' => $this->getResourceLink('file-edit', $project, $meta ),
'info' => $this->getResourceLink('file-info', $project, $pot ),
'edit' => $this->getResourceLink('file-edit', $project, $pot ),
) );
}
......@@ -90,42 +91,39 @@ class Loco_admin_bundle_ViewController extends Loco_admin_bundle_BaseController
$po = $project->findNotLocaleFiles('po')->augment( $project->findNotLocaleFiles('pot') );
$p['_po'] = $this->createProjectPairs( $project, $po, $mo );
// always offer msginit even if we find out later we can't extract any strings
$p['nav'][] = new Loco_mvc_ViewParams( array(
'href' => $this->getProjectLink('msginit', $project ),
'name' => __('New language','loco-translate'),
'icon' => 'add',
) );
// offer msginit unless plugin settings disallows optional POT
if( $pot || 2 > Loco_data_Settings::get()->pot_expected ){
$p['nav'][] = new Loco_mvc_ViewParams( array(
'href' => $this->getProjectLink('msginit', $project ),
'name' => __('New language','loco-translate'),
'icon' => 'add',
) );
}
// offer PO file upload
// Always offer PO file upload
$p['nav'][] = new Loco_mvc_ViewParams( array(
'href' => $this->getProjectLink('upload', $project ),
'name' => __('Upload PO','loco-translate'),
'icon' => 'upload',
) );
$pot = $project->getPot();
// prevent editing of POT when config prohibits
if( $project->isPotLocked() || 1 < Loco_data_Settings::get()->pot_protect ) {
if( $pot && $pot->exists() ){
$meta = Loco_gettext_Metadata::load($pot);
if( $pot ){
if( $project->isPotLocked() || 1 < Loco_data_Settings::get()->pot_protect ) {
$p['nav'][] = new Loco_mvc_ViewParams( array(
'href' => $this->getResourceLink('file-view', $project, $meta ),
'href' => $this->getResourceLink('file-view', $project, $pot ),
'name' => __('View template','loco-translate'),
'icon' => 'file',
) );
}
}
// offer template editing if permitted
else if( $pot && $pot->exists() ){
$p['pot'] = $pot;
$meta = Loco_gettext_Metadata::load($pot);
$p['nav'][] = new Loco_mvc_ViewParams( array(
'href' => $this->getResourceLink('file-edit', $project, $meta ),
'name' => __('Edit template','loco-translate'),
'icon' => 'pencil',
) );
// offer template editing if permitted
else {
$p['nav'][] = new Loco_mvc_ViewParams( array(
'href' => $this->getResourceLink('file-edit', $project, $pot ),
'name' => __('Edit template','loco-translate'),
'icon' => 'pencil',
) );
}
}
// else offer creation of new Template
else {
......
......@@ -209,13 +209,13 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
// TODO this means another utility function in project for prefixing rules on individual location
}
// else no template exists, so we prompt to extract from source
else {
else if( 2 > Loco_data_Settings::get()->pot_expected ){
$this->set( 'ext', new Loco_mvc_ViewParams( array(
'link' => Loco_mvc_AdminRouter::generate( $this->get('type').'-xgettext', $_GET ),
'text' => __('Create template','loco-translate'),
) ) );
// if forcing source extraction show brief description of source files
if( $this->get('extract') ){
// if allowing source extraction without warning show brief description of source files
if( $this->get('extract') || 0 === Loco_data_Settings::get()->pot_expected ){
// Tokenizer required for string extraction
if( ! loco_check_extension('tokenizer') ){
return $this->view('admin/errors/no-tokenizer');
......@@ -243,6 +243,9 @@ class Loco_admin_init_InitPoController extends Loco_admin_bundle_BaseController
return $this->view('admin/init/init-prompt');
}
}
else {
throw new Loco_error_Exception('Plugin settings disallow missing templates');
}
$this->set( 'summary', $summary );
// group established locations into types (official, etc..)
......
......@@ -35,19 +35,25 @@ class Loco_ajax_SyncController extends Loco_mvc_AjaxController {
$potfile = null;
}
// allow front end to configure source file. (will have come from $target headers)
else if( $post->has('sync') ){
else if( $post->sync ){
$potfile = new Loco_fs_File( $post->sync );
$potfile->normalize($base);
}
// else use project-configured template path
// else use project-configured template path (must return a file)
else {
$potfile = $project->getPot();
}
// keep existing behaviour when template is missing, but add warning.
// Translators: %s will be replaced with the name of a missing POT file
// keep existing behaviour when template is missing, but add warning according to settings.
if( $potfile && ! $potfile->exists() ){
Loco_error_AdminNotices::warn( sprintf( __('Falling back to source extraction because %s is missing','loco-translate'), $potfile->basename() ) );
$conf = Loco_data_Settings::get()->pot_expected;
if( 2 === $conf ){
throw new Loco_error_Exception('Plugin settings disallow missing templates');
}
if( 1 === $conf ){
// Translators: %s will be replaced with the name of a missing POT file
Loco_error_AdminNotices::warn( sprintf( __('Falling back to source extraction because %s is missing','loco-translate'), $potfile->basename() ) );
}
$potfile = null;
}
......
......@@ -129,7 +129,9 @@ abstract class Loco_cli_Utils {
/**
* Parse boolean command line option. Absence is equal to false
*
* @param string[]
* @param string
* @return bool
*/
public static function bool( array $opts, $key ){
$value = isset($opts[$key]) ? $opts[$key] : false;
......
......@@ -13,6 +13,7 @@
* @property bool $fs_persist Whether to remember file system credentials in session
* @property int $fs_protect Prevent modification of files in system folders (0:off, 1:warn, 2:block)
* @property int $pot_protect Prevent modification of POT files (0:off, 1:warn, 2:block)
* @property int $pot_expected Whether to allow missing templates and sync to source (0:off, 1:warn, 2:block)
* @property string $max_php_size Skip PHP source files this size or larger
* @property bool $po_utf8_bom Whether to prepend PO and POT files with UTF-8 byte order mark
* @property string $po_width PO/POT file maximum line width (wrapping) zero to disable
......@@ -51,6 +52,7 @@ class Loco_data_Settings extends Loco_data_Serializable {
'fs_persist' => false,
'fs_protect' => 1,
'pot_protect' => 1,
'pot_expected' => 1,
'max_php_size' => '100K',
'po_utf8_bom' => false,
'po_width' => '79',
......
......@@ -251,7 +251,7 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
if( ! $base ){
throw new Loco_error_Exception('Too early to enqueueStyle('.var_export($name,1).')');
}
$id = 'loco-translate-css-'.strtr($name,'/','-');
$id = 'loco-translate-'.strtr($name,'/','-');
// css always minified. sass in build env only
$href = $base.'/pub/css/'.$name.'.css';
$vers = apply_filters( 'loco_static_version', loco_plugin_version(), $href );
......@@ -274,7 +274,7 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
// use minimized javascript file. hook into script_loader_src to point at development source
$href = $base.'/pub/js/min/'.$name.'.js';
$vers = apply_filters( 'loco_static_version', loco_plugin_version(), $href );
$id = 'loco-translate-js-'.strtr($name,'/','-');
$id = 'loco-translate-'.strtr($name,'/','-');
wp_enqueue_script( $id, $href, $deps, $vers, true );
$this->scripts[$id] = $href;
return $this;
......@@ -285,14 +285,17 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
* @internal
* @param string
* @param string
* @param string
* @return string
*/
public function filter_script_loader_tag( $tag, $id, $src ) {
public function filter_script_loader_tag( $tag, $id ) {
if( array_key_exists($id,$this->scripts) ) {
// Add element id for in-dom verification of expected scripts
if( '<script ' === substr($tag,0,8) ){
$tag = '<script id="'.$id.'" '.substr($tag,8);
// WordPress has started adding their own ID since v5.5 which simply appends -js to the handle
$id .= '-js';
if( false === strpos($tag,$id) ){
$tag = '<script id="'.$id.'" '.substr($tag,8);
}
}
}
return $tag;
......
......@@ -140,20 +140,20 @@ class Loco_mvc_AjaxRouter extends Loco_hooks_Hookable {
private function exitScript( $str, array $headers ){
try {
do_action('loco_admin_shutdown');
Loco_output_Buffer::clear();
$this->buffer = null;
Loco_output_Buffer::check();
$headers['Content-Length'] = strlen($str);
foreach( $headers as $name => $value ){
header( $name.': '.$value, true );
}
Loco_output_Buffer::clear();
$this->buffer = null;
Loco_output_Buffer::check();
$headers['Content-Length'] = strlen($str);
foreach( $headers as $name => $value ){
header( $name.': '.$value, true );
}
}
catch( Exception $e ){
Loco_error_AdminNotices::add( Loco_error_Exception::convert($e) );
$str = $e->getMessage();
Loco_error_AdminNotices::add( Loco_error_Exception::convert($e) );
$str = $e->getMessage();
}
echo $str;
exit(0);
echo $str;
exit(0);
}
......
......@@ -8,6 +8,8 @@ $help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/man
$fs_help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/filesystem');
/* @var Loco_data_Settings $opts */
/* @var Loco_data_Settings $dflt */
/* @var Loco_mvc_ViewParams $nonce */
/* @var Loco_mvc_ViewParams $verbose */
?>
<form action="" method="post" enctype="application/x-www-form-urlencoded">
......@@ -106,12 +108,23 @@ $fs_help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/
<span><?php esc_html_e('Syncing PO files','loco-translate')?></span>
</legend>
<p>
<label for="loco--">
<?php esc_html_e('Fuzzy matching tolerance:','loco-translate')?>
<label for="loco--fuzziness">
<?php esc_html_e('Fuzzy matching tolerance','loco-translate')?>:
</label>
<input type="text" size="5" maxlength="3" name="opts[fuzziness]" id="loco--fuzziness" value="<?php echo esc_attr( $opts->fuzziness)?>" placeholder="0-100" />
<span>%</span>
</p>
<p>
<label for="loco--pot-expected">
<?php // translators: Indicates that POT files are optional, which is not recommended
esc_html_e('Sync with source when template missing','loco-translate')?>:
</label>
<select name="opts[pot_expected]" id="loco--pot-expected">
<option value="0"><?php $verbose->e(0)?></option>
<option value="1"<?php echo 1 === $opts->pot_expected?' selected':''?>><?php $verbose->e(1)?></option>
<option value="2"<?php echo 2 === $opts->pot_expected?' selected':''?>><?php $verbose->e(2)?></option>
</select>
</p>
</fieldset>
</td>
</tr>
......@@ -142,17 +155,20 @@ $fs_help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/
(<?php esc_html_e('Not recommended','loco-translate')?>)
</label>
</p>
<p><?php
/* @var Loco_mvc_ViewParams $verbose */
esc_html_e('Modification of installed files','loco-translate');?>:
<p>
<label for="loco--fs-protect">
<?php esc_html_e('Modification of installed files','loco-translate');?>:
</label>
<select name="opts[fs_protect]" id="loco--fs-protect">
<option value="0"><?php $verbose->e(0)?></option>
<option value="1"<?php echo 1 === $opts->fs_protect?' selected':''?>><?php $verbose->e(1)?></option>
<option value="2"<?php echo 2 === $opts->fs_protect?' selected':''?>><?php $verbose->e(2)?></option>
</select>
</p>
<p><?php
esc_html_e('Editing of POT (template) files','loco-translate');?>:
<p>
<label for="loco--pot-protect">
<?php esc_html_e('Editing of POT (template) files','loco-translate');?>:
</label>
<select name="opts[pot_protect]" id="loco--pot-protect">
<option value="0"><?php $verbose->e(0)?></option>
<option value="1"<?php echo 1 === $opts->pot_protect?' selected':''?>><?php $verbose->e(1)?></option>
......
......@@ -4,6 +4,12 @@
*/
$this->extend('../layout');
$help = apply_filters('loco_external','https://localise.biz/wordpress/plugin/manual/templates');
/* @var Loco_mvc_ViewParams[] $tabs */
/* @var Loco_mvc_ViewParams $ext */
/* @var Loco_mvc_ViewParams $conf */
/* @var Loco_mvc_ViewParams $skip */
/* @var Loco_mvc_ViewParams $params */
?>
<div class="notice inline notice-warning">
<h3 class="has-icon">
......
......@@ -76,7 +76,7 @@ document.addEventListener && document.addEventListener('DOMContentLoaded', funct
function enumJs(s) {
var i = s.length;
while( 0 !== i-- ){
if( null == document.getElementById(s[i]) ){
if( null == document.getElementById(s[i]+'-js') ){
return false;
}
}
......
......@@ -3,22 +3,51 @@
global $wpdb;
function getContent($team) {
?>
<header class="c-tabs--headline" ><?php echo $team->post_content; ?></header>
<div class="c-members">
<?php
$members = get_the_terms($team->ID, 'member');
if (is_array($members)):
foreach ($members as &$member):
$photo = get_term_meta( $member->term_id, 'photo', true);
$position = get_term_meta( $member->term_id, 'position', true);
$enabled = get_term_meta( $member->term_id, 'enabled', true);
if ($enabled):
?>
<div class="c-member">
<picture class="c-member--photo">
<img src="<?php echo $photo['guid'] ? $photo['guid'] : '/wp-content/themes/biuro/i/member-placeholder.png'; ?>" alt="<?php echo $member->name; ?>" loading="lazy" />
</picture>
<h4 class="c-member--info c-member--name" title="<?php echo $member->name; ?>"><?php echo $member->name; ?></h4>
<div class="c-member--info c-member--position" title="<?php echo $position; ?>"><?php echo $position; ?></div>
</div>
<?php
endif;
endforeach;
endif;
?>
</div>
<?php
}
$params = array(
'limit' => -1
);
$langs = pll_the_languages(array('raw'=>1));
$langID = $langs[pll_current_language('slug')]['id'];
$where = ' `langs`.`object_id` IS NOT NULL';
$where = ' `t`.`post_parent` = 0 AND langs.`object_id` IS NOT NULL';
$params['join'] = ' LEFT JOIN `' . $wpdb->prefix . 'term_relationships` AS `langs` ON `langs`.`object_id` = `t`.`ID` AND `langs`.`term_taxonomy_id` = ' . $langID;
$params['where'] = $where;
$pods = pods( 'team', $params);
$total = $pods->total();
if ($total > 0):
if ($pods->total() > 0):
$teams = $pods->data();
?>
......@@ -47,34 +76,26 @@
foreach ($teams as &$team):
$teamTitle = $team->post_title;
$teamURL = getTeamURL($teamTitle);;
?>
<section id="<?php echo $teamURL; ?>" class="c-tabs--content">
<header class="c-tabs--headline" ><?php echo $team->post_content; ?></header>
<div class="c-members">
<?php
$members = get_the_terms($team->ID, 'member');
if (is_array($members)):
foreach ($members as &$member):
$photo = get_term_meta( $member->term_id, 'photo', true);
$position = get_term_meta( $member->term_id, 'position', true);
$enabled = get_term_meta( $member->term_id, 'enabled', true);
$where = ' `t`.`post_parent` = ' . $team->ID . ' AND langs.`object_id` IS NOT NULL';
if ($enabled):
$params['join'] = ' LEFT JOIN `' . $wpdb->prefix . 'term_relationships` AS `langs` ON `langs`.`object_id` = `t`.`ID` AND `langs`.`term_taxonomy_id` = ' . $langID;
$params['where'] = $where;
$subPods = pods( 'team', $params);
?>
<div class="c-member">
<picture class="c-member--photo">
<img src="<?php echo $photo['guid'] ? $photo['guid'] : '/wp-content/themes/biuro/i/member-placeholder.png'; ?>" alt="<?php echo $member->name; ?>" loading="lazy" />
</picture>
<h4 class="c-member--info c-member--name" title="<?php echo $member->name; ?>"><?php echo $member->name; ?></h4>
<div class="c-member--info c-member--position" title="<?php echo $position; ?>"><?php echo $position; ?></div>
</div>
<section id="<?php echo $teamURL; ?>" class="c-tabs--content">
<?php
endif;
endforeach;
endif;
if ($subPods->total() > 0):
$subTeams = $subPods->data();
foreach ($subTeams as &$subTeam):
getContent($subTeam);
endforeach;
else:
getContent($team);
endif;
?>
</div>
</section>
<?php
endforeach;
......
......@@ -24,8 +24,8 @@ wp core language update;
# wp option update date_format "Y-m-d";
# wp option update time_format "H:i";
# wp plugin install loco-translate --version=2.4.5 --activate-network;
wp plugin update loco-translate --version=2.4.5;
# wp plugin install loco-translate --version=2.4.6 --activate-network;
wp plugin update loco-translate --version=2.4.6;
# wp plugin install pods --version=2.7.24 --activate-network;
wp plugin update pods --version=2.7.24;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment