Skip to content

Remove 72 unused entities from language-snippets.ent - #5625

Merged
kamil-tekiela merged 1 commit into
php:masterfrom
lacatoire:cleanup/unused-language-snippets-entities
Jul 24, 2026
Merged

Remove 72 unused entities from language-snippets.ent#5625
kamil-tekiela merged 1 commit into
php:masterfrom
lacatoire:cleanup/unused-language-snippets-entities

Conversation

@lacatoire

@lacatoire lacatoire commented Jun 18, 2026

Copy link
Copy Markdown
Member

Auditing language-snippets.ent surfaced unused entity declarations that are not referenced anywhere, directly or transitively: deprecation banners for old PHP cycles, snippets for removed extensions (mcrypt, sqlite, t1lib, safemode, ...) and stale helpers.

This removes the 72 that no translation references either. The 11 entities still referenced by some translations are split into a separate PR.

Pure cleanup, no rendered output changes.

@lacatoire
lacatoire force-pushed the cleanup/unused-language-snippets-entities branch from 9cf3e64 to 1b5d586 Compare June 18, 2026 15:24
@alfsb

alfsb commented Jun 18, 2026

Copy link
Copy Markdown
Member

Also checked non usage on translations?

But even if some outdated translations still use some of then, keep the deletion. Anything that shrinks language-snippets.ent is a big yes for me.

And after php/doc-base#301 is merged, any deleted entity on doc-en still used for translations can now be moved to a temporary file, so full remotions on doc-en can be done in one step, without breaking translations.

@lacatoire
lacatoire force-pushed the cleanup/unused-language-snippets-entities branch from 1b5d586 to 11e7920 Compare June 19, 2026 07:12
@lacatoire lacatoire changed the title Remove 83 unused entities from language-snippets.ent Remove 72 unused entities from language-snippets.ent Jun 19, 2026
@lacatoire
lacatoire force-pushed the cleanup/unused-language-snippets-entities branch from 11e7920 to 4395196 Compare June 19, 2026 07:42
@lacatoire

Copy link
Copy Markdown
Member Author

@alfsb i've removed those used in translations in another PR #5628

@alfsb

alfsb commented Jun 19, 2026

Copy link
Copy Markdown
Member

That is impressive. You have a comprehensive view of dependencies between these DTD entities and languages. Hope that doc-base's 301 will help make this work easier. In fact, #5628 may be the first use/user of an doc-en/entities/entities-remove.ent file.

@lacatoire
lacatoire force-pushed the cleanup/unused-language-snippets-entities branch from 4395196 to 468fb76 Compare June 23, 2026 14:06
@kamil-tekiela
kamil-tekiela merged commit 9eb61e3 into php:master Jul 24, 2026
2 checks passed
KentarouTakeda added a commit to php/doc-ja that referenced this pull request Aug 9, 2026
* language-snippets.ent を原文に同期し Status を ready にする

php/doc-en#5625(Remove 72 unused entities from language-snippets.ent)に追従し、
原文で削除された 72 件のエンティティと、それによって参照先を失ったセクション
コメント 9 件を削除する。72 件はいずれも ja ツリーからの参照がゼロであることを
確認済み。エンティティ名の集合が原文と一致した。

あわせて EN-Revision を 6a2ad3ecf9 に更新する。php/doc-en#5736 の
changelog.class-constants-typed は #432 で訳出済みだが revtag を上げ忘れていた。

Status は 2005 年の ja@9fcb14e39 以降 working のままだった。revcheck は
Status が ready のファイルだけを TranslatedOk / TranslatedOld に分類し
(doc-base RevcheckRun.php)、それ以外はリビジョンが一致していても
TranslatedWip に落とすため、このファイルは Outdated 一覧に現れず、
今回の #5625 の同期漏れが検出できない状態だった。ready に変更する。

訳文が英語のまま残っている mongodb / trader / rnp 系のエンティティについては、
ja 独自のコメントとしてファイル冒頭に注記した。

Claude-Session: https://claude.ai/code/session_01K6brFspu89YyXW3GtGSxVg

* language-snippets.ent の既訳の誤りを修正

原文と機械照合して検出した 4 件を修正する。

- warn.ssl-non-standard: 原文は 2004 年の doc-en@7b34ccd455 で
  「IIS が close_notify を送らずに接続を閉じるプロトコル違反であり、
  データの終端で "SSL: Fatal Protocol Error" と報告される」という記述に
  書き換わっていたが、訳文はそれ以前の「いくつかの標準に対応してない
  Web サーバー」のままだった
- dom.parameter.options: 原文は doc-en@d2939d4611 で
  「libxml オプション定数のビットごとの OR」に書き換わっていたが、
  訳文が未追従で language.operators.bitwise へのリンクも欠落していた
- strings.parameter.format: g 指定子の説明で、原文の
  「the conversion is with style f」を「E 指定子」と誤訳していた。
  直前の「a conversion with style E would have an exponent of X」も
  「X乗になります」と誤訳していた
- no.config: 「この拡張モジュールは」と「&php.ini; に」が訳抜けし、
  「設定ディレクティブは定義されていません。」だけになっていた

Claude-Session: https://claude.ai/code/session_01K6brFspu89YyXW3GtGSxVg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants