From 944e22502a90682b237743c280656e7c613c6c70 Mon Sep 17 00:00:00 2001 From: Miguel Michelson Date: Fri, 11 Aug 2023 13:41:04 -0400 Subject: [PATCH] translations --- app/views/articles/_article_block.html.erb | 4 +- app/views/articles/_article_highlights.erb | 6 +- .../articles/_article_item_small.html.erb | 2 +- app/views/articles/edit.html.erb | 2 +- app/views/articles/index.html.erb | 6 +- app/views/articles/new.html.erb | 2 +- app/views/devise/registrations/new.html.erb | 6 +- app/views/devise/shared/_links.html.erb | 4 +- app/views/events/index.html.erb | 6 +- app/views/events/show.html.erb | 16 ++-- app/views/home/index.html.erb | 6 +- app/views/shared/_user_menu.html.erb | 52 ++++++------ app/views/user_follows/index.html.erb | 13 ++- app/views/user_settings/_email_form.html.erb | 3 - .../user_settings/_profile_form.html.erb | 3 - .../user_settings/_security_form.html.erb | 4 - app/views/user_settings/index.html.erb | 28 +++---- app/views/users/show.html.erb | 22 ++--- config/locales/en.yml | 83 +++++++++++++++++++ 19 files changed, 169 insertions(+), 99 deletions(-) diff --git a/app/views/articles/_article_block.html.erb b/app/views/articles/_article_block.html.erb index 3b69fb3..13fefcd 100644 --- a/app/views/articles/_article_block.html.erb +++ b/app/views/articles/_article_block.html.erb @@ -13,7 +13,7 @@ <% end %> - <%= gettext("by") %> <%= post.user.username %> · <%= l post.created_at, format: :short %>. + <%= t("articles.by") %> <%= post.user.username %> · <%= l post.created_at, format: :short %>.

@@ -21,7 +21,7 @@

<%= link_to article_path(post), class: "inline-flex items-center py-4 mt-3 text-xs font-bold tracking-widest text-black uppercase transition duration-500 ease-in-out transform border-b-2 border-black dark:border-white dark:text-white hover:text-gray-600 hover:border-gray-600" do %> - <%= gettext("Read Now") %> + <%= t("articles.read_now") %>

- <%= gettext("Recent publications") %> + <%= t("articles.recent_publications") %>

diff --git a/app/views/articles/_article_item_small.html.erb b/app/views/articles/_article_item_small.html.erb index 09458b4..deea89e 100644 --- a/app/views/articles/_article_item_small.html.erb +++ b/app/views/articles/_article_item_small.html.erb @@ -17,7 +17,7 @@ itemprop="author" itemtype="http://schema.org/Person"> - By + <%= t("articles.by") %> <%= post.user.username %> diff --git a/app/views/articles/edit.html.erb b/app/views/articles/edit.html.erb index 0a528ed..6ab8f65 100644 --- a/app/views/articles/edit.html.erb +++ b/app/views/articles/edit.html.erb @@ -25,7 +25,7 @@ d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /> - <%= gettext("Article settings") %> + <%= t("articles.article_settings") %>
diff --git a/app/views/articles/index.html.erb b/app/views/articles/index.html.erb index 4152889..962fb70 100644 --- a/app/views/articles/index.html.erb +++ b/app/views/articles/index.html.erb @@ -2,11 +2,11 @@

- <%= gettext("Recent publications") %> + <%= t("articles.recent_publications") %>

- <%= gettext("Selected articles & reviews from Rauversion community and editorial") %> + <%= t("articles.selected_articles") %>

@@ -35,7 +35,7 @@

- <%= gettext("The Latest") %> + <%= t("articles.the_latest") %>

<% @articles.each do |post| %> diff --git a/app/views/articles/new.html.erb b/app/views/articles/new.html.erb index 4dac13e..4de331f 100644 --- a/app/views/articles/new.html.erb +++ b/app/views/articles/new.html.erb @@ -24,7 +24,7 @@ d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /> - <%= gettext("Article settings") %> + <%= t("articles.article_settings") %>
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index 7e759a0..9475583 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -6,12 +6,12 @@

