Skip to content

Commit

Permalink
Make things translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjaustin committed Aug 7, 2024
1 parent e88f9bd commit 2dfbcdb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
21 changes: 9 additions & 12 deletions app/views/admin/_admin_nav.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<h3 class="landmark heading"><%= ts("Admin Navigation") %></h3>
<h3 class="landmark heading"><%= t(".landmark") %></h3>
<ul class="navigation actions" role="navigation">
<li>
<%= span_if_current ts("AO3 News", key: "header"), admin_posts_path %>
<%= span_if_current t(".ao3_news"), admin_posts_path %>
</li>
<li>
<%= span_if_current ts("Post AO3 News", key: "header"),
new_admin_post_path %>
</li>
<%= span_if_current t(".post_ao3_news"), new_admin_post_path %>
</li>
<% if params[:controller] == "admin_posts" && params[:action] == "edit" %>
<li>
<%= link_to t("admin.admin_nav.delete", default: "Delete Post"),
<%= link_to t(".news.delete_post"),
@admin_post,
data: { confirm: "Are you sure you want to delete this news post?" },
method: :delete %>
Expand All @@ -18,21 +17,19 @@
<% if params[:controller] == "archive_faqs" && params[:action] == "edit" &&
Globalize.locale.to_s == "en" %>
<li>
<%= link_to ts("Reorder Questions"),
manage_archive_faq_questions_path(@archive_faq) %>
<%= link_to t(".faq.reorder_questions"), manage_archive_faq_questions_path(@archive_faq) %>
</li>
<% end %>

<li>
<%= span_if_current ts("Archive FAQ", key: "header"), archive_faqs_path %>
<%= span_if_current t(".archive_faq"), archive_faqs_path %>
</li>
<% if policy(KnownIssue).admin_index? %>
<li>
<%= span_if_current ts("Known Issues", key: "header"), known_issues_path %>
<%= span_if_current t(".known_issues"), known_issues_path %>
</li>
<% end %>
<li>
<%= span_if_current ts("Wrangling Guidelines", key: "header"),
wrangling_guidelines_path %>
<%= span_if_current t(".wrangling_guidelines"), wrangling_guidelines_path %>
</li>
</ul>
11 changes: 11 additions & 0 deletions config/locales/views/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ en:
queue: Manage Queue
requests: Manage Requests
page_heading: Invite New Users
admin_nav:
ao3_news: AO3 News
archive_faq: Archive FAQ
faq:
reorder_questions: Reorder Questions
known_issues: Known Issues
landmark: Admin Navigation
news:
delete_post: Delete Post
post_ao3_news: Post AO3 News
wrangling_guidelines: Wrangling Guidelines
admin_options:
delete:
bookmark: Delete Bookmark
Expand Down

0 comments on commit 2dfbcdb

Please sign in to comment.