guweb
guweb copied to clipboard
i18n, redesign, admin panel
This pull request includes several key features to improve user experience and add more features.
Features:
- Internationalization (i18n)
- User management with a more populated table
- Beatmap management (currently requires the user to have an API key, but we are open to better ideas)
- ~~Score uploads (pending merge of https://github.com/osuAkatsuki/bancho.py/pull/281)~~ removed from codebase
Visual changes:
- Removing the admin side panel in favor of a top bar
- subtle animations
- language switcher
Fixes:
- Fixing a dangerous API key injection:
<script>
window.api_key = {{ session.user_data['api_key'] | JSON }} // it was really scary!
</script>
i18n
requires node during development, we recommend using vscode for developing translation for better tooling, you will be prompted to install recommended plugins when you open the repository for the first time. we will update the readme later to include the tutorial on managing translations.
steps
- make sure you have node and yarn installed.
- run
yarn
- create config.js from config.sample.js
- run yarn i18n:build
- you are good to go.
Sorry for creating a pull request this large 👩🦼
dude WHATTTTTTTTTTTTTT
afaik guweb 2.0 is already being worked on tho
Also I think it would make more sense to upgrade guweb to api v2 if you're already doing api stuff, api v1 is deprecated and that's why /submit_score won't be merged
you might wanna delete this folder?
I also see stuff like this that should not be defaulted to chinese I guess
I think you should get rid of everything that says "gulag" instead of renaming stuff to gulag
tbh I think this PR is too big to get merged as a whole, you should trim stuff down, like redesigning stuff, making QOL changes, implementing yarn etc.
give this man some TRUE
tbh I think this PR is too big to get merged as a whole, you should trim stuff down, like redesigning stuff, making QOL changes, implementing yarn etc.
I should check the 'draft' when I created this pr.
we made these changes through out the months, simultaneously, so it's really hard to separate one changes with another.
Let's focus on addressing any problems inside the code we should fix. Then we could try to create separate pull requests in order to merge them.
you might wanna delete this folder?
I think it's better to have translations for any private server that willing to contribute leaving their translations in the repository . you'll never know when it's needed.
I also see stuff like this that should not be defaulted to chinese I guess
@app.template_global()
def t(key, **kwargs) -> str:
kwargs["locale"] = session.get("lang", config.default_locale)
it looks like this now, please check out the latest code
you might wanna delete this folder?
I think it's better to have translations for any private server that willing to contribute leaving their translations in the repository . you'll never know when it's needed.
I don't really understand what the folder is for, maybe give it a more clarifying name
you might wanna delete this folder?
I think it's better to have translations for any private server that willing to contribute leaving their translations in the repository . you'll never know when it's needed.
I don't really understand what the folder is for, maybe give it a more clarifying name
it's our translation on top of the default translation. Do you have any suggestions on what we should rename it?
you might wanna delete this folder?
I think it's better to have translations for any private server that willing to contribute leaving their translations in the repository . you'll never know when it's needed.
I don't really understand what the folder is for, maybe give it a more clarifying name
it's our translation on top of the default translation. Do you have any suggestions on what we should rename it?
Oh I see, so if you modify the frontend and add your own texts you put them in there? Why not edit the normal files instead?
you might wanna delete this folder?
I think it's better to have translations for any private server that willing to contribute leaving their translations in the repository . you'll never know when it's needed.
I don't really understand what the folder is for, maybe give it a more clarifying name
it's our translation on top of the default translation. Do you have any suggestions on what we should rename it?
Oh I see, so if you modify the frontend and add your own texts you put them in there? Why not edit the normal files instead?
so that we all private server enjoyers could share our translation, rather than copy pasting them. the yarn i18n:build
command will merge all layers in to one based on config.js
for guweb to use.
you might wanna delete this folder?
I think it's better to have translations for any private server that willing to contribute leaving their translations in the repository . you'll never know when it's needed.
I don't really understand what the folder is for, maybe give it a more clarifying name
it's our translation on top of the default translation. Do you have any suggestions on what we should rename it?
Oh I see, so if you modify the frontend and add your own texts you put them in there? Why not edit the normal files instead?
so that we all private server enjoyers could share our translation, rather than copy pasting them
I don't quite get what you mean. If you need to change the translation of something, you can do so in the normal language files. I feel like it's too hard to understand what your mission with that extra stuff is, users might just ignore it
you might wanna delete this folder?
I think it's better to have translations for any private server that willing to contribute leaving their translations in the repository . you'll never know when it's needed.
I don't really understand what the folder is for, maybe give it a more clarifying name
it's our translation on top of the default translation. Do you have any suggestions on what we should rename it?
Oh I see, so if you modify the frontend and add your own texts you put them in there? Why not edit the normal files instead?
so that we all private server enjoyers could share our translation, rather than copy pasting them
I don't quite get what you mean. If you need to change the translation of something, you can do so in the normal language files. I feel like it's too hard to understand what your mission with that extra stuff is, users might just ignore it
it's like your system's language setting (language packs), you can have more than one and you order them the way you like.
Leave this poor folder alone, it's just need to be renamed
You can keep the upload score stuff in, it's just that the endpoint will only be implemented in api v2
I think we accidentally formatted the whole repo in double quotes. what formatter are you using to enforce quotes? I found no formatter with configurable quotes
You can keep the upload score stuff in, it's just that the endpoint will only be implemented in api v2
y don't worry we have it in other branch. I am planning to get this merged before v2 landed so that both of us won't have to adapt it separately before merging ✌️
You can keep the upload score stuff in, it's just that the endpoint will only be implemented in api v2
y don't worry we have it in other branch. I am planning to get this merged before v2 landed so that both of us won't have to adapt it separately before merging ✌️
API V2 is already partly done, also I don't think this will be merged anytime soon, yet before API v2 is done
Hi, I fixed most problems you mentioned