MinecraftDev icon indicating copy to clipboard operation
MinecraftDev copied to clipboard

Translations: force json, convert template, default to existing key

Open Moulberry opened this issue 9 months ago • 1 comments

Adds 3 new translation features (I can split into 3 PRs if needed)

  1. Add Force JSON Translation For me (and maybe others), the plugin isn't able to detect the Minecraft version and throws "Cannot determine MC version". This option makes it avoid erroring

  2. Add template for the Convert to Translation feature net.minecraft.client.resources.I18n isn't always desired, this option allows the template string to be changed

  3. Default to existing key when adding duplicate translation text Scans the translation file for an existing key that matches the translation text and suggests it inside the Convert to Translation dialog

Feature 3 only supports json translation files, support for lang files can be added if desired.

Apologies if there are any stylistic issues, I am not a Kotlin developer

Moulberry avatar May 03 '24 09:05 Moulberry

We have already dropped support for new features for MC 1.12, so I don't mind support for lang files being unimplemented.

Earthcomputer avatar May 03 '24 16:05 Earthcomputer

Thank you for your PR.

I rebased and merged it in 336924bed50a7b31ab01929da3477c5742cf9b02 with a change addressing Earth's comment.

RedNesto avatar Jul 07 '24 13:07 RedNesto