Skip to content

Commit

Permalink
Improvements for French language (#1161)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
salsifis and Benoît Mortgat authored Nov 29, 2024
1 parent 9c08def commit de5cf06
Show file tree
Hide file tree
Showing 3 changed files with 312 additions and 15 deletions.
281 changes: 281 additions & 0 deletions app/src/main/java/com/dessalines/thumbkey/keyboards/FRThumbKeyV3.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,281 @@
@file:Suppress("ktlint:standard:no-wildcard-imports")

package com.dessalines.thumbkey.keyboards

import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.*
import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.ColorVariant.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*
import com.dessalines.thumbkey.utils.KeyAction.*
import com.dessalines.thumbkey.utils.SwipeNWay.*

val KB_FR_THUMBKEY_V3_MAIN =
KeyboardC(
listOf(
listOf(
KeyItemC(
center = KeyC("a", size = LARGE),
topLeft = KeyC("æ"),
top = KeyC("â"),
topRight = KeyC("v"),
left = KeyC("μ", color = MUTED),
right = KeyC("-", color = MUTED),
bottomLeft = KeyC("$", color = MUTED),
bottom = KeyC("q"),
bottomRight = KeyC("à"),
),
KeyItemC(
center = KeyC("n", size = LARGE),
topLeft = KeyC("\u0300", displayText = "ˋ", color = MUTED),
top = KeyC("\u0302", displayText = "^", color = MUTED),
topRight = KeyC("\u0301", displayText = "ˊ", color = MUTED),
left = KeyC("+", color = MUTED),
right = KeyC("!", color = MUTED),
bottomLeft = KeyC("/", color = MUTED),
bottom = KeyC("l"),
bottomRight = KeyC("\\", color = MUTED),
),
KeyItemC(
center = KeyC("i", size = LARGE),
topLeft = KeyC("ï"),
top = KeyC("î"),
topRight = KeyC("\"", color = MUTED),
left = KeyC("k"),
right = KeyC("?", color = MUTED),
bottomLeft = KeyC("x"),
bottom = KeyC("=", color = MUTED),
bottomRight = KeyC("%", color = MUTED),
),
EMOJI_KEY_ITEM,
),
listOf(
KeyItemC(
center = KeyC("u", size = LARGE),
topLeft = KeyC("{", color = MUTED),
top = KeyC("û"),
topRight = KeyC("ü"),
left = KeyC("(", color = MUTED),
right = KeyC("h"),
bottomLeft = KeyC("[", color = MUTED),
bottom = KeyC("ç"),
bottomRight = KeyC("ù"),
),
KeyItemC(
center = KeyC("o", size = LARGE),
topLeft = KeyC("œ"),
top = KeyC("ô"),
topRight = KeyC("p"),
left = KeyC("c"),
right = KeyC("b"),
bottomLeft = KeyC("g"),
bottom = KeyC("d"),
bottomRight = KeyC("j"),
),
KeyItemC(
center = KeyC("r", size = LARGE),
topLeft = KeyC("|", color = MUTED),
top =
KeyC(
display = KeyDisplay.IconDisplay(Icons.Outlined.ArrowDropUp),
action = ToggleShiftMode(true),
swipeReturnAction = ToggleCurrentWordCapitalization(true),
color = MUTED,
),
topRight = KeyC("}", color = MUTED),
left = KeyC("m"),
right = KeyC(")", color = MUTED),
bottomLeft = KeyC("@", color = MUTED),
bottom =
KeyC(
ToggleShiftMode(false),
swipeReturnAction = ToggleCurrentWordCapitalization(false),
),
bottomRight = KeyC("]", color = MUTED),
),
NUMERIC_KEY_ITEM,
),
listOf(
KeyItemC(
center = KeyC("t", size = LARGE),
topLeft = KeyC("~", color = MUTED),
top = KeyC("w"),
topRight = KeyC("y"),
left = KeyC("<", color = MUTED),
right = KeyC(":", color = MUTED),
bottomLeft = KeyC("\u0303", displayText = "ñ", color = MUTED),
bottom = KeyC("_", color = MUTED),
bottomRight = KeyC("\u0009", displayText = "\u2b7e", color = MUTED),
),
KeyItemC(
center = KeyC("e", size = LARGE),
topLeft = KeyC("ë"),
top = KeyC("ê"),
topRight = KeyC("é"),
left = KeyC("'", color = MUTED),
right = KeyC("z"),
bottomLeft = KeyC(",", color = MUTED),
bottom = KeyC(".", color = MUTED),
bottomRight = KeyC("è"),
),
KeyItemC(
center = KeyC("s", size = LARGE),
topLeft = KeyC("f"),
top = KeyC("&", color = MUTED),
topRight = KeyC("ÿ"),
left = KeyC("#", color = MUTED),
right = KeyC(">", color = MUTED),
bottomLeft = KeyC(";", color = MUTED),
bottom = KeyC("\u0308", displayText = "¨", color = MUTED),
bottomRight = KeyC("ö"),
),
BACKSPACE_KEY_ITEM,
),
listOf(
SPACEBAR_FRENCH_KEY_ITEM,
RETURN_KEY_ITEM,
),
),
)

val KB_FR_THUMBKEY_V3_SHIFTED =
KeyboardC(
listOf(
listOf(
KeyItemC(
center = KeyC("A", size = LARGE),
topLeft = KeyC("Æ"),
top = KeyC("Â"),
topRight = KeyC("V"),
left = KeyC("μ", color = MUTED),
right = KeyC("-", color = MUTED),
bottomLeft = KeyC("$", color = MUTED),
bottom = KeyC("Q"),
bottomRight = KeyC("À"),
),
KeyItemC(
center = KeyC("N", size = LARGE),
topLeft = KeyC("\u0300", displayText = "ˋ", color = MUTED),
top = KeyC("\u0302", displayText = "^", color = MUTED),
topRight = KeyC("\u0301", displayText = "ˊ", color = MUTED),
left = KeyC("+", color = MUTED),
right = KeyC("!", color = MUTED),
bottomLeft = KeyC("/", color = MUTED),
bottom = KeyC("L"),
bottomRight = KeyC("\\", color = MUTED),
),
KeyItemC(
center = KeyC("I", size = LARGE),
topLeft = KeyC("Ï"),
top = KeyC("Î"),
topRight = KeyC("\"", color = MUTED),
left = KeyC("K"),
right = KeyC("?", color = MUTED),
bottomLeft = KeyC("X"),
bottom = KeyC("=", color = MUTED),
bottomRight = KeyC("%", color = MUTED),
),
EMOJI_KEY_ITEM,
),
listOf(
KeyItemC(
center = KeyC("U", size = LARGE),
topLeft = KeyC("{", color = MUTED),
top = KeyC("Û"),
topRight = KeyC("Ü"),
left = KeyC("(", color = MUTED),
right = KeyC("H"),
bottomLeft = KeyC("[", color = MUTED),
bottom = KeyC("Ç"),
bottomRight = KeyC("Ù"),
),
KeyItemC(
center = KeyC("O", size = LARGE),
topLeft = KeyC("Œ"),
top = KeyC("Ô"),
topRight = KeyC("P"),
left = KeyC("C"),
right = KeyC("B"),
bottomLeft = KeyC("G"),
bottom = KeyC("D"),
bottomRight = KeyC("J"),
),
KeyItemC(
center = KeyC("R", size = LARGE),
topLeft = KeyC("|", color = MUTED),
top =
KeyC(
display = KeyDisplay.IconDisplay(Icons.Outlined.KeyboardCapslock),
capsModeDisplay = KeyDisplay.IconDisplay(Icons.Outlined.Copyright),
action = ToggleCapsLock,
swipeReturnAction = ToggleCurrentWordCapitalization(true),
color = MUTED,
),
topRight = KeyC("}", color = MUTED),
left = KeyC("M"),
right = KeyC(")", color = MUTED),
bottomLeft = KeyC("@", color = MUTED),
bottom =
KeyC(
display = KeyDisplay.IconDisplay(Icons.Outlined.ArrowDropDown),
action = ToggleShiftMode(false),
swipeReturnAction = ToggleCurrentWordCapitalization(false),
color = MUTED,
),
bottomRight = KeyC("]", color = MUTED),
),
NUMERIC_KEY_ITEM,
),
listOf(
KeyItemC(
center = KeyC("T", size = LARGE),
topLeft = KeyC("~", color = MUTED),
top = KeyC("W"),
topRight = KeyC("Y"),
left = KeyC("<", color = MUTED),
right = KeyC(":", color = MUTED),
bottomLeft = KeyC("\u0303", displayText = "ñ", color = MUTED),
bottom = KeyC("_", color = MUTED),
bottomRight = KeyC("\u0009", displayText = "\u2b7e", color = MUTED),
),
KeyItemC(
center = KeyC("E", size = LARGE),
topLeft = KeyC("Ë"),
top = KeyC("Ê"),
topRight = KeyC("É"),
left = KeyC("'", color = MUTED),
right = KeyC("Z"),
bottomLeft = KeyC(",", color = MUTED),
bottom = KeyC(".", color = MUTED),
bottomRight = KeyC("È"),
),
KeyItemC(
center = KeyC("S", size = LARGE),
topLeft = KeyC("F"),
top = KeyC("&", color = MUTED),
topRight = KeyC("Ÿ"),
left = KeyC("#", color = MUTED),
right = KeyC(">", color = MUTED),
bottomLeft = KeyC(";", color = MUTED),
bottom = KeyC("\u0308", displayText = "¨", color = MUTED),
bottomRight = KeyC("Ö"),
),
BACKSPACE_KEY_ITEM,
),
listOf(
SPACEBAR_FRENCH_KEY_ITEM,
RETURN_KEY_ITEM,
),
),
)

val KB_FR_THUMBKEY_V3: KeyboardDefinition =
KeyboardDefinition(
title = "français thumb-key v3",
modes =
KeyboardDefinitionModes(
main = KB_FR_THUMBKEY_V3_MAIN,
shifted = KB_FR_THUMBKEY_V3_SHIFTED,
numeric = FRENCH_NUMERIC_KEYBOARD,
),
)
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ import com.dessalines.thumbkey.keyboards.KB_FI_TYPESPLIT
import com.dessalines.thumbkey.keyboards.KB_FR_MESSAGEASE
import com.dessalines.thumbkey.keyboards.KB_FR_THUMBKEY_V1
import com.dessalines.thumbkey.keyboards.KB_FR_THUMBKEY_V2
import com.dessalines.thumbkey.keyboards.KB_FR_THUMBKEY_V3
import com.dessalines.thumbkey.keyboards.KB_FR_TYPESPLIT
import com.dessalines.thumbkey.keyboards.KB_GLAGOLITIC_THUMBKEY
import com.dessalines.thumbkey.keyboards.KB_GR_THUMBKEY
Expand Down Expand Up @@ -320,4 +321,5 @@ enum class KeyboardLayout(
HIThumbKey(KB_HI_THUMBKEY),
ENNLTypeSplit(KB_EN_NL_TYPESPLIT),
HIThumbKeyExtended(KB_HI_THUMBKEY_EXTENDED),
FRThumbKeyV3(KB_FR_THUMBKEY_V3),
}
44 changes: 29 additions & 15 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
<string name="blue">Bleu</string>
<string name="dracula">Dracula</string>
<string name="twilight">Crépuscule</string>
<string name="high_contrast">Haut Contraste</string>
<string name="high_contrast_colorful">Haut Contraste Coloré</string>
<string name="ancom">Couleurs Anarcho-Communistes</string>
<string name="high_contrast">Contraste élevé</string>
<string name="high_contrast_colorful">Contraste élevé, coloré</string>
<string name="ancom">Couleurs anarcho-communistes</string>
<string name="center">Centre</string>
<string name="right">Droite</string>
<string name="left">Gauche</string>
Expand All @@ -23,9 +23,9 @@
<string name="version">Version %1$s</string>
<string name="releases">Versions</string>
<string name="support">Support</string>
<string name="issue_tracker">Suivi des problèmes GitHub</string>
<string name="issue_tracker">Suivi des problèmes (Github)</string>
<string name="developer_matrix_chatroom">Salon Matrix pour les développeurs</string>
<string name="donate_to_thumbkey">Donner à Thumb-Key</string>
<string name="donate_to_thumbkey">Faire un don à Thumb-Key</string>
<string name="social">Réseaux sociaux</string>
<string name="join_c_thumbkey">Rejoindre c/thumbkey</string>
<string name="follow_me_mastodon">Me suivre sur Mastodon</string>
Expand All @@ -39,44 +39,58 @@
<string name="theme_color">Couleur du thème</string>
<string name="position">Position</string>
<string name="vibrate_on_tap">Vibration au toucher</string>
<string name="vibrate_warning">Nécessite d\'activer Vibrer à l\'appui dans les paramètres du téléphone</string>
<string name="vibrate_warning">Nécessite dactiver Vibrer à lappui dans les paramètres du téléphone</string>
<string name="play_sound_on_tap">Son au toucher</string>
<string name="auto_capitalize">Majuscules automatiques</string>
<string name="key_size">Taille des touches : %1$s</string>
<string name="key_non_square">Touches non carrées</string>
<string name="key_height">Hauteur des touches : %1$s</string>
<string name="key_width">Largeur des touches : %1$s</string>
<string name="bottom_offset">Décalage en bas : %1$s</string>
<string name="min_swipe_length">Longueur minimale du balayage : %1$s</string>
<string name="animation_speed">Vitesse de l\'animation : %1$s</string>
<string name="animation_helper_speed">Vitesse de l\'animation d\'aide : %1$s</string>
<string name="animation_speed">Vitesse de lanimation : %1$s</string>
<string name="animation_helper_speed">Vitesse de lanimation daide : %1$s</string>
<string name="slide_enable">Gestes de glissement</string>
<string name="slide_cursor_movement_mode">Mode de mouvement du curseur</string>
<string name="slide_sensitivity">Sensibilité du glissement : %1$s</string>
<string name="slide_cursor_acceleration_constant">Pas d\'accélaration / Vitesse constante</string>
<string name="slide_cursor_acceleration_constant">Pas d’accélération / Vitesse constante</string>
<string name="slide_cursor_acceleration_linear">Accélération linéaire</string>
<string name="slide_cursor_acceleration_quadratic">Accélération quadratique</string>
<string name="slide_cursor_acceleration_threshold_acceleration">Accélération avec seuil</string>
<string name="slide_spacebar_deadzone_enable">Barre d\'espace : Autoriser les simples balayages en plus des gestes de glissement</string>
<string name="slide_spacebar_deadzone_enable">Barre despace : Autoriser les simples balayages en plus des gestes de glissement</string>
<string name="slide_backspace_deadzone_enable">Retour arrière : Autoriser les simples balayages en plus des gestes de glissement</string>
<string name="reset_to_defaults">Réinitialiser les paramètres</string>
<string name="reset_to_defaults_msg">Voulez-vous vraiment réinitialiser les paramètres ?</string>
<string name="reset_to_defaults_confirm">Réinitialiser</string>
<string name="cancel">Annuler</string>
<string name="test_out_thumbkey">Testez Thumb-Key</string>
<string name="setup">Mise en place</string>
<string name="user_guide">Guide d\'utlisation</string>
<string name="user_guide">Guide d’utilisation</string>
<string name="setup_thumbkey">Mise en place de Thumb-Key</string>
<string name="enable_thumbkey">Activer Thumb-Key</string>
<string name="select_thumbkey">Selectionner Thumb-Key</string>
<string name="finish_setup">Terminer la mise en place</string>
<string name="copy">Texte copié</string>
<string name="hide_letters">Masquer les lettres</string>
<string name="hide_symbols">Masquer les symboles</string>
<string name="spacebar_multitaps">Barre d\'espace : appuis multiples</string>
<string name="spacebar_multitaps">Barre despace : appuis multiples</string>
<string name="done">Fermer</string>
<string name="backdrop">Arrière-plan du clavier</string>
<string name="key_padding">Espacement des touches : %1$s</string>
<string name="key_border_width">Bordure des touches : %1$s</string>
<string name="key_radius">Arrondi des touches : %1$s</string>
<string name="key_non_square">Touches non carrées</string>
<string name="key_width">Largeur des touches : %1$s</string>
<string name="key_height">Hauteur des touches : %1$s</string>
<string name="drag_return_enable">Glissement aller-retour</string>
<string name="counterclockwise_drag_action">Action au glissement circulaire anti-horaire</string>
<string name="clockwise_drag_action">Action au glissement circulaire horaire</string>
<string name="send_oppsite_case">Lettre de casse opposée</string>
<string name="send_numeric">Touche numérique</string>
<string name="circular_drag_enable">Glissement circulaire</string>
<string name="ghost_keys_enable">Touches fantômes</string>
<string name="ghost_keys_description">Accéder aux touches cachées de symboles, sans passer à la vue numérique</string>
<string name="backup_database">Sauvegarder la base de données</string>
<string name="restore_database">Restaurer la base de données</string>
<string name="restore_database_warning">Attention : votre base de données sera réinitialisée</string>
<string name="database_restored">La base de données a été restaurée.</string>
<string name="database_backed_up">La base de données a été sauvegardée.</string>
<string name="backup_and_restore">Sauvegarde et restauration</string>
</resources>

0 comments on commit de5cf06

Please sign in to comment.