-
Notifications
You must be signed in to change notification settings - Fork 652
AO3-7211 Add a warning to the success message when directly adding existing bookmark to collection #5481
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
base: master
Are you sure you want to change the base?
AO3-7211 Add a warning to the success message when directly adding existing bookmark to collection #5481
Changes from all commits
3d9ff43
0953eb1
6ab5835
2e432b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -138,6 +138,7 @@ def create | |
| unless new_collections.empty? | ||
| flash[:notice] = ts("Added to collection(s): %{collections}.", | ||
| collections: new_collections.collect(&:title).join(", ")) | ||
| flash[:notice] += t("bookmarks.create.warnings.private_bookmark_added_to_collection") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And also, in this situation the note wouldn't be added to endings of invited and unapproved collections' success messages. Can you move this line to a bit lower, just before where the message is created?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep! Just to clarify, should I move it to replace the empty message in line 137 (which is only assigned if new_collections and unapproved_collections are empty), or after the unless statements at around line 155?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The latter, line 155, (though what line 137 does is kinda the opposite of what you said.) |
||
| end | ||
| unless invited_collections.empty? | ||
| invited_collections.each do |needs_user_approval| | ||
|
|
||
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.
Per our internationalization standards, you should avoid reusing the exact same locale key across different contexts, and use lazy lookup. Can you change this locale key to a new one and add it to locale file?