Hi everyone! I made a translator bot that translates statuses it's mentioned in.
To use it, mention @translator (email@example.com) in your status, followed by the two-letter code for the language you want to translate to (e.g. "ja" for Japanese) (full list of possible codes here: https://christopher.su/projects/translator/). It uses English if no language is given.
Give it a try and toot me your suggestions and comments!
11t now displays the timeline as paragraphs of clean text, and when you click a toot, you get a mock richtext view of the toot where usernames, links and hashtags are bold and clickable. It's far from perfect.
@dredmorbius Would do that for sure. I wonder if Mastodon might still send a notification to the author though. It might look at the parent toot id, check that toot, and then send a notification to its author. Need to manually test a reply toot that doesn't mention the author and see if it still notifies.
@dredmorbius Actually, another problem with this: the https://toot.works instance is essentially a single-user (+bots) instance. If the parent toot isn't federated to the instance, I'm not sure if the bot can fetch the parent toot's content to translate it. Any idea on how to fix it?
When browsing my timeline on toot.works, I frequently click on toots that are replies and I can't see the parent toot :/
@chris You might need to work around that. I'm not sure what the bot API looks like but:
1. Open the requestor's local instance of the request (e.g., <instance>/@<requestor>/<post-ID>
2. Look at the parent post, which should be the original.
3. Grab its timeline URL.
4. Search that on the bot instance. This adds the post to that instance.
I don't know that there's a streamlined way of doing this, but it would include the parent work, if you can make this happen.
@dredmorbius Ah, using the instance search through the API to pull in the post to the instance is brilliant. I hadn't thought of that.
Another approach that I thought of that could work: the "Get a status" API endpoint was changed to not require authentication in one of the more recent versions, so I could try calling that API directly on the other instance. Would only work if the other instance was on a new enough version that the API didn't require auth though.