-
Notifications
You must be signed in to change notification settings - Fork 542
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
AO3-5053 Update bookmarker byline when pseud or username changes #4773
base: master
Are you sure you want to change the base?
AO3-5053 Update bookmarker byline when pseud or username changes #4773
Conversation
<% blurb_cache_key = (is_author_of?(bookmark) ? "bookmark-owner-blurb-#{bookmark.cache_key}-v2" : "bookmark-blurb-#{bookmark.cache_key}-v2") %> | ||
<!--bookmarker--> | ||
<h5 class="byline heading"> | ||
<%= t("Bookmarked by") %> <%= link_to(bookmark.pseud.byline, user_pseud_bookmarks_path(bookmark.pseud.user, bookmark.pseud)) %> |
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.
The feature test error is happening because you switched from ts
to t
. The switch is great, t
is preferred. But then the link to the user should be integrated into the translation call so it looks like t(".bookmarked_by_html", pseud_link: link_to(....))
and the translation needs to be in config/locales/views/en.yml
, in this case in a new section for bookmarks:
bookmarks:
bookmark_user_module:
bookmarked_by_html: Bookmarked by %{pseud_link}
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.
For context: Normally the tests would let you know that the translation for "Bookmarked by" is missing (in the yml file). The missing translation caused it to get converted to "Bookmarked By" in the feature tests. And the test for missing translations fails, as it should. However, the reporting for it on GitHub is broken, see https://otwarchive.atlassian.net/browse/AO3-6703.
I found what the issue was because I tried to look at the blurb in my local dev install and got the "translation missing" error there.
Pull Request Checklist
as the first thing in your pull request title (e.g.
AO3-1234 Fix thing
)until they are reviewed and merged before creating new pull requests.
Issue
https://otwarchive.atlassian.net/browse/AO3-5053
Purpose
Updates bookmark blurbs when a bookmarker changes their username or pseud
Testing Instructions
See Jira.
References
I modeled some of my approach on https://otwarchive.atlassian.net/browse/AO3-4120
Credit
irrationalpie, they/them