eigent/backend
2025-08-04 18:16:20 +08:00
..
.vscode initial commit 2025-07-29 23:57:16 +08:00
app enhance prompt for date 2025-08-04 18:16:20 +08:00
lang initial commit 2025-07-29 23:57:16 +08:00
.gitignore initial commit 2025-07-29 23:57:16 +08:00
.python-version initial commit 2025-07-29 23:57:16 +08:00
babel.cfg initial commit 2025-07-29 23:57:16 +08:00
cli.py initial commit 2025-07-29 23:57:16 +08:00
main.py initial commit 2025-07-29 23:57:16 +08:00
messages.pot initial commit 2025-07-29 23:57:16 +08:00
pyproject.toml bug fix and feature enahcement 2025-08-04 10:26:49 +08:00
README.md initial commit 2025-07-29 23:57:16 +08:00
uv.lock bug fix and feature enahcement 2025-08-04 10:26:49 +08:00

uv run uvicorn main:api --port 5001

i18n operation process: https://github.com/Anbarryprojects/fastapi-babel


pybabel extract -F babel.cfg -o messages.pot . --ignore-pot-creation-date  # Extract multilingual strings from code to messages.pot file
pybabel init -i messages.pot -d lang -l zh_CN   # Generate Chinese language pack, can only be generated initially, subsequent execution will cause overwrite
pybabel compile -d lang -l zh_CN                # Compile language pack


pybabel update -i messages.pot -d lang
# -i messages.pot: Specify the input file as the generated .pot file
# -d translations: Specify the translation directory, which typically contains .po files for each language
# -l zh: Specify the language code
# regular search
\berror\b(?!\])