• Resolved Alex Lion (阿力獅)

    (@alexclassroom)


    Hi

    If there are strings in your plugin that are also used in WordPress core (e.g. ‘Settings’), you should still add your own text domain to them, otherwise, they’ll become untranslated if the core string changes (which happens).
    Please refer to official L10N guide from here.

    The modified codes are the following:
    posts-filter-multiselect.php
    Line 339 to 340

    '<li><a class="ui-multiselect-all" href="#"><span class="ui-icon ui-icon-check"></span><span><?php _e( 'Select all', 'posts-filter-multiselect' ); ?></span></a></li>' +
    '<li><a class="ui-multiselect-none" href="#"><span class="ui-icon ui-icon-closethick"></span><span><?php _e( 'Deselect', 'posts-filter-multiselect' ); ?></span></a></li>' +

    Line 607 to 608

    checkAllText: '<?php _e( 'Select all', 'posts-filter-multiselect' ); ?>',
    uncheckAllText: '<?php _e( 'Deselect', 'posts-filter-multiselect' ); ?>',

    Line 698 to 699

    'show_option_all' => __( $labels->all_items, 'posts-filter-multiselect' ),
    'show_option_none' => __( $labels->no_terms, 'posts-filter-multiselect' ),

    Line 709
    echo '<label class="screen-reader-text" for="tag__in">' . __( 'Filter by tag', 'posts-filter-multiselect' ) . '</label>';

    Line 747
    $unknown_name = sprintf( __( '? Unknown %d', POSTS_FILTER_MULTISELECT_DOMAIN, 'posts-filter-multiselect' ), $author_id );

    Line 769
    $output = '<label class="screen-reader-text" for="author__in">' . esc_html( __( 'Filter by author', 'posts-filter-multiselect' ) ) . '</label>';

    Line 771
    $output .= "\t<option value=\"0\">" . esc_html( __( 'All Authors', POSTS_FILTER_MULTISELECT_DOMAIN, 'posts-filter-multiselect' ) ) . "</option>\n";

    Line 815
    $posts_columns['modified'] = __( 'Modified', POSTS_FILTER_MULTISELECT_DOMAIN, 'posts-filter-multiselect' );

    Line 859
    $datetime = mysql2date( __( 'Y/m/d g:i:s a', 'posts-filter-multiselect' ), $post->post_modified, false );

    Line 863
    $h_time = sprintf( __( '%s ago', 'posts-filter-multiselect' ), human_time_diff( $time ) );

    Line 865
    $h_time = mysql2date( __( 'Y/m/d', 'posts-filter-multiselect' ), $post->post_modified );

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author tmatsuur

    (@tmatsuur)

    Thanks @alexclassroom

    I am aware of your points.

    I would like to make sure that the translation content does not change before and after the plugin is installed.

    This is because I do not like the idea of one original text being translated into another in various themes and plugins.

    Of course, depending on the situation where the original text is used, it may be better to change the wording, but as a general rule, I think it is better to have uniform translation content.

    These are personal thoughts and may be outside of the guidelines.

    Thank you again for your interest in my plugin.

    Thread Starter Alex Lion (阿力獅)

    (@alexclassroom)

    In actual situatuon, if current strings shared with WordPress core are changed, your plugin string can’t get translatuon from core.

    For example, if “Select all” becomes “Select All” (Capital A) in core, plugin’s current string can’t get translation from core.

    This means if this plugin still wants to get translatuon from core, developer needs to modify UI string to be same with core, and this kind of change will make developer tired.

    Return to the point of consistant translations, I am one of zh_TW GTE and regularly check the translatuons of same strings between core, plugins and themes are consistant even if case-sensitive is different.

    But I only can guarantee zh_TW.

    Plugin Author tmatsuur

    (@tmatsuur)

    In actual situatuon, if current strings shared with WordPress core are changed, your plugin string can’t get translatuon from core.

    For example, if “Select all” becomes “Select All” (Capital A) in core, plugin’s current string can’t get translation from core.

    I have experienced a few times that I was unable to retrieve the translated text at the time of the upgrade.

    I have created and updated several plugins over the last 10 years and only a few times in this period have I not gotten the core translated text.

    I can tolerate this level of frequency.

    This means if this plugin still wants to get translatuon from core, developer needs to modify UI string to be same with core, and this kind of change will make developer tired.

    I understand your point, but I personally don’t consider it to be that tedious a task.

    However, when upgrading, there is a slight delay in updating the translation files for each language, and I am somewhat frustrated that the checking process is not as easy as I would like it to be.

    If pot files for core and admin were included with the beta release, this complaint would be resolved, but this may not be realistic.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I18N Issue’ is closed to new replies.