Skip to content
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

fedi wiki

  1. Home
  2. Technical Discussion
  3. Does #Mastodon even use `contentMap` in posts (`Note`)?

Does #Mastodon even use `contentMap` in posts (`Note`)?

Scheduled Pinned Locked Moved Technical Discussion
mastodonactivitypubfediversei18nl10n
15 Posts 4 Posters 6 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mooooooo@qaf.menM mooooooo@qaf.men

    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

    hotelbreakfast@mastodon.socialH This user is from outside of this forum
    hotelbreakfast@mastodon.socialH This user is from outside of this forum
    hotelbreakfast@mastodon.social
    wrote last edited by
    #6

    @mooooooo That would make it into a FASP I believe? Offering services to services.

    hotelbreakfast@mastodon.socialH robooo@koffieenraar.nlR 2 Replies Last reply
    0
    • hotelbreakfast@mastodon.socialH hotelbreakfast@mastodon.social

      @mooooooo That would make it into a FASP I believe? Offering services to services.

      hotelbreakfast@mastodon.socialH This user is from outside of this forum
      hotelbreakfast@mastodon.socialH This user is from outside of this forum
      hotelbreakfast@mastodon.social
      wrote last edited by
      #7

      @mooooooo Or would you suggest multilang compose?

      mooooooo@qaf.menM 1 Reply Last reply
      0
      • hotelbreakfast@mastodon.socialH hotelbreakfast@mastodon.social

        @mooooooo That would make it into a FASP I believe? Offering services to services.

        robooo@koffieenraar.nlR This user is from outside of this forum
        robooo@koffieenraar.nlR This user is from outside of this forum
        robooo@koffieenraar.nl
        wrote last edited by
        #8

        @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.

        1 Reply Last reply
        0
        • hotelbreakfast@mastodon.socialH hotelbreakfast@mastodon.social

          @mooooooo Or would you suggest multilang compose?

          mooooooo@qaf.menM This user is from outside of this forum
          mooooooo@qaf.menM This user is from outside of this forum
          mooooooo@qaf.men
          wrote last edited by
          #9

          @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@qaf.menM hotelbreakfast@mastodon.socialH 2 Replies Last reply
          0
          • mooooooo@qaf.menM mooooooo@qaf.men

            @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@qaf.menM This user is from outside of this forum
            mooooooo@qaf.menM This user is from outside of this forum
            mooooooo@qaf.men
            wrote last edited by
            #10

            @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

            1 Reply Last reply
            0
            • mooooooo@qaf.menM mooooooo@qaf.men

              @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@mastodon.socialH This user is from outside of this forum
              hotelbreakfast@mastodon.socialH This user is from outside of this forum
              hotelbreakfast@mastodon.social
              wrote last edited by
              #11

              @mooooooo The universal translator: https://socialhub.activitypub.rocks/t/federated-auxiliary-service-providers/8859/8

              julian@activitypub.spaceJ 1 Reply Last reply
              0
              • hotelbreakfast@mastodon.socialH hotelbreakfast@mastodon.social

                @mooooooo The universal translator: https://socialhub.activitypub.rocks/t/federated-auxiliary-service-providers/8859/8

                julian@activitypub.spaceJ This user is from outside of this forum
                julian@activitypub.spaceJ This user is from outside of this forum
                julian@activitypub.space
                wrote last edited by
                #12

                @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 contentMap more broadly on the fediverse?

                mooooooo@qaf.menM 1 Reply Last reply
                0
                • julian@activitypub.spaceJ julian@activitypub.space

                  @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 contentMap more broadly on the fediverse?

                  mooooooo@qaf.menM This user is from outside of this forum
                  mooooooo@qaf.menM This user is from outside of this forum
                  mooooooo@qaf.men
                  wrote last edited by
                  #13

                  @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 (?)

                  hotelbreakfast@mastodon.socialH 1 Reply Last reply
                  0
                  • mooooooo@qaf.menM mooooooo@qaf.men

                    @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 (?)

                    hotelbreakfast@mastodon.socialH This user is from outside of this forum
                    hotelbreakfast@mastodon.socialH This user is from outside of this forum
                    hotelbreakfast@mastodon.social
                    wrote last edited by
                    #14

                    @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

                    julian@activitypub.spaceJ 1 Reply Last reply
                    1
                    • hotelbreakfast@mastodon.socialH hotelbreakfast@mastodon.social

                      @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

                      julian@activitypub.spaceJ This user is from outside of this forum
                      julian@activitypub.spaceJ This user is from outside of this forum
                      julian@activitypub.space
                      wrote last edited by
                      #15

                      @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="😆" />

                      1 Reply Last reply
                      0

                      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
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      Powered by NodeBB Contributors
                      • First post
                        Last post