docs: update all package READMEs to match gt repo style#32
Merged
ErnestM1234 merged 1 commit intogeneraltranslation:mainfrom Mar 20, 2026
Merged
Conversation
ErnestM1234
approved these changes
Mar 20, 2026
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!")) |
There was a problem hiding this 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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates all 7 package READMEs to follow the same format as the gt monorepo:
Keeps all experimental warnings.
Greptile Summary
This PR standardizes all 7 package READMEs in the
gt-pythonmonorepo 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:
gt-i18nQuick Start example imports and callsinit_gt, which does not exist in thegt_i18npackage. This would produce anImportErrorfor any user following the example. The correct initialization path usesI18nManager+set_i18n_manager.<picture>element pattern is correctly implemented across all files:<source>targets light mode, and the<img>fallback serves the dark logo.generaltranslation-icu-messageformat-parserandgeneraltranslation-intl-messageformatin 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.gt-fastapiandgt-flaskQuick Start examples correctly reflect the actual exportedinitialize_gtandtAPI.Confidence Score: 3/5
init_gtfunction in thegt-i18nQuick Start example.gt-i18nREADME introduces a broken Quick Start that references a function (init_gt) that does not exist in the package, which will mislead users.init_gtfunction.Important Files Changed
init_gtwhich doesn't exist in the package — this would cause an ImportError for anyone following the example.initialize_gtandtimports match the actual package exports.initialize_gtandtimports match the actual package exports.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"]Prompt To Fix All With AI
Last reviewed commit: "docs: update all pac..."