From 60f9df4e2598578cb9535fabb8e9d76837687702 Mon Sep 17 00:00:00 2001 From: Masahiro Date: Wed, 22 Jan 2025 01:12:04 +0900 Subject: [PATCH] Improve locale (#5371) * Add 'remove' key to locale files * Add 'releases' key to locale files * Refactor japanese locale * Replace text with locale text * Remove unnecessary placeholder --- app/views/layouts/application.html.erb | 2 +- app/views/owners/_owners_table.html.erb | 4 ++-- app/views/passwords/edit.html.erb | 2 +- app/views/profiles/delete.html.erb | 4 ++-- app/views/profiles/edit.html.erb | 4 ++-- app/views/settings/edit.html.erb | 2 +- config/locales/de.yml | 2 ++ config/locales/en.yml | 2 ++ config/locales/es.yml | 2 ++ config/locales/fr.yml | 2 ++ config/locales/ja.yml | 18 ++++++++++-------- config/locales/nl.yml | 2 ++ config/locales/pt-BR.yml | 2 ++ config/locales/zh-CN.yml | 2 ++ config/locales/zh-TW.yml | 2 ++ 15 files changed, 35 insertions(+), 17 deletions(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 212e8486712..67a2f18e94b 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -50,7 +50,7 @@ <% 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' %> diff --git a/app/views/owners/_owners_table.html.erb b/app/views/owners/_owners_table.html.erb index 4ad86899233..509974d335b 100644 --- a/app/views/owners/_owners_table.html.erb +++ b/app/views/owners/_owners_table.html.erb @@ -50,13 +50,13 @@ <%= ownership.confirmed_at.strftime("%Y-%m-%d %H:%M %Z") if ownership.confirmed? %> - <%= 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" %>
- <%= button_to "Edit", + <%= button_to t("edit"), edit_rubygem_owner_path(@rubygem.name, ownership.user.display_id), disabled: ownership.user == current_user, method: "get", diff --git a/app/views/passwords/edit.html.erb b/app/views/passwords/edit.html.erb index e5e5bd17d08..544f5b45a69 100644 --- a/app/views/passwords/edit.html.erb +++ b/app/views/passwords/edit.html.erb @@ -3,7 +3,7 @@ <%= form_for(:password_reset, url: password_path, html: { method: :put }) do |form| %> <%= error_messages_for @user %>
- <%= 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' %>
diff --git a/app/views/profiles/delete.html.erb b/app/views/profiles/delete.html.erb index 9d42b613f88..078bbb9551c 100644 --- a/app/views/profiles/delete.html.erb +++ b/app/views/profiles/delete.html.erb @@ -30,8 +30,8 @@

<%= t '.instructions' %>

<%= form_for current_user, url: destroy_profile_path, method: :delete do |form| %>
- <%= 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' %>
<%= form.submit t('.confirm'), data: { confirm: "This action can't be UNDONE! Are you sure?" }, class: 'form__submit' %> <% end %> diff --git a/app/views/profiles/edit.html.erb b/app/views/profiles/edit.html.erb index 9328c5ba61d..0af673a168c 100644 --- a/app/views/profiles/edit.html.erb +++ b/app/views/profiles/edit.html.erb @@ -62,7 +62,7 @@
- <%= form.label :password, :class => 'form__label' %> + <%= form.label :password, t("activerecord.attributes.user.password"), :class => 'form__label' %>

<%= t('.enter_password') %>

@@ -76,7 +76,7 @@
- <%= 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' %>
<% end %> diff --git a/app/views/settings/edit.html.erb b/app/views/settings/edit.html.erb index 81a34d6af89..074430d9887 100644 --- a/app/views/settings/edit.html.erb +++ b/app/views/settings/edit.html.erb @@ -71,7 +71,7 @@

<%= link_to t('oidc.pending_trusted_publishers.index.title'), profile_oidc_pending_trusted_publishers_path %>

- 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 the trusted publishing documentation. + <%= t("oidc.pending_trusted_publishers.index.description_html") %>
<% if @user.oidc_api_key_roles.any? %> diff --git a/config/locales/de.yml b/config/locales/de.yml index 759b84980e3..46061fea7c8 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -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 @@ -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 diff --git a/config/locales/en.yml b/config/locales/en.yml index 6300f8e5982..bc93bc72278 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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 @@ -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 diff --git a/config/locales/es.yml b/config/locales/es.yml index ee4e6809115..3000791cd5c 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -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 @@ -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 diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 7c295b4451a..415cc280332 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -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: @@ -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 diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 186f0ebf00c..8d189eea522 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -42,6 +42,7 @@ ja: total_downloads: 累計ダウンロード数 try_again: エラーが発生しました。再試行してください。 update: 更新 + remove: 削除 view_all: 全て表示 advanced_search: 高度な検索 authenticate: 認証 @@ -243,6 +244,7 @@ ja: hosted_by: ホスト monitored_by: 監視 optimized_by: 最適化 + releases: リリース resolved_with: DNS security: セキュリティ source_code: コード @@ -700,13 +702,13 @@ ja: header: "%{title}依存関係" gem_members: authors_header: 作者 - self_no_mfa_warning_html: アカウントをセキュアに保つため、多要素認証 (MFA) + self_no_mfa_warning_html: アカウントをセキュアに保つため、多要素認証(MFA) の有効化をご検討ください。 - 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: シグネチャの有効期限 @@ -888,7 +890,7 @@ ja: create: 作成 description_html: | 待機中の信頼できる発行元を使うと、gemの最初のバージョンをプッシュする前に信頼できる発行元を構成できます。 - 信頼できる発行元を設定する方法についてより詳しくは、信頼できる発行元のドキュメントを参照してください。 + 信頼できる発行元を設定する方法についてより詳しくは、信頼できる発行元のドキュメントを参照してください。 destroy: success: 待機中の信頼できる発行元が削除されました create: @@ -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: @@ -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: 必要ではありません diff --git a/config/locales/nl.yml b/config/locales/nl.yml index c4280726b33..b3ce002e085 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -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: @@ -245,6 +246,7 @@ nl: hosted_by: Hosting monitored_by: Monitoring optimized_by: Optimalisatie + releases: resolved_with: DNS security: Security source_code: Code diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 85c15cf9db7..fef641ec9cb 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -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: @@ -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 diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 21c74d4d95d..5994fdb8e21 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -43,6 +43,7 @@ zh-CN: total_downloads: 下载总量 try_again: 出了点儿问题,请重试。 update: 更新 + remove: view_all: 查看全部 advanced_search: 高级搜索 authenticate: 身份认证 @@ -244,6 +245,7 @@ zh-CN: hosted_by: 托管 monitored_by: 监控 optimized_by: 优化 + releases: resolved_with: 解析 security: 安全 source_code: 源代码 diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 82c6b95c1f5..f45f29486ae 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -42,6 +42,7 @@ zh-TW: total_downloads: 總下載次數 try_again: 發生錯誤。請再試一次。 update: 更新 + remove: view_all: 查看全部 advanced_search: 進階搜尋 authenticate: 驗證 @@ -243,6 +244,7 @@ zh-TW: hosted_by: 托管 monitored_by: 監控 optimized_by: 最佳化 + releases: resolved_with: 解析 security: 安全 source_code: 原始碼