Skip to content

Internationalization: fixing tests in pull #259 from @tomoyuki28jp#273

Closed
dgilperez wants to merge 8 commits into
ice-cube-ruby:masterfrom
dgilperez:pull-259
Closed

Internationalization: fixing tests in pull #259 from @tomoyuki28jp#273
dgilperez wants to merge 8 commits into
ice-cube-ruby:masterfrom
dgilperez:pull-259

Conversation

@dgilperez
Copy link
Copy Markdown
Contributor

Hi!

I'm creating a new PR, since I don't know how to add a commit to #259. I suspect the failing tests I mentioned earlier are failing only in my machine and I'd like to see what does Travis think about that. Please feel free to delete this PR if this is not the proper way of doing it.

Regards!

@dgilperez
Copy link
Copy Markdown
Contributor Author

Suspicion confirmed, tests are green now. @avit @tomoyuki28jp @stravabr @joelmeyerhamme

Are we ready to merge at last?

@dgilperez
Copy link
Copy Markdown
Contributor Author

Hi @avit !

Did you have time to have a look at this? I've been using my fork for a while in several pet projects and it seems to be working fine, but I'd like to see what others think.

Regards!

@dgilperez
Copy link
Copy Markdown
Contributor Author

Any chance this PR gets merged anytime soon? Thanks!

@stravabr
Copy link
Copy Markdown

Yes please! 👍

@dgilperez
Copy link
Copy Markdown
Contributor Author

Just checking in to keep this thing alive. @avit, it would be nice if you could have a look at it, or bring in some of the other maintainers. Thanks!

@isaacseymour
Copy link
Copy Markdown
Contributor

Awesome work @dgilperez ! Would love to see this merged

Comment thread lib/ice_cube.rb
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This eliminates the option of overriding the format from the i18n config

@to_s_time_format ||= I18n.t("ice_cube.date.formats.default")

maybe?

(the comment above it should be updated too)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could always change I18n.t("ice_cube.date.formats.default") to override that 😄, that is actually my proposed way to do that. What do you think? But maybe there are some docs / other methods to be changed accordingly?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, actually caching is a really bad idea if you're using multiple locales in the same process (e.g. tests) - the second locale's date format gets ignored. My bad.

@avit
Copy link
Copy Markdown
Collaborator

avit commented Mar 16, 2015

I will make the time to review this soon. This does look like a helpful addition.

Currently IceCube has no runtime dependencies outside of stdlib. (This change would introduce the I18n gem, which I'm OK with since it doesn't have a whole tree of other dependencies.) Before I look at your implementation, will it be possible to make translations optional? (e.g. require "ice_cube/i18n")

(Sorry this hasn't been a priority, I don't use the string output for schedule descriptions myself; I only use it for generating occurrence times.)

@avit
Copy link
Copy Markdown
Collaborator

avit commented Mar 16, 2015

And thanks for your work and patience, everyone.

@dgilperez
Copy link
Copy Markdown
Contributor Author

No pro @avit! Thanks for having a look at this. I will have no spare time in the following few days, so I suggest you adapt the code at this PR to the current codebase, add that option to enable / disable translations and I'll get back as soon as possible!

PS: BTW, I don't think enabling / disabling translations is a good idea, or at least I don't see the use case. I'd rather add the defaults to the english .yml version and build from that. Current users should be able to upgrade without noticing.

@mlerner
Copy link
Copy Markdown

mlerner commented Apr 20, 2015

@avit @dgilperez Looks great! Would be nice to get this merged soon :)

@stravabr
Copy link
Copy Markdown

👍

@jpowell
Copy link
Copy Markdown

jpowell commented Apr 24, 2015

👍 was looking for a way to get this from I18n also.

@dgilperez
Copy link
Copy Markdown
Contributor Author

So, @avit, any news?

@dgilperez
Copy link
Copy Markdown
Contributor Author

Hey @seejohnrun, are there any plans to merge this PR? Anything left to do here?

@dgilperez
Copy link
Copy Markdown
Contributor Author

Closing due to #311 been merged.

@dgilperez dgilperez closed this Dec 9, 2015
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