From e3892b1eb53191e0e7fc65bf1dbc907c1251c975 Mon Sep 17 00:00:00 2001 From: KooShnoo Date: Sat, 10 Jan 2026 13:11:17 -0800 Subject: [PATCH 1/2] AO3-7242 i18n help modals for work skins, privacy move static help modals to translatable erb files: * who can comment on this work * comments moderated * registered users * work skins help --- app/controllers/help_controller.rb | 12 ++++++ app/views/help/moderated_commenting.html.erb | 2 + app/views/help/restricted_commenting.html.erb | 10 +++++ app/views/help/restricted_works.html.erb | 3 ++ app/views/help/work_skins.html.erb | 23 +++++++++++ app/views/works/_standard_form.html.erb | 4 +- config/locales/views/en.yml | 33 +++++++++++++++ config/routes.rb | 8 ++++ public/help/comments-moderated.html | 2 - public/help/registered-users.html | 6 --- public/help/who-can-comment-on-this-work.html | 10 ----- public/help/work-skins.html | 41 ------------------- 12 files changed, 93 insertions(+), 61 deletions(-) create mode 100644 app/views/help/moderated_commenting.html.erb create mode 100644 app/views/help/restricted_commenting.html.erb create mode 100644 app/views/help/restricted_works.html.erb create mode 100644 app/views/help/work_skins.html.erb delete mode 100644 public/help/comments-moderated.html delete mode 100644 public/help/registered-users.html delete mode 100644 public/help/who-can-comment-on-this-work.html delete mode 100644 public/help/work-skins.html diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb index ddb6d67a53a..027fa5ea05f 100644 --- a/app/controllers/help_controller.rb +++ b/app/controllers/help_controller.rb @@ -7,4 +7,16 @@ def first_login def preferences_locale end + + def moderated_commenting + end + + def restricted_commenting + end + + def restricted_works + end + + def work_skins + end end diff --git a/app/views/help/moderated_commenting.html.erb b/app/views/help/moderated_commenting.html.erb new file mode 100644 index 00000000000..20d43272e87 --- /dev/null +++ b/app/views/help/moderated_commenting.html.erb @@ -0,0 +1,2 @@ +

<%= t(".page_heading") %>

+

<%= t(".description") %>

diff --git a/app/views/help/restricted_commenting.html.erb b/app/views/help/restricted_commenting.html.erb new file mode 100644 index 00000000000..b6c8eeb9059 --- /dev/null +++ b/app/views/help/restricted_commenting.html.erb @@ -0,0 +1,10 @@ +

<%= t(".page_heading") %>

+
+
<%= t(".enable_all") %>
+
<%= t(".enable_all_description") %>
+
<%= t(".disable_anon") %>
+
<%= t(".disable_anon_description_html", default_option_bold: tag.strong(t(".default_option"))) %>
+
<%= t(".disable_all") %>
+
<%= t(".disable_all_description") %>
+
+

<%= t(".existing_unaffected_html", deleting_others_comments_link: link_to(t(".deleting_others_comments"), archive_faq_path("comments-and-kudos", anchor: "commentother"))) %>

diff --git a/app/views/help/restricted_works.html.erb b/app/views/help/restricted_works.html.erb new file mode 100644 index 00000000000..2c4d865ff24 --- /dev/null +++ b/app/views/help/restricted_works.html.erb @@ -0,0 +1,3 @@ +

<%= t(".page_heading") %>

+ +

<%= t(".description") %>

\ No newline at end of file diff --git a/app/views/help/work_skins.html.erb b/app/views/help/work_skins.html.erb new file mode 100644 index 00000000000..d0ff38b15fe --- /dev/null +++ b/app/views/help/work_skins.html.erb @@ -0,0 +1,23 @@ +

<%= t(".page_heading") %>

+ +

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

+ +

<%= t(".limitations_html") %>

+ +

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

+ + + +

+ <%= 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"))) %> +

