Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve locale #5371

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</a>
<% end %>

<%= link_to "Releases", news_url, class: "header__nav-link #{active?(news_path)}" %>
<%= link_to t('.footer.releases'), news_url, class: "header__nav-link #{active?(news_path)}" %>
<%= link_to t('.footer.blog'), "https://blog.rubygems.org", class: "header__nav-link" %>

<%- if request.path_info == '/gems' %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/owners/_owners_table.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
<%= ownership.confirmed_at.strftime("%Y-%m-%d %H:%M %Z") if ownership.confirmed? %>
</td>
<td class="owners__cell" data-title="Action">
<%= button_to "Remove",
<%= button_to t("remove"),
rubygem_owner_path(@rubygem.slug, ownership.user.display_id),
method: "delete",
data: { confirm: t("owners.index.confirm_remove") },
class: "form__submit form__submit--small" %>
<br/>
<%= button_to "Edit",
<%= button_to t("edit"),
edit_rubygem_owner_path(@rubygem.name, ownership.user.display_id),
disabled: ownership.user == current_user,
method: "get",
Expand Down
16 changes: 8 additions & 8 deletions app/views/passwords/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<% @title = t('.title') %>
<% @title = t(".title") %>

<%= form_for(:password_reset, url: password_path, html: { method: :put }) do |form| %>
<%= error_messages_for @user %>
<div class="password_field">
<%= form.label :password, "Password", :class => 'form__label' %>
<%= form.password_field :password, autocomplete: 'new-password', class: 'form__input' %>
<%= form.label :password, t("activerecord.attributes.user.password"), :class => "form__label" %>
<%= form.password_field :password, autocomplete: "new-password", class: "form__input" %>
</div>
<div class="form__checkbox">
<%= form.check_box :reset_api_key, { :class => 'form__checkbox__input' } , 'true', 'false' %>
<%= form.label :reset_api_key, t('settings.edit.api_access.reset'), :class => 'form__checkbox__label' %>
<%= form.check_box :reset_api_key, { :class => "form__checkbox__input" } , "true", "false" %>
<%= form.label :reset_api_key, t("settings.edit.api_access.reset"), :class => "form__checkbox__label" %>
</div>
<div class="form__checkbox">
<%= form.check_box :reset_api_keys, { :class => 'form__checkbox__input' } , 'true', 'false' %>
<%= form.label :reset_api_keys, t('settings.edit.api_access.reset_all'), :class => 'form__checkbox__label' %>
<%= form.check_box :reset_api_keys, { :class => "form__checkbox__input" } , "true", "false" %>
<%= form.label :reset_api_keys, t("settings.edit.api_access.reset_all"), :class => "form__checkbox__label" %>
</div>

<div class="form_bottom">
<%= form.submit t('.submit'), :data => {:disable_with => t('form_disable_with')}, :class => 'form__submit' %>
<%= form.submit t(".submit"), :data => { :disable_with => t("form_disable_with") }, :class => "form__submit" %>
</div>
<% end %>
18 changes: 9 additions & 9 deletions app/views/profiles/delete.html.erb
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
<% @title = t('.title') %>
<% @title = t(".title") %>

<% if @only_owner_gems.any? %>
<div class="t-body">
<p class="page__subheading"><%= (t '.list_only_owner_html', command_link: link_to('gem owner', 'https://guides.rubygems.org/command-reference/#gem-owner')) %></p>
<p class="page__subheading"><%= (t(".list_only_owner_html", command_link: link_to("gem owner", "https://guides.rubygems.org/command-reference/#gem-owner"))) %></p>
</div>
<div id="profile">
<div class="profile-list">
<ul>
<%= render partial: 'rubygem', collection: @only_owner_gems, locals: {owners: true} %>
<%= render partial: "rubygem", collection: @only_owner_gems, locals: {owners: true} %>
</ul>
</div>
</div>
<% end %>

<% if @multi_owner_gems.any? %>
<div class="t-body">
<p class="page__subheading push--s"><%= t '.list_multi_owner' %></p>
<p class="page__subheading push--s"><%= t(".list_multi_owner") %></p>
</div>
<div id="profile">
<div class="profile-list">
<ul>
<%= render partial: 'rubygem', collection: @multi_owner_gems, locals: {owners: true} %>
<%= render partial: "rubygem", collection: @multi_owner_gems, locals: {owners: true} %>
</ul>
</div>
</div>
<% end %>

