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

Use user strings file with event categories cog #71

Merged
merged 5 commits into from
May 30, 2021

Conversation

Laura7089
Copy link
Member

Closes #52.

Not yet ready for release, posting here to gather comments about admin logs among other things.

@Laura7089 Laura7089 changed the title Feat/event categores cog strings Use user strings file with event categories cog May 30, 2021
Copy link
Contributor

@Trimatix Trimatix left a comment

Choose a reason for hiding this comment

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

wow you werent kidding, that was a lot of strings, thank you 😂
just a couple of typos to fix in there and then its ready to go!

src/esportsbot/cogs/EventCategoriesCog.py Outdated Show resolved Hide resolved
src/esportsbot/cogs/EventCategoriesCog.py Outdated Show resolved Hide resolved
src/esportsbot/cogs/EventCategoriesCog.py Outdated Show resolved Hide resolved
src/esportsbot/cogs/EventCategoriesCog.py Outdated Show resolved Hide resolved
@Laura7089
Copy link
Member Author

Laura7089 commented May 30, 2021

Fixed all the above, there's a lot to keep track of with all the strings so mistakes slipped through!

I haven't added the admin logs yet, and intend to. Also, the logic for generating the loading text is a little complex and heavyweight for inserting into the toml file - can that be simplified with some clever format tricks to anyone's knowledge? If not, we can just split them up and build them in the code.

Edit: do we also want the command help messages to go into the file? They're user-facing messages and do match up with the error messages that are already in there...

@Laura7089
Copy link
Member Author

There, admin messages added, with a missed message. The implementation isn't very pretty, but it will do for now, I hope.

In the future, we could consider grouping the related messages into submaps within the toml file and then pulling them in in cog constructors separately.

@Laura7089 Laura7089 requested a review from Trimatix May 30, 2021 18:17
@Trimatix
Copy link
Contributor

Trimatix commented May 30, 2021

do we also want the command help messages to go into the file? They're user-facing messages and do match up with the error messages that are already in there...

love this idea but user strings would have to be accessible at module import time - right now they're only accessible at cog instance time

@Laura7089
Copy link
Member Author

love this idea but user strings would have to be accessible at module import time - right now they're only accessible at cog instance time

Gotcha. I thought that might be the case, which is why I didn't replace them. That sucks - I'll open a tracking issue which we might get around to eventually.

@Laura7089 Laura7089 merged commit 4cd7973 into develop May 30, 2021
@Fluxticks Fluxticks deleted the feat/EventCategoresCogStrings branch August 31, 2021 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move user facing strings from EventCategoriesCog into user_strings.toml
3 participants