I would like to change the title of the Edit contextual links for blocks.
First: I have tried starting with the example at https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Menu%21menu.api.php/function/hook_contextual_links_alter/9.3.x and placing this in my module with my correct hook.
However that actually makes all of my contextual links disappear. An error message is in the console:
POST https://mysite/contextual/render 500 (500 Service unavailable (with message))
(In fact, I can’t get anything to happen with hook_contextual_links_alter(). Either there is no change, or the contextual links all disappear.)
Second: I have also tried the example here: https://www.drupal.org/docs/drupal-apis/menu-api/providing-module-defined-contextual-links#s-customising-contextual-link-behaviour
But I don’t know what to replace example
with for the Edit item for blocks.
Third: I am aware that contextual links are cached hard and feel sure I’m effectively clearing my cache to test.