replaceitem / symbol-chat

Add many symbols supported by minecraft into the chat.
https://modrinth.com/mod/symbol-chat
MIT License
22 stars 12 forks source link

[Feature Request] Localized character names #29

Open Felix14-v2 opened 1 year ago

Felix14-v2 commented 1 year ago

Description

Currently, the names of the characters in the hints are presented only in English, which makes it very difficult to use the search in different languages.

Solution

I found a database with translations of almost every Unicode character, owned by unicode-table.com (aka symbl.cc). Their license allows us to freely use their work without any restrictions, which gives us a huge potential, up to the displaying localized descriptions of each unicode character in the tooltip! (although it is much easier to implement opening a website page with a symbol by right-clicking on it)

Possible Issues

  1. Their database is HUGE. So, it would be too expensive to put all this information in a mod file. Perhaps it makes sense to cache the necessary part of the data automatically, depending on the interface language, or let the user do it on their own in the mod settings.
  2. Currently there are translations for 15 languages (except English). This is a lot, if we talk about the scale of the work done. But still not enough for Minecraft. This situation can be improved with the Language Reload mod, which adds fallbacks for languages. There may be other solutions, but so far I haven't come up with anything better.
AlphaLeoli commented 1 month ago

or put them in a lang file so we can customize them how we want

Felix14-v2 commented 1 month ago

Lang file isn't an option, Sympbol Chat pools the names directly from the Unicode table, I think. But yes, adding a fallback for translation is a good idea, so that we can create translation packs

replaceitem commented 1 month ago

Yea i imagine a lang file would eat a lot of memory/disk space. Having each translation have a redundant key like symbol-chat.symbol.[hex code] for example. The currently used english names provided by the jdk are stored more efficiently, so i would also want to have that be the case for translations. I will have to look into that at some point. I could add lang file support only for customizability without providing translations built in just for those who want to customize their cusomized symbols, as a temporary solution. For a proper solution i want it to not be more work than downloading a file that has translations for all/most symbols.

Felix14-v2 commented 1 month ago

I could add lang file support only for customizability without providing translations built in

That sounds like a good compromise. What about descriptions? Ideally, it would be very convenient to take into account the descriptions from a resource pack when searching for symbols, as this greatly simplifies the search usage and increases relevance.

replaceitem commented 1 month ago

Ideally when i include translations at some point, i use data that includes aliases or some data for better searching, yeah.