Support » Plugin: GEO my WordPress » Hard-coded language strings in Post Locator Plug-In

  • Resolved d9media

    (@d9media)


    At row 66 of gmw_search_form_post_types method in GMW_PT_Search_Form_Helper (located in wp-content/plugins/geo-my-wp/plugins/posts-locator/includes/gmw-posts-locator-search-form-template-functions.php) there are multiple instances of hard-coded strings.

    $options_all = 'All ' . esc_html( $taxonomy->labels->name );
    $placeholder = 'Select ' . esc_html( $taxonomy->labels->name );

    Since these are wrapped within a class and no filters are being used, it is impossible to alter these easily in an update-safe manner. Therefore I propose the following changes:

    $options_all = __( 'All', 'geo-my-wp' ) . ' ' . esc_html( $taxonomy->labels->name );
    $placeholder =__( 'Select' ) . ' ' . esc_html( $taxonomy->labels->name );

    “All” is already translated in GeoWP so that will work right away. Select has to be added to a translation file or a WP namespace may be used:

    #: wp-includes/media.php:3638 wp-includes/js/dist/edit-post.js:728
    msgid "Select"
    msgstr "Auswählen"

    (see line 15480 of wordpress POT file)

    Please consider patching this for the next release.

    • This topic was modified 1 year, 3 months ago by d9media.
    • This topic was modified 1 year, 3 months ago by d9media.
  • The topic ‘Hard-coded language strings in Post Locator Plug-In’ is closed to new replies.