1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-24 01:09:30 +00:00
Files
Geyser/core
BugTeaON bf53c54e6f Escape curly braces correctly in translation strings; remove default empty translation fallback in the text component (#5559)
* Escape curly braces correctly in translation strings

* Default translation fallback should not appear in the text component

* Only left braces need to be escaped

* Some adjustments

* Move the escapeBraces method to the MessageTranslator class

* Improve code readability

* Use complied static Pattern instead of Pattern.matches

* Improve some code comments

* Use regular expression complelety to escape braces instead of the inefficient, low-readablity escapeBraces method

* Add some tests about escaping curly braces in translatable strings

* Check instance availability to avoid exception during testing
2025-06-08 01:54:08 +02:00
..