Add language settings for users, and translate titles to French

This commit is contained in:
sto
2025-03-27 12:55:12 +01:00
parent 497768610d
commit 8b0b1c6745
14 changed files with 128 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
= form_with model: user, method: method do |form|
- if method == :patch
h4 General settings
.row.mb-3
.col
.input-group
@@ -8,11 +9,20 @@
.form-floating
= form.text_field :username, autocomplete: "off", class: "form-control"
= form.label :username, class: "required"
.row.mb-3
.col
.form-floating
= form.text_field :email_address, autocomplete: "off", class: "form-control"
= form.label :email_address, class: "required"
.row.mb-3
.col
.form-floating
= form.select :lang, Languages::AVAILABLE_LANGUAGES.map { |lang| [ lang[:name], lang[:id] ] }, {}, class: "form-select"
= form.label :lang
| Language
- if method == :post
.row.mb-3
.col
@@ -23,6 +33,7 @@
- if method == :patch
h4.mt-5 Change password
= form_with model: user, method: method do |form|
.row.mb-3
.col