diff --git a/app/controllers/pseuds_controller.rb b/app/controllers/pseuds_controller.rb index f71c4ddf8e3..25034f2e3cc 100644 --- a/app/controllers/pseuds_controller.rb +++ b/app/controllers/pseuds_controller.rb @@ -26,44 +26,42 @@ def index # GET /users/:user_id/pseuds/:id def show - if @user.blank? - raise ActiveRecord::RecordNotFound, "Couldn't find user '#{params[:user_id]}'" - end + raise ActiveRecord::RecordNotFound, t(".could_not_find_user", username: params[:user_id]) if @user.blank? + @pseud = @user.pseuds.find_by(name: params[:id]) - unless @pseud - raise ActiveRecord::RecordNotFound, "Couldn't find pseud '#{params[:id]}'" - end + raise ActiveRecord::RecordNotFound, t(".could_not_find_pseud", pseud: params[:id]) unless @pseud + @page_subtitle = @pseud.name # very similar to show under users - if you change something here, change it there too - if !(logged_in? || logged_in_as_admin?) - visible_works = @pseud.works.visible_to_all - visible_series = @pseud.series.visible_to_all - visible_bookmarks = @pseud.bookmarks.visible_to_all - else + if logged_in? || logged_in_as_admin? visible_works = @pseud.works.visible_to_registered_user visible_series = @pseud.series.visible_to_registered_user visible_bookmarks = @pseud.bookmarks.visible_to_registered_user + else + visible_works = @pseud.works.visible_to_all + visible_series = @pseud.series.visible_to_all + visible_bookmarks = @pseud.bookmarks.visible_to_all end visible_works = visible_works.revealed.non_anon visible_series = visible_series.exclude_anonymous @fandoms = \ - Fandom.select("tags.*, count(DISTINCT works.id) as work_count"). - joins(:filtered_works).group("tags.id").merge(visible_works). - where(filter_taggings: { inherited: false }). - order('work_count DESC').load + Fandom.select("tags.*, count(DISTINCT works.id) as work_count") + .joins(:filtered_works).group("tags.id").merge(visible_works) + .where(filter_taggings: { inherited: false }) + .order("work_count DESC").load @works = visible_works.order("revised_at DESC").limit(ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD) @series = visible_series.order("updated_at DESC").limit(ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD) @bookmarks = visible_bookmarks.order("updated_at DESC").limit(ArchiveConfig.NUMBER_OF_ITEMS_VISIBLE_IN_DASHBOARD) - if current_user.respond_to?(:subscriptions) - @subscription = current_user.subscriptions.where(subscribable_id: @user.id, - subscribable_type: 'User').first || - current_user.subscriptions.build(subscribable: @user) - end + return unless current_user.respond_to?(:subscriptions) + + @subscription = current_user.subscriptions.where(subscribable_id: @user.id, + subscribable_type: "User").first || + current_user.subscriptions.build(subscribable: @user) end # GET /pseuds/new @@ -86,7 +84,7 @@ def create @pseud.user_id = @user.id old_default = @user.default_pseud if @pseud.save - flash[:notice] = ts('Pseud was successfully created.') + flash[:notice] = t(".successfully_created") if @pseud.is_default # if setting this one as default, unset the attribute of the current default pseud old_default.update_attribute(:is_default, false) @@ -96,8 +94,8 @@ def create render action: "new" end else - # user tried to add pseud he already has - flash[:error] = ts('You already have a pseud with that name.') + # user tried to add pseud they already have + flash[:error] = t(".already_have_pseud_with_name") render action: "new" end end @@ -115,12 +113,9 @@ def update AdminActivity.log_action(current_admin, @pseud, action: "edit pseud", summary: summary) end # if setting this one as default, unset the attribute of the current default pseud - if @pseud.is_default and not(default == @pseud) - # if setting this one as default, unset the attribute of the current active pseud - default.update_attribute(:is_default, false) - end - flash[:notice] = ts('Pseud was successfully updated.') - redirect_to([@user, @pseud]) + default.update_attribute(:is_default, false) if @pseud.is_default && default != @pseud + flash[:notice] = t(".successfully_updated") + redirect_to([@user, @pseud]) else render action: "edit" end @@ -131,24 +126,24 @@ def update def destroy @hide_dashboard = true if params[:cancel_button] - flash[:notice] = ts("The pseud was not deleted.") + flash[:notice] = t(".not_deleted") redirect_to(user_pseuds_path(@user)) && return end @pseud = @user.pseuds.find_by(name: params[:id]) if @pseud.is_default - flash[:error] = ts("You cannot delete your default pseudonym, sorry!") + flash[:error] = t(".cannot_delete_default") elsif @pseud.name == @user.login - flash[:error] = ts("You cannot delete the pseud matching your user name, sorry!") + flash[:error] = t(".cannot_delete_matching_username") elsif params[:bookmarks_action] == "transfer_bookmarks" @pseud.change_bookmarks_ownership @pseud.replace_me_with_default - flash[:notice] = ts("The pseud was successfully deleted.") + flash[:notice] = t(".successfully_deleted") elsif params[:bookmarks_action] == "delete_bookmarks" || @pseud.bookmarks.empty? @pseud.replace_me_with_default - flash[:notice] = ts("The pseud was successfully deleted.") + flash[:notice] = t(".successfully_deleted") else - render 'delete_preview' and return + render "delete_preview" and return end redirect_to(user_pseuds_path(@user)) diff --git a/app/models/pseud.rb b/app/models/pseud.rb index ac298bc5fee..6e7bb327029 100644 --- a/app/models/pseud.rb +++ b/app/models/pseud.rb @@ -192,7 +192,7 @@ def self.parse_byline(byline) # Parse a string of the "pseud.name (user.login)" format into a list of # pseuds. Usually this will be just one pseud, but if the byline is of the - # form "pseud.name" with no parenthesized user name, it'll look for any pseud + # form "pseud.name" with no parenthesized username, it'll look for any pseud # with that name. def self.parse_byline_ambiguous(byline) pseud_name, login = split_byline(byline) diff --git a/app/views/admin/admin_invitations/find.html.erb b/app/views/admin/admin_invitations/find.html.erb index 5d426feadfc..14a246a10be 100644 --- a/app/views/admin/admin_invitations/find.html.erb +++ b/app/views/admin/admin_invitations/find.html.erb @@ -8,7 +8,7 @@ <%= form_tag url_for(:controller => 'admin/admin_invitations', :action => 'find'), :method => :get do %>
-
<%= label_tag "invitation[user_name]", t(".user_name") %>:
+
<%= label_tag "invitation[user_name]", t(".username") %>:
<%= text_field_tag "invitation[user_name]", params[:invitation][:user_name] %>
<%= label_tag "invitation[token]", t(".token") %>:
<%= text_field_tag "invitation[token]", params[:invitation][:token] %>
diff --git a/app/views/admin/admin_invitations/index.html.erb b/app/views/admin/admin_invitations/index.html.erb index 7800a0a3230..c62262d3082 100644 --- a/app/views/admin/admin_invitations/index.html.erb +++ b/app/views/admin/admin_invitations/index.html.erb @@ -10,52 +10,65 @@ -<%= form_tag url_for(:controller => 'admin/admin_invitations', :action => :create) do |f| %> +<%= form_tag url_for(controller: "admin/admin_invitations", action: :create) do |f| %>
-

