Skip to content

Commit ea31089

Browse files
feat: Enable interface customisation for everyone
1 parent c580245 commit ea31089

4 files changed

Lines changed: 98 additions & 100 deletions

File tree

locales/fr_FR/LC_MESSAGES/main.mo

0 Bytes
Binary file not shown.

locales/fr_FR/LC_MESSAGES/main.po

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
msgid ""
22
msgstr ""
33
"Project-Id-Version: Flus\n"
4-
"POT-Creation-Date: 2026-05-29 17:08+0200\n"
5-
"PO-Revision-Date: 2026-05-29 17:08+0200\n"
4+
"POT-Creation-Date: 2026-06-08 16:45+0200\n"
5+
"PO-Revision-Date: 2026-06-08 16:45+0200\n"
66
"Last-Translator: Marien Fressinaud <dev@marienfressinaud.fr>\n"
77
"Language-Team: \n"
88
"Language: fr_FR\n"
@@ -716,9 +716,9 @@ msgstr "(max. %d caractères)"
716716
#: views/mastodon/show.html.twig:62 views/mastodon/show.html.twig:139
717717
#: views/my/account/deletion.html.twig:38 views/my/avatar/edit.html.twig:20
718718
#: views/my/preferences/edit.html.twig:35
719-
#: views/my/preferences/edit.html.twig:67
720-
#: views/my/preferences/edit.html.twig:98
721-
#: views/my/preferences/edit.html.twig:129 views/my/profile/edit.html.twig:20
719+
#: views/my/preferences/edit.html.twig:66
720+
#: views/my/preferences/edit.html.twig:97
721+
#: views/my/preferences/edit.html.twig:128 views/my/profile/edit.html.twig:20
722722
#: views/my/profile/edit.html.twig:50
723723
#: views/my/security/confirmation.html.twig:40
724724
#: views/my/security/show.html.twig:31 views/my/security/show.html.twig:59
@@ -793,7 +793,7 @@ msgstr "Modification d'une collection"
793793
#: views/collections/filters/edit.html.twig:96
794794
#: views/collections/groups/edit.html.twig:99 views/groups/edit.html.twig:43
795795
#: views/links/edit.html.twig:126 views/mastodon/show.html.twig:96
796-
#: views/my/preferences/edit.html.twig:204 views/my/profile/edit.html.twig:74
796+
#: views/my/preferences/edit.html.twig:202 views/my/profile/edit.html.twig:74
797797
#: views/my/security/show.html.twig:98 views/notes/edit.html.twig:49
798798
msgid "Save changes"
799799
msgstr "Enregistrer les modifications"
@@ -2091,41 +2091,41 @@ msgstr "Téléverser une photo"
20912091
msgid "Your language"
20922092
msgstr "Votre langue"
20932093

2094-
#: views/my/preferences/edit.html.twig:62
2094+
#: views/my/preferences/edit.html.twig:61
20952095
msgid "Interface theme"
20962096
msgstr "Thème de l’interface"
20972097

2098-
#: views/my/preferences/edit.html.twig:93
2098+
#: views/my/preferences/edit.html.twig:92
20992099
msgid "Font family"
21002100
msgstr "Police d’écriture"
21012101

2102-
#: views/my/preferences/edit.html.twig:124
2102+
#: views/my/preferences/edit.html.twig:123
21032103
msgid "Text size"
21042104
msgstr "Taille du texte"
21052105

2106-
#: views/my/preferences/edit.html.twig:164
2106+
#: views/my/preferences/edit.html.twig:162
21072107
msgid "Enable compact mode"
21082108
msgstr "Activer le mode compact"
21092109

2110-
#: views/my/preferences/edit.html.twig:168
2110+
#: views/my/preferences/edit.html.twig:166
21112111
msgid ""
21122112
"In compact mode, you see more links at a glance, but you may feel "
21132113
"overwhelmed by the information."
21142114
msgstr ""
21152115
"En mode compact, vous voyez plus de liens en un coup d’œil, mais vous "
21162116
"pourriez vous sentir submergé par la quantité d’informations."
21172117

