goauthentik / goauthentik/authentik

Translations: zh locale folder names might not correct

Open
#11,919 0 comments 0 reactions 0 assignees View on GitHub
i18n question
Dominant language
Python
Stars
25.6k
Forks
2k
Avg merge
1d 2h
Merged PRs (30d)
651

Description

**Describe your question**
1. The folder name of these two locale codes, `zh-Hans` and `zh-Hant`, should be `locale/zh_Hans` and `locale/zh_Hant`, not `locale/zh-Hans` or `locale/zh-Hant`. They are both named `zh_Hans` and `zh_Hant` in [django](https://github.com/django/django/tree/main/django/conf/locale/zh_Hans) and [django-reset-framework](https://github.com/encode/django-rest-framework/tree/master/rest_framework/locale/zh_Hant)
2. Why don't we add the `django.middleware.locale.LocaleMiddleware` to `MIDDLEWARE` in `root/settings.py`. The `Log in` button of `Identification Stage` will never be translated if we don't enable it

**Relevant info**
"Log in" string is the primary_action [here](https://github.com/goauthentik/authentik/blob/main/authentik/stages/identification/stage.py#L211)

**Screeshots**
The "Email or Username" has been translated to "电子邮箱或用户名", but the "Log in" doesn't be translated to "登录"
image

**Version and Deployment (please complete the following information):**
- authentik version: [e.g. 2024.10.0]
- Deployment: [e.g. docker-compose, helm]

Contributor guide

Open the contributing guide

Research direction

The issue points to the locale/zh-Hans and locale/zh-Hant folders, root/settings.py, and authentik/stages/identification/stage.py:211. Start by checking the locale folder naming and middleware configuration, then verify that the Identification Stage's "Log in" string is translated to Chinese and that the relevant locale tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
authentication, internationalization, localization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.