- <%= gettext("Sign in to your account") %> + <%= t("users.sign_in") %>

diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb index fe61889..2c5f29c 100644 --- a/app/views/devise/shared/_links.html.erb +++ b/app/views/devise/shared/_links.html.erb @@ -5,8 +5,8 @@
- <%= link_to gettext("Register"), new_user_registration_path %> - <%= gettext("Or continue with") %> + <%= link_to t("users.register"), new_user_registration_path %> + <%= t("users.or") %>
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index 3daf88b..e3e4c15 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb @@ -3,10 +3,10 @@ <% if @upcoming_events.any? %>

- <%= gettext("Upcoming Events") %> + <%= gettext("events.upcoming") %>

- <%= gettext("Upcoming Events from the Rauversion community") %> + <%= gettext("event.upcoming_sub") %>

@@ -43,7 +43,7 @@

- <%= gettext("Past Events") %> + <%= t("events.past") %>

diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb index e4a797e..bdc0aee 100644 --- a/app/views/events/show.html.erb +++ b/app/views/events/show.html.erb @@ -29,7 +29,7 @@
<% if "Rauversion.Events.has_access_to_streaming?(@event, @current_user)" %> <%= link_to event_livestream_path(@event.signed_id), class: "space-x-2 inline-flex items-center rounded border border-transparent bg-indigo-600 px-2.5 py-1.5 text-xs font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2" do %> - <%= gettext("Watch live stream") %> + <%= t("events.watch_live") %> - Get your tickets + <%= t("events.get_tickets") %> <% end %>
@@ -89,7 +89,7 @@
- <%= @event.participant_label || gettext("Speakers") %> + <%= @event.participant_label || t("events.speakers") %>
<%= @event.event_hosts.size %> @@ -98,7 +98,7 @@
- <%= gettext("People Attending") %> + <%= t("events.people_attending") %>
<%= @event.purchased_items.where(state: "paid").size %> @@ -107,7 +107,7 @@
- <%= gettext("Venue") %> + <%= t("events.venue") %>
<%= @event.venue %> @@ -116,7 +116,7 @@
- <%= gettext("Location") %> + <%= t("events.location") %>
<%= @event.city %> @@ -193,9 +193,9 @@ -->

- <%= gettext("Copyright ©") %> + <%= t("events.copyright") %> <%= Time.zone.now.year %> - <%= @event.title %>. <%= gettext("All rights reserved.") %> + <%= @event.title %>. <%= t("events.all_rights") %>

diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 69ceb26..0d3e2b0 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -62,10 +62,10 @@

- <%= gettext("Recent Tracks") %> + <%= t("tracks.recent_tracks") %>

