Skip to content

Conversation

@nattsw
Copy link
Contributor

@nattsw nattsw commented Apr 22, 2025

Note: The diff numbers are wildly incorrect since this is just file moves.

Historically, we've had this structure

- discourse-translator
  - base.rb
  - google.rb
  - discourse-ai.rb
  - ...other providers

Any translation needed is invoked on the base class. And the base class' .translate method needs to account for both topics and posts.

As we're moving to translate more types, we need to move away from this. This PR is encapsulates the providers listed above into their own module so we can have a separate translation class altogether instead of calling Base.

Copy link
Contributor

@Drenmi Drenmi left a comment

Choose a reason for hiding this comment

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

Thanks for separating the refactoring and the feature work. 👌👨‍🍳

@nattsw nattsw merged commit f4724ab into main Apr 22, 2025
6 checks passed
@nattsw nattsw deleted the provider-mod branch April 22, 2025 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants