Code Monkey home page Code Monkey logo

Comments (8)

T1mL3arn avatar T1mL3arn commented on September 26, 2024 1

When I am in a conversation I use translator in both directions from foreign to my native and vice versa. With such feature I don't have to press "swap languages" button. To put it simple - it saves some clicks.

The feature can be expanded to something like "language pairs" when a user defines as many pairs as he wants so the translator always produces desired translation for desired source lang. But honestly I cannot see many users will use it beyond swap feature.

from linguist.

vitonsky avatar vitonsky commented on September 26, 2024

How works option "second target language" with disabled second option for auto swap language?

What is use case for this options?

from linguist.

T1mL3arn avatar T1mL3arn commented on September 26, 2024

I can see it does nothing, so the second lang option is meant to work in tandem with swap option. Though when you use different languages they appear in the recent section in <select>:

image

from linguist.

vitonsky avatar vitonsky commented on September 26, 2024

Recent languages feature already implemented #198

Whats use case for feature you suggest? Why as user you need it?

from linguist.

vitonsky avatar vitonsky commented on September 26, 2024

Your use case are clear and looks important.

The solution with "second" language looks artificial and not suitable for this use case, like the second solution with preconfigured languages pairs, because what if user will have 2 tabs with messangers with german people and with french people? How to help to user automatically translate from their language to target language if we have only language "pairs"?

It's good that you reported this use case, i really want to improve user experience for it, but suggested solutions looks not enough good to implement, let's take time and will think together how to solve this problem better and make UX convenient.

Feel free to share your thinks in this issue

from linguist.

T1mL3arn avatar T1mL3arn commented on September 26, 2024

I cannot think better than it is done in Simple Translate. To implement auto swap translator must know the second language, having this as an explicit setting is better than trying to guess/detect second language (this is possible too, but looks overcomplicated). Once a user enables this feature, he can translate lang-A to lang-B and lang-B to lang-A just by typing/pasting text, without clicking swap button.

from linguist.

vitonsky avatar vitonsky commented on September 26, 2024

It looks useful behavior (formal description)

  • When language of selected text are the same as user language in preferences
  • Then translate selected text to another language, different of preferred by user

This behavior we would enable as option, but the main question is: whats language use instead of user language?

It may be:

  • language pairs set in settings
  • page language (bad for cases with messanger)
  • some language that been chosen recently on current browser tab
  • language of content above current element where text selected

We have to think what's behavior will cover most use cases. We could potentially implement multiple behaviors and allow to chose it in options.

Let's add more ideas whats language must be used and how to get this language

from linguist.

T1mL3arn avatar T1mL3arn commented on September 26, 2024

Having secondary language in settings is also good for cases when translator is used outside a browser, I use it for translating unknown words when I watch movies in foreign lang, and also when I forgot a word in foreign lang when I write code comments in the foreign lang. With both cases I just switch to browser, type/paste text and get desired translation.

Case with many tabs can be handled in this way:

  • settings "auto swap" is enabled,
  • on a tab a user translates something (or selects source language)
  • the language pair is known
  • auto swap now works
  • now is possible to select-translate or type-translate in any language within a known pair on a given tab

Auto swap setting can also be placed inside translator pop-up - as an override of global setting or as a complete replacement (I would prefer to have this setting as global). This approach is kinda "long" - it is necessary to establish a language pair by making a translation, but it allows to have as many lang pairs as necessary, and the pairs are scoped within tabs.

from linguist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.