Some of login page hardcoded to German

オープン 初心者向け
#571 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
80/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go, html

調査の方向性

ログインページのマークアップは /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:

  1. The document seems to hardcode lang="de", which triggered a browser translation prompt since all my devices are using English
  2. The heading renders "Login zu" , while the page <title> and form fields (Username, Password, Login) are in English.

To Reproduce

  1. Configure an sso client of type "user" with "authorization_code" in settings.json.
  2. 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

etherpad-go_login_mixed_lang

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 ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。