Skip to content

Internationalization support #105

@pablofullana

Description

@pablofullana

Hello there. I was taking a look at this repository (not sure how I got here...) and it looks quite interesting. Something I found while checking the code out is that there are several messages hardcoded inside the classes. So I thought it would be quite useful to have i18n in place.

I started to add i18n, added the gem as a dependency, required it in goby.rb and put a very basic locales/en.yml in place. Even everything seems to be working just fine, I got a concern/question. I was thinking on a user trying to change this default messages (located at locales/en.yml) and had a hard time trying to figure it out. I thought that a good approach may be to have some sort of configuration in a top level object representing the game itself. Do you think this is a good approach? If so, is there any object (Game, Goby, w/e) in which general settings are being stored? It guess that it would be nice, as a developer using Goby, to be able to do something in the fashion of: Goby.config.i18n_load_path = ...

So far, what I have coded can be found at: https://github.com/pablofullana/goby/tree/add-i18n-support

Your thoughts.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions