update the route name to the route key if the key is a string