Uh oh!
There was an error while loading. Please reload this page.
Read acronyms from translatable acronym.* entities - #262
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Louis-Arnaud <la.catoire@gmail.com>
Co-authored-by: Louis-Arnaud <la.catoire@gmail.com>
alfsb
commented
Jul 22, 2026
Cool. I did not know that
It is improbable that this file will ever contain entity references, so SimpleXML loading will be safe and easy. And even if this file will ever contain other "direct" acronyms entities, they are not prefixed "acronym.". All these restrictions and automated uses of this file can be also commented on in the file itself, so it will be harder to forget / abuse it later. For example, I did not know there is a qa script for it, so comments could mention its usage by doc-base/qa and PhD. The prefix can further be specified, to make it very explicit: "acronym.expansion.$name". |
I agree with most of your comments, but I am trying to understand <!ENTITY api '<acronymxmlns="http://docbook.org/ns/docbook">API</acronym>'>to <!ENTITY acronym.api '<acronymxmlns="http://docbook.org/ns/docbook">API</acronym>'>If that's the case it does make sense to make these more explicit. |
alfsb
commented
Jul 22, 2026
That is a very nice encoding scheme. To be fair, I was not thinking about it. The addition of So the file would contain: <!-- direct transformation -->
<entityname="api"><acronym>API</acronym></entity>
<entityname="ascii"><acronym>ASCII</acronym></entity>
...
<!-- new, used on PhD -->
<entityname="acronym.expansion.api">Application ...</entity>
<entityname="acronym.expansion.ascii">American ...</entity> |
I have updated doc-en to include both. Also covered the other comments in the 3 PRs. While I was doing changing this, I considered making the entity names lowercase, but it might break something unexpected. |
Suggested by @alfsb
Moving Acronyms from doc-base to doc-en. This allows Acronyms to be translated, as well as to more easily phase out unused acronyms.
This is a set of 3 PRs
doc-en: php/doc-en#5695
doc-base: php/doc-base#325
phd: #262 (you are here)