2118-
#: views/my/preferences/edit.html.twig:181
2118+
#: views/my/preferences/edit.html.twig:179
21192119
msgid "Accept to be contacted by email to help improve the service (optional)."
21202120
msgstr ""
21212121
"Accepter d’être contacté‧e par courriel pour aider à améliorer le service "
21222122
"(facultatif)."
21232123

2124-
#: views/my/preferences/edit.html.twig:195
2124+
#: views/my/preferences/edit.html.twig:193
21252125
msgid "Enable beta features"
21262126
msgstr "Activer les fonctionnalités bêta"
21272127

2128-
#: views/my/preferences/edit.html.twig:199
2128+
#: views/my/preferences/edit.html.twig:197
21292129
msgid ""
21302130
"With beta features you test some features before everyone else, but you "
21312131
"enter a turbulent zone."

src/views/layouts/base.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<html
33
lang="{{ app.locale | locale_to_bcp_47 }}"
44
data-controller="color-scheme"
5-
data-color-scheme="{{ app.user and app.user.isBetaEnabled ? app.user.option_color_scheme : 'light' }}"
6-
data-font-family="{{ app.user and app.user.isBetaEnabled ? app.user.option_font_family : 'default' }}"
7-
data-text-size="{{ app.user and app.user.isBetaEnabled ? app.user.option_text_size : 'medium' }}"
5+
data-color-scheme="{{ app.user ? app.user.option_color_scheme : 'light' }}"
6+
data-font-family="{{ app.user ? app.user.option_font_family : 'default' }}"
7+
data-text-size="{{ app.user ? app.user.option_text_size : 'medium' }}"
88
>
99
<head>
1010
<meta charset="UTF-8" />

src/views/my/preferences/edit.html.twig

Lines changed: 81 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -56,100 +56,98 @@
5656
</select>
5757
</div>
5858

59-
{% if app.user.isBetaEnabled %}
60-
<div class="form-group">
61-
<label for="option-color-scheme">
62-
{{ t('Interface theme') }}
63-
</label>
59+
<div class="form-group">
60+
<label for="option-color-scheme">
61+
{{ t('Interface theme') }}
62+
</label>
63+
64+
{% if form.isInvalid('option_color_scheme') %}
65+
<p id="option-color-scheme-error" class="form-group__error">
66+
{{ t('Error:') }}
67+
{{ form.error('option_color_scheme') }}
68+
</p>
69+
{% endif %}
6470

71+
<select
72+
id="option-color-scheme"
73+
name="option_color_scheme"
6574
{% if form.isInvalid('option_color_scheme') %}
66-
<p id="option-color-scheme-error" class="form-group__error">
67-
{{ t('Error:') }}
68-
{{ form.error('option_color_scheme') }}
69-
</p>
75+
aria-errormessage="option-color-scheme-error"
76+
aria-invalid="true"
7077
{% endif %}
78+
>
79+
{% for color_scheme_value, color_scheme_label in form.colorSchemeValues %}
80+
<option
81+
value="{{ color_scheme_value }}"
82+
{{ color_scheme_value === form.option_color_scheme ? 'selected' : '' }}
83+
>
84+
{{ color_scheme_label }}
85+
</option>
86+
{% endfor %}
87+
</select>
88+
</div>
7189

72-
<select
73-
id="option-color-scheme"
74-
name="option_color_scheme"
75-
{% if form.isInvalid('option_color_scheme') %}
76-
aria-errormessage="option-color-scheme-error"
77-
aria-invalid="true"
78-
{% endif %}
79-
>
80-
{% for color_scheme_value, color_scheme_label in form.colorSchemeValues %}
81-
<option
82-
value="{{ color_scheme_value }}"
83-
{{ color_scheme_value === form.option_color_scheme ? 'selected' : '' }}
84-
>
85-
{{ color_scheme_label }}
86-
</option>
87-
{% endfor %}
88-
</select>
89-
</div>
90-
91-
<div class="form-group">
92-
<label for="option-font-family">
93-
{{ t('Font family') }}
94-
</label>
90+
<div class="form-group">
91+
<label for="option-font-family">
92+
{{ t('Font family') }}
93+
</label>
9594