<div class="t-body push--s">
<p><%= t '.instructions' %></p>
<p><%= t(".instructions") %></p>
<%= form_for current_user, url: destroy_profile_path, method: :delete do |form| %>
<div class="password_field">
<%= form.label :password, "Password", class: 'form__label' %>
<%= form.password_field :password, placeholder: 'password', autocomplete: 'current-password', class: 'form__input' %>
<%= form.label :password, t("activerecord.attributes.user.password"), class: "form__label" %>
<%= form.password_field :password, autocomplete: "current-password", class: "form__input" %>
</div>
<%= form.submit t('.confirm'), data: { confirm: "This action can't be UNDONE! Are you sure?" }, class: 'form__submit' %>
<%= form.submit t(".confirm"), data: { confirm: "This action can't be UNDONE! Are you sure?" }, class: "form__submit" %>
<% end %>
</div>
65 changes: 32 additions & 33 deletions app/views/profiles/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,87 +1,86 @@
<% @title = t('.title') %>
<% @title = t(".title") %>

<%= form_for @user, :url => {:controller => 'profiles', :action => 'update'} do |form| %>
<%= form_for @user, :url => { :controller => "profiles", :action => "update" } do |form| %>
<%= error_messages_for(@user) %>

<div class="avatar_field">
<%= form.label :avatar, :class => 'form__label' %>
<%= form.label :avatar, :class => "form__label" %>
<div class="l-overflow">
<%= avatar(160) %>
<% if @user.public_email? %>
<%= link_to t('.change_avatar'), 'https://www.gravatar.com', :class => 't-text t-link' %>
<%= link_to t(".change_avatar"), "https://www.gravatar.com", :class => "t-text t-link" %>
<% else %>
<%= content_tag 'i', t('.disabled_avatar_html'), :class => 't-text' %>
<%= content_tag "i", t(".disabled_avatar_html"), :class => "t-text" %>
<% end %>
</div>
</div>

<div class="text_field">
<%= form.label :handle, :class => 'form__label' %>
<%= form.text_field :handle, :class => 'form__input' %>
<%= form.label :handle, :class => "form__label" %>
<%= form.text_field :handle, :class => "form__input" %>
</div>

<div class="text_field">
<%= form.label :twitter_username, class: 'form__label form__label__icon-container' do %>
<%= form.label :twitter_username, class: "form__label form__label__icon-container" do %>
<%=
image_tag("/images/x_icon.png", alt: 'X icon', class: 'form__label__icon')
image_tag("/images/x_icon.png", alt: "X icon", class: "form__label__icon")
%>

<span class='form__label__text'><%= t('.twitter_username') %></span>
<span class="form__label__text"><%= t(".twitter_username") %></span>
<% end %>

<p class='form__field__instructions'>
<%= t('.optional_twitter_username') %>
<p class="form__field__instructions">
<%= t(".optional_twitter_username") %>
</p>

<div class="form__input__addon-container form__input__addon-left">
<span class="form__input__addon">@</span>
<%= form.text_field(:twitter_username, class: 'form__input') %>
<%= form.text_field(:twitter_username, class: "form__input") %>
</div>
</div>

<% if current_user.unconfirmed_email %>
<div class="push--bottom-s">
<p class='form__field__instructions'>
<%= t('.email_awaiting_confirmation', unconfirmed_email: current_user.unconfirmed_email) %>
<p class="form__field__instructions">
<%= t(".email_awaiting_confirmation", unconfirmed_email: current_user.unconfirmed_email) %>
</p>
<%= link_to "Resend confirmation", unconfirmed_email_confirmations_path, method: :patch, class: 'form__field__instructions t-link' %>
<%= link_to "Resend confirmation", unconfirmed_email_confirmations_path, method: :patch, class: "form__field__instructions t-link" %>
</div>
<% end %>

<div class="text_field">
<%= form.label :email, :class => 'form__label' %>
<%= form.email_field :email, name: 'user[unconfirmed_email]', class: 'form__input' %>
<%= form.label :email, :class => "form__label" %>
<%= form.email_field :email, name: "user[unconfirmed_email]", class: "form__input" %>
</div>

<div class="text_field">
<%= form.label :full_name, :class => 'form__label' %>
<p class='form__field__instructions'>
<%= t('.optional_full_name') %>
<%= form.label :full_name, :class => "form__label" %>
<p class="form__field__instructions">
<%= t(".optional_full_name") %>
</p>
<%= form.text_field :full_name, :class => 'form__input' %>
<%= form.text_field :full_name, :class => "form__input" %>
</div>

<div class="password_field">
<%= form.label :password, :class => 'form__label' %>
<p class='form__field__instructions'>
<%= t('.enter_password') %>
<%= form.label :password, t("activerecord.attributes.user.password"), :class => "form__label" %>
<p class="form__field__instructions">
<%= t(".enter_password") %>
</p>
<%= form.password_field :password, autocomplete: 'current-password', class: 'form__input', required: true %>
<%= form.password_field :password, autocomplete: "current-password", class: "form__input", required: true %>
</div>


