Fetchr

Fetchr

556 Downloads

Untranslatable strings

NeunEinser opened this issue ยท 7 comments

commented
  • [player] joined [color] team
  • Pregen chat messages ("Preparing Spawm...", "Loading Terrain")
commented

Oh, I've found the More setting coming soon sign in code:

execute at @e[type=minecraft:area_effect_cloud, tag=bingo.sign_settings_more_coming, limit=1] run setblock ~ ~ ~ minecraft:warped_wall_sign[facing=south]{Text2: '{"text":"More Settings", "bold":true, "color":"#8eedeb", "clickEvent":{"action":"run_command", "value": "/tellraw @s [{\\"text\\": \\"Do you want to change future settings? \\"}, {\\"text\\": \\"[Yes]\\", \\"color\\": \\"green\\", \\"clickEvent\\": {\\"action\\": \\"run_command\\", \\"value\\": \\"/tellraw @s {\\\\\\"text\\\\\\":\\\\\\"Error accessing the future. Please talk to your local time machine operator.\\\\\\", \\\\\\"obfuscated\\\\\\": true}\\"}}, {\\"text\\": \\" [No]\\", \\"color\\": \\"red\\", \\"clickEvent\\": {\\"action\\": \\"run_command\\", \\"value\\": \\"/tellraw @s {\\\\\\"text\\\\\\":\\\\\\"Good decision. Who knows, maybe these settings are awful.\\\\\\"}\\"}}]"}}', Text3:'{"text":"Coming Soon", "bold":true, "color":"#8eedeb"}'}

commented

My suggestion for change:

  1. Add translation for each team display name like (example for blue):
    "bingo.team_name.blue" : "Blue Team"

  2. Add translation for team joining:
    "bingo.lobby.team_join" : "%s joined the %s"

I think I'd prefer a separate string for each team join message (e.g. %s joined the blue team.). Usually stuff like this is better for languages were words change depending on context, so I like to stick to more specific strings as much as possible.

*also - the title of the issue should be "Untranslated strings", cause they ARE translatable ;)

Not sure how you mean it, but no they are not translatable. It is impossible to change them through language json files. An untranslated string would be a string missing from e.g. de_de.json (but present in en_us.json).

Oh, I've found the More setting coming soon sign in code:

Yeah not sure about this one. I originally planned to implement them before a 5.0 full release, so this sign was never meant to be there for long. But I guess by now it'd make sense to add that as well.

commented

Ok, now I see what you meant here - that we cannot translate them to other languages, cause they are hardcoded right now
And previously I understood the untranslatable as those, which we cannot even translate through lang-identifiers

I fail to see the difference between the two statements. You cannot translate them through lang identifiers, that is true for these hardcoded texts - because they are hardcoded ๐Ÿ˜‰

commented

I think I'd prefer a separate string for each team join message (...) this is better for languages were words change depending on context

Oh yeah sure

It is impossible to change them through language json files. An untranslated string would be a string missing from e.g. de_de.json (but present in en_us.json).

Ok, now I see what you meant here - that we cannot translate them to other languages, cause they are hardcoded right now
And previously I understood the untranslatable as those, which we cannot even translate through lang-identifiers

commented

Also, that's probably the best RegEx for search stripping to search for tellraw command that doesn't use translate
(assuming that entire command is translatable correctly when translate is used):
The RegEx: /tellraw(?!.*translate).*/

Summarizing - lines with hardcoded text, that should be translatable (added to lang-files):

  • "Preparing spawn..."
    execute if score $game_state bingo.state matches 1 run tellraw @a "Preparing Spawn..."
  • "Loading terrain"
  • "GO!"
  • sign: "More setting coming soon..." + click_events
    execute at @e[type=minecraft:area_effect_cloud, tag=bingo.sign_settings_more_coming, limit=1] run setblock ~ ~ ~ minecraft:warped_wall_sign[facing=south]{Text2: '{"text":"More Settings", "bold":true, "color":"#8eedeb", "clickEvent":{"action":"run_command", "value": "/tellraw @s [{\\"text\\": \\"Do you want to change future settings? \\"}, {\\"text\\": \\"[Yes]\\", \\"color\\": \\"green\\", \\"clickEvent\\": {\\"action\\": \\"run_command\\", \\"value\\": \\"/tellraw @s {\\\\\\"text\\\\\\":\\\\\\"Error accessing the future. Please talk to your local time machine operator.\\\\\\", \\\\\\"obfuscated\\\\\\": true}\\"}}, {\\"text\\": \\" [No]\\", \\"color\\": \\"red\\", \\"clickEvent\\": {\\"action\\": \\"run_command\\", \\"value\\": \\"/tellraw @s {\\\\\\"text\\\\\\":\\\\\\"Good decision. Who knows, maybe these settings are awful.\\\\\\"}\\"}}]"}}', Text3:'{"text":"Coming Soon", "bold":true, "color":"#8eedeb"}'}
  • "[ERROR] Could not find categories [...] of item [...]"
    execute if score $init/find_cat.category_exists bingo.tmp matches 0 if data storage tmp.bingo:init itemCategories[0] run tellraw @a [{"text": "[ERROR] Could not find categories [", "color": "red"}, {"storage": "tmp.bingo:init", "nbt": "itemCategories[]"}, "] of item ", {"storage": "tmp.bingo:init", "nbt": "items[-1].id"}]
commented

Team joining

Currently in command blocks (behind team-selection-button-wall):
tellraw @a ["", {"selector": "@p"}, " joined the blue team"]

My suggestion for change:

  1. Add translation for each team display name like (example for blue):
    "bingo.team_name.blue" : "Blue Team"
  2. Add translation for team joining:
    "bingo.lobby.team_join" : "%s joined the %s"
  3. Update command blocks with (example for blue):
    tellraw @a {"translate":"bingo.lobby.team_join","with":[{"selector":"@p"},{"translate":"bingo.team_name.blue"}]}
    *can add additional coloring for the team name:
    tellraw @a {"translate":"bingo.lobby.team_join","with":[{"selector":"@p"},{"translate":"bingo.team_name.blue","color":"blue"}]}

Pregen messages

Add translations for those lines:

*also - the title of the issue should be "Untranslated strings", cause they ARE translatable ;)

commented

One more untranslated text: