Coder Social home page Coder Social logo

Comments (5)

simonprev avatar simonprev commented on June 12, 2024 1

Much easier to use! Thanks @ChxGuillaume !

Screen.Recording.2024-04-04.at.9.37.48.PM.mov

from accent.

ChxGuillaume avatar ChxGuillaume commented on June 12, 2024

After some investigation, it seems to come from some frontend GraphQL request in this component/function:

submitTask = dropTask(async (targetLanguageSlug: string) => {
this.args.onUpdatingText();
const variables = {
projectId: this.args.project.id,
text: this.args.text,
targetLanguageSlug
};
const {data} = await this.apollo.client.query({
query: projectTranslateTextQuery,
variables
});
if (data.viewer.project.translatedText?.text) {
this.args.onUpdateText(data.viewer.project.translatedText?.text);
}
});

It seems like this GraphQL Request needs a targetLanguageSlug and sourceLanguageSlug
In this method, it seems like the param targetLanguageSlug should be sourceLanguageSlug
It is then missing the targetLanguageSlug from request based on the "conflict list column"

from accent.

ChxGuillaume avatar ChxGuillaume commented on June 12, 2024

Hi @simonprev,

Would like to know something regarding the Machine Translation feature.
image
Are the languages proposed in the inputs supposed to be a Source selection or the other way around?

I thought it was meant to select the source language you wanted to use for translation into the current "context" language πŸ˜„
I suppose if it is Target from Source, the source would be the primary language?

Sorry for bothering you with this issue πŸ˜…

from accent.

simonprev avatar simonprev commented on June 12, 2024

Hi @ChxGuillaume ! Yeah the UX for this is not optimal, I see why you thought that the select was the source language.

The way this works is by using the "detect language" of the provider like DeepL and Google Translate. The fix is already in master branch and 1.21.0. The proposed languages in the select are choices "to be translated in". You’re right that it’s pointless since we know the "target" language since we are in the context of a language in the textarea.

This means we should just remove the list of language and make the "translate" icon just send the text with the current textarea language context as the "target" parameter.

That makes sense?

from accent.

ChxGuillaume avatar ChxGuillaume commented on June 12, 2024

Okay yup, get it.
Thanks for the clarification πŸ˜„

from accent.

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.