WeblateOrg / WeblateOrg/weblate
generated MO file is not deleted when its translation is removed
- Dominant language
- Python
- Stars
- 6.1k
- Forks
- 1.4k
- Avg merge
- 9h 53m
- Merged PRs (30d)
- 395
Description
### Describe the issue
With `weblate.gettext.mo` enabled, if a translation is added and subsequently removed, only its `.po` file, not its generated `.mo` file, is removed from the repository.
### I already tried
- [X] I've read and searched [the documentation](https://docs.weblate.org/).
- [X] I've searched for similar issues in this repository.
### Steps to reproduce the behavior
In a VCS-backed component from which Weblate pushes changes via pull request:
1. Add a new language `eo`.
2. Observe that `eo`'s `.po` and generated `.mo` files are pushed and present in the pull request.
3. Remove `eo`.
### Expected behavior
Both `eo`'s `.po` file and its generated `.mo` file are no longer present in the pull request.
### Screenshots
_No response_
### Exception traceback
_No response_
### How do you run Weblate?
Docker container
### Weblate versions
docker-compose exec --user weblate weblate weblate list_versions
```
* Weblate: 4.14.1
* Django: 4.1.1
* siphashc: 2.1
* translate-toolkit: 3.7.3
* lxml: 4.9.1
* Pillow: 9.2.0
* bleach: 5.0.1
* python-dateutil: 2.8.2
* social-auth-core: 4.3.0
* social-auth-app-django: 5.0.0
* django-crispy-forms: 1.14.0
* oauthlib: 3.2.1
* django-compressor: 4.1
* djangorestframework: 3.13.1
* django-filter: 22.1
* django-appconf: 1.0.5
* user-agents: 2.2.0
* filelock: 3.8.0
* rapidfuzz: 2.8.0
* openpyxl: 3.0.10
* celery: 5.2.7
* kombu: 5.2.4
* translation-finder: 2.14
* weblate-language-data: 2022.7
* html2text: 2020.1.16
* pycairo: 1.21.0
* pygobject: 3.42.2
* diff-match-patch: 20200713
* requests: 2.28.1
* django-redis: 5.2.0
* hiredis: 2.0.0
* sentry_sdk: 1.9.8
* Cython: 0.29.32
* misaka: 2.1.1
* GitPython: 3.1.27
* borgbackup: 1.2.2
* pyparsing: 3.0.9
* pyahocorasick: 1.4.4
* python-redis-lock: 3.7.0
* charset-normalizer: 2.1.1
* Python: 3.10.7
* Git: 2.30.2
* psycopg2: 2.9.3
* psycopg2-binary: 2.9.3
* phply: 1.2.5
* ruamel.yaml: 0.17.21
* tesserocr: 2.5.2
* boto3: 1.24.73
* zeep: 4.1.0
* aeidon: 1.11
* iniparse: 0.5
* mysqlclient: 2.1.1
* Mercurial: 6.2.2
* git-svn: 2.30.2
* git-review: 2.3.1
* Redis server: 4.0.14
* PostgreSQL server: 13.10
* Database backends: django.db.backends.postgresql
* Cache backends: default:RedisCache, avatar:FileBasedCache
* Email setup: django.core.mail.backends.smtp.EmailBackend: smtp.mailgun.org
* OS encoding: filesystem=utf-8, default=utf-8
* Celery: redis://localhost:6379/1, redis://localhost:6379/1, regular
* Platform: Linux 5.10.0-21-amd64 (x86_64)
```
### Weblate deploy checks
docker-compose exec --user weblate weblate weblate check --deploy
```
System check identified some issues:
INFOS:
?: (weblate.I021) Error collection is not set up, it is highly recommended for production use
HINT: https://docs.weblate.org/en/weblate-4.14.1/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.14.1/admin/backup.html
?: (weblate.I031) New Weblate version is available, please upgrade to 4.16.3.
HINT: https://docs.weblate.org/en/weblate-4.14.1/admin/upgrade.html
System check identified 3 issues (1 silenced).
```
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.