Skip to content

Conversation

ashton22305
Copy link
Contributor

@ashton22305 ashton22305 commented Oct 9, 2025

Fixes #657

Creates a GitHub Action that automatically updates translations and removes unused keys every Monday morning.


steps:
- name: Checkout ${{ github.sha }}
uses: actions/checkout@v3
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

gem 'highline', '2.1.0'
# gem 'easy_translate'
# gem 'ruby-openai'
gem 'ruby-openai', ''
Copy link
Contributor

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.

Copy link
Contributor Author

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

@ashton22305
Copy link
Contributor Author

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 en-CA to French

@ashton22305 ashton22305 marked this pull request as draft October 9, 2025 16:40
@ashton22305 ashton22305 marked this pull request as ready for review October 9, 2025 17:16
@ashton22305 ashton22305 added the status/awaiting review Changes made by dev, waiting for reviewers label Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/dashboard status/awaiting review Changes made by dev, waiting for reviewers
Projects
Status: Awaiting Review
Development

Successfully merging this pull request may close these issues.

Automate localizations
3 participants