tldr-pages/tldr-python-client

`tldr --list` ingnores language-specific cache directories

frenzymadness opened this issue · 0 comments

The problem is on this line:

path = get_cache_dir() / 'pages' / platform

I think that if a language is explicitly set, tldr should use its cache directory.

For example:

# LANG=zh_CN tldr lspci
…
# LANG=cs_CZ tldr cd
…
# ls -la /root/.cache/tldr/
total 0
drwxr-xr-x. 4 root root 56 Mar  4 12:30 .
drwxr-xr-x. 3 root root 48 Mar  4 12:25 ..
drwxr-xr-x. 3 root root 36 Mar  4 12:30 pages.cs
drwxr-xr-x. 3 root root 34 Mar  4 12:25 pages.zh

# LANG=zh_CN tldr --list
[]
# LANG=cs_CZ tldr --list
[]

I'm using the latest release.