Closed sunfkny closed 11 months ago
My temporary workaround
import rosetta
import pathlib
rosetta_path = pathlib.Path(list(rosetta.__path__)[0])
rosetta_zh_hans_source_path = rosetta_path / "zh_hans"
rosetta_zh_hans_dest_path = rosetta_path / "zh_Hans"
if rosetta_zh_hans_source_path.exists():
rosetta_zh_hans_source_path.rename(rosetta_zh_hans_dest_path)
Good catch, thank you!
Django won't discover 'zh_hans' https://github.com/django/django/blob/b287af5dc954628d4b336aefc5027b2edceee64b/django/utils/translation/__init__.py#L230-L243 so rosetta fallback to the default language. After renaming the directory to 'zh_Hans', the chinese translation works