As shown in the answer to the duplicate question you can use template_preprocess_menu_local_task
from a custom theme or hook_preprocess_HOOK
from a custom module to override the tabs.
If you want to do it right, you also set the page title and the HTML title to display the same strings. Maybe keep things DRY and get the $target_routes
array from a small helper function.
First the tabs:
/**
* Implements hook_preprocess_HOOK().
*/
function MYMODULE_preprocess_menu_local_task(&$variables) {
$target_routes = [
'user.login' => t('sign in'),
'user.register' => t('sign up'),
'user.pass' => t('reset account'),
];
$current_route = \Drupal::routeMatch()->getRouteName();
if (isset($target_routes[$current_route])) {
/** @var \Drupal\Core\Url $url */
$url = $variables['link']['#url'];
$route_name = $url->getRouteName();
$variables['link']['#title'] = $target_routes[$route_name];
}
}
Then the page title:
/**
* Implements hook_preprocess_HOOK().
*/
function MYMODULE_preprocess_page_title(&$variables) {
$target_routes = [
'user.login' => t('sign in'),
'user.register' => t('sign up'),
'user.pass' => t('reset account'),
];
$current_route = \Drupal::routeMatch()->getRouteName();
if (isset($target_routes[$current_route])) {
$variables['title'] = $target_routes[$current_route];
}
}
And finally the HTML title:
/**
* Implements hook_preprocess_HOOK().
*/
function MYMODULE_preprocess_html(&$variables) {
$target_routes = [
'user.login' => t('sign in'),
'user.register' => t('sign up'),
'user.pass' => t('reset account'),
];
$current_route = \Drupal::routeMatch()->getRouteName();
if (isset($target_routes[$current_route])) {
$variables['head_title']['title'] = $target_routes[$current_route];
}
}