Repository navigation
Conversation
|
Not sure why you made this PR without discussing it on the discord server first. |
|
it's probably worth taking a look at some of the comments on previous PRs about this topic :) -- #2241 i went into the design of the current translation system there, rather than adding an extra system on top. although, as there's a transition from Text3 -> Adventure currently taking place, it might not be the best time to actually make this change |
This is just an example of what could be done. No one is forcing developers or other users to touch error translations; error logging for user output can be done in the /logs/ folder, and error messages can be made formattable, since the plugin is used not only by an English‑speaking audience. You’re right about Crowdin — it’s possible to create translations for many languages around the world to simplify working with the plugin. But this doesn’t change the fact that it actually works and will be useful to many users, since I’ve noticed over the years that people fork the plugin just to translate a few lines that need to be found in hundreds of lines of code, and many of these people do it following guides from YouTube. Based on what was described above, for the Russian‑speaking audience of plugin users, this fork simplifies the customization of messages and translation, since the plugin doesn’t even support HEX and many other types of formatting — which would be very useful compared to other plugins that already include these features “out of the box,” even though WorldGuard is one of the oldest server plugins. |
I wouldn’t recommend interacting with users like BlackMinecraft, who sell nulled plugins for a Russian‑speaking audience on their website, lol. |
I'm not familiar with who the author of that PR is, I was just referencing the comments in that PR which detail how the current translation system should be extended, rather than being replaced with a second system |
|
By the way, I’ve read a few threads about this and I can skip translating the error messages in order to maintain support for WorldGuard. |
Thank you for your feedback. I’ll keep an eye on the updates, but until such features are added, I’ll continue developing the fork. |
Add a messages.yml generated on first startup with English defaults and an optional Russian translation. All player-facing command, protection, region UI, flag, and listener messages can now be changed without editing code. Add legacy ampersand and HEX color support, including region greeting, farewell, deny, and teleport messages. Reload messages with /wg reload. Includes unit tests for color parsing, placeholders, and message file creation.
6bf6824 to
b79d07b
Compare
|
I feel you misunderstood sorry, that feature already exists. It's just not used for any text currently because it hasn't made sense for us to spend time to widen usage of Text3 within WorldGuard, when Adventure is replacing it soonish (and it has some compatibility quirks). If you are adding translations, it should be done with that system. |
OK, I see |
Summary
This PR adds a configurable messages.yml for all player-facing WorldGuard messages.
WorldGuard currently keeps most player-facing strings in Java code. Server owners cannot translate or customize them without rebuilding the plugin. This PR introduces a message manager that loads defaults from the jar, creates a user-editable file on first startup, and reloads it with
/wg reload.What changed
com.sk89q.worldguard.util.Messages, which:plugins/WorldGuard/messages.ymlon first startup;{player},{region}, and{prefix};/wg reload.messages.ymland optional Russianmessages_ru.ymlresources.&c), HEX support (&#ffaa00), Spigot HEX support (&x&f&f&a&a&0&0), and serialized section code support.Behavior
prefixto an empty string to disable the prefix.Testing
./gradlew :worldguard-core:test./gradlew :worldguard-core:check :worldguard-bukkit:checkversion/7.0.xbranch with Java 25 and Gradle 9.6.1.Notes
This is a large feature and touches many message call sites. I am happy to split it into smaller PRs if preferred, for example:
Happy to adjust the design or scope based on maintainer feedback.