Skip to content

Commit

Permalink
style(pre-commit): auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Aug 12, 2024
1 parent f2a1b32 commit 25df98a
Show file tree
Hide file tree
Showing 421 changed files with 105 additions and 509 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
/.github/workflows/docs-localization-download.yml @Pycord-Dvelopment/maintain-translations
/.github/workflows/docs-localization-upload.yml @Pycord-Dvelopment/maintain-translations
/crowdin.yml @Pycord-Dvelopment/maintain-translations
/requirements/_locale.txt @Pycord-Dvelopment/maintain-translations
/requirements/_locale.txt @Pycord-Dvelopment/maintain-translations
94 changes: 49 additions & 45 deletions .github/workflows/docs-localization-download.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,54 @@
name: Multilingual Docs Download

on:
workflow_dispatch:
workflow_dispatch:

jobs:
localizse:
permissions: write-all
name: "Localisize Docs"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Install Python"
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: "requirements/_locale.txt"
- name: "Install Dependencies"
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements/_locale.txt
pip install .[speed,voice,docs]
- name: "Get locales"
run: |
make html
sphinx-build -b gettext . ./build/locales
working-directory: ./docs
- name: "Build locales"
run: sphinx-intl update -p ./build/locales -l de -l ja -l de -l ja -l fr -l it -l hi -l ko -l pt -l es -l zh
working-directory: ./docs
- name: "Crowdin"
uses: crowdin/github-action@v2
with:
upload_sources: false
upload_translations: false
download_translations: false
download_bundle: ${{ secrets.CROWDIN_BUNDLE_ID }}
localization_branch_name: l10n_master
create_pull_request: true
pull_request_title: 'New Crowdin Translations'
pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)'
pull_request_base_branch_name: 'master'
pull_request_reviewers: 'Lulalaby'
config: 'crowdin.yml'
base_path: '.'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
localizse:
permissions: write-all
name: "Localisize Docs"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Install Python"
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: "requirements/_locale.txt"
- name: "Install Dependencies"
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements/_locale.txt
pip install .[speed,voice,docs]
- name: "Get locales"
run: |
make html
sphinx-build -b gettext . ./build/locales
working-directory: ./docs
- name: "Build locales"
run:
sphinx-intl update -p ./build/locales -l de -l ja -l de -l ja -l fr -l it -l
hi -l ko -l pt -l es -l zh
working-directory: ./docs
- name: "Crowdin"
uses: crowdin/github-action@v2
with:
upload_sources: false
upload_translations: false
download_translations: false
download_bundle: ${{ secrets.CROWDIN_BUNDLE_ID }}
localization_branch_name: l10n_master
create_pull_request: true
pull_request_title: "New Crowdin Translations"
pull_request_body:
"New Crowdin translations by [Crowdin GH
Action](https://github.com/crowdin/github-action)"
pull_request_base_branch_name: "master"
pull_request_reviewers: "Lulalaby"
config: "crowdin.yml"
base_path: "."
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
84 changes: 43 additions & 41 deletions .github/workflows/docs-localization-upload.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
name: Multilingual Docs Upload

on:
push:
branches:
- master
push:
branches:
- master

jobs:
localizse:
permissions: write-all
name: "Localisize Docs"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Install Python"
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: "requirements/_locale.txt"
- name: "Install Dependencies"
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements/_locale.txt
pip install .[speed,voice,docs]
- name: "Get locales"
run: |
make html
sphinx-build -b gettext . ./build/locales
working-directory: ./docs
- name: "Build locales"
run: sphinx-intl update -p ./build/locales -l de -l ja -l de -l ja -l fr -l it -l hi -l ko -l pt -l es -l zh
working-directory: ./docs
- name: "Crowdin"
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: false
download_translations: false
localization_branch_name: l10n_master
create_pull_request: false
config: 'crowdin.yml'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
localizse:
permissions: write-all
name: "Localisize Docs"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Install Python"
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: "requirements/_locale.txt"
- name: "Install Dependencies"
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements/_locale.txt
pip install .[speed,voice,docs]
- name: "Get locales"
run: |
make html
sphinx-build -b gettext . ./build/locales
working-directory: ./docs
- name: "Build locales"
run:
sphinx-intl update -p ./build/locales -l de -l ja -l de -l ja -l fr -l it -l
hi -l ko -l pt -l es -l zh
working-directory: ./docs
- name: "Crowdin"
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: false
download_translations: false
localization_branch_name: l10n_master
create_pull_request: false
config: "crowdin.yml"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,4 @@ docs/build/doctrees
*.mo
!docs/locales/*
/build/
/vscode/
/vscode/
4 changes: 2 additions & 2 deletions crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ files:
[
{
source: "**/*.pot",
translation: "/docs/locales/%two_letters_code%/LC_MESSAGES/%original_path%/%file_name%.po"
}
translation: "/docs/locales/%two_letters_code%/LC_MESSAGES/%original_path%/%file_name%.po",
},
]
2 changes: 1 addition & 1 deletion docs/build/locales/api/index.pot
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"

