Translate some texts from Dashboard Page (#14963)
* Extract some text from dashboard * Fix template code Signed-off-by: Bervianto Leo Pratama <bervianto.leo@gmail.com> * Update translation for upload_a_video * Fix wrong link * Fix missing keys * Seperate plural posts & followers
This commit is contained in:
parent
30b36ab014
commit
acbda16b8a
6 changed files with 41 additions and 17 deletions
|
|
@ -4,7 +4,7 @@
|
|||
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "show" && (params[:which] == "organization" || params[:which].blank?) %>"
|
||||
href="<%= dashboard_path %>"
|
||||
<%= params[:action] == "show" && (params[:which] == "organization" || params[:which].blank?) ? ' aria-current="page"'.html_safe : "" %>>
|
||||
Posts
|
||||
<%= t("core.posts") %>
|
||||
<span class="crayons-indicator"><%= @user.articles_count %></span>
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "series" && (params[:which] == "organization" || params[:which].blank?) %>"
|
||||
href="<%= user_series_path(current_user.username) %>"
|
||||
<%= params[:action] == "series" && (params[:which] == "organization" || params[:which].blank?) ? ' aria-current="page"'.html_safe : "" %>>
|
||||
Series
|
||||
<%= t("core.series") %>
|
||||
<span class="crayons-indicator"><%= @user.collections.count %></span>
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "followers" %>"
|
||||
href="/dashboard/user_followers"
|
||||
<%= params[:action] == "followers" ? ' aria-current="page"'.html_safe : "" %>>
|
||||
Followers
|
||||
<%= t("core.followers") %>
|
||||
<span class="crayons-indicator"><%= @user.followers_count %></span>
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -65,14 +65,14 @@
|
|||
|
||||
<li>
|
||||
<a class="crayons-link crayons-link--block" href="/listings/dashboard" data-no-instant>
|
||||
Listings
|
||||
<%= t("core.listings") %>
|
||||
<%= inline_svg_tag("external-link.svg", aria_hidden: true, class: "crayons-icon") %>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="crayons-link crayons-link--block" href="<%= dashboard_analytics_path %>">
|
||||
Analytics
|
||||
<%= t("core.analytics") %>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
|
||||
<% if policy(:video).new? && policy(:video).enabled? %>
|
||||
<li>
|
||||
<a class="crayons-btn crayons-btn--secondary w-100 mt-4" href="<%= new_video_path %>" data-no-instant> Upload a video</a>
|
||||
<a class="crayons-btn crayons-btn--secondary w-100 mt-4" href="<%= new_video_path %>" data-no-instant> <%= t("dashboard.upload_a_video") %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<div class="block m:hidden px-2">
|
||||
<select id="mobile_nav_dashboard" class="crayons-select">
|
||||
<option value="/dashboard" <%= "selected" if params[:action] == "show" && (params[:which] == "organization" || params[:which].blank?) %>>Posts (<%= @user.articles_count %>)</option>
|
||||
<option value="/dashboard/user_followers" <%= "selected" if params[:action] == "followers" %>>Followers (<%= @user.followers_count %>)</option>
|
||||
<option value="/dashboard" <%= "selected" if params[:action] == "show" && (params[:which] == "organization" || params[:which].blank?) %>><%= t("core.posts") %> (<%= @user.articles_count %>)</option>
|
||||
<option value="/dashboard/user_followers" <%= "selected" if params[:action] == "followers" %>><%= t("core.followers") %>(<%= @user.followers_count %>)</option>
|
||||
<option value="/dashboard/following_tags" <%= "selected" if params[:action] == "following_tags" %>>Following tags (<%= @user.following_tags_count %>)</option>
|
||||
<option value="/dashboard/following_users" <%= "selected" if params[:action] == "following_users" %>>Following users (<%= @user.following_users_count %>)</option>
|
||||
<option value="/dashboard/following_organizations" <%= "selected" if params[:action] == "following_organizations" %>>Following organizations (<%= @user.following_organizations_count %>)</option>
|
||||
<option value="/dashboard/following_podcasts" <%= "selected" if params[:action] == "following_podcasts" %>>Following podcasts (<%= @user.following_podcasts_count %>)</option>
|
||||
|
||||
<option value="/listings/dashboard">Listings</option>
|
||||
<option value="/listings/dashboard"><%= t("core.listings") %></option>
|
||||
|
||||
<option value="<%= dashboard_analytics_path %>">Analytics</option>
|
||||
<option value="<%= dashboard_analytics_path %>"><%= t("core.analytics") %></option>
|
||||
|
||||
<% if @organizations && (params[:which].blank? || params[:which] == "organization") %>
|
||||
<% @organizations.each do |org| %>
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
<% end %>
|
||||
|
||||
<% if policy(:video).new? && policy(:video).enabled? %>
|
||||
<option value="<%= new_video_path %>">Upload a video</option>
|
||||
<option value="<%= new_video_path %>"><%= t("dashboard.upload_a_video") %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
<div id="index-container"
|
||||
data-params="<%= params.to_json(only: %i[which per_page]) %>"
|
||||
data-which="followers">
|
||||
<header class="crayons-layout">
|
||||
<h1 class="p-2 pb-0 m:p-0 crayons-title"> » /h1>
|
||||
<main id="main-content">
|
||||
<section class="crayons-layout">
|
||||
<h1 class="p-2 pb-0 m:p-0 crayons-title">Dashboard » Followers</h1>
|
||||
<h1 class="p-2 pb-0 m:p-0 crayons-title"><%= t("core.dashboard") %> » <%= t("core.followers") %><</h1>
|
||||
<%= render "actions_mobile" %>
|
||||
</section>
|
||||
|
||||
|
|
@ -42,7 +44,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="p-9 crayons-card crayons-card--secondary align-center fs-l">You don't have any followers yet...</div>
|
||||
<div class="p-9 crayons-card crayons-card--secondary align-center fs-l"><%= t("dashboard.empty_follower") %></div>
|
||||
<% end %>
|
||||
<%= render "sublist" %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
<% title "Dashboard" %>
|
||||
<header class="crayons-layout">
|
||||
<h1 class="p-2 pb-0 m:p-0 crayons-title"></h1>
|
||||
<main id="main-content">
|
||||
<section class="crayons-layout">
|
||||
<h1 class="p-2 pb-0 m:p-0 crayons-title">Dashboard</h1>
|
||||
<h1 class="p-2 pb-0 m:p-0 crayons-title"><%= t("core.dashboard") %></h1>
|
||||
<%= render "actions_mobile" %>
|
||||
<%= render "analytics" %>
|
||||
</section>
|
||||
|
|
@ -13,7 +15,7 @@
|
|||
|
||||
<div class="crayons-layout__content flex flex-col">
|
||||
<div class="flex items-center justify-between mb-3">
|
||||
<h2 class="hidden m:block crayons-subtitle-2">Posts</h2>
|
||||
<h2 class="hidden m:block crayons-subtitle-2"><%= t("core.posts") %></h2>
|
||||
|
||||
<div class="flex flex-wrap">
|
||||
<% if params[:which] != "organization" %>
|
||||
|
|
@ -59,8 +61,8 @@
|
|||
<% image_url = Images::Optimizer.call(Settings::General.mascot_image_url, width: 300, crop: "imagga_scale") %>
|
||||
<%= image_tag(image_url, class: "sloan mb-7", alt: "Mascot image") %>
|
||||
<% end %>
|
||||
<p class="mb-6">This is where you can manage your posts, but you haven't written anything yet.</p>
|
||||
<p><a href="/new" class="crayons-btn crayons-btn--l">Write your first post now</a></p>
|
||||
<p class="mb-6"><%= t("dashboard.empty_post") %></p>
|
||||
<p><a href="/new" class="crayons-btn crayons-btn--l"><%= t("dashboard.write_new_post") %></a></p>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -3,16 +3,20 @@ en:
|
|||
core:
|
||||
add_comment: Add comment
|
||||
all: All
|
||||
analytics: Analytics
|
||||
comment: Comment
|
||||
copy_link: Copy link
|
||||
community_name_is_great: "%{community_name} is great!"
|
||||
create_account: Create account
|
||||
create_post: Create Post
|
||||
dashboard: Dashboard
|
||||
discussion: Discussion
|
||||
edit_profile: Edit profile
|
||||
feed: Feed
|
||||
follow: Follow
|
||||
follow_back: Follow back
|
||||
follower: Follower
|
||||
followers: Followers
|
||||
following: Following
|
||||
following_tags: "Following tags"
|
||||
full: Full
|
||||
|
|
@ -27,6 +31,7 @@ en:
|
|||
my_tags: My Tags
|
||||
popular_tags: Popular Tags
|
||||
post: Post
|
||||
posts: Posts
|
||||
reaction: Reaction
|
||||
reactions:
|
||||
heart: Heart
|
||||
|
|
@ -37,6 +42,7 @@ en:
|
|||
report_abuse: Report abuse
|
||||
search: Search
|
||||
see_all: See all
|
||||
series: Series
|
||||
share_to: Share to %{media}
|
||||
tags: "Tags"
|
||||
tags_to_follow: "Tags to follow on %{community_name}"
|
||||
|
|
@ -50,10 +56,14 @@ en:
|
|||
if_we_can_help_html: <a href="/contact">Contact us</a> if there is anything we can help with.
|
||||
if_any_questions_html: <a href="/contact">Contact us</a> if you have any questions.
|
||||
dashboard:
|
||||
empty_follower: You don't have any followers yet...
|
||||
empty_post: This is where you can manage your posts, but you haven't written anything yet.
|
||||
following_users: Following users
|
||||
loading: loading...
|
||||
not_following_any_users: You don't follow any users...
|
||||
page_title: Dashboard
|
||||
upload_a_video: Upload a video
|
||||
write_new_post: Write your first post now
|
||||
errors:
|
||||
messages:
|
||||
accepted: must be accepted
|
||||
|
|
|
|||
|
|
@ -3,16 +3,20 @@ fr:
|
|||
core:
|
||||
add_comment: Ajouter un commentaire
|
||||
all: Tout
|
||||
analytics: Analytique
|
||||
comment: Commentaire
|
||||
community_name_is_great: "%{community_name} est super"
|
||||
copy_link: Copier le lien
|
||||
create_account: Créer un profil
|
||||
create_post: Créer une publication
|
||||
dashboard: Tableau de bord
|
||||
discussion: Discussion
|
||||
edit_profile: Editer le profil
|
||||
feed: Fil
|
||||
follow: Suivre
|
||||
follow_back: Suivre aussi
|
||||
follower: Suiveur
|
||||
followers: Suiveurs
|
||||
following: Abonné
|
||||
following_tags: Sujets suivis
|
||||
full: Complet
|
||||
|
|
@ -27,6 +31,7 @@ fr:
|
|||
my_tags: Mes sujets
|
||||
popular_tags: Sujets populaires
|
||||
post: Publication
|
||||
posts: Publications
|
||||
reaction: Réaction
|
||||
reactions:
|
||||
heart: Coeur
|
||||
|
|
@ -37,6 +42,7 @@ fr:
|
|||
report_abuse: Signaler un abus
|
||||
search: Recherche
|
||||
see_all: Tout voir
|
||||
series: Séries
|
||||
share_to: Partager sur %{media}
|
||||
tags: Sujets
|
||||
tags_to_follow: Sujets dans %{community_name}
|
||||
|
|
@ -50,10 +56,14 @@ fr:
|
|||
if_we_can_help_html: <a href="/contact">Contactez-nous</a> si nous pouvons vous aider.
|
||||
if_any_questions_html: <a href="/contact">Contactez-nous</a> si vous avez des questions.
|
||||
dashboard:
|
||||
empty_follower: Vous n'avez pas encore d'abonnés...
|
||||
empty_post: C'est ici que vous pouvez gérer vos messages, mais vous n'avez encore rien écrit
|
||||
following_users: Utilisateurs suivis
|
||||
loading: Chargement en cours...
|
||||
not_following_any_users: Vous ne suivez aucun utilisateur...
|
||||
page_title: Tableau de bord
|
||||
upload_a_video: Charger une vidéo
|
||||
write_new_post: Écrivez votre premier message maintenant
|
||||
date:
|
||||
abbr_month_names:
|
||||
-
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue