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 suggestions for spelling mistakes #101

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gawi
Copy link
Contributor

@gawi gawi commented May 28, 2022

Whenever there is one or two spelling errors (accent error count as 1/2 error), Globle will suggest the right country name in the error message, forcing the player to type the name correctly (and learn the proper spelling of the country).

If language is en-CA, the suggestions will look into all available form except abbreviations, which would trigger too often.

image

If there is more than one candiate, they are all displayed:
image

If the edit distance is greater than 2, the normal error message is displayed:
image

For other languages, the suggestions will be limited to country names in this language, even if English names are accepted by the game.

image

In languages other than French and English, there is no "Did you mean" prefix before the suggestion. Translators can provide the right wording.
image

@gawi gawi mentioned this pull request May 28, 2022
@Bo-Duke
Copy link

Bo-Duke commented May 31, 2022

Great way to not implement auto suggest!
With languages and this, the reasons which justified adding auto-suggest are mostly gone. 👍

@the-abe-train the-abe-train mentioned this pull request Jul 7, 2022
@@ -45,6 +45,7 @@ export const Portuguese: Messages = {
Game6: "Você já chutou este país",
Game7: "O país misterioso é {answer}!",
Game8: "Fronteira mais próxima",
Game9: `Tentativa inválida. {country}?`, //TODO: translate

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Game9: `Tentativa inválida. {country}?`, //TODO: translate
Game9: `Tentativa inválida. Queria dizer {country}?`,

@the-abe-train the-abe-train mentioned this pull request Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants