Open pablofullana opened 7 years ago
Hi @pablofullana. Here are some points to resolve/consider:
en.yml
.i18n
instead of master
. If I recall correctly, you may need to re-open the pull request to change the base branch.Documentation looks good; it can be placed under "Internationalization". Instead of placing a link to the en.yml
file, place one to the config/locales
directory, which will list all of the available translations at once.
Thanks!
Just want to let you know that you can run rspec
locally and determine if the build will succeed without pushing to Github.
@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:
$ git reset HEAD~3
followed by
$ git stash
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.
There is still code on your branch I am not willing to merge; particularly dfc732b, 192eb24, and (maybe) c98ecfd. I am thinking the feature will work at 42541bd or c98ecfd, but I'm not sure. I may need to clean this up at some point when I have time.
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.