I've seen different ways of doing making a text with a hyperlink translatable. However, I have been unable to find a single best practice.
So, here are some of the solutions I found:
// METHOD 1
sprintf( __( 'Please read %1$sthis%2$s.', 'tacoverdo-example-domain' ), '<a target="_blank" href="' . esc_url( 'https://goo.gl' ) . '">', '</a>' );
// METHOD 2
echo '<a target="_blank" href="' . esc_url( 'https://goo.gl' ) . '">';
_e( 'Please read this.', 'tacoverdo-example-domain' );
echo '</a>';
// METHOD 3
sprintf( __( 'Please read <a href="%s">this</a>.', 'tacoverdo-example-domain' ), esc_url( 'https://goo.gl' ) );
// METHOD 4
sprintf( __( 'Please read %sthis%s.', 'tacoverdo-example-domain' ), '<a target="_blank" href="' . esc_url( 'https://goo.gl' ) . '">', '</a>' );
// METHOD 5
_e( 'Please read <a target="_blank" href="' . esc_url( 'https://goo.gl' ) . '">this</a>', 'tacoverdo-example-domain' );
My first thought would be that method 1 would be best. It does not require your translators to know HTML. But it also doesn't allow the ones that do to mess with it. It is also quite DRY (Don't Repeat Yourself) since you don't have to translate the whole HTML-part over and over again.
However, when posting this question on twitter, people replied that method 3 would be best as you can see here.
So, how should I make a text with hyperlink translatable in WordPress?