<div class="profile-checkbox form__checkbox">
<%= form.check_box :public_email, :class => 'form__checkbox__input' %>
<%= form.label :public_email, t('profiles.public_email'), :class => 'form__checkbox__label' %>
<%= form.check_box :public_email, :class => "form__checkbox__input" %>
<%= form.label :public_email, t("profiles.public_email"), :class => "form__checkbox__label" %>
</div>

<div class="submit_field">
<%= form.submit 'Update', :data => {:disable_with => t('form_disable_with')}, :class => 'form__submit' %>
<%= form.submit t("update"), :data => { :disable_with => t("form_disable_with") }, :class => "form__submit" %>
</div>
<% end %>

<div class="t-body">
<h2><%= t '.delete.delete_profile' %></h2>
<p><%= t '.delete.warning' %></p>
<%= button_to t('.delete.delete'), delete_profile_path, method: 'get', class: 'form__submit' %>
<h2><%= t(".delete.delete_profile") %></h2>
<p><%= t(".delete.warning") %></p>
<%= button_to t(".delete.delete"), delete_profile_path, method: "get", class: "form__submit" %>
</div>
12 changes: 6 additions & 6 deletions app/views/settings/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% @title = t(".title") %>

<div class="t-body">
<h2 class="page__subheading"><%= t ".mfa.multifactor_auth" %></h2>
<h2 class="page__subheading"><%= t(".mfa.multifactor_auth") %></h2>
<% if @user.mfa_enabled? %>
<div class="mfa__header-wrapper">
<h2 class="mfa__header mfa__header--compact"><%= t(".mfa.level.title")%></h2>
Expand Down Expand Up @@ -62,21 +62,21 @@
</div>

<div class="t-body">
<h2><%= link_to t('.reset_password.title'), new_password_path %></h2>
<h2><%= link_to t(".reset_password.title"), new_password_path %></h2>
</div>

<div class="t-body">
<h2><%= link_to t('api_keys.index.api_keys'), profile_api_keys_path %></h2>
<h2><%= link_to t("api_keys.index.api_keys"), profile_api_keys_path %></h2>
</div>

<div class="t-body">
<h2><%= link_to t('oidc.pending_trusted_publishers.index.title'), profile_oidc_pending_trusted_publishers_path %></h2>
<span>Pending trusted publishers allow you to configure trusted publishing before you have pushed the first version of a gem. For more information about how to set up trusted publishing, see <a href="https://guides.rubygems.org/trusted-publishing/pushing-a-new-gem/">the trusted publishing documentation</a>.</span>
<h2><%= link_to t("oidc.pending_trusted_publishers.index.title"), profile_oidc_pending_trusted_publishers_path %></h2>
<span><%= t("oidc.pending_trusted_publishers.index.description_html") %></span>
</div>

<% if @user.oidc_api_key_roles.any? %>
<div class="t-body">
<h2><%= link_to t('oidc.api_key_roles.index.api_key_roles'), profile_oidc_api_key_roles_path %></h2>
<h2><%= link_to t("oidc.api_key_roles.index.api_key_roles"), profile_oidc_api_key_roles_path %></h2>
</div>
<% end %>

