• During the translation of the plug-in, the following problems were detected:

    FILE …/classes/es-register.php
    Line 141-142

    I propose to change the icons on the standard dashicons (and in passing – textdomain). Here and further – already corrected lines, you have the originals.

    add_menu_page( __( 'Email Subscribers', ES_TDOMAIN ),
    	__( 'Email Subscribers', ES_TDOMAIN ), 'admin_dashboard', 'email-subscribers', array( 'es_cls_registerhook', 'es_admin_option'), 'dashicons-email', 51 );

    Line 162
    Correct mistake – add a missing tag </span>

    __( '<span style="color:#f18500;font-weight:bolder;">Help & Info</span>', 'email-subscribers' ), $es_roles_help, 'es-general-information', array( 'es_cls_intermediate', 'es_information' ));

    Line 964
    I propose to change Name on Your name and Email * on * Your E-mail (or Your E-mail *) in the widget. This will allow us to distinguish the Name and Address in the widget from the others.

    <div class="es_lablebox"><label class="es_widget_form_name"><?php echo __( 'Your name', ES_TDOMAIN ); ?></label></div>

    Line 969

    <div class="es_lablebox"><label class="es_widget_form_email"><?php echo __( '* Your E-mail', ES_TDOMAIN ); ?></label></div>

    Similarly in
    FILE …/classes/es-loadwidget.php
    Line 28 and 33 – The same replacement Name и Email *

    • This topic was modified 6 years, 9 months ago by Natali_Z.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Natali_Z

    (@natali_z)

    FILE …/classes/es-sendmail.php
    No preparation for translation:

    Line 62

    es_cls_sendmail::es_sendmail( "notification", $template, $subscribers, __( "Post Notification", ES_TDOMAIN ), $post_id, $mailsenttype );

    Line 74

    es_cls_sendmail::es_sendmail( "newsletter", $template, $subscribers, __( "Newsletter", ES_TDOMAIN ), 0, $mailsenttype );

    Line 298-304
    I propose to add variables to output the category and the authors of posts:

    // Get category
    $category = get_the_category();
    $post_cat = $category[0]->cat_name;
    
    // Get author
    $author = $post->post_author;
    $post_author = get_the_author_meta('display_name', $author);

    And correspondingly:
    Line 336-337:

    $content = str_replace('###CATEGORY###', $post_cat, $content);
    $content = str_replace('###AUTHOR###', $post_author, $content);

    Line 420-422 and 453-455
    I was forced to do so:

    /*else
    {
    $unsubtext = '\n\n' . $unsubtext;
    }*/

    because otherwise the letters are displayed \n\n:

    Thread Starter Natali_Z

    (@natali_z)

    FILE …/compose/compose-show.php
    No preparation for translation: line 13-14

    FILE …help/help.php
    No preparation for translation:
    Line 57:
    <input type="submit" name="submit" id="submit" class="button button-hero" value="<?php _e( 'Subscribe', ES_TDOMAIN ) ?>" />

    Line 120-123
    Error, the POT file picks up only part of the text, before $subbox_code. As a result, the entire text remains untranslated.

    <?php echo __( 'Use any of the following 3 methods to add subscription form to your website :<br>
    a) Use shortcode in any page/post : <strong>[email-subscribers namefield="YES" desc="" group="Public"]</strong> <i>Or</i><br>
    b) Go to Dashboard->Appearance->Widgets. Click on widget Email subscribers and click Add Widget button or drag it to the sidebar on the right <i>Or</i><br>
    c) Copy and past this php code to your desired template location : <strong>'. $subbox_code .'</strong>', ES_TDOMAIN ); ?>
    Thread Starter Natali_Z

    (@natali_z)

    FILE …/job/es-optin.php

    Line 14-40
    Added <!DOCTYPE html>, attribute language in <html> and the style corresponding to the standard WP message pages:

        <!DOCTYPE html>
    	<html <?php language_attributes(); ?>>
    	<head>
    		<title><?php echo $blogname; ?></title>
    		<meta http-equiv="refresh" content="10; url=<?php echo $home_url; ?>" charset="<?php echo esc_attr( get_option( 'blog_charset' ) ); ?>" />
    		<?php do_action( 'es_message_head' ); ?>
            <style type="text/css">
                html {
                    background: #f1f1f1;
                }
                body {
                    margin: 50px auto;
                    padding: 1em 2em;
                    max-width: 700px;
                    font-family: "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
                    color: #444;
                    background: #fff;
                    -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13);
                    box-shadow: 0 1px 3px rgba(0,0,0,0.13);
                }
                .es_successfully_subscribed {
                    margin: 25px 0 20px;
                    font-size: 14px;
                    line-height: 1.5;
                }
            </style>
    	</head>

    Similarly in FILE …/job/es-unsubscribe.php

    I don’t know what do you mean exactly. Some translation issues that I noticed using “Loco Translation” and “ES Newsletter plugin” and my code looks like the following:

    function es_load_script_fn() {
    	wp_enqueue_script( 'es-script', get_template_directory_uri() . '/js/es-script.js', array( 'jquery' ), false, true );
    
    	$ac_select_params = array(
    		'es_email_notice'       => _x( 'Please enter an email address.', 'widget-page-enhanced-select', 'ac_theme' ),
    		'es_incorrect_email'    => _x( 'Oops! Please provide a valid email address.', 'widget-page-enhanced-select', 'ac_theme' ),
    		'es_load_more'          => _x( 'loading...', 'widget-page-enhanced-select', 'ac_theme' ),
    		'es_ajax_error'         => _x( 'Cannot create XMLHTTP instance.', 'widget-page-enhanced-select', 'ac_theme' ),
    		'es_success_message'    => _x( 'Successfully Subscribed', 'widget-page-enhanced-select', 'ac_theme' ),
    		'es_success_notice'     => _x( 'Thank You! Subscribed successfully.', 'widget-page-enhanced-select', 'ac_theme' ),
    		'es_email_exists'       => _x( 'Email Address already exists!', 'widget-page-enhanced-select', 'ac_theme' ),
    		'es_error'              => _x( 'Unexpected error occurred.', 'widget-page-enhanced-select', 'ac_theme' ),
    		'es_invalid_email'      => _x( 'Invalid email address.', 'widget-page-enhanced-select', 'ac_theme' ),
    		'es_try_later'          => _x( 'Please try after some time.', 'widget-page-enhanced-select', 'ac_theme' ),
    		'es_problem_request'    => _x( 'There was a problem with the request.', 'widget-page-enhanced-select', 'ac_theme' )
    	);
    	wp_localize_script( 'es-script', 'ac_es_notices', $ac_select_params );		
    }
    add_action( 'wp_enqueue_scripts', 'es_load_script_fn' );

    Hopes that helps you with something.

    With this in mind we have the following string “ES_TDOMAIN” try to change it with your theme “Text Domain: mytextdomain” from “style.css” and “functions.php” to have the following script :

    /*
     * Make theme available for translation.
     */
    load_theme_textdomain( 'ac_theme', get_template_directory() . '/languages' );

    If you want to know more, let me know about it on my github account to show you an example of overriding the es widget plugin. Good Luck !

    • This reply was modified 6 years, 9 months ago by Dan Anghel.
    Thread Starter Natali_Z

    (@natali_z)

    FILE …/sendmail/sendmail.php
    No preparation for translation: line: 17-19 and line 514 – ” – Cron Email scheduled”.

    FILE …/sentmail/sentmail-show.php
    Replacement JPG on dashicons:
    Line 149

    <a href="<?php echo ES_ADMINURL; ?>?page=es-sentmail&ac=preview&did=<?php echo $data['es_sent_id']; ?>&pagenum=<?php echo $pagenum; ?>">
        <span class="dashicons dashicons-search"></span>
    </a>

    Line 176

    <a onClick="javascript:_es_delete('<?php echo $data['es_sent_id']; ?>')" href="javascript:void(0);">
        <span class="dashicons dashicons-no"></span>
    </a>

    FILE …settings/settings-edit.php
    Line 380, fix a typo: cPanal -> cPanel

    FILE …/subscribers/view-subscriber-show.php
    Line 403
    delete title, it was not necessary, and it is not adjacent links

    
    <a href="<?php echo ES_ADMINURL; ?>?page=es-view-subscribers&ac=edit&did=<?php echo $data['es_email_id']; ?>">
    Thread Starter Natali_Z

    (@natali_z)

    FILE …/job/es-optin.php
    Line 14-40
    Added <!DOCTYPE html>, attribute language (<?php language_attributes(); ?>) in <html> and the style corresponding to the standard WP message pages in <head>`:

        <style type="text/css">
            html {
                background: #f1f1f1;
            }
            body {
                margin: 50px auto;
                padding: 1em 2em;
                max-width: 700px;
                font-family: Arial, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
                color: #444;
                background: #fff;
                -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13);
                box-shadow: 0 1px 3px rgba(0,0,0,0.13);
            }
            .es_successfully_subscribed {
                margin: 25px 0 20px;
                font-size: 14px;
                line-height: 1.5;
            }
        </style>

    Similarly in FILE …/job/es-unsubscribe.php

    See here. This is how you click on the link to confirm your subscription.

    Thread Starter Natali_Z

    (@natali_z)

    And the last. It seems to me that it is necessary to check the entire array of texts that need translation in order to eliminate duplicate lines.
    The difference in the presence of a point or in the register of some letters. For example,

    Error: Special characters ([‘^$%&*()}{@#~?><>,|=_+\”]) are not allowed in the Group name. – subscribers/view-subscriber-add.php: 56
    Error: Special characters ([‘^$%&*()}{@#~?><>,|=_+\”]) are not allowed in the group name. – subscribers/view-subscriber-import.php: 44

    Please select subscribers group – notification/notification-edit.php: 49
    Please select subscribers group. – notification/notification-add.php: 33

    Plugin Author Icegram

    (@icegram)

    We’ll look into this.

    Thread Starter Natali_Z

    (@natali_z)

    Ok.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Some errors and suggestions’ is closed to new replies.