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

UI and i18n Updates #2436

Open
wants to merge 20 commits into
base: dev
Choose a base branch
from
Open

Conversation

itsTheFae
Copy link
Contributor

@itsTheFae itsTheFae commented Nov 9, 2024

  • I have tested my changes against the dev branch (the latest developmental version), and this pull request is targeting that branch as a base
  • I have tested my changes on Python 3.8 or higher
  • I have ensured my code is formatted using Black

Description

The massive UI / i18n PR is here. As usual, there was some scope creep but thanks to the test rig much of it has been tested and seems to be working as expected now.
The short list of changes is thus:

  • Adds setalias command.
  • Adds several dev-only commands for project maintenance.
  • Adds option for Opus audio.
  • Adds option to remove embed footer.
  • Adds options to control message delete delay, with a short and long time.
  • Adds sub-command syntax for permissions.
  • Adds optional new command permissions mode to allow more complicated permissions.
  • Enables MusicBot to generate example options & perms files.
  • Enables MusicBot to generate missing options & perms files.
  • Enables MusicBot to move all writable directories using --write-dir CLI flag.
  • Removes the old, unused .travis.yml file.
  • Rename oauth2 username to avoid conflict with yt-dlp.
  • Replace docstring help with @command_helper decorator.
  • Replace JSON i18n with Gettext, with support for logs and discord.
  • Extend python logger class rather than virtually construct it.
  • Fix CLI arg parsing logic to allow Python 3.13 to launch MusicBot.
  • Extend Response objects from discord.Embed to make UseEmbeds option consistent.
  • Touch nearly every printed string in MusicBot to mark them for translation.
    Please see the ./i18n/readme.md file for more info on how translations work and how to use them.

While this PR removes all the existing ./config/i18n/ files, I have attempted to replace some of the existing translations using Machine Translation from Crowdin primarily.

I'm sure the translations could use some work. I left the crowdin.yml file in this PR as a template for setting up crowdin on the main repository (or forks), following this PR. I think it is a pretty good way to keep track of translations personally and would suggest it be set up on the main repo if maintainers are willing to allow/use it.
I've also included some bundled scripts to hopefully make maintaining translations easier even without the use of an online service.

I hope these changes strike you as sensible and acceptable.

Guides / Documentation

This version of MusicBot is capable of generating portions of the documentation from its source code.
These generated changes as well as many updates to various install guides and sections are in a separate PR.
Please review PR #2437 to see the proposed documentation changes.

Help test this PR

Use the following commands to create a local copy of this PR for testing or contribution:

# fetch the PR reference and make a branch called 'pr2436' for it.
git fetch origin pull/2436/head:pr2436
# checkout the PR branch.
git switch pr2436

Switching back later is simple, git switch dev or your previous target branch. If you made changes you will want to stash or reset before switching branches.

itsTheFae and others added 3 commits November 9, 2024 11:32
Adds setalias command.
Adds several dev-only commands for project maintenance. 
Adds option for Opus audio.
Adds option to remove embed footer.
Adds sub-command syntax for permissions.
Adds optional new permissions management.
Enables MusicBot to generate example config & perms files.
Removes cruft .travis.yml file.
Rename oauth2 username to avoid conflict with yt-dlp.
Replace docstring help with `command_helper` decorator.
Replace JSON i18n with gettext, with support for logs and discord.
Extend python logger class rather than virtually construct it. (this might fix 3.13)
Touch nearly every printed string in MusicBot. :)
This was referenced Nov 10, 2024
@itsTheFae itsTheFae marked this pull request as ready for review November 18, 2024 01:27
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.

2 participants