From 101b2aba8f462fa1f1c51adfd019d787ad75c745 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com>
Date: Thu, 20 Oct 2022 16:48:53 +0200
Subject: [PATCH] locales

---
 app/views/extranet/account/show.html.erb       |  2 +-
 app/views/extranet/application/_nav.html.erb   |  2 +-
 app/views/extranet/experiences/_form.html.erb  |  1 -
 app/views/extranet/home/index.html.erb         |  6 +++---
 app/views/extranet/organizations/show.html.erb |  2 +-
 app/views/extranet/persons/show.html.erb       |  2 +-
 config/locales/extranet/en.yml                 | 10 ++++++++++
 config/locales/extranet/fr.yml                 |  7 +++++++
 8 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/app/views/extranet/account/show.html.erb b/app/views/extranet/account/show.html.erb
index f6b902366..94c129d7f 100644
--- a/app/views/extranet/account/show.html.erb
+++ b/app/views/extranet/account/show.html.erb
@@ -11,7 +11,7 @@
       <%= link_to University::Person::Experience.human_attribute_name('new'),
                   new_experience_path,
                   class: 'btn btn-sm btn-secondary float-end mb-4' %>
-      <p class="mb-4">Parcours professionel</p>
+      <p class="mb-4"><%= t('extranet.experiences.title') %></p>
       <br>
       <% if @person&.experiences.any? %>
         <ul>
diff --git a/app/views/extranet/application/_nav.html.erb b/app/views/extranet/application/_nav.html.erb
index 58e9bcb70..a1588bd37 100644
--- a/app/views/extranet/application/_nav.html.erb
+++ b/app/views/extranet/application/_nav.html.erb
@@ -4,7 +4,7 @@
       <%= render 'logo' %>
     </a>
     <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#menu" aria-controls="menu" aria-expanded="false" aria-label="Toggle menu">
-      menu <span class="navbar-toggler-icon"></span>
+      <%= t('extranet.menu') %> <span class="navbar-toggler-icon"></span>
     </button>
     <div class="collapse navbar-collapse" id="menu">
       <%= render_navigation %>
diff --git a/app/views/extranet/experiences/_form.html.erb b/app/views/extranet/experiences/_form.html.erb
index 1c90372f6..a778a5f40 100644
--- a/app/views/extranet/experiences/_form.html.erb
+++ b/app/views/extranet/experiences/_form.html.erb
@@ -13,7 +13,6 @@
     </div>
     <div class="col-lg-6">
       <%= f.association :organization, include_blank: false %>
-      <%= link_to 'Créer une nouvelle organisation', '', class: 'btn btn-sm btn-secondary mb-4' %>
     </div>
   </div>
   <%= submit f %>
diff --git a/app/views/extranet/home/index.html.erb b/app/views/extranet/home/index.html.erb
index 7d9c5114a..66347c280 100644
--- a/app/views/extranet/home/index.html.erb
+++ b/app/views/extranet/home/index.html.erb
@@ -2,7 +2,7 @@
 
 <div class="row">
   <div class="col-md-8">
-    <h2>Mouvements récents</h2>
+    <h2><%= t('extranet.home.recent_experiences') %></h2>
     <div class="experiences">
       <ul>
           <% @experiences.ordered.each do |experience| %>
@@ -25,7 +25,7 @@
                   <%= experience.person.first_name %> <%= experience.person.last_name %>
                   <br>
                   <%= experience.description %>
-                  <%= '—' if experience.description.present? && experience.organization.present? %> 
+                  <%= '—' if experience.description.present? && experience.organization.present? %>
                   <%= experience.organization %>
                 </p>
                 <small><%= l experience.created_at.to_date, format: :long %></small>
@@ -46,7 +46,7 @@
 
 
   <div class="col-md-4 mt-5 mt-md-0">
-    <h2>Promotions récentes</h2>
+    <h2><%= t('extranet.home.recent_cohorts') %></h2>
     <ul class="promotions">
       <% @cohorts.each do |cohort| %>
         <li>
diff --git a/app/views/extranet/organizations/show.html.erb b/app/views/extranet/organizations/show.html.erb
index 67d044f7d..c32ad0d8e 100644
--- a/app/views/extranet/organizations/show.html.erb
+++ b/app/views/extranet/organizations/show.html.erb
@@ -22,7 +22,7 @@
       <p><%= @organization.text %></p>
     </div>
     <div class="experiences">
-      <p class="mb-4">Alumni dans cette organisation (<%= @organization.experiences.count %>)</p>
+      <p class="mb-4"><%= t('extranet.organization.experiences', count: @organization.experiences.count) %></p>
       <ul>
           <% @organization.experiences.ordered.each do |experience| %>
           <li class="mb-3">
diff --git a/app/views/extranet/persons/show.html.erb b/app/views/extranet/persons/show.html.erb
index ad3730db9..fa86bd219 100644
--- a/app/views/extranet/persons/show.html.erb
+++ b/app/views/extranet/persons/show.html.erb
@@ -9,7 +9,7 @@
     </div>
     <% if @person&.experiences.any? %>
       <div class="experiences">
-        <p class="mb-4">Parcours professionel</p>
+        <p class="mb-4"><%= t('extranet.experiences.title') %></p>
         <ul>
           <% @person.experiences.ordered.each do |experience| %>
             <%= render 'extranet/experiences/experience', experience: experience %>
diff --git a/config/locales/extranet/en.yml b/config/locales/extranet/en.yml
index 0311a59b0..44d243513 100644
--- a/config/locales/extranet/en.yml
+++ b/config/locales/extranet/en.yml
@@ -5,5 +5,15 @@ en:
       edit: Edit
       updated: Updated
       logout: Log out
+    errors:
+      email_not_allowed: is not authorized to access this extranet.
+      email_not_allowed_with_contact: is not authorized to access this extranet. Contact %{contact} for more information.
     experiences:
       new: Add experience
+      title: Professional path
+    home:
+      recent_cohorts: Recent cohorts
+      recent_experiences: Recent experiences
+    menu: Menu
+    organization:
+      experiences: Alumni in this organization (%{count})
diff --git a/config/locales/extranet/fr.yml b/config/locales/extranet/fr.yml
index 91e718ba3..ad237f29a 100644
--- a/config/locales/extranet/fr.yml
+++ b/config/locales/extranet/fr.yml
@@ -10,3 +10,10 @@ fr:
       email_not_allowed_with_contact: n'est pas autorisé à accéder à cet extranet. Contactez %{contact} pour en savoir plus.
     experiences:
       new: Ajouter une expérience
+      title: Parcours professionnel
+    home:
+      recent_cohorts: Promotions récentes
+      recent_experiences: Mouvements récents
+    menu: Menu
+    organization:
+      experiences: Alumni dans cette organisation (%{count})
-- 
GitLab