Send to email

-

Send an invite code to the following email address: - <%= text_field_tag "invitation[invitee_email]", (@invitation.try(:invitee_email) || ""), :title => ts("invite by email") %> - <%= submit_tag ts('Invite user') %> +

<%= t(".send_to_email.heading") %>

+

+ <%= t(".send_to_email.description") %> + <%= text_field_tag "invitation[invitee_email]", + (@invitation.try(:invitee_email) || ""), + autocomplete: "email", + title: t(".send_to_email.invite_by_email") %> + <%= submit_tag t(".send_to_email.invite_user") %>

<% end %> -<%= form_tag url_for(:controller => 'admin/admin_invitations', :action => 'invite_from_queue') do %> +<%= form_tag url_for(controller: "admin/admin_invitations", action: :invite_from_queue) do %>
-

Send invite codes to people in our <%= link_to 'invitations queue', invite_requests_path %>

-

There are <%= InviteRequest.count %> requests in the queue.

+

+ <%= t(".invite_from_queue.heading_html", + invitations_queue_link: link_to(t(".invite_from_queue.invitations_queue"), invite_requests_path)) %> +

+

<%= t(".invite_from_queue.requests_in_queue", count: InviteRequest.count) %>

- <%= label_tag "invitation[invite_from_queue]", ts('Number of people to invite') %>: <%= text_field_tag "invitation[invite_from_queue]" %> - <%= submit_tag ts('Invite from queue') %> + <%= label_tag "invitation[invite_from_queue]", t(".invite_from_queue.number_to_invite") %> + <%= text_field_tag "invitation[invite_from_queue]", nil, autocomplete: "on" %> + <%= submit_tag t(".invite_from_queue.invite_from_queue") %>

<% end %> -<%= form_tag url_for(:controller => 'admin/admin_invitations', :action => 'grant_invites_to_users') do %> +<%= form_tag url_for(controller: "admin/admin_invitations", action: :grant_invites_to_users) do %>
-

<%=h 'Give invite codes to current users' %>

+

<%= t(".grant_invites.heading") %>

-
<%= label_tag "invitation[number_of_invites]", ts('Number of invitations') %>:
-
<%= text_field_tag "invitation[number_of_invites]" %>
-
<%= label_tag "invitation[user_group]", ts('Users') %>:
-
<%= select_tag "invitation[user_group]", "".html_safe %>
-
Submit
-
<%= submit_tag "Generate invitations" %>
+
<%= label_tag "invitation[number_of_invites]", t(".grant_invites.number_of_invitations") %>
+
<%= text_field_tag "invitation[number_of_invites]", nil, autocomplete: "on" %>
+
<%= label_tag "invitation[user_group]", t(".grant_invites.users") %>
+
<%= select_tag "invitation[user_group]", [t(".grant_invites.all"), t(".grant_invites.with_no_unused")] %>
+
<%= t(".grant_invites.landmark_submit") %>
+
<%= submit_tag t(".grant_invites.generate_invitations") %>
<% end %> -<%= form_tag url_for(:controller => 'admin/admin_invitations', :action => 'find'), :method => :get do %> +<%= form_tag url_for(controller: "admin/admin_invitations", action: :find), method: :get do %>
-

<%=h 'Track invitations' %>

+

<%= t(".find.heading") %>

-
<%= label_tag "invitation[user_name]", ts('Enter a user name') %>:
-
<%= text_field_tag "invitation[user_name]" %>
-
<%= label_tag "invitation[token]", ts('Enter an invite token') %>:
-
<%= text_field_tag "invitation[token]" %>
-
<%= label_tag "track_invitation_invitee_email", t(".email") %>:
-
<%= text_field_tag "invitation[invitee_email]", nil, id: "track_invitation_invitee_email" %>
-
Submit
-
<%= submit_tag "Go" %>
+
<%= label_tag "invitation[user_name]", t(".find.enter_username") %>
+
<%= text_field_tag "invitation[user_name]", nil, autocomplete: "on" %>
+
<%= label_tag "invitation[token]", t(".find.enter_invite_token") %>
+
<%= text_field_tag "invitation[token]", nil, autocomplete: "on" %>
+
<%= label_tag "track_invitation_invitee_email", t(".find.email") %>:
+
+ <%= text_field_tag "invitation[invitee_email]", + nil, + autocomplete: "email", + id: "track_invitation_invitee_email" %> +
+
<%= t(".find.landmark_submit") %>
+
<%= submit_tag t(".find.go") %>
<% end %> diff --git a/app/views/admin_sessions/new.html.erb b/app/views/admin_sessions/new.html.erb index 5d2b26b99aa..c41f120f1e2 100644 --- a/app/views/admin_sessions/new.html.erb +++ b/app/views/admin_sessions/new.html.erb @@ -1,16 +1,15 @@ -

<%= ts("Log in as Admin") %>

+

<%= t(".page_heading") %>

<%= form_for @admin_session do |form| %> -
-
<%= form.label :login, ts("Admin user name") %>
-
<%= form.text_field :login %>
-
<%= form.label :password, ts("Admin password") %>
-
<%= form.password_field :password %>
-
-

<%= form.submit ts('Log in as admin') %>

+
+
<%= form.label :login, t(".admin_username") %>
+
<%= form.text_field :login %>
+
<%= form.label :password, t(".admin_password") %>
+
<%= form.password_field :password %>
+
+

<%= form.submit t(".log_in_as_admin") %>

