FragSoc / esports-bot

A Discord bot utilising Discord.py to provide functionality for UoY Esports game hubs
GNU Affero General Public License v3.0
2 stars 2 forks source link

User-facing strings should be centralised into a single data file #41

Open Laura7089 opened 3 years ago

Laura7089 commented 3 years ago

At the moment, strings which are sent by the bot to users are typically defined inline in the code. Moving these out of the source files and into their own data file allows us to standardise grammar, spelling, emoji use, etc etc. much more conveniently.

Strings which require data inserting into them should comply with python's string format spec and should use keyword arguments to show what should be passed to the .format() method.

Strings within the file should be grouped by global/cog scoping to allow more concise access.

The relevant section from the file should be loaded and cached upon loading of each cog.

Location and format of file to be decided at a later date.

Laura7089 commented 3 years ago

See #43 and #42

Laura7089 commented 3 years ago

See this comment: https://github.com/FragSoc/esports-bot/pull/71#issuecomment-851031215

Laura7089 commented 3 years ago

Doing this also makes translation and localisation steps easier by far.