Skip to content
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

update: use instance's translation service #2426

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

HolgerHuo
Copy link

Since Mastodon v4.0.0, post translation api is exposed at /api/v1/statuses/:id/translate as well as through masto package. Thus we can use instance's translation service as Elk's translation provider.

@netlify
Copy link

netlify bot commented Oct 10, 2023

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit 72b96ab
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/6526eb82f67bea000850ca48

@netlify
Copy link

netlify bot commented Oct 10, 2023

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit 72b96ab
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/6526eb82822f24000841bf71
😎 Deploy Preview https://deploy-preview-2426--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@antfu
Copy link
Member

antfu commented Oct 11, 2023

I think we shouldn't remove the current implementation, as not all Mastodon server would support that API. Instead, we could use it when available and fallback to the current one.

@HolgerHuo
Copy link
Author

Hi! I've added a condition to use instance's translation provider only when the instance provides the option. However, the method used to test if the instance supports it seems not so graceful. I haven't come up with a better solution yet. Maybe you'll have any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants