mojira.dev
MC-248834

The symbols used to show the location of sounds within the subtitle overlay are untranslatable

The Bug:

The "<" and ">" symbols used to show the location of sounds within the subtitle overlay are untranslatable and are missing translation keys.

Every language has its own rules that it follows. This ranges from spelling words differently, to using different punctuation under certain circumstances. Throughout the game, different languages can have symbols translated differently, therefore leading me to believe that this is a valid internationalization problem. For example, take the "options.controls" translatable text component which reads "Controls..." in English (US), and "按鍵設定⋯⋯" in Chinese Traditional, Hong Kong. As you can see the periods/full stops used within the Chinese Traditional, Hong Kong translation are completely different from the ones used in the English (US) translation. With this piece of knowledge in mind, some languages may interpret the use of the ":" symbol differently.

Steps to Reproduce:

  • Attempt to search for the existence of the string "<" by using this search filter, and the existence of the string ">" using this search filter, on the official Minecraft crowdin project.

  • Take note as to whether or not the symbols used to show the location of sounds within the subtitle overlay are untranslatable.

Observed Behavior:

The symbols used to show the location of sounds within the subtitle overlay are untranslatable.

Expected Behavior:

The symbols used to show the location of sounds within the subtitle overlay would be translatable.

Code Analysis:

Code analysis by @unknown can be found below.

The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.

net.minecraft.client.gui.components.SubtitleOverlay.java

public class SubtitleOverlay extends GuiComponent implements SoundEventListener {
   ...
   public void render(PoseStack $ps) {
      ...
      if (this.isListening && !this.subtitles.isEmpty()) {
         ...
         for(SubtitleOverlay.Subtitle subtitleoverlay$subtitle1 : this.subtitles) {
            ...
            if (!flag) {
               if (d0 > 0.0D) {
                  this.minecraft.font.draw($ps, ">", (float)(l - this.minecraft.font.width(">")), (float)(-j1), i2 + -16777216);
               } else if (d0 < 0.0D) {
                  this.minecraft.font.draw($ps, "<", (float)(-l), (float)(-j1), i2 + -16777216);
               }
            }
            ...

If we look at the above class, we can see that the symbols used to show the location of sounds within the subtitle overlay are hardcoded, and as a result, are untranslatable. This is evident through the following pieces of code:

this.minecraft.font.draw($ps, ">", ...
this.minecraft.font.draw($ps, "<", ...

Attachments

Comments 3

Because arrows are different between languages? 

Every language has its own rules that it follows. This ranges from spelling words differently, to using different punctuation under certain circumstances. Throughout the game, different languages can have symbols translated differently, therefore leading me to believe that this is a valid internationalization problem.

For example, take the "options.controls" translatable text component which reads "Controls..." in English (US), and "按鍵設定⋯⋯" in Chinese Traditional, Hong Kong. As you can see the periods/full stops used within the Chinese Traditional, Hong Kong translation are completely different from the ones used in the English (US) translation. With this piece of knowledge in mind, some languages may interpret the use of the "<" and ">" characters differently.

The description doesn't appear to match the bug title. We never meant to translate these, as they indicate direction.

Avoma

(Unassigned)

Confirmed

(Unassigned)

1.18.1, 1.18.2 Release Candidate 1

Retrieved