Changing Login Text Username or Email Address

Having disabled email addresses for WordPress login I wanted to change the text, which was shown.

On the login dialogue it was showing

Username or Email Address

above the first textbox.

The mention of Email Address was now wrong and misleading.

To do this I added the following to the functions.php file

add_filter( 'gettext', 'vntweb_user_login' );
add_filter( 'ngettext', 'vntweb_user_login' );
function vntweb_user_login( $translated ) {
  $translated = str_ireplace( 'Username or Email Address', 'Username', $translated );
  return $translated;
}

With updates to the version of WordPress I have observed the text used change. Consequently the string replacement match fails.

I changed the match text to reflect the change. another update to the WordPress core and the text was back as before. Maybe I ought to have both variations covered.