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

SSR pages embed the complete i18n message catalog in TransferState

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

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

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

2026年10月9日 から。

  • #6348 @saschaszott による — オープン

評価

この issue はまだ評価されていません。

説明

bug i18n / l10n improvement performance / caching

Describe the bug

When SSR is enabled, every SSR result (HTML page) embeds all translation keys of the current language in the TransferState (in NGX_TRANSLATE_STATE), because TranslateServerLoader stores the full parsed i18 message catalog there.

This adds 300 kB of JSON to every SSR response. Because the HTML is served with Cache-Control: no-cache, no-store, this payload is never cached and is transferred again with every SSR page, although each page only uses a small fraction of the i18n keys. Crawlers that don't execute JavaScript don't need it at all.

To Reproduce

  1. run the DSpace Angular UI with SSR enabled
  2. open an item landing page (or another page that is rendered server-side) and view the page's HTML source
  3. The element <script id="dspace-angular-state"> contains NGX_TRANSLATE_STATE with the complete i18n message catalog of the current language

Expected behavior

The SSR HTML should not contain the full translation catalog. The client can load the (content-hashed, long-term cacheable) translation file assets/i18n/<lang>.<hash>.json instead.

Related work

n/a

主要言語
TypeScript
スター
180
フォーク
577
平均マージ
3日 6時間
マージ済み PR(30日)
134

環境構築

はじめの一歩

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

DSpace/dspace-angular のほかの issue

DSpace/dspace-angular の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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