-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Replace Spree.t with plain I18n.t #2309
Replace Spree.t with plain I18n.t #2309
Conversation
👍 |
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.
Yeah, good work.
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.
Reasonable change. Most of the commits can be stashed into one I guess.
I see the benefit of this and am for doing this, but this forces us to take a extra look while reviewing PRs that introduces translation keys. I am fine with that, though
feed9dc
to
ea28e8d
Compare
This existed prior to us making all translations available to JS. We can instead handle this where the datepicker is initialized. This adds support for a "default" option to be passed to Spree.t
d8671f2
to
30b4eba
Compare
The
Spree.t
method provides debatable benefit over the standardI18n.t
method andt
helper.Spree.t(:foo)
is one character shorter thant('spree.foo')
Spree.t('foo.bar')
is the same length ast('spree.foo.bar')
Spree.t
doesn't support thet(".relative")
shorthand (so we currently use botht
andSpree.t
)Spree.t
generates<span class="translation_missing"
on errors (like thet
helper), which is surprising because it looks more likeI18n.t
(which doesn't emit html)Spree.t
prevents us from using tools like i18n-tasksThis PR replaces
Spree.t
withI18n.t
throughout the project.