95+
{% if form.isInvalid('option_font_family') %}
96+
<p id="option-font-family-error" class="form-group__error">
97+
{{ t('Error:') }}
98+
{{ form.error('option_font_family') }}
99+
</p>
100+
{% endif %}
101+
102+
<select
103+
id="option-font-family"
104+
name="option_font_family"
96105
{% if form.isInvalid('option_font_family') %}
97-
<p id="option-font-family-error" class="form-group__error">
98-
{{ t('Error:') }}
99-
{{ form.error('option_font_family') }}
100-
</p>
106+
aria-errormessage="option-font-family-error"
107+
aria-invalid="true"
101108
{% endif %}
109+
>
110+
{% for font_family_value, font_family_label in form.fontFamilyValues %}
111+
<option
112+
value="{{ font_family_value }}"
113+
{{ font_family_value === form.option_font_family ? 'selected' : '' }}
114+
>
115+
{{ font_family_label }}
116+
</option>
117+
{% endfor %}
118+
</select>
119+
</div>
102120

103-
<select
104-
id="option-font-family"
105-
name="option_font_family"
106-
{% if form.isInvalid('option_font_family') %}
107-
aria-errormessage="option-font-family-error"
108-
aria-invalid="true"
109-
{% endif %}
110-
>
111-
{% for font_family_value, font_family_label in form.fontFamilyValues %}
112-
<option
113-
value="{{ font_family_value }}"
114-
{{ font_family_value === form.option_font_family ? 'selected' : '' }}
115-
>
116-
{{ font_family_label }}
117-
</option>
118-
{% endfor %}
119-
</select>
120-
</div>
121-
122-
<div class="form-group">
123-
<label for="option-text-size">
124-
{{ t('Text size') }}
125-
</label>
121+
<div class="form-group">
122+
<label for="option-text-size">
123+
{{ t('Text size') }}
124+
</label>
126125

126+
{% if form.isInvalid('option_text_size') %}
127+
<p id="option-text-size-error" class="form-group__error">
128+
{{ t('Error:') }}
129+
{{ form.error('option_text_size') }}
130+
</p>
131+
{% endif %}
132+
133+
<select
134+
id="option-text-size"
135+
name="option_text_size"
127136
{% if form.isInvalid('option_text_size') %}
128-
<p id="option-text-size-error" class="form-group__error">
129-
{{ t('Error:') }}
130-
{{ form.error('option_text_size') }}
131-
</p>
137+
aria-errormessage="option-text-size-error"
138+
aria-invalid="true"
132139
{% endif %}
133-
134-
<select
135-
id="option-text-size"
136-
name="option_text_size"
137-
{% if form.isInvalid('option_text_size') %}
138-
aria-errormessage="option-text-size-error"
139-
aria-invalid="true"
140-
{% endif %}
141-
>
142-
{% for text_size_value, text_size_label in form.textSizeValues %}
143-
<option
144-
value="{{ text_size_value }}"
145-
{{ text_size_value === form.option_text_size ? 'selected' : '' }}
146-
>
147-
{{ text_size_label }}
148-
</option>
149-
{% endfor %}
150-
</select>
151-
</div>
152-
{% endif %}
140+
>
141+
{% for text_size_value, text_size_label in form.textSizeValues %}
142+
<option
143+
value="{{ text_size_value }}"
144+
{{ text_size_value === form.option_text_size ? 'selected' : '' }}
145+
>
146+
{{ text_size_label }}
147+
</option>
148+
{% endfor %}
149+
</select>
150+
</div>
153151

154152
<div>
155153
<input

0 commit comments

Comments
 (0)