thombruce / verse

🚀 A universe in progress
Other
8 stars 0 forks source link

i18n #77

Closed thombruce closed 10 months ago

thombruce commented 10 months ago

closes #46, closes #81

By submitting this pull request, you agree to follow our Code of Conduct: https://github.com/thombruce/.github/blob/main/CODE_OF_CONDUCT.md


Internal use. Do not delete.

thombruce commented 10 months ago

Steps taken:

I don't imagine I am now able to get the assets resource to work with the glob patterns used by bevy_fluent's fallback strategy: https://github.com/kgv/bevy_fluent/blob/main/examples/fallback_chain/main.rs

Maybe if we followed the no_loading_state example from bevy_asset_loader: https://github.com/NiklasEi/bevy_asset_loader/blob/main/bevy_asset_loader/examples/no_loading_state.rs (This loads assets as they're needed in whatever system is requesting them, rather than in a loading state - we can and should combine both approaches).

For now... I'm not sure. We can either revert to the documented bevy_fluent approach or try to implement the above example from bevy_asset_loader as a means to achieving the same result.

thombruce commented 10 months ago

Still need a way to more gracefully load translations eventually - for example, events might randomly occur in the game that feature dialogue and it makes little sense to load all such possible events at once; the translations should be loaded during active play (right now they only load in a LoadTranslations state before the StartMenu).

The above might wait for a future update.

What is needed now:

thombruce commented 10 months ago

Translations

Done

Todo


Not a huge amount, yet, but systems and states will need some reworking both now and in the future to handle changes in how we load translations. For now, I'd just load them all in the GameCreate step before proceeding to the Active game state and that should be fine.

If we do translate the credits... probably add a "LoadingCredits" state to handle the process there.

thombruce commented 10 months ago

No further translations at this time. HP health indicator, datetime, speedometer and credits will all stay as is. We'll review in the future. But as of now, we have a working translations system, and I am able to swap languages by modifying my config file. That's everything we wanted here, so I'm gonna go ahead and merge.