Uploaded image for project: 'Minecraft'
  1. Minecraft
  2. MC-116004

"Parrot" isn't translatable in the "imitates" subtitle

    Details

    • Confirmation Status:
      Confirmed

      Description

      Subtitles don't translate the imitating entity's name.

      To reproduce

      1. Download the attached resource pack.
      2. Enable the pack.
      3. Switch language to en_us ("English (US)")
      4. Go to "Music & Sounds..." and enable "Show Subtitles"
      5. Spawn some parrots
      6. Use the /say command to say their names
        /say @e[type=parrot]
        

        → It is using the custom translation "#Custom#"

      7. Spawn another mob, for example a husk
      8. Wait for the parrots to mimic the mob
        → The subtitle says "#Parrot imitates Husk groans#" instead of "##Custom# imitates Husk groans#"

      For reference, the aplicable lang changes are:

      entity.Parrot.name=#Custom#
      subtitles.entity.imitates=#%s imitates %s"
      

      All of these except for subtitles.entity.imitates have been pulled from crowdin (subtitles.entity.imitates isn't translatable yet). While these currently aren't in game, they will be on the full release.

      Cause

      From what I can tell, the string minecraft:parrot is passed over the network with the sound effect to identify a parrot as the imitating entity. That is converted to a resourcelocation and then passed to what MCP calls EntityList.getTranslationName, which returns a String that is used within translations (and previously was the entity's type, in versions prior to 1.11 - for instance, EntityHorse). For parrots, that returns Parrot, which works fine for English, but it's supposed to be used to create the translation key entity.Parrot.name, not used directly. Converting it like that (as is done elsewhere) would fix the issue.

      Alternatively, a numeric entity ID could be passed over the network to identify the exact entity doing the imitation. This would allow getting the name from the entity directly, which would have some benefits (complex entities would automatically use the right name, and it would also reflect custom names on the entity).

        Attachments

          Activity

            People

            • Assignee:
              Excited [Mojang] Maria Lemón
              Reporter:
              pokechu22 [Helper] Pokechu22
            • Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                CHK: