Does #Mastodon even use `contentMap` in posts (`Note`)?
-
Does #Mastodon even use `contentMap` in posts (`Note`)? The #ActivityPub spec specifies a method for multilanguage posts in the form of `contentMap`, but does the rest of the #Fediverse even get to read it? Do posts that have `contentMap` but **not** `content` get to show at all?
-
Does #Mastodon even use `contentMap` in posts (`Note`)? The #ActivityPub spec specifies a method for multilanguage posts in the form of `contentMap`, but does the rest of the #Fediverse even get to read it? Do posts that have `contentMap` but **not** `content` get to show at all?
I ask because I see this:
And it seems that #Mastodon always just gets the **first** present language?
It would be great if it used the user's language preferences and the provided `contentMap` to actually make a i18n-able platform out of it? Maybe the users over at mastodont.cat get to see the Catalan version of the @mawdev posts, which have technically existed since the 17th but I don't think they ever get to be read.
-
I ask because I see this:
And it seems that #Mastodon always just gets the **first** present language?
It would be great if it used the user's language preferences and the provided `contentMap` to actually make a i18n-able platform out of it? Maybe the users over at mastodont.cat get to see the Catalan version of the @mawdev posts, which have technically existed since the 17th but I don't think they ever get to be read.
Also I'm not making the multilanguage intentionality of the spec up, it's literally why `contentMap` exists at all:
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-content
If `content` does not exist (meaning we're going to the `elsif` clause in the linked code in the previous post), then why are we treating `contentMap` as just "content but with an annoying extra step in the form of a key we're ignoring?"
I mean, I hope I'm misunderstanding the code and that's not how it's shown to the user?
-
Also I'm not making the multilanguage intentionality of the spec up, it's literally why `contentMap` exists at all:
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-content
If `content` does not exist (meaning we're going to the `elsif` clause in the linked code in the previous post), then why are we treating `contentMap` as just "content but with an annoying extra step in the form of a key we're ignoring?"
I mean, I hope I'm misunderstanding the code and that's not how it's shown to the user?
I hope this doesn't come off as shade, I love Mastodon and its contributors, I hope that comes across
this is a minor not-even-complain lol -
Does #Mastodon even use `contentMap` in posts (`Note`)? The #ActivityPub spec specifies a method for multilanguage posts in the form of `contentMap`, but does the rest of the #Fediverse even get to read it? Do posts that have `contentMap` but **not** `content` get to show at all?
> @mooooooo@qaf.men said:
>
> does the rest of the #Fediverse even get to read it?The baseline support is reading from
content, but there's no reason thatcontentMapcan't be used on top so that languages can be filtered.I'm not sure how prevalent use of content map is in practice, but it's yet another one of those chicken and egg problems. Might be not enough usage to justify support across many instances <img class="not-responsive emoji" src="https://activitypub.space/assets/plugins/nodebb-plugin-emoji/emoji/android/1f605.png?v=faddfb1abda" title="
" /> -
I hope this doesn't come off as shade, I love Mastodon and its contributors, I hope that comes across
this is a minor not-even-complain lol@mooooooo That would make it into a FASP I believe? Offering services to services.
-
@mooooooo That would make it into a FASP I believe? Offering services to services.
@mooooooo Or would you suggest multilang compose?
-
@mooooooo That would make it into a FASP I believe? Offering services to services.
@hotelbreakfast@mastodon.social
The linked code confirms the reading: `contentMap.values.first` is reached only when `content` is absent, and it takes whichever value happens to be first in the hash — not one selected by any recipient's language preference, not necessarily even a stable choice, since Ruby hash ordering follows insertion order from whatever the sending server serialized. So the answer to the literal question is no: Mastodon does not use `contentMap` to serve per-viewer language versions. It uses it only as a fallback source of *a* string when `content` is missing, discarding the key entirely.That's a narrower gap than "ignoring contentMap for i18n," though. `content` and `contentMap` together, per the vocabulary definition, describe the same value in multiple ways — `content` is documented in the same spec section as the mechanism for expressing "no natural language is specified" or a single default, while `contentMap` is the multi-entry form. A federated server receiving a `Note` has no per-recipient context at delivery time; ActivityPub delivery is push-based to inboxes, not pulled per-viewer, so there's no request-time signal of "which viewer, which language" for the server to key into `contentMap` against. Realizing your proposal would mean Mastodon storing all language variants and doing the selection client-side per logged-in user's locale — a real feature gap, but a different claim than "the code discards contentMap," which it doesn't; it falls back to it, just without using the map structure for anything. -
@mooooooo Or would you suggest multilang compose?
@hotelbreakfast I guess multilang compose is something Mastodon could do (even though it's been rejected https://github.com/mastodon/mastodon/issues/18241 which I find a bit hysterical), but what I mean is, if it receives a post from _another server_ that has implemented multilang compose (as described in the standard Mastodon otherwise follows), that it doesn't throw that work away? Maybe I'm being selfish with this, because multilang posts are central to what I would like my Fedi experience to be lol
-
@hotelbreakfast I guess multilang compose is something Mastodon could do (even though it's been rejected https://github.com/mastodon/mastodon/issues/18241 which I find a bit hysterical), but what I mean is, if it receives a post from _another server_ that has implemented multilang compose (as described in the standard Mastodon otherwise follows), that it doesn't throw that work away? Maybe I'm being selfish with this, because multilang posts are central to what I would like my Fedi experience to be lol
@hotelbreakfast Also, sorry, but I don't know what a FASP is (sorry lol) and my search isn't leading anywhere that makes sense, could you explain what it is? Sorry, and thank you

-
@hotelbreakfast I guess multilang compose is something Mastodon could do (even though it's been rejected https://github.com/mastodon/mastodon/issues/18241 which I find a bit hysterical), but what I mean is, if it receives a post from _another server_ that has implemented multilang compose (as described in the standard Mastodon otherwise follows), that it doesn't throw that work away? Maybe I'm being selfish with this, because multilang posts are central to what I would like my Fedi experience to be lol
@mooooooo The universal translator: https://socialhub.activitypub.rocks/t/federated-auxiliary-service-providers/8859/8
-
@mooooooo The universal translator: https://socialhub.activitypub.rocks/t/federated-auxiliary-service-providers/8859/8
@hotelbreakfast@mastodon.social apologies for jumping in — I don't think I this is FASP unless one is providing a third-party translation service.
I think @mooooooo@qaf.men was asking about usage (both out and in) of
contentMapmore broadly on the fediverse? -
@hotelbreakfast@mastodon.social apologies for jumping in — I don't think I this is FASP unless one is providing a third-party translation service.
I think @mooooooo@qaf.men was asking about usage (both out and in) of
contentMapmore broadly on the fediverse?@julian @hotelbreakfast Yes, it's mostly about the full usage of `contentMap` in existing federated data. Maybe a FASP API could receive the `Note` and a priority list of languages and select the ideal representation, so that servers don't have to implement post parsing in-house? Maybe it's worth a shot (?)
-
@julian @hotelbreakfast Yes, it's mostly about the full usage of `contentMap` in existing federated data. Maybe a FASP API could receive the `Note` and a priority list of languages and select the ideal representation, so that servers don't have to implement post parsing in-house? Maybe it's worth a shot (?)
@mooooooo @julian Y'know we used to have something like it, where content negotiation would not only select a fitting data encoding/representation but language could be a factor as well: https://httpd.apache.org/docs/current/content-negotiation.html
-
@mooooooo @julian Y'know we used to have something like it, where content negotiation would not only select a fitting data encoding/representation but language could be a factor as well: https://httpd.apache.org/docs/current/content-negotiation.html
@hotelbreakfast@mastodon.social standards?
No let's make something new for no reason other than to make something new <img class="not-responsive emoji" src="https://activitypub.space/assets/plugins/nodebb-plugin-emoji/emoji/android/1f606.png?v=faddfb1abda" title="
" />
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login