Skip to content

Commit

Permalink
use i18n for header's title
Browse files Browse the repository at this point in the history
  • Loading branch information
JeSuisUnCaillou committed Jun 5, 2024
1 parent b9baf54 commit 4b4b1e5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/views/layouts/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
</div>
</div>
<div class="fr-header__service">
<a href="/" title="Accueil - Service de transmission administrative des données des particuliers - DINUM">
<p class="fr-header__service-title">
Service de transmission administrative
<br/>des données des particuliers
</p>
<a href="/" title="Accueil - <%= t('title') %> - DINUM">
<%= simple_format t('title'), { class: 'fr-header__service-title' }, wrapper_tag: 'p' %>
</a>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.1

config.time_zone = 'Europe/Paris'
config.i18n.available_locales = [:fr]
config.i18n.default_locale = :fr

# Please, add to the `ignore` list any other `lib` subdirectories that do
# not contain `.rb` files, or that should not be reloaded or eager loaded.
# Common ones are `templates`, `generators`, or `middleware`, for example.
Expand Down
4 changes: 4 additions & 0 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fr:
title: |
Service de transmission administrative
des données des particuliers

0 comments on commit 4b4b1e5

Please sign in to comment.