From f518c542422792da74be952b4499daa9fe36e4a9 Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Tue, 12 Nov 2024 17:33:38 +0200 Subject: [PATCH] chore: more strings to clean --- classes/admin.class.php | 8 +++++++- classes/attach-popup/container-view.class.php | 2 +- classes/fields.class.php | 14 +++++++------- classes/inputs/input.audio.php | 2 +- classes/inputs/input.checkbox.php | 2 +- classes/inputs/input.cropper.php | 2 +- classes/inputs/input.date.php | 4 ++-- classes/inputs/input.divider.php | 2 +- classes/inputs/input.email.php | 2 +- classes/inputs/input.file.php | 4 ++-- classes/inputs/input.image.php | 2 +- classes/inputs/input.measure.php | 2 +- classes/inputs/input.number.php | 2 +- classes/inputs/input.palettes.php | 2 +- classes/inputs/input.quantities.php | 2 +- classes/inputs/input.radio.php | 2 +- classes/inputs/input.select.php | 2 +- classes/inputs/input.text.php | 2 +- classes/inputs/input.textarea.php | 2 +- classes/inputs/input.timezone.php | 2 +- templates/admin/ppom-fields.php | 2 +- .../frontend/component/image/image-modals.php | 2 +- templates/render-fields.php | 8 +++++++- 23 files changed, 43 insertions(+), 31 deletions(-) diff --git a/classes/admin.class.php b/classes/admin.class.php index aa92c0e3..db018764 100644 --- a/classes/admin.class.php +++ b/classes/admin.class.php @@ -642,7 +642,13 @@ function ppom_attach_ppoms() { self::save_categories_and_tags( $ppom_id, $categories_to_attach, $tags_to_attach ); $response = array( - 'message' => "PPOM updated for {$updated_products} Products, {$updated_cat} Categories and {$updated_tags} Tags.", + 'message' => sprintf( + // translators: %1$d: number of products, %2$d: number of categories, %3$d: number of tags. + __('PPOM updated for %1$d Products, %2$d Categories and %3$d Tags.', 'woocommerce-product-addon'), + $updated_products, + $updated_cat, + $updated_tags + ), 'status' => 'success', ); diff --git a/classes/attach-popup/container-view.class.php b/classes/attach-popup/container-view.class.php index 54bf2b61..fb50ca76 100644 --- a/classes/attach-popup/container-view.class.php +++ b/classes/attach-popup/container-view.class.php @@ -12,7 +12,7 @@ class ContainerView { * @return string */ public function render() { - return 'Empty!'; + return __( 'Empty', 'woocommerce-product-addon' ); } /** diff --git a/classes/fields.class.php b/classes/fields.class.php index 00567572..80e68ef1 100644 --- a/classes/fields.class.php +++ b/classes/fields.class.php @@ -170,7 +170,7 @@ function load_script( $hook ) { 'bulkActionsLabel'=>esc_html__( 'Bulk Actions', 'woocommerce-product-addon' ), 'deleteLabel'=>esc_html__( 'Delete', 'woocommerce-product-addon' ), 'exportLabel'=>esc_html__( 'Export', 'woocommerce-product-addon' ), - 'exportLockedLabel'=>esc_html__( 'Export (PRO)', 'woocommerce-product-addon' ), + 'exportLockedLabel'=> esc_html__( 'Export', 'woocommerce-product-addon' ) . ' (' . esc_html__( 'PRO', 'woocommerce-product-addon' ) . ')', 'importLabel'=>esc_html__( 'Import Field Groups ', 'woocommerce-product-addon' ), 'freemiumCFRContent' => \PPOM_Freemium::get_instance()->get_freemium_cfr_content(), 'freemiumCFRTab' => \PPOM_Freemium::TAB_KEY_FREEMIUM_CFR, @@ -410,10 +410,10 @@ function render_all_input_types( $name, $data, $fields_type, $field_index, $valu $plc_tooltip = ( isset( $placeholders[3] ) && ! empty( $placeholders ) ) ? $placeholders[3] : __( 'Tooltip', 'woocommerce-product-addon' ); $plc_weight = ( isset( $placeholders[4] ) && ! empty( $placeholders ) ) ? $placeholders[4] : sprintf( // translators: $s: the weight unit. - __( 'Weight-%s (PRO only)', 'woocommerce-product-addon' ), + __( 'Weight-%s', 'woocommerce-product-addon' ) . ' (' . __( 'PRO only', 'woocommerce-product-addon' ) . ')', $weight_unit ); - $plc_stock = ( isset( $placeholders[5] ) && ! empty( $placeholders ) ) ? $placeholders[5] : __( 'Stock (PRO only)', 'woocommerce-product-addon' ); + $plc_stock = ( isset( $placeholders[5] ) && ! empty( $placeholders ) ) ? $placeholders[5] : __( 'Stock', 'woocommerce-product-addon' ) . ' (' . __( 'PRO only', 'woocommerce-product-addon' ) . ')'; if ( ppom_pro_is_installed() ) { @@ -785,10 +785,10 @@ function render_all_input_types( $name, $data, $fields_type, $field_index, $valu $condition_rules = isset( $values['rules'] ) ? $values['rules'] : array(); $last_array_id = max( array_keys( $condition_rules ) ); - $visibility_show = ( $values['visibility'] == 'Show' ) ? 'selected="selected"' : ''; - $visibility_hide = ( $values['visibility'] == 'Hide' ) ? 'selected="selected"' : ''; - $bound_all = ( $values['bound'] == 'All' ) ? 'selected="selected"' : ''; - $bound_any = ( $values['bound'] == 'Any' ) ? 'selected="selected"' : ''; + $visibility_show = ( $values['visibility'] === 'Show' ) ? 'selected="selected"' : ''; + $visibility_hide = ( $values['visibility'] === 'Hide' ) ? 'selected="selected"' : ''; + $bound_all = ( $values['bound'] === 'All' ) ? 'selected="selected"' : ''; + $bound_any = ( $values['bound'] === 'Any' ) ? 'selected="selected"' : ''; $html_input = '
'; $html_input .= '
'; diff --git a/classes/inputs/input.audio.php b/classes/inputs/input.audio.php index 2555e9cc..5d142e6a 100644 --- a/classes/inputs/input.audio.php +++ b/classes/inputs/input.audio.php @@ -54,7 +54,7 @@ private function get_settings() { 'class' => array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separated by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'width' => array( diff --git a/classes/inputs/input.checkbox.php b/classes/inputs/input.checkbox.php index 24338893..a8b05152 100644 --- a/classes/inputs/input.checkbox.php +++ b/classes/inputs/input.checkbox.php @@ -59,7 +59,7 @@ private function get_settings() { 'class' => array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separated by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'width' => array( diff --git a/classes/inputs/input.cropper.php b/classes/inputs/input.cropper.php index 83d166c5..bf668181 100644 --- a/classes/inputs/input.cropper.php +++ b/classes/inputs/input.cropper.php @@ -62,7 +62,7 @@ private function get_settings() { 'class' => array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separated by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'width' => array( diff --git a/classes/inputs/input.date.php b/classes/inputs/input.date.php index a8784b92..00f5a494 100644 --- a/classes/inputs/input.date.php +++ b/classes/inputs/input.date.php @@ -1,6 +1,6 @@ array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separate by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'width' => array( diff --git a/classes/inputs/input.divider.php b/classes/inputs/input.divider.php index 07d5c0fc..97baade7 100644 --- a/classes/inputs/input.divider.php +++ b/classes/inputs/input.divider.php @@ -22,7 +22,7 @@ function __construct() { $this->plugin_meta = ppom_get_plugin_meta(); $this->title = __( 'Divider', 'woocommerce-product-addon' ); - $this->desc = __( 'regular didider input', 'woocommerce-product-addon' ); + $this->desc = __( 'regular divider input', 'woocommerce-product-addon' ); $this->icon = ''; $this->settings = self::get_settings(); diff --git a/classes/inputs/input.email.php b/classes/inputs/input.email.php index 1bb53532..203e0afc 100644 --- a/classes/inputs/input.email.php +++ b/classes/inputs/input.email.php @@ -59,7 +59,7 @@ private function get_settings() { 'class' => array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separated by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'width' => array( diff --git a/classes/inputs/input.file.php b/classes/inputs/input.file.php index a5aeaf24..8e624e4e 100644 --- a/classes/inputs/input.file.php +++ b/classes/inputs/input.file.php @@ -61,7 +61,7 @@ private function get_settings() { 'class' => array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separated by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'width' => array( @@ -93,7 +93,7 @@ private function get_settings() { 'file_types' => array( 'type' => 'text', 'title' => __( 'File types', 'woocommerce-product-addon' ), - 'desc' => __( 'File types allowed seperated by comma, e.g: jpg,pdf,zip', 'woocommerce-product-addon' ), + 'desc' => __( 'File types allowed separated by comma, e.g: jpg,pdf,zip', 'woocommerce-product-addon' ), 'default' => 'jpg,pdf,zip', 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), diff --git a/classes/inputs/input.image.php b/classes/inputs/input.image.php index be0a453c..93572ea9 100644 --- a/classes/inputs/input.image.php +++ b/classes/inputs/input.image.php @@ -55,7 +55,7 @@ private function get_settings() { 'class' => array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separated by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'width' => array( diff --git a/classes/inputs/input.measure.php b/classes/inputs/input.measure.php index 62987f3b..ed40a28b 100644 --- a/classes/inputs/input.measure.php +++ b/classes/inputs/input.measure.php @@ -105,7 +105,7 @@ private function get_settings() { 'class' => array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separated by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'width' => array( diff --git a/classes/inputs/input.number.php b/classes/inputs/input.number.php index fad5e5b0..f35399cb 100644 --- a/classes/inputs/input.number.php +++ b/classes/inputs/input.number.php @@ -83,7 +83,7 @@ private function get_settings() { 'class' => array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separated by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'width' => array( diff --git a/classes/inputs/input.palettes.php b/classes/inputs/input.palettes.php index 647761c8..5fc01c45 100644 --- a/classes/inputs/input.palettes.php +++ b/classes/inputs/input.palettes.php @@ -60,7 +60,7 @@ private function get_settings() { 'class' => array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separated by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'width' => array( diff --git a/classes/inputs/input.quantities.php b/classes/inputs/input.quantities.php index 4ec34fc4..f3d945a1 100644 --- a/classes/inputs/input.quantities.php +++ b/classes/inputs/input.quantities.php @@ -97,7 +97,7 @@ private function get_settings() { 'class' => array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separated by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'width' => array( diff --git a/classes/inputs/input.radio.php b/classes/inputs/input.radio.php index 2f406d83..9cdb0c0f 100644 --- a/classes/inputs/input.radio.php +++ b/classes/inputs/input.radio.php @@ -64,7 +64,7 @@ private function get_settings() { 'class' => array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separated by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'width' => array( diff --git a/classes/inputs/input.select.php b/classes/inputs/input.select.php index c2196588..83d1d19c 100644 --- a/classes/inputs/input.select.php +++ b/classes/inputs/input.select.php @@ -71,7 +71,7 @@ private function get_settings() { 'class' => array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separated by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'width' => array( diff --git a/classes/inputs/input.text.php b/classes/inputs/input.text.php index bd6b2c60..eb385e1d 100644 --- a/classes/inputs/input.text.php +++ b/classes/inputs/input.text.php @@ -87,7 +87,7 @@ private function get_settings() { 'class' => array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separated by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'input_mask' => array( diff --git a/classes/inputs/input.textarea.php b/classes/inputs/input.textarea.php index a2a49f36..2f7706cb 100644 --- a/classes/inputs/input.textarea.php +++ b/classes/inputs/input.textarea.php @@ -77,7 +77,7 @@ private function get_settings() { 'class' => array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separated by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'width' => array( diff --git a/classes/inputs/input.timezone.php b/classes/inputs/input.timezone.php index ba5e3721..4ef768ba 100644 --- a/classes/inputs/input.timezone.php +++ b/classes/inputs/input.timezone.php @@ -72,7 +72,7 @@ private function get_settings() { 'class' => array( 'type' => 'text', 'title' => __( 'Class', 'woocommerce-product-addon' ), - 'desc' => __( 'Insert an additional class(es) (separateb by comma) for more personalization.', 'woocommerce-product-addon' ), + 'desc' => __( 'Insert an additional class(es) (separated by comma) for more personalization.', 'woocommerce-product-addon' ), 'col_classes' => array( 'col-md-3', 'col-sm-12' ), ), 'width' => array( diff --git a/templates/admin/ppom-fields.php b/templates/admin/ppom-fields.php index f22839ec..e5495001 100644 --- a/templates/admin/ppom-fields.php +++ b/templates/admin/ppom-fields.php @@ -822,7 +822,7 @@ class="dashicons dashicons-edit"> $download_id = $license->download_id; } $admin_license_url = admin_url( 'options-general.php#ppom_pro_license' ); - $renew_license_url = tsdk_utmify( PPOM_STORE_URL . '?edd_license_key=' . $license_key . '&download_id=' . $download_id, 'ppom_license_block' ); + $renew_license_url = tsdk_translate_link( tsdk_utmify( PPOM_STORE_URL . '?edd_license_key=' . $license_key . '&download_id=' . $download_id, 'ppom_license_block' ) ); ?>
diff --git a/templates/frontend/component/image/image-modals.php b/templates/frontend/component/image/image-modals.php index 270a6cfe..8e1b7cb5 100644 --- a/templates/frontend/component/image/image-modals.php +++ b/templates/frontend/component/image/image-modals.php @@ -21,7 +21,7 @@
-

+

diff --git a/templates/render-fields.php b/templates/render-fields.php index 659ad323..d7d5cd54 100644 --- a/templates/render-fields.php +++ b/templates/render-fields.php @@ -88,7 +88,13 @@ function( $collapse_field ) { if( ppom_check_pro_compatibility('cond_field_repeat') && isset( $meta['cond_field_repeater_enable'] ) && $meta['cond_field_repeater_enable'] === 'on' ) {?> Conditional Field Repeater cannot work if the Legacy Input Rendering is enabled.', sprintf('%s', esc_html( $title ) ) ); + printf( + // translators: %1$s the name of the field, %2$s the opening tag for HTML strong, %3$s the closing tag for HTML strong. + __( 'The %1$s field cannot be used because the Conditional Field Repeater mode is activated, although Legacy Input Rendering is enabled. %2$sConditional Field Repeater%3$s cannot work if the %2$sLegacy Input Rendering%3$s is enabled.' ), + sprintf('%s', esc_html( $title ) ), + '', + '' + ); ?>