-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(tools): add search preview to bulk edit tool #12957
feat(tools): add search preview to bulk edit tool #12957
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
weblate/trans/forms.py
Outdated
@@ -2623,6 +2624,7 @@ class BulkEditForm(forms.Form): | |||
def __init__(self, user: User | None, obj, *args, **kwargs) -> None: | |||
project = kwargs.pop("project", None) | |||
kwargs["auto_id"] = "id_bulk_%s" | |||
kwargs["initial"] = {"path": obj.full_slug} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
obj
can be None
here (when invoked from add-on configuration) and it then fails: AttributeError: 'NoneType' object has no attribute 'full_slug'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, was not aware of there also being a bulk edit in the add-ons 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing blank path and not using it in lookup should do the trick in that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a fix for this, please review.
The search preview is not activated on the add-on pages for bulk edit.
Correctly use project scoping when available, see WeblateOrg#12957
Correctly use project scoping when available, see WeblateOrg#12957
Correctly use project scoping when available, see WeblateOrg#12957
Correctly use project scoping when available, see #12957
84593a1
to
7f91ae3
Compare
Merged, thanks for your contribution! |
Proposed changes
Adds the same search preview from Search and replace to the Bulk edit tool.
Checklist
Other information
Related to #4106, #4108 and #7563.
Does not affect the Bulk edit add-on.