Skip to content

Remove legacy FTL extract and stub helpers#51

Open
andrew000 wants to merge 2 commits into
devfrom
drop-native-fluent-extract
Open

Remove legacy FTL extract and stub helpers#51
andrew000 wants to merge 2 commits into
devfrom
drop-native-fluent-extract

Conversation

@andrew000
Copy link
Copy Markdown
Contributor

Summary

  • Removed legacy FTL extract CLI modules.
  • Removed the old Fluent stub helper and .ftl support from i18n stub.
  • Kept i18n stub focused on gettext inputs: .po, .pot, and .mo.
  • Rewrote the README with clearer installation, backend, quick start, CLI, and FTL-Extract guidance.

Breaking Change

FTL extraction and FTL stub generation are no longer provided by aiogram_i18n.
Use FTL-Extract for those workflows instead.

Testing

  • just lint

- drop obsolete extract and multiple_extract CLI modules

- remove Fluent stub wiring from the stub command

- keep stub generation limited to gettext catalogs

- refresh README with installation, backend, CLI, and FTL-Extract guidance

BREAKING CHANGE: FTL extraction and FTL stub generation are removed from aiogram_i18n. Use FTL-Extract for FTL workflows.
@andrew000 andrew000 self-assigned this May 24, 2026
@andrew000 andrew000 added the enhancement New feature or request label May 24, 2026
@andrew000 andrew000 requested a review from Copilot May 24, 2026 13:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes legacy Fluent (FTL) extraction and stub-generation helpers from aiogram_i18n, keeps the i18n stub CLI command focused on GNU gettext catalogs, and refreshes the README to reflect the new guidance (FTL workflows moved to FTL-Extract).

Changes:

  • Removed deprecated Fluent extraction CLI modules and the Fluent stub helper.
  • Updated i18n stub to support only .mo, .po, and .pot inputs and adjusted CLI behavior accordingly.
  • Rewrote the README with updated installation/backends/CLI documentation and FTL-Extract guidance.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/aiogram_i18n/utils/fluent_stub/__init__.py Removes the legacy Fluent stub helper module.
src/aiogram_i18n/utils/cli/stub.py Drops .ftl support and adjusts stub command behavior to gettext inputs only.
src/aiogram_i18n/utils/cli/multiple_extract.py Removes the legacy “multiple extract” Fluent CLI module.
src/aiogram_i18n/utils/cli/extract.py Removes the legacy Fluent extract CLI module.
src/aiogram_i18n/utils/cli/__init__.py Stops exporting/registering the removed extract commands.
README.md Updates documentation and guidance, including directing FTL workflows to FTL-Extract.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/aiogram_i18n/utils/cli/stub.py Outdated
Comment thread src/aiogram_i18n/utils/cli/stub.py Outdated
Comment thread README.md Outdated
- reject mixed gettext catalog input extensions

- use Click exceptions for CLI validation errors

- point the README license badge at the package page
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/aiogram_i18n/utils/cli/stub.py:40

  • The validation error "only files allowed" is too vague for CLI users (it doesn't indicate which path failed or that the path must exist and be a file). Consider including the invalid path and a clearer description (e.g., "input path must be an existing file").
        if not path.is_file():
            msg = "only files allowed"
            raise click.ClickException(msg)

Comment thread src/aiogram_i18n/utils/cli/stub.py
@andrew000
Copy link
Copy Markdown
Contributor Author

@RootShinobi review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants