Skip to content

Commit

Permalink
chore: more strings to clean
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Nov 12, 2024
1 parent db4f768 commit f518c54
Show file tree
Hide file tree
Showing 23 changed files with 43 additions and 31 deletions.
8 changes: 7 additions & 1 deletion classes/admin.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
);

Expand Down
2 changes: 1 addition & 1 deletion classes/attach-popup/container-view.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ContainerView {
* @return string
*/
public function render() {
return 'Empty!';
return __( 'Empty', 'woocommerce-product-addon' );
}

/**
Expand Down
14 changes: 7 additions & 7 deletions classes/fields.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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() ) {

Expand Down Expand Up @@ -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 = '<div class="row ppom-condition-style-wrap">';
$html_input .= '<div class="col-md-3 col-sm-3">';
Expand Down
2 changes: 1 addition & 1 deletion classes/inputs/input.audio.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion classes/inputs/input.checkbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion classes/inputs/input.cropper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions classes/inputs/input.date.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Followig class handling date input control and their
* Following class handling date input control and their
* dependencies. Do not make changes in code
* Create on: 9 November, 2013
*/
Expand Down Expand Up @@ -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) (separate by comma) for more personalization.', 'woocommerce-product-addon' ),
'col_classes' => array( 'col-md-3', 'col-sm-12' ),
),
'width' => array(
Expand Down
2 changes: 1 addition & 1 deletion classes/inputs/input.divider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<i class="fa fa-pencil-square-o" aria-hidden="true"></i>';
$this->settings = self::get_settings();

Expand Down
2 changes: 1 addition & 1 deletion classes/inputs/input.email.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions classes/inputs/input.file.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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' ),
),
Expand Down
2 changes: 1 addition & 1 deletion classes/inputs/input.image.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion classes/inputs/input.measure.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion classes/inputs/input.number.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion classes/inputs/input.palettes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion classes/inputs/input.quantities.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion classes/inputs/input.radio.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion classes/inputs/input.select.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion classes/inputs/input.text.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion classes/inputs/input.textarea.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion classes/inputs/input.timezone.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/ppom-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ class="dashicons dashicons-edit"></span></button>
$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' ) );
?>
<div class="ppom-modal-body">
<button type="button" aria-label="close" class="close-model ppom-js-modal-close"><span class="dashicons dashicons-no-alt"></span></button>
Expand Down
2 changes: 1 addition & 1 deletion templates/frontend/component/image/image-modals.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="ppom-popup-inner-section">
<header class="ppom-popup-header">
<!-- <a href="#" class="js-modal-close close">×</a> -->
<h3><?php echo $image_title; ?></h3>
<h3><?php echo esc_html( $image_title ); ?></h3>
</header>
<div class="ppom-popup-body images">
<img src="<?php echo esc_url( $image_full ); ?>">
Expand Down
8 changes: 7 additions & 1 deletion templates/render-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) {?>
<span class="ppom-option-notice">
<?php
printf( 'The %s field cannot be used because the Conditional Field Repeater mode is activated, although Legacy Input Rendering is enabled. <strong>Conditional Field Repeater</strong> cannot work if the <strong>Legacy Input Rendering</strong> is enabled.', sprintf('<strong>%s</strong>', 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('<strong>%s</strong>', esc_html( $title ) ),
'<strong>',
'</strong>'
);
?>
</span>
<?php
Expand Down

0 comments on commit f518c54

Please sign in to comment.