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

Per-toot language #17073

Closed
Wuzzy2 opened this issue Nov 29, 2021 · 29 comments · Fixed by #18420
Closed

Per-toot language #17073

Wuzzy2 opened this issue Nov 29, 2021 · 29 comments · Fixed by #18420

Comments

@Wuzzy2
Copy link

Wuzzy2 commented Nov 29, 2021

Pitch

I propose that the language can be specified for individual toots. By default, the language is whatever you specified in your profile as your "toot language" but you can choose to select a different langauge for individual toots.

Motivation

For example, when you mostly toot in English, but occasionally toot in German as well. Currently, all your toots are marked as being in the language you set in the profile.

@Gargron
Copy link
Member

Gargron commented Nov 29, 2021

In the API, language can be specified for an individual post. This is not exposed in the web UI to avoid cluttering the form.

@ghost
Copy link

ghost commented Nov 30, 2021

Can we please make this language GUI setting exposure configurable? This would be relevant for accounts that reach out to an audience with high language diversity.

@Wuzzy2
Copy link
Author

Wuzzy2 commented Nov 30, 2021

I agree with rriemann-eu. This is exactly the use-case I was aiming at here. :-)

@piegamesde
Copy link

Note that the toot language is especially important for screen readers, so that they know how to pronounce things.

Would a simple auto-detection algorithm possible that then prompts the user to change the language? I fear that simply having it as an option won't be enough because users might forget to change the setting.

@Cassolotl
Copy link

This is a duplicate of #8753, but that was closed over three years ago, so I feel like it would be okay to leave this open. :D

@Manndung75
Copy link

Hanoi

@gunchleoc
Copy link
Contributor

gunchleoc commented Apr 27, 2022

I'd like this feature too. I am trilingual.

What about this idea:

  • In the settings, allow selecting multiple languages as post language, in addition to the default post language
  • When a user has defined more than 1 language, show a language selection button in the posting window that has a dropdown menu with the selected languages, plus a "More languages…" option for all languages
  • The button will dynamically show the locale code of the currently selected language
  • For replies, preselect the language of the previous post
  • For blank posts, either a default language, or the last used language

@LoveIsGrief
Copy link

I like @gunchleoc's proposal. Maybe the language selection on the web UI could just be a flag of the language and clicking on it opens a dropdown or a modal dialog.

afbeelding

@skenizen
Copy link

The english-centered aspect of twitter was my number one complaint about it. For international users who travelled, speak multiple languages, and have multilingual friends, we have to resort to use only english as people following us wouldn't necessarily understand other languages.
This weaken our engagement with other speakers and culture and artificially inflate the importance of english. It had the very direct effect of preventing me from using my other languages at multiple occasions.

Adding this option as an opt-in would be great, especially that there is no actual technical restrictions according to @Gargron

@gunchleoc
Copy link
Contributor

I have downvoted the flag option, because it won't work. Many countries are multilingual, e.g. does the Scottish flag stand for Gaelic or Scots? And the Nigerian flag for Yorùbá, Ẹ̀dó or any other of the myriad of languages spoken in that country? Which flag would you use for speaker of languages that are spread over multiple nation states, like Ewe (Ghana, Togo, Benin)?

@Wuzzy2
Copy link
Author

Wuzzy2 commented Apr 27, 2022

Most languages, with a very few exceptions (e.g. Esperanto, Lojban, Ido), don’t actually have flags. Using national flags for languages doesn’t actually work, because there is not an 1:1 relationship of nation to language. It’s actually an n:m relationship. Therefore, whatever national flag you use to represent a language, this will be completely arbitrary and should therefore not be done.

Just use the ISO language code instead (2 or 3 letters).

@Oblomov
Copy link

Oblomov commented Apr 28, 2022

See also #9550. It's honestly a bit impractical that one needs to use external tools to be able to set the toot language when posting. If cluttering the UI is that big of an issue, making the selection box opt-in from the preferences (Preferences > Other > Posting default > add a checkbox 'show language selection in composer' or something) should meet the needs of both those that want a simpler interface and/or post always in the same language, and the others.

@mro
Copy link

mro commented Apr 28, 2022

the API requires an ISO language code. Why not just expose it. Verbatim. We are used to codes with international phone numbers (no flags here, right?).

It's brief, concise, human readable, requires no mapping and hides nothing.

@mro
Copy link

mro commented Apr 28, 2022

@Gargron

avoid cluttering the form.

If the standard is cluttered the UI can't help it if implementing the standard.

@dahlia
Copy link

dahlia commented Apr 28, 2022

If cluttering the UI is that big of an issue, making the selection box opt-in from the preferences (Preferences > Other > Posting default > add a checkbox 'show language selection in composer' or something) should meet the needs of both those that want a simpler interface and/or post always in the same language, and the others.

