Inline translation on toots #15
Labels
No Label
area/i18n
area/infrastructure
area/moderation & safety
area/ux
priority/1.high
priority/2.medium
priority/3.low
tag/upstream issue
tag/duplicate
tag/help wanted
tag/invalid
tag/won't fix
type/bug
type/enhancement
type/question
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: treehouse/mastodon#15
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
I know it's going to be a bit difficult to implement, but having an easily accessible 'Translate toot' button is a very useful feature, and I've seen a handful of toots mention it recently.
To avoid using up API credits doing translations for every single post, we should probably just detect the language used in the toot and store it. If the tagged language differs from the user's locally configured language, show a translate link at the bottom of the tootl.
Google has a language detection extension to their translation api:
https://cloud.google.com/translate/docs/basic/detecting-language
Presumably Bing and other common translation APIs also offer the same. Alternatively, we can also do the same (to a much less reliable extent) by tokenizing the toot and comparing against lists of the most frequent words of each (supported) language (maybe against an existing simple list, like what's in /usr/share/dict). This can probably be done at toot ingest time and stored along with the toot.
https://github.com/glitch-soc/mastodon/issues/1865 o.o