Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

### Changed

- Reviewed and normalized user-facing French wording, typography and pluralization across the application, correction IME, setup screens and diagnostics.
- Improved Android UI accessibility with semantic headings, TalkBack live-region announcements, minimum IME touch targets and a large-text IME layout that avoids truncated actions.
- Grammalecte engine initialization now loads conjugation, phonetic and morphology data required by the full grammar engine.
- Android spell-checker sessions now own their QuickJS engine lifecycle.
Expand Down
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Exit criterion: correction remains usable in common editable applications even w
- [x] Improve first-run setup
- [x] Explain the three correction modes in-app
- [x] Improve accessibility of the application UI
- [ ] Review all user-facing French strings
- [x] Review all user-facing French strings
- [x] Add compatibility documentation
- [ ] Add performance regression tests
- [ ] Add memory/runtime stress tests
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<activity
android:name=".ProcessTextActivity"
android:exported="true"
android:label="Corriger avec Grammalecte">
android:label="@string/process_text_label">
<intent-filter>
<action android:name="android.intent.action.PROCESS_TEXT" />
<category android:name="android.intent.category.DEFAULT" />
Expand All @@ -64,7 +64,7 @@
<service
android:name=".GrammalecteImeService"
android:exported="true"
android:label="Grammalecte"
android:label="@string/launcher_name"
android:permission="android.permission.BIND_INPUT_METHOD"
android:theme="@style/ImeTheme">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class CorrectionStatusActivity : Activity() {
spellCheckerStatusView.text =
when (status.spellChecker) {
SpellCheckerStatus.SELECTED ->
"État : sélectionné comme correcteur système."
"État : activé et sélectionné comme correcteur Android."

SpellCheckerStatus.NOT_SELECTED ->
"État : disponible, mais non sélectionné."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ class GrammalecteImeService : InputMethodService() {
val generation = ++analysisGeneration

statusView.text =
"Analyse en cours..."
"Analyse en cours…"

issuesLayout.removeAllViews()
latestIssues = emptyList()
Expand Down Expand Up @@ -597,7 +597,11 @@ class GrammalecteImeService : InputMethodService() {
}

statusView.text =
"${issues.size} problème(s) détecté(s)."
resources.getQuantityString(
R.plurals.detected_problems,
issues.size,
issues.size,
)

setApplyAllButtonsEnabled(
buildAutomaticCorrection(
Expand Down Expand Up @@ -875,7 +879,7 @@ class GrammalecteImeService : InputMethodService() {
analyzedSelectionEnd <= analyzedSelectionStart
) {
statusView.text =
"La sélection n'est plus disponible."
"La sélection n’est plus disponible."

setApplyButtonsEnabled(false)
return
Expand Down Expand Up @@ -930,7 +934,7 @@ class GrammalecteImeService : InputMethodService() {
}
} else {
statusView.text =
"Impossible d'appliquer la correction."
"Impossible d’appliquer la correction."
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ class MainActivity :

content.addView(
TextView(this).apply {
text =
"Correction française locale avec Grammalecte. " +
"Aucun texte n'est envoyé sur Internet."
text = getString(R.string.intro)

textSize = 15f

Expand Down Expand Up @@ -184,14 +182,14 @@ class MainActivity :
title = "Correction rapide",
description =
"Permet de corriger une sélection dans les applications " +
"qui n'utilisent pas le correcteur Android.",
"qui n’utilisent pas le correcteur Android.",
statusView = imeStatusView,
actions =
listOf(
"Gérer la méthode de saisie" to {
"Gérer les méthodes de saisie" to {
openInputMethodSettings()
},
"Choisir Grammalecte" to {
"Choisir le clavier" to {
showInputMethodPicker()
},
),
Expand All @@ -203,8 +201,8 @@ class MainActivity :
createCard(
title = "Réglages de correction",
description =
"Choisissez le dictionnaire et les contrôles " +
"Grammalecte utilisés dans les analyses.",
"Choisissez le dictionnaire et les règles " +
"Grammalecte utilisées lors des analyses.",
statusView = null,
actions =
listOf(
Expand All @@ -226,7 +224,7 @@ class MainActivity :
title = "Accès rapide",
description =
"Ajoutez Grammalecte aux réglages rapides pour ouvrir " +
"le sélecteur de clavier depuis n'importe quelle application.",
"le sélecteur de clavier depuis n’importe quelle application.",
statusView = null,
actions =
listOf(
Expand Down Expand Up @@ -486,7 +484,7 @@ class MainActivity :
spellCheckerSession?.close()
spellCheckerSession = null

resultView.text = "Test en cours...\n\n$testText"
resultView.text = "Test en cours…\n\n$testText"

val manager = getSystemService(TextServicesManager::class.java)

Expand All @@ -500,7 +498,7 @@ class MainActivity :

if (session == null) {
resultView.text =
"Android n'a pas pu créer de session de correction orthographique."
"Android n’a pas pu créer de session de correction orthographique."
return
}

Expand All @@ -514,7 +512,7 @@ class MainActivity :

override fun onGetSentenceSuggestions(results: Array<SentenceSuggestionsInfo>?) {
if (results.isNullOrEmpty()) {
resultView.text = "Session appelée, mais aucun résultat reçu."
resultView.text = "Session ouverte, mais aucun résultat reçu."
return
}

Expand Down Expand Up @@ -569,7 +567,7 @@ class MainActivity :
}

if (issueCount == 0) {
output.append("\nAucune erreur retournée.")
output.append("\nAucune erreur détectée.")
}

resultView.text = output.toString()
Expand All @@ -581,7 +579,12 @@ class MainActivity :
}

resultView.append(
"\n\nLe service a retourné ${results.size} résultat(s) mot par mot.",
"\n\n" +
resources.getQuantityString(
R.plurals.word_by_word_results,
results.size,
results.size,
),
)
}

Expand All @@ -596,12 +599,12 @@ class MainActivity :
)

if (spans.isEmpty()) {
resultView.text = "Aucun SuggestionSpan present dans le champ."
resultView.text = "Aucun SuggestionSpan présent dans le champ."
return
}

val output = StringBuilder()
output.append("SuggestionSpan trouves : ")
output.append("Nombre de SuggestionSpan : ")
output.append(spans.size)
output.append("\n")

Expand All @@ -622,7 +625,7 @@ class MainActivity :
output.append("»")
}

output.append("\n flags=")
output.append("\n indicateurs=")
output.append(span.flags)

output.append("\n suggestions=")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ class PersonalDictionaryActivity : Activity() {
content.addView(
TextView(this).apply {
text =
"Ajoutez les mots que Grammalecte doit considérer " +
"comme correctement orthographiés. Ils sont utilisés " +
"Ajoutez les mots que Grammalecte doit considérer comme corrects. " +
"Ils sont utilisés " +
"par tous les modes de correction."

textSize = 14f
Expand Down Expand Up @@ -177,7 +177,7 @@ class PersonalDictionaryActivity : Activity() {

statusView =
TextView(this).apply {
text = "Chargement..."
text = "Chargement…"
enablePoliteAccessibilityUpdates()
textSize = 14f

Expand Down Expand Up @@ -259,7 +259,7 @@ class PersonalDictionaryActivity : Activity() {
setControlsEnabled(false)

statusView.text =
"Chargement..."
"Chargement…"

executor.execute {
val result =
Expand Down Expand Up @@ -311,7 +311,7 @@ class PersonalDictionaryActivity : Activity() {
setControlsEnabled(false)

statusView.text =
"Ajout en cours..."
"Ajout en cours…"

executor.execute {
val result =
Expand Down Expand Up @@ -342,7 +342,7 @@ class PersonalDictionaryActivity : Activity() {
if (added) {
"Mot ajouté."
} else {
"Ce mot est déjà présent."
"Ce mot est déjà dans le dictionnaire."
}
}.onFailure { error ->
showError(error)
Expand All @@ -355,7 +355,7 @@ class PersonalDictionaryActivity : Activity() {
setControlsEnabled(false)

statusView.text =
"Suppression en cours..."
"Suppression en cours…"

executor.execute {
val result =
Expand Down Expand Up @@ -393,17 +393,17 @@ class PersonalDictionaryActivity : Activity() {

if (words.isEmpty()) {
statusView.text =
"Aucun mot personnel."
"Aucun mot enregistré."

return
}

statusView.text =
if (words.size == 1) {
"1 mot personnel."
} else {
"${words.size} mots personnels."
}
resources.getQuantityString(
R.plurals.personal_dictionary_word_count,
words.size,
words.size,
)

words.forEach { word ->
addWordRow(word)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ProcessTextActivity : Activity() {

layout.addView(
TextView(this).apply {
text = "Corriger avec Grammalecte"
text = getString(R.string.process_text_label)
markAsAccessibilityHeading()
textSize = 24f
},
Expand Down Expand Up @@ -130,7 +130,7 @@ class ProcessTextActivity : Activity() {
val text = editText.text.toString()
val generation = ++analysisGeneration

statusView.text = "Analyse en cours..."
statusView.text = "Analyse en cours…"
issuesLayout.removeAllViews()

Thread {
Expand All @@ -157,7 +157,7 @@ class ProcessTextActivity : Activity() {
showIssues(text, issues)
}.onFailure { error ->
statusView.text =
"Erreur pendant l'analyse : ${error.message ?: error.javaClass.simpleName}"
"Erreur pendant l’analyse : ${error.message ?: error.javaClass.simpleName}"
}
}
}.start()
Expand All @@ -181,7 +181,12 @@ class ProcessTextActivity : Activity() {
return
}

statusView.text = "${validIssues.size} erreur(s) détectée(s)."
statusView.text =
resources.getQuantityString(
R.plurals.detected_problems,
validIssues.size,
validIssues.size,
)

validIssues.forEach { issue ->
val fragment =
Expand Down
Loading
Loading