generatepress.1.2.2 — wrong translation-functions in searchform.php
-
Hi,
I just found out, that there’s a new translation-parameter called
msgctxt
.
It’s being used by new translation-functions like_x();
(unique string?)_ex();
(multiple occurence of one string?)_nx();
(multiple different strings?).
The normal translation-function
__();
does not expect themsgctxt
-parameter.Now the problem:
The normal__();
-function is used insearchform.php
, but the.pot
, respectively.mo
-files are offeringmsgctxt
-values at this point.
The problem only occurs insearchform.php
at 4 places.This modification of the code, using the new functions and values (at least) worked for me (no guarantee for 100% correct syntax):
(
msgctxt
is the second parameter)<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>"> <label> <span class="screen-reader-text"><?php apply_filters( 'generate_search_label', _ex( 'Search for:', 'label', 'generate' ) ); ?></span> <input type="search" class="search-field" placeholder="<?php echo apply_filters( 'generate_search_placeholder', _x( 'Search …', 'placeholder', 'generate' ) ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" title="<?php apply_filters( 'generate_search_label', _ex( 'Search for:', 'label', 'generate' ) ); ?>"> </label> <input type="submit" class="search-submit" value="<?php echo apply_filters( 'generate_search_button', _x( 'Search', 'submit button', 'generate' ) ); ?>"> </form>
Hope it helps 🙂
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘generatepress.1.2.2 — wrong translation-functions in searchform.php’ is closed to new replies.