FabricMC / kotlin-fabric-discord-bot

The discord bot previously used in the fabric discord server.
MIT License
5 stars 7 forks source link

Tag translations #39

Open Dolphin2Point1 opened 3 years ago

Dolphin2Point1 commented 3 years ago

(I chose here and not on the community github because this is where tags are read) Many people who come onto fabricord for help with mods or modding don't know English or have trouble understanding English. It would be much easier to give them help if we could have translations of tags that allow us to send tags in other languages, such as French, or Spanish.

Technici4n commented 3 years ago

https://www.deepl.com/translator

Is this not good enough for most purposes? (Just asking)

YTG1234 commented 3 years ago

https://www.deepl.com/translator

Is this not good enough for most purposes? (Just asking)

Yes, it should be good enough for most purposes IMO. But it only supports a small subset of the existing languages (the ones it does support are probably the most common, but still).


Proposal for Translation Functionality Within Fabric Bot

The bot would be able to dynamically query translations of tags. See below for more info.

Storage

Every tag can have any amount of translations, those being files in the same directory (in the community repo) with their names ending with $<language code here>.
If there is no $ after the tag name, it is assumed to be en_us.

For example, there exists the guide/logs tag. Its file name in the community repo is tags/guide/logs.ytag. If we were to make a French translation, the resulting file name would be tags/guide/logs$fr_fr.ytag.

$ character?

Of course, we can use any special character that will not normally be used in tag names, I just chose $ because it's valid on Windows (: and | aren't).

Use

When searching tags (i.e. tag search <tagname>), translated tags would be treated specially and will not be search-able. However, when using tag show <tagname>, the bot should list all available translations, preferably with human-readable language names (e.g. United Kingdom English).

As for using the tags, I have multiple ideas.

  1. Use the literal tag name (??guide/logs$fr_fr or another special character)
  2. Use the : character when calling (??guide/logs:fr_fr will call the guide/logs$fr_fr tag)
  3. Use lang:tag (??fr_fr:guide/logs). This is a nice format that Fabric Wiki uses to translate, and I personally like this idea the most.

These options will have to:

Is this even necessary?

There have been enough cases of language barrier-related things occurring that this issue has even been opened in the first place. So IMO, yes.

btw I'm sorry for the huge email you probably received. I'm just like that.

i509VCB commented 3 years ago

One question I have is there a way to detect the user's preferred user language? Also typically people will be spawning a tag in response to someone, so I feel using the tracked locale of the sender may not be suitable.

Obviously we could have a command to determine what is usable.

With the amount of tags we have, something like crowdin may be necessary to translate a large quantity of the tags efficiently.