minecraft-dev / MinecraftDev

Plugin for IntelliJ IDEA that gives special support for Minecraft modding projects.
https://minecraftdev.org/
GNU Lesser General Public License v3.0
1.5k stars 185 forks source link

I18n support stopped working #2173

Closed phoenix-the-uncreative closed 3 months ago

phoenix-the-uncreative commented 10 months ago

Minecraft Development for IntelliJ plugin version

1.6.11

IntelliJ version

2023.2.5

Operating System

Windows 11

Target platform

Minecraft Forge

Description of the bug

Previously, when I called to I18n#format, the plugin would notify me if I used a key that does not exist and I could easily add it to the language file from the context menu.

Since 1.6.11, this doesn't work: I can't go to existing keys with ctrl+click, calls to I18n#format are no longer folded into the English translation and I can only create new keys when I write a string and manually select it to use the context menu action "Convert string literal to translation".

I've rolled back to 1.6.10 and it works again.

RedNesto commented 10 months ago

We changed how I18n methods are identified by the plugin, it now uses a custom annotation and we use external annotations to attach it to existing known classes, looks like some were missed during the migration.

If someone wishes to contribute missing methods here is an example

You can add them locally in your project too using the appropriate intention in the editor.

Earthcomputer commented 10 months ago

You didn't specify which Minecraft version you were using, but I didn't include MCP mappings during the migration, so it might be that.

phoenix-the-uncreative commented 10 months ago

You didn't specify which Minecraft version you were using, but I didn't include MCP mappings during the migration, so it might be that.

That might be it, yeah. I'm using 1.16.5 with MCP mappings.

phoenix-the-uncreative commented 9 months ago

I added the annotations myself, #2197