extensions.ent の XML エンティティ化に追従し、do-not-translate 指定ファイルのコピーを整理#417
Merged
KentarouTakeda merged 3 commits intoJul 26, 2026
Merged
Conversation
KentarouTakeda
force-pushed
the
migrate-extcat-entities-and-drop-dnt-copies
branch
2 times, most recently
from
July 26, 2026 13:19
05bab85 to
0edbb97
Compare
KentarouTakeda
force-pushed
the
migrate-extcat-entities-and-drop-dnt-copies
branch
from
July 26, 2026 13:25
0edbb97 to
cf0502b
Compare
Member
|
Hi. The wrong statistic of text-entities.php is to be fixed on doc-base PR 330. The defect of revcheck.php showing do-not-translet files as outdated, will take time. The revcheck will gain two new sections, one called "only in doc-en", and files marked do-not-translate will be moved to this new section. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
doc-en のエンティティ移行と do-not-translate マーカー導入に、doc-ja が追従していなかった分をまとめて処理します。
entities/entities.extcat.ent(新規)doc-en
php/doc-en#5697 で、トップレベルの
extensions.ent(DTD の<!ENTITY>宣言)がentities/entities.extcat.ent(XML の<entity>要素)に置き換わりました。存続したのは 10 エンティティです。doc-ja で起きていたこと
付録「拡張モジュールの一覧/分類」が全体英語で出力されていました。エンティティの解決順によるものです。
text-entities.phpがen/entities/からtemp/entities.entを生成するdoc-base/manual.xmlの 10 行目%manual-entities;がこれを最初に読むja/extensions.entは 15 行目%translation-extensions;で後から読まれるビルド成果物での確認:
対応
ja/entities/に新形式で 10 エンティティを配置し、訳文はja/extensions.entの既訳から移植しました。原文側の変更は空白の詰め方と、extcat.state・extcat.state.experimentalで ASCII の-が—になった点だけです。訳文には移植にあたり 3 点手を入れています。
extcat.state: 既訳に旧原文のダッシュが挙げます。-として残っていたため、落としました。extcat.intro: 既訳でby several criteriaが訳されていなかったため、「いくつかの基準で」を補いました。.xml側も「この拡張モジュール」176 件に対し「この拡張」9 件です。移植元の既訳の Maintainer は takagi のため、CREDITS に記載しています。
extensions.ent(削除)doc-en
上記 php/doc-en#5697 で削除されました。
doc-ja で起きていたこと
ja 側にのみ残り、revcheck が
NotInEnTree: 1として数えていました。43 エンティティの既訳はいずれもビルド出力に反映されていませんでした。対応
削除しました。存続する 10 件は
entities/entities.extcat.entに移してあります。extcat.purpose.*系 33 件は doc-en で廃止されappendices/extensions.xmlからも参照が消えているため、このファイルとともに落としています。doc-base/manual.xmlは%translation-extensions;(ja/extensions.ent)と%extensions.default;(既に存在しないen/extensions.ent)を参照し続けていますが、いずれも欠けた状態でビルドが通ることを確認しています。bookinfo.xml(更新)doc-en
php/doc-en#5704 で
&frontpage.authors;と&frontpage.editors;の参照が削除され、両エンティティはentities/entities.remove.entに「Erased in 2026-06,*/bookinfo.xml」として廃止予告が置かれました。doc-ja で起きていたこと
両方の参照が残ったままでした。
対応
2 行を除去し、EN-Revision を追従させました。原文側の行末空白の除去も併せて反映しています。
entities/entities.remove.ent(新規)doc-en
廃止・削除されたエンティティを置く
translate="remove"のファイルです。「翻訳側では末尾に空の<entities/>を置き、revtag だけ更新する」とファイル自身に明記されています。doc-ja で起きていたこと
未配置でした。エンティティ削除を翻訳側に予告する仕組みなので、追従していないと
bookinfo.xmlのような参照残りに気づけません。対応
指示どおり空の
<entities>要素を持つスタブを配置しました。doc-ru と doc-pt_br にも同じ形のファイルがありますが、そちらのファイル名はentities-remove.entです。doc-en が上記 php/doc-en#5704 でentities.remove.entにリネームしているため、ja は新しい名前に合わせています。appendices/license.xml(削除)doc-en
php/doc-en#5657 で
<?do-not-translate?>マーカーが付与されました。doc-ja で起きていたこと
TranslatedOldとして revcheck の候補に出続けていました。byMark()は ja 側にファイルが無い場合しか参照されない(RevcheckRun::calculateStatus()の$target == null分岐)ため、コピーを残す限りマーカーが効きません。対応
削除しました。393 行すべてが英語の丸写しで日本語を 1 文字も含んでおらず、表示は doc-en へのフォールバックにより変わりません。保持しているのは doc-ja と doc-ru だけで、doc-es・doc-fr・doc-it・doc-pt_br・doc-zh・doc-de はいずれも持っていません。
検証
付録「拡張モジュールの一覧/分類」の見出し 10 件がすべて日本語で出力されることを、ビルド成果物で確認しました。
revcheck の変化:
text-entities.phpは147 entities, 134 untranslated, 10 errorsを出します。この PR の前は147 entities, 144 untranslated(errors なし)で、--debugで挙がる 10 件はすべてMultiple redefined/translatedとして今回訳した 10 エンティティが並びます。Entities::checkReplaces()は同名エンティティの定義回数から$replaced = nameCount - 1を求めており、en と ja の 2 言語で走らせる限り、翻訳されたエンティティは必ずこの分岐に入ります。ビルド自体は成功するため、この PR では触っていません。