<%= link_to "/tracks", class: "hidden sm:block text-sm font-semibold text-brand-600 hover:text-brand-500" do %> - <%= gettext("See everything") %> + <%= t("see_everything") %> <% end %>
@@ -153,7 +153,7 @@ id="collections-users" class="text-2xl font-extrabold text-gray-900 dark:text-gray-100" > - <%= gettext("Artists You Should Know") %> + <%= t("home.artists") %>
diff --git a/app/views/shared/_user_menu.html.erb b/app/views/shared/_user_menu.html.erb index 9a5a824..ea6fc61 100644 --- a/app/views/shared/_user_menu.html.erb +++ b/app/views/shared/_user_menu.html.erb @@ -5,14 +5,14 @@
<%= link_to "/", class: "flex items-center space-x-3 text-white sm:text-2xl text-sm font-extrabold" do %> <%= image_tag "logo.png", class: "h-12 w-auto" %> - RAUVERSION + <%= ENV["APP_NAME"] %> <% # = RauversionWeb.Gettext |> Gettext.get_locale %> <% # = image_tag url_for(current_user.avatar), class: "h-8 w-auto" if current_user&.avatar&.persisted? %> <% end %>
@@ -152,7 +152,7 @@ data-action="dropdown#toggle click@window->dropdown#hide" class="flex-shrink-0 p-1 text-gray-200 rounded-full hover:text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-500 focus:ring-white" > - <%= gettext("Notifications") %> + <%= t("menu.notifications") %> <%= image_tag(current_user.avatar_url(:small), class: "h-6 w-6 rounded-full") %> @@ -178,7 +178,7 @@ <% #= if is_creator?(current_user) && current_user.username do %> <%= link_to user_path(current_user.username), class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> - <%= gettext("My Music") %> + <%= t("menu.my_music") %> <% end %> <% # = live_redirect gettext("My Merch"), to: "/merch/mine", class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" %> <% # end %> @@ -186,11 +186,11 @@ <% if current_user.is_admin? %> <%= link_to "/articles/mine", class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> - <%= gettext("My Articles") %> + <%= t("menu.my_articles") %> <% end %> <%= link_to "/events/mine", class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> - <%= gettext("My Events") %> + <%= t("menu.my_events") %> <% end %> <% end %> @@ -198,18 +198,18 @@ <% #= if is_creator?(current_user) do %> <%= link_to "/purchases", class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> - <%= gettext("My Purchases") %> + <%= t("menu.my_purchases") %> <% end %> <% #end %> <%= link_to "/sales", class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> - <%= gettext("My Sales") %> + <%= t("menu.my_sales") %> <% end %> <%= link_to user_settings_path(current_user.username), class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> - <%= gettext("Settings") %> + <%= t("menu.settings") %> <% end %>
@@ -222,7 +222,7 @@ <%= button_to destroy_user_session_path, method: :delete, class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> - <%= gettext("Log out") %> + <%= t("menu.log_out") %> <% end %>
@@ -246,15 +246,15 @@
<%= link_to "/tracks", class: "block rounded-md py-2 px-3 text-base font-medium text-white hover:text-white hover:bg-gray-800" do %> - <%= gettext("Music") %> + <%= t("menu.music") %> <% end %> <%= link_to "/articles", class: "block rounded-md py-2 px-3 text-base font-medium text-white hover:text-white hover:bg-gray-800" do %> - <%= gettext("Magazine") %> + <%= t("menu.magazine") %> <% end %> <%= link_to "/events", class: "block rounded-md py-2 px-3 text-base font-medium text-white hover:text-white hover:bg-gray-800" do %> - <%= gettext("Events") %> + <%= t("menu.events") %> <% end %> <% # = if function_exported?(Routes, :live_dashboard_path, 2) do %> @@ -263,12 +263,12 @@ <% if !current_user %> <%= link_to new_user_registration_path, class: "block rounded-md py-2 px-3 text-base font-medium text-white hover:text-white hover:bg-gray-800" do %> - <%= gettext("Register") %> + <%= t("menu.register") %> <% end %> <%= link_to new_user_session_path, class: "block rounded-md py-2 px-3 text-base font-medium text-white hover:text-white hover:bg-gray-800" do %> - <%= gettext("Log in") %> + <%= t("menu.log_in") %> <% end %> <% end %>
@@ -318,33 +318,33 @@ <% if current_user.is_creator? && current_user.username %> <%= link_to "Routes.profile_index_path(@conn, :index, current_user.username)}", class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> - <%= gettext("My Music") %> + <%= t("menu.my_music") %> <% end %> <% end %> <% if current_user.is_admin? %> <%= link_to "/articles/mine", class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> - <%= gettext("My Articles") %> + <%= t("menu.my_articles") %> <% end %> <%= link_to "/events/mine", class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> - <%= gettext("My Events") %> + <%= t("menu.my_events") %> <% end %> <% end %> <%= link_to "/purchases/tickets", class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> - <%= gettext("My Purchases") %> + <%= t("menu.my_purchases") %> <% end %> <%= link_to user_settings_path(current_user.username), class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> - <%= gettext("Settings") %> + <%= t("menu.settings") %> <% end %>
Support License <%= button_to destroy_user_session_path, method: :delete, class: "block px-4 py-2 text-sm text-gray-700 dark:text-gray-300" do %> - <%= gettext("Log out") %> + <%= t("menu.log_out") %> <% end %>
diff --git a/app/views/user_follows/index.html.erb b/app/views/user_follows/index.html.erb index 0fcbd18..cfd1410 100644 --- a/app/views/user_follows/index.html.erb +++ b/app/views/user_follows/index.html.erb @@ -31,7 +31,7 @@
- <%= link_to gettext("Go to profile"), user_path(@user.username) %> + <%= link_to t("profile.go_to"), user_path(@user.username) %>
@@ -39,13 +39,10 @@
diff --git a/app/views/user_settings/_email_form.html.erb b/app/views/user_settings/_email_form.html.erb index af50dd7..0ca099e 100644 --- a/app/views/user_settings/_email_form.html.erb +++ b/app/views/user_settings/_email_form.html.erb @@ -4,9 +4,6 @@ <%= form_for @user, url: user_setting_path(@user.username, :email), class: "space-y-8 divide-y divide-gray-200 dark:divide-gray-800" do |form| %> -
-

