Closed humitos closed 3 months ago
Both projects have "Chinese" as language.
It seems that "zh" | language_name_local
fails in the templates because zh
is not valid.
Removing the | language_name_local
filter makes the page to work.
It generates this
zh
as is does not exist in Django, https://github.com/django/django/blob/d3a7ed5bcc45000a6c3dd55d85a4caaa83299f83/django/conf/locale/__init__.py#L599-L628
This is a larger issue, zh
isn't a valid locale in Sphinx either:
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language
In both, the supported locales should be zh_CN
and zh_TW
.
The fix here shouldn't be to remove the language_name_local
though, the code is not a user friendly way to present the language of the project. We should avoid this for the invalid zh
locale for now, and perhaps this makes more sense as a model method on the project.
But we should modernize our list of supported locales too probably.
Opening https://beta.readthedocs.org/projects/paddlescience-docs/ gives 500. It seems to be related to a translation issue. Also, going to https://beta.readthedocs.org/projects/mikrotik-doc-cn/builds/22789572/ fails as well.