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 state of strings imported from CSV with fuzzy="True" #7247

Closed
2 tasks done
endervad opened this issue Feb 13, 2022 · 11 comments
Closed
2 tasks done

Wrong state of strings imported from CSV with fuzzy="True" #7247

endervad opened this issue Feb 13, 2022 · 11 comments
Assignees
Labels
bug Something is broken.
Milestone

Comments

@endervad
Copy link

endervad commented Feb 13, 2022

Describe the issue

Bulk Edit does not work with strings that were imported from CSV with fuzzy="True". The way of importing doesn't seem to matter, I've encountered this issue when importing from remote VCS and from a ZIP file.
Also these strings are imported as "empty"/"Not translated" instead of "Needs editing" despite having a target string and fuzzy="True". Not sure if it's intended behavior though.

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

  1. Import CSV translation file with strings that in "fuzzy" column have "True" (either all or partially).
  2. Go into imported translation, proceed to Bulk Edit, and create any request that would normally update the state of specified strings.
  3. The strings with fuzzy="True" will be neither updated, nor at least skipped. The message shows "Bulk edit completed, no strings were updated." in case of a file where all strings have fuzzy="True".

Expected behavior

The state of the strings described in Bulk Edit requests should work properly with strings imported from CSV with fuzzy="True"

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

Docker container

Weblate versions

  • Weblate: 4.10.1
  • Django: 4.0
  • siphashc: 2.1
  • translate-toolkit: 3.5.1
  • lxml: 4.7.1
  • Pillow: 8.4.0
  • bleach: 4.1.0
  • python-dateutil: 2.8.2
  • social-auth-core: 4.1.0
  • social-auth-app-django: 5.0.0
  • django-crispy-forms: 1.13.0
  • oauthlib: 3.1.1
  • django-compressor: 3.1
  • djangorestframework: 3.13.1
  • django-filter: 21.1
  • django-appconf: 1.0.5
  • user-agents: 2.2.0
  • filelock: 3.4.0
  • setuptools: 60.0.4
  • jellyfish: 0.8.9
  • openpyxl: 3.0.9
  • celery: 5.2.1
  • kombu: 5.2.2
  • translation-finder: 2.10
  • weblate-language-data: 2021.7
  • html2text: 2020.1.16
  • pycairo: 1.20.1
  • pygobject: 3.42.0
  • diff-match-patch: 20200713
  • requests: 2.26.0
  • django-redis: 5.2.0
  • hiredis: 2.0.0
  • sentry_sdk: 1.5.1
  • Cython: 0.29.26
  • misaka: 2.1.1
  • GitPython: 3.1.24
  • borgbackup: 1.1.17
  • pyparsing: 3.0.6
  • pyahocorasick: 1.4.2
  • python-redis-lock: 3.7.0
  • Python: 3.10.1
  • Git: 2.30.2
  • psycopg2: 2.9.2
  • psycopg2-binary: 2.9.2
  • phply: 1.2.5
  • chardet: 4.0.0
  • ruamel.yaml: 0.17.17
  • tesserocr: 2.5.2
  • akismet: 1.1
  • boto3: 1.20.26
  • zeep: 4.1.0
  • aeidon: 1.10.1
  • iniparse: 0.5
  • mysqlclient: 2.1.0
  • Mercurial: 6.0
  • git-svn: 2.30.2
  • git-review: 2.2.0
  • Redis server: 6.2.6
  • PostgreSQL server: 13.5
  • Database backends: django.db.backends.postgresql
  • 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 5.10.60.1-microsoft-standard-WSL2 (x86_64)

Weblate deploy checks

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.10.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.10.1/admin/backup.html

System check identified 2 issues (1 silenced).

Additional context

  • "Search" and "Search and replace" functions work as expected with any request.
@endervad endervad added the question This is more a question for the support than an issue. label Feb 13, 2022
@github-actions
Copy link

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!

@endervad
Copy link
Author

I tested a bit more and I feel like I identified a bug, so I updated the issue accordingly. It's no longer a question but it doesn't seem like I can change the label.

@endervad endervad changed the title Why could bulk edit not work? Bulk Edit doesn't work with strings from CSV with fuzzy="True" Feb 14, 2022
@nijel
Copy link
Member

nijel commented Feb 14, 2022

Can you please share a snippet of the CSV file showing at least header and content with the fuzzy strings?

@endervad
Copy link
Author

Sure.

"location","source","target","id","fuzzy","context","translator_comments","developer_comments"
"","","","","True","0x00000000","",""
"","Surprised","Удивление","","True","0x00000001","",""
"","Angry","Злость","","True","0x00000002","",""
"","Furious","Гнев","","True","0x00000003","",""
"","Blush","Покраснеть","","True","0x00000004","",""

@github-actions
Copy link

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

@github-actions github-actions bot added the wontfix Nobody will work on this. label Feb 25, 2022
@nijel nijel added bug Something is broken. and removed question This is more a question for the support than an issue. wontfix Nobody will work on this. labels Feb 25, 2022
@nijel nijel changed the title Bulk Edit doesn't work with strings from CSV with fuzzy="True" Wrong state of strings imported from CSV with fuzzy="True" Feb 25, 2022
@nijel
Copy link
Member

nijel commented Feb 25, 2022

This might have been addressed already for upcoming 4.11 release (most likely by 784314b). Can you please retry once that is out (later today)?

Anyway, the root cause will be wrong string state:

Also these strings are imported as "empty"/"Not translated" instead of "Needs editing" despite having a target string and fuzzy="True".

@nijel nijel added this to the 4.11 milestone Feb 25, 2022
@nijel nijel self-assigned this Feb 25, 2022
@nijel nijel closed this as completed Feb 25, 2022
@github-actions
Copy link

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.

@nijel
Copy link
Member

nijel commented Feb 25, 2022

Note: The file will have to be reimported to fix the string states.

@endervad
Copy link
Author

This might have been addressed already for upcoming 4.11 release can you please retry once that is out (later today)?

Anyway, the root cause will be wrong string state:

Also these strings are imported as "empty"/"Not translated" instead of "Needs editing" despite having a target string and fuzzy="True".

Absolutely, thanks. I also stumbled upon another bug that might be related to this issue: if you download CSV from server, make changes to it in 'target' column, and then upload back with the option "Add suggestions", then it will not do anything, just like with Bulk Edit. I'll make another issue about it if it persists.

@endervad
Copy link
Author

Unfortunately 4.11 didn't fix this issue.

I've created sample files to fully reproduce this bug from zero.

  1. Create new project
  2. Create new component in it
  3. Upload the ZIP below. All settings are set to default except "Edit base file" - turn off this

French has fuzzy=false, so all non-empty strings are imported as translated, which is ok. Bulk Edit will correctly change the state of strings.

German has fuzzy=true, and all strings are unfinished/untranslated. If we go into German > Bulk Edit, set filter to e.g. "has:context" and change state to any state, bulk edit will not update any string.

csv-bulk-edit-sample.zip

@nijel nijel reopened this Mar 1, 2022
@nijel nijel modified the milestones: 4.11, 4.11.1 Mar 1, 2022
@nijel nijel closed this as completed in 2c45dbc Mar 1, 2022
@github-actions
Copy link

github-actions bot commented Mar 1, 2022

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.

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

No branches or pull requests

2 participants