<% end %> - diff --git a/app/views/challenge/gift_exchange/_challenge_signups.html.erb b/app/views/challenge/gift_exchange/_challenge_signups.html.erb index c610c765b4e..8c5f9ebfb9c 100755 --- a/app/views/challenge/gift_exchange/_challenge_signups.html.erb +++ b/app/views/challenge/gift_exchange/_challenge_signups.html.erb @@ -1,9 +1,9 @@

<% if @query %> - <%= search_header @challenge_signups, nil, "Sign-up" %> + <%= search_header @challenge_signups, nil, t(".heading.for_search") %> <% else %> - <%= ts("Sign-ups for %{collection}", collection: @collection.title) %> + <%= t(".heading.for_collection", collection: @collection.title) %> <% end %>

@@ -13,13 +13,13 @@
  • - <%= link_to ts("Download (CSV)"), collection_signups_path(@collection, format: :csv) %> + <%= link_to t(".navigation.download_csv"), collection_signups_path(@collection, format: :csv) %> <%= link_to_help "csv-download" %>
  • @@ -27,13 +27,13 @@ <% if @challenge_signups.empty? %> -

    <%= ts("No sign-ups yet!")%>

    +

    <%= t(".no_sign_ups_yet") %>

    <% else %> <%= will_paginate(@challenge_signups) %>
    <% @challenge_signups.each do |signup| %> -
    "> +
    "> <%= link_to signup.pseud.name, collection_signup_path(@collection, signup) %> <%= mailto_link signup.pseud.user, subject: "[#{h(@collection.title)}] Message from Collection Maintainer" %>
    @@ -41,12 +41,12 @@ <%= render "challenge_signups/signup_controls", challenge_signup: signup, subnav: false %>
    "> @@ -62,4 +62,3 @@ <%= will_paginate(@challenge_signups) %> <% end %> - diff --git a/app/views/invitations/_user_invitations.html.erb b/app/views/invitations/_user_invitations.html.erb index 77ff5dd4c96..7cff4656337 100644 --- a/app/views/invitations/_user_invitations.html.erb +++ b/app/views/invitations/_user_invitations.html.erb @@ -1,32 +1,35 @@ <% unless invitations.blank? %> - - - - - - - - - +
    <%= ts('Invitation Information') %>
    <%= ts('Token') %><%= ts('Sent To') %><%= ts('User Name') %><%= ts('External Author') %><%= ts('Copy Link') %>
    "> + + + + + + + + - - + + <% for invitation in invitations %> - - + + <% if logged_in_as_admin? && invitation.redeemed_at.blank? %> - + <% end %> <% end %> diff --git a/app/views/users/_admin_change_username.html.erb b/app/views/users/_admin_change_username.html.erb index 3b7fb22820d..7e281f0f7df 100644 --- a/app/views/users/_admin_change_username.html.erb +++ b/app/views/users/_admin_change_username.html.erb @@ -18,7 +18,7 @@

    <%= label_tag :ticket_id, t(".ticket_id") %>
    -
    <%= text_field_tag :ticket_id, nil, autocomplete: "disabled" %>
    +
    <%= text_field_tag :ticket_id, nil, autocomplete: "off" %>
    <%= t("users.change_username.submit_landmark") %>
    <%= submit_tag t("users.change_username.change_username") %> diff --git a/app/views/users/passwords/new.html.erb b/app/views/users/passwords/new.html.erb index 9b61e842a00..f1778c94ba4 100644 --- a/app/views/users/passwords/new.html.erb +++ b/app/views/users/passwords/new.html.erb @@ -1,18 +1,15 @@ -

    <%= ts("Forgotten your password?") %>

    -

    - <%= ts("If you've forgotten your password, we can send instructions that will allow you to reset it.") %> - <%= ts("Please tell us the user name or email address you used when you signed up for your Archive account.") %> -

    +

    <%= t(".page_heading") %>

    +

    <%= t(".instructions") %>

    <%= form_for resource, url: user_password_path, html: { method: :post, html: "reset password simple post" } do |f| %> <%= error_messages_for resource %>

    - <%= label_tag :reset_login, ts("Email address or user name".html_safe) %> + <%= label_tag :reset_login, t(".email_or_username_html", or: style_bold(t(".or"))) %> <%= f.text_field :login, id: :reset_login %> - <%= f.submit ts("Reset Password") %> + <%= f.submit t(".reset_password") %>

    <% end %> diff --git a/app/views/users/registrations/_passwd.html.erb b/app/views/users/registrations/_passwd.html.erb index cd9673b00cf..68f5a38c65d 100644 --- a/app/views/users/registrations/_passwd.html.erb +++ b/app/views/users/registrations/_passwd.html.erb @@ -1,46 +1,44 @@
    - <%= f.label :login, ts("User name") %> + <%= f.label :login, t(".username") %>
    <%= f.text_field :login, "aria-describedby" => "login-field-description" %> - <%= live_validation_for_field('user_registration_login', - maximum_length: ArchiveConfig.LOGIN_LENGTH_MAX, - minimum_length: ArchiveConfig.LOGIN_LENGTH_MIN, - failureMessage: ts("You need a user name! (At least %{minimum} letters long, please.)", - minimum: ArchiveConfig.LOGIN_LENGTH_MIN)) %> + <%= live_validation_for_field("user_registration_login", + maximum_length: ArchiveConfig.LOGIN_LENGTH_MAX, + minimum_length: ArchiveConfig.LOGIN_LENGTH_MIN, + failureMessage: t(".username_validation", minimum: ArchiveConfig.LOGIN_LENGTH_MIN)) %>

    - <%= ts("%{minimum} to %{maximum} characters (A-Z, a-z, _, 0-9 only), no spaces, cannot begin or end with underscore (_)", + <%= t(".username_requirements", minimum: ArchiveConfig.LOGIN_LENGTH_MIN, maximum: ArchiveConfig.LOGIN_LENGTH_MAX) %>

    - <%= f.label :password, ts("Password") %> + <%= f.label :password, t(".password") %>
    <%= f.password_field :password, "aria-describedby" => "password-field-description" %> - <%= live_validation_for_field('user_registration_password', + <%= live_validation_for_field("user_registration_password", minimum_length: ArchiveConfig.PASSWORD_LENGTH_MIN, maximum_length: ArchiveConfig.PASSWORD_LENGTH_MAX, - failureMessage: ts("Please enter a password! (At least %{minimum} letters long, please.)", - minimum: ArchiveConfig.PASSWORD_LENGTH_MIN)) %> + failureMessage: t(".password_validation", minimum: ArchiveConfig.PASSWORD_LENGTH_MIN)) %>

    - <%= ts("%{minimum} to %{maximum} characters", - minimum: ArchiveConfig.PASSWORD_LENGTH_MIN, - maximum: ArchiveConfig.PASSWORD_LENGTH_MAX) %> + <%= t(".password_requirements", + minimum: ArchiveConfig.PASSWORD_LENGTH_MIN, + maximum: ArchiveConfig.PASSWORD_LENGTH_MAX) %>

    -
    <%= f.label :password_confirmation, ts("Confirm password") %>
    +
    <%= f.label :password_confirmation, t(".confirm_password") %>
    <%= f.password_field :password_confirmation %> - <%= live_validation_for_field('user_registration_password_confirmation', + <%= live_validation_for_field("user_registration_password_confirmation", minimum_length: ArchiveConfig.PASSWORD_LENGTH_MIN, maximum_length: ArchiveConfig.PASSWORD_LENGTH_MAX, - failureMessage: ts("Please enter the same password in both fields.")) %> + failureMessage: t(".confirm_password_validation")) %>
    - <%= f.label :email, ts("Valid email") %> + <%= f.label :email, t(".valid_email") %>
    <%= f.text_field :email %>
    diff --git a/app/views/users/sessions/_passwd.html.erb b/app/views/users/sessions/_passwd.html.erb index f025b7f83c7..db6eeb18a5b 100644 --- a/app/views/users/sessions/_passwd.html.erb +++ b/app/views/users/sessions/_passwd.html.erb @@ -1,14 +1,14 @@ <%= form_for(User.new, url: new_user_session_path) do |f| %>
    -
    <%= f.label :login, ts("User name or email:") %>
    +
    <%= f.label :login, t(".username_or_email") %>
    <%= f.text_field :login %>
    -
    <%= f.label :password, ts("Password:") %>
    +
    <%= f.label :password, t(".password") %>
    <%= f.password_field :password %>
    -
    <%= f.label :remember_me, ts("Remember me") %>
    +
    <%= f.label :remember_me, t(".remember_me") %>
    <%= f.check_box :remember_me %>
    -
    <%= ts("Submit") %>
    +
    <%= t(".landmark_submit") %>
    - <%= f.submit ts("Log in"), class: "submit" %> + <%= f.submit t(".log_in"), class: "submit" %>
    <% end %> diff --git a/app/views/users/sessions/_passwd_small.html.erb b/app/views/users/sessions/_passwd_small.html.erb index 1d49f0b7704..3ebcdeb0a22 100644 --- a/app/views/users/sessions/_passwd_small.html.erb +++ b/app/views/users/sessions/_passwd_small.html.erb @@ -1,32 +1,29 @@ -<% # We need to override the ids to avoid accessibility issues on the new user - # session page, which has a second user session form %> +<%# We need to override the ids to avoid accessibility issues on the new user session page, +which has a second user session form %> <%= form_for(User.new, url: user_session_path, html: { id: "new_user_session_small" }) do |f| %> -
    -
    - <%= f.label :login, ts("User name or email:"), - for: "user_session_login_small" %>
    -
    <%= f.text_field :login, - id: "user_session_login_small" %>
    -
    <%= f.label :password, ts("Password:"), - for: "user_session_password_small" %>
    -
    <%= f.password_field :password, - id: "user_session_password_small" %>
    +
    +
    <%= f.label :login, t(".username_or_email"), for: "user_session_login_small" %>
    +
    <%= f.text_field :login, autocomplete: "on", id: "user_session_login_small" %>
    +
    <%= f.label :password, t(".password"), for: "user_session_password_small" %>
    +
    <%= f.password_field :password, id: "user_session_password_small" %>

    - - <%= f.submit ts("Log In") %> + + <%= f.submit t(".log_in") %>

    <% end %>
      -
    • <%= link_to ts("Forgot password?"), new_user_password_path %>
    • +
    • <%= link_to t(".forgot_password"), new_user_password_path %>
    • <% if AdminSetting.current.account_creation_enabled? && !AdminSetting.current.creation_requires_invite? %>
    • - <%= link_to ts("Create an Account"), signup_path %> + <%= link_to t(".create_an_account"), signup_path %>
    • <% elsif AdminSetting.current.invite_from_queue_enabled? %>
    • - <%= link_to ts("Get an Invitation"), invite_requests_path %> + <%= link_to t(".get_an_invitation"), invite_requests_path %>
    • <% end %>
    diff --git a/config/initializers/rack_attack.rb b/config/initializers/rack_attack.rb index 248d13f10d2..4eaf44002d5 100644 --- a/config/initializers/rack_attack.rb +++ b/config/initializers/rack_attack.rb @@ -69,7 +69,7 @@ class Rack::Attack req.ip if req.path == "/users/login" && req.post? end - # Throttle POST requests to /users/login by login param (user name or email) + # Throttle POST requests to /users/login by login param (username or email) # # Key: "rack::attack:#{Time.now.to_i/:period}:logins/email:#{login}" # diff --git a/config/locales/controllers/en.yml b/config/locales/controllers/en.yml index 2fa39e73979..8cf2105bea9 100644 --- a/config/locales/controllers/en.yml +++ b/config/locales/controllers/en.yml @@ -116,6 +116,20 @@ en: muted: You have muted the user %{name}. destroy: unmuted: You have unmuted the user %{name}. + pseuds: + create: + already_have_pseud_with_name: You already have a pseud with that name. + successfully_created: Pseud was successfully created. + destroy: + cannot_delete_default: You cannot delete your default pseudonym, sorry! + cannot_delete_matching_username: You cannot delete the pseud matching your username, sorry! + not_deleted: The pseud was not deleted. + successfully_deleted: The pseud was successfully deleted. + show: + could_not_find_pseud: Couldn't find pseud '%{pseud}' + could_not_find_user: Couldn't find user '%{username}' + update: + successfully_updated: Pseud was successfully updated. questions: not_found: Sorry, we couldn't find the FAQ you were looking for. update_positions: diff --git a/config/locales/devise/en.yml b/config/locales/devise/en.yml index e6839d9f580..fc4ca045161 100644 --- a/config/locales/devise/en.yml +++ b/config/locales/devise/en.yml @@ -9,20 +9,20 @@ en: admin: already_authenticated: You are already signed in. inactive: Your account is not activated yet. - invalid: The password or admin user name you entered doesn't match our records. + invalid: The password or admin username you entered doesn't match our records. last_attempt: You have one more attempt before your account is locked. locked: Your account is locked. - not_found_in_database: The password or admin user name you entered doesn't match our records. + not_found_in_database: The password or admin username you entered doesn't match our records. timeout: Your session expired. Please sign in again to continue. unauthenticated: You need to sign in or sign up before continuing. unconfirmed: You have to confirm your email address before continuing. user: already_authenticated: You are already signed in. inactive: You'll need to activate your account before you can log in. Please check your email or contact support. - invalid: The password or user name you entered doesn't match our records. Please try again or reset your password. If you still can't log in, please visit Problems When Logging In for help. + invalid: The password or username you entered doesn't match our records. Please try again or reset your password. If you still can't log in, please visit Problems When Logging In for help. last_attempt: You have one more attempt before your account is locked. locked: Your account has been locked for 5 minutes due to too many failed login attempts. - not_found_in_database: The password or user name you entered doesn't match our records. Please try again or reset your password. If you still can't log in, please visit Problems When Logging In for help. + not_found_in_database: The password or username you entered doesn't match our records. Please try again or reset your password. If you still can't log in, please visit Problems When Logging In for help. timeout: Your session expired. Please sign in again to continue. unauthenticated: You need to sign in or sign up before continuing. unconfirmed: You have to activate your account before continuing. Please check your email for the activation link. diff --git a/config/locales/mailers/en.yml b/config/locales/mailers/en.yml index 16c85b34011..88f18a01871 100644 --- a/config/locales/mailers/en.yml +++ b/config/locales/mailers/en.yml @@ -135,8 +135,8 @@ en: tos_violation: If your work was hidden due to being in violation of the Archive of Our Own's Terms of Service (%{tos_url}), you will be required to take action to correct the violation. Failure to bring your work into compliance with the Terms of Service may lead to your work being deleted from the Archive. tos: Terms of Service anonymous_or_unrevealed_notification: - anonymous_info: Anonymous works are included in tag listings, but not on your works page. On the work, your user name will be replaced with "Anonymous." - anonymous_unrevealed_info: The collection maintainers may later reveal your work but leave it anonymous. People who subscribe to you will not be notified of this change. Your work will be included in tag listings, but not on your works page. On the work, your user name will be replaced with "Anonymous." + anonymous_info: Anonymous works are included in tag listings, but not on your works page. On the work, your username will be replaced with "Anonymous." + anonymous_unrevealed_info: The collection maintainers may later reveal your work but leave it anonymous. People who subscribe to you will not be notified of this change. Your work will be included in tag listings, but not on your works page. On the work, your username will be replaced with "Anonymous." changed_status: anonymous: html: The collection maintainers of %{collection_link} have changed the status of your work %{work_link} to anonymous. diff --git a/config/locales/models/en.yml b/config/locales/models/en.yml index 007b5168fba..4c8fd6a81c7 100644 --- a/config/locales/models/en.yml +++ b/config/locales/models/en.yml @@ -182,8 +182,8 @@ en: login: admin_must_use_default: must use the default. Please contact your chairs to use something else. changed_too_recently: - one: can only be changed once per day. You last changed your user name on %{renamed_at}. - other: can only be changed once every %{count} days. You last changed your user name on %{renamed_at}. + one: can only be changed once per day. You last changed your username on %{renamed_at}. + other: can only be changed once every %{count} days. You last changed your username on %{renamed_at}. invalid: must be %{min_login} to %{max_login} characters (A-Z, a-z, _, 0-9 only), no spaces, cannot begin or end with underscore (_). password_confirmation: confirmation: doesn't match new password. diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index f09bca387df..a56c4ceffbb 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -84,13 +84,40 @@ en: find: email: Enter all or part of an email address token: Enter an invite token - user_name: Enter a user name + username: Enter a username index: - email: Enter all or part of an email address + find: + email: Enter all or part of an email address + enter_invite_token: 'Enter an invite token:' + enter_username: 'Enter a username:' + go: Go + heading: Track invitations + landmark_submit: Submit + grant_invites: + all: All + generate_invitations: Generate invitations + heading: Give invite codes to current users + landmark_submit: Submit + number_of_invitations: 'Number of invitations:' + users: 'Users:' + with_no_unused: With no unused invitations + invite_from_queue: + heading_html: Send invite codes to people in our %{invitations_queue_link} + invitations_queue: invitations queue + invite_from_queue: Invite from queue + number_to_invite: 'Number of people to invite:' + requests_in_queue: + one: There is 1 request in the queue. + other: There are %{count} requests in the queue. navigation: queue: Manage Queue requests: Manage Requests page_heading: Invite New Users + send_to_email: + description: 'Send an invite code to the following email address:' + heading: Send to Email + invite_by_email: invite by email + invite_user: Invite user admin_nav: ao3_news: AO3 News archive_faq: Archive FAQ @@ -308,14 +335,14 @@ en: page_heading: Set My Admin Password submit: Set Admin Password new: - instructions: If you've forgotten or would like to change your admin password, we can send instructions that will allow you to reset it. Please tell us the user name for your admin account. + instructions: If you've forgotten or would like to change your admin password, we can send instructions that will allow you to reset it. Please tell us the username for your admin account. page_heading: Forgotten your admin password? - reset_login_html: Admin user name + reset_login_html: Admin username submit: Reset Admin Password sessions: new: label: - login: Admin user name + login: Admin username password: Admin password landmark: reset: Reset password @@ -379,6 +406,12 @@ en: next: Next Post previous: Previous Post page_heading: AO3 News + admin_sessions: + new: + admin_password: Admin password + admin_username: Admin username + log_in_as_admin: Log in as admin + page_heading: Log in as Admin admins: index: confidentiality_reminder: You are now logged in as an admin. That means you will probably encounter information that is personal or confidential (e.g. usernames, email and IP addresses, creator names on anonymous works, etc). Please do not use this information in ways unrelated to your OTW role. If you have questions about what you can or cannot do with information you see here, contact your committee chair(s). @@ -463,6 +496,22 @@ en: comments_on_works: delete or hide comments they previously left on your works; you can delete these individually hide_works: hide their works or bookmarks from you intro: 'Blocking a user will not:' + challenge: + gift_exchange: + challenge_signups: + close_offers_html: Close Offers %{up_arrow} + close_requests_html: Close Requests %{up_arrow} + heading: + for_collection: Sign-ups for collection %{collection} + for_search: Sign-up + navigation: + download_csv: Download (CSV) + search: search + search_by_pseud: Search By Pseud + no_sign_ups_yet: No sign-ups yet! + offers_html: Offers %{down_arrow} + particpant_username: username + requests_html: Requests %{down_arrow} challenge_signups: signup_form: notice: @@ -1360,6 +1409,17 @@ en: invitations: invitation: email_address_label: Enter an email address + user_invitations: + copy_and_use: copy and use + copy_link: Copy Link + delete: Delete + delete_confirmation: Are you sure you want to delete this invitation? + external_author: External Author + invitation_information: Invitation Information + list_of_your_invitations: List of your invitation tokens and information regarding who you shared them with, along with the option to share unused tokens. + sent_to: Sent To + token: Token + username: Username invite_requests: index_open: add_to_list: Add me to the list @@ -1577,7 +1637,7 @@ en: turn_on_new_user_help: Turn the new user help banner back on. navigation: blocked_users: Blocked Users - change_my_username: Change My User Name + change_my_username: Change My Username edit_my_profile: Edit My Profile landmark: Navigation manage_my_pseuds: Manage My Pseuds @@ -1839,6 +1899,13 @@ en: edit_multiple: Edit Works invitations: Invitations new_work: Post New + passwords: + new: + email_or_username_html: Email address %{or} username + instructions: If you've forgotten your password, we can send instructions that will allow you to reset it. Please tell us the username or email address you used when you signed up for your Archive account. + or: or + page_heading: Forgotten your password? + reset_password: Reset Password registrations: legal: agreement_confirm: Yes, I have read the Terms of Service, including the Content Policy and Privacy Policy, and agree to them. @@ -1857,6 +1924,16 @@ en: user: User Details submit: Create Account wait: Please wait... + passwd: + confirm_password: Confirm password + confirm_password_validation: Please enter the same password in both fields. + password: Password + password_requirements: "%{minimum} to %{maximum} characters" + password_validation: Please enter a password! (At least %{minimum} letters long, please.) + username: Username + username_requirements: "%{minimum} to %{maximum} characters (A-Z, a-z, _, 0-9 only), no spaces, cannot begin or end with underscore (_)" + username_validation: You need a username! (At least %{minimum} letters long, please.) + valid_email: Valid email sessions: greeting: nav: @@ -1886,7 +1963,7 @@ en: warning: This site is in beta. Things may break or crash without notice. login: create_account: Create an account now - forgot: Forgot your password or user name? %{reset_password_link}. + forgot: Forgot your password or username? %{reset_password_link}. log_in: Log in no_account: Don't have an account? %{join_link}. request_invite: Request an invitation to join @@ -1899,6 +1976,20 @@ en: signup: Or join us for free - it's easy. sorry: Sorry! work_unavailable: This work is only available to registered users of the Archive. + passwd: + landmark_submit: Submit + log_in: Log in + password: 'Password:' + remember_me: Remember me + username_or_email: 'Username or email:' + passwd_small: + create_an_account: Create an Account + forgot_password: Forgot password? + get_an_invitation: Get an Invitation + log_in: Log In + password: 'Password:' + remember_me: Remember Me + username_or_email: 'Username or email:' show: login_banner: contact_abuse: contact our Policy & Abuse team diff --git a/factories/users.rb b/factories/users.rb index 8d83adafefb..61da64a1b6d 100644 --- a/factories/users.rb +++ b/factories/users.rb @@ -26,7 +26,7 @@ confirmed_at { nil } end - # User names used in mailer preview should be unique but recognizable as user names + # Usernames used in mailer preview should be unique but recognizable as usernames trait :for_mailer_preview do login { "User#{Faker::Alphanumeric.alpha(number: 8)}" } end diff --git a/features/admins/admin_invitations.feature b/features/admins/admin_invitations.feature index 30e5d1de468..3b54cfe2190 100644 --- a/features/admins/admin_invitations.feature +++ b/features/admins/admin_invitations.feature @@ -306,7 +306,7 @@ Feature: Admin Actions to Manage Invitations And "dax" has "2" invitations And I am logged in as an admin When I follow "Invite New Users" - And I fill in "Enter a user name" with "dax" + And I fill in "Enter a username" with "dax" And I press "Go" Then I should see "copy and use" When I follow "Invite New Users" @@ -332,10 +332,10 @@ Feature: Admin Actions to Manage Invitations Scenario: An admin can't find a invitation for a nonexistent user Given I am logged in as an admin And I follow "Invite New Users" - When I fill in "Enter a user name" with "dax" + When I fill in "Enter a username" with "dax" And I press "Go" Then I should see "No results were found. Try another search" - When I fill in "Enter a user name" with "" + When I fill in "Enter a username" with "" And I fill in "Enter all or part of an email address" with "nonexistent@domain.com" And I press "Go" Then I should see "No results were found. Try another search" @@ -370,7 +370,7 @@ Feature: Admin Actions to Manage Invitations And "dax" has "2" invitations And I am logged in as a "support" admin When I follow "Invite New Users" - And I fill in "Enter a user name" with "dax" + And I fill in "Enter a username" with "dax" And I press "Go" Then I should see "copy and use" When I follow "Invite New Users" diff --git a/features/admins/authenticate_admins.feature b/features/admins/authenticate_admins.feature index d8aa3a30eee..fa961a11045 100644 --- a/features/admins/authenticate_admins.feature +++ b/features/admins/authenticate_admins.feature @@ -6,21 +6,21 @@ Feature: Authenticate Admin Users | login | password | | Zooey | adminpassword | When I go to the home page - And I fill in "User name or email" with "Zooey" + And I fill in "Username or email" with "Zooey" And I fill in "Password" with "adminpassword" And I press "Log In" - Then I should see "The password or user name you entered doesn't match our records" + Then I should see "The password or username you entered doesn't match our records" Scenario: Ordinary user cannot log in or reset password as admin. Given the following activated user exists | login | password | | dizmo | wrangulator | When I go to the admin login page - And I fill in "Admin user name" with "dizmo" + And I fill in "Admin username" with "dizmo" And I fill in "Admin password" with "wrangulator" And I press "Log In as Admin" Then I should not see "Successfully logged in" - And I should see "The password or admin user name you entered doesn't match our records." + And I should see "The password or admin username you entered doesn't match our records." When I am logged in as "dizmo" with password "wrangulator" And I go to the new admin password page Then I should be on the homepage @@ -62,17 +62,17 @@ Feature: Authenticate Admin Users | Zooey | adminpassword | And I have loaded the "roles" fixture When I go to the admin login page - And I fill in "Admin user name" with "Zooey" + And I fill in "Admin username" with "Zooey" And I fill in "Admin password" with "adminpassword" And I press "Log In as Admin" Then I should see "Successfully logged in" - Scenario: Admin user name is case insensitive. + Scenario: Admin username is case insensitive. Given the following admin exists | login | password | | TheMadAdmin | adminpassword | When I go to the admin login page - And I fill in "Admin user name" with "themadadmin" + And I fill in "Admin username" with "themadadmin" And I fill in "Admin password" with "adminpassword" And I press "Log In as Admin" Then I should see "Successfully logged in" @@ -82,10 +82,10 @@ Feature: Authenticate Admin Users | login | password | | Zooey | adminpassword | When I go to the admin login page - And I fill in "Admin user name" with "Zooey" + And I fill in "Admin username" with "Zooey" And I fill in "Admin password" with "wrongpassword" And I press "Log In" - Then I should see "The password or user name you entered doesn't match our records." + Then I should see "The password or username you entered doesn't match our records." Scenario: Admin resets password. Given the following admin exists @@ -95,7 +95,7 @@ Feature: Authenticate Admin Users When I go to the admin login page And I follow "Forgot admin password?" Then I should see "Forgotten your admin password?" - When I fill in "Admin user name" with "admin" + When I fill in "Admin username" with "admin" And I press "Reset Admin Password" Then I should see "Check your email for instructions on how to reset your password." And 1 email should be delivered to "admin@example.com" @@ -115,7 +115,7 @@ Feature: Authenticate Admin Users When I go to the admin login page And I follow "Forgot admin password?" Then I should see "Forgotten your admin password?" - When I fill in "Admin user name" with "admin" + When I fill in "Admin username" with "admin" And I press "Reset Admin Password" Then I should see "Check your email for instructions on how to reset your password." And 1 email should be delivered to "admin@example.com" @@ -130,7 +130,7 @@ Feature: Authenticate Admin Users Scenario: Locked admin cannot sign in. Given the admin "admin" is locked When I go to the admin login page - And I fill in "Admin user name" with "admin" + And I fill in "Admin username" with "admin" And I fill in "Admin password" with "adminpassword" And I press "Log In as Admin" Then I should see "Your account is locked." @@ -141,7 +141,7 @@ Feature: Authenticate Admin Users And all emails have been delivered And I am on the admin login page When I follow "Forgot admin password?" - And I fill in "Admin user name" with "admin" + And I fill in "Admin username" with "admin" And I press "Reset Admin Password" Then I should see "Check your email for instructions on how to reset your password." And 1 email should be delivered @@ -152,7 +152,7 @@ Feature: Authenticate Admin Users And I press "Set Admin Password" Then I should see "Your password has been changed successfully. Your account is locked." When the admin "admin" is unlocked - And I fill in "Admin user name" with "admin" + And I fill in "Admin username" with "admin" And I fill in "Admin password" with "newpassword" And I press "Log In as Admin" Then I should see "Successfully logged in." diff --git a/features/other_a/profile_edit.feature b/features/other_a/profile_edit.feature index 1f9e0e6b593..18ea8853105 100644 --- a/features/other_a/profile_edit.feature +++ b/features/other_a/profile_edit.feature @@ -124,7 +124,7 @@ Scenario: Changing email address after requesting password reset When I am logged out And I follow "Forgot password?" - And I fill in "Email address or user name" with "editname" + And I fill in "Email address or username" with "editname" And I press "Reset Password" Then 1 email should be delivered to "bar@ao3.org" When all emails have been delivered diff --git a/features/step_definitions/admin_steps.rb b/features/step_definitions/admin_steps.rb index fa8e38d8926..118a5231910 100644 --- a/features/step_definitions/admin_steps.rb +++ b/features/step_definitions/admin_steps.rb @@ -22,7 +22,7 @@ login = "testadmin-#{role}" FactoryBot.create(:admin, login: login, roles: [role]) if Admin.find_by(login: login).nil? visit new_admin_session_path - fill_in "Admin user name", with: login + fill_in "Admin username", with: login fill_in "Admin password", with: "adminpassword" click_button "Log In as Admin" step %{I should see "Successfully logged in"} @@ -32,7 +32,7 @@ step "I start a new session" FactoryBot.create(:admin, login: "testadmin", email: "testadmin@example.org") if Admin.find_by(login: "testadmin").nil? visit new_admin_session_path - fill_in "Admin user name", with: "testadmin" + fill_in "Admin username", with: "testadmin" fill_in "Admin password", with: "adminpassword" click_button "Log In as Admin" step %{I should see "Successfully logged in"} diff --git a/features/step_definitions/user_steps.rb b/features/step_definitions/user_steps.rb index 6dfc6e9c0e7..e422b295816 100644 --- a/features/step_definitions/user_steps.rb +++ b/features/step_definitions/user_steps.rb @@ -99,7 +99,7 @@ step %{I am on the homepage} find_link('login-dropdown').click - fill_in "User name or email:", with: login + fill_in "Username or email:", with: login fill_in "Password:", with: password check "Remember Me" click_button "Log In" @@ -243,14 +243,14 @@ When "I request a password reset for {string}" do |login| step(%{I am on the login page}) step(%{I follow "Reset password"}) - step(%{I fill in "Email address or user name" with "#{login}"}) + step(%{I fill in "Email address or username" with "#{login}"}) step(%{I press "Reset Password"}) end # THEN -Then /^I should get the error message for wrong username or password$/ do - step(%{I should see "The password or user name you entered doesn't match our records. Please try again"}) +Then "I should get the error message for wrong username or password" do + step(%{I should see "The password or username you entered doesn't match our records. Please try again"}) end Then /^I should get an activation email for "(.*?)"$/ do |login| diff --git a/features/users/authenticate_users.feature b/features/users/authenticate_users.feature index 9c3459520c6..cf9de30bea1 100644 --- a/features/users/authenticate_users.feature +++ b/features/users/authenticate_users.feature @@ -9,14 +9,14 @@ Feature: User Authentication | sam | secret | And all emails have been delivered When I am on the home page - And I fill in "User name or email:" with "sam" + And I fill in "Username or email:" with "sam" And I fill in "Password:" with "test" And I press "Log In" - Then I should see "The password or user name you entered doesn't match our records" - And I should see "Forgot your password or user name?" + Then I should see "The password or username you entered doesn't match our records" + And I should see "Forgot your password or username?" When I follow "Reset password" - Then I should see "Please tell us the user name or email address you used when you signed up for your Archive account" - When I fill in "Email address or user name" with "sam" + Then I should see "Please tell us the username or email address you used when you signed up for your Archive account" + When I fill in "Email address or username" with "sam" And I press "Reset Password" Then I should see "Check your email for instructions on how to reset your password." And 1 email should be delivered @@ -26,7 +26,7 @@ Feature: User Authentication # existing password should still work When I am on the homepage - And I fill in "User name or email:" with "sam" + And I fill in "Username or email:" with "sam" And I fill in "Password:" with "secret" And I press "Log In" Then I should see "Hi, sam" @@ -66,14 +66,14 @@ Feature: User Authentication # old password should no longer work When I am on the homepage - And I fill in "User name or email:" with "sam" + And I fill in "Username or email:" with "sam" And I fill in "Password:" with "secret" And I press "Log In" Then I should not see "Hi, sam" # new password should work When I am on the homepage - And I fill in "User name or email:" with "sam" + And I fill in "Username or email:" with "sam" And I fill in "Password:" with "new When I am on the home page And I follow "Forgot password?" - And I fill in "Email address or user name" with "target" + And I fill in "Email address or username" with "target" And I press "Reset Password" Then I should be on the home page And I should see "Password resets are disabled for that user." And 0 emails should be delivered When I follow "Forgot password?" - And I fill in "Email address or user name" with "user@example.com" + And I fill in "Email address or username" with "user@example.com" And I press "Reset Password" Then I should be on the home page And I should see "Password resets are disabled for that user." @@ -289,11 +289,11 @@ Feature: User Authentication | login | password | | admin | adminpassword | When I go to the login page - And I fill in "User name or email" with "admin" + And I fill in "Username or email" with "admin" And I fill in "Password" with "adminpassword" And I press "Log In" Then I should not see "Successfully logged in" - And I should see "The password or user name you entered doesn't match our records." + And I should see "The password or username you entered doesn't match our records." When I am logged in as an admin And I go to the new user password page Then I should be on the homepage diff --git a/features/users/password_compatibility.feature b/features/users/password_compatibility.feature index 278225eab4a..4c121bb25c8 100644 --- a/features/users/password_compatibility.feature +++ b/features/users/password_compatibility.feature @@ -10,7 +10,7 @@ Feature: | login | password | | user1 | password | When I am on the homepage - And I fill in "User name or email:" with "user1" + And I fill in "Username or email:" with "user1" And I fill in "Password:" with "password" And I press "Log In" Then I should see "Successfully logged in." @@ -21,7 +21,7 @@ Feature: | login | password | | user1 | password | When I am on the homepage - And I fill in "User name or email:" with "user1" + And I fill in "Username or email:" with "user1" And I fill in "Password:" with "password" And I press "Log In" Then I should see "Successfully logged in." @@ -32,7 +32,7 @@ Feature: | login | password | | user1 | password | When I am on the homepage - And I fill in "User name or email:" with "user1" + And I fill in "Username or email:" with "user1" And I fill in "Password:" with "password" And I press "Log In" Then I should see "Successfully logged in." diff --git a/features/works/work_share.feature b/features/works/work_share.feature index 52ed92fab90..590933fb8d4 100644 --- a/features/works/work_share.feature +++ b/features/works/work_share.feature @@ -77,7 +77,7 @@ Feature: Share Works Then I should see "Close" within "#modal" When I follow "Close" And I follow "Log In" - And I fill in "User name or email:" with "maduser" + And I fill in "Username or email:" with "maduser" And I fill in "Password:" with "password" And I press "Log In" Then the url should not include "share" diff --git a/spec/models/admin_spec.rb b/spec/models/admin_spec.rb index 99a268cd310..ddd85fc9985 100644 --- a/spec/models/admin_spec.rb +++ b/spec/models/admin_spec.rb @@ -30,7 +30,7 @@ end context "invalid" do - it "without a user name" do + it "without a username" do expect { create(:admin, login: nil) } .to raise_error(ActiveRecord::RecordInvalid, "Validation failed: Login can't be blank, Login is too short (minimum is #{ArchiveConfig.LOGIN_LENGTH_MIN} characters)") diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index f7efde561b6..cd8fdc5872f 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -257,7 +257,7 @@ .to raise_error(ActiveRecord::RecordInvalid) localized_renamed_at = I18n.l(existing_user.renamed_at, format: :long) expect(existing_user.errors[:login].first).to eq( - "can only be changed once every 7 days. You last changed your user name on #{localized_renamed_at}." + "can only be changed once every 7 days. You last changed your username on #{localized_renamed_at}." ) end
    <%= t(".invitation_information") %>
    <%= t(".token") %><%= t(".sent_to") %><%= t(".username") %><%= t(".external_author") %><%= t(".copy_link") %>
    <%= link_to invitation.token, (invitation.creator.is_a?(User) ? [invitation.creator, invitation] : invitation) %> <%= invitation.invitee_email %><%=invitee_link(invitation) %><%= invitation.external_author ? "#{invitation.external_author.email} (#{invitation.external_author.names.collect(&:name).delete_if {|name| name == invitation.external_author.email}.join(",")})" : "" %><%= invitee_link(invitation) %> + <%= invitation.external_author ? "#{invitation.external_author.email} (#{invitation.external_author.names.collect(&:name).delete_if { |name| name == invitation.external_author.email } +.join(',')})" : "" %> + <% unless invitation.redeemed_at %> <% if invitation.external_author %> - <%= link_to ts("copy and use"), claim_path(:invitation_token => invitation.token) %> + <%= link_to t(".copy_and_use"), claim_path(invitation_token: invitation.token) %> <% else %> - <%= link_to ts("copy and use"), signup_path(:invitation_token => invitation.token) %><% end %> + <%= link_to t(".copy_and_use"), signup_path(invitation_token: invitation.token) %><% end %> <% end %> <%= link_to("Delete", invitation, data: {confirm: "Are you sure you want to delete this invitation?"}, :method => :delete) %><%= link_to(t(".delete"), invitation, data: { confirm: t(".delete_confirmation") }, method: :delete) %>