Unable to assign a custom language to a project
As a user I need to add a custom language: French (Senegal)
To do that I had to register the language (I used the same values as for french etc.)
Then I try to assign this language to the project:

And then:
Error (monkey are trying to fix it...)
Expected behavior
It works like for any other languages
Server configuration and status
docker-compose exec --user weblate weblate weblate list_versions
* Weblate: 4.4.2
* Django: 3.1.5
* siphashc: 2.1
* Whoosh: 2.7.4
* translate-toolkit: 3.3.0
* lxml: 4.6.2
* Pillow: 8.1.0
* bleach: 3.2.1
* python-dateutil: 2.8.1
* social-auth-core: 4.0.3
* social-auth-app-django: 4.0.0
* django-crispy-forms: 1.10.0
* oauthlib: 3.1.0
* django-compressor: 2.4
* djangorestframework: 3.12.2
* django-filter: 2.4.0
* django-appconf: 1.0.4
* user-agents: 2.2.0
* filelock: 3.0.12
* setuptools: 40.8.0
* jellyfish: 0.8.2
* openpyxl: 3.0.5
* celery: 5.0.5
* kombu: 5.0.2
* translation-finder: 2.7
* weblate-language-data: 2020.13
* html2text: 2020.1.16
* pycairo: 1.16.2
* pygobject: 3.30.4
* diff-match-patch: 20200713
* requests: 2.25.1
* django-redis: 4.12.1
* hiredis: 1.1.0
* sentry_sdk: 0.19.5
* Cython: 0.29.21
* misaka: 2.1.1
* GitPython: 3.1.12
* borgbackup: 1.1.15
* pyparsing: 2.4.7
* Python: 3.7.3
* Git: 2.20.1
* psycopg2: 2.8.6
* psycopg2-binary: 2.8.6
* phply: 1.2.5
* chardet: 4.0.0
* ruamel.yaml: 0.16.12
* tesserocr: 2.5.1
* akismet: 1.1
* boto3: 1.16.54
* zeep: 4.0.0
* aeidon: 1.9
* iniparse: 0.5
* mysqlclient: 2.0.3
* Mercurial: 5.6.1
* git-svn: 2.20.1
* git-review: 1.28.0
* Redis server: 4.0.14
* PostgreSQL server: 9.6.15
* Database backends: django.db.backends.postgresql
* Cache backends: default:RedisCache, avatar:FileBasedCache
* Email setup: django.core.mail.backends.smtp.EmailBackend: mail.company.com
* OS encoding: filesystem=utf-8, default=utf-8
* Celery: redis://cache:6379/1, redis://cache:6379/1, regular
* Platform: Linux 4.9.0-9-amd64 (x86_64)
Weblate deploy checks
System check identified some issues:
WARNINGS:
?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.
?: (security.W008) Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.
?: (security.W012) SESSION_COOKIE_SECURE is not set to True. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.
INFOS:
?: (weblate.I021) Error collection is not set up, it is highly recommended for production use
HINT: https://docs.weblate.org/en/weblate-4.4.2/admin/install.html#collecting-errors
?: (weblate.I028) Backups are not configured, it is highly recommended for production use
HINT: https://docs.weblate.org/en/weblate-4.4.2/admin/backup.html
System check identified 5 issues (1 silenced).
Additional context
I could not find any log about that... I just get this error page which says about monkey but no reason for what it did that anywhere... any help is welcome.
The exception should be visible in the docker logs (and sent to admins in case email sending is configured and admin email set).
Most likely it's caused by missing plural definitions on the custom language. How did you create it?
This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger. In case your question is already answered, making a donation is the right way to say thank you!
Here is the values I have for this language which are the same as I have for swiss french which works fine:

For the errors I will check my emails but seems I don't get them
Ok after some troubleshooting I discovered the issue:
(we had already a file in the repo called fr-SN.json and weblate said it could not add a translation because the file was already there.
(maybe it should add it and considere that we have the translation already?)
And then I renamed it into fr-SN.bkp, clicked on weblate to add the new translation to the project -> weblate created a file fr_SN.json and was happy with that.
Then I removed it and replaced with fr-SN.json and it worked.
So I think the issue is with the names of the files and also that weblate don't like if the translation file is present without him to be aware of it.
The issue you have reported is resolved now. If you don鈥檛 feel it鈥檚 right, please follow it鈥檚 labels to get a clue and take further steps.
Weblate should handle the existing file situation gracefully. Did you get the exception from the logs? I'd like to take a look at it to fix the behavior in such case...
In case my guess is correct it should be fixed by 3adf516e49800ef60d8b86a177e8e0868f060c0e, but I'd like to confirm that.
Thank you for your report, the issue you have reported has just been fixed.
Most helpful comment
In case my guess is correct it should be fixed by 3adf516e49800ef60d8b86a177e8e0868f060c0e, but I'd like to confirm that.