Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-formatting parser output #3919

Merged

Conversation

AyhamAl-Ali
Copy link
Member

@AyhamAl-Ali AyhamAl-Ali commented Apr 24, 2021

Description

Making parsing messages when loading/reloading scripts looks better and much easier to read

How it looks

How it looks in-game (outdated)
image
image

How it looks in console (highly depends on the terminal theme used, mine was gray which is eye hurting)
image
image


Target Minecraft Versions:
Requirements:
Related Issues: #3505

Making parsing messages when loading/reloading scripts looks better and much easier to read
@TPGamesNL TPGamesNL added 2.6 enhancement Feature request, an issue about something that could be improved, or a PR improving something. labels Apr 25, 2021
Copy link
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice PR! Just a few minor things.

src/main/resources/lang/english.lang Outdated Show resolved Hide resolved
src/main/resources/lang/german.lang Outdated Show resolved Hide resolved
src/main/resources/lang/korean.lang Outdated Show resolved Hide resolved
@AyhamAl-Ali AyhamAl-Ali changed the title Re-formatting parsing output Re-formatting parser output Jun 26, 2021
Copy link
Member

@Moderocky Moderocky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, this may already be possible (let me know if it is) but I'd like users to be able to change the colour codes of the message - some of the red and grey text may be difficult for some users to read, and they may want to change it to a more visible colour.

I know it's possible in the english.lang file to edit this, but I think this file is not easily accessible to the user.

@AyhamAl-Ali
Copy link
Member Author

Hello, this may already be possible (let me know if it is) but I'd like users to be able to change the colour codes of the message - some of the red and grey text may be difficult for some users to read, and they may want to change it to a more visible colour.

I know it's possible in the english.lang file to edit this, but I think this file is not easily accessible to the user.

As discussed on discord,
this is already possible as you stated in the language files and adding something like main color, secondary color, error color, etc. to config.sk could be nice but is just a whole new project to work on.

I would also suggest improve updating language files by users since that is what it should be.

@Moderocky
Copy link
Member

I would also suggest improve updating language files by users since that is what it should be.
On the proviso that it's possible and we can look into making lang file edits more convenient I'm happy to pass this.

Copy link
Member

@Moderocky Moderocky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@Pikachu920
Copy link
Member

Hello, this may already be possible (let me know if it is) but I'd like users to be able to change the colour codes of the message - some of the red and grey text may be difficult for some users to read, and they may want to change it to a more visible colour.
I know it's possible in the english.lang file to edit this, but I think this file is not easily accessible to the user.

As discussed on discord, this is already possible as you stated in the language files and adding something like main color, secondary color, error color, etc. to config.sk could be nice but is just a whole new project to work on.

I would also suggest improve updating language files by users since that is what it should be.

I agree that adding a bunch of config options would be too much, but I wonder if it would be worthwhile to just add a single red-green colorblind: option to the config, and then adding an accessible mode to the lang file. That way, strings stay in the lang file but it's still easy for disabled users to configure.

@Moderocky
Copy link
Member

I agree that adding a bunch of config options would be too much, but I wonder if it would be worthwhile to just add a single red-green colorblind: option to the config, and then adding an accessible mode to the lang file. That way, strings stay in the lang file but it's still easy for disabled users to configure.

This might be nice, but I think ought to be its own PR and apply to all Skript system messages.

@APickledWalrus
Copy link
Member

I agree that adding a bunch of config options would be too much, but I wonder if it would be worthwhile to just add a single red-green colorblind: option to the config, and then adding an accessible mode to the lang file. That way, strings stay in the lang file but it's still easy for disabled users to configure.

This could be a good option so users don't necessarily have to edit the lang files. However, I think it would also be a good idea to be able to reload the lang files in game so users can customize in that manner. We include lang files by default now after the overhaul by TP, so I think reloading would be the next best step.

Thanks to @TPGamesNL for SkriptCommand.java changes
src/main/java/ch/njol/skript/SkriptCommand.java Outdated Show resolved Hide resolved
src/main/java/ch/njol/skript/log/LogEntry.java Outdated Show resolved Hide resolved
src/main/java/ch/njol/skript/log/LogEntry.java Outdated Show resolved Hide resolved
src/main/java/ch/njol/skript/log/LogEntry.java Outdated Show resolved Hide resolved
src/main/java/ch/njol/skript/log/LogEntry.java Outdated Show resolved Hide resolved
@AyhamAl-Ali
Copy link
Member Author

All requested changes have been done.

Could you look into the possibility of escaping chat codes & colour codes if they come from within the scripts? Like if you use this eff doesnt exist <yellow> stuff it doesn't format the <yellow> as the colour (same with &e and §e). Not really needed but would be nice.

I really agree on this and I have added a support for that but if there are any notes/suggestions about how I did it let me know.

@TPGamesNL TPGamesNL merged commit 22f3b19 into SkriptLang:master Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants