From de5cf06a5c1ae6c2129cdcdc71ebd1344ed47e99 Mon Sep 17 00:00:00 2001 From: Benoit Mortgat Date: Fri, 29 Nov 2024 22:55:32 +0100 Subject: [PATCH] Improvements for French language (#1161) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- .../thumbkey/keyboards/FRThumbKeyV3.kt | 281 ++++++++++++++++++ .../thumbkey/utils/KeyboardLayout.kt | 2 + app/src/main/res/values-fr/strings.xml | 44 ++- 3 files changed, 312 insertions(+), 15 deletions(-) create mode 100644 app/src/main/java/com/dessalines/thumbkey/keyboards/FRThumbKeyV3.kt diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/FRThumbKeyV3.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/FRThumbKeyV3.kt new file mode 100644 index 000000000..8049503f6 --- /dev/null +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/FRThumbKeyV3.kt @@ -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, + ), + ) diff --git a/app/src/main/java/com/dessalines/thumbkey/utils/KeyboardLayout.kt b/app/src/main/java/com/dessalines/thumbkey/utils/KeyboardLayout.kt index 7765caf71..ebea11fff 100644 --- a/app/src/main/java/com/dessalines/thumbkey/utils/KeyboardLayout.kt +++ b/app/src/main/java/com/dessalines/thumbkey/utils/KeyboardLayout.kt @@ -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 @@ -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), } diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 3adbf3605..e7988fff2 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -12,9 +12,9 @@ Bleu Dracula Crépuscule - Haut Contraste - Haut Contraste Coloré - Couleurs Anarcho-Communistes + Contraste élevé + Contraste élevé, coloré + Couleurs anarcho-communistes Centre Droite Gauche @@ -23,9 +23,9 @@ Version %1$s Versions Support - Suivi des problèmes GitHub + Suivi des problèmes (Github) Salon Matrix pour les développeurs - Donner à Thumb-Key + Faire un don à Thumb-Key Réseaux sociaux Rejoindre c/thumbkey Me suivre sur Mastodon @@ -39,22 +39,25 @@ Couleur du thème Position Vibration au toucher - Nécessite d\'activer Vibrer à l\'appui dans les paramètres du téléphone + Nécessite d’activer Vibrer à l’appui dans les paramètres du téléphone Son au toucher Majuscules automatiques Taille des touches : %1$s + Touches non carrées + Hauteur des touches : %1$s + Largeur des touches : %1$s Décalage en bas : %1$s Longueur minimale du balayage : %1$s - Vitesse de l\'animation : %1$s - Vitesse de l\'animation d\'aide : %1$s + Vitesse de l’animation : %1$s + Vitesse de l’animation d’aide : %1$s Gestes de glissement Mode de mouvement du curseur Sensibilité du glissement : %1$s - Pas d\'accélaration / Vitesse constante + Pas d’accélération / Vitesse constante Accélération linéaire Accélération quadratique Accélération avec seuil - Barre d\'espace : Autoriser les simples balayages en plus des gestes de glissement + Barre d’espace : Autoriser les simples balayages en plus des gestes de glissement Retour arrière : Autoriser les simples balayages en plus des gestes de glissement Réinitialiser les paramètres Voulez-vous vraiment réinitialiser les paramètres ? @@ -62,7 +65,7 @@ Annuler Testez Thumb-Key Mise en place - Guide d\'utlisation + Guide d’utilisation Mise en place de Thumb-Key Activer Thumb-Key Selectionner Thumb-Key @@ -70,13 +73,24 @@ Texte copié Masquer les lettres Masquer les symboles - Barre d\'espace : appuis multiples + Barre d’espace : appuis multiples Fermer Arrière-plan du clavier Espacement des touches : %1$s Bordure des touches : %1$s Arrondi des touches : %1$s - Touches non carrées - Largeur des touches : %1$s - Hauteur des touches : %1$s + Glissement aller-retour + Action au glissement circulaire anti-horaire + Action au glissement circulaire horaire + Lettre de casse opposée + Touche numérique + Glissement circulaire + Touches fantômes + Accéder aux touches cachées de symboles, sans passer à la vue numérique + Sauvegarder la base de données + Restaurer la base de données + Attention : votre base de données sera réinitialisée + La base de données a été restaurée. + La base de données a été sauvegardée. + Sauvegarde et restauration