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

"Documentation is not available." for all commands #121

Closed
carlosneves0 opened this issue Jun 2, 2020 · 8 comments
Closed

"Documentation is not available." for all commands #121

carlosneves0 opened this issue Jun 2, 2020 · 8 comments

Comments

@carlosneves0
Copy link

I installed this CLI using pacman, and recently it's not finding any documentation for any command.

$ tldr ls
`ls` documentation is not available. Consider contributing Pull Request to https://github.com/tldr-pages/tldr
 $ tldr tar
`tar` documentation is not available. Consider contributing Pull Request to https://github.com/tldr-pages/tldr

How can we fix this?

@zlatanvasovic
Copy link
Contributor

Does #119 help? It's an issue with language set, most likely.

@carlosneves0
Copy link
Author

carlosneves0 commented Jun 3, 2020

That was it! I'm gonna try making an alias env LANG=en_US.UTF-8 tldr.
Thank you.

@MasterOdin
Copy link
Collaborator

You can also do export TLDR_LANGUAGE=en to achieve the same result.

@Porrumentzio
Copy link

This helped! I was having this issue for months and I didn't manage to solve it. Does export TLDR_LANGUAGE=en solve this problem at a level of session, user or system?

Additionally, it would be great if it's possible to solve this problem, accepting all locales from the code itself!

@homocomputeris
Copy link

Shouldn't there be a fallback if LANG is not set? Somehow it worked.

@carlosneves0
Copy link
Author

carlosneves0 commented Jul 1, 2020

Perhaps the error message could be improved?

No pages were found for ls in your current language "$LANG"
1 page was found in english. Run `tldr --language en ls` to see it

@MasterOdin
Copy link
Collaborator

Improvements to the language handling are a definite thing I'd like to do, but are on hold to think about until tldr-pages/tldr#4101 is merged. It alone brings in that we will always fallback to english as a language to try, which nicely fixes this whole thing.

@Porrumentzio
Copy link

Porrumentzio commented Jul 2, 2020

I don't know if I understand well all what you said, but what I would do would be:

  1. Improve the error message, as said in "Documentation is not available." for all commands #121 (comment), until there's another solution.
  2. As said in "Documentation is not available." for all commands #121 (comment), improve all this issue about languages. For that I would, as it is done with almost all localizations, fallback to english only if there's no pages for the users language.
    For that, with a pythonish example, I would create some kind of this structure:
if $LANG not in langs_on_tldr_list:
    fallback_to_english_function()

Maybe it could be great to be able to choose which language to use.

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

5 participants