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

When trying to add a suggestion that is == current translation, it says "suggestion already exists", even if there are actually none #7705

Open
2 tasks done
WofWca opened this issue May 28, 2022 · 6 comments
Labels
enhancement Adding or requesting a new feature. good first issue Opportunity for newcoming contributors. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed.

Comments

@WofWca
Copy link
Contributor

WofWca commented May 28, 2022

Describe the issue

Sounds nitpicky, but it confused me when is was editing glossary since there's an "Explanation" text area which is in place of where the translation text area usually is on non-glossary items. Maybe this also needs to be changed.

I already tried

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

Steps to reproduce the behavior

No response

Expected behavior

No response

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

weblate.org service

Weblate versions

No response

Weblate deploy checks

No response

Additional context

Code:

# Create the suggestion
result = Suggestion.objects.add(
unit,
join_plural(form.cleaned_data["target"]),
request,
request.user.has_perm("suggestion.vote", unit),
)
if not result:
messages.error(request, _("Your suggestion already exists!"))
return result

if unit.translated and unit.target == target:
return False

@github-actions

This comment was marked as off-topic.

@github-actions github-actions bot added the wontfix Nobody will work on this. label Jun 8, 2022
@nijel nijel added enhancement Adding or requesting a new feature. help wanted Extra attention is needed. good first issue Opportunity for newcoming contributors. and removed wontfix Nobody will work on this. labels Jun 8, 2022
@github-actions
Copy link

github-actions bot commented Jun 8, 2022

This issue seems to be a good fit for newbie contributors. You are welcome to contribute to Weblate! Don't hesitate to ask any questions you would have while implementing this.

You can learn about how to get started in our contributors documentation.

@WofWca WofWca changed the title When trying to add a suggestion that is == current translation, it says "suggestion already exists", but there are actually none When trying to add a suggestion that is == current translation, it says "suggestion already exists", even if there are actually none Jun 8, 2022
@acharyasourav
Copy link

hey I'm new to opensource and would like to work on it can you please tell what needs to be done?

@WofWca
Copy link
Contributor Author

WofWca commented Jul 4, 2022

What is it that you don't understand? There are links to the responsible code in the issue description.

@acharyasourav
Copy link

I did check out the code what i meant to ask is do you have any idea on what should be changed and what should it rather say?

@nijel
Copy link
Member

nijel commented Jul 7, 2022

The problem is that there is same error message used for case where suggestion matches existing suggestion (where it correct) and when it matches existing translation (where the message is confusing).

@nijel nijel added the hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. label Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature. good first issue Opportunity for newcoming contributors. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed.
Projects
None yet
Development

No branches or pull requests

3 participants