Skip to content

Commit de5cf06

Browse files
salsifisBenoît Mortgat
andauthored
Improvements for French language (#1161)
* Add missing French translations * Add a new French layout. This layout is inspired by the fr-messagease layout, but: * Some letters used in French were missing (Œ, Æ) * Some letters could only be typed in decomposed Unicode form (û, î, ë, ï, ÿ) * Accented vowels, except ÿ, are now on the same key as the vowel itself. Some symbols were therefore moved. * Change case of the new French layout title --------- Co-authored-by: Benoît Mortgat <benoit.mortgat@pm.me>
1 parent 9c08def commit de5cf06

3 files changed

Lines changed: 312 additions & 15 deletions

File tree

Lines changed: 281 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,281 @@
1+
@file:Suppress("ktlint:standard:no-wildcard-imports")
2+
3+
package com.dessalines.thumbkey.keyboards
4+
5+
import androidx.compose.material.icons.Icons
6+
import androidx.compose.material.icons.outlined.*
7+
import com.dessalines.thumbkey.utils.*
8+
import com.dessalines.thumbkey.utils.ColorVariant.*
9+
import com.dessalines.thumbkey.utils.FontSizeVariant.*
10+
import com.dessalines.thumbkey.utils.KeyAction.*
11+
import com.dessalines.thumbkey.utils.SwipeNWay.*
12+
13+
val KB_FR_THUMBKEY_V3_MAIN =
14+
KeyboardC(
15+
listOf(
16+
listOf(
17+
KeyItemC(
18+
center = KeyC("a", size = LARGE),
19+
topLeft = KeyC("æ"),
20+
top = KeyC("â"),
21+
topRight = KeyC("v"),
22+
left = KeyC("μ", color = MUTED),
23+
right = KeyC("-", color = MUTED),
24+
bottomLeft = KeyC("$", color = MUTED),
25+
bottom = KeyC("q"),
26+
bottomRight = KeyC("à"),
27+
),
28+
KeyItemC(
29+
center = KeyC("n", size = LARGE),
30+
topLeft = KeyC("\u0300", displayText = "ˋ", color = MUTED),
31+
top = KeyC("\u0302", displayText = "^", color = MUTED),
32+
topRight = KeyC("\u0301", displayText = "ˊ", color = MUTED),
33+
left = KeyC("+", color = MUTED),
34+
right = KeyC("!", color = MUTED),
35+
bottomLeft = KeyC("/", color = MUTED),
36+
bottom = KeyC("l"),
37+
bottomRight = KeyC("\\", color = MUTED),
38+
),
39+
KeyItemC(
40+
center = KeyC("i", size = LARGE),
41+
topLeft = KeyC("ï"),
42+
top = KeyC("î"),
43+
topRight = KeyC("\"", color = MUTED),
44+
left = KeyC("k"),
45+
right = KeyC("?", color = MUTED),
46+
bottomLeft = KeyC("x"),
47+
bottom = KeyC("=", color = MUTED),
48+
bottomRight = KeyC("%", color = MUTED),
49+
),
50+
EMOJI_KEY_ITEM,
51+
),
52+
listOf(
53+
KeyItemC(
54+
center = KeyC("u", size = LARGE),
55+
topLeft = KeyC("{", color = MUTED),
56+
top = KeyC("û"),
57+
topRight = KeyC("ü"),
58+
left = KeyC("(", color = MUTED),
59+
right = KeyC("h"),
60+
bottomLeft = KeyC("[", color = MUTED),
61+
bottom = KeyC("ç"),
62+
bottomRight = KeyC("ù"),
63+
),
64+
KeyItemC(
65+
center = KeyC("o", size = LARGE),
66+
topLeft = KeyC("œ"),
67+
top = KeyC("ô"),
68+
topRight = KeyC("p"),
69+
left = KeyC("c"),
70+
right = KeyC("b"),
71+
bottomLeft = KeyC("g"),
72+
bottom = KeyC("d"),
73+
bottomRight = KeyC("j"),
74+
),
75+
KeyItemC(
76+
center = KeyC("r", size = LARGE),
77+
topLeft = KeyC("|", color = MUTED),
78+
top =
79+
KeyC(
80+
display = KeyDisplay.IconDisplay(Icons.Outlined.ArrowDropUp),
81+
action = ToggleShiftMode(true),
82+
swipeReturnAction = ToggleCurrentWordCapitalization(true),
83+
color = MUTED,
84+
),
85+
topRight = KeyC("}", color = MUTED),
86+
left = KeyC("m"),
87+
right = KeyC(")", color = MUTED),
88+
bottomLeft = KeyC("@", color = MUTED),
89+
bottom =
90+
KeyC(
91+
ToggleShiftMode(false),
92+
swipeReturnAction = ToggleCurrentWordCapitalization(false),
93+
),
94+
bottomRight = KeyC("]", color = MUTED),
95+
),
96+
NUMERIC_KEY_ITEM,
97+
),
98+
listOf(
99+
KeyItemC(
100+
center = KeyC("t", size = LARGE),
101+
topLeft = KeyC("~", color = MUTED),
102+
top = KeyC("w"),
103+
topRight = KeyC("y"),
104+
left = KeyC("<", color = MUTED),
105+
right = KeyC(":", color = MUTED),
106+
bottomLeft = KeyC("\u0303", displayText = "ñ", color = MUTED),
107+
bottom = KeyC("_", color = MUTED),
108+
bottomRight = KeyC("\u0009", displayText = "\u2b7e", color = MUTED),
109+
),
110+
KeyItemC(
111+
center = KeyC("e", size = LARGE),
112+
topLeft = KeyC("ë"),
113+
top = KeyC("ê"),
114+
topRight = KeyC("é"),
115+
left = KeyC("'", color = MUTED),
116+
right = KeyC("z"),
117+
bottomLeft = KeyC(",", color = MUTED),
118+
bottom = KeyC(".", color = MUTED),
119+
bottomRight = KeyC("è"),
120+
),
121+
KeyItemC(
122+
center = KeyC("s", size = LARGE),
123+
topLeft = KeyC("f"),
124+
top = KeyC("&", color = MUTED),
125+
topRight = KeyC("ÿ"),
126+
left = KeyC("#", color = MUTED),
127+
right = KeyC(">", color = MUTED),
128+
bottomLeft = KeyC(";", color = MUTED),
129+
bottom = KeyC("\u0308", displayText = "¨", color = MUTED),
130+
bottomRight = KeyC("ö"),
131+
),
132+
BACKSPACE_KEY_ITEM,
133+
),
134+
listOf(
135+
SPACEBAR_FRENCH_KEY_ITEM,
136+
RETURN_KEY_ITEM,
137+
),
138+
),
139+
)
140+
141+
val KB_FR_THUMBKEY_V3_SHIFTED =
142+
KeyboardC(
143+
listOf(
144+
listOf(
145+
KeyItemC(
146+
center = KeyC("A", size = LARGE),
147+
topLeft = KeyC("Æ"),
148+
top = KeyC("Â"),
149+
topRight = KeyC("V"),
150+
left = KeyC("μ", color = MUTED),
151+
right = KeyC("-", color = MUTED),
152+
bottomLeft = KeyC("$", color = MUTED),
153+
bottom = KeyC("Q"),
154+
bottomRight = KeyC("À"),
155+
),
156+
KeyItemC(
157+
center = KeyC("N", size = LARGE),
158+
topLeft = KeyC("\u0300", displayText = "ˋ", color = MUTED),
159+
top = KeyC("\u0302", displayText = "^", color = MUTED),
160+
topRight = KeyC("\u0301", displayText = "ˊ", color = MUTED),
161+
left = KeyC("+", color = MUTED),
162+
right = KeyC("!", color = MUTED),
163+
bottomLeft = KeyC("/", color = MUTED),
164+
bottom = KeyC("L"),
165+
bottomRight = KeyC("\\", color = MUTED),
166+
),
167+
KeyItemC(
168+
center = KeyC("I", size = LARGE),
169+
topLeft = KeyC("Ï"),
170+
top = KeyC("Î"),
171+
topRight = KeyC("\"", color = MUTED),
172+
left = KeyC("K"),
173+
right = KeyC("?", color = MUTED),
174+
bottomLeft = KeyC("X"),
175+
bottom = KeyC("=", color = MUTED),
176+
bottomRight = KeyC("%", color = MUTED),
177+
),
178+
EMOJI_KEY_ITEM,
179+
),
180+
listOf(
181+
KeyItemC(
182+
center = KeyC("U", size = LARGE),
183+
topLeft = KeyC("{", color = MUTED),
184+
top = KeyC("Û"),
185+
topRight = KeyC("Ü"),
186+
left = KeyC("(", color = MUTED),
187+
right = KeyC("H"),
188+
bottomLeft = KeyC("[", color = MUTED),
189+
bottom = KeyC("Ç"),
190+
bottomRight = KeyC("Ù"),
191+
),
192+
KeyItemC(
193+
center = KeyC("O", size = LARGE),
194+
topLeft = KeyC("Œ"),
195+
top = KeyC("Ô"),
196+
topRight = KeyC("P"),
197+
left = KeyC("C"),
198+
right = KeyC("B"),
199+
bottomLeft = KeyC("G"),
200+
bottom = KeyC("D"),
201+
bottomRight = KeyC("J"),
202+
),
203+
KeyItemC(
204+
center = KeyC("R", size = LARGE),
205+
topLeft = KeyC("|", color = MUTED),
206+
top =
207+
KeyC(
208+
display = KeyDisplay.IconDisplay(Icons.Outlined.KeyboardCapslock),
209+
capsModeDisplay = KeyDisplay.IconDisplay(Icons.Outlined.Copyright),
210+
action = ToggleCapsLock,
211+
swipeReturnAction = ToggleCurrentWordCapitalization(true),
212+
color = MUTED,
213+
),
214+
topRight = KeyC("}", color = MUTED),
215+
left = KeyC("M"),
216+
right = KeyC(")", color = MUTED),
217+
bottomLeft = KeyC("@", color = MUTED),
218+
bottom =
219+
KeyC(
220+
display = KeyDisplay.IconDisplay(Icons.Outlined.ArrowDropDown),
221+
action = ToggleShiftMode(false),
222+
swipeReturnAction = ToggleCurrentWordCapitalization(false),
223+
color = MUTED,
224+
),
225+
bottomRight = KeyC("]", color = MUTED),
226+
),
227+
NUMERIC_KEY_ITEM,
228+
),
229+
listOf(
230+
KeyItemC(
231+
center = KeyC("T", size = LARGE),
232+
topLeft = KeyC("~", color = MUTED),
233+
top = KeyC("W"),
234+
topRight = KeyC("Y"),
235+
left = KeyC("<", color = MUTED),
236+
right = KeyC(":", color = MUTED),
237+
bottomLeft = KeyC("\u0303", displayText = "ñ", color = MUTED),
238+
bottom = KeyC("_", color = MUTED),
239+
bottomRight = KeyC("\u0009", displayText = "\u2b7e", color = MUTED),
240+
),
241+
KeyItemC(
242+
center = KeyC("E", size = LARGE),
243+
topLeft = KeyC("Ë"),
244+
top = KeyC("Ê"),
245+
topRight = KeyC("É"),
246+
left = KeyC("'", color = MUTED),
247+
right = KeyC("Z"),
248+
bottomLeft = KeyC(",", color = MUTED),
249+
bottom = KeyC(".", color = MUTED),
250+
bottomRight = KeyC("È"),
251+
),
252+
KeyItemC(
253+
center = KeyC("S", size = LARGE),
254+
topLeft = KeyC("F"),
255+
top = KeyC("&", color = MUTED),
256+
topRight = KeyC("Ÿ"),
257+
left = KeyC("#", color = MUTED),
258+
right = KeyC(">", color = MUTED),
259+
bottomLeft = KeyC(";", color = MUTED),
260+
bottom = KeyC("\u0308", displayText = "¨", color = MUTED),
261+
bottomRight = KeyC("Ö"),
262+
),
263+
BACKSPACE_KEY_ITEM,
264+
),
265+
listOf(
266+
SPACEBAR_FRENCH_KEY_ITEM,
267+
RETURN_KEY_ITEM,
268+
),
269+
),
270+
)
271+
272+
val KB_FR_THUMBKEY_V3: KeyboardDefinition =
273+
KeyboardDefinition(
274+
title = "français thumb-key v3",
275+
modes =
276+
KeyboardDefinitionModes(
277+
main = KB_FR_THUMBKEY_V3_MAIN,
278+
shifted = KB_FR_THUMBKEY_V3_SHIFTED,
279+
numeric = FRENCH_NUMERIC_KEYBOARD,
280+
),
281+
)

app/src/main/java/com/dessalines/thumbkey/utils/KeyboardLayout.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ import com.dessalines.thumbkey.keyboards.KB_FI_TYPESPLIT
9494
import com.dessalines.thumbkey.keyboards.KB_FR_MESSAGEASE
9595
import com.dessalines.thumbkey.keyboards.KB_FR_THUMBKEY_V1
9696
import com.dessalines.thumbkey.keyboards.KB_FR_THUMBKEY_V2
97+
import com.dessalines.thumbkey.keyboards.KB_FR_THUMBKEY_V3
9798
import com.dessalines.thumbkey.keyboards.KB_FR_TYPESPLIT
9899
import com.dessalines.thumbkey.keyboards.KB_GLAGOLITIC_THUMBKEY
99100
import com.dessalines.thumbkey.keyboards.KB_GR_THUMBKEY
@@ -320,4 +321,5 @@ enum class KeyboardLayout(
320321
HIThumbKey(KB_HI_THUMBKEY),
321322
ENNLTypeSplit(KB_EN_NL_TYPESPLIT),
322323
HIThumbKeyExtended(KB_HI_THUMBKEY_EXTENDED),
324+
FRThumbKeyV3(KB_FR_THUMBKEY_V3),
323325
}

app/src/main/res/values-fr/strings.xml

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
<string name="blue">Bleu</string>
1313
<string name="dracula">Dracula</string>
1414
<string name="twilight">Crépuscule</string>
15-
<string name="high_contrast">Haut Contraste</string>
16-
<string name="high_contrast_colorful">Haut Contraste Coloré</string>
17-
<string name="ancom">Couleurs Anarcho-Communistes</string>
15+
<string name="high_contrast">Contraste élevé</string>
16+
<string name="high_contrast_colorful">Contraste élevé, coloré</string>
17+
<string name="ancom">Couleurs anarcho-communistes</string>
1818
<string name="center">Centre</string>
1919
<string name="right">Droite</string>
2020
<string name="left">Gauche</string>
@@ -23,9 +23,9 @@
2323
<string name="version">Version %1$s</string>
2424
<string name="releases">Versions</string>
2525
<string name="support">Support</string>
26-
<string name="issue_tracker">Suivi des problèmes GitHub</string>
26+
<string name="issue_tracker">Suivi des problèmes (Github)</string>
2727
<string name="developer_matrix_chatroom">Salon Matrix pour les développeurs</string>
28-
<string name="donate_to_thumbkey">Donner à Thumb-Key</string>
28+
<string name="donate_to_thumbkey">Faire un don à Thumb-Key</string>
2929
<string name="social">Réseaux sociaux</string>
3030
<string name="join_c_thumbkey">Rejoindre c/thumbkey</string>
3131
<string name="follow_me_mastodon">Me suivre sur Mastodon</string>
@@ -39,44 +39,58 @@
3939
<string name="theme_color">Couleur du thème</string>
4040
<string name="position">Position</string>
4141
<string name="vibrate_on_tap">Vibration au toucher</string>
42-
<string name="vibrate_warning">Nécessite d\'activer Vibrer à l\'appui dans les paramètres du téléphone</string>
42+
<string name="vibrate_warning">Nécessite dactiver Vibrer à lappui dans les paramètres du téléphone</string>
4343
<string name="play_sound_on_tap">Son au toucher</string>
4444
<string name="auto_capitalize">Majuscules automatiques</string>
4545
<string name="key_size">Taille des touches : %1$s</string>
46+
<string name="key_non_square">Touches non carrées</string>
47+
<string name="key_height">Hauteur des touches : %1$s</string>
48+
<string name="key_width">Largeur des touches : %1$s</string>
4649
<string name="bottom_offset">Décalage en bas : %1$s</string>
4750
<string name="min_swipe_length">Longueur minimale du balayage : %1$s</string>
48-
<string name="animation_speed">Vitesse de l\'animation : %1$s</string>
49-
<string name="animation_helper_speed">Vitesse de l\'animation d\'aide : %1$s</string>
51+
<string name="animation_speed">Vitesse de lanimation : %1$s</string>
52+
<string name="animation_helper_speed">Vitesse de lanimation daide : %1$s</string>
5053
<string name="slide_enable">Gestes de glissement</string>
5154
<string name="slide_cursor_movement_mode">Mode de mouvement du curseur</string>
5255
<string name="slide_sensitivity">Sensibilité du glissement : %1$s</string>
53-
<string name="slide_cursor_acceleration_constant">Pas d\'accélaration / Vitesse constante</string>
56+
<string name="slide_cursor_acceleration_constant">Pas d’accélération / Vitesse constante</string>
5457
<string name="slide_cursor_acceleration_linear">Accélération linéaire</string>
5558
<string name="slide_cursor_acceleration_quadratic">Accélération quadratique</string>
5659
<string name="slide_cursor_acceleration_threshold_acceleration">Accélération avec seuil</string>
57-
<string name="slide_spacebar_deadzone_enable">Barre d\'espace : Autoriser les simples balayages en plus des gestes de glissement</string>
60+
<string name="slide_spacebar_deadzone_enable">Barre despace : Autoriser les simples balayages en plus des gestes de glissement</string>
5861
<string name="slide_backspace_deadzone_enable">Retour arrière : Autoriser les simples balayages en plus des gestes de glissement</string>
5962
<string name="reset_to_defaults">Réinitialiser les paramètres</string>
6063
<string name="reset_to_defaults_msg">Voulez-vous vraiment réinitialiser les paramètres ?</string>
6164
<string name="reset_to_defaults_confirm">Réinitialiser</string>
6265
<string name="cancel">Annuler</string>
6366
<string name="test_out_thumbkey">Testez Thumb-Key</string>
6467
<string name="setup">Mise en place</string>
65-
<string name="user_guide">Guide d\'utlisation</string>
68+
<string name="user_guide">Guide d’utilisation</string>
6669
<string name="setup_thumbkey">Mise en place de Thumb-Key</string>
6770
<string name="enable_thumbkey">Activer Thumb-Key</string>
6871
<string name="select_thumbkey">Selectionner Thumb-Key</string>
6972
<string name="finish_setup">Terminer la mise en place</string>
7073
<string name="copy">Texte copié</string>
7174
<string name="hide_letters">Masquer les lettres</string>
7275
<string name="hide_symbols">Masquer les symboles</string>
73-
<string name="spacebar_multitaps">Barre d\'espace : appuis multiples</string>
76+
<string name="spacebar_multitaps">Barre despace : appuis multiples</string>
7477
<string name="done">Fermer</string>
7578
<string name="backdrop">Arrière-plan du clavier</string>
7679
<string name="key_padding">Espacement des touches : %1$s</string>
7780
<string name="key_border_width">Bordure des touches : %1$s</string>
7881
<string name="key_radius">Arrondi des touches : %1$s</string>
79-
<string name="key_non_square">Touches non carrées</string>
80-
<string name="key_width">Largeur des touches : %1$s</string>
81-
<string name="key_height">Hauteur des touches : %1$s</string>
82+
<string name="drag_return_enable">Glissement aller-retour</string>
83+
<string name="counterclockwise_drag_action">Action au glissement circulaire anti-horaire</string>
84+
<string name="clockwise_drag_action">Action au glissement circulaire horaire</string>
85+
<string name="send_oppsite_case">Lettre de casse opposée</string>
86+
<string name="send_numeric">Touche numérique</string>
87+
<string name="circular_drag_enable">Glissement circulaire</string>
88+
<string name="ghost_keys_enable">Touches fantômes</string>
89+
<string name="ghost_keys_description">Accéder aux touches cachées de symboles, sans passer à la vue numérique</string>
90+
<string name="backup_database">Sauvegarder la base de données</string>
91+
<string name="restore_database">Restaurer la base de données</string>
92+
<string name="restore_database_warning">Attention : votre base de données sera réinitialisée</string>
93+
<string name="database_restored">La base de données a été restaurée.</string>
94+
<string name="database_backed_up">La base de données a été sauvegardée.</string>
95+
<string name="backup_and_restore">Sauvegarde et restauration</string>
8296
</resources>

0 commit comments

Comments
 (0)