Skip to content

Commit 022651e

Browse files
authored
Improve wording of owner locales (#5520)
1 parent 4ee322a commit 022651e

6 files changed

Lines changed: 32 additions & 32 deletions

File tree

config/locales/en.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ en:
202202
edit_api_key: "Edit API key"
203203
invalid_key: An invalid API key cannot be edited. Please delete it and create a new one.
204204
all_gems: All Gems
205-
gem_ownership_removed: Ownership of %{rubygem_name} has been removed after being scoped to this key.
205+
gem_ownership_removed: Ownership of the %{rubygem_name} gem has been removed after being scoped to this key.
206206
dashboards:
207207
show:
208208
creating_link_text: creating
@@ -343,30 +343,30 @@ en:
343343
subject: You have requested email address update on %{host}
344344
title: EMAIL UPDATE REQUESTED
345345
ownership_confirmation:
346-
subject: Please confirm the ownership of %{gem} gem on %{host}
346+
subject: Please confirm the ownership of the %{gem} gem on %{host}
347347
title: OWNERSHIP CONFIRMATION
348348
subtitle: Hi %{handle}!
349-
body_text: You were added as an owner to %{gem} gem by %{authorizer}. Please visit link below to confirm your ownership.
350-
body_html: You were added as an owner to <strong><a href="https://rubygems.org/gems/%{gem}">%{gem}</a></strong> gem by <strong>%{authorizer}</strong>. Please click on the link below to confirm your ownership.
351-
link_expiration_explanation_html: Please note that this link is valid for only %{expiry_hours}. You can resend confirmation mail from the <strong><a href="https://rubygems.org/gems/%{gem}">%{gem}</a></strong> gem page after sign in.
349+
body_text: You were added as an owner to the %{gem} gem by %{authorizer}. Please visit link below to confirm your ownership.
350+
body_html: You were added as an owner to the <strong><a href="https://rubygems.org/gems/%{gem}">%{gem}</a></strong> gem by <strong>%{authorizer}</strong>. Please click on the link below to confirm your ownership.
351+
link_expiration_explanation_html: Please note that this link is valid for only %{expiry_hours}. You can resend confirmation mail from the <strong><a href="https://rubygems.org/gems/%{gem}">%{gem}</a></strong> gem page after sign in.
352352
owner_added:
353-
subject_self: You were added as an owner to %{gem} gem
354-
subject_others: User %{owner_handle} was added as an owner to %{gem} gem
353+
subject_self: You were added as an owner to the %{gem} gem
354+
subject_others: User %{owner_handle} was added as an owner to the %{gem} gem
355355
title: OWNER ADDED
356356
subtitle: Hi %{user_handle}!
357-
body_self_html: <b>You</b> were added as an owner to <strong><a href="https://rubygems.org/gems/%{gem}">%{gem}</a></strong> gem on %{host}.
358-
body_others_html: <b>%{owner_handle}</b> was added as an owner to <strong><a href="https://rubygems.org/gems/%{gem}">%{gem}</a></strong> gem by <b>%{authorizer}</b>. You are receiving this notification because you are an owner of %{gem}.
357+
body_self_html: <b>You</b> were added as an owner to the <strong><a href="https://rubygems.org/gems/%{gem}">%{gem}</a></strong> gem on %{host}.
358+
body_others_html: <b>%{owner_handle}</b> was added as an owner to the <strong><a href="https://rubygems.org/gems/%{gem}">%{gem}</a></strong> gem by <b>%{authorizer}</b>. You are receiving this notification because you are an owner of %{gem}.
359359
owner_removed:
360-
subject: You were removed as an owner from %{gem} gem
360+
subject: You were removed as an owner from the %{gem} gem
361361
title: OWNER REMOVED
362362
subtitle: Hi %{user_handle}!
363-
body_html: <b>You</b> were removed as an owner for <strong><a href="https://rubygems.org/gems/%{gem}">%{gem}</a></strong> gem on %{host} by <b>%{remover}</b>.
363+
body_html: <b>You</b> were removed as an owner from the <strong><a href="https://rubygems.org/gems/%{gem}">%{gem}</a></strong> gem on %{host} by <b>%{remover}</b>.
364364
owner_updated:
365-
subject: Your role was updated for %{gem} gem
365+
subject: Your role was updated for the %{gem} gem
366366
title: OWNER ROLE UPDATED
367367
subtitle: Hi %{user_handle}!
368-
body_html: Your role was updated to %{role} for <strong><a href="https://rubygems.org/gems/%{gem}">%{gem}</a></strong> gem.
369-
body_text: Your role was updated to %{role} for %{gem} gem.
368+
body_html: Your role was updated to %{role} for the <strong><a href="https://rubygems.org/gems/%{gem}">%{gem}</a></strong> gem.
369+
body_text: Your role was updated to %{role} for the %{gem} gem.
370370
web_hook_deleted:
371371
title: WEBHOOK DELETED
372372
subject: Your %{host} webhook was deleted
@@ -573,7 +573,7 @@ en:
573573
role: Role
574574
title: Edit Owner
575575
confirm:
576-
confirmed_email: You were added as an owner to %{gem} gem
576+
confirmed_email: You were added as an owner to the %{gem} gem
577577
token_expired: The confirmation token has expired. Please try resending the token from the gem page.
578578
index:
579579
add_owner: ADD OWNER

test/functional/api/v1/owners_controller_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def self.should_respond_to(format)
235235
end
236236

237237
should "send confirmation mail to second user" do
238-
assert_equal "Please confirm the ownership of #{@rubygem.name} gem on RubyGems.org", last_email.subject
238+
assert_equal "Please confirm the ownership of the #{@rubygem.name} gem on RubyGems.org", last_email.subject
239239
assert_equal [@second_user.email], last_email.to
240240
end
241241
end
@@ -671,7 +671,7 @@ def self.should_respond_to(format)
671671
end
672672

673673
should "send email notification to user being removed" do
674-
assert_equal "You were removed as an owner from #{@rubygem.name} gem", last_email.subject
674+
assert_equal "You were removed as an owner from the #{@rubygem.name} gem", last_email.subject
675675
assert_equal [@second_user.email], last_email.to
676676
end
677677
end

test/functional/owners_controller_test.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class OwnersControllerTest < ActionController::TestCase
8888
perform_enqueued_jobs only: ActionMailer::MailDeliveryJob
8989

9090
assert_emails 1
91-
assert_equal "Please confirm the ownership of #{@rubygem.name} gem on RubyGems.org", last_email.subject
91+
assert_equal "Please confirm the ownership of the #{@rubygem.name} gem on RubyGems.org", last_email.subject
9292
assert_equal [@new_owner.email], last_email.to
9393
end
9494

@@ -198,7 +198,7 @@ class OwnersControllerTest < ActionController::TestCase
198198
end
199199
should "send email notifications about owner removal" do
200200
assert_emails 1
201-
assert_contains last_email.subject, "You were removed as an owner from #{@rubygem.name} gem"
201+
assert_contains last_email.subject, "You were removed as an owner from the #{@rubygem.name} gem"
202202
assert_equal [@second_user.email], last_email.to
203203
end
204204
end
@@ -218,7 +218,7 @@ class OwnersControllerTest < ActionController::TestCase
218218
end
219219
should "send email notifications about owner removal" do
220220
assert_emails 1
221-
assert_contains last_email.subject, "You were removed as an owner from #{@rubygem.name} gem"
221+
assert_contains last_email.subject, "You were removed as an owner from the #{@rubygem.name} gem"
222222
assert_equal [@second_user.email], last_email.to
223223
end
224224
end
@@ -317,7 +317,7 @@ class OwnersControllerTest < ActionController::TestCase
317317
end
318318
should "resend confirmation email" do
319319
assert_emails 1
320-
assert_equal "Please confirm the ownership of #{@rubygem.name} gem on RubyGems.org", last_email.subject
320+
assert_equal "Please confirm the ownership of the #{@rubygem.name} gem on RubyGems.org", last_email.subject
321321
assert_equal [@new_owner.email], last_email.to
322322
end
323323
end
@@ -551,7 +551,7 @@ class OwnersControllerTest < ActionController::TestCase
551551
should "confirm ownership" do
552552
assert_predicate @ownership, :confirmed?
553553
assert redirect_to("rubygem show") { rubygem_path(@rubygem.slug) }
554-
assert_equal "You were added as an owner to #{@rubygem.name} gem", flash[:notice]
554+
assert_equal "You were added as an owner to the #{@rubygem.name} gem", flash[:notice]
555555
end
556556

557557
should "not sign in the user" do
@@ -561,8 +561,8 @@ class OwnersControllerTest < ActionController::TestCase
561561
should "send email notifications about new owner" do
562562
owner_added_email_subjects = ActionMailer::Base.deliveries.map(&:subject)
563563

564-
assert_contains owner_added_email_subjects, "You were added as an owner to #{@rubygem.name} gem"
565-
assert_contains owner_added_email_subjects, "User #{@user.handle} was added as an owner to #{@rubygem.name} gem"
564+
assert_contains owner_added_email_subjects, "You were added as an owner to the #{@rubygem.name} gem"
565+
assert_contains owner_added_email_subjects, "User #{@user.handle} was added as an owner to the #{@rubygem.name} gem"
566566

567567
owner_added_email_to = ActionMailer::Base.deliveries.map(&:to).flatten
568568

test/integration/owner_test.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class OwnerTest < SystemTest
3535
perform_enqueued_jobs only: ActionMailer::MailDeliveryJob
3636

3737
assert_emails 1
38-
assert_equal "Please confirm the ownership of #{@rubygem.name} gem on RubyGems.org", last_email.subject
38+
assert_equal "Please confirm the ownership of the #{@rubygem.name} gem on RubyGems.org", last_email.subject
3939
end
4040

4141
test "adding owner via UI with handle" do
@@ -53,7 +53,7 @@ class OwnerTest < SystemTest
5353
perform_enqueued_jobs only: ActionMailer::MailDeliveryJob
5454

5555
assert_emails 1
56-
assert_equal "Please confirm the ownership of #{@rubygem.name} gem on RubyGems.org", last_email.subject
56+
assert_equal "Please confirm the ownership of the #{@rubygem.name} gem on RubyGems.org", last_email.subject
5757
end
5858

5959
test "owners data is correctly represented" do
@@ -95,7 +95,7 @@ class OwnerTest < SystemTest
9595
perform_enqueued_jobs only: ActionMailer::MailDeliveryJob
9696

9797
assert_emails 1
98-
assert_contains last_email.subject, "You were removed as an owner from #{@rubygem.name} gem"
98+
assert_contains last_email.subject, "You were removed as an owner from the #{@rubygem.name} gem"
9999
assert_equal [@other_user.email], last_email.to
100100
end
101101

@@ -198,14 +198,14 @@ class OwnerTest < SystemTest
198198
end
199199

200200
assert_equal page.current_path, rubygem_path(@rubygem.slug)
201-
assert page.has_selector? "#flash_notice", text: "You were added as an owner to #{@rubygem.name} gem"
201+
assert page.has_selector? "#flash_notice", text: "You were added as an owner to the #{@rubygem.name} gem"
202202

203203
assert_emails 2
204204

205205
owner_added_email_subjects = ActionMailer::Base.deliveries.map(&:subject)
206206

207-
assert_contains owner_added_email_subjects, "You were added as an owner to #{@rubygem.name} gem"
208-
assert_contains owner_added_email_subjects, "User #{@unconfirmed_ownership.user.handle} was added as an owner to #{@rubygem.name} gem"
207+
assert_contains owner_added_email_subjects, "You were added as an owner to the #{@rubygem.name} gem"
208+
assert_contains owner_added_email_subjects, "User #{@unconfirmed_ownership.user.handle} was added as an owner to the #{@rubygem.name} gem"
209209
end
210210

211211
test "clicking on incorrect link shows error" do

test/mailers/owners_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class OwnersMailerTest < ActionMailer::TestCase
1414
email = OwnersMailer.with(ownership: @maintainer_ownership).owner_updated
1515

1616
assert_emails(1) { email.deliver_now }
17-
assert_equal email.subject, "Your role was updated for #{@rubygem.name} gem"
17+
assert_equal email.subject, "Your role was updated for the #{@rubygem.name} gem"
1818
end
1919
end
2020
end

test/unit/helpers/api_keys_helper_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ApiKeysHelperTest < ActionView::TestCase
2222
expected_dom = <<~HTML.squish.gsub(/>\s+</, "><")
2323
<span
2424
class="tooltip__text"
25-
data-tooltip="Ownership of #{rubygem_name} has been removed after being scoped to this key."\
25+
data-tooltip="Ownership of the #{rubygem_name} gem has been removed after being scoped to this key."\
2626
>#{rubygem_name} [?]</span>
2727
HTML
2828

0 commit comments

Comments
 (0)