NeoForge icon indicating copy to clipboard operation
NeoForge copied to clipboard

Show modid and raw display name in mod list entries

Open MattSturgeon opened this issue 4 months ago • 4 comments

Motivation

This PR was inspired by feedback that localised display names can make it hard to identify compatibility issues at a glance from mod-list screenshots.

While that's technically a more fundamental issue with display names, because they can be ambiguous or foreign anyway, translation support certainly has the potential to exacerbate this.

Summary

  • Mod IDs are now displayed alongside version info in the entry's subheading.
  • "Raw" display names (from mods.toml) are shown alongside the localized version if different
  • Formatting is tweaked to (hopefully) make the additional information easy to read at a glance.

Example

Using these test translations while running :tests:runClient renders like this:

Translations

{
  "fml.menu.mods.info.displayname.testframework": "test framework",
  "fml.menu.mods.info.displayname.neotests": "Translation!"
}

image

Further consideration

  • Should the modid still be shown when it is similar to the displayname?
    • "Minecraft" & minecraft
    • "Test Framework" & testframework
    • "Foo Bar" & foo_bar
  • How different should translated display names be to display the raw name?
    • Currently any difference is enough
    • Should we be case insensitive?
    • What about formatting differences?
  • Is modid and version readable enough when on one line?
  • Should we consider making the entry bigger?
    • It's pretty likely that entry lines will get truncated atm...
  • Should we consider rendering the mod's icon in the entry?
    • This could further help to distinguish similarly named mods.

I've tried to keep the changes here minimal. Hopefully they can act as a starting point, so the above considerations and any feedback can be iterated on; either in this PR or in future work.

MattSturgeon avatar Mar 04 '24 16:03 MattSturgeon

  • [ ] Publish PR to GitHub Packages

I don't think this is necessary especially going forward in 1.20.5. What do you think?

Technici4n avatar Apr 24 '24 19:04 Technici4n

I don't think this is necessary especially going forward in 1.20.5. What do you think?

Showing the raw display name certainly isn't if translating the display name is no longer supported.

I think displaying the modid would still be useful though.

Open to feedback on the formatting (etc) though.

MattSturgeon avatar Apr 25 '24 17:04 MattSturgeon

I think displaying the modid would still be useful though.

Agreed. Why not.

Technici4n avatar Apr 25 '24 19:04 Technici4n