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

[BUG] "Extract" does not comment keys whose arguments have been changed (or removed) #32

Closed
andrew000 opened this issue Dec 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@andrew000
Copy link
Contributor

Foreword

  • Code should be in bot directory
  • Command should be running outside the bot directory

Steps

  1. python -m aiogram_i18n extract -i '.\bot' -o '.\locales\test.ftl' -cm -k 'i18n' --locales 'uk'
  2. Remove age="42" from code in start() function
  3. Re-run command from step 1

Expected behavior

  • hello-text = hello-text { $name } { $age } should be commented and new line hello-text = hello-text { $name } should be added.

Current behavior

  • hello-text = hello-text { $name } { $age } has not changed

Code to reproduce bug

import asyncio

from aiogram import Dispatcher, Bot
from aiogram.filters import Command
from aiogram.fsm.storage.memory import MemoryStorage
from aiogram.types import Message
from aiogram_i18n import I18nContext

dp = Dispatcher(storage=MemoryStorage())


@dp.message(Command("start"))
async def start(msg: Message, i18n: I18nContext) -> None:
    await msg.reply(i18n.get("hello-text", name="Peter", age="42"))


if __name__ == '__main__':
    bot = Bot(token="42")
    asyncio.run(dp.start_polling(bot))

Requiremets

aiogram==3.2.0
aiogram_i18n==1.3.3
libcst==1.1.0
@andrew000 andrew000 added the bug Something isn't working label Dec 10, 2023
@andrew000 andrew000 changed the title [BUG] "Extract" does not update (or comment) keys whose arguments have been changed (or removed) [BUG] "Extract" does not comment keys whose arguments have been changed (or removed) Dec 10, 2023
@andrew000
Copy link
Contributor Author

Resolved in another lib

@andrew000 andrew000 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant