Velocity icon indicating copy to clipboard operation
Velocity copied to clipboard

Implement MiniMessage Velocity translations

Open 4drian3d opened this issue 2 years ago • 7 comments

image

resolves https://github.com/PaperMC/Velocity/issues/720

4drian3d avatar Oct 13 '23 03:10 4drian3d

Won't this break existing translations from the lang folder?

powercasgamer avatar Nov 04 '23 20:11 powercasgamer

Won't this break existing translations from the lang folder?

Yes, I was also thinking of integrating a migration once https://github.com/PaperMC/Velocity/pull/1111 is merged

4drian3d avatar Nov 04 '23 21:11 4drian3d

Won't this break existing translations from the lang folder?

Yes, I was also thinking of integrating a migration once #1111 is merged

Implemented a migration to the new format, this pull request is ready for another review

image

4drian3d avatar Jan 11 '24 16:01 4drian3d

This has my approval, and the prerequisite PR has been pulled, just need to figure out what to do regarding crowdin

electronicboy avatar Jan 18 '24 12:01 electronicboy

Only issue I have when testing is that tooltips appear not properly to parse from the messages.properties file properly

R00tB33rMan avatar Apr 16 '24 04:04 R00tB33rMan

Managed to fix it with these changes. Thought this'd help speed up the state of this PR (ignore the messages.properties changes, except for the Plugins: one: image or https://github.com/GemstoneGG/Velocity-CTD/compare/libdeflate%40%7B1day%7D...libdeflate

R00tB33rMan avatar Apr 16 '24 23:04 R00tB33rMan

I just implemented this into my Paper plugin, and noticed that single quotes behave differently using the code in 'VelocityTranslationRegistry' as opposed to using 'TranslationRegistry.create()' directly. Normally, MessageFormat converts double single quotes '' into '. Now, double single quotes are left unchanged, and a single ' gets removed. Not too big of a deal, but I still wanted to share. Can someone verify this? Notable: MessageFormat.toPattern().

Also: ' and '' are used interchangeably in the property files. Nice addition! 👍

SpaceYoshi avatar Aug 17 '24 23:08 SpaceYoshi