Some of login page hardcoded to German
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 80/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go, html
- 領域
- frontend, localization
調査の方向性
ログインページのマークアップは /auth/login から配信されます。Go のハンドラーと、<html lang="de"> および「Login zu」という見出しを描画する HTML テンプレートを特定してください(src/node の下にあるログインページのテンプレートを探してください)。修正は、Accept-Language ヘッダーまたは padOptions.lang に基づいて lang を設定し、見出しを翻訳することです。完了の基準は、issue の curl コマンドが英語の lang 属性と英語の見出しを返す一方、ドイツ語のリクエストでは引き続きドイツ語のテキストが返されることです。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
The built-in OIDC login page served at /auth/login mixes German and English regardless of the request's Accept-Language header:
- The document seems to hardcode
lang="de", which triggered a browser translation prompt since all my devices are using English - The heading renders "Login zu" , while the page
<title>and form fields (Username,Password,Login) are in English.
To Reproduce
- Configure an sso client of type "user" with "authorization_code" in settings.json.
- Request "/auth/login" with an English "Accept-Language" header:
curl -sL -H "Accept-Language: en-US,en;q=0.9" [http://127.0.0.1:9001/auth/login](http://127.0.0.1:9001/auth/login)
Actual Output:
<html lang="de"><head><title>Login Etherpad</title><link rel="stylesheet" href="/css/login/index.css"><script type="module" src="/css/login/index.js"></script></head><body><div class="login-background login-page"><div class="login-box login-form"><h1 class="login-title">Login zu </h1><form class="login-inner-box" method="post"><label for="username">Username</label> <input id="username" required class="login-textinput input-control" placeholder="Username" type="text" name="username"> <label for="password">Password</label> <input id="password" required class="login-textinput input-control" placeholder="Password" type="password" name="password"> <input class="login-button" type="submit" value="Login"><ul hidden="hidden"><li><input name="scopes" type="hidden" value="openid"></li><li><input name="scopes" type="hidden" value="profile"></li><li><input name="authRequestID" type="hidden" value="REDACTED"></li></ul></form></div></div></body></html>
Expected behavior
Set lang and the login heading based on Accept-Language or padOptions.lang
Screenshots
Server (please complete the following information):
- Etherpad version: Etherpad-Go v0.7.0 (native Linux binary)
- OS: Debian GNU/Linux 13 (trixie)
- Node.js version (
node --version): N/A (none) - npm version (
npm --version): N/A (none) - Is the server free of plugins: yes
Desktop (please complete the following information):
- OS: Pop!_OS 24.04 LTS
- Browser: Firefox 158.0.1; Brave 1.98.60 (x86_64)] w/ Chromium: 156.0.8078.48
Smartphone (please complete the following information):
not tested
Additional context
- 主要言語
- Go
- スター
- 38
- フォーク
- 2
- 平均マージ
- 3時間 28分
- マージ済み PR(30日)
- 87
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
似ている issue
-
taskmanager: a failed v1alpha1 backup leaves the partial backup behind対応中かも @arshil42 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
labeler: read a limit above math.MaxInt as math.MaxInt in nonNegative (CodeQL alerts #20 and #21)オープンcost:approved factory:queued factory:tracking priority:p2 rank:12 ready-for-doing task:approved tokens:50k
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
sisaku-security/sisakulint#860 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Bug phase-3
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
CrisH2307/repetition-study#258 ·
メンテナーはふだん 1 日以内に返信