Skip to content

Commit

Permalink
feat: add gettext utility script
Browse files Browse the repository at this point in the history
  • Loading branch information
FallenDeity committed Dec 7, 2023
1 parent 05862d1 commit 2542d98
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/smart-sync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ done

```bash
find . -iname "*.po" | xargs -I {} sh -c 'msgfmt -o $(dirname {})/$(basename {} .po).mo {}'
```
```
3 changes: 1 addition & 2 deletions examples/smart-sync/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
import discord
from discord.ext import commands
from dotenv import load_dotenv
from utils.translator import GettextTranslator
from utils.tree import SlashCommandTree
from utils import GettextTranslator, SlashCommandTree


class CustomBot(commands.Bot):
Expand Down
9 changes: 9 additions & 0 deletions examples/smart-sync/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import typing

from .translator import GettextTranslator
from .tree import SlashCommandTree

__all__: typing.Final[typing.Sequence[str]] = (
"GettextTranslator",
"SlashCommandTree",
)

0 comments on commit 2542d98

Please sign in to comment.