AO3-7242 i18n help modals for work skins, privacy#5540
AO3-7242 i18n help modals for work skins, privacy#5540KooShnoo wants to merge 2 commits intootwcode:masterfrom
Conversation
move static help modals to translatable erb files: * who can comment on this work * comments moderated * registered users * work skins help
|
oops, missed a format 😅 |
There was a problem hiding this comment.
Thank you for working on this! For i18n you can find the standards in the wiki.
For coding style, we have some extra notes on the wiki and generally follow the rubocop corrections. You can run rubocop locally if you don't want to have to push to see rubocop's comments.
| <dt><%= t(".enable_all") %></dt> | ||
| <dd><%= t(".enable_all_description") %></dd> |
There was a problem hiding this comment.
Please follow the same locale key format as #5530 and preferences_locale.html.erb:
| <dt><%= t(".enable_all") %></dt> | |
| <dd><%= t(".enable_all_description") %></dd> | |
| <dt><%= t(".enable_all.header") %></dt> | |
| <dd><%= t(".enable_all.description") %></dd> |
(in all files for all dt/dd's here)
| <p><%= t(".description_html") %></p> | ||
|
|
||
| <p><%= t(".limitations_html") %></p> |
There was a problem hiding this comment.
Please also do the var_bold: tag.strong ... for the bold text in these strings, similar to what you did for disable_anon_description_html
| # Redirects for moved help files | ||
| get "/first_login_help", to: redirect("/help/first_login") | ||
| get "/help/comments-moderated.html", to: redirect("/help/moderated_commenting") | ||
| get "/help/registered-users.html", to: redirect("/help/restricted_works") |
There was a problem hiding this comment.
There are still a bunch of links to the old registered-users page, please update them to use link_to_help_modal with the new path instead
|
|
||
| # Redirects for moved help files | ||
| get "/first_login_help", to: redirect("/help/first_login") | ||
| get "/help/comments-moderated.html", to: redirect("/help/moderated_commenting") |
There was a problem hiding this comment.
There are still a bunch of links to the old comments-moderated page, please update them to use link_to_help_modal with the new path instead
| <dt class="skin"> | ||
| <%= f.label :work_skin_id, t("works.skin.select") %> | ||
| <%= link_to_help "work-skins" %> | ||
| <%= link_to_help_modal(help_work_skins_path, t("works.skin.help_title")) %> |
There was a problem hiding this comment.
Please also convert other modals that use link_to_help "work-skins" to instead use link_to_help_modal
| make_skin_with_css_class_html: "%{create_a_work_skin_link} with the following content: <code>.bluetext {color: blue;}</code>" | ||
| select_skin: Select this skin when posting your work. | ||
| use_css_class_html: 'In the HTML of your text, you would then give the word this class: <code>%{code_snippet}</code>' |
There was a problem hiding this comment.
For both of these, please try whether you can extract the <code> from the locale file here into the view with tag.code, similar to how you did it with tag.strong for the <strong> tag
| </ul> | ||
|
|
||
| <p> | ||
| <%= t(".refer_tutorial_faq_html", tutorial_link: link_to(t(".tutorial"), archive_faq_path("tutorial-creating-a-work-skin")), faq_link: link_to(t(".faq"), archive_faq_path("skins-and-archive-interface"))) %> |
There was a problem hiding this comment.
Translation prefers when the link variables/locale keys are close to what the link text is, so please adjust the tutorial and faq locale keys/variables
| def restricted_commenting | ||
| end | ||
|
|
||
| def restricted_works |
There was a problem hiding this comment.
I would prefer if this was restricted_work, but it's a very weak preference
| first_login | ||
| preferences_locale | ||
| moderated_commenting | ||
| restricted_commenting | ||
| restricted_works | ||
| work_skins |
There was a problem hiding this comment.
Could you also order this alphabetically
| get "/help/comments-moderated.html", to: redirect("/help/moderated_commenting") | ||
| get "/help/registered-users.html", to: redirect("/help/restricted_works") | ||
| get "/help/who-can-comment-on-this-work.html", to: redirect("/help/restricted_commenting") | ||
| get "/help/work-skins.html", to: redirect("/help/work_skins") |
There was a problem hiding this comment.
this could also use some ordering, alphabetical by new path
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-7242
Purpose
As part of internationalization, move these four static help modals to translatable erb files:
Testing Instructions
There are already full testing instructions in the Jira issue.
Credit
KooShnoo (he/him)