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

Add translations for helps. #18

Open
bckohan opened this issue Feb 19, 2024 · 5 comments
Open

Add translations for helps. #18

bckohan opened this issue Feb 19, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bckohan
Copy link
Member

bckohan commented Feb 19, 2024

Should make a good faith effort to provide translations for all the languages Django provides translations for.

@bckohan bckohan added the enhancement New feature or request label Feb 19, 2024
@bckohan bckohan self-assigned this Feb 19, 2024
@bckohan bckohan added this to the Version 1.3 milestone Apr 23, 2024
@bckohan bckohan modified the milestones: Version 2.2, Version 3.0 Jun 10, 2024
@bckohan
Copy link
Member Author

bckohan commented Oct 5, 2024

One wrinkle here is that typer adds some of the help text for (i.e. --help) - that may eventually be wrapped in gettext and if it is - how do the native python translation and django translation systems work together?

@bckohan
Copy link
Member Author

bckohan commented Oct 13, 2024

Does django have translations for the common options?

@oliverandrich oliverandrich self-assigned this Oct 14, 2024
@bckohan bckohan changed the title Add translations for error messages and helps. Add translations for helps. Jan 21, 2025
@bckohan
Copy link
Member Author

bckohan commented Jan 21, 2025

We will not translate error messages presented on the terminal per Django's practice. I do think translating the default CLI helps is important because the CLI interface may be used by non-devs. Consider using google translate: https://github.com/ankitpopli1891/django-autotranslate

@oliverandrich
Copy link
Member

What is the rationale behind including it? Will it be an optional dependency? And shouldn't it be up to the project, including django-typer to supply the translation? I would use django-translate either for all of my project or not at all. But it would surprise me, if one third-party library handles it on its own.

@bckohan
Copy link
Member Author

bckohan commented Jan 23, 2025

It would only be a development dependency, it wouldn't register on pypi at all. Translations would be produced at package time.

Django's stance toward translation so far as I can tell is that if it's language that only developers are exposed to the strings are not translated and if it's language downstream users are exposed to it is translated. Django does not offer translations out of the box for the helps for default command parameters. Probably because this language is thought of as in the first category. I'm not sure I agree with this. I think the CLI interface of a Django site probably falls somewhere between the developer only audience and the user audience. As such I think it makes sense to provide translations out of the box for the common parameters.

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

No branches or pull requests

2 participants