Flutter-Buddies / tic_tac_no

Complex variants of tic-tac-toe game
MIT License
19 stars 10 forks source link

language translation issue #53

Open grayson-harrington opened 3 years ago

grayson-harrington commented 3 years ago

The past tense sentence that can be shown when a player wins is either "you won!" Or "AI won!"

The Spanish translation of these sentences is "tú ganaste" and "AI ganó" respectively.

The conjugation changes depending on who won the game. Right now the localizations are set up so that each word in the original phrase is translated separately so "you" "AI" and "won" are all translated separately. Basically to fix the problem we should translate the whole phrases rather than the smaller parts of the phrases.

slovnicki commented 3 years ago

And this will also be needed for Croatian, hadn't realized until you said it.

I will generalize the title.

slovnicki commented 3 years ago

@Goober0329 can the word "wins" work for all genders?

I'm thinking of the future situation where players will be choosing their names, therefore implicitly choosing genders.

grayson-harrington commented 3 years ago

It can work for all genders in Spanish, but I'm not sure about other languages.

YazeedAlKhalaf commented 3 years ago

If you mean masculine and feminine there is a solution from easy_localization https://pub.dev/packages/easy_localization

To create it, instead of gender in the key write the word name and then fill in the three values: male, female, and other with correct forms.

image

RomanJos commented 3 years ago

In french too I have issue with this, the congugation of "win" has to do with male/female, singular/plural and the time like past present etc. The best solution for me would be to create a language key for every string instead of word as it is the case for win, wins and won