• Resolved Alex Lion (阿力獅)

    (@alexclassroom)


    There are 2 types of I18N issues for this plugin.
    1. UI strings with wrong text domain. This causes the localized UI strings cannot to display correctly.
    2. UI strings without I18N code. This causes te UI strings cannot to be translated.

    I don’t find the GitHub repository of this plugin, so I post the modifications as the following. (Based on version 1.0.3)

    \includes\class-cf7-to-any-api-log-list-table.php
    Line 14 and 15

    'singular'  => __( 'cf7anyapi_logs', 'contact-form-to-any-api' ),     //singular name of the listed records
    'plural'    => __( 'cf7anyapi_logs', 'contact-form-to-any-api' ),   //plural name of the listed records

    Line 37 to 40

    'form_id' => __( 'Form Name', 'contact-form-to-any-api' ),
    'post_id' => __( 'API Name', 'contact-form-to-any-api' ),
    'log' => __( 'Log', 'contact-form-to-any-api' ),
    'created_date' => __( 'Created Date', 'contact-form-to-any-api' )

    admin\partials\cf7-to-any-api-admin-display-docs.php
    Line 2
    <h2><?php esc_html_e( 'CF7 To Any API Documentation', 'contact-form-to-any-api' ); ?></h2>

    Line 4
    <p><?php esc_html_e( 'IN JSON format we are support below format', 'contact-form-to-any-api' ); ?></p>

    Line 13 to 16

    <p><?php esc_html_e( 'The First thing is Select your relevant Contact form using dropdown', 'contact-form-to-any-api' ); ?></p>
    <p><?php esc_html_e( 'As per your selection you can see all populated fields are dynamically show in map area', 'contact-form-to-any-api' ); ?></p>
    <p><?php esc_html_e( 'Enter your API URL in API URL field', 'contact-form-to-any-api' ); ?></p>
    <p><?php esc_html_e( 'Header Request field set you all header parameter in this field', 'contact-form-to-any-api' ); ?></p>

    Line 25 to 27

    <p><?php esc_html_e( 'Select your Request Type is GET, POST or JSON type', 'contact-form-to-any-api' ); ?></p>
    <p><?php esc_html_e( 'Then Select your Request Method GET OR POST', 'contact-form-to-any-api' ); ?></p>
    <p><?php esc_html_e( 'If you want set any other data like that is mandatory for your Request and user don\'t fill that field then you have to create that field in your hidden field and set that parameter name as it is.', 'contact-form-to-any-api' ); ?></p>

    admin\partials\cf7-to-any-api-admin-display.php
    Line 62
    <label for="cf7anyapi_selected_form"><?php esc_html_e( 'Select Contact Form', 'contact-form-to-any-api' ); ?></label>

    Line 64
    <option value=""><?php esc_html_e( 'Select Form', 'contact-form-to-any-api' ); ?></option>

    Line 82 and 83

    <label for="cf7anyapi_base_url"><?php esc_html_e( 'API url', 'contact-form-to-any-api' ); ?></label>
    <input type="text" id="cf7anyapi_base_url" name="cf7anyapi_base_url" value="<?php echo esc_url($cf7anyapi_base_url); ?>" placeholder="<?php esc_attr_e( 'Enter Your API URL', 'contact-form-to-any-api' ); ?>" required>

    Line 87 to 93

    <label for="cf7anyapi_header_request"><?php esc_html_e( 'Header Request', 'contact-form-to-any-api' ); ?></label>
    <textarea id="cf7anyapi_header_request" name="cf7anyapi_header_request" placeholder="<?php esc_attr_e( 'Authorization: MY_API_KEY 
    Authorization : Bearer xxxxxxx
    Authorization : Basic xxxxxx
    Content-Type: application/json
    
    All your header Parameters set here.', 'contact-form-to-any-api' ); ?>

    Line 98
    <label for="cf7anyapi_input_type"><?php esc_html_e( 'Input type', 'contact-form-to-any-api' ); ?></label>

    Line 100 and 101

    <option value="params" <?php echo ($cf7anyapi_input_type == 'params' ? esc_html('selected="selected"') : ''); ?>><?php esc_html_e( 'Parameters - GET/POST', 'contact-form-to-any-api' ); ?></option>
    <option value="json" <?php echo ($cf7anyapi_input_type == 'json' ? esc_html('selected="selected"') : ''); ?>><?php esc_html_e( 'json', 'contact-form-to-any-api' ); ?></option>

    Line 106
    <label for="cf7anyapi_method"><?php esc_html_e( 'Method', 'contact-form-to-any-api' ); ?></label>

    Line 108
    <option value=""><?php esc_html_e( 'Select Method', 'contact-form-to-any-api' ); ?></option>

    Line 115
    <h3><?php esc_html_e( 'Map your Fields', 'contact-form-to-any-api' ); ?></h3>

    Line 124
    <input type="text" id="cf7anyapi_<?php echo esc_html($cf7anyapi_form_field_key); ?>" name="cf7anyapi_form_field[<?php echo esc_html($cf7anyapi_form_field_key); ?>]" value="<?php echo esc_html($cf7anyapi_form_field_value); ?>" placeholder="<?php esc_attr_e( 'Enter Mapping Key Field Name', 'contact-form-to-any-api' ); ?>">

    admin\class-cf7-to-any-api-admin.php
    Line 130 to 140

    'name' => _x('CF7 to API', 'plural', 'contact-form-to-any-api'),
    'singular_name' => _x('cf7 to api', 'singular', 'contact-form-to-any-api'),
    'menu_name' => _x('CF7 to Any API', 'admin menu', 'contact-form-to-any-api'),
    'name_admin_bar' => _x('CF7 to Any API', 'admin bar', 'contact-form-to-any-api'),
    'add_new' => _x('Add New CF7 API', 'add new', 'contact-form-to-any-api'),
    'add_new_item' => __('Add New CF7 API', 'contact-form-to-any-api'),
    'new_item' => __('New CF7 API', 'contact-form-to-any-api'),
    'edit_item' => __('Edit CF7 API', 'contact-form-to-any-api'),
    'view_item' => __('View CF7 API', 'contact-form-to-any-api'),
    'all_items' => __('All CF7 API', 'contact-form-to-any-api'),
    'not_found' => __('No CF7 API found.', 'contact-form-to-any-api'),

    Line 168
    __( 'Contact Form 7 Any Api Setting', 'contact-form-to-any-api' ),

    Line 182 and 183

    __('Logs', 'contact-form-to-any-api'),
    __('Logs', 'contact-form-to-any-api'),

    Line 191 and 192

    __('Documentation', 'contact-form-to-any-api'),
    __('Documentation', 'contact-form-to-any-api'),

    Line 206
    echo '<div class="wrap"><h2>' . __( 'CF7 To Any API Log Data', 'contact-form-to-any-api' ) . '</h2>';

    Line 278
    $html .= '<input type="text" id="cf7anyapi_'.$form_fields_value->raw_name.'" name="cf7anyapi_form_field['.$form_fields_value->name.']" placeholder="'. __( 'Enter Mapping Key Field Name', 'contact-form-to-any-api' ). '">';

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘I18n Issues’ is closed to new replies.