-
Notifications
You must be signed in to change notification settings - Fork 378
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
MSC3226: Per-room spell check #3226
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congratulations on your first MSC :)
We'll need sign-off so we can merge the MSC down the line: the easiest way to do this is to add a comment or edit the description to include the following template:
Signed-off-by: Your Name <email@example.org>
✔️ Done. |
Clients offering spell checking should default their dictionary to the system language. They should offer | ||
a way to change it and when the user sets a specific language, then they should store the language code | ||
as `m.input_language` account data for the room where it was set. Language codes must be | ||
[RFC3066](https://datatracker.ietf.org/doc/html/rfc3066) compliant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to say which field to store the language code in
{
"type": "m.input_language",
"content": {
"???": "fi-FI"
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha, right. We currently use:
{
"type": "org.gnome.fractal.language",
"content": {
"input_language": "fr_FR"
}
}
in Fractal. Would it make sense to have m.input_language
as the type and input_language
as the field name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The field name isn't too important so it's probably easiest to just go with what you're already using.
If you want to bikeshed it more, here's what the spec currently has:
m.room.name
->name
m.room.topic
->topic
m.room.avatar
->url
m.room.join_rules
->join_rule
m.room.history_visibility
->history_visibility
m.room.guest_access
->guest_access
m.room.canonical_alias
->alias
m.room.pinned_events
->pinned
m.tag
->tags
m.ignored_user_list
->ignored_users
m.fully_read
->event_id
The language could be defined as a room property: a room administrator could set it once and then every | ||
member would get it for free. However, not everyone in a given room necessarily talks in the same language | ||
(or even language variant, e.g. en_US vs en_GB) and there would need to be a way for users to override the | ||
room property. This MSC could be used as a mechanism to do said override, if such a room property were ever | ||
defined. Adding a room property requires more work and thought, and can be done in another MSC. It is thus | ||
considered out of scope for this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it require that much more work and thought to say that m.input_language
can be in either room state or room account data, with the room account data taking priority?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest I don’t know how room properties work that well, and I suspected it might impact room versioning. More work meant at the minimum more investigative work to see what the real impact is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't impact room versioning, only things that change the federation protocol (event authorization rules, state resolution, etc) need a new room version. It works pretty much the same way as account data: invent an event type and put arbitrary JSON inside.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, sounds good! I’ll update the proposal to add the room property. Thank you.
|
||
Clients offering spell checking should default their dictionary to the system language. They should offer | ||
a way to change it and when the user sets a specific language, then they should store the language code | ||
as `m.input_language` account data for the room where it was set. Language codes must be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen chats with multiple common languages. Would it make sense to make this an ordered list of languages based on"preference"? I would also happily add a caveat that many clients will just use the first one.
But this could be helpful for using the sum of the dictionaries or similar for spell check.
@afranke, this seems to have been merged without FCP? |
I’m so sorry, I messed up trying to adjust my fork to the renamed main branch. I’ll revert right now. |
No worries, just confused a couple of people :) |
Rendered
Signed-off-by: Alexandre Franke afranke@gnome.org