diff --git a/app/views/works/_standard_form.html.erb b/app/views/works/_standard_form.html.erb index 29ccb4ae548..45a0bb6ce2c 100644 --- a/app/views/works/_standard_form.html.erb +++ b/app/views/works/_standard_form.html.erb @@ -243,7 +243,7 @@
<%= 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")) %>
<%= f.collection_select :work_skin_id, all_coauthor_skins, :id, :title, @@ -281,7 +281,7 @@
<%= 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")) %>
diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index 7a83d4b3831..a6ba4efe25b 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -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 @@ -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 other users, not just you. + example: + code_snippet: I want house 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: .bluetext {color: blue;}" + 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_snippet}' + faq: Skins and Archive Interface FAQ + limitations_html: Work skins will only 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: @@ -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: diff --git a/config/routes.rb b/config/routes.rb index d41f9761074..3cd72064733 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -636,12 +636,20 @@ %w[ first_login preferences_locale + moderated_commenting + restricted_commenting + restricted_works + work_skins ].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") + 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") get 'search' => 'works#search' post 'support' => 'feedbacks#create', as: 'feedbacks' diff --git a/public/help/comments-moderated.html b/public/help/comments-moderated.html deleted file mode 100644 index 63a3e5ea2dc..00000000000 --- a/public/help/comments-moderated.html +++ /dev/null @@ -1,2 +0,0 @@ -

Comments Moderated

-

With this feature enabled, you will have to approve all comments before they appear publicly on your work.

diff --git a/public/help/registered-users.html b/public/help/registered-users.html deleted file mode 100644 index 18db8ecdbd5..00000000000 --- a/public/help/registered-users.html +++ /dev/null @@ -1,6 +0,0 @@ -

Registered Users

- -

-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. -

\ No newline at end of file diff --git a/public/help/who-can-comment-on-this-work.html b/public/help/who-can-comment-on-this-work.html deleted file mode 100644 index 7d3ee9c2ad7..00000000000 --- a/public/help/who-can-comment-on-this-work.html +++ /dev/null @@ -1,10 +0,0 @@ -

Who can comment on this work?

-
-
Registered users and guests can comment
-
All users can comment on your work whether they are logged in or not.
-
Only registered users can comment
-
This is the default option. With this enabled, only logged in users will be able to comment on your work.
-
No one can comment
-
This will disable all new comments on your work.
-
-

Changing these settings will not affect any existing comments. If there are comments on the work that you would like to remove, check out Can I edit or delete a comment someone else left on one of my works? to learn how.

diff --git a/public/help/work-skins.html b/public/help/work-skins.html deleted file mode 100644 index 77e3d5719b0..00000000000 --- a/public/help/work-skins.html +++ /dev/null @@ -1,41 +0,0 @@ -

Work Skins

- -

- 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 other users, not just - you. -

- -

- Work skins will only 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. -

- -

- For example, let's say that you want to make a single word in your text bright - blue. Here is what you might do: -

- -
    -
  • - Create a work skin with the - following content: .bluetext {color: blue;} -
  • -
  • - Select this skin when posting your work. -
  • -
  • - In the HTML of your text, you would then give the word this class: I - want <span class="bluetext">house</span> to be in blue -
  • -
- -

- Refer to Tutorial: Creating a - Work Skin and Skins and Archive - Interface FAQ for more information. -

From 3d00b1b094285fba9c555e7b028a32fcf869d413 Mon Sep 17 00:00:00 2001 From: KooShnoo Date: Sat, 10 Jan 2026 13:32:13 -0800 Subject: [PATCH 2/2] erb format --- app/views/help/restricted_works.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/help/restricted_works.html.erb b/app/views/help/restricted_works.html.erb index 2c4d865ff24..6c1570db2a2 100644 --- a/app/views/help/restricted_works.html.erb +++ b/app/views/help/restricted_works.html.erb @@ -1,3 +1,3 @@

<%= t(".page_heading") %>

-

<%= t(".description") %>

\ No newline at end of file +

<%= t(".description") %>