Expand Down
2 changes: 2 additions & 0 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ de:
total_downloads: Downloads insgesamt
try_again: Etwas ist schiefgelaufen. Bitte versuchen Sie es erneut.
update: Aktualisieren
remove:
view_all: Alle anzeigen
advanced_search: Erweiterte Suche
authenticate: Authentifizieren
Expand Down Expand Up @@ -268,6 +269,7 @@ de:
hosted_by: Gehostet von
monitored_by: Überwacht von
optimized_by: Optimiert mit
releases:
resolved_with: Aufgelöst mit
security: Security
source_code: Code
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ en:
total_downloads: Total downloads
try_again: Something went wrong. Please try again.
update: Update
remove: Remove
view_all: View all
advanced_search: Advanced Search
authenticate: Authenticate
Expand Down Expand Up @@ -254,6 +255,7 @@ en:
hosted_by: Hosted by
monitored_by: Monitored by
optimized_by: Optimized by
releases: Releases
resolved_with: Resolved with
security: Security
source_code: Code
Expand Down
2 changes: 2 additions & 0 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ es:
total_downloads: Total de descargas
try_again: Algo salió mal. Por favor inténtalo nuevamente.
update: Actualizar
remove:
view_all: Ver todo
advanced_search: Búsqueda avanzada
authenticate: Autenticar
Expand Down Expand Up @@ -267,6 +268,7 @@ es:
hosted_by: Alojado por
monitored_by: Monitoreado por
optimized_by: Optimizado por
releases:
resolved_with: DNS
security: Seguridad
source_code: Código fuente
Expand Down
2 changes: 2 additions & 0 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ fr:
total_downloads: Total de téléchargements
try_again: Une erreur est survenue. Veuillez réessayer.
update: Mise à jour
remove:
view_all: Voir tout
advanced_search: Recherche avancée
authenticate:
Expand Down Expand Up @@ -259,6 +260,7 @@ fr:
hosted_by: Hébergé par
monitored_by: Monitoring par
optimized_by: Optimisé par
releases:
resolved_with: Résolu par
security: Security
source_code: Code
Expand Down
18 changes: 10 additions & 8 deletions config/locales/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ ja:
total_downloads: 累計ダウンロード数
try_again: エラーが発生しました。再試行してください。
update: 更新
remove: 削除
view_all: 全て表示
advanced_search: 高度な検索
authenticate: 認証
Expand Down Expand Up @@ -248,6 +249,7 @@ ja:
hosted_by: ホスト
monitored_by: 監視
optimized_by: 最適化
releases: リリース
resolved_with: DNS
security: セキュリティ
source_code: コード
Expand Down Expand Up @@ -713,13 +715,13 @@ ja:
header: "%{title}依存関係"
gem_members:
authors_header: 作者
self_no_mfa_warning_html: アカウントをセキュアに保つため、<a href="/settings/edit">多要素認証 (MFA)
self_no_mfa_warning_html: アカウントをセキュアに保つため、<a href="/settings/edit">多要素認証MFA
の有効化</a>をご検討ください。
not_using_mfa_warning_show: 多要素認証 (MFA) を使っていない所有者がいます。完全な一覧を見るにはクリックしてください。
not_using_mfa_warning_hide: "* 以下の所有者は多要素認証 (MFA) を使っていません。クリックして隠します。"
not_using_mfa_warning_show: 多要素認証MFAを使っていない所有者がいます。完全な一覧を見るにはクリックしてください。
not_using_mfa_warning_hide: "* 以下の所有者は多要素認証MFAを使っていません。クリックして隠します。"
owners_header: 所有者
pushed_by: プッシュ者
using_mfa_info: "* 全ての所有者が多要素認証 (MFA) を使っています。"
using_mfa_info: "* 全ての所有者が多要素認証MFAを使っています。"
yanked_by: ヤンク者
sha_256_checksum: SHA 256チェックサム
signature_period: シグネチャの有効期限
Expand Down Expand Up @@ -943,7 +945,7 @@ ja:
create: 作成
description_html: |
待機中の信頼できる発行元を使うと、gemの最初のバージョンをプッシュする前に信頼できる発行元を構成できます。
信頼できる発行元を設定する方法についてより詳しくは、<a href="https://guides.rubygems.org/trusted-publishing/pushing-a-new-gem/" class="t-link">信頼できる発行元のドキュメント</a>を参照してください。
信頼できる発行元を設定する方法についてより詳しくは、<a href="https://guides.rubygems.org/trusted-publishing/pushing-a-new-gem/" class="t-link">信頼できる発行元のドキュメント</a>を参照してください。
destroy:
success: 待機中の信頼できる発行元が削除されました
create:
Expand Down Expand Up @@ -993,7 +995,7 @@ ja:
version_yanked: バージョンがヤンクされました
version_unyanked: バージョンのヤンクが取り消されました
version_html: バージョン:%{version}
version_pushed_sha256_html: 'SHA256: %{sha256}'
version_pushed_sha256_html: SHA256%{sha256}
version_pushed_by_html: プッシュ者:%{pusher}
version_yanked_by_html: ヤンク者:%{pusher}
owner:
Expand Down Expand Up @@ -1024,6 +1026,6 @@ ja:
api_key_deleted: APIキーが削除されました
api_key_name: 名前:%{name}
api_key_scopes: スコープ:%{scopes}
api_key_gem_html: 'gem: %{gem}'
api_key_mfa: 'MFA: %{mfa}'
api_key_gem_html: gem%{gem}
api_key_mfa: MFA%{mfa}
not_required: 必要ではありません
2 changes: 2 additions & 0 deletions config/locales/nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ nl:
total_downloads:
try_again: Er is iets fout gegaan, probeer het opnieuw.
update: Wijzig
remove:
view_all: Bekijk alles
advanced_search: Uitgebreid zoeken
authenticate:
Expand Down Expand Up @@ -250,6 +251,7 @@ nl:
hosted_by: Hosting
monitored_by: Monitoring
optimized_by: Optimalisatie
releases:
resolved_with: DNS
security: Security
source_code: Code
Expand Down
Loading
Loading