Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong string count #11238

Closed
2 tasks done
iamshoXy opened this issue Mar 20, 2024 · 11 comments
Closed
2 tasks done

Wrong string count #11238

iamshoXy opened this issue Mar 20, 2024 · 11 comments

Comments

@iamshoXy
Copy link

iamshoXy commented Mar 20, 2024

Describe the issue

I have distributed strings in labels. The first four are each 558 strings and the other six labels 557 strings each.

558 x 4 = 2232
557 x 6 = 3342

Total of 5574 strings and there are still strings without a label.

image

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

  1. Create a few labels
  2. Distribute strings to each label
  3. "Strings without a label" should show incorrect stats

Expected behavior

There shouldn't be any strings without a label left.

Screenshots

No response

Exception traceback

No exception

How do you run Weblate?

Docker container

Weblate versions

  • Weblate: 5.4.2
  • Django: 4.2.10
  • siphashc: 2.4.1
  • translate-toolkit: 3.12.2
  • lxml: 5.1.0
  • pillow: 10.2.0
  • nh3: 0.2.15
  • python-dateutil: 2.8.2
  • social-auth-core: 4.5.3
  • social-auth-app-django: 5.4.0
  • django-crispy-forms: 2.1
  • oauthlib: 3.2.2
  • django-compressor: 4.4
  • djangorestframework: 3.14.0
  • django-filter: 23.5
  • django-appconf: 1.0.6
  • user-agents: 2.2.0
  • filelock: 3.13.1
  • rapidfuzz: 3.6.1
  • openpyxl: 3.1.2
  • celery: 5.3.6
  • django-celery-beat: 2.5.0
  • kombu: 5.3.5
  • translation-finder: 2.16
  • weblate-language-data: 2024.3
  • html2text: 2020.1.16
  • pycairo: 1.26.0
  • PyGObject: 3.46.0
  • diff-match-patch: 20230430
  • requests: 2.31.0
  • django-redis: 5.4.0
  • hiredis: 2.3.2
  • sentry-sdk: 1.40.5
  • Cython: 3.0.8
  • misaka: 2.1.1
  • GitPython: 3.1.42
  • borgbackup: 1.2.7
  • pyparsing: 3.1.1
  • ahocorasick_rs: 0.22.0
  • python-redis-lock: 4.0.0
  • charset-normalizer: 3.3.2
  • Python: 3.12.2
  • Git: 2.39.2
  • psycopg: 3.1.18
  • psycopg-binary: 3.1.18
  • phply: 1.2.6
  • ruamel.yaml: 0.18.6
  • tesserocr: 2.6.2
  • boto3: 1.34.47
  • zeep: 4.2.1
  • aeidon: 1.13
  • iniparse: 0.5
  • mysqlclient: 2.2.4
  • Mercurial: 6.6.3
  • git-svn: 2.39.2
  • git-review: 2.3.1
  • PostgreSQL server: 16.2
  • Database backends: django.db.backends.postgresql
  • PostgreSQL implementation: psycopg3 (binary)
  • Cache backends: default:RedisCache, avatar:FileBasedCache
  • Email setup: django.core.mail.backends.smtp.EmailBackend: smtp.gmail.com
  • OS encoding: filesystem=utf-8, default=utf-8
  • Celery: redis://cache:6379/1, redis://cache:6379/1, regular
  • Platform: Linux 6.1.0-17-arm64 (aarch64)

Weblate deploy checks

SystemCheckError: System check identified some issues:

CRITICALS:
?: (weblate.E003) Cannot send e-mail ((535, b'5.7.8 Username and Password not accepted. For more information, go to\n5.7.8  https://support.google.com/mail/?p=BadCredentials fs7-20020a05600c3f8700b00414038162e1sm522258wmb.23 - gsmtp')), please check EMAIL_* settings.
        HINT: https://docs.weblate.org/en/weblate-5.4.2/admin/install.html#out-mail

INFOS:
?: (weblate.I028) Backups are not configured, it is highly recommended for production use
        HINT: https://docs.weblate.org/en/weblate-5.4.2/admin/backup.html

System check identified 2 issues (1 silenced).

Additional context

No response

@nijel
Copy link
Member

nijel commented Mar 20, 2024

Maybe this is caused by outdated counts because of #11236?

@iamshoXy
Copy link
Author

Mhm, yeah that could be related to it. Do I have to delete those labels manually or can I just update to the latest commit and it will fix itself?

@nijel
Copy link
Member

nijel commented Mar 20, 2024

Doing change in affected translation should update the counts.

@iamshoXy
Copy link
Author

iamshoXy commented Mar 20, 2024

I've tried to reassign labels, creating the label again and translating strings but unfortunately, the issue is still there.
I'm on commit 99e0050

@nijel
Copy link
Member

nijel commented Mar 20, 2024

Are you sure there are no strings with more labels?

@iamshoXy
Copy link
Author

There might be strings with multiple labels or what do you mean exactly?

Deleted one label and the counter increased and is now on 1921 strings without a label while it should be at 517

@nijel
Copy link
Member

nijel commented Mar 20, 2024

Yes, string can have any number of labels.

@iamshoXy
Copy link
Author

I have deleted all labels and created two new ones. Strings are still displayed in the label although there are none.

image

@nijel
Copy link
Member

nijel commented Apr 3, 2024

I think this is still about the stale stats from before 99e0050. It won't remove existing stale stats, but if you remove label, it will remove the stats from all translations which had string labelled with it. Did the issue fix itself since then? The stale stats would be lost on any edit as that causes full update of them.

@iamshoXy
Copy link
Author

iamshoXy commented Apr 3, 2024

I have since changed the server and done a fresh install and so far there have been no problems so I assume it was really due to the stale stats. I will make another issue when it happens again, appreciate all the help!

@iamshoXy iamshoXy closed this as completed Apr 3, 2024
Copy link

github-actions bot commented Apr 3, 2024

The issue you have reported is now resolved. If you don’t feel it’s right, please follow its labels to get a clue for further steps.

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants