doctor-g/ThunderstoneQuestRandomizer

Localisation

Closed this issue · 7 comments

During the last Kickstarter the game has been offered in french & german for the first time.
According to the progress, I expect those localized versions will be delivered near the end of the year.

It would be great to be able to choose your language in the randomizer, switching both the UI (app) and content (card names) to the user's locale.

I do not know Flutter but I assume there are I18n libraries which should do the job for the UI.

For the cards, a change in the YAML to a multi-values TranslatedNames property is probably the easiest, like this:

- Quest: Bandits of Black Rock
  TranslatedName:
    fr: Bandits de Black Rock
  Sets:
  - Champion
  Heroes:
  - Name: Edlin
    TranslatedName:
      fr: Edlin
    Keywords: [ Human, Fighter, Hero ]
    Combo: [ Weapon ]
  Marketplace:
  - Name: Scionic Annals
    TranslatedName:
      fr: Annales Scioniques
    Keywords: [ Magic, Item ]
    Combo: [ Spell ]

And then in the UI you use the translation if available, with a fallback to the english name.

Would you be open to this? I can handle the french translation (I am doing some proof-reading for it).

This is a very cool idea. I am not so familiar with Flutter's internationalization support, and I certainly didn't take it account when first putting together the application. Let me take a closer look at how this might work, and then I'll get back to you.

@renchap I just pushed a new version of the app to master that contains support for localization. I've documented it in the README. Briefly, there are two kinds of localization support: one is for the app interface itself, and the other is for the card database. The latter is the one most related to this issue.

You should be able to fork the repository, edit the cards.yml file with the French translations, and then make a pull request. You can test the French translation by opening up lib/screens/settings.dart and uncommenting the line near the top that lists French as one of the _supportedLanguages. Doing this will enable a dropdown box in the settings that should allow for a live change of how the cards are viewed, from the default English to French.

Also, if you were interested in constructing an app_fr.arb file that translates the UI as well, please feel free. There are some notes about this in the README.

wow you are fast!

I am overwhelmed with work currently but I will have a look in the coming weeks :)

I had the day yesterday to study Flutter localization, and it was a fun challenge. There's no rush on the translation: the framework that's in place now should be pretty stable, even if I add some other stuff around it, like the alternate tableau solo mode in #13.

An update on this: the french translation has been cancelled :( I proof-read everything but the price increases and other factors made it too risky for the (very small) french publisher to actually launch the production, and AEG decided they wont do it themselves either so we got a refund.

I think the german version is still in progress, so maybe a german person will translate it and everything will be ready for it, but it will be the only localised version :(

Sorry to hear of the cancellation, @renchap. I understand the business implications, though. I hope French speakers can still enjoy the game even if it's not localized!

Although we didn't integrate the internationalization, I learned a lot about it by building in the supports for it, so I consider it a good learning experience.