NeoForge icon indicating copy to clipboard operation
NeoForge copied to clipboard

New translation format system (converting json patches)

Open HenryLoenwind opened this issue 1 year ago • 5 comments

Here's a variation of #1470 where the extensive patches of #1134 have almost completely been removed. Instead, "array json" is processed by a plugin registered to the new format registry. All that remains of those patches is one that adds the InsertingContent to the codec and one that preserves the json from the language file for later processing.

That "string json" is available with this is now a mere side effect. The main purpose is (a) to allow mods to register whatever format they want and (b) reduce the extensive and intrusive patches.

HenryLoenwind avatar Aug 26 '24 21:08 HenryLoenwind

  • [ ] Publish PR to GitHub Packages

net/neoforged/neoforge/common/util/InsertingContents

  • pushTranslation(Lnet/minecraft/network/chat/contents/TranslatableContents;)Z: ⚠ API method was removed
  • popTranslation()V: ⚠ API method was removed

image

image

Um? Internal?

HenryLoenwind avatar Aug 26 '24 22:08 HenryLoenwind

Those 2 are just warnings, they don't block the PR. The other 2 ones in Language do.

Matyrobbrt avatar Aug 27 '24 07:08 Matyrobbrt

Those 2 are just warnings, they don't block the PR.

Ah, ok.

The other 2 ones in Language do.

Doesn't matter unless this PR gets accepted. I can easily put tose back as bouncer methods...although they should have been marked as internal, too. Them being there and fundamentally changing how the vanilla Language objects work, is one of the reasons I don't like the current patches.

HenryLoenwind avatar Aug 27 '24 16:08 HenryLoenwind

@HenryLoenwind, this pull request has conflicts, please resolve them for this PR to move forward.

@HenryLoenwind, this pull request has conflicts, please resolve them for this PR to move forward.

Given the lack of activity and the need for a rebase, I'll be closing this PR for now. Feel free to open it again after the conflicts are resolved.

Matyrobbrt avatar Apr 19 '25 10:04 Matyrobbrt