• Resolved hamarkhis

    (@hamarkhis)


    Hello,

    I have noticed that the French translation is incomplete.

    The fields “Name” and “Credit card…” need to be translated in the popup.

    https://snipboard.io/RD9Qjy.jpg

    I can solve the issue by changing the line

    <label for="billing_name"><?php echo esc_html( _x( 'Name', 'Customer name', 'stripe-payments' ) ); ?></label>

    to something else.

    Same for

    <label for="card-element"><?php esc_html_e( 'Credit card or debit card', 'stripe-payments' ); ?></label>

    I don’t know where I can add_filter to change the translation without changing the code in the plugin. Tried Loco translate, but that does not work, it says that for French language we have everything already translated.

    Tried to filter with

    add_filter( 'gettext', function($translated_text, $text, $domain) {
    	
    	switch ( $translated_text ) {
    		case 'Name' :
    			$translated_text = 'Votre nom';
    			break;
    			
    		//other translations...
    	}
    	return $translated_text;
    	
    }, 20, 3 );

    but that does not work either.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter hamarkhis

    (@hamarkhis)

    Solved with
    gettext_with_context and gettext filters.

    Strange that I had to to this whereas these fields do not appear in the loco translate.

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    Hi.

    Translation is incomplete whereas it says 100%

    Unfortunately, this is something we barely can control. Translations on WordPress need to be confirmed by the editors in order to be available for the plugin. And this process might take time, that’s why such situations can happen.

    Tried Loco translate, but that does not work, it says that for French language we have everything already translated.

    Are you using the latest plugin version 2.0.26? It has the issue with Loco Translate fixed, so those fields can be translated just fine.Tried Loco translate, but that does not work, it says that for French language we have everything already translated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Translation is incomplete whereas it says 100%’ is closed to new replies.