Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional requirement to set a language before clicking "post" #5764

Open
SpriterGors opened this issue Oct 15, 2024 · 4 comments
Open

Optional requirement to set a language before clicking "post" #5764

SpriterGors opened this issue Oct 15, 2024 · 4 comments
Labels
feature-request A request for a new feature

Comments

@SpriterGors
Copy link

SpriterGors commented Oct 15, 2024

Describe the Feature

I speak three languages and often switch between them every post to talk to different groups of friends. I am aware that I can set the post language prior to posting, and I'm also aware that the composer can detect which language I am typing in.

However, the latter doesn't always activate reliably, and the former is placed on the bottom of the composer, far from the "Post" button, which makes me post stuff in English while the composer is set to "Portuguese", and vice-versa.

I suggest the following:

  1. Making the language settings button closer to the post button;
  2. Just like the feature of Requiring Alt Text before posting, add an OPTIONAL toggle where it requires me to set a language before posting. This option would prevent me from accidentally posting with the wrong language settings.

Attachments

Image of current post composer, with the language button "Portuguese" placed next to the character counter on the bottom right, while the Post button is on the top right (opposite corner)
image

Mockup of how it could be displayed (Language and Post next to each other)
image

(EDIT) Composer's language suggestion behavior:

Image of current composer with the English sentence "I am eating five pounds of Monterey Jack cheese", but the composer still thinks it is Portuguese.
image

Typing a single additional word "with" activates the language check:
image

However writing other types of words (in this case, ", and killing time playing some games") still does not activate it even though the text is still readable as English
image

It seems that the composer is analyzing the entire text to assign a language to it, and it activates with certain trigger words (short, common words in the language such as "with" or "não") or length of the string. I still don't quite understand how it works and as a common user, it feels arbitrary and random.

(EDIT) Another instance of me typing an entire post in English and yet the language notification failed to appear
image

Describe Alternatives

Another alternative would be to allow me to change language settings once the post has been posted.

Additional Context

No Response

@SpriterGors SpriterGors added the feature-request A request for a new feature label Oct 15, 2024
@mary-ext
Copy link
Contributor

mary-ext commented Oct 17, 2024

The language suggestion isn't perfect, that much is known unfortunately, it should've kicked in before the word "with" but the model is extremely poor on very short text and that it probably predicted it was some other language that wasn't in your language list.

Not much that can be done at the moment, I've been looking into replacements for the language detection model but the problem has been finding one that's actually better while also remaining to be small (because we are also shipping to the web, and large JS scripts are a no-no)

@SpriterGors
Copy link
Author

I suspected that the language detecting feature wouldn't be easy to adjust (language stuff is difficult indeed!)

However, I think that moving the language button close to the post button so that I can quickly check which language my post is currently set to, or displaying a "please select language" toggle before posting could already help mitigate this without having to deal with language models, since the biggest problem to me currently is accidentally posting with the wrong language setting

@QAComet
Copy link

QAComet commented Jan 19, 2025

@mary-ext What is a tolerable size for a language detection library?

@mary-ext
Copy link
Contributor

mary-ext commented Jan 20, 2025

If it was me, it would have to be equivalent or less than the current library in use. (130kb minified / 89 kb gzipped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A request for a new feature
Projects
None yet
Development

No branches or pull requests

3 participants