Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Give the backend's English prose a code the frontend can translate

オープン
#1,967 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

@ybai08 がすでに取り組んでいます。

2026年10月2日 から。

  • #2290 @ybai08 による — オープン

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python, typescript

調査の方向性

Read the Backend text section of docs/architecture/localization.md, then compare chat-error-text.ts and license-error-text.ts with one producer, such as artifacts/service.py, and its route test. Start with a single producer and write a backend test for its code and a frontend test for translated text plus the unknown-code fallback. Done means the covered prose has a code, interface-language text, and keeps the backend English fallback.

索引モデルが issue の本文から書いたものです。

説明

desktop frontend help wanted UX

The gap

docs/architecture/localization.md lists this under Known gaps:

Backend prose without a code stays English in every language: model install messages, fit verdicts, not_runnable_reason, a Studio format's unavailable_reason, and the disk-space detail that lib/api.ts wraps in a translated sentence.

Why it matters

Someone running the app in Japanese or German meets English at exactly the moments the app is refusing or explaining itself: why a Studio format is greyed out, why a model card is flagged "Won't fit", why a model cannot run, what an install is doing, and why an upload failed for space. Those are the sentences a user most needs to read.

The disk-space one reads worst, because it is half done: lib/api.ts already wraps the backend's English sentence inside a translated one, so a German user gets a German frame around an English clause. The app also already has the answer, in two features — the backend sends a code beside its prose, and the frontend shows its own text for the code and falls back to the backend's English for a code it does not know. Everything in this gap line is prose with no code to key on.

Where

What done looks like

  • Each of those surfaces reads in the interface language, through an id the translate skill's key shape allows.
  • The backend still sends its English prose. A code the frontend has not shipped text for must keep showing something, which is what translatedChatError()'s final fallback relies on.
  • Decide whether each producer gets an enum mirrored in TypeScript, the way ChatErrorKind in sse.ts mirrors modules/chat/errors.py with a "keep the two in sync" comment, or a looser string. That is yours to decide, and it is the decision this issue turns on.
  • The fit verdicts carry numbers. Send them raw and format them in the message with an ICU skeleton — copy.py's _gb() currently pre-formats "13.6 GB", which no other language can re-space or re-punctuate.
  • It is fine to land this one producer at a time. Say in each PR which producer it closes, and delete the Known gaps line only with the last.

What not to change

This is not a docs/contracts/ change: those four documents cover the license file, scraper API auth, the export bundle and the sunset flag. The desktop API is one tree talking to itself.

How to verify

surfsense_local/backend/tests/integration/artifacts/test_routes.py already asserts on unavailable_reason, and surfsense_local/frontend/src/lib/api.test.ts on the error body. Write the failing test first on whichever producer you start with: a route test that the response carries the code, then a frontend test that the code renders its own text and an unknown code falls through to the backend's.

cd surfsense_local/backend
uv run pytest -m unit
uv run pytest -m integration
uv run ruff check .
cd ../frontend
pnpm test

Before you start

Read CONTRIBUTING.md and the localization doc, whose Backend text section states the rule this follows. Interface strings in surfsense_local follow the translate skill described in AGENTS.md — it owns the <feature>_error_<code> key shape, the tone per language and the glossary. translations/en.json is generated from the defaultMessage in the code, so never hand-edit it; run pnpm translations and commit the result with the code. Open your PR against dev, not main. Comment here to claim this.

主要言語
Python
スター
16.3k
フォーク
1.6k
平均マージ
13時間 35分
マージ済み PR(30日)
267

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

MODSetter/SurfSense のほかの issue

MODSetter/SurfSense の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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