Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions app/controllers/help_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,16 @@ def first_login

def preferences_locale
end

def moderated_commenting
end

def restricted_commenting
end

def restricted_works
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer if this was restricted_work, but it's a very weak preference

end

def work_skins
end
Comment on lines 8 to +21
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For ease of use, please sort the methods in this file alphabetically

end
2 changes: 2 additions & 0 deletions app/views/help/moderated_commenting.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h4><%= t(".page_heading") %></h4>
<p><%= t(".description") %></p>
10 changes: 10 additions & 0 deletions app/views/help/restricted_commenting.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<h4><%= t(".page_heading") %></h4>
<dl>
<dt><%= t(".enable_all") %></dt>
<dd><%= t(".enable_all_description") %></dd>
Comment on lines +3 to +4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the same locale key format as #5530 and preferences_locale.html.erb:

Suggested change
<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)

<dt><%= t(".disable_anon") %></dt>
<dd><%= t(".disable_anon_description_html", default_option_bold: tag.strong(t(".default_option"))) %></dd>
<dt><%= t(".disable_all") %></dt>
<dd><%= t(".disable_all_description") %></dd>
</dl>
<p><%= t(".existing_unaffected_html", deleting_others_comments_link: link_to(t(".deleting_others_comments"), archive_faq_path("comments-and-kudos", anchor: "commentother"))) %></p>
3 changes: 3 additions & 0 deletions app/views/help/restricted_works.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<h4><%= t(".page_heading") %></h4>

<p><%= t(".description") %></p>
23 changes: 23 additions & 0 deletions app/views/help/work_skins.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<h4><%= t(".page_heading") %></h4>

<p><%= t(".description_html") %></p>

<p><%= t(".limitations_html") %></p>
Comment on lines +3 to +5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


<p><%= t(".example.introduction") %></p>

<ul>
<li>
<%= t(".example.make_skin_with_css_class_html", create_a_work_skin_link: link_to(t(".example.create_a_work_skin"), new_skin_path(skin_type: "WorkSkin"))) %>
</li>
<li>
<%= t(".example.select_skin") %>
</li>
<li>
<%= t(".example.use_css_class_html", code_snippet: t(".example.code_snippet")) %>
</li>
</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"))) %>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

</p>
4 changes: 2 additions & 2 deletions app/views/works/_standard_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@

<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")) %>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also convert other modals that use link_to_help "work-skins" to instead use link_to_help_modal

</dt>
<dd class="skin">
<%= f.collection_select :work_skin_id, all_coauthor_skins, :id, :title,
Expand Down Expand Up @@ -281,7 +281,7 @@

<dt class="permissions comments">
<%= t("comments.commentable.permissions.options.label") %>
<%= link_to_help "who-can-comment-on-this-work" %>
<%= link_to_help_modal(help_restricted_commenting_path, t("comments.commentable.permissions.options.help_title")) %>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also convert other modals that use link_to_help "who-can-comment-on-this-work" to instead use link_to_help_modal

</dt>
<dd class="permissions comments">
<fieldset>
Expand Down
33 changes: 33 additions & 0 deletions config/locales/views/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@ en:
disable_all: No one can comment
disable_anon: Only registered users can comment
enable_all: Registered users and guests can comment
help_title: Who can comment on this work
keep_current: Keep current comment settings
label: Who can comment on this work
multiple_works_label: Who can comment on these works
Expand Down Expand Up @@ -1080,11 +1081,42 @@ en:
symbols_html: When browsing the Archive, warnings will be displayed in the blurb of each work. Official warning tags are displayed in bold. A four square grid in the top left corner of each work's blurb indicates the work's rating, completion status, pairing category, and any Archive warnings that apply to it. Refer to the %{symbols_key_chart_link} for more information.
symbols_key_chart: Symbols Key Chart
welcome_header: Welcome to the %{app_name}!
moderated_commenting:
description: With this feature enabled, you will have to approve all comments before they appear publicly on your work.
page_heading: Comments Moderated
preferences_locale:
locale:
description: This preference allows you to select your preferred language for email messages that the Archive sends to you. The templates for these messages are currently being updated and translated by our volunteers. This is a work in progress; not all messages will be available in languages other than English at this time. If the template for that email has not yet been translated to your language, it will be sent in English.
header: Set preferred locale
page_heading: Locale Preferences
restricted_commenting:
default_option: This is the default option.
deleting_others_comments: Can I edit or delete a comment someone else left on one of my works?
disable_all: No one can comment
disable_all_description: This will disable all new comments on your work.
disable_anon: Only registered users can comment
disable_anon_description_html: "%{default_option_bold} With this enabled, only logged in users will be able to comment on your work."
enable_all: Registered users and guests can comment
enable_all_description: All users can comment on your work whether they are logged in or not.
existing_unaffected_html: Changing these settings will not affect any existing comments. If there are comments on the work that you would like to remove, check out %{deleting_others_comments_link} to learn how.
page_heading: Who can comment on this work?
restricted_works:
description: A registered user is a person with an Archive account. If you check this box your story can only be viewed by a person who is logged in.
page_heading: Registered Users
work_skins:
description_html: You can create custom stylesheets, or "skins", for your works just like you can create skins for the Archive. The main difference is that work skins will change the way your work appears to <strong>other</strong> users, not just you.
example:
code_snippet: I want <span class="bluetext">house</span> to be in blue
create_a_work_skin: Create a work skin
introduction: 'For example, let''s say that you want to make a single word in your text bright blue. Here is what you might do:'
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>'
Comment on lines +1112 to +1114
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

faq: Skins and Archive Interface FAQ
limitations_html: Work skins will <strong>only</strong> affect the body of the work they are applied to—you can't change the Archive navigation or background with them. What you can do, however, is create your own classes. For instance, you can change the color of some of your text, indent some paragraphs in a particular way, and so on.
page_heading: Work Skins
refer_tutorial_faq_html: Refer to %{tutorial_link} and %{faq_link} for more information.
tutorial: 'Tutorial: Creating a Work Skin'
home:
about:
ao3:
Expand Down Expand Up @@ -2793,6 +2825,7 @@ en:
draft: " (Draft)"
no_works: You have no works or drafts to edit.
skin:
help_title: Work skins
select: Select work skin
work_approved_children:
inspired_by:
Expand Down
8 changes: 8 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -636,12 +636,20 @@
%w[
first_login
preferences_locale
moderated_commenting
restricted_commenting
restricted_works
work_skins
Comment on lines 637 to +642
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also order this alphabetically

].each do |action|
get "/help/#{action}", to: "help##{action}"
end

# Redirects for moved help files
get "/first_login_help", to: redirect("/help/first_login")
get "/help/comments-moderated.html", to: redirect("/help/moderated_commenting")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

get "/help/registered-users.html", to: redirect("/help/restricted_works")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

get "/help/who-can-comment-on-this-work.html", to: redirect("/help/restricted_commenting")
get "/help/work-skins.html", to: redirect("/help/work_skins")
Comment on lines +649 to +652
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could also use some ordering, alphabetical by new path


get 'search' => 'works#search'
post 'support' => 'feedbacks#create', as: 'feedbacks'
Expand Down
2 changes: 0 additions & 2 deletions public/help/comments-moderated.html

This file was deleted.

6 changes: 0 additions & 6 deletions public/help/registered-users.html

This file was deleted.

10 changes: 0 additions & 10 deletions public/help/who-can-comment-on-this-work.html

This file was deleted.

41 changes: 0 additions & 41 deletions public/help/work-skins.html

This file was deleted.

Loading