Proposal to change FDP-primer examples page t o fix translations

From: Vladlen Popolitov <vladlenpopolitov_at_list.ru>
Date: Tue, 23 Sep 2025 18:09:56 UTC
Hi everyone,
 
Currently translation process has manual step during FDP-primer generation,
when translated versionis prepared. This manual step even is documented in Wiki:
https://wiki.freebsd.org/Doc/Translation/Weblate/Documents in section Books
sentence about examples.adoc, but it is not described in FDP-primer now.
 
FDP-primer has examples page, containing AsciiDoc example of code
inside of AsciiDoc. It is always the challenge to represent AsciiDoc from AsciiDoc.
Currently example page rendered correctly in English, but PO file
for translations is generated with destroyed AsciiDoc text (I did not
find any way to fix it by options). Final translated version of
books/fdp-primer/examples require manual correction or copy
from English version.
 
I propose to use trick with include directive: put all examples code
into separate files and include them inside of code block. It works.
 
Translators do not need any manual changes in this case, also they
have option correctly translate examples in separate files.
 
I prepared patch and placed it in Phabricator:
https://reviews.freebsd.org/D52678
It would be good to fix this issue before doc slash.
 
Best regards,
 
Vladlen Popolitov
doc/ru Committer.