### Summary

Problem detected on community.grafana collection.
The CI fails because of the following error:
```
ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
```

[Link to the github actions logs](https://github.com/ansible-collections/community.grafana/runs/7376131642?check_suite_focus=true).

Edit: I edited my workflow to let all the job run and disable fail-fast. It makes it visible that issue only happens on devel:
https://github.com/ansible-collections/community.grafana/runs/7376236257?check_suite_focus=true

### Issue Type

Bug Report

### Component Name

core ?

### Ansible Version

```console
devel

(`pip install https://github.com/ansible/ansible/archive/devel.tar.gz`)
```


### Configuration

```console
N/A
```


### OS / Environment

ubuntu 20.04.4

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
On `community.grafana` collection
```yaml (paste below)
ansible-test integration -v --color --retry-on-error --requirements --python 3.8 --continue-on-error --diff --coverage
```



### Expected Results

No error related to locale.

### Actual Results

```console
ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
"""
    Load plugins of the specified type and track them in the specified database.
    Only plugins which have already been imported will be loaded.
    """
    plugins = dict((sc.__module__.rsplit('.', 1)[1], sc) for sc in get_subclasses(base_type))  
    for plugin in plugins:
        database[plugin] = plugins[plugin]
def load_module(path, name):  
    """Load a Python module using the given name and path."""
    if name in sys.modules:
        return
    spec = importlib.util.spec_from_file_location(name, path)
    module = importlib.util.module_from_spec(spec)
    sys.modules[name] = module
    spec.loader.exec_module(module)
def sanitize_host_name(name):
    """Return a sanitized version of the given name, suitable for use as a hostname."""
    return re.sub('[^A-Za-z0-9]+', '-', name)[:63].strip('-')
def get_generic_type(base_type, generic_base_type):  
    """Return the generic type arg derived from the generic_base_type type that is associated with the base_type type, if any, otherwise return None."""
    
    type_arg = t.get_args(base_type.__orig_bases__[0])[0]
    return None if isinstance(type_arg, generic_base_type) else type_arg
def get_type_associations(base_type, generic_base_type):