<%= gettext("Oops, something went wrong! Please check the errors below.") %>

-
diff --git a/app/views/user_settings/_profile_form.html.erb b/app/views/user_settings/_profile_form.html.erb index 07ad087..4d3b402 100644 --- a/app/views/user_settings/_profile_form.html.erb +++ b/app/views/user_settings/_profile_form.html.erb @@ -3,9 +3,6 @@ <%= form_for user, url: user_setting_path(user.username, :profile), class: "space-y-8 divide-y divide-gray-200 dark:divide-gray-800" do |form| %> -
-

<%= gettext("Oops, something went wrong! Please check the errors below.") %>

-
diff --git a/app/views/user_settings/_security_form.html.erb b/app/views/user_settings/_security_form.html.erb index 9a8cabe..886379b 100644 --- a/app/views/user_settings/_security_form.html.erb +++ b/app/views/user_settings/_security_form.html.erb @@ -3,10 +3,6 @@ <%= form_for @user, url: user_setting_path(@user.username, :secutiry), class: "space-y-8 divide-y divide-gray-200 dark:divide-gray-800" do |form| %> - -
-

<%= gettext("Oops, something went wrong! Please check the errors below.") %>

-
diff --git a/app/views/user_settings/index.html.erb b/app/views/user_settings/index.html.erb index 830de45..70df68b 100644 --- a/app/views/user_settings/index.html.erb +++ b/app/views/user_settings/index.html.erb @@ -3,44 +3,44 @@ { to: "settings", namespace: :profile, - title: gettext("Account"), - sub: gettext("Basic Account Information.") + title: t("user_settings.title_account"), + sub: t("user_settings.sub_account") }, { to: "settings/email", namespace: :email, - title: gettext("Change Email"), - sub: gettext("Change Email information.") + title: t("user_settings.title_email"), + sub: t("user_settings.sub_email") }, { to: "settings/security", namespace: :security, - title: gettext("Security"), - sub: gettext("Change your credentials") + title: t("user_settings.title_security"), + sub: t("user_settings.sub_credentials") }, { to: "settings/notifications", namespace: :notifications, - title: gettext("Notifications"), - sub: gettext("Change your notification preferences.") + title: t("user_settings.title_notifications"), + sub: t("user_settings.sub_notifications") }, { to: "settings/integrations", namespace: :integrations, - title: gettext("Integrations"), - sub: gettext("Manage your external integrations.") + title: t("user_settings.title_integrations"), + sub: t("user_settings.sub_integrations") }, { to: "settings/transbank", namespace: :transbank, - title: gettext("Transbank settings"), - sub: gettext("Manage your transbank commerce (Chile only).") + title: t("user_settings.title_transbank"), + sub: t("user_settings.sub_transbank") }, { to: "settings/invitations", namespace: :invitations, - title: gettext("Invitations"), - sub: gettext("Invite other artists to your account.") + title: t("user_settings.title_invitations"), + sub: t("user_settings.sub_invitations") } ] %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 0dfbe14..5f70784 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -23,10 +23,10 @@
@@ -66,7 +66,7 @@ - Nueva pista + <%= t("tracks.new_track") %>
@@ -98,21 +98,21 @@