Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add French MessagEase #116

Merged
merged 1 commit into from Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
114 changes: 114 additions & 0 deletions app/src/main/java/se/nullable/flickboard/model/layouts/FRMessagEase.kt
@@ -0,0 +1,114 @@
package se.nullable.flickboard.model.layouts

import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import se.nullable.flickboard.model.Action
import se.nullable.flickboard.model.Direction
import se.nullable.flickboard.model.KeyM
import se.nullable.flickboard.model.Layer
import se.nullable.flickboard.model.Layout
import se.nullable.flickboard.ui.FlickBoardParent
import se.nullable.flickboard.ui.Keyboard

val FR_MESSAGEASE_MAIN_LAYER = Layer(
keyRows = listOf(
listOf(
KeyM(
actions = mapOf(
Direction.CENTER to Action.Text("a"),
Direction.TOP_RIGHT to Action.Text("à"),
Direction.BOTTOM to Action.Text("â"),
Direction.BOTTOM_RIGHT to Action.Text("v"),
)
),
KeyM(
actions = mapOf(
Direction.CENTER to Action.Text("n"),
Direction.BOTTOM to Action.Text("l"),
)
),
KeyM(
actions = mapOf(
Direction.CENTER to Action.Text("i"),
Direction.BOTTOM_LEFT to Action.Text("x"),
)
),
),
listOf(
KeyM(
actions = mapOf(
Direction.CENTER to Action.Text("u"),
Direction.TOP to Action.Text("û"),
Direction.RIGHT to Action.Text("k"),
Direction.BOTTOM to Action.Text("ç"),
)
),
KeyM(
actions = mapOf(
Direction.CENTER to Action.Text("o"),
Direction.TOP_LEFT to Action.Text("q"),
Direction.TOP to Action.Text("h"),
Direction.TOP_RIGHT to Action.Text("p"),
Direction.LEFT to Action.Text("c"),
Direction.RIGHT to Action.Text("b"),
Direction.BOTTOM_LEFT to Action.Text("g"),
Direction.BOTTOM to Action.Text("d"),
Direction.BOTTOM_RIGHT to Action.Text("j"),
)
),
KeyM(
actions = mapOf(
Direction.CENTER to Action.Text("r"),
Direction.LEFT to Action.Text("m"),
)
),
),
listOf(
KeyM(
actions = mapOf(
Direction.CENTER to Action.Text("t"),
Direction.TOP to Action.Text("ê"),
Direction.TOP_RIGHT to Action.Text("y"),
Direction.RIGHT to Action.Text("è"),
Direction.BOTTOM to Action.Text("ù"),
)
),
KeyM(
actions = mapOf(
Direction.CENTER to Action.Text("e"),
Direction.TOP to Action.Text("w"),
Direction.LEFT to Action.Text("é"),
Direction.RIGHT to Action.Text("z"),
)
),
KeyM(
actions = mapOf(
Direction.CENTER to Action.Text("s"),
Direction.TOP_LEFT to Action.Text("f"),
)
),
),
listOf(SPACE)
)
)

val FR_MESSAGEASE = Layout(
mainLayer = FR_MESSAGEASE_MAIN_LAYER,
controlLayer = CONTROL_MESSAGEASE_LAYER
)

@Composable
@Preview
fun FrKeyboardPreview() {
FlickBoardParent {
Keyboard(layout = Layout(FR_MESSAGEASE_MAIN_LAYER), onAction = {})
}
}

@Composable
@Preview
fun FrFullKeyboardPreview() {
FlickBoardParent {
Keyboard(layout = FR_MESSAGEASE, onAction = {})
}
}
2 changes: 2 additions & 0 deletions app/src/main/java/se/nullable/flickboard/ui/Settings.kt
Expand Up @@ -79,6 +79,7 @@ import se.nullable.flickboard.model.layouts.DE_MESSAGEASE
import se.nullable.flickboard.model.layouts.EN_DE_MESSAGEASE
import se.nullable.flickboard.model.layouts.EN_MESSAGEASE
import se.nullable.flickboard.model.layouts.ES_MESSAGEASE
import se.nullable.flickboard.model.layouts.FR_MESSAGEASE
import se.nullable.flickboard.model.layouts.MESSAGEASE_NUMERIC_CALCULATOR_LAYER
import se.nullable.flickboard.model.layouts.MESSAGEASE_NUMERIC_PHONE_LAYER
import se.nullable.flickboard.model.layouts.RU_MESSAGEASE
Expand Down Expand Up @@ -882,6 +883,7 @@ enum class LetterLayerOption(override val label: String, val layout: Layout) : L
Swedish("Swedish (MessagEase)", SV_MESSAGEASE),
SwedishDE("Swedish (MessagEase, German-style)", SV_DE_MESSAGEASE),
Ukrainian("Ukrainian (MessagEase)", UK_MESSAGEASE),
French("French (MessagEase)", FR_MESSAGEASE),
}

enum class NumericLayerOption(override val label: String, val layer: Layer) : Labeled {
Expand Down