-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add i18n support #106
base: i18n
Are you sure you want to change the base?
Add i18n support #106
Conversation
Hi @pablofullana. Here are some points to resolve/consider:
Documentation looks good; it can be placed under "Internationalization". Instead of placing a link to the Thanks! |
Just want to let you know that you can run |
@nskins I'm getting a very odd behavior on that failing spec. Any insights? |
I ran the build locally with HEAD at this commit, and it passes. The error message at that commit says that it cannot find i18n. It sounds like there's a problem with the Gemfile, goby.gemspec, or .travis.yml. First, could you please erase those last three commits? You can do so by running:
followed by
to remove the uncommitted changes. Unfortunately, I don't have time right now to look at it in more detail, but please feel free to push changes and review the Travis CI builds. If any commit does not work, then please erase it since I believe the aforementioned commit is the best starting point. |
I believe I have fixed that issue you were struggling with in your final commits; however, this feature should work after your first 2 or 3. Not sure, but I'd be willing to merge this if we can get the build passing. |
Should be good to go now. |
spec.authors = ["Nicholas Skinsacos"] | ||
spec.email = ["nskins@umich.edu"] | ||
|
||
spec.summary = %q{Framework for creating text RPGs.} | ||
spec.homepage = "https://github.com/nskins/goby" | ||
spec.license = "MIT" | ||
|
||
spec.files = Dir["{lib}/**/*", "LICENSE", "README.md" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is redundant, it's re-specified next line down.
Pull Request Description
Addressing #105, this PR adds internationalization support via I18n, by:
en.yml
to be updated as requiredEntity
classDocumentation proposal
Updating Goby messages
As a Goby contributor
Customizing and exiting language translations:
config/locales
Adding support for new language:
config/locales
config/locales/en.yml
content and update as requiredAs an application developer using Goby gem
Customizing and exiting language translations:
I18n.load_path += Dir["#{File.expand_path File.dirname(__FILE__)}/.../*.yml"]
Adding support for new language:
I18n.load_path += Dir["#{File.expand_path File.dirname(__FILE__)}/.../*.yml"]
en.yml
content from Goby into that file and update as requiredI18n.locale = :es
Finally, I think it would be wise (and actually make other developers life easier) if we place a link to the
en.yml
in the documentation. By doing this, they would be able to get to that file without having to browse through all the repository.