-
Notifications
You must be signed in to change notification settings - Fork 152
Automatically update localizations #4665
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
base: master
Are you sure you want to change the base?
Conversation
.github/workflows/localizations.yml
Outdated
|
||
steps: | ||
- name: Checkout ${{ github.sha }} | ||
uses: actions/checkout@v3 |
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.
Checkout is up to v5
now. I think we need to update some of our workflows last I checked some still have deprecation warnings. I spot checked ruby/setup-ruby
and it's still v1. Can you check the others?
bundle config path ~/vendor/bundle | ||
bundle install | ||
- name: Remove unused | ||
run: bundle exec i18n-tools remove-unused |
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.
What's the behavior of remove-unused
locally? I feel like there is at least 1 key that is undefined but then used somewhere? Or at least IIRC there's something weird we do here and I'm just curious if this removes things already locally.
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.
It removed the activemodels.errors.messages.
keys and a few others that, from what I could tell searching through the repository, don't seem to be used. Is there another way that keys are used than giving i18n.t
and explicit key?
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.
Is there another way that keys are used than giving i18n.t and explicit key?
I don't think so, I guess we just need some caution here. Like we can't just take it a face value, we're likely going to have to verify this bit.
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.
I'm not sure of a way to verify this other than manually, which is already possible as this opens a PR rather than just pushing. If you believe that's still too risky I'm perfectly willing to take that part out, though.
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.
We can leave it, I'm just curious / noting we need to be careful in the review.
apps/dashboard/Gemfile
Outdated
gem 'highline', '2.1.0' | ||
# gem 'easy_translate' | ||
# gem 'ruby-openai' | ||
gem 'ruby-openai', '' |
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.
Looks like bundler doesn't like this empty ''
version.
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.
Oops, didn't notice that
I should note that we definitely need to do at least a quick review when checking these PRs - I haven't seen it much, but we need to check if it decides to, for example, translate |
Fixes #657
Creates a GitHub Action that automatically updates translations and removes unused keys every Monday morning.