-
Notifications
You must be signed in to change notification settings - Fork 760
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
Basic i18n-tasks support with custom parser for Spree.t #640
base: main
Are you sure you want to change the base?
Conversation
Removing the WIP tag, as this adds support for the normalize tool which is the big leap forward that we are looking for. There are some issues regarding parsing the spree/spree repo and extracting keys that need to be present, as it requires an unreleased version of i18n-tasks that conflicts with spree/spree_cmd so can't be added to gem spec as is. @alepore @JDutil It would be great if we could get this in. |
%> | ||
|
||
# Add in spree custom scanner in 0.9 | ||
<% |
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.
Why is this inlined here?
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.
As i18n_tasks runs outside the scope of the parent application. We could add a require but it would still need to be inlined.
Basically that's what the i18n-tasks creator recommended. See glebm/i18n-tasks#170
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.
i18n-tasks add-missing supports a --nil-value
argument since v0.9.5, so this is no longer necessary.
This is much greater then the self baked solution. |
Note that a few things have been implemented in i18n-tasks that make this a bit easier:
|
|
||
# Add in spree custom scanner in 0.9 | ||
<% | ||
require './lib/i18n/spree_t_scanner.rb' |
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.
.rb
extension not necessary
This is a first pass on a more long term solution, currently this requires i18n-tasks to be installed outside of the gem, as it's incompatible with spree (highline conflicts).