#: ../../api/index.rst:16
#:
#:
msgid "Table of Contents"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions docs/build/locales/index.pot
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ msgstr ""

#: ../../index.rst:56
#: ../../index.rst:60
#:
#:
#: 1ae15d13e49e44768f60bb75339fb69c
msgid "Extensions"
msgstr ""

#: ../../index.rst:76
#: ../../index.rst:80
#:
#:
#: 30bc87e216894f4ca6d37b14ef86b21a
msgid "Meta"
msgstr ""
Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def write_new():

gettext_compact = False
gettext_uuid = True
locale_dirs = ['locales/'] # Added locale directory
locale_dirs = ["locales/"] # Added locale directory

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down Expand Up @@ -378,7 +378,7 @@ def write_new():
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
html_search_language = 'en'
html_search_language = "en"

# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
Expand Down Expand Up @@ -481,7 +481,7 @@ def write_new():
]

modindex_common_prefix = ["discord."]
#suppress_warnings = ['autosectionlabel.*']
# suppress_warnings = ['autosectionlabel.*']
myst_enable_extensions = [
"amsmath",
"attrs_inline",
Expand Down
1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/abcs.po
Original file line number Diff line number Diff line change
Expand Up @@ -682,4 +682,3 @@ msgstr "An ABC that details the common operations on a channel that can connect

msgid "This ABC is not decorated with :func:`typing.runtime_checkable`, so will fail :func:`isinstance`/:func:`issubclass` checks."
msgstr "This ABC is not decorated with :func:`typing.runtime_checkable`, so will fail :func:`isinstance`/:func:`issubclass` checks."

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/application_commands.po
Original file line number Diff line number Diff line change
Expand Up @@ -877,4 +877,3 @@ msgstr "A name to value mapping of the options that the user has selected before

msgid "Dict[:class:`str`, Any]"
msgstr "Dict[:class:`str`, Any]"

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/application_info.po
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,3 @@ msgstr "The membership state of the member (e.g. invited or accepted)"

msgid ":class:`TeamMembershipState`"
msgstr ":class:`TeamMembershipState`"

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/async_iter.po
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,3 @@ msgstr "Getting messages by non-bot accounts: ::"

msgid "The predicate to call on every element. Could be a |coroutine_link|_."
msgstr "The predicate to call on every element. Could be a |coroutine_link|_."

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/audit_logs.po
Original file line number Diff line number Diff line change
Expand Up @@ -499,4 +499,3 @@ msgstr "See also :attr:`VoiceChannel.status`."

msgid "The cover image of a :class:`ScheduledEvent`."
msgstr "The cover image of a :class:`ScheduledEvent`."

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/clients.po
Original file line number Diff line number Diff line change
Expand Up @@ -1573,4 +1573,3 @@ msgstr "This can be useful to know when deciding whether you should query member

msgid "This implementation checks if any of the shards are rate limited. For more granular control, consider :meth:`ShardInfo.is_ws_ratelimited`. :rtype: :sphinx_autodoc_typehints_type:`\\:py\\:class\\:\\`bool\\``"
msgstr "This implementation checks if any of the shards are rate limited. For more granular control, consider :meth:`ShardInfo.is_ws_ratelimited`. :rtype: :sphinx_autodoc_typehints_type:`\\:py\\:class\\:\\`bool\\``"

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/cogs.po
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,3 @@ msgstr "A shortcut to :attr:`.command_attrs`, what ``guild_ids`` should all appl

msgid "Optional[List[:class:`int`]]"
msgstr "Optional[List[:class:`int`]]"

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/data_classes.po
Original file line number Diff line number Diff line change
Expand Up @@ -2893,4 +2893,3 @@ msgstr "The name localizations for this metadata field. The values of this shoul

msgid "The description localizations for this metadata field. The values of this should be ``\"locale\": \"name\"``. See `here <https://discord.com/developers/docs/reference#locales>`_ for a list of valid locales."
msgstr "The description localizations for this metadata field. The values of this should be ``\"locale\": \"name\"``. See `here <https://discord.com/developers/docs/reference#locales>`_ for a list of valid locales."

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/enums.po
Original file line number Diff line number Diff line change
Expand Up @@ -1768,4 +1768,3 @@ msgstr "The interaction is in the bot's own DM channel with the user."

msgid "The interaction is in a private DM or group DM channel."
msgstr "The interaction is in a private DM or group DM channel."

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/events.po
Original file line number Diff line number Diff line change
Expand Up @@ -982,4 +982,3 @@ msgstr "Called when someone updates a voice channels status."

msgid "The raw voice channel status update payload."
msgstr "The raw voice channel status update payload."

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/exceptions.po
Original file line number Diff line number Diff line change
Expand Up @@ -328,4 +328,3 @@ msgstr "Exception thrown when an exception occurs with :class:`MKASink`"

msgid "Exception thrown when an exception occurs with :class:`OGGSink`"
msgstr "Exception thrown when an exception occurs with :class:`OGGSink`"

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/index.po
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ msgstr "The following section outlines the API of Pycord."

msgid "This module uses the Python logging module to log diagnostic and errors in an output independent way. If the logging module is not configured, these logs will not be output anywhere. See :ref:`logging_setup` for more information on how to set up and use the logging module with Pycord."
msgstr "This module uses the Python logging module to log diagnostic and errors in an output independent way. If the logging module is not configured, these logs will not be output anywhere. See :ref:`logging_setup` for more information on how to set up and use the logging module with Pycord."

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/models.po
Original file line number Diff line number Diff line change
Expand Up @@ -7789,4 +7789,3 @@ msgstr "These are typically given for channel follower webhooks."

msgid "Represents a partial channel for webhooks."
msgstr "Represents a partial channel for webhooks."

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/sinks.po
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,3 @@ msgstr "A special sink for .mka files."

msgid "A special sink for .ogg files."
msgstr "A special sink for .ogg files."

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/ui_kit.po
Original file line number Diff line number Diff line change
Expand Up @@ -532,4 +532,3 @@ msgstr "The maximum number of characters that can be entered."

msgid "The value entered in the text field."
msgstr "The value entered in the text field."

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/utils.po
Original file line number Diff line number Diff line change
Expand Up @@ -478,4 +478,3 @@ msgstr "Whether to use the qualified name of the function in the deprecation war

msgid ":sphinx_autodoc_typehints_type:`\\:py\\:data\\:\\`\\~typing.Callable\\`\\\\ \\\\\\[\\\\\\[\\:py\\:data\\:\\`\\~typing.Callable\\`\\\\ \\\\\\[\\\\\\[\\:py\\:class\\:\\`\\~typing.ParamSpec\\`\\\\ \\\\\\(\\`\\`P\\`\\`\\, bound\\= \\:py\\:obj\\:\\`None\\`\\)\\]\\, \\:py\\:class\\:\\`\\~typing.TypeVar\\`\\\\ \\\\\\(\\`\\`T\\`\\`\\)\\]\\]\\, \\:py\\:data\\:\\`\\~typing.Callable\\`\\\\ \\\\\\[\\\\\\[\\:py\\:class\\:\\`\\~typing.ParamSpec\\`\\\\ \\\\\\(\\`\\`P\\`\\`\\, bound\\= \\:py\\:obj\\:\\`None\\`\\)\\]\\, \\:py\\:class\\:\\`\\~typing.TypeVar\\`\\\\ \\\\\\(\\`\\`T\\`\\`\\)\\]\\]`"
msgstr ":sphinx_autodoc_typehints_type:`\\:py\\:data\\:\\`\\~typing.Callable\\`\\\\ \\\\\\[\\\\\\[\\:py\\:data\\:\\`\\~typing.Callable\\`\\\\ \\\\\\[\\\\\\[\\:py\\:class\\:\\`\\~typing.ParamSpec\\`\\\\ \\\\\\(\\`\\`P\\`\\`\\, bound\\= \\:py\\:obj\\:\\`None\\`\\)\\]\\, \\:py\\:class\\:\\`\\~typing.TypeVar\\`\\\\ \\\\\\(\\`\\`T\\`\\`\\)\\]\\]\\, \\:py\\:data\\:\\`\\~typing.Callable\\`\\\\ \\\\\\[\\\\\\[\\:py\\:class\\:\\`\\~typing.ParamSpec\\`\\\\ \\\\\\(\\`\\`P\\`\\`\\, bound\\= \\:py\\:obj\\:\\`None\\`\\)\\]\\, \\:py\\:class\\:\\`\\~typing.TypeVar\\`\\\\ \\\\\\(\\`\\`T\\`\\`\\)\\]\\]`"

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/version_info.po
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ msgstr "Just like :obj:`py:sys.version_info` the valid values for ``releaselevel

msgid "A string representation of the version. e.g. ``'1.0.0rc1'``. This is based off of :pep:`440`."
msgstr "A string representation of the version. e.g. ``'1.0.0rc1'``. This is based off of :pep:`440`."

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/voice.po
Original file line number Diff line number Diff line change
Expand Up @@ -502,4 +502,3 @@ msgstr "Indicates if the opus library has been loaded."

msgid ":class:`bool`"
msgstr ":class:`bool`"

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/api/webhooks.po
Original file line number Diff line number Diff line change
Expand Up @@ -550,4 +550,3 @@ msgstr ":class:`SyncWebhookMessage`"

msgid "If provided, the number of seconds to wait before deleting the message. This blocks the thread."
msgstr "If provided, the number of seconds to wait before deleting the message. This blocks the thread."

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/changelog.po
Original file line number Diff line number Diff line change
Expand Up @@ -1099,4 +1099,3 @@ msgstr "Older Versions"

msgid "A changelog for versions prior to v2.0 can be found [here](old_changelog.rst)."
msgstr "A changelog for versions prior to v2.0 can be found [here](old_changelog.rst)."

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/cogs.po
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,3 @@ msgstr "Using Cogs"

msgid "Just as we remove a cog by its name, we can also retrieve it by its name as well. This allows us to use a cog as an inter-command communication protocol to share data. For example:"
msgstr "Just as we remove a cog by its name, we can also retrieve it by its name as well. This allows us to use a cog as an inter-command communication protocol to share data. For example:"

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/discord.po
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,3 @@ msgstr "The person adding the bot needs \"Manage Server\" permissions to do so."

msgid "If you want to generate this URL dynamically at run-time inside your bot and using the :class:`discord.Permissions` interface, you can use :func:`discord.utils.oauth_url`."
msgstr "If you want to generate this URL dynamically at run-time inside your bot and using the :class:`discord.Permissions` interface, you can use :func:`discord.utils.oauth_url`."

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/ext/bridge/api.po
Original file line number Diff line number Diff line change
Expand Up @@ -385,4 +385,3 @@ msgstr "The converter failed to convert the argument."

msgid ":sphinx_autodoc_typehints_type:`\\:py\\:data\\:\\`\\~typing.Any\\``"
msgstr ":sphinx_autodoc_typehints_type:`\\:py\\:data\\:\\`\\~typing.Any\\``"

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/ext/bridge/index.po
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ msgstr "This module allows using one command callback in order to make both a pr

msgid "Example usage:"
msgstr "Example usage:"

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/ext/commands/api.po
Original file line number Diff line number Diff line change
Expand Up @@ -4114,4 +4114,3 @@ msgstr ":exc:`~.ClientException`"

msgid ":exc:`~.commands.CommandRegistrationError`"
msgstr ":exc:`~.commands.CommandRegistrationError`"

1 change: 0 additions & 1 deletion docs/locales/de/LC_MESSAGES/ext/commands/cogs.po
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,3 @@ msgstr "If we want to get the subcommands as well, we can use the :meth:`.Cog.wa

msgid "To do the same with listeners, we can query them with :meth:`.Cog.get_listeners`. This returns a list of tuples -- the first element being the listener name and the second one being the actual function itself. ::"
msgstr "To do the same with listeners, we can query them with :meth:`.Cog.get_listeners`. This returns a list of tuples -- the first element being the listener name and the second one being the actual function itself. ::"

Loading

0 comments on commit 25df98a

Please sign in to comment.