I18nize organizations (#15042)

* views/organizations i18n

* remove ja.yml

* Update en.yml

* Update fr.yml
This commit is contained in:
yheuhtozr 2021-10-28 05:41:41 +09:00 committed by GitHub
parent 7613b6caa3
commit b5ca92741a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 80 additions and 17 deletions

View file

@ -13,7 +13,7 @@
<header class="profile-header crayons-card mt-2">
<div class="relative profile-header__top">
<span class="crayons-logo crayons-logo--3xl">
<img src="<%= Images::Profile.call(@user.profile_image_url, length: 320) %>" alt="<%= @user.name %> logo" width="128" height="128" alt="<%= @user.name %> profile picture" class="crayons-logo__image">
<img src="<%= Images::Profile.call(@user.profile_image_url, length: 320) %>" alt="<%= @user.name %> logo" width="128" height="128" title="<%= t("views.organizations.logo", org: @user.name) %>" class="crayons-logo__image">
</span>
<div class="profile-header__actions">
@ -21,7 +21,7 @@
id="user-follow-butt"
class="crayons-btn whitespace-nowrap follow-action-button"
data-info='{"id":<%= @user.id %>,"className":"<%= @user.class.name %>", "name": "<%= @user.name %>"}'>
<%= t("core.follow") %>
<%= t("views.organizations.follow") %>
</button>
</div>
</div>
@ -31,36 +31,35 @@
<% if @user.tag_line.present? %>
<p class="fs-l m:fs-xl color-base-70 mb-4 mx-auto max-w-100 m:max-w-75"><%= sanitize @user.tag_line %></p>
<% end %>
<p class="fs-base m:fs-l color-base-90 mb-4 mx-auto max-w-100 m:max-w-75"><%= sanitize(@user.summary.presence || "404 bio not found") %></p>
<p class="fs-base m:fs-l color-base-90 mb-4 mx-auto max-w-100 m:max-w-75"><%= sanitize(@user.summary.presence || t("views.organizations.empty")) %></p>
<div class="profile-header__meta">
<% if @organization.location.present? %>
<span class="profile-header__meta__item">
<%= inline_svg_tag("location.svg", aria: true, class: "crayons-icon mr-2 shrink-0", title: t("core.location")) %>
<%= inline_svg_tag("location.svg", aria: true, class: "crayons-icon mr-2 shrink-0", title: t("views.organizations.location.icon")) %>
<%= sanitize @organization.location %>
</span>
<% end %>
<span class="profile-header__meta__item">
<%= inline_svg_tag("cake.svg", aria: true, class: "crayons-icon mr-2 shrink-0", title: t("core.joined")) %>
<%= t("core.joined_on") %>&nbsp;
<%= local_date(@user.created_at) %>
<%= inline_svg_tag("cake.svg", aria: true, class: "crayons-icon mr-2 shrink-0", title: t("views.organizations.joined.icon")) %>
<%= t("views.organizations.joined.text_html", date: local_date(@user.created_at)) %>
</span>
<span class="profile-header__meta__item -ml-1">
<% if @user.twitter_username.present? %>
<a href="https://twitter.com/<%= @user.twitter_username %>" target="_blank" rel="noopener me" class="px-1 align-middle inline-block">
<%= inline_svg_tag("twitter.svg", class: "crayons-icon", aria: true, title: "Twitter logo") %>
<%= inline_svg_tag("twitter.svg", class: "crayons-icon", aria: true, title: t("views.organizations.twitter.icon")) %>
</a>
<% end %>
<% if @user.github_username.present? %>
<a href="https://github.com/<%= @user.github_username %>" target="_blank" rel="noopener me" class="px-1 align-middle inline-block">
<%= inline_svg_tag("github.svg", class: "crayons-icon", aria: true, title: "GitHub logo") %>
<%= inline_svg_tag("github.svg", class: "crayons-icon", aria: true, title: t("views.organizations.github.icon")) %>
</a>
<% end %>
<% if @user.profile.website_url.present? %>
<a href="<%= @user.profile.website_url %>" target="_blank" rel="noopener nofollow me" class="px-1 align-middle inline-block">
<%= inline_svg_tag("external.svg", class: "crayons-icon", aria: true, title: "External link icon") %>
<%= inline_svg_tag("external.svg", class: "crayons-icon", aria: true, title: t("views.organizations.external.icon")) %>
</a>
<% end %>
</span>

View file

@ -2,7 +2,7 @@
<div class="profile-header__bottom fs-base">
<% if @organization.email.present? %>
<div class="crayons-definition">
<strong class="crayons-definition__title">Support email</strong>
<strong class="crayons-definition__title"><%= t("views.organizations.support") %></strong>
<p class="crayons-definition__value">
<a href="mailto:<%= sanitize @organization.email %>">
<%= sanitize @organization.email %>
@ -13,7 +13,7 @@
<% if @organization.company_size.present? %>
<div class="crayons-definition">
<strong class="crayons-definition__title">Employees</strong>
<strong class="crayons-definition__title"><%= t("views.organizations.size") %></strong>
<p class="crayons-definition__value"><%= @organization.company_size %></p>
</div>
<% end %>

View file

@ -4,7 +4,7 @@
<% if @organization.story.present? %>
<div class="widget">
<header>
<h4>our story</h4>
<h4><%= t("views.organizations.story") %></h4>
</header>
<div class="widget-body">
<%= sanitized_sidebar @organization.story %>
@ -14,7 +14,7 @@
<% if @organization.tech_stack.present? %>
<div class="widget">
<header>
<h4>our stack</h4>
<h4><%= t("views.organizations.stack") %></h4>
</header>
<div class="widget-body">
<%= sanitized_sidebar @organization.tech_stack %>

View file

@ -3,7 +3,7 @@
<div class="side-bar sidebar-additional showing" id="sidebar-additional">
<% @organization.sponsorships.live.find_each do |sponsorship| %>
<div class="sidebar-sponsorship-level">
<%= sponsorship.level.capitalize %> Community Sponsor ❤️
<%= t("views.organizations.sponsor.text", level: t("views.organizations.sponsor.level.#{sponsorship.level}")) %>
</div>
<% end %>
@ -13,7 +13,7 @@
<% if @organization.users.any? %>
<div class="widget">
<div class="widget-suggested-follows-container">
<header><h4>meet the team</h4></header>
<header><h4><%= t("views.organizations.team") %></h4></header>
<div class="widget-body">
<% @organization.users.find_each do |user| %>
<div class="widget-user-pic">

View file

@ -18,7 +18,7 @@
<% end %>
</div>
<div class="loading-articles" id="loading-articles">
loading...
<%= t("core.loading") %>
</div>
</div>
<%= render "organizations/sidebar_additional" %>

View file

@ -0,0 +1,32 @@
---
en:
views:
organizations:
empty: 404 bio not found
external:
icon: External link icon
follow: Follow
github:
icon: GitHub logo
joined:
icon: Joined
text_html: "Joined on\_%{date}"
location:
icon: Location
logo: "%{org} profile picture"
size: Employees
sponsor:
text: "%{level} Community Sponsor ❤️"
level:
gold: Gold
silver: Silver
bronze: Bronze
tag: Tag
media: Media
devrel: Devrel
stack: our stack
story: our story
support: Support email
team: meet the team
twitter:
icon: Twitter logo

View file

@ -0,0 +1,32 @@
---
fr:
views:
organizations:
empty: 404 bio not found
external:
icon: External link icon
follow: Suivre
github:
icon: GitHub logo
joined:
icon: Rejoint
text_html: "Rejoint le\_%{date}"
location:
icon: Lieu
logo: "%{org} profile picture"
size: Employees
sponsor:
text: "%{level} Community Sponsor ❤️"
level:
gold: Gold
silver: Silver
bronze: Bronze
tag: Tag
media: Media
devrel: Devrel
stack: our stack
story: our story
support: Support email
team: meet the team
twitter:
icon: Twitter logo