Next: , Previous: , Up: Translation Process   [Contents][Index]


4.12 Summary of SSI #includes

The GNU Project’s website uses SSI (Server Side Includes) to manage some common parts that are the same in many of the articles. With the help of GNUN their handling should be behind the scenes, but for some of them manual intervention is needed. Here is an incomplete list of the #include’s used:

server/banner.html

This file contains only #include directives, so the “translation” should be almost identical, with filenames modified to have the lang extension. The only other difference is including server/top-addendum.lang.html at the end.

server/body-include-1.html

Contains the top menu with useful “skip to” links.

server/body-include-2.html

This is the file containing the menus, the FSF widget, and any visible announcements made from time to time. If a string gets “fuzzy” or “new” here, it will appear in English in all translations, until server/po/body-include-2.lang.po is updated. Note that some validation errors originate from an error in server/body-include-2.lang.html or some other template file.

server/bottom-notes.html

A link to the FSF page explaining how to report possible copyright infringements.

server/footer-text.html

This is a short file currently containing the footer links, the FSF mission statement and the “back to top” link.

server/generic.html

This file is empty; its “localized” versions may contain optional short messages providing more information about the translation team or where to report bugs.

<p>To join the Fooish translation team, see <a
href="https://www.gnu.org/server/standards/translations/foo">the
Foo team homepage</a>.</p>

This file is not under GNUN’s control, you should edit HTML directly.

server/header.html

The declaration that is included in literally every file. It is maintained manually, as it does not make much sense to put it under GNUN’s control (there are no translatable strings). Remember to specify the proper xml:lang and lang attributes, and for RTL languages, the dir attribute. For example, the file header.ar.html should contain this line:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ar" lang="ar"
      dir="rtl">
server/head-include-1.html

This file (included from server/header.html) is very important: the encoding is defined here. Even if a specific PO file is deliberately encoded in another encoding, the generated HTML will contain the encoding declared in the <meta> element at server/head-include-1.lang.html, so browsers will obey it.

The encoding must be UTF-8, because the English text in the “no-grace” articles serves as a replacement of the translation when the latter is not complete, and because all translated pages share automatically generated lists of translations.

server/html5-header.html

This file was included in pages using some entities introduced in HTML5 draft. These days this is the case for all pages, so the file redirects to server/header.html.

server/html5-head-include-1.html

Likewise.

server/head-include-2.html

Imports the standard CSS, which can be overridden. See How to Use Custom CSS.

server/home-pkgblurbs.html

This header includes short descriptions of all GNU packages; it is included from the homepage and manual/blurbs.html.

server/footer.html

This is a very short and simple file, containing another #include directive. It is maintained manually, so just add lang to the filename, in order the localized footer-text.lang.html to be included.

server/outdated.html

This file is automatically included in outdated translations. It contains a message with links to the English file and to a generated difference of the current revision of the English file against the most recent revision that has a complete translation. It is only included in articles affected by “grace period” because in those cases the outdated passages are replaced with English text, and it is evident without any notices that there is no complete and up to date translation.

planetfeeds.html

Includes automatically extracted news items.

server/top-addendum.html

The text saying that the page is a translation.

licenses/gpl-3.0-body.html
licenses/fdl-1.3-body.html

Some of the licenses have the text of the license itself separated in another file. This serves two purposes: 1) to provide a “standalone” HTML version of the license without the gnu.org style; 2) to prevent strings sneaking in the .pot files, as licenses have only unofficial translations, hosted elsewhere. Nothing special should be done about these SSI directives; the files generated by GNUN include them verbatim as they should not be translated.

The files

in the server sub-directory are what webmasters call “the server templates”. These files are included in almost every article, translated or not. They are somewhat important, as an error made in translating them may break every translated page. The server templates and the homepages are rebuilt by GNUN whenever the original English files change; the GRACE variable has no effect on them. See Runtime Variables in The GNUnited Nations Manual.


Next: Technical Pages, Previous: Savannah Project Membership, Up: Translation Process   [Contents][Index]