Skip to content

Commit

Permalink
Offboard clipboard texts to reusable localized strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
simi committed Jan 15, 2024
1 parent 5426292 commit d922ce6
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 40 deletions.
4 changes: 2 additions & 2 deletions app/views/oidc/api_key_roles/github_actions_workflow_view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def template
header(class: "gem__code__header") do
h3(class: "t-list__heading l-mb-0") { code { ".github/workflows/push_gem.yml" } }
button(class: "gem__code__icon", data: { "clipboard-target": "#workflow_yaml" }) { "=" }
span(class: "gem__code__tooltip--copy") { t(".copy_to_clipboard") }
span(class: "gem__code__tooltip--copied") { t(".copied") }
span(class: "gem__code__tooltip--copy") { t("copy_to_clipboard") }
span(class: "gem__code__tooltip--copied") { t("copied") }
end
pre(class: "gem__code multiline") do
code(class: "multiline", id: "workflow_yaml") do
Expand Down
4 changes: 2 additions & 2 deletions app/views/rubygems/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<div class="gem__code-wrap">
<input type="text" class="gem__code" id="gemfile_text" value="<%= @latest_version.to_bundler(locked_version: @on_version_page) %>" readonly="readonly">
<span class="gem__code__icon" id="js-gem__code--gemfile" data-clipboard-target="#gemfile_text">=</span>
<span class="gem__code__tooltip--copy"><%= t('.copy_to_clipboard') %></span>
<span class="gem__code__tooltip--copied"><%= t('.copied') %></span>
<span class="gem__code__tooltip--copy"><%= t('copy_to_clipboard') %></span>
<span class="gem__code__tooltip--copied"><%= t('copied') %></span>
</div>
</h2>
<h2 class="gem__ruby-version__heading t-list__heading">
Expand Down
6 changes: 2 additions & 4 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
de:
credentials_required:
copied: Kopiert!
copy_to_clipboard: In die Zwischenablage kopieren
edit: Bearbeiten
failure_when_forbidden:
verification_expired:
Expand Down Expand Up @@ -623,8 +625,6 @@ de:
title: Gems
show:
bundler_header: Gemfile
copied: Kopiert!
copy_to_clipboard: In die Zwischenablage kopieren
install: installieren
licenses_header:
one: Lizenz
Expand Down Expand Up @@ -773,8 +773,6 @@ de:
to_automate_html:
not_github:
not_push:
copy_to_clipboard:
copied:
a_gem:
instructions_html:
new:
Expand Down
6 changes: 2 additions & 4 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
en:
credentials_required: Credentials required
copied: Copied!
copy_to_clipboard: Copy to clipboard
edit: Edit
failure_when_forbidden: Please double check the URL or try submitting it again.
verification_expired: The verification has expired. Please verify again.
Expand Down Expand Up @@ -625,8 +627,6 @@ en:
title: Gems
show:
bundler_header: Gemfile
copied: Copied!
copy_to_clipboard: Copy to clipboard
install: install
licenses_header:
one: License
Expand Down Expand Up @@ -775,8 +775,6 @@ en:
to_automate_html: "To automate releasing %{link_html} when a new tag is pushed, add the following workflow to your repository."
not_github: "This OIDC API Key Role is not configured for GitHub Actions."
not_push: "This OIDC API Key Role is not configured to allow pushing gems."
copy_to_clipboard: Copy to clipboard
copied: Copied!
a_gem: a gem
instructions_html: |
To release, <a href="https://bundler.io/guides/creating_gem.html#releasing-the-gem" rel="noreferer">bump the gem version</a> and push a new tag (using <code>rake release:source_control_push</code>) to GitHub. The workflow will automatically build the gem and push it to RubyGems.org.
Expand Down
6 changes: 2 additions & 4 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
es:
credentials_required: Credenciales requeridas
copied: "¡Copiado!"
copy_to_clipboard: Copiar al portapapeles
edit: Editar
failure_when_forbidden: Por favor verifica la URL o inténtalo nuevamente.
verification_expired:
Expand Down Expand Up @@ -736,8 +738,6 @@ es:
title: Gemas
show:
bundler_header: Gemfile
copied: "¡Copiado!"
copy_to_clipboard: Copiar al portapapeles
install: instalar
licenses_header:
one: Licencia
Expand Down Expand Up @@ -920,8 +920,6 @@ es:
Actions.
not_push: Este rol de clave API OIDC no está configurado para permitir subir
gemas.
copy_to_clipboard: Copiar al portapapeles
copied: "¡Copiado!"
a_gem: una gema
instructions_html: 'Para lanzar una gema, <a href="https://bundler.io/guides/creating_gem.html#releasing-the-gem"
rel="noreferer">crea la nueva versión</a> y genera una etiqueta nueva (usando
Expand Down
6 changes: 2 additions & 4 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
fr:
credentials_required:
copied: Copié!
copy_to_clipboard: Copier
edit: Modification
failure_when_forbidden: Veuillez vérifier l'URL ou réessayer.
verification_expired:
Expand Down Expand Up @@ -660,8 +662,6 @@ fr:
title: Gems
show:
bundler_header: Gemfile
copied: Copié!
copy_to_clipboard: Copier
install: installation
licenses_header:
one: License
Expand Down Expand Up @@ -823,8 +823,6 @@ fr:
to_automate_html:
not_github:
not_push:
copy_to_clipboard:
copied:
a_gem:
instructions_html:
new:
Expand Down
6 changes: 2 additions & 4 deletions config/locales/ja.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
ja:
credentials_required: 認証情報が必要です
copied: コピー完了!
copy_to_clipboard: クリップボードにコピー
edit: 編集
failure_when_forbidden: URLを見返すか、再度送信してみてください。
verification_expired:
Expand Down Expand Up @@ -627,8 +629,6 @@ ja:
title: gem
show:
bundler_header: Gemfile
copied: コピー完了!
copy_to_clipboard: クリップボードにコピー
install: インストール
licenses_header:
one: ライセンス
Expand Down Expand Up @@ -782,8 +782,6 @@ ja:
to_automate_html:
not_github:
not_push:
copy_to_clipboard:
copied:
a_gem:
instructions_html:
new:
Expand Down
6 changes: 2 additions & 4 deletions config/locales/nl.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
nl:
credentials_required:
copied:
copy_to_clipboard:
edit: Wijzig
failure_when_forbidden: Controleer het webadres, en probeer het opnieuw.
verification_expired:
Expand Down Expand Up @@ -627,8 +629,6 @@ nl:
title: alle gems
show:
bundler_header: Gemfile
copied:
copy_to_clipboard:
install: Installeer
licenses_header:
one: Licentie
Expand Down Expand Up @@ -777,8 +777,6 @@ nl:
to_automate_html:
not_github:
not_push:
copy_to_clipboard:
copied:
a_gem:
instructions_html:
new:
Expand Down
6 changes: 2 additions & 4 deletions config/locales/pt-BR.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
pt-BR:
credentials_required:
copied:
copy_to_clipboard:
edit: Editar
failure_when_forbidden: Por favor, confira a URL ou tente submetê-la novamente.
verification_expired:
Expand Down Expand Up @@ -640,8 +642,6 @@ pt-BR:
title: Gems
show:
bundler_header: Gemfile
copied:
copy_to_clipboard:
install: instalar
licenses_header:
one: Licença
Expand Down Expand Up @@ -800,8 +800,6 @@ pt-BR:
to_automate_html:
not_github:
not_push:
copy_to_clipboard:
copied:
a_gem:
instructions_html:
new:
Expand Down
6 changes: 2 additions & 4 deletions config/locales/zh-CN.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
zh-CN:
credentials_required: 需要凭证
copied: 已复制!
copy_to_clipboard: 复制到剪贴板
edit: 编辑
failure_when_forbidden: 请再次确认 URL 或尝试重新提交
verification_expired:
Expand Down Expand Up @@ -634,8 +636,6 @@ zh-CN:
title: Gem
show:
bundler_header: Gemfile
copied: 已复制!
copy_to_clipboard: 复制到剪贴板
install: 安装
licenses_header:
one: 许可
Expand Down Expand Up @@ -790,8 +790,6 @@ zh-CN:
to_automate_html:
not_github:
not_push:
copy_to_clipboard:
copied:
a_gem:
instructions_html:
new:
Expand Down
6 changes: 2 additions & 4 deletions config/locales/zh-TW.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
zh-TW:
credentials_required:
copied: 已複製
copy_to_clipboard: 複製
edit: 編輯
failure_when_forbidden: 請確認 URL 或再次提交
verification_expired:
Expand Down Expand Up @@ -610,8 +612,6 @@ zh-TW:
title: Gems
show:
bundler_header: Gemfile
copied: 已複製
copy_to_clipboard: 複製
install: 安裝
licenses_header:
one: License
Expand Down Expand Up @@ -760,8 +760,6 @@ zh-TW:
to_automate_html:
not_github:
not_push:
copy_to_clipboard:
copied:
a_gem:
instructions_html:
new:
Expand Down

0 comments on commit d922ce6

Please sign in to comment.