From fb836622a334221726a0c5cb8bf59bfd1dcc3353 Mon Sep 17 00:00:00 2001 From: olatechpro Date: Wed, 13 Dec 2023 15:57:51 +0100 Subject: [PATCH 1/9] Inconsistencies with language files #311 --- capsman-enhanced.php | 6 +- common/js/admin.dev.js | 2 +- common/js/admin.js | 2 +- framework/lib/formating.php | 2 +- includes-core/CoreAdmin.php | 6 +- includes-core/admin-features-promo.php | 4 +- includes-core/admin-menus-promo.php | 8 +- includes-core/editor-features-promo.php | 26 +- includes-core/frontend-features-promo.php | 8 +- includes/admin-load.php | 74 +- includes/admin.php | 214 ++-- includes/backup-handler.php | 30 +- includes/backup.php | 78 +- includes/dashboard.php | 2 +- includes/features/admin-features.php | 26 +- includes/features/editor-features-classic.php | 10 +- .../features/editor-features-gutenberg.php | 10 +- includes/features/editor-features.php | 32 +- .../frontend-features-action.php | 24 +- .../frontend-features-data.php | 2 +- .../frontend-features-metaboxes.php | 6 +- .../frontend-features-ui.php | 64 +- .../frontend-features/frontend-features.php | 24 +- includes/features/nav-menus.php | 24 +- includes/features/profile-features.php | 28 +- includes/features/restrict-admin-features.php | 38 +- .../features/restrict-editor-features.php | 146 +-- includes/filters.php | 2 +- includes/functions-admin.php | 66 +- includes/functions.php | 128 +- includes/handler.php | 16 +- includes/manager.php | 86 +- includes/pp-ui.php | 40 +- .../roles/class/class-pp-roles-actions.php | 48 +- includes/roles/class/class-pp-roles-admin.php | 110 +- .../roles/class/class-pp-roles-list-table.php | 46 +- includes/roles/roles-functions.php | 2 +- includes/roles/roles.php | 8 +- includes/settings-ui.php | 54 +- includes/settings.php | 14 +- includes/test-user-ui.php | 12 +- includes/test-user.php | 4 +- .../capability-manager-enhanced-by_BY.mo | Bin 0 -> 4970 bytes ...o => capability-manager-enhanced-by_BY.po} | 1049 +++++++++++----- languages/capability-manager-enhanced-ca.mo | Bin 0 -> 6407 bytes ...a.po => capability-manager-enhanced-ca.po} | 1057 +++++++++++----- .../capability-manager-enhanced-de_DE.mo | Bin 0 -> 6977 bytes ...o => capability-manager-enhanced-de_DE.po} | 1060 ++++++++++++----- ...o => capability-manager-enhanced-en_US.mo} | Bin 672 -> 672 bytes ...o => capability-manager-enhanced-en_US.po} | 1049 +++++++++++----- .../capability-manager-enhanced-es_ES.mo | Bin 0 -> 56234 bytes ...o => capability-manager-enhanced-es_ES.po} | 100 +- .../capability-manager-enhanced-fr_FR.mo | Bin 0 -> 58387 bytes ...o => capability-manager-enhanced-fr_FR.po} | 105 +- .../capability-manager-enhanced-it_IT.mo | Bin 0 -> 54973 bytes ...o => capability-manager-enhanced-it_IT.po} | 100 +- .../capability-manager-enhanced-ru_RU.mo | Bin 0 -> 5229 bytes ...o => capability-manager-enhanced-ru_RU.po} | 1054 +++++++++++----- .../capability-manager-enhanced-sv_SE.mo | Bin 0 -> 6415 bytes ...o => capability-manager-enhanced-sv_SE.po} | 1057 +++++++++++----- ...ed.pot => capability-manager-enhanced.pot} | 64 +- languages/capsman-enhanced-by_BY.mo | Bin 5223 -> 0 bytes languages/capsman-enhanced-ca.mo | Bin 6804 -> 0 bytes languages/capsman-enhanced-de_DE.mo | Bin 7373 -> 0 bytes languages/capsman-enhanced-es_ES.mo | Bin 59054 -> 0 bytes languages/capsman-enhanced-fr_FR.mo | Bin 61207 -> 0 bytes languages/capsman-enhanced-it_IT.mo | Bin 57793 -> 0 bytes languages/capsman-enhanced-ru_RU.mo | Bin 5655 -> 0 bytes languages/capsman-enhanced-sv_SE.mo | Bin 6819 -> 0 bytes 69 files changed, 5323 insertions(+), 2904 deletions(-) create mode 100644 languages/capability-manager-enhanced-by_BY.mo rename languages/{capsman-enhanced-by_BY.po => capability-manager-enhanced-by_BY.po} (65%) create mode 100644 languages/capability-manager-enhanced-ca.mo rename languages/{capsman-enhanced-ca.po => capability-manager-enhanced-ca.po} (66%) create mode 100644 languages/capability-manager-enhanced-de_DE.mo rename languages/{capsman-enhanced-de_DE.po => capability-manager-enhanced-de_DE.po} (66%) rename languages/{capsman-enhanced-en_US.mo => capability-manager-enhanced-en_US.mo} (94%) rename languages/{capsman-enhanced-en_US.po => capability-manager-enhanced-en_US.po} (63%) create mode 100644 languages/capability-manager-enhanced-es_ES.mo rename languages/{capsman-enhanced-es_ES.po => capability-manager-enhanced-es_ES.po} (98%) create mode 100644 languages/capability-manager-enhanced-fr_FR.mo rename languages/{capsman-enhanced-fr_FR.po => capability-manager-enhanced-fr_FR.po} (97%) create mode 100644 languages/capability-manager-enhanced-it_IT.mo rename languages/{capsman-enhanced-it_IT.po => capability-manager-enhanced-it_IT.po} (98%) create mode 100644 languages/capability-manager-enhanced-ru_RU.mo rename languages/{capsman-enhanced-ru_RU.po => capability-manager-enhanced-ru_RU.po} (65%) create mode 100644 languages/capability-manager-enhanced-sv_SE.mo rename languages/{capsman-enhanced-sv_SE.po => capability-manager-enhanced-sv_SE.po} (66%) rename languages/{capsman-enhanced.pot => capability-manager-enhanced.pot} (98%) delete mode 100644 languages/capsman-enhanced-by_BY.mo delete mode 100644 languages/capsman-enhanced-ca.mo delete mode 100644 languages/capsman-enhanced-de_DE.mo delete mode 100644 languages/capsman-enhanced-es_ES.mo delete mode 100644 languages/capsman-enhanced-fr_FR.mo delete mode 100644 languages/capsman-enhanced-it_IT.mo delete mode 100644 languages/capsman-enhanced-ru_RU.mo delete mode 100644 languages/capsman-enhanced-sv_SE.mo diff --git a/capsman-enhanced.php b/capsman-enhanced.php index 292ec8c0..900c0aa6 100644 --- a/capsman-enhanced.php +++ b/capsman-enhanced.php @@ -6,7 +6,7 @@ * Version: 2.10.3 * Author: PublishPress * Author URI: https://publishpress.com/ - * Text Domain: capsman-enhanced + * Text Domain: capability-manager-enhanced * Domain Path: /languages/ * Requires at least: 5.5 * Requires PHP: 7.2.5 @@ -77,7 +77,7 @@ foreach (get_option('active_plugins') as $plugin_file) { if (false !== strpos($plugin_file, 'capsman.php')) { add_action('admin_notices', function () { - echo '
' . sprintf(esc_html__('%1s Error: %2s PublishPress Capabilities cannot function because another copy of the plugin is active.', 'capsman-enhanced'), '', '') . '
'; + echo '
' . sprintf(esc_html__('%1s Error: %2s PublishPress Capabilities cannot function because another copy of the plugin is active.', 'capability-manager-enhanced'), '', '') . '
'; }); return; } @@ -106,7 +106,7 @@ 'plugin_row_meta', function ($links, $file) { if ($file == plugin_basename(__FILE__)) { - $links[] = '' . esc_html__('This plugin can be deleted.', 'capsman-enhanced') . ''; + $links[] = '' . esc_html__('This plugin can be deleted.', 'capability-manager-enhanced') . ''; } return $links; diff --git a/common/js/admin.dev.js b/common/js/admin.dev.js index e8ae4b2f..b370c34f 100644 --- a/common/js/admin.dev.js +++ b/common/js/admin.dev.js @@ -800,7 +800,7 @@ jQuery(document).ready( function($) { function ppcTimerStatus(type = "success") { setTimeout(function () { var uniqueClass = "ppc-floating-msg-" + Math.round(new Date().getTime() + Math.random() * 100); - var message = type === "success" ? __("Changes saved!", "capsman-enhanced") : __(" Error: changes can't be saved.", "capsman-enhanced"); + var message = type === "success" ? __("Changes saved!", "capability-manager-enhanced") : __(" Error: changes can't be saved.", "capability-manager-enhanced"); var instances = $(".ppc-floating-status").length; $("#wpbody-content").after('' + message + ""); $("." + uniqueClass) diff --git a/common/js/admin.js b/common/js/admin.js index 4f65f6c9..048da926 100644 --- a/common/js/admin.js +++ b/common/js/admin.js @@ -1 +1 @@ -jQuery(document).ready(function(e){var{__:t,_x:a,_n:n,_nx:s}=wp.i18n;function i(a="success"){setTimeout(function(){var n="ppc-floating-msg-"+Math.round(new Date().getTime()+100*Math.random()),s="success"===a?t("Changes saved!","capsman-enhanced"):t(" Error: changes can't be saved.","capsman-enhanced"),i=e(".ppc-floating-status").length;e("#wpbody-content").after(''+s+""),e("."+n).css("bottom",45*i).fadeIn(1e3).delay(1e4).fadeOut(1e3,function(){e(this).remove()})},500)}function l(t,a){var n=e("#toplevel_page_pp-capabilities-dashboard"),s=e(n).find("li."+t+"-menu-item");s.length&&(1==a?s.removeClass("ppc-hide-menu-item").find("a").removeClass("ppc-hide-menu-item"):s.addClass("ppc-hide-menu-item").find("a").addClass("ppc-hide-menu-item"))}e("a.neg-cap").attr("title",cmeAdmin.negationCaption),e("a.neg-type-caps").attr("title",cmeAdmin.typeCapsNegationCaption),e("a.normal-cap").attr("title",cmeAdmin.switchableCaption),e('span.cap-x:not([class*="pp-cap-key"])').html(cmeAdmin.capNegated),e('table.cme-checklist input[class!="cme-check-all"]').not(":disabled").attr("title",cmeAdmin.chkCaption),e(".ppc-checkboxes-documentation-link").length>0&&e(".ppc-checkboxes-documentation-link").attr("target","blank"),e("table.cme-checklist a.neg-cap").click(function(t){e(this).closest("td").removeClass("cap-yes").removeClass("cap-no").addClass("cap-neg");var a=e(this).parent().find('input[type="checkbox"]').attr("name");return e(this).after(''),e('input[name="'+a+'"]').closest("td").removeClass("cap-yes").removeClass("cap-no").addClass("cap-neg"),e(this).closest("tr").hasClass("unfiltered_upload")&&(e('input[name="caps[upload_files]"]').closest("td").addClass("cap-neg"),e('input[name="caps[upload_files]"]').closest("td").append(''),e('input[name="caps[upload_files]"]').parent().next("a.neg-cap:visible").click()),!1}),e(document).on("click","table.cme-typecaps span.cap-x,table.cme-checklist span.cap-x,table.cme-checklist td.cap-neg span",function(t){e(this).closest("td").removeClass("cap-neg").removeClass("cap-yes").addClass("cap-no"),e(this).parent().find('input[type="checkbox"]').prop("checked",!1),e(this).parent().find("input.cme-negation-input").remove();var a=e(this).next('input[type="checkbox"]').attr("name");return a||(a=e(this).next("label").find('input[type="checkbox"]').attr("name")),e('input[name="'+a+'"]').parent().closest("td").removeClass("cap-neg").removeClass("cap-yes").addClass("cap-no"),e('input[name="'+a+'"]').prop("checked",!1).parent().find("input.cme-negation-input").remove(),e(this).closest("td").hasClass("capability-checkbox-rotate")&&(e(this).closest("td").find('input[type="checkbox"]').prop("checked",!0),e(this).closest("td").hasClass("upload_files")&&(e("tr.unfiltered_upload").find("td").removeClass("cap-neg").removeClass("cap-yes").addClass("cap-no"),e("tr.unfiltered_upload").find('input[type="checkbox"]').prop("checked",!1),e("tr.unfiltered_upload").find("input.cme-negation-input").remove(),e('input[name="caps[unfiltered_upload]"]').parent().closest("td").removeClass("cap-neg").removeClass("cap-yes").addClass("cap-no"),e('input[name="caps[unfiltered_upload]"]').prop("checked",!0).parent().find("input.cme-negation-input").remove())),e(this).closest("td").find('input[type="checkbox"]').hasClass("pp-single-action-rotate")&&e(this).closest("td").find('input[type="checkbox"]').prop("checked",!0),e(this).closest("tr").hasClass("unfiltered_upload")&&(e('input[name="caps[upload_files]"]').parent().closest("td").removeClass("cap-neg").removeClass("cap-yes").addClass("cap-no"),e('input[name="caps[upload_files]"]').prop("checked",!0).parent().find("input.cme-negation-input").remove()),!1}),e("#publishpress_caps_form").bind("keypress",function(t){if(13==t.keyCode)return e(document.activeElement).parent().find('input[type="submit"]').first().click(),!1}),e("input.cme-check-all").click(function(t){e(this).closest("table").find('input[type="checkbox"][disabled!="disabled"]:visible').prop("checked",e(this).is(":checked"))}),e("a.cme-neg-all").click(function(t){return e(this).closest("table").find("a.neg-cap:visible").click(),!1}),e("a.cme-switch-all").click(function(t){return e(this).closest("table").find("td.cap-neg span").click(),!1}),e("table.cme-typecaps a.neg-type-caps").click(function(t){return e(this).closest("tr").find('td[class!="cap-neg"]').filter('td[class!="cap-unreg"]').each(function(){e(this).addClass("cap-neg");var t=e(this).find('input[type="checkbox"]').attr("name");e(this).append(''),e('input[name="'+t+'"]').parent().next("a.neg-cap:visible").click()}),!1}),e("table.cme-typecaps th").click(function(){var t=e(this).index(),a=!e(this).prop("checked_all");if(e(this).hasClass("term-cap"))var n='[class*="term-cap"]';else var n='[class*="post-cap"]';var s=e(this).closest("table").find("tr td"+n+":nth-child("+(t+1)+') input[type="checkbox"]:visible');e(s).each(function(t,n){e('input[name="'+e(this).attr("name")+'"]').prop("checked",a)}),e(this).prop("checked_all",a)}),e("a.cme-fix-read-cap").click(function(){return e('input[name="caps[read]"]').prop("checked",!0),e('input[name="SaveRole"]').trigger("click"),!1}),e(".ppc-filter-select").each(function(){var t=e(this),a=[];e(this).parent().siblings("table").find("tbody").find("tr").each(function(){a.push({value:e(this).attr("class"),text:e(this).find(".cap_type").text()})}),a.forEach(function(a,n){t.append(e("