Skip to content

docs: update all package READMEs to match gt repo style#32

Merged
ErnestM1234 merged 1 commit intogeneraltranslation:mainfrom
moss-bryophyta:moss/update-readmes
Mar 20, 2026
Merged

docs: update all package READMEs to match gt repo style#32
ErnestM1234 merged 1 commit intogeneraltranslation:mainfrom
moss-bryophyta:moss/update-readmes

Conversation

@moss-bryophyta
Copy link
Copy Markdown
Contributor

@moss-bryophyta moss-bryophyta commented Mar 20, 2026

Updates all 7 package READMEs to follow the same format as the gt monorepo:

  • Centered logo with light/dark mode support
  • Documentation + Report Bug links
  • One-liner description
  • Installation command
  • Quick start example (where applicable)
  • Link to full docs

Keeps all experimental warnings.

Greptile Summary

This PR standardizes all 7 package READMEs in the gt-python monorepo to match the gt repo style — adding a centered logo with light/dark mode support, documentation and bug-report links, a one-liner description, installation commands, and minimal Quick Start examples. The changes are purely cosmetic/documentation, with one notable exception.

Key findings:

  • The gt-i18n Quick Start example imports and calls init_gt, which does not exist in the gt_i18n package. This would produce an ImportError for any user following the example. The correct initialization path uses I18nManager + set_i18n_manager.
  • The light/dark mode <picture> element pattern is correctly implemented across all files: <source> targets light mode, and the <img> fallback serves the dark logo.
  • Significant API reference documentation was removed from generaltranslation-icu-messageformat-parser and generaltranslation-intl-messageformat in favour of pointing users to the full docs site — this is consistent with the stated goal but worth being aware of if the docs site is not yet comprehensive.
  • The gt-fastapi and gt-flask Quick Start examples correctly reflect the actual exported initialize_gt and t API.

Confidence Score: 3/5

  • Safe to merge after fixing the non-existent init_gt function in the gt-i18n Quick Start example.
  • All changes are documentation-only and look correct across 6 of 7 files. The gt-i18n README introduces a broken Quick Start that references a function (init_gt) that does not exist in the package, which will mislead users.
  • packages/gt-i18n/README.md — Quick Start uses a non-existent init_gt function.

Important Files Changed

Filename Overview
packages/gt-i18n/README.md Adds styled header and Quick Start, but the Quick Start imports init_gt which doesn't exist in the package — this would cause an ImportError for anyone following the example.
packages/gt-fastapi/README.md Adds styled header, one-liner description, and Quick Start. The initialize_gt and t imports match the actual package exports.
packages/gt-flask/README.md Adds styled header, one-liner description, and Quick Start. The initialize_gt and t imports match the actual package exports.
packages/generaltranslation-icu-messageformat-parser/README.md Adds styled header and trims extensive API docs to a minimal Quick Start; no technical inaccuracies introduced.
packages/generaltranslation-intl-messageformat/README.md Adds styled header and reduces to a minimal Quick Start; imports and usage match the actual package API.
packages/generaltranslation-supported-locales/README.md Adds styled header and a one-liner description with installation command. No Quick Start for this utility package, which is appropriate.
packages/generaltranslation/README.md Adds styled header, one-liner description, and installation command with a link to the full docs. No issues.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User reads README] --> B{Which package?}
    B --> |gt-fastapi| C["from gt_fastapi import initialize_gt, t ✅"]
    B --> |gt-flask| D["from gt_flask import initialize_gt, t ✅"]
    B --> |gt-i18n| E["from gt_i18n import t, init_gt ❌"]
    C --> F["initialize_gt(app, ...)"]
    D --> G["initialize_gt(app, ...)"]
    E --> H["init_gt(...) → ImportError"]
    H --> I["Correct API: I18nManager + set_i18n_manager"]
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: packages/gt-i18n/README.md
Line: 29-33

Comment:
**`init_gt` does not exist in `gt_i18n`**

The Quick Start imports and calls `init_gt`, but this function is not exported from `gt_i18n` and does not exist anywhere in the package. Running this example would raise an `ImportError`.

The `gt_i18n` package exports `I18nManager` and `set_i18n_manager` for initialization, not an `init_gt` function. Framework-specific setup is handled by `initialize_gt` from `gt-fastapi` / `gt-flask` — there is no equivalent standalone `init_gt` in `gt_i18n`.

```suggestion
```python
from gt_i18n import I18nManager, set_i18n_manager, t

manager = I18nManager(default_locale="en", locales=["en", "es", "fr"])
set_i18n_manager(manager)

print(t("Hello, world!"))
```
```

How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: "docs: update all pac..."

Greptile also left 1 inline comment on this PR.

@ErnestM1234 ErnestM1234 merged commit efad0e0 into generaltranslation:main Mar 20, 2026
4 checks passed
Comment on lines +29 to +33
from gt_i18n import t, init_gt

init_gt(default_locale="en", locales=["en", "es", "fr"])

print(t("Hello, world!"))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 init_gt does not exist in gt_i18n

The Quick Start imports and calls init_gt, but this function is not exported from gt_i18n and does not exist anywhere in the package. Running this example would raise an ImportError.

The gt_i18n package exports I18nManager and set_i18n_manager for initialization, not an init_gt function. Framework-specific setup is handled by initialize_gt from gt-fastapi / gt-flask — there is no equivalent standalone init_gt in gt_i18n.

Suggested change
from gt_i18n import t, init_gt
init_gt(default_locale="en", locales=["en", "es", "fr"])
print(t("Hello, world!"))
```python
from gt_i18n import I18nManager, set_i18n_manager, t
manager = I18nManager(default_locale="en", locales=["en", "es", "fr"])
set_i18n_manager(manager)
print(t("Hello, world!"))

<details><summary>Prompt To Fix With AI</summary>

`````markdown
This is a comment left during a code review.
Path: packages/gt-i18n/README.md
Line: 29-33

Comment:
**`init_gt` does not exist in `gt_i18n`**

The Quick Start imports and calls `init_gt`, but this function is not exported from `gt_i18n` and does not exist anywhere in the package. Running this example would raise an `ImportError`.

The `gt_i18n` package exports `I18nManager` and `set_i18n_manager` for initialization, not an `init_gt` function. Framework-specific setup is handled by `initialize_gt` from `gt-fastapi` / `gt-flask` — there is no equivalent standalone `init_gt` in `gt_i18n`.

```suggestion
```python
from gt_i18n import I18nManager, set_i18n_manager, t

manager = I18nManager(default_locale="en", locales=["en", "es", "fr"])
set_i18n_manager(manager)

print(t("Hello, world!"))

How can I resolve this? If you propose a fix, please make it concise.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants