Skip to content

Commit

Permalink
Improve locale (#5371)
Browse files Browse the repository at this point in the history
* Add 'remove' key to locale files

* Add 'releases' key to locale files

* Refactor japanese locale

* Replace text with locale text

* Remove unnecessary placeholder
  • Loading branch information
w-masahiro-ct authored Jan 21, 2025
1 parent 94ebcdb commit 60f9df4
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 17 deletions.
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
2 changes: 1 addition & 1 deletion app/views/passwords/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%= 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.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">
Expand Down
4 changes: 2 additions & 2 deletions app/views/profiles/delete.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<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' %>
<% end %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/profiles/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</div>

<div class="password_field">
<%= form.label :password, :class => 'form__label' %>
<%= form.label :password, t("activerecord.attributes.user.password"), :class => 'form__label' %>
<p class='form__field__instructions'>
<%= t('.enter_password') %>
</p>
Expand All @@ -76,7 +76,7 @@
</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 %>

Expand Down
2 changes: 1 addition & 1 deletion app/views/settings/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

<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>
<span><%= t("oidc.pending_trusted_publishers.index.description_html") %></span>
</div>

<% if @user.oidc_api_key_roles.any? %>
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 @@ -263,6 +264,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 @@ -249,6 +250,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 @@ -262,6 +263,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 @@ -254,6 +255,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 @@ -243,6 +244,7 @@ ja:
hosted_by: ホスト
monitored_by: 監視
optimized_by: 最適化
releases: リリース
resolved_with: DNS
security: セキュリティ
source_code: コード
Expand Down Expand Up @@ -700,13 +702,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 @@ -888,7 +890,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 @@ -938,7 +940,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 @@ -969,6 +971,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 @@ -245,6 +246,7 @@ nl:
hosted_by: Hosting
monitored_by: Monitoring
optimized_by: Optimalisatie
releases:
resolved_with: DNS
security: Security
source_code: Code
Expand Down
2 changes: 2 additions & 0 deletions config/locales/pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pt-BR:
total_downloads: Total de downloads
try_again: Algo deu errado. Por favor, tente novamente.
update: Atualizar
remove:
view_all: Ver tudo
advanced_search: Busca avançada
authenticate:
Expand Down Expand Up @@ -251,6 +252,7 @@ pt-BR:
hosted_by: Hospedagem
monitored_by: Monitoramento
optimized_by: Otimizações
releases:
resolved_with: DNS
security: Segurança
source_code: Código Fonte
Expand Down
2 changes: 2 additions & 0 deletions config/locales/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ zh-CN:
total_downloads: 下载总量
try_again: 出了点儿问题,请重试。
update: 更新
remove:
view_all: 查看全部
advanced_search: 高级搜索
authenticate: 身份认证
Expand Down Expand Up @@ -244,6 +245,7 @@ zh-CN:
hosted_by: 托管
monitored_by: 监控
optimized_by: 优化
releases:
resolved_with: 解析
security: 安全
source_code: 源代码
Expand Down
2 changes: 2 additions & 0 deletions config/locales/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ zh-TW:
total_downloads: 總下載次數
try_again: 發生錯誤。請再試一次。
update: 更新
remove:
view_all: 查看全部
advanced_search: 進階搜尋
authenticate: 驗證
Expand Down Expand Up @@ -243,6 +244,7 @@ zh-TW:
hosted_by: 托管
monitored_by: 監控
optimized_by: 最佳化
releases:
resolved_with: 解析
security: 安全
source_code: 原始碼
Expand Down

0 comments on commit 60f9df4

Please sign in to comment.