Skip to content

Conversation

@4drian3d
Copy link
Contributor

Currently, if you use the <lang> and <lang_or> tags with a custom MiniMessageTranslator with a TagResolver that obtains information from the parsing context, you cannot access the target initially provided when parsing the <lang> tag. This pull request provides support for this.
In addition, a test has been added that provides an example of a real use case for this feature.

Copy link
Member

@kezz kezz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this change not break existing calls with translatables by inserting the "fake" target argument at the start?

@kezz kezz removed this from the 4.26.0 milestone Sep 23, 2025
@4drian3d
Copy link
Contributor Author

Would this change not break existing calls with translatables by inserting the "fake" target argument at the start?

I don't see how it could affect anything. This pull request only modifies the <lang> and <lang_or> tags, where the only arguments it can receive are text. This pull request only inserts a target argument if it is present, and inserts it at the end of the arguments, so it should not change the order or behavior of any previously inserted arguments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants