Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (4.2%) to scientific vocabulary
Keywords from Contributors
Repository
Translation tool for aiogram
Statistics
- Stars: 35
- Watchers: 5
- Forks: 5
- Open Issues: 5
- Releases: 0
Metadata Files
README.md
aiogram_i18n
Installation:
pip install aiogram_i18n
To use FluentCompileCore:
pip install fluent_compiler
To use FluentRuntimeCore:
pip install fluent.runtime
```python import asyncio from contextlib import suppress from logging import basicConfig, INFO from typing import Any
from aiogram import Router, Dispatcher, Bot from aiogram.client.default import DefaultBotProperties from aiogram.enums import ParseMode from aiogram.filters import CommandStart from aiogram.types import Message
from aiogrami18n import I18nContext, LazyProxy, I18nMiddleware, LazyFilter from aiogrami18n.cores.fluentruntimecore import FluentRuntimeCore from aiogram_i18n.types import ( ReplyKeyboardMarkup, KeyboardButton # you should import mutable objects from here if you want to use LazyProxy in them )
router = Router(name=name) rkb = ReplyKeyboardMarkup( keyboard=[ [KeyboardButton(text=LazyProxy("help"))] # or L.help() ], resize_keyboard=True )
@router.message(CommandStart()) async def cmdstart(message: Message, i18n: I18nContext) -> Any: name = message.fromuser.mentionhtml() return message.reply( text=i18n.get("hello", user=name), # or i18n.hello(user=name) replymarkup=rkb )
@router.message(LazyFilter("help")) # or LazyProxy("help") or F.text == LazyProxy("help") async def cmd_help(message: Message) -> Any: return message.reply(text="-- " + message.text + " --")
async def main() -> None: basicConfig(level=INFO) bot = Bot("42:ABC", default=DefaultBotProperties(parsemode=ParseMode.HTML)) i18nmiddleware = I18nMiddleware( core=FluentRuntimeCore( path="locales/{locale}/LC_MESSAGES" ) )
dp = Dispatcher()
dp.include_router(router)
i18n_middleware.setup(dispatcher=dp)
await dp.start_polling(bot)
if name == "main": with suppress(KeyboardInterrupt): asyncio.run(main()) ```
Owner
- Name: aiogram
- Login: aiogram
- Kind: organization
- Email: github@aiogram.dev
- Website: https://aiogram.dev
- Repositories: 18
- Profile: https://github.com/aiogram
GitHub Events
Total
- Issues event: 1
- Watch event: 9
- Issue comment event: 3
- Push event: 8
- Pull request review event: 28
- Pull request review comment event: 22
- Pull request event: 11
- Fork event: 6
Last Year
- Issues event: 1
- Watch event: 9
- Issue comment event: 3
- Push event: 8
- Pull request review event: 28
- Pull request review comment event: 22
- Pull request event: 11
- Fork event: 6
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| RootShinobi | 1****i | 103 |
| nullmatawasoradesu | 1****e | 25 |
| andrew000 | 1****0 | 21 |
| JRoot Junior | j****r@g****m | 16 |
| Kostiantyn Kriuchkov | 3****d | 2 |
| Vladyslav49 | T****9@g****m | 1 |
| Dm Tenevoy | 9****N | 1 |
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 5
- Total pull requests: 10
- Average time to close issues: 5 months
- Average time to close pull requests: 1 day
- Total issue authors: 2
- Total pull request authors: 7
- Average comments per issue: 0.4
- Average comments per pull request: 0.5
- Merged pull requests: 7
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 2
- Pull requests: 7
- Average time to close issues: 7 months
- Average time to close pull requests: 2 days
- Issue authors: 1
- Pull request authors: 5
- Average comments per issue: 0.0
- Average comments per pull request: 0.57
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- andrew000 (4)
- noverd (1)
Pull Request Authors
- andrew000 (8)
- loRes228 (2)
- RootShinobi (2)
- m-xim (2)
- Vladyslav49 (2)
- klaymov (2)
- KOT4N (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout master composite
- actions/download-artifact v1 composite
- actions/setup-python v4 composite
- actions/upload-artifact v2 composite
- pypa/gh-action-pypi-publish master composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3 composite
- aiogram ~=3.0.0b7
- click ==8.1.4