|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
|
|
|
|
|
[MSC1767](https://github.com/matrix-org/matrix-doc/pull/1767) describes Extensible Events in detail,
|
|
|
|
|
though deliberately does not include schemas for some messaging types. This MSC covers translations
|
|
|
|
|
on `m.markup` content blocks specifically.
|
|
|
|
|
on `m.text` content blocks specifically.
|
|
|
|
|
|
|
|
|
|
*Rationale*: Splitting the MSCs down into individual parts makes it easier to implement and review in
|
|
|
|
|
stages without blocking other pieces of the overall idea. For example, an issue with the way images
|
|
|
|
@ -15,7 +15,7 @@ section for early support of this MSC.
|
|
|
|
|
|
|
|
|
|
## Proposal
|
|
|
|
|
|
|
|
|
|
As defined by MSC1767, `m.markup` currently specifies an array with "representations" for the text
|
|
|
|
|
As defined by MSC1767, `m.text` currently specifies an array with "representations" for the text
|
|
|
|
|
on the event. Clients are expected to find the first representation they can render based on mimetype,
|
|
|
|
|
which can be implicit.
|
|
|
|
|
|
|
|
|
@ -24,7 +24,7 @@ used in a room, such as announcements or other prepared communications. Less com
|
|
|
|
|
(at least without a translation service on the sender's side), the receiving client can use the message
|
|
|
|
|
which matches the user's preferred language.
|
|
|
|
|
|
|
|
|
|
This MSC adds an additional key, `lang`, to the `m.markup` representation schema and adjusts how a
|
|
|
|
|
This MSC adds an additional key, `lang`, to the `m.text` representation schema and adjusts how a
|
|
|
|
|
client decides upon a representation to include the language in that consideration. The array overall
|
|
|
|
|
is still ordered, which means the sender should also supply the language which fits the scenario best
|
|
|
|
|
as the first item.
|
|
|
|
@ -35,7 +35,7 @@ An example:
|
|
|
|
|
{
|
|
|
|
|
"type": "m.message",
|
|
|
|
|
"content": {
|
|
|
|
|
"m.markup": [
|
|
|
|
|
"m.text": [
|
|
|
|
|
{
|
|
|
|
|
"body": "Je suis un poisson",
|
|
|
|
|
"lang": "fr"
|
|
|
|
@ -49,7 +49,7 @@ An example:
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
*Note*: `m.markup`'s support for `mimetype` has been excluded from the example for brevity. It is still
|
|
|
|
|
*Note*: `m.text`'s support for `mimetype` has been excluded from the example for brevity. It is still
|
|
|
|
|
supported in events.
|
|
|
|
|
|
|
|
|
|
By default, messages are assumed to be sent in English (`en`).
|
|
|
|
|