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

"Copy and Save" button from the Automatic Suggestions marks the strings as "Needs editing" #7288

Closed
2 tasks done
alexislg2 opened this issue Feb 21, 2022 · 3 comments · Fixed by #7290
Closed
2 tasks done
Assignees
Labels
bug Something is broken. ux Issues related to user experience.
Milestone

Comments

@alexislg2
Copy link
Contributor

Describe the issue

When a translator selects an automatic translation that he finds OK and clicks "Copy and save", the string is copied and saved but with the "needs editing" mark.

It does not make sense. If a translator considers that the suggested translation is OK, he clicks on "copy and save". There's no reason why the string should need a further edit because a human translator considered it as correct.

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. Go to the Automatic Suggestion tab, select one of the suggested translations (from memory or auto translation)
  2. Select one of the suggestions that is correct and click "copy and save"

Expected behavior

  1. The translation should be copied and saved but the string should not be marked as "needs editing" because a human translator considered it as correct.

Screenshots

image

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.6
  • Database backends: django.db.backends.postgresql
  • Cache backends: default:RedisCache, avatar:FileBasedCache
  • Email setup: django.core.mail.backends.smtp.EmailBackend: email-smtp.eu-west-1.amazonaws.com
  • OS encoding: filesystem=utf-8, default=utf-8
  • Celery: redis://cache:6379/1, redis://cache:6379/1, regular
  • Platform: Linux 5.4.0-99-generic (x86_64)

Weblate deploy checks

No response

Additional context

No response

@nijel
Copy link
Member

nijel commented Feb 21, 2022

What browser do you use?

@nijel nijel added bug Something is broken. ux Issues related to user experience. labels Feb 22, 2022
@nijel nijel added this to the 4.11 milestone Feb 22, 2022
@alexislg2
Copy link
Contributor Author

@nijel I use Chrome latest version but I also have this with other browsers
I think I found the cause:

this.$editor.on("click", ".js-copy-save-machinery", (e) => {

The "Copy and Save" button has the CSS class .js-copy-save-machinery BUT is inside a <TR>element that has the class .js-copy-machinery. So when you click on "Click and Save", both this.$editor.on("click", ".js-copy-save-machinery") and this.$editor.on("click", ".js-copy-machinery") are executed

alexislg2 pushed a commit to alexislg2/weblate that referenced this issue Feb 22, 2022
@alexislg2 alexislg2 mentioned this issue Feb 22, 2022
5 tasks
@nijel nijel linked a pull request Feb 23, 2022 that will close this issue
5 tasks
@nijel nijel assigned nijel and alexislg2 and unassigned nijel Feb 23, 2022
nijel pushed a commit that referenced this issue Feb 23, 2022
Fixes #7288

Co-authored-by: Alexis <alexis@sd-134660.dedibox.fr>
@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.

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

Successfully merging a pull request may close this issue.

2 participants