Re: Wiki: suggestion about Translation header
Hi,
On 06/03/25 12:01, Jonathan Dowland wrote:
I was looking at the DefaultTemplate, in particular this bit at the top
(quoted for email):
##For Translators - to have a constantly up to date translation header
in you page, you can just add a line like the following (with the
comment's character at the start of the line removed)
##<<Include(DefaultTemplate, ,from="^##TAG:TRANSLATION-HEADER-
START",to="^##TAG:TRANSLATION-HEADER-END")>>
##TAG:TRANSLATION-HEADER-START
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]:
[[DefaultTemplate|English]] - [[es/DefaultTemplate|Español]] - [[fr/
DefaultTemplate|Français]] - [[sr/DefaultTemplate|српски]]-~
##TAG:TRANSLATION-HEADER-END
The intention of the instruction to use "Include" is so that the
translation header can be changed in one place and updates automatically
applied to all pages using it.
Sorry, I will start saying that I might not undestand the whole of your
message (I surely lost you at some point, and I am afraid it's my fault).
That part was added for translators and by translators and it became an
"unspoken" practice through time because it helps the work of translators.
The intention is so that when the list of translated languages (the
translation header) changes in a master English page, it updates
automatically in all its translated pages.
I think all the commented parts for Translators could be left commented.
the start and end TAGs could be decommented because whether they are
used or not in a translated page (or anywhere else) they don't do any harm.
However, when someone creates a new page using DefaultTemplate, unless
they take special care to change it, they just include the above
verbatim. (See e.g. <https://wiki.debian.org/IRC>, although there's a
subtle misunderstanding in there…). This means they are not actually
transcluding the header from DefaultTemplate, and instead have a static
copy from page creation time.
Actually in that page it works exactly as it should. It is a comment for
translators.
The Include line is correctly commented because it is supposed to be
used in translated pages (look for instance to
https://wiki.debian.org/it/IRC.
And it was not included verbatim, whomever put it there took care to
change the commented Include line from
##<<Include(DefaultTemplate,
,from="^##TAG:TRANSLATION-HEADER-START",to="^##TAG:TRANSLATION-HEADER-END")>>
to:
##<<Include(IRC,
,from="^##TAG:TRANSLATION-HEADER-START",to="^##TAG:TRANSLATION-HEADER-END")>>
The point is not to include something from the template. The whole point
is to make the translation header in each page easy to include in the
translated pages, so when new languages are added to the header in the
English master page, they are automatically added to all translated
pages that have an included header instead of their own header. In the
past as a translator you would have to subscribe to the English page and
then manually add all new languages to your translated page when they
became available.
The only problem I see is having a fixed name page in the
DefaultTemplate page. One solution (at least it is for me, as you can
see in my memo here
(https://wiki.debian.org/BeatriceTorracca#Make_translation_header_always_up_to_date)
would be to have this in the Template:
##<<Include(<PAGENAME>,
,from="^##TAG:TRANSLATION-HEADER-START",to="^##TAG:TRANSLATION-HEADER-END")>>
the fact that <PAGENAME> doesn't exist would not pose any problem in the
English master page since that line is commented.
Any translator who knows how to include the header, and who takes the
manual choice to include it, would get a big RED warning for a missing
reference (I know... I have been there more times than I can count)
either when doing a preview (we all make a preview, right?) or when they
save the page. It would be right at the top and impossible to miss.
However! That would break any pages that are currently using the Include
from DefaultTemplate. I don't know how many of such pages there are, or
how to count them. The missing step (2) above would be to update them to
reference the newly created page containing the translation header.
I don't think any page actually Includes anything from the
DefaultTemplate. A lot of translated pages include from their English
master page (not only that, sometimes, but rarely, even long tables or
long lists of packages...)
The reason I'm looking at this at all is I would like to add a link to
"/Discussion" into the header, to have it present on most pages
automatically (I've seen this done by-hand on one page or other but I
can't find it now)
As I was saying, since the translated pages include the header from the
English master page, whatever you want to put in there would be included
in the translated pages. There is no problem having a /Discussion part.
It would be included in translations too (I think there are some pages
which have it).
Whatever is between the start and end TAGS in the master page would be
included in the translated pages.
Look at this page for example: https://wiki.debian.org/it/DHCP_Client
There is a Discussion section in the header, there is the comment for
translators and there are the translation header is between start and
end tags, and the Italian translated page includes it with no problem.
(In this particular page only the Italian translation includes it, but
it is a common practice at the very least with many fr and pt_BR pages
too for what I can remember).
I am not sure if this is right/advisable/correct, but this is, in my
experience, how that Include is used by translators.
And again I am not sure I understood correctly.
Have a good day,
beatrice
Reply to: