Skip to content

Use I18n and add Japanese locale.#259

Closed
tomoyuki28jp wants to merge 4 commits into
ice-cube-ruby:masterfrom
tomoyuki28jp:master
Closed

Use I18n and add Japanese locale.#259
tomoyuki28jp wants to merge 4 commits into
ice-cube-ruby:masterfrom
tomoyuki28jp:master

Conversation

@tomoyuki28jp
Copy link
Copy Markdown

I made changes based on the work made by @joelmeyerhamme ( https://github.com/joelmeyerhamme/ice_cube/tree/international ).
#68

@stravabr
Copy link
Copy Markdown

stravabr commented Nov 5, 2014

Hi @tomoyuki28jp, I'm wondering what the state of this work is? Do you plan to complete and merge it?
I'm very interested in potentially making use of it and contributing other translations. Let me know if I can help.

@tomoyuki28jp
Copy link
Copy Markdown
Author

@stravabr I think I've done with it. When I run rspec tests on my local machine, it seems some tests fail before I make any changes. (Source code is forked from the master branch on github.) So I've modified tests which are directly related to my changes. (But I might be wrong!)

@tomoyuki28jp
Copy link
Copy Markdown
Author

@stravabr If I better do more work, please let me know. But I'm not sure if the owner will merge this pull request or not because they haven't responded to this yet. (It's been a month so far.)

@avit
Copy link
Copy Markdown
Collaborator

avit commented Nov 6, 2014

Sorry I haven't had a chance to review & merge new features. I'll try and set aside some time for it soon.

This looks promising, and it looks like it would apply cleanly. I think the i18n gem would need to be a real dependency, not just a "development dependency". Was there a reason the gemspec has it that way?

@tomoyuki28jp
Copy link
Copy Markdown
Author

@avit Thank you for taking a look at my pull request.

I think the i18n gem would need to be a real dependency, not just a "development dependency". Was there a reason the gemspec has it that way?

Ah, sorry. I just don't have much experience on developing a gem package. Is this a right way to fix it? tomoyuki28jp@9be09f7

@avit
Copy link
Copy Markdown
Collaborator

avit commented Nov 7, 2014

Right now we have zero runtime gem dependencies, but I think this is a very common gem and it would be worth adding for this functionality. You can change it to add_runtime_dependency.

@tomoyuki28jp
Copy link
Copy Markdown
Author

@avit Thanks for your advice! I made the change. tomoyuki28jp@e09e2a4

@dgilperez
Copy link
Copy Markdown
Contributor

👍 thanks for taking a work on this !

@dgilperez
Copy link
Copy Markdown
Contributor

Hey @tomoyuki28jp, I got the cause for the errors in ja tests:

I18n default time format is memoized here: https://github.com/seejohnrun/ice_cube/blob/master/lib/ice_cube.rb#L71, so when you run the whole suite it takes the value the first time (english format) and keeps on with that even if you change the I18n.locale.

I'm not particularly happy to see such kind of class-level memoizing, I suspect that will cause thread-safety issues. I think that we should remove that, what do you think @avit?

@stravabr
Copy link
Copy Markdown

stravabr commented Dec 8, 2014

@tomoyuki28jp @avit Any more progress/plans on sorting out these tests and getting this merged? Is there any way I can help?

@tomoyuki28jp
Copy link
Copy Markdown
Author

@stravabr Unfortunately, I have no idea :(

@dgilperez
Copy link
Copy Markdown
Contributor

I just sent a PR to @tomoyuki28jp to tomoyuki28jp#1 that fixes the tests as per my comment above. There are some failing tests yet, but I cannot find the cause. If any of you can put some time on this @stravabr @avit, we might get this task finished for once!

Regards,

@emilkarl
Copy link
Copy Markdown

emilkarl commented Oct 1, 2015

What is the status of this? Will it be possible to use I18n?

@dgilperez
Copy link
Copy Markdown
Contributor

Hey @emilkarl, this PR is working. I'm using that code in a side project, though it's not battle-tested.

I'm not sure why this PR is not getting attention.

@emilkarl
Copy link
Copy Markdown

emilkarl commented Oct 1, 2015

Cool @dgilperez. Maybe I am stupid but how do I add a PR in the Gemfile?

@dgilperez
Copy link
Copy Markdown
Contributor

You can refer to a particular branch or commit in your Gemfile like this:

gem 'ice_cube', github: 'dgilperez/ice_cube', branch: 'pull-259' # note that this is the actual branch name, not some magic stuff from Github!
# or
gem 'ice_cube', github: 'dgilperez/ice_cube', ref: '4926bf972f7c24c280e652dbac79348e5b9b9744'

Also, peeking at the network graph from my fork, I see the nice guys at gocardless have continued work on that PR, adding some locales and a few other goodies. It may a better replacement, what do you think @isaacseymour? Is your fork production ready?

@emilkarl
Copy link
Copy Markdown

emilkarl commented Oct 1, 2015

Awesome. I'll take a look at that too then!

@isaacseymour
Copy link
Copy Markdown
Contributor

Yep, we've been using the gocardless fork in production, it's not hugely
different. Would be great to be back on the official RubyGems version
though!

On Thu, 1 Oct 2015 20:18 Emil Karlsson notifications@github.com wrote:

Awesome. I'll take a look at that too then!


Reply to this email directly or view it on GitHub
#259 (comment).

@dgilperez
Copy link
Copy Markdown
Contributor

Thanks @isaacseymour !!! Giving it a try ...

@greysteil greysteil mentioned this pull request Dec 7, 2015
@avit
Copy link
Copy Markdown
Collaborator

avit commented Jan 31, 2016

@tomoyuki28jp Sorry, I have been away from this project for some time. I18n was added as an optional dependency in the meantime, and I would be happy to merge your contribution for Japanese translation.

If you still find it useful, please see the latest master branch and add your jp.yml on it. We can reopen this PR or make a new one.

@avit avit closed this Jan 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants