Remix.run Logo
cromka a day ago

Well, on macOS it's part of the system's right click facility, it takes selected text and the looks it up in dictionary or translates.

Adding support to individual apps is specifically something that ruins good UX. You want all apps enjoy it independently.

dhx 17 hours ago | parent [-]

I wasn't thinking of the UI being "highlight text -> context menu -> translate", rather, one of:

1. Open bonjour.md and a banner automatically appears above the document asking whether you'd like to translate from French -> German (assuming the desktop environment language was set to German). This is more or less how Firefox handles offline translation of web pages.

2. Open bonjour.md and click a translate button, then get asked which language pair to choose from.

I can however see how the "highlight text -> context menu -> translate" UI pattern may make sense in multi-language settings, such as a chat room, or web browser where text in multiple language may be presented on the same page. For a terminal session however, it may be better to require the user to pipe text to a translation command line utility where possible--but there are exceptions to this too such as ncurses interfaces.