WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.46k stars 989 forks source link

Progress bar doesn't match translations status on some components / languages #3730

Closed agateblue closed 4 years ago

agateblue commented 4 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://translate.funkwhale.audio/projects/tabcenter-reborn/interface/oc/ (summary of a component language)
  2. Observe that the strings progress bar doesn't contain any green (still showing 21% of progress)
  3. Observe that there are 13 translated string

Expected behavior

There is a discrepency between the progress bar and the number of translated strings, I'd expect to see some green in the progress bar.

Screenshots

image

I'm not sure if it's related, but a different locale on the same component also shows a discrepency in the progress bar: the bar HTML for the green section is at 96.7, while it shows 98% on the side.

image

Server configuration and status

eliotberriot@apps:/srv/weblate$ sudo docker-compose run --rm weblate list_versions
Starting weblate_database_1 ... done
Starting weblate_cache_1    ... done
Starting...
weblate
Postgres is up
 * Weblate: 3.11.3
 * Django: 3.0.4
 * siphashc: 1.3
 * Whoosh: 2.7.4
 * translate-toolkit: 2.5.0
 * lxml: 4.3.2
 * Pillow: 7.0.0
 * bleach: 3.1.1
 * six: 1.14.0
 * python-dateutil: 2.8.1
 * social-auth-core: 3.2.0
 * social-auth-app-django: 3.1.0
 * django-crispy-forms: 1.8.1
 * oauthlib: 3.1.0
 * django-compressor: 2.4
 * djangorestframework: 3.11.0
 * django-appconf: 1.0.3
 * user-agents: 2.1
 * filelock: 3.0.12
 * setuptools: 40.8.0
 * jellyfish: 0.7.2
 * openpyxl: 3.0.1
 * celery: 4.4.0
 * kombu: 4.6.8
 * celery-batches: 0.3
 * translation-finder: 1.8
 * html2text: 2020.1.16
 * pycairo: 1.16.2
 * pygobject: 3.30.4
 * diff-match-patch: 20181111
 * requests: 2.23.0
 * django-redis: 4.11.0
 * hiredis: 1.0.1
 * sentry_sdk: 0.14.2
 * Cython: 0.29.15
 * misaka: 2.1.1
 * GitPython: 3.1.0
 * borgbackup: 1.1.11
 * Python: 3.7.3
 * Git: 2.20.1
 * psycopg2: 2.7.7
 * phply: 1.2.5
 * chardet: 3.0.4
 * ruamel.yaml: 0.16.10
 * tesserocr: 2.5.0
 * akismet: 1.1
 * boto3: 1.12.18
 * zeep: 3.4.0
 * aeidon: 1.7.0
 * Mercurial: 4.8.2
 * git-svn: 2.20.1
 * Database backends: django.db.backends.postgresql
 * Cache backends: default:RedisCache, avatar:FileBasedCache
 * Email setup: django.core.mail.backends.smtp.EmailBackend: mail.funkwhale.audio
 * Celery: redis://cache:6379/1, redis://cache:6379/1, regular
 * Platform: Linux 4.9.0-8-amd64 (x86_64)
eliotberriot@apps:/srv/weblate$ sudo docker-compose run --rm weblate check --deploy
Starting weblate_cache_1 ... done
Starting weblate_database_1 ... done
Starting...
weblate
Postgres is up
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.

INFOS:
?: (weblate.I021) Error collection is not configured, it is highly recommended for production use
    HINT: https://docs.weblate.org/en/weblate-3.11.3/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-3.11.3/admin/backup.html

System check identified 3 issues (1 silenced).

Additional context

Thank you very much for your work on Weblate, let me know if you need any additional info.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/91107853-progress-bar-doesn-t-match-translations-status-on-some-components-languages?utm_campaign=plugin&utm_content=tracker%2F253393&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F253393&utm_medium=issues&utm_source=github).
nijel commented 4 years ago

The root cause is that since the 3.11 release some check can fire even on strings marked for edit, but the progress bar wrongly displays these categories as non overlapping.