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

Support for language-agnostic documentation #56

Open
pyhedgehog opened this issue Jun 27, 2022 · 2 comments
Open

Support for language-agnostic documentation #56

pyhedgehog opened this issue Jun 27, 2022 · 2 comments

Comments

@pyhedgehog
Copy link

I'm writing docs with i18n support.
There are two places where it should be done:

  1. All docstrings of click-command functions and options help arguments. Like this:
@click.option('--quiet/--verbose', '-q/-v', flag_value=True, default=False, help=_("Disable processing output"))
@doc(_("""Help text of subcommand."""))
def subcommand(quiet):
    ...
  1. MkDocs docs directory. I'm using mkdocs-static-i18n plugin. So I've created index.XX.md for each supported language.

I want to pass different language code to mkdocs-click plugin in each cli.XX.md.
I think it will includes reloading of module each time with changing LANG variable.

@pyhedgehog
Copy link
Author

@DataDog, should I try to implement it and create pull request or you want to do it alone?

@ofek
Copy link
Collaborator

ofek commented Jun 27, 2022

Feel free to open a PR!

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

No branches or pull requests

2 participants