Skip to content
This repository has been archived by the owner on Aug 3, 2019. It is now read-only.

YAML #22

Open
lukeeey opened this issue Feb 17, 2018 · 9 comments
Open

YAML #22

lukeeey opened this issue Feb 17, 2018 · 9 comments
Labels

Comments

@lukeeey
Copy link
Member

lukeeey commented Feb 17, 2018

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

  • Syntax Highlighting
    This can greatly improve readability in both an IDE and on Github itself.

  • Nested Keys
    This also helps readability, and can reduce key name length. We could also iterate through each nested key if we wanted but im not sure where we would use that.

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 lukeeey added the RFC label Feb 17, 2018
@lukeeey
Copy link
Member Author

lukeeey commented Feb 17, 2018

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
Copy link
Member

@lukeeey using escape codes is more safer

@lukeeey
Copy link
Member Author

lukeeey commented Feb 18, 2018

@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
Copy link
Member

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

@lukeeey
Copy link
Member Author

lukeeey commented Feb 18, 2018

@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
Copy link

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

@lukeeey
Copy link
Member Author

lukeeey commented Feb 18, 2018

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

@DefinitlyEvil
Copy link
Member

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

@lukeeey
Copy link
Member Author

lukeeey commented Feb 19, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants