DragonetMC / DragonProxy-Translations

Translations for DragonProxy.
http://dragonet.org
6 stars 10 forks source link

YAML #22

Open lukeeey opened 6 years ago

lukeeey commented 6 years ago

I think we should move to YAML for language files. This allows for a few things:

e.g. error_cls_login_failed could be changed to

error:
  cls:
    login_failed: 'something'

Now i think back on what i wrote and im pretty sure im contradicting myself but oh well lets decide together

lukeeey commented 6 years ago

We should also stop using escape codes and instead use the section symbol § or ampersand & followed by the specific integer for the desired colour

DefinitlyEvil commented 6 years ago

@lukeeey using escape codes is more safer

lukeeey commented 6 years ago

@DefinitlyEvil How? All we do is make a function in DP to replace the § or & (the latter being a sater option) with \u00a7.

This allows for cleaner translation strings which makes it easier for other people to read, edit and contribute.

We could litterally do it with this code:

// *some function to read the text from the file*
text = text.replace("&" , "\u00a7");

So &3 would become \u00a73 and so on.

DefinitlyEvil commented 6 years ago

@lukeeey using & is better because unicode encoding can sometimes be faqued up

lukeeey commented 6 years ago

@DefinitlyEvil Yeah ik i will make an example of a possible change in the new-translation-system branch.

For DragonProxy related APIs, do you think the URL could be dp.dragonet.org or proxy.dragonet.org ?.

For example lang.dp.dragonet.org/languages.json

ApocalypsjeNL commented 6 years ago

Why not make it api.dragonet.org/proxy/lang/languages.json (or api.dragonet.org/dragonproxy/lang/languages.json)

lukeeey commented 6 years ago

@ApocalypsjeNL I was planning on adding a CNAME to this repository, but i dont mind writing an entire API for DragonProxy

DefinitlyEvil commented 6 years ago

@lukeeey hosting on Github is better, in case of our server going down.

lukeeey commented 6 years ago

We can do some stuff on our server but languages can be on github at least. And we are gonna need the language repository online constantly since i will add a way to download languages from DragonProxy by doing something like

java -jar dragonproxy.jar install-language de_DE