Coder Social home page Coder Social logo

bevy_mod_localization's Introduction

Hi there ๐Ÿ‘‹

I am a software engineer working with TypeScript, Python and Rust.

Some of the bigger projects I worked on:

  • bevyengine/bevy: A data-driven game engine in Rust. I am helping with issue triaging, plugin development and optimizing the CI pipelines.
  • @GrafeasGroup: GrafeasGroup was a non-profit organization aiming to improve internet accessibility. I helped to develop and maintain our database, API and network of six bots.
  • GameFeeder/GameFeeder: A notification bot for Game updates, available for Discord and Telegram. One of my first bigger programming projects, serving over 7000 combined users.
  • stonefish_engine: An amateur chess engine implementing the UCI protocol. This was my first bigger project in Rust.

bevy_mod_localization's People

Contributors

timjentzsch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bevy_mod_localization's Issues

Revise architecture

We need a more modular architecture that allows us to support more than just text localization.
I'm still thinking about our best option here, but this might work:

  • Locale resource for setting the locale
    • Enum, either fixed language or system language
  • LocaleFallbackMap resource to define fallback languages in case some keys/files are not localized in all languages
  • LocaleDefaultFallback resource to define the "default" language that should have all keys/files localized
  • LocalizedAsset component to load select an asset file from a folder based on the locale
    • Handles asset loading when locale changes
    • Handles fallbacks based on map and default
    • Offers events and change detection when new assets have finished loading
  • LocalizedText component to set and update text based on the locale
    • Uses Fluent localization files
    • Obtains correct file from LocalizedAsset
    • Updates text when locale changes and the new asset has finished loading
    • Allows setting arguments for interpolation
    • If arguments change, text is also updated
    • If possible: Fallback works per key, instead of only per file

Add ergonomic API for text with component/resource args

Project Fluent allows to insert values in the text as arguments. This is already possible, but the user will have to manually define a system to localize the Text component, ensure that it is run every time when the locale or argument changes.

Instead, it would be nice to just define which components/resources should be inserted and with which key, automatically handling the updating in the plugin.

Add localization of arbitrary assets

It is important to provide a feature to localize any type of assets. Example use cases include localizing text in a texture, in-game dialogue in a sound file, a cut scene, etc.

This should work similar to the current text localization. The user defines the path to a folder, the output format and the extension of the asset. This folder should then contain the localized files named after the language identifier and the given extension. The plugin should then select the correct asset based on the already used algorithm.

We should provide options to the user to configure how the assets are loaded. For most assets it will make sense to only load the first matching locale, not all possible fallbacks like we have right now.

The text localization should be adapted to use this new asset localization system under the hood.

Change name to `bevy_mod_localization`

I want this crate to be a complete solution for localization, not only for text (see #10 and #11).
The name should reflect that, so bevy_mod_localization sounds better.

It won't be a prototype anymore, but I don't want to steal bevy_localization for a potential official solution in the future. So the mod prefix seems to be the best option.

Add support for time-synchronized subtitles via WebVTT

For cut-scenes and in-game dialogue, it would be very useful to provide support for time-synchronized text. This can serve as captions or subtitles.

The most suitable format to provide that feature seems to be WebVTT. It is used in the web stack for videos, but also adopted in other areas like YouTube. It allows you to specify timed cues, as well as positioning and styling for them.

Since styling is still being developed in bevy_ui and the limited support for font families, simple support for plain-text cues is sufficient for now. Of course, the user should be able to define the subtitles in multiple languages, so this feature should use the localized assets from #10 as well.

Depend on specific bevy subpackages instead of bevy with feature flags

We currently depend on bevy directly, with a sparse set of feature flags to avoid pulling in too many crates.
However, it would probably be better to depend on the concrete sub-packages like bevy_asset and bevy_text.
I assume that it will make it easier for Cargo to de-duplicate the dependency tree.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.