Second this. Few more thoughts and suggestions on UI things:

  • Exposing ISO language codes wouldn't be the best experience for average users. Quite many codes are even unpredictable. Instead, we could use native language names compiled in Unicode CLDR.

  • In addition to @Oblomov's idea, we can further clutter the UI by showing only user's filter languages (which can be configured from PreferencesOtherFilter languages).

@mro
Copy link

mro commented Apr 28, 2022

Quite many codes are even unpredictable

same holds for telephone prefixes as I said. Or would you guess 0043 for switzerland? But nevertheless it works perfect and is not an obstacle for international calls.

You won't guess them, but you won't forget your preferred ones either. Users are not morons.

Don't speculate but test it and see people remember the languages they care about.

only user's filter languages

please don't speculate on limiting decisions. Sort the used ones first, then filter then rest, allow text entry.

And as Stephen Krug says: Don't argue but test it!

@piegamesde
Copy link

same holds for telephone prefixes as I said. Or would you guess 0043 for switzerland? But nevertheless it works perfect and is not an obstacle for international calls.

This is a bad argument IMO. Just because it works doesn't mean it's good. The proposal of using the language name instead of its code is a strict improvement usability wise IMO.

@LoveIsGrief
Copy link

Good arguments were made against flags and I do agree (despite having suggested them at first). The language code might be pretty easy. The web UI could just have the two letter language code underneath the smiley (I'm obviously not a designer):

afbeelding

A click on it could bring up a modal similar to this

Modal drawio

@mro
Copy link

mro commented Apr 29, 2022

@LoveIsGrief please stick with ISO-639 and make it lowercase. (Upercase is countries, ISO-3166)

@virgilinojuca
Copy link

I think it should show on the button the ISO code for the selected language, but the full name on the selection window. Not everyone knows which language corresponds to each code.

@rwmpelstilzchen
Copy link

Is it possible to adapt the language selection interface used on Wikipedia? It’s quite neat, powerful and intuitive.

@amire80, any thoughts?

@amire80
Copy link

amire80 commented Apr 29, 2022

Is it possible to adapt the language selection interface used on Wikipedia? It’s quite neat, powerful and intuitive.

@amire80, any thoughts?

Well, I'll be super-happy to see it used on more sites :)

The generic reusable library is at https://github.com/wikimedia/jquery.uls

Even though the code is oldish, the design totally holds up.

It's slightly old-fashioned, as most of the code was written in jQuery in 2012 (my colleagues are working on a more modern version in Vue, but I don't know when will it be released as a reusable library.). And while it supports mobile web in theory, it's not actually used much on mobile sites, so it may require some refreshment (patches welcome, and I mean it in a good way).

All that said, jquery.uls is functional and stable, and I'll be delighted to see it in Mastodon.

@eishiya
Copy link

eishiya commented May 15, 2022

It seems like a lot of users neglect to set their posting language in the first place, or leave it set to English because they post in English sometimes, resulting in the language filters being pretty useless - a lot of (most?) non-English posts are marked as "English", which means if I filter by English, I get a lot of non-English posts, and if I filter by other languages and exclude English, I won't see many relevant posts.

Having a per-toot language option would help draw attention to the fact that the posting language selection even exists, which would make filtering more useful. I'd personally like to see it implemented somewhat like the emoji palette, where it shows all the options, but shows your frequently-used ones at the top, so you can easily select languages you've previously posted in. Users should also have the option to opt out of the selector in their settings since monoglots aren't likely to need it, but doing so should ask them to verify their default posting language. (Incidentally, a similar opt-out for the emote palette might be nice, for those of us who only use a few different emotes and type the codes anyway.)

@mro
Copy link

mro commented May 28, 2022

thank you for adding this, just saw it at https://digitalcourage.social!

Sadly you chose against languages ISO-639 (lowercase) but for countries ISO-3166 (uppercase). Maybe you find compliant lowercase too scary to bother with.

Nevertheless, having the option to choose is great and the UX is wonderful. Thank you!

@Wuzzy2
Copy link
Author

Wuzzy2 commented May 28, 2022

Using the country code instead of language code was definitely a mistake. Languages are not countries, the relationship between country and language is very messy. I hope it will be fixed in a later PR.

@Gargron
Copy link
Member

Gargron commented May 29, 2022

Nobody is using country codes.

@mro
Copy link

mro commented May 30, 2022

@Gargron you may not be aware of it. The according ISO standards are case-sensitive. I see uppercase letters which is ISO-3166 which is countries. Languages(ISO-637) are lowercase.

@mro
Copy link

mro commented May 30, 2022

I just learned in the linked issue ISO itself is undecided and doesn't make lowercase mandatory. So it be good then.

@RokeJulianLockhart
Copy link

#17073 (comment)

@Gargron, I use them. I can provide examples should you desire evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.