Skip to content

Commit

Permalink
Refactor/dashboard strings (#11151)
Browse files Browse the repository at this point in the history
* Replace view strings with yml translation

* Add yml translations

* Update app/views/dashboard/dashboard.html.erb

Co-authored-by: Tilda Udufo <mathildaudufo@gmail.com>

* Update app/views/dashboard/dashboard.html.erb

Co-authored-by: Tilda Udufo <mathildaudufo@gmail.com>

Co-authored-by: Tilda Udufo <mathildaudufo@gmail.com>
  • Loading branch information
z-prince and TildaDares authored May 30, 2022
1 parent 83ccbc3 commit 2dcb301
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/views/dashboard/dashboard.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">×</button>

<h2>Hello, welcome to Public Lab!</h2>
<h2><%= translation('dashboard.dashboard.welcome') %></h2>

<%= translation('dashboard.dashboard.description') %>

This is your dashboard, where recent updates from other community members show up. It'll keep you updated with
recent progress, news and developments.
<br>
To get started at Public Lab, try:
<%= translation('dashboard.dashboard.get_started') %>
<br><br>
<p>
<a class="btn btn-sm btn-light" href="/questions" target="_blank">
Asking a question
<%= translation('dashboard.dashboard.ask_question') %>
</a>

<a class="btn btn-sm btn-light" href="/methods" target="_blank">
Exploring projects
<%= translation('dashboard.dashboard.explore_projects') %>
</a>
</p>
</div>
Expand Down
5 changes: 5 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,11 @@ en:
your_work: "Your work"
share_work: "Share your work"
dashboard:
welcome: "Hello, welcome to Public Lab!"
description: "This is your dashboard, where recent updates from other community members show up. It'll keep you updated with recent progress, news and developments."
get_started: "To get started at Public Lab, try:"
ask_question: "Asking a question"
explore_projects: "Exploring projects"
from_blog: "From the <a href='%{url}'>Public Lab Blog</a>"
by: "by"
_node_event:
Expand Down

0 comments on commit 2dcb301

Please sign in to comment.