Adding a new language does not take into account keys from pending chnages
gzm0 opened this issue · comments
Describe the issue
When adding a new language, pending source keys are not taken into account (only committed source keys).
I already tried
- I've read and searched the documentation.
- I've searched for similar filed issues in this repository.
Steps to reproduce the behavior
- Create an empty component in a monolingual format (I tested with android resource and java properties)
- Add translation key
test
to English. - Commit pending changes.
- Add translation key
test2
to English. - Add a new language
- Click on the "Browse" view of the new language
- Only the key
test
appears.
Expected behavior
The key test
and test2
appears
Screenshots
No response
Exception traceback
No response
How do you run Weblate?
Docker container
Weblate versions
Running from main with ./startdev.sh
. Commit: c2ba348
* Weblate: 5.7-b572d4dff6
* Django: 5.0.6
* siphashc: 2.4.1
* translate-toolkit: 3.13.1
* lxml: 5.2.2
* pillow: 10.3.0
* nh3: 0.2.17
* python-dateutil: 2.9.0.post0
* social-auth-core: 4.5.4
* social-auth-app-django: 5.4.1
* django-crispy-forms: 2.2
* oauthlib: 3.2.2
* django_compressor: 4.5
* djangorestframework: 3.15.2
* django-filter: 24.2
* django-appconf: 1.0.6
* user-agents: 2.2.0
* filelock: 3.15.4
* rapidfuzz: 3.9.4
* openpyxl: 3.1.5
* celery: 5.4.0
* django-celery-beat: 2.6.0
* kombu: 5.3.7
* translation-finder: 2.16
* weblate-language-data: 2024.5
* html2text: 2024.2.26
* pycairo: 1.26.1
* PyGObject: 3.48.2
* diff-match-patch: 20230430
* requests: 2.32.3
* django-redis: 5.4.0
* hiredis: 2.3.2
* sentry-sdk: 2.7.1
* Cython: 3.0.10
* mistletoe: 1.3.0
* GitPython: 3.1.43
* borgbackup: 1.2.8
* pyparsing: 3.1.2
* ahocorasick_rs: 0.22.0
* python-redis-lock: 4.0.0
* charset-normalizer: 3.3.2
* Python: 3.12.4
* Git: 2.39.2
* psycopg: 3.2.1
* psycopg-binary: 3.2.1
* phply: 1.2.6
* ruamel.yaml: 0.18.6
* tesserocr: 2.7.0
* boto3: 1.34.138
* zeep: 4.2.1
* aeidon: 1.15
* iniparse: 0.5
* mysqlclient: 2.2.4
* Mercurial: 6.7.4
* git-svn: 2.39.2
* git-review: 2.4.0
* PostgreSQL server: 16.3
* Database backends: django.db.backends.postgresql
* PostgreSQL implementation: psycopg3 (binary)
* Cache backends: default:RedisCache, avatar:FileBasedCache
* Email setup: django.core.mail.backends.smtp.EmailBackend: 127.0.0.1
* OS encoding: filesystem=utf-8, default=utf-8
* Celery: redis://cache:6379/1, redis://cache:6379/1, regular
* Platform: Linux 6.5.0-41-generic (x86_64)
Weblate deploy checks
$ ./rundev.sh check --deploy
WARN[0000] /home/tos/gh/weblate/dev-docker/docker-compose.yml: `version` is obsolete
SystemCheckError: System check identified some issues:
CRITICALS:
?: (weblate.E003) Cannot send e-mail ([Errno 111] Connection refused), please check EMAIL_* settings.
HINT: https://docs.weblate.org/en/latest/admin/install.html#out-mail
?: (weblate.E012) The server e-mail address should be changed from its default value
HINT: https://docs.weblate.org/en/latest/admin/install.html#production-email
?: (weblate.E013) The "From" e-mail address should be changed from its default value
HINT: https://docs.weblate.org/en/latest/admin/install.html#production-email
ERRORS:
?: (weblate.E011) E-mail addresses for site admins is misconfigured
HINT: https://docs.weblate.org/en/latest/admin/install.html#production-admins
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.
?: (security.W018) You should not have DEBUG set to True in deployment.
INFOS:
?: (weblate.I021) Error collection is not set up, it is highly recommended for production use
HINT: https://docs.weblate.org/en/latest/admin/install.html#collecting-errors
?: (weblate.I028) Backups are not configured, it is highly recommended for production use
HINT: https://docs.weblate.org/en/latest/admin/backup.html
System check identified 10 issues (1 silenced).
Workaround
To avoid this issue
- Before adding a language, commit all pending changes.
If you have already encountered this issue
- Commit pending changes.
- Rescan repository (!)
Seems like 6cc857c didn't cover all the cases.
Thank you for your report; the issue you have reported has just been fixed.
- In case you see a problem with the fix, please comment on this issue.
- In case you see a similar problem, please